@wp-typia/create-workspace-template 0.15.0 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -12,6 +12,11 @@ The generated project starts with an empty `src/blocks/*` workspace shell and is
|
|
|
12
12
|
|
|
13
13
|
```bash
|
|
14
14
|
wp-typia add block my-block --template basic
|
|
15
|
+
wp-typia add style callout-emphasis --block my-block
|
|
16
|
+
wp-typia add transform quote-to-block --from core/quote --to my-block
|
|
15
17
|
wp-typia add binding-source hero-data
|
|
18
|
+
wp-typia add binding-source hero-data --block my-block --attribute headline
|
|
19
|
+
wp-typia add editor-plugin review-workflow --slot sidebar
|
|
20
|
+
wp-typia add editor-plugin seo-notes --slot document-setting-panel
|
|
16
21
|
wp-typia add hooked-block my-block --anchor core/post-content --position after
|
|
17
22
|
```
|
package/README.md.mustache
CHANGED
|
@@ -20,10 +20,13 @@ wp-typia add block counter-card --template persistence --data-storage custom-tab
|
|
|
20
20
|
wp-typia add block faq-stack --template compound --data-storage custom-table --persistence-policy public
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
-
Variations
|
|
23
|
+
Variations, block styles, transforms, patterns, and REST resources can also be
|
|
24
|
+
added after the first block exists:
|
|
24
25
|
|
|
25
26
|
```bash
|
|
26
27
|
wp-typia add variation hero-card --block counter-card
|
|
28
|
+
wp-typia add style callout-emphasis --block counter-card
|
|
29
|
+
wp-typia add transform quote-to-counter --from core/quote --to counter-card
|
|
27
30
|
wp-typia add pattern hero-layout
|
|
28
31
|
wp-typia add rest-resource snapshots --namespace {{namespace}}/v1 --methods list,read,create
|
|
29
32
|
```
|
package/package.json
CHANGED
package/package.json.mustache
CHANGED
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
"@wp-typia/api-client": "{{apiClientPackageVersion}}",
|
|
30
30
|
"@wp-typia/block-runtime": "{{blockRuntimePackageVersion}}",
|
|
31
31
|
"@wp-typia/block-types": "{{blockTypesPackageVersion}}",
|
|
32
|
+
"@wp-typia/project-tools": "{{projectToolsPackageVersion}}",
|
|
32
33
|
"@wp-typia/rest": "{{restPackageVersion}}",
|
|
33
34
|
"@typia/unplugin": "^12.0.1",
|
|
34
35
|
"@types/node": "^24.5.2",
|
|
@@ -36,7 +37,6 @@
|
|
|
36
37
|
"@types/wordpress__blocks": "^12.5.18",
|
|
37
38
|
"@wordpress/browserslist-config": "^6.42.0",
|
|
38
39
|
"@wordpress/scripts": "^30.22.0",
|
|
39
|
-
"ajv": "^8.18.0",
|
|
40
40
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
41
41
|
"tsx": "^4.20.5",
|
|
42
42
|
"typescript": "^5.9.2",
|
|
@@ -15,12 +15,28 @@ export interface WorkspaceVariationConfig {
|
|
|
15
15
|
slug: string;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
+
export interface WorkspaceBlockStyleConfig {
|
|
19
|
+
block: string;
|
|
20
|
+
file: string;
|
|
21
|
+
slug: string;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface WorkspaceBlockTransformConfig {
|
|
25
|
+
block: string;
|
|
26
|
+
file: string;
|
|
27
|
+
from: string;
|
|
28
|
+
slug: string;
|
|
29
|
+
to: string;
|
|
30
|
+
}
|
|
31
|
+
|
|
18
32
|
export interface WorkspacePatternConfig {
|
|
19
33
|
file: string;
|
|
20
34
|
slug: string;
|
|
21
35
|
}
|
|
22
36
|
|
|
23
37
|
export interface WorkspaceBindingSourceConfig {
|
|
38
|
+
attribute?: string;
|
|
39
|
+
block?: string;
|
|
24
40
|
editorFile: string;
|
|
25
41
|
serverFile: string;
|
|
26
42
|
slug: string;
|
|
@@ -48,6 +64,13 @@ export interface WorkspaceEditorPluginConfig {
|
|
|
48
64
|
slot: string;
|
|
49
65
|
}
|
|
50
66
|
|
|
67
|
+
export interface WorkspaceAdminViewConfig {
|
|
68
|
+
file: string;
|
|
69
|
+
phpFile: string;
|
|
70
|
+
slug: string;
|
|
71
|
+
source?: string;
|
|
72
|
+
}
|
|
73
|
+
|
|
51
74
|
export const BLOCKS: WorkspaceBlockConfig[] = [
|
|
52
75
|
// wp-typia add block entries
|
|
53
76
|
];
|
|
@@ -56,6 +79,14 @@ export const VARIATIONS: WorkspaceVariationConfig[] = [
|
|
|
56
79
|
// wp-typia add variation entries
|
|
57
80
|
];
|
|
58
81
|
|
|
82
|
+
export const BLOCK_STYLES: WorkspaceBlockStyleConfig[] = [
|
|
83
|
+
// wp-typia add style entries
|
|
84
|
+
];
|
|
85
|
+
|
|
86
|
+
export const BLOCK_TRANSFORMS: WorkspaceBlockTransformConfig[] = [
|
|
87
|
+
// wp-typia add transform entries
|
|
88
|
+
];
|
|
89
|
+
|
|
59
90
|
export const PATTERNS: WorkspacePatternConfig[] = [
|
|
60
91
|
// wp-typia add pattern entries
|
|
61
92
|
];
|
|
@@ -71,3 +102,7 @@ export const REST_RESOURCES: WorkspaceRestResourceConfig[] = [
|
|
|
71
102
|
export const EDITOR_PLUGINS: WorkspaceEditorPluginConfig[] = [
|
|
72
103
|
// wp-typia add editor-plugin entries
|
|
73
104
|
];
|
|
105
|
+
|
|
106
|
+
export const ADMIN_VIEWS: WorkspaceAdminViewConfig[] = [
|
|
107
|
+
// wp-typia add admin-view entries
|
|
108
|
+
];
|
|
@@ -27,6 +27,8 @@ function hasSharedEditorEntries() {
|
|
|
27
27
|
'src/bindings/index.js',
|
|
28
28
|
'src/editor-plugins/index.ts',
|
|
29
29
|
'src/editor-plugins/index.js',
|
|
30
|
+
'src/admin-views/index.ts',
|
|
31
|
+
'src/admin-views/index.js',
|
|
30
32
|
] ) {
|
|
31
33
|
if ( fs.existsSync( path.join( process.cwd(), relativePath ) ) ) {
|
|
32
34
|
return true;
|
|
@@ -198,6 +198,10 @@ function getSharedEditorEntries() {
|
|
|
198
198
|
'editor-plugins/index',
|
|
199
199
|
[ 'src/editor-plugins/index.ts', 'src/editor-plugins/index.js' ],
|
|
200
200
|
],
|
|
201
|
+
[
|
|
202
|
+
'admin-views/index',
|
|
203
|
+
[ 'src/admin-views/index.ts', 'src/admin-views/index.js' ],
|
|
204
|
+
],
|
|
201
205
|
] ) {
|
|
202
206
|
for ( const relativePath of candidates ) {
|
|
203
207
|
const entryPath = path.resolve( process.cwd(), relativePath );
|