diff --git a/docs/manifest.json b/docs/manifest.json index e4eba19d99fa2..d7f74d47995b6 100644 --- a/docs/manifest.json +++ b/docs/manifest.json @@ -1697,6 +1697,12 @@ "markdown_source": "../packages/eslint-plugin/README.md", "parent": "packages" }, + { + "title": "@wordpress/fields", + "slug": "packages-fields", + "markdown_source": "../packages/fields/README.md", + "parent": "packages" + }, { "title": "@wordpress/format-library", "slug": "packages-format-library", diff --git a/package-lock.json b/package-lock.json index 769ef05083420..5f393e700c289 100644 --- a/package-lock.json +++ b/package-lock.json @@ -40,6 +40,7 @@ "@wordpress/editor": "file:packages/editor", "@wordpress/element": "file:packages/element", "@wordpress/escape-html": "file:packages/escape-html", + "@wordpress/fields": "file:packages/fields", "@wordpress/format-library": "file:packages/format-library", "@wordpress/hooks": "file:packages/hooks", "@wordpress/html-entities": "file:packages/html-entities", @@ -17029,6 +17030,10 @@ "resolved": "packages/eslint-plugin", "link": true }, + "node_modules/@wordpress/fields": { + "resolved": "packages/fields", + "link": true + }, "node_modules/@wordpress/format-library": { "resolved": "packages/format-library", "link": true @@ -53891,6 +53896,21 @@ } } }, + "packages/fields": { + "name": "@wordpress/fields", + "version": "0.0.1", + "license": "GPL-2.0-or-later", + "dependencies": { + "@babel/runtime": "^7.16.0" + }, + "engines": { + "node": ">=18.12.0", + "npm": ">=8.19.2" + }, + "peerDependencies": { + "react": "^18.0.0" + } + }, "packages/format-library": { "name": "@wordpress/format-library", "version": "5.7.0", @@ -68448,6 +68468,12 @@ "requireindex": "^1.2.0" } }, + "@wordpress/fields": { + "version": "file:packages/fields", + "requires": { + "@babel/runtime": "^7.16.0" + } + }, "@wordpress/format-library": { "version": "file:packages/format-library", "requires": { diff --git a/package.json b/package.json index e757aaa0f44b4..9236dbfb47ade 100644 --- a/package.json +++ b/package.json @@ -52,6 +52,7 @@ "@wordpress/editor": "file:packages/editor", "@wordpress/element": "file:packages/element", "@wordpress/escape-html": "file:packages/escape-html", + "@wordpress/fields": "file:packages/fields", "@wordpress/format-library": "file:packages/format-library", "@wordpress/hooks": "file:packages/hooks", "@wordpress/html-entities": "file:packages/html-entities", diff --git a/packages/dependency-extraction-webpack-plugin/lib/util.js b/packages/dependency-extraction-webpack-plugin/lib/util.js index ee5c2face1b9d..fcc6e5a0ed173 100644 --- a/packages/dependency-extraction-webpack-plugin/lib/util.js +++ b/packages/dependency-extraction-webpack-plugin/lib/util.js @@ -9,6 +9,7 @@ const BUNDLED_PACKAGES = [ '@wordpress/interface', '@wordpress/sync', '@wordpress/undo-manager', + '@wordpress/fields', ]; /** diff --git a/packages/fields/.npmrc b/packages/fields/.npmrc new file mode 100644 index 0000000000000..43c97e719a5a8 --- /dev/null +++ b/packages/fields/.npmrc @@ -0,0 +1 @@ +package-lock=false diff --git a/packages/fields/CHANGELOG.md b/packages/fields/CHANGELOG.md new file mode 100644 index 0000000000000..e04ce921cdfdc --- /dev/null +++ b/packages/fields/CHANGELOG.md @@ -0,0 +1,5 @@ + + +## Unreleased + +Initial release. diff --git a/packages/fields/README.md b/packages/fields/README.md new file mode 100644 index 0000000000000..c5044d1e9fdd2 --- /dev/null +++ b/packages/fields/README.md @@ -0,0 +1,27 @@ +# Fields + +This package provides core elements for the DataView library, designed to simplify the creation and management of data display elements in WordPress. + +## Installation + +Install the module + +```bash +npm install @wordpress/fields --save +``` + +## Usage + + + +Nothing to document. + + + +## Contributing to this package + +This is an individual package that's part of the Gutenberg project. The project is organized as a monorepo. It's made up of multiple self-contained software packages, each with a specific purpose. The packages in this monorepo are published to [npm](https://www.npmjs.com/) and used by [WordPress](https://make.wordpress.org/core/) as well as other software projects. + +To find out more about contributing to this package or Gutenberg as a whole, please read the project's main [contributor guide](https://github.com/WordPress/gutenberg/tree/HEAD/CONTRIBUTING.md). + +

Code is Poetry.

diff --git a/packages/fields/package.json b/packages/fields/package.json new file mode 100644 index 0000000000000..4d5d33a10e5ed --- /dev/null +++ b/packages/fields/package.json @@ -0,0 +1,41 @@ +{ + "name": "@wordpress/fields", + "version": "0.0.1", + "description": "DataViews is a component that provides an API to render datasets using different types of layouts (table, grid, list, etc.).", + "author": "The WordPress Contributors", + "license": "GPL-2.0-or-later", + "keywords": [ + "wordpress", + "gutenberg", + "dataviews" + ], + "homepage": "https://github.com/WordPress/gutenberg/tree/HEAD/packages/fields/README.md", + "repository": { + "type": "git", + "url": "https://github.com/WordPress/gutenberg.git", + "directory": "packages/fields" + }, + "bugs": { + "url": "https://github.com/WordPress/gutenberg/issues" + }, + "engines": { + "node": ">=18.12.0", + "npm": ">=8.19.2" + }, + "main": "build/index.js", + "module": "build-module/index.js", + "types": "build-types", + "sideEffects": [ + "build-style/**", + "src/**/*.scss" + ], + "dependencies": { + "@babel/runtime": "^7.16.0" + }, + "peerDependencies": { + "react": "^18.0.0" + }, + "publishConfig": { + "access": "public" + } +} diff --git a/packages/fields/src/index.ts b/packages/fields/src/index.ts new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/packages/fields/tsconfig.json b/packages/fields/tsconfig.json new file mode 100644 index 0000000000000..79aa09d0ad56e --- /dev/null +++ b/packages/fields/tsconfig.json @@ -0,0 +1,11 @@ +{ + "$schema": "https://json.schemastore.org/tsconfig.json", + "extends": "../../tsconfig.base.json", + "compilerOptions": { + "rootDir": "src", + "declarationDir": "build-types", + "checkJs": false + }, + "references": [], + "include": [ "src" ] +} diff --git a/packages/private-apis/src/implementation.js b/packages/private-apis/src/implementation.js index c268e46f669cb..13ee9873e899d 100644 --- a/packages/private-apis/src/implementation.js +++ b/packages/private-apis/src/implementation.js @@ -31,6 +31,7 @@ const CORE_MODULES_USING_PRIVATE_APIS = [ '@wordpress/reusable-blocks', '@wordpress/router', '@wordpress/dataviews', + '@wordpress/fields', ]; /** diff --git a/tools/webpack/packages.js b/tools/webpack/packages.js index 055665c2feb1c..a1610d0a5ba54 100644 --- a/tools/webpack/packages.js +++ b/tools/webpack/packages.js @@ -34,6 +34,7 @@ const BUNDLED_PACKAGES = [ '@wordpress/interface', '@wordpress/sync', '@wordpress/undo-manager', + '@wordpress/fields', ]; // PHP files in packages that have to be copied during build. diff --git a/tsconfig.json b/tsconfig.json index 6be31e9b61bef..3ab54f66019bc 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -25,6 +25,7 @@ { "path": "packages/element" }, { "path": "packages/escape-html" }, { "path": "packages/eslint-plugin" }, + { "path": "packages/fields" }, { "path": "packages/hooks" }, { "path": "packages/html-entities" }, { "path": "packages/html-entities" },