webstudio 0.285.0 → 0.285.1
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/lib/cli.js +75 -1
- package/package.json +20 -20
- package/templates/cloudflare/package.json +1 -1
- package/templates/defaults/package.json +8 -8
- package/templates/react-router/package.json +8 -8
- package/templates/react-router-cloudflare/package.json +1 -1
- package/templates/ssg/package.json +6 -6
package/lib/cli.js
CHANGED
|
@@ -136560,6 +136560,41 @@ const detachSharedSlotChildrenMutable = ({
|
|
|
136560
136560
|
createId
|
|
136561
136561
|
});
|
|
136562
136562
|
};
|
|
136563
|
+
const getWarningKey = ({ instanceId: instanceId2, message }) => `${instanceId2}\0${message}`;
|
|
136564
|
+
const getFragmentPlacementContentModelWarnings = ({
|
|
136565
|
+
children,
|
|
136566
|
+
instances,
|
|
136567
|
+
props: props2,
|
|
136568
|
+
metas,
|
|
136569
|
+
parentSelector = []
|
|
136570
|
+
}) => {
|
|
136571
|
+
const warnings = /* @__PURE__ */ new Map();
|
|
136572
|
+
for (const child of children) {
|
|
136573
|
+
if (child.type !== "id") {
|
|
136574
|
+
continue;
|
|
136575
|
+
}
|
|
136576
|
+
isTreeSatisfyingContentModel({
|
|
136577
|
+
instances,
|
|
136578
|
+
props: props2,
|
|
136579
|
+
metas,
|
|
136580
|
+
instanceSelector: [child.value, ...parentSelector],
|
|
136581
|
+
onError: (message, instanceSelector) => {
|
|
136582
|
+
const warning2 = { message, instanceId: instanceSelector[0] };
|
|
136583
|
+
warnings.set(getWarningKey(warning2), warning2);
|
|
136584
|
+
}
|
|
136585
|
+
});
|
|
136586
|
+
}
|
|
136587
|
+
return Array.from(warnings.values());
|
|
136588
|
+
};
|
|
136589
|
+
const getNewFragmentContentModelWarnings = ({
|
|
136590
|
+
warnings,
|
|
136591
|
+
allowedWarnings
|
|
136592
|
+
}) => {
|
|
136593
|
+
const allowedWarningKeys = new Set(allowedWarnings.map(getWarningKey));
|
|
136594
|
+
return warnings.filter(
|
|
136595
|
+
(warning2) => allowedWarningKeys.has(getWarningKey(warning2)) === false
|
|
136596
|
+
);
|
|
136597
|
+
};
|
|
136563
136598
|
const getCollectionDropTarget = (instances, dropTarget) => {
|
|
136564
136599
|
const [parentId, grandparentId] = dropTarget.parentSelector;
|
|
136565
136600
|
const parent = instances.get(parentId);
|
|
@@ -214713,6 +214748,7 @@ const createInsertFragmentMutation = ({
|
|
|
214713
214748
|
contentMode = false,
|
|
214714
214749
|
additionalAvailableVariables = [],
|
|
214715
214750
|
getResultDetails,
|
|
214751
|
+
validateContentModel = true,
|
|
214716
214752
|
context
|
|
214717
214753
|
}) => {
|
|
214718
214754
|
const mutationState = getRequiredComponentInsertState(state);
|
|
@@ -214782,6 +214818,43 @@ const createInsertFragmentMutation = ({
|
|
|
214782
214818
|
return child;
|
|
214783
214819
|
}
|
|
214784
214820
|
);
|
|
214821
|
+
if (validateContentModel) {
|
|
214822
|
+
const validationInstances = new Map(nextData.instances);
|
|
214823
|
+
const validationParent = {
|
|
214824
|
+
...parent,
|
|
214825
|
+
children: mode === "replace" ? insertedChildren : [
|
|
214826
|
+
...parentChildren.slice(0, insertIndex),
|
|
214827
|
+
...insertedChildren,
|
|
214828
|
+
...parentChildren.slice(insertIndex)
|
|
214829
|
+
]
|
|
214830
|
+
};
|
|
214831
|
+
validationInstances.set(parent.id, validationParent);
|
|
214832
|
+
const { instanceSelector: parentSelector } = findPageAndSelectorByInstanceId(
|
|
214833
|
+
mutationState.pages,
|
|
214834
|
+
validationInstances,
|
|
214835
|
+
parent.id
|
|
214836
|
+
);
|
|
214837
|
+
const allowedWarnings = context.allowLegacyContentModelWarnings ? getFragmentPlacementContentModelWarnings({
|
|
214838
|
+
children: insertedChildren,
|
|
214839
|
+
instances: validationInstances,
|
|
214840
|
+
props: nextData.props,
|
|
214841
|
+
metas: componentMetas
|
|
214842
|
+
}) : [];
|
|
214843
|
+
const warnings = getFragmentPlacementContentModelWarnings({
|
|
214844
|
+
children: insertedChildren,
|
|
214845
|
+
instances: validationInstances,
|
|
214846
|
+
props: nextData.props,
|
|
214847
|
+
metas: componentMetas,
|
|
214848
|
+
parentSelector
|
|
214849
|
+
});
|
|
214850
|
+
const [contentModelError] = getNewFragmentContentModelWarnings({
|
|
214851
|
+
warnings,
|
|
214852
|
+
allowedWarnings
|
|
214853
|
+
});
|
|
214854
|
+
if (contentModelError !== void 0) {
|
|
214855
|
+
return throwBuilderRuntimeError("BAD_REQUEST", contentModelError.message);
|
|
214856
|
+
}
|
|
214857
|
+
}
|
|
214785
214858
|
const createResult = (parentInstanceId2, removedInstanceIds) => ({
|
|
214786
214859
|
instanceIds: Array.from(newInstanceIds.values()).filter(
|
|
214787
214860
|
(instanceId2) => instanceId2 !== ROOT_INSTANCE_ID && mutationState.instances.has(instanceId2) === false
|
|
@@ -214928,6 +215001,7 @@ const insertComponent$1 = (state, input2, context) => {
|
|
|
214928
215001
|
templates: templates2,
|
|
214929
215002
|
mode: input2.mode,
|
|
214930
215003
|
insertIndex: input2.insertIndex,
|
|
215004
|
+
validateContentModel: false,
|
|
214931
215005
|
context
|
|
214932
215006
|
});
|
|
214933
215007
|
};
|
|
@@ -246334,7 +246408,7 @@ class HandledCliError extends Error {
|
|
|
246334
246408
|
}
|
|
246335
246409
|
const isHandledCliError = (error) => error instanceof HandledCliError;
|
|
246336
246410
|
const name = "webstudio";
|
|
246337
|
-
const version$1 = "0.285.
|
|
246411
|
+
const version$1 = "0.285.1";
|
|
246338
246412
|
const description = "Webstudio CLI";
|
|
246339
246413
|
const author = "Webstudio <github@webstudio.is>";
|
|
246340
246414
|
const homepage = "https://webstudio.is";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "webstudio",
|
|
3
|
-
"version": "0.285.
|
|
3
|
+
"version": "0.285.1",
|
|
4
4
|
"description": "Webstudio CLI",
|
|
5
5
|
"author": "Webstudio <github@webstudio.is>",
|
|
6
6
|
"homepage": "https://webstudio.is",
|
|
@@ -44,10 +44,10 @@
|
|
|
44
44
|
"warn-once": "^0.1.1",
|
|
45
45
|
"yargs": "^17.7.2",
|
|
46
46
|
"zod": "^4.4.3",
|
|
47
|
-
"@webstudio-is/
|
|
48
|
-
"@webstudio-is/
|
|
47
|
+
"@webstudio-is/http-client": "0.285.1",
|
|
48
|
+
"@webstudio-is/protocol": "0.285.1",
|
|
49
49
|
"@webstudio-is/sync-client": "0.0.0",
|
|
50
|
-
"@webstudio-is/
|
|
50
|
+
"@webstudio-is/project-migrations": "0.285.1"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@cloudflare/vite-plugin": "^1.1.0",
|
|
@@ -85,23 +85,23 @@
|
|
|
85
85
|
"vite": "^6.3.4",
|
|
86
86
|
"vitest": "^3.1.2",
|
|
87
87
|
"wrangler": "^3.63.2",
|
|
88
|
-
"@webstudio-is/
|
|
89
|
-
"@webstudio-is/
|
|
90
|
-
"@webstudio-is/expression": "0.285.
|
|
91
|
-
"@webstudio-is/fonts": "0.285.
|
|
92
|
-
"@webstudio-is/image": "0.285.
|
|
93
|
-
"@webstudio-is/react-sdk": "0.285.0",
|
|
94
|
-
"@webstudio-is/query-builder": "0.285.0",
|
|
95
|
-
"@webstudio-is/sdk-components-animation": "0.285.0",
|
|
96
|
-
"@webstudio-is/sdk": "0.285.0",
|
|
88
|
+
"@webstudio-is/css-engine": "0.285.1",
|
|
89
|
+
"@webstudio-is/content-engine": "0.285.1",
|
|
90
|
+
"@webstudio-is/expression": "0.285.1",
|
|
91
|
+
"@webstudio-is/fonts": "0.285.1",
|
|
92
|
+
"@webstudio-is/image": "0.285.1",
|
|
97
93
|
"@webstudio-is/project-build": "0.0.0",
|
|
98
|
-
"@webstudio-is/
|
|
99
|
-
"@webstudio-is/
|
|
100
|
-
"@webstudio-is/sdk
|
|
101
|
-
"@webstudio-is/sdk-components-
|
|
102
|
-
"@webstudio-is/sdk-components-
|
|
103
|
-
"@webstudio-is/
|
|
104
|
-
"@webstudio-is/
|
|
94
|
+
"@webstudio-is/query-builder": "0.285.1",
|
|
95
|
+
"@webstudio-is/react-sdk": "0.285.1",
|
|
96
|
+
"@webstudio-is/sdk": "0.285.1",
|
|
97
|
+
"@webstudio-is/sdk-components-animation": "0.285.1",
|
|
98
|
+
"@webstudio-is/sdk-components-react": "0.285.1",
|
|
99
|
+
"@webstudio-is/sdk-components-react-radix": "0.285.1",
|
|
100
|
+
"@webstudio-is/sdk-components-react-remix": "0.285.1",
|
|
101
|
+
"@webstudio-is/sdk-components-react-router": "0.285.1",
|
|
102
|
+
"@webstudio-is/sdk-components-registry": "0.285.1",
|
|
103
|
+
"@webstudio-is/wsauth": "0.285.1",
|
|
104
|
+
"@webstudio-is/tsconfig": "1.0.7"
|
|
105
105
|
},
|
|
106
106
|
"scripts": {
|
|
107
107
|
"typecheck": "tsc --noEmit",
|
|
@@ -11,14 +11,14 @@
|
|
|
11
11
|
"@remix-run/node": "2.16.5",
|
|
12
12
|
"@remix-run/react": "2.16.5",
|
|
13
13
|
"@remix-run/server-runtime": "2.16.5",
|
|
14
|
-
"@webstudio-is/image": "0.285.
|
|
15
|
-
"@webstudio-is/react-sdk": "0.285.
|
|
16
|
-
"@webstudio-is/sdk": "0.285.
|
|
17
|
-
"@webstudio-is/sdk-components-react": "0.285.
|
|
18
|
-
"@webstudio-is/sdk-components-animation": "0.285.
|
|
19
|
-
"@webstudio-is/sdk-components-react-radix": "0.285.
|
|
20
|
-
"@webstudio-is/sdk-components-react-remix": "0.285.
|
|
21
|
-
"@webstudio-is/wsauth": "0.285.
|
|
14
|
+
"@webstudio-is/image": "0.285.1",
|
|
15
|
+
"@webstudio-is/react-sdk": "0.285.1",
|
|
16
|
+
"@webstudio-is/sdk": "0.285.1",
|
|
17
|
+
"@webstudio-is/sdk-components-react": "0.285.1",
|
|
18
|
+
"@webstudio-is/sdk-components-animation": "0.285.1",
|
|
19
|
+
"@webstudio-is/sdk-components-react-radix": "0.285.1",
|
|
20
|
+
"@webstudio-is/sdk-components-react-remix": "0.285.1",
|
|
21
|
+
"@webstudio-is/wsauth": "0.285.1",
|
|
22
22
|
"isbot": "^5.1.25",
|
|
23
23
|
"react": "18.3.0-canary-14898b6a9-20240318",
|
|
24
24
|
"react-dom": "18.3.0-canary-14898b6a9-20240318"
|
|
@@ -13,14 +13,14 @@
|
|
|
13
13
|
"@react-router/fs-routes": "^7.5.3",
|
|
14
14
|
"@react-router/node": "^7.5.3",
|
|
15
15
|
"@react-router/serve": "^7.5.3",
|
|
16
|
-
"@webstudio-is/image": "0.285.
|
|
17
|
-
"@webstudio-is/react-sdk": "0.285.
|
|
18
|
-
"@webstudio-is/sdk": "0.285.
|
|
19
|
-
"@webstudio-is/sdk-components-animation": "0.285.
|
|
20
|
-
"@webstudio-is/sdk-components-react-radix": "0.285.
|
|
21
|
-
"@webstudio-is/sdk-components-react-router": "0.285.
|
|
22
|
-
"@webstudio-is/sdk-components-react": "0.285.
|
|
23
|
-
"@webstudio-is/wsauth": "0.285.
|
|
16
|
+
"@webstudio-is/image": "0.285.1",
|
|
17
|
+
"@webstudio-is/react-sdk": "0.285.1",
|
|
18
|
+
"@webstudio-is/sdk": "0.285.1",
|
|
19
|
+
"@webstudio-is/sdk-components-animation": "0.285.1",
|
|
20
|
+
"@webstudio-is/sdk-components-react-radix": "0.285.1",
|
|
21
|
+
"@webstudio-is/sdk-components-react-router": "0.285.1",
|
|
22
|
+
"@webstudio-is/sdk-components-react": "0.285.1",
|
|
23
|
+
"@webstudio-is/wsauth": "0.285.1",
|
|
24
24
|
"isbot": "^5.1.25",
|
|
25
25
|
"react": "18.3.0-canary-14898b6a9-20240318",
|
|
26
26
|
"react-dom": "18.3.0-canary-14898b6a9-20240318",
|
|
@@ -9,12 +9,12 @@
|
|
|
9
9
|
"typecheck": "tsc --noEmit"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@webstudio-is/image": "0.285.
|
|
13
|
-
"@webstudio-is/react-sdk": "0.285.
|
|
14
|
-
"@webstudio-is/sdk": "0.285.
|
|
15
|
-
"@webstudio-is/sdk-components-react": "0.285.
|
|
16
|
-
"@webstudio-is/sdk-components-animation": "0.285.
|
|
17
|
-
"@webstudio-is/sdk-components-react-radix": "0.285.
|
|
12
|
+
"@webstudio-is/image": "0.285.1",
|
|
13
|
+
"@webstudio-is/react-sdk": "0.285.1",
|
|
14
|
+
"@webstudio-is/sdk": "0.285.1",
|
|
15
|
+
"@webstudio-is/sdk-components-react": "0.285.1",
|
|
16
|
+
"@webstudio-is/sdk-components-animation": "0.285.1",
|
|
17
|
+
"@webstudio-is/sdk-components-react-radix": "0.285.1",
|
|
18
18
|
"react": "18.3.0-canary-14898b6a9-20240318",
|
|
19
19
|
"react-dom": "18.3.0-canary-14898b6a9-20240318",
|
|
20
20
|
"vike": "^0.4.229"
|