webstudio 0.295.0 → 0.296.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/lib/cli.js +31 -30
- 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
|
@@ -179123,14 +179123,7 @@ ${tagProperty}=${JSON.stringify(instance2.tag)}`;
|
|
|
179123
179123
|
let collectionDataValue;
|
|
179124
179124
|
let collectionItemValue;
|
|
179125
179125
|
let collectionItemKeyValue;
|
|
179126
|
-
|
|
179127
|
-
const instanceProps = Array.from(
|
|
179128
|
-
Array.from(props2.values()).filter((prop2) => prop2.instanceId === instance2.id).reduce((uniqueProps, prop2) => {
|
|
179129
|
-
uniqueProps.set(prop2.name, prop2);
|
|
179130
|
-
return uniqueProps;
|
|
179131
|
-
}, /* @__PURE__ */ new Map()).values()
|
|
179132
|
-
);
|
|
179133
|
-
const instancePropNames = new Set(instanceProps.map((prop2) => prop2.name));
|
|
179126
|
+
const classNameValues = [];
|
|
179134
179127
|
const projectedResourceProps = /* @__PURE__ */ new Map();
|
|
179135
179128
|
const componentPropNames = new Set(Object.keys(meta2?.props ?? {}));
|
|
179136
179129
|
const acceptsHtmlAttributes = hasTags || instance2.tag !== void 0 || instance2.component === elementComponent;
|
|
@@ -179139,36 +179132,45 @@ ${tagProperty}=${JSON.stringify(instance2.tag)}`;
|
|
|
179139
179132
|
componentPropNames,
|
|
179140
179133
|
acceptsHtmlAttributes
|
|
179141
179134
|
});
|
|
179142
|
-
const
|
|
179143
|
-
|
|
179144
|
-
|
|
179145
|
-
|
|
179146
|
-
|
|
179147
|
-
|
|
179148
|
-
|
|
179149
|
-
|
|
179150
|
-
|
|
179135
|
+
const propsByGeneratedName = /* @__PURE__ */ new Map();
|
|
179136
|
+
const classProps = /* @__PURE__ */ new Map();
|
|
179137
|
+
for (const prop2 of props2.values()) {
|
|
179138
|
+
if (prop2.instanceId !== instance2.id || isAttributeNameSafe(prop2.name) === false) {
|
|
179139
|
+
continue;
|
|
179140
|
+
}
|
|
179141
|
+
const name2 = getGeneratedPropName(prop2.name);
|
|
179142
|
+
if (name2 === "className") {
|
|
179143
|
+
classProps.set(prop2.name, prop2);
|
|
179144
|
+
continue;
|
|
179145
|
+
}
|
|
179146
|
+
propsByGeneratedName.set(name2, prop2);
|
|
179147
|
+
}
|
|
179148
|
+
const generatedPropNames = /* @__PURE__ */ new Set([
|
|
179149
|
+
...propsByGeneratedName.keys(),
|
|
179150
|
+
...classProps.size > 0 ? ["className"] : []
|
|
179151
|
+
]);
|
|
179152
|
+
for (const [name2, prop2] of [
|
|
179153
|
+
...propsByGeneratedName,
|
|
179154
|
+
...Array.from(classProps.values(), (prop22) => ["className", prop22])
|
|
179155
|
+
]) {
|
|
179151
179156
|
const propValue = generatePropValue({
|
|
179152
179157
|
scope: scope2,
|
|
179153
179158
|
prop: prop2,
|
|
179154
179159
|
dataSources,
|
|
179155
179160
|
usedDataSources
|
|
179156
179161
|
});
|
|
179157
|
-
if (isAttributeNameSafe(prop2.name) === false) {
|
|
179158
|
-
continue;
|
|
179159
|
-
}
|
|
179160
179162
|
if (prop2.type === "resource") {
|
|
179161
179163
|
const propMeta2 = meta2?.props?.[prop2.name];
|
|
179162
179164
|
const resource2 = resources?.get(prop2.value);
|
|
179163
179165
|
if (propMeta2?.type === "resource" && resource2 !== void 0) {
|
|
179164
|
-
for (const
|
|
179165
|
-
|
|
179166
|
-
|
|
179166
|
+
for (const propName of propMeta2.generatedProps ?? []) {
|
|
179167
|
+
const generatedPropName = getGeneratedPropName(propName);
|
|
179168
|
+
if (generatedPropNames.has(generatedPropName) === false && isAttributeNameSafe(propName)) {
|
|
179169
|
+
projectedResourceProps.set(generatedPropName, resource2[propName]);
|
|
179167
179170
|
}
|
|
179168
179171
|
}
|
|
179169
179172
|
}
|
|
179170
179173
|
}
|
|
179171
|
-
const name2 = generatedPropNames.get(prop2.id) ?? prop2.name;
|
|
179172
179174
|
if (prop2.name === showAttribute) {
|
|
179173
179175
|
if (propValue === "true") {
|
|
179174
179176
|
continue;
|
|
@@ -179192,7 +179194,7 @@ ${tagProperty}=${JSON.stringify(instance2.tag)}`;
|
|
|
179192
179194
|
continue;
|
|
179193
179195
|
}
|
|
179194
179196
|
if (name2 === "className" && propValue !== void 0) {
|
|
179195
|
-
|
|
179197
|
+
classNameValues.push(propValue);
|
|
179196
179198
|
continue;
|
|
179197
179199
|
}
|
|
179198
179200
|
if (propValue !== void 0) {
|
|
@@ -179200,15 +179202,14 @@ ${tagProperty}=${JSON.stringify(instance2.tag)}`;
|
|
|
179200
179202
|
${name2}={${propValue}}`;
|
|
179201
179203
|
}
|
|
179202
179204
|
}
|
|
179203
|
-
for (const [
|
|
179204
|
-
const name2 = getGeneratedPropName(propName);
|
|
179205
|
+
for (const [name2, value2] of projectedResourceProps) {
|
|
179205
179206
|
generatedProps += `
|
|
179206
179207
|
${name2}={${JSON.stringify(value2)}}`;
|
|
179207
179208
|
}
|
|
179208
179209
|
const classMapArray = classesMap?.get(instance2.id);
|
|
179209
|
-
if (classMapArray ||
|
|
179210
|
+
if (classMapArray || classNameValues.length > 0) {
|
|
179210
179211
|
let classNameTemplate = classMapArray ? classMapArray.join(" ") : "";
|
|
179211
|
-
|
|
179212
|
+
for (const classNameValue of classNameValues) {
|
|
179212
179213
|
if (classNameTemplate) {
|
|
179213
179214
|
classNameTemplate += " ";
|
|
179214
179215
|
}
|
|
@@ -325499,7 +325500,7 @@ class HandledCliError extends Error {
|
|
|
325499
325500
|
}
|
|
325500
325501
|
const isHandledCliError = (error) => error instanceof HandledCliError;
|
|
325501
325502
|
const name = "webstudio";
|
|
325502
|
-
const version$1 = "0.
|
|
325503
|
+
const version$1 = "0.296.0";
|
|
325503
325504
|
const description = "Webstudio CLI";
|
|
325504
325505
|
const author = "Webstudio <github@webstudio.is>";
|
|
325505
325506
|
const homepage = "https://webstudio.is";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "webstudio",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.296.0",
|
|
4
4
|
"description": "Webstudio CLI",
|
|
5
5
|
"author": "Webstudio <github@webstudio.is>",
|
|
6
6
|
"homepage": "https://webstudio.is",
|
|
@@ -55,10 +55,10 @@
|
|
|
55
55
|
"which": "^5.0.0",
|
|
56
56
|
"yargs": "^17.7.2",
|
|
57
57
|
"zod": "^4.4.3",
|
|
58
|
-
"@webstudio-is/
|
|
59
|
-
"@webstudio-is/
|
|
60
|
-
"@webstudio-is/protocol": "0.
|
|
61
|
-
"@webstudio-is/
|
|
58
|
+
"@webstudio-is/http-client": "0.296.0",
|
|
59
|
+
"@webstudio-is/project-migrations": "0.296.0",
|
|
60
|
+
"@webstudio-is/protocol": "0.296.0",
|
|
61
|
+
"@webstudio-is/sync-client": "0.0.0"
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
64
|
"@cloudflare/vite-plugin": "^1.1.0",
|
|
@@ -101,24 +101,24 @@
|
|
|
101
101
|
"vite": "^6.3.4",
|
|
102
102
|
"vitest": "^3.1.2",
|
|
103
103
|
"wrangler": "^3.63.2",
|
|
104
|
-
"@webstudio-is/css-engine": "0.
|
|
105
|
-
"@webstudio-is/content-engine": "0.
|
|
106
|
-
"@webstudio-is/expression": "0.
|
|
107
|
-
"@webstudio-is/
|
|
108
|
-
"@webstudio-is/fonts": "0.295.0",
|
|
109
|
-
"@webstudio-is/query-builder": "0.295.0",
|
|
104
|
+
"@webstudio-is/css-engine": "0.296.0",
|
|
105
|
+
"@webstudio-is/content-engine": "0.296.0",
|
|
106
|
+
"@webstudio-is/expression": "0.296.0",
|
|
107
|
+
"@webstudio-is/fonts": "0.296.0",
|
|
110
108
|
"@webstudio-is/project-build": "0.0.0",
|
|
111
|
-
"@webstudio-is/
|
|
112
|
-
"@webstudio-is/
|
|
113
|
-
"@webstudio-is/sdk
|
|
114
|
-
"@webstudio-is/
|
|
115
|
-
"@webstudio-is/sdk-components-
|
|
116
|
-
"@webstudio-is/sdk-components-react-radix": "0.
|
|
117
|
-
"@webstudio-is/
|
|
118
|
-
"@webstudio-is/sdk-components-
|
|
109
|
+
"@webstudio-is/query-builder": "0.296.0",
|
|
110
|
+
"@webstudio-is/sdk-components-animation": "0.296.0",
|
|
111
|
+
"@webstudio-is/sdk": "0.296.0",
|
|
112
|
+
"@webstudio-is/react-sdk": "0.296.0",
|
|
113
|
+
"@webstudio-is/sdk-components-react": "0.296.0",
|
|
114
|
+
"@webstudio-is/sdk-components-react-radix": "0.296.0",
|
|
115
|
+
"@webstudio-is/image": "0.296.0",
|
|
116
|
+
"@webstudio-is/sdk-components-react-remix": "0.296.0",
|
|
117
|
+
"@webstudio-is/sdk-components-registry": "0.296.0",
|
|
118
|
+
"@webstudio-is/sdk-components-react-router": "0.296.0",
|
|
119
119
|
"@webstudio-is/tsconfig": "1.0.7",
|
|
120
120
|
"@webstudio-is/vision": "0.0.0",
|
|
121
|
-
"@webstudio-is/wsauth": "0.
|
|
121
|
+
"@webstudio-is/wsauth": "0.296.0"
|
|
122
122
|
},
|
|
123
123
|
"scripts": {
|
|
124
124
|
"typecheck": "tsc --noEmit",
|
|
@@ -13,14 +13,14 @@
|
|
|
13
13
|
"@remix-run/node": "2.16.5",
|
|
14
14
|
"@remix-run/react": "2.16.5",
|
|
15
15
|
"@remix-run/server-runtime": "2.16.5",
|
|
16
|
-
"@webstudio-is/image": "0.
|
|
17
|
-
"@webstudio-is/react-sdk": "0.
|
|
18
|
-
"@webstudio-is/sdk": "0.
|
|
19
|
-
"@webstudio-is/sdk-components-react": "0.
|
|
20
|
-
"@webstudio-is/sdk-components-animation": "0.
|
|
21
|
-
"@webstudio-is/sdk-components-react-radix": "0.
|
|
22
|
-
"@webstudio-is/sdk-components-react-remix": "0.
|
|
23
|
-
"@webstudio-is/wsauth": "0.
|
|
16
|
+
"@webstudio-is/image": "0.296.0",
|
|
17
|
+
"@webstudio-is/react-sdk": "0.296.0",
|
|
18
|
+
"@webstudio-is/sdk": "0.296.0",
|
|
19
|
+
"@webstudio-is/sdk-components-react": "0.296.0",
|
|
20
|
+
"@webstudio-is/sdk-components-animation": "0.296.0",
|
|
21
|
+
"@webstudio-is/sdk-components-react-radix": "0.296.0",
|
|
22
|
+
"@webstudio-is/sdk-components-react-remix": "0.296.0",
|
|
23
|
+
"@webstudio-is/wsauth": "0.296.0",
|
|
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",
|
|
@@ -15,14 +15,14 @@
|
|
|
15
15
|
"@react-router/fs-routes": "^7.5.3",
|
|
16
16
|
"@react-router/node": "^7.5.3",
|
|
17
17
|
"@react-router/serve": "^7.5.3",
|
|
18
|
-
"@webstudio-is/image": "0.
|
|
19
|
-
"@webstudio-is/react-sdk": "0.
|
|
20
|
-
"@webstudio-is/sdk": "0.
|
|
21
|
-
"@webstudio-is/sdk-components-animation": "0.
|
|
22
|
-
"@webstudio-is/sdk-components-react-radix": "0.
|
|
23
|
-
"@webstudio-is/sdk-components-react-router": "0.
|
|
24
|
-
"@webstudio-is/sdk-components-react": "0.
|
|
25
|
-
"@webstudio-is/wsauth": "0.
|
|
18
|
+
"@webstudio-is/image": "0.296.0",
|
|
19
|
+
"@webstudio-is/react-sdk": "0.296.0",
|
|
20
|
+
"@webstudio-is/sdk": "0.296.0",
|
|
21
|
+
"@webstudio-is/sdk-components-animation": "0.296.0",
|
|
22
|
+
"@webstudio-is/sdk-components-react-radix": "0.296.0",
|
|
23
|
+
"@webstudio-is/sdk-components-react-router": "0.296.0",
|
|
24
|
+
"@webstudio-is/sdk-components-react": "0.296.0",
|
|
25
|
+
"@webstudio-is/wsauth": "0.296.0",
|
|
26
26
|
"isbot": "^5.1.25",
|
|
27
27
|
"react": "18.3.0-canary-14898b6a9-20240318",
|
|
28
28
|
"react-dom": "18.3.0-canary-14898b6a9-20240318",
|
|
@@ -11,12 +11,12 @@
|
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@shikijs/langs": "4.4.1",
|
|
13
13
|
"@shikijs/themes": "4.4.1",
|
|
14
|
-
"@webstudio-is/image": "0.
|
|
15
|
-
"@webstudio-is/react-sdk": "0.
|
|
16
|
-
"@webstudio-is/sdk": "0.
|
|
17
|
-
"@webstudio-is/sdk-components-react": "0.
|
|
18
|
-
"@webstudio-is/sdk-components-animation": "0.
|
|
19
|
-
"@webstudio-is/sdk-components-react-radix": "0.
|
|
14
|
+
"@webstudio-is/image": "0.296.0",
|
|
15
|
+
"@webstudio-is/react-sdk": "0.296.0",
|
|
16
|
+
"@webstudio-is/sdk": "0.296.0",
|
|
17
|
+
"@webstudio-is/sdk-components-react": "0.296.0",
|
|
18
|
+
"@webstudio-is/sdk-components-animation": "0.296.0",
|
|
19
|
+
"@webstudio-is/sdk-components-react-radix": "0.296.0",
|
|
20
20
|
"react": "18.3.0-canary-14898b6a9-20240318",
|
|
21
21
|
"react-dom": "18.3.0-canary-14898b6a9-20240318",
|
|
22
22
|
"shiki": "4.4.1",
|