webstudio 0.198.0 → 0.199.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 +1070 -1188
- package/package.json +16 -10
- package/templates/defaults/app/constants.mjs +0 -1
- package/templates/defaults/app/route-templates/html.tsx +15 -61
- package/templates/defaults/package.json +8 -7
- package/templates/internal/package.json +5 -4
- package/templates/netlify-edge-functions/app/constants.mjs +0 -1
- package/templates/netlify-functions/app/constants.mjs +0 -1
- package/templates/react-router-docker/.dockerignore +4 -0
- package/templates/react-router-docker/Dockerfile +23 -0
- package/templates/react-router-docker/app/constants.mjs +18 -0
- package/templates/react-router-docker/app/extension.ts +13 -0
- package/templates/react-router-docker/app/root.tsx +35 -0
- package/templates/react-router-docker/app/route-templates/default-sitemap.tsx +34 -0
- package/templates/react-router-docker/app/route-templates/html.tsx +295 -0
- package/templates/react-router-docker/app/route-templates/redirect.tsx +6 -0
- package/templates/react-router-docker/app/route-templates/xml.tsx +85 -0
- package/templates/react-router-docker/app/routes/[_image].$.ts +24 -0
- package/templates/react-router-docker/app/routes/[robots.txt].tsx +24 -0
- package/templates/react-router-docker/package.json +36 -0
- package/templates/react-router-docker/public/favicon.ico +0 -0
- package/templates/react-router-docker/tsconfig.json +18 -0
- package/templates/react-router-docker/vite.config.ts +6 -0
- package/templates/ssg/app/constants.mjs +0 -1
- package/templates/ssg/package.json +7 -6
- package/templates/ssg/vike.d.ts +0 -1
- package/templates/ssg-netlify/app/constants.mjs +0 -6
- package/templates/ssg-vercel/app/constants.mjs +0 -6
- package/templates/vercel/app/constants.mjs +0 -1
package/lib/cli.js
CHANGED
|
@@ -105,6 +105,11 @@ const INTERNAL_TEMPLATES = [
|
|
|
105
105
|
value: "cloudflare",
|
|
106
106
|
label: "Cloudflare",
|
|
107
107
|
expand: ["defaults", "cloudflare"]
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
value: "react-router-docker",
|
|
111
|
+
label: "Dokcer",
|
|
112
|
+
expand: ["react-router-docker"]
|
|
108
113
|
}
|
|
109
114
|
];
|
|
110
115
|
const isFileExists = async (filePath) => {
|
|
@@ -1955,148 +1960,574 @@ z.object({
|
|
|
1955
1960
|
template: z.optional(WsEmbedTemplate),
|
|
1956
1961
|
order: z.number().optional()
|
|
1957
1962
|
});
|
|
1958
|
-
const
|
|
1959
|
-
const
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1963
|
+
const AccordionIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M13.056 8H14.5V4.101a1.3 1.3 0 0 0-1.3-1.299H2.8a1.3 1.3 0 0 0-1.3 1.3V8H13.056ZM13.056 13.198h.145a1.3 1.3 0 0 0 1.299-1.3V8h-13v3.899a1.3 1.3 0 0 0 1.3 1.299h10.256Z"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="m10.026 4.913.975.976.976-.976M10.026 10.111l.975.976.976-.976"/></svg>`;
|
|
1964
|
+
const AddTemplateInstanceIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M4.5 2H3.333A1.333 1.333 0 0 0 2 3.333V4.5M14 12.667c0 .021 0 .042-.002.063M11.5 14h1.167a1.333 1.333 0 0 0 1.331-1.27m0 0V11.5M2 11.5v1.167A1.333 1.333 0 0 0 3.333 14H4.5M7 14h2M2 7v2M8.461 4.77H14M11.23 2v5.538"/></svg>`;
|
|
1965
|
+
const BlockquoteIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" d="M6.667 8H3.333a.667.667 0 0 1-.666-.667V5a.667.667 0 0 1 .666-.667H6A.667.667 0 0 1 6.667 5v3Zm0 0C6.667 9.667 6 10.667 4 11.667M13.333 8H10a.667.667 0 0 1-.667-.667V5A.667.667 0 0 1 10 4.333h2.667a.667.667 0 0 1 .666.667v3Zm0 0c0 1.667-.666 2.667-2.666 3.667"/></svg>`;
|
|
1966
|
+
const BodyIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M12.667 2H3.333C2.597 2 2 2.597 2 3.333v9.334C2 13.403 2.597 14 3.333 14h9.334c.736 0 1.333-.597 1.333-1.333V3.333C14 2.597 13.403 2 12.667 2ZM2 6h12"/></svg>`;
|
|
1967
|
+
const BoldIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M4 8h6a2.667 2.667 0 0 1 0 5.333H4.667A.667.667 0 0 1 4 12.667V3.333a.667.667 0 0 1 .667-.666h4.666a2.667 2.667 0 1 1 0 5.333"/></svg>`;
|
|
1968
|
+
const BoxIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M12.667 2H3.333C2.597 2 2 2.597 2 3.333v9.334C2 13.403 2.597 14 3.333 14h9.334c.736 0 1.333-.597 1.333-1.333V3.333C14 2.597 13.403 2 12.667 2Z"/></svg>`;
|
|
1969
|
+
const BracesIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M5.333 2h-.666a1.333 1.333 0 0 0-1.334 1.333v3.334A1.333 1.333 0 0 1 2 8a1.333 1.333 0 0 1 1.333 1.333v3.334c0 .733.6 1.333 1.334 1.333h.666M10.667 14h.666a1.333 1.333 0 0 0 1.334-1.333V9.333C12.667 8.6 13.267 8 14 8a1.333 1.333 0 0 1-1.333-1.333V3.333A1.333 1.333 0 0 0 11.333 2h-.666"/></svg>`;
|
|
1970
|
+
const ButtonElementIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path fill="currentColor" fill-rule="evenodd" d="M1.833 8a3.5 3.5 0 0 1 3.5-3.5h5.334a3.5 3.5 0 1 1 0 7H5.333a3.5 3.5 0 0 1-3.5-3.5Zm3.5-4.5a4.5 4.5 0 0 0 0 9h5.334a4.5 4.5 0 1 0 0-9H5.333ZM5.72 8a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM8 9a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm4.28-1a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z" clip-rule="evenodd"/></svg>`;
|
|
1971
|
+
const CalendarIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M7.333 9.333H8V12M10.667 1.333V4M2 6.667h12M5.333 1.333V4"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M12.667 2.667H3.333C2.597 2.667 2 3.264 2 4v9.333c0 .737.597 1.334 1.333 1.334h9.334c.736 0 1.333-.597 1.333-1.334V4c0-.736-.597-1.333-1.333-1.333Z"/></svg>`;
|
|
1972
|
+
const CheckMarkIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.091" d="m13.636 3.667-8 8L2 8.03"/></svg>`;
|
|
1973
|
+
const CheckboxCheckedIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M12.667 2H3.333C2.597 2 2 2.597 2 3.333v9.334C2 13.403 2.597 14 3.333 14h9.334c.736 0 1.333-.597 1.333-1.333V3.333C14 2.597 13.403 2 12.667 2Z"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="m6 8.238 1.383 1.383L10.003 7"/></svg>`;
|
|
1974
|
+
const CollapsibleIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M8 14.667v-4M8 5.333v-4M2.5 8h-1M6.5 8h-1M10.5 8h-1M14.5 8h-1M10 12.667l-2-2-2 2M10 3.333l-2 2-2-2"/></svg>`;
|
|
1975
|
+
const ContentBlockIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M8 2H3.333A1.333 1.333 0 0 0 2 3.333v9.334A1.333 1.333 0 0 0 3.333 14h9.334A1.334 1.334 0 0 0 14 12.667V8"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M12.25 1.75a1.414 1.414 0 1 1 2 2L8.24 9.76a1.333 1.333 0 0 1-.568.336l-1.916.56a.334.334 0 0 1-.413-.413l.56-1.916c.063-.214.179-.41.337-.568L12.25 1.75Z"/></svg>`;
|
|
1976
|
+
const ContentIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M4.667 5.333h4M4.666 8H10m-5.333 2.667h4M2 3.5A1.5 1.5 0 0 1 3.5 2h9A1.5 1.5 0 0 1 14 3.5v9.188c0 .724-.588 1.312-1.313 1.312H3.313A1.312 1.312 0 0 1 2 12.687V3.5Z"/></svg>`;
|
|
1977
|
+
const DialogIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path fill="#D2D2D2" d="M13.444 1H2.556C1.696 1 1 1.696 1 2.556v10.888C1 14.304 1.696 15 2.556 15h10.888c.86 0 1.556-.696 1.556-1.556V2.556C15 1.696 14.304 1 13.444 1Z"/><path fill="#fff" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M11.334 5.667H4.667v4.666h6.667V5.667Z"/></svg>`;
|
|
1978
|
+
const EmbedIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M12 10.667 14.667 8 12 5.333M4 5.333 1.333 8 4 10.667M9.667 2.667 6.333 13.333"/></svg>`;
|
|
1979
|
+
const FormTextAreaIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M3.333 14h9.334c.736 0 1.333-.597 1.333-1.333V3.522C14 2.682 13.318 2 12.478 2h-9C2.662 2 2 2.662 2 3.478v9.189C2 13.403 2.597 14 3.333 14ZM3.83 6.636V3.943"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="m10.496 13.76 1.724-1.725 1.717-1.717"/></svg>`;
|
|
1980
|
+
const FormTextFieldIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M3.333 2.667H4a2 2 0 0 1 2 2 2 2 0 0 1 2-2h.667M8.667 13.333H8a2 2 0 0 1-2-2 2 2 0 0 1-2 2h-.667M3.333 10.667h-.666a1.333 1.333 0 0 1-1.334-1.334V6.667a1.333 1.333 0 0 1 1.334-1.334h.666M8.667 5.333h4.666a1.333 1.333 0 0 1 1.334 1.334v2.666a1.333 1.333 0 0 1-1.334 1.334H8.667M6 4.667v6.666"/></svg>`;
|
|
1981
|
+
const FormIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M13.184 5.5h.731a.75.75 0 0 0 .75-.75v-1.5a.75.75 0 0 0-.75-.75H2.085a.75.75 0 0 0-.75.75v1.5c0 .414.336.75.75.75h11.099ZM13.184 10.5h.732a.75.75 0 0 0 .75-.75v-1.5a.75.75 0 0 0-.75-.75H2.084a.75.75 0 0 0-.75.75v1.5c0 .414.336.75.75.75h11.099Z"/><path fill="currentColor" d="M6.613 14.5h.222a.5.5 0 0 0 .5-.5v-1a.5.5 0 0 0-.5-.5h-5.5a.5.5 0 0 0-.5.5v1a.5.5 0 0 0 .5.5H6.613Z"/></svg>`;
|
|
1982
|
+
const HeaderIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M12.667 2H3.333C2.597 2 2 2.597 2 3.333v9.334C2 13.403 2.597 14 3.333 14h9.334c.736 0 1.333-.597 1.333-1.333V3.333C14 2.597 13.403 2 12.667 2ZM4 4h8"/></svg>`;
|
|
1983
|
+
const HeadingIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M4 8h8M4 13.333V2.667M12 13.333V2.667"/></svg>`;
|
|
1984
|
+
const ImageIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M12.667 2H3.333C2.597 2 2 2.597 2 3.333v9.334C2 13.403 2.597 14 3.333 14h9.334c.736 0 1.333-.597 1.333-1.333V3.333C14 2.597 13.403 2 12.667 2Z"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M6 7.333a1.333 1.333 0 1 0 0-2.666 1.333 1.333 0 0 0 0 2.666ZM14 10l-2.057-2.057a1.333 1.333 0 0 0-1.886 0L4 14"/></svg>`;
|
|
1985
|
+
const ItemIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M2 6h.007M5.333 10H14M5.333 6H14"/></svg>`;
|
|
1986
|
+
const LabelIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M12.667 2H3.333C2.597 2 2 2.597 2 3.333v9.334C2 13.403 2.597 14 3.333 14h9.334c.736 0 1.333-.597 1.333-1.333V3.333C14 2.597 13.403 2 12.667 2Z"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M6.476 11.074V4.926m0 6.148h3.77v-.615m-3.77.615h-.722m.722-6.148h.632m-.632 0h-.722"/></svg>`;
|
|
1987
|
+
const LinkIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M8.943 11.771 8 12.714A3.333 3.333 0 0 1 3.286 8l.943-.943M7.057 4.229 8 3.286A3.333 3.333 0 1 1 12.714 8l-.943.943M6.114 9.886l3.772-3.772"/></svg>`;
|
|
1988
|
+
const ListItemIcon = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" width="100%" height="100%" style="display: block;"><path d="M3.7 6.175a.85.85 0 1 1-1.7 0 .85.85 0 0 1 1.7 0Z"/><path fill-rule="evenodd" d="M5 6.175c0-.345.28-.625.625-.625h7.75a.625.625 0 1 1 0 1.25h-7.75A.625.625 0 0 1 5 6.175ZM5 10.05c0-.345.28-.625.625-.625h7.75a.625.625 0 1 1 0 1.25h-7.75A.625.625 0 0 1 5 10.05Z" clip-rule="evenodd"/></svg>`;
|
|
1989
|
+
const ListViewIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path fill="currentColor" fill-rule="evenodd" d="M3.333 2.5a.833.833 0 0 0-.833.833v9.334c0 .46.373.833.833.833h9.334c.46 0 .833-.373.833-.833V3.333a.833.833 0 0 0-.833-.833H3.333ZM1.5 3.333c0-1.012.82-1.833 1.833-1.833h9.334c1.012 0 1.833.82 1.833 1.833v9.334c0 1.012-.82 1.833-1.833 1.833H3.333A1.833 1.833 0 0 1 1.5 12.667V3.333Z" clip-rule="evenodd"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M14 6H2M14 10H2"/></svg>`;
|
|
1990
|
+
const ListIcon = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" width="100%" height="100%" style="display: block;"><path d="M3.7 4.35a.85.85 0 1 1-1.7 0 .85.85 0 0 1 1.7 0Z"/><path fill-rule="evenodd" d="M5 4.35c0-.346.28-.626.625-.626h7.75a.625.625 0 1 1 0 1.25h-7.75A.625.625 0 0 1 5 4.35Z" clip-rule="evenodd"/><path d="M3.7 8A.85.85 0 1 1 2 8a.85.85 0 0 1 1.7 0Z"/><path fill-rule="evenodd" d="M5 8c0-.345.28-.625.625-.625h7.75a.625.625 0 1 1 0 1.25h-7.75A.625.625 0 0 1 5 8Z" clip-rule="evenodd"/><path d="M3.7 11.65a.85.85 0 1 1-1.7 0 .85.85 0 0 1 1.7 0Z"/><path fill-rule="evenodd" d="M5 11.65c0-.346.28-.626.625-.626h7.75a.625.625 0 1 1 0 1.25h-7.75A.625.625 0 0 1 5 11.65Z" clip-rule="evenodd"/></svg>`;
|
|
1991
|
+
const MarkdownEmbedIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M4.667 5.333h4M4.667 8H10M14 8.75V3.5A1.5 1.5 0 0 0 12.5 2h-9A1.5 1.5 0 0 0 2 3.5v9.191c0 .725.588 1.313 1.313 1.313h4.691"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M10 14.314v-4l2 2.03 2-2.03v4"/></svg>`;
|
|
1992
|
+
const MinusIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M3.333 8h9.334"/></svg>`;
|
|
1993
|
+
const NavigationMenuIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M14 7v5.833c0 .645-.597 1.167-1.333 1.167H3.333C2.597 14 2 13.478 2 12.833V7"/><path fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M10.978 2.003H2.6a.6.6 0 0 0-.6.6v1.4h11.971v-1.4a.6.6 0 0 0-.6-.6h-2.393Z"/></svg>`;
|
|
1994
|
+
const OverlayIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path fill="#D2D2D2" d="M13.444 1H2.556C1.696 1 1 1.696 1 2.556v10.888C1 14.304 1.696 15 2.556 15h10.888c.86 0 1.556-.696 1.556-1.556V2.556C15 1.696 14.304 1 13.444 1Z"/></svg>`;
|
|
1995
|
+
const PaintBrushIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="m6.04 7.933 5.38-5.373a1.9 1.9 0 1 1 2.687 2.687l-5.374 5.386M4.713 9.96c-1.106 0-2 .9-2 2.013 0 .887-1.666 1.014-1.333 1.347.72.733 1.66 1.347 2.667 1.347 1.466 0 2.666-1.2 2.666-2.694a2.007 2.007 0 0 0-2-2.013Z"/></svg>`;
|
|
1996
|
+
const PopoverIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M14 6V4a1.334 1.334 0 0 0-1.333-1.333h-10A1.333 1.333 0 0 0 1.333 4v6.667c0 .733.6 1.333 1.334 1.333h2.666"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M13.333 8.667h-4C8.597 8.667 8 9.264 8 10v2c0 .736.597 1.333 1.333 1.333h4c.737 0 1.334-.597 1.334-1.333v-2c0-.736-.597-1.333-1.334-1.333Z"/></svg>`;
|
|
1997
|
+
const RadioCheckedIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M8 14.5a6.5 6.5 0 1 0 0-13 6.5 6.5 0 0 0 0 13Z"/><path fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M10.5 8a2.5 2.5 0 1 1-5 0 2.5 2.5 0 0 1 5 0Z"/></svg>`;
|
|
1998
|
+
const RadioGroupIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path fill="#000" stroke="#000" stroke-linecap="round" stroke-linejoin="round" d="M8.839 8a1.82 1.82 0 1 1-3.64 0 1.82 1.82 0 0 1 3.64 0Z"/><path stroke="#000" stroke-linecap="round" stroke-linejoin="round" d="M7.019 13.027a5.027 5.027 0 1 0 0-10.054 5.027 5.027 0 0 0 0 10.054Z"/><path stroke="#000" stroke-linecap="round" d="M12.629 12.077v0a6.73 6.73 0 0 0-.337-8.565v0"/></svg>`;
|
|
1999
|
+
const ResourceIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M4.667 5.333h4M4.667 8H10M14 8.75V3.5A1.5 1.5 0 0 0 12.5 2h-9A1.5 1.5 0 0 0 2 3.5v9.252c0 .69.56 1.25 1.25 1.25v0H6"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M10.45 14.5h-.7a1.75 1.75 0 1 1 0-3.5h.7M12.55 11h.7a1.75 1.75 0 1 1 0 3.5h-.7M10.1 12.75h2.8"/></svg>`;
|
|
2000
|
+
const SelectIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M13.184 10.33h.149c.736 0 1.332-.597 1.332-1.332V6.332c0-.735-.596-1.332-1.332-1.332H2.667c-.735 0-1.332.597-1.332 1.332v2.666c0 .735.597 1.332 1.333 1.332h10.516Z"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="m10.078 7.165 1 1 1-1"/></svg>`;
|
|
2001
|
+
const SettingsIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M13.987 6H9.32M13.932 6h-12M14 10.5H2"/><rect width="4" height="4" x="1.932" y="8.534" fill="#fff" stroke="currentColor" rx="2"/><rect width="4" height="4" x="10.068" y="4" fill="#fff" stroke="currentColor" rx="2"/></svg>`;
|
|
2002
|
+
const SlotComponentIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M4.5 2H3.333A1.333 1.333 0 0 0 2 3.333V4.5M14 4.5V3.333A1.333 1.333 0 0 0 12.667 2H11.5M14 12.667c0 .021 0 .042-.002.063M11.5 14h1.167a1.333 1.333 0 0 0 1.331-1.27m0 0V11.5M2 11.5v1.167A1.333 1.333 0 0 0 3.333 14H4.5M7 2h2M7 14h2M2 7v2M14 7v2"/></svg>`;
|
|
2003
|
+
const SubscriptIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M2.667 3.333 8 8.667M8 3.333 2.667 8.667M13.333 12.667h-2.666c0-1 .293-1.334 1-1.667.706-.333 1.666-.78 1.666-1.667 0-.313-.113-.62-.32-.86a1.407 1.407 0 0 0-1.746-.293c-.28.16-.494.413-.6.713"/></svg>`;
|
|
2004
|
+
const SuperscriptIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M2.667 12.667 8 7.333M8 12.667 2.667 7.333M13.333 8h-2.666c0-1 .294-1.333 1-1.667.705-.333 1.666-.777 1.666-1.665 0-.315-.113-.62-.322-.86a1.403 1.403 0 0 0-1.745-.29c-.28.159-.492.409-.6.706"/></svg>`;
|
|
2005
|
+
const SwitchIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M10.667 4H5.333a4 4 0 1 0 0 8h5.334a4 4 0 0 0 0-8Z"/><path fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M5.333 9.333a1.333 1.333 0 1 0 0-2.666 1.333 1.333 0 0 0 0 2.666Z"/></svg>`;
|
|
2006
|
+
const TabsIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M9.75 5H13M9.75 5H7.401A1.684 1.684 0 0 1 6 4.25v0l-.5-.75-.5-.75L4.5 2m5.25 3-1-1.5-.5-.75-.5-.75M4.5 2H3v0a1.5 1.5 0 0 0-1.5 1.5v9A1.5 1.5 0 0 0 3 14h10v0a1.5 1.5 0 0 0 1.5-1.5v0-6A1.5 1.5 0 0 0 13 5v0M4.5 2h3.25m0 0h2.375v0c.547 0 1.057.273 1.36.728l.015.022.5.75L13 5"/></svg>`;
|
|
2007
|
+
const TextAlignLeftIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M10 8H2M11.333 12H2M14 4H2"/></svg>`;
|
|
2008
|
+
const TextItalicIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M12.667 2.667h-6M9.333 13.333h-6M10 2.667 6 13.333"/></svg>`;
|
|
2009
|
+
const TextIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M2.667 4.667v-2h10.666v2M6 13.333h4M8 2.667v10.666"/></svg>`;
|
|
2010
|
+
const TooltipIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="#000" stroke-linecap="round" stroke-linejoin="round" d="M14 10a1.333 1.333 0 0 1-1.333 1.333h-8L2 14V3.333A1.333 1.333 0 0 1 3.333 2h9.334A1.333 1.333 0 0 1 14 3.333V10Z"/></svg>`;
|
|
2011
|
+
const TriggerIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M11.915 7.354v-.647a1.294 1.294 0 1 0-2.587 0"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M9.328 6.707V6.06a1.294 1.294 0 1 0-2.587 0v.647"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M6.74 6.383V2.826a1.293 1.293 0 1 0-2.586 0v6.467"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M11.914 7.353a1.293 1.293 0 0 1 2.587 0v1.94a5.174 5.174 0 0 1-5.174 5.174H8.034c-1.81 0-2.91-.556-3.874-1.513l-2.328-2.328a1.293 1.293 0 0 1 1.83-1.824L4.8 9.94"/></svg>`;
|
|
2012
|
+
const ViewportIcon = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" width="100%" height="100%" style="display: block;"><path fill-rule="evenodd" d="M5.173 1.35h.157a.65.65 0 0 1 0 1.3H5.2c-.57 0-.96 0-1.26.025-.294.024-.446.068-.553.122a1.35 1.35 0 0 0-.59.59c-.054.107-.098.259-.122.552-.025.301-.025.69-.025 1.261v.13a.65.65 0 0 1-1.3 0v-.157c0-.537 0-.98.03-1.34.03-.373.095-.715.259-1.036a2.65 2.65 0 0 1 1.158-1.158c.32-.164.663-.229 1.036-.26.36-.029.803-.029 1.34-.029Zm6.888 1.325c-.301-.024-.69-.025-1.261-.025h-.13a.65.65 0 1 1 0-1.3h.157c.537 0 .98 0 1.34.03.373.03.715.095 1.036.259.499.254.904.66 1.158 1.158.164.32.229.663.26 1.036.029.36.029.803.029 1.34v.157a.65.65 0 1 1-1.3 0V5.2c0-.57 0-.96-.025-1.26-.024-.294-.068-.446-.122-.553a1.35 1.35 0 0 0-.59-.59c-.107-.054-.26-.098-.552-.122ZM2 10.02a.65.65 0 0 1 .65.65v.13c0 .57 0 .96.025 1.26.024.294.068.446.122.553.13.254.336.46.59.59.107.054.259.098.552.122.301.025.69.025 1.261.025h.13a.65.65 0 1 1 0 1.3h-.157c-.537 0-.98 0-1.34-.03-.373-.03-.715-.095-1.036-.259a2.65 2.65 0 0 1-1.158-1.158c-.164-.32-.23-.663-.26-1.037-.029-.36-.029-.802-.029-1.34v-.156a.65.65 0 0 1 .65-.65Zm12 0a.65.65 0 0 1 .65.65v.157c0 .537 0 .98-.03 1.34-.03.373-.095.715-.259 1.036a2.65 2.65 0 0 1-1.158 1.158c-.32.164-.663.23-1.037.26-.36.029-.802.029-1.34.029h-.156a.65.65 0 1 1 0-1.3h.13c.57 0 .96 0 1.26-.025.294-.024.446-.068.553-.122.254-.13.46-.336.59-.59.054-.107.098-.259.122-.552.025-.301.025-.69.025-1.261v-.13a.65.65 0 0 1 .65-.65ZM8 10.033a2.033 2.033 0 1 0 0-4.066 2.033 2.033 0 0 0 0 4.066Zm0 1.3a3.333 3.333 0 1 0 0-6.666 3.333 3.333 0 0 0 0 6.666Z" clip-rule="evenodd"/></svg>`;
|
|
2013
|
+
const VimeoIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M14.993 4.801c-.062 1.363-1.014 3.228-2.855 5.597-1.903 2.473-3.514 3.71-4.83 3.71-.817 0-1.508-.753-2.072-2.26l-1.13-4.143c-.419-1.506-.868-2.259-1.349-2.26a4.332 4.332 0 0 0-1.099.66L1 5.257c.69-.607 1.372-1.214 2.043-1.822.921-.796 1.613-1.215 2.074-1.257 1.09-.105 1.76.64 2.012 2.234.272 1.72.461 2.79.566 3.208.315 1.427.66 2.14 1.038 2.14.292 0 .733-.463 1.32-1.39.586-.925.9-1.63.942-2.113.084-.798-.23-1.198-.942-1.199-.357.005-.71.084-1.036.23.688-2.253 2.002-3.349 3.942-3.285 1.439.042 2.117.975 2.034 2.798Z"/></svg>`;
|
|
2014
|
+
const WebhookFormIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M12 11.32H8.007c-.734 0-1.3.627-1.654 1.267a2.666 2.666 0 0 1-5.02-1.254A2.62 2.62 0 0 1 1.713 10"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M4 11.333 6.087 7.48c.353-.647.066-1.453-.334-2.067a2.667 2.667 0 1 1 4.594-2.706"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="m8 4 2.087 3.82c.353.647 1.18.847 1.913.847A2.667 2.667 0 0 1 12 14"/></svg>`;
|
|
2015
|
+
const WindowInfoIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M12.667 2H3.333C2.597 2 2 2.597 2 3.333v9.334C2 13.403 2.597 14 3.333 14h9.334c.736 0 1.333-.597 1.333-1.333V3.333C14 2.597 13.403 2 12.667 2ZM8 11.516V7.853"/><rect width="1.4" height="1.4" x="7.3" y="4.484" fill="currentColor" rx=".7"/></svg>`;
|
|
2016
|
+
const WindowTitleIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M12.667 4H3.333C2.597 4 2 4.497 2 5.111v7.778C2 13.503 2.597 14 3.333 14h9.334c.736 0 1.333-.498 1.333-1.111V5.11C14 4.497 13.403 4 12.667 4ZM4 2h8"/></svg>`;
|
|
2017
|
+
const XmlIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M12.163 9.02v-4L8.83 1.686h-5.5A1.333 1.333 0 0 0 1.997 3.02v6"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M8.164 2.186v1.667a1.333 1.333 0 0 0 1.333 1.333h2.667M1.997 11.314l3 3M4.997 11.314l-3 3M6.997 14.314v-3l1.5 1.523 1.5-1.523v3M12.163 11.314v3h1.84"/></svg>`;
|
|
2018
|
+
const YoutubeIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path d="M.892 11.528a18.047 18.047 0 0 1 0-7.482A1.496 1.496 0 0 1 1.94 3a37.082 37.082 0 0 1 12.12 0 1.497 1.497 0 0 1 1.048 1.047 18.046 18.046 0 0 1 0 7.482 1.497 1.497 0 0 1-1.048 1.048 37.077 37.077 0 0 1-12.12 0 1.497 1.497 0 0 1-1.048-1.048Z"/><path d="m6.5 10.3 4-2.4-4-2.4v4.8Z"/></svg>`;
|
|
2019
|
+
const div = [
|
|
2020
|
+
{ property: "boxSizing", value: { type: "keyword", value: "border-box" } },
|
|
2021
|
+
{ property: "borderTopWidth", value: { type: "unit", unit: "px", value: 1 } },
|
|
2022
|
+
{
|
|
2023
|
+
property: "borderRightWidth",
|
|
2024
|
+
value: { type: "unit", unit: "px", value: 1 }
|
|
2025
|
+
},
|
|
2026
|
+
{
|
|
2027
|
+
property: "borderBottomWidth",
|
|
2028
|
+
value: { type: "unit", unit: "px", value: 1 }
|
|
2029
|
+
},
|
|
2030
|
+
{
|
|
2031
|
+
property: "borderLeftWidth",
|
|
2032
|
+
value: { type: "unit", unit: "px", value: 1 }
|
|
2033
|
+
},
|
|
2034
|
+
{ property: "outlineWidth", value: { type: "unit", unit: "px", value: 1 } }
|
|
2035
|
+
];
|
|
2036
|
+
const address = div;
|
|
2037
|
+
const article = div;
|
|
2038
|
+
const aside = div;
|
|
2039
|
+
const figure = div;
|
|
2040
|
+
const footer = div;
|
|
2041
|
+
const header = div;
|
|
2042
|
+
const main$1 = div;
|
|
2043
|
+
const nav = div;
|
|
2044
|
+
const section = div;
|
|
2045
|
+
const form = div;
|
|
2046
|
+
const label = div;
|
|
2047
|
+
const time = div;
|
|
2048
|
+
const h1 = div;
|
|
2049
|
+
const h2 = div;
|
|
2050
|
+
const h3 = div;
|
|
2051
|
+
const h4 = div;
|
|
2052
|
+
const h5 = div;
|
|
2053
|
+
const h6 = div;
|
|
2054
|
+
const i = div;
|
|
2055
|
+
const img = div;
|
|
2056
|
+
const a = div;
|
|
2057
|
+
const li = div;
|
|
2058
|
+
const ul = div;
|
|
2059
|
+
const ol = div;
|
|
2060
|
+
const p = div;
|
|
2061
|
+
const span = div;
|
|
2062
|
+
const html = [
|
|
2063
|
+
{ property: "display", value: { type: "keyword", value: "grid" } },
|
|
2064
|
+
{ property: "minHeight", value: { type: "unit", unit: "%", value: 100 } },
|
|
2065
|
+
{
|
|
2066
|
+
property: "fontFamily",
|
|
2067
|
+
value: { type: "fontFamily", value: ["Arial", "Roboto", "sans-serif"] }
|
|
2068
|
+
},
|
|
2069
|
+
{ property: "fontSize", value: { type: "unit", unit: "px", value: 16 } },
|
|
2070
|
+
{
|
|
2071
|
+
property: "lineHeight",
|
|
2072
|
+
value: { type: "unit", unit: "number", value: 1.2 }
|
|
2073
|
+
},
|
|
2074
|
+
{
|
|
2075
|
+
property: "whiteSpaceCollapse",
|
|
2076
|
+
value: { type: "keyword", value: "preserve" }
|
|
1967
2077
|
}
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
2078
|
+
];
|
|
2079
|
+
const body = [
|
|
2080
|
+
{ property: "marginTop", value: { type: "unit", unit: "number", value: 0 } },
|
|
2081
|
+
{
|
|
2082
|
+
property: "marginRight",
|
|
2083
|
+
value: { type: "unit", unit: "number", value: 0 }
|
|
2084
|
+
},
|
|
2085
|
+
{
|
|
2086
|
+
property: "marginBottom",
|
|
2087
|
+
value: { type: "unit", unit: "number", value: 0 }
|
|
2088
|
+
},
|
|
2089
|
+
{ property: "marginLeft", value: { type: "unit", unit: "number", value: 0 } },
|
|
2090
|
+
{ property: "boxSizing", value: { type: "keyword", value: "border-box" } },
|
|
2091
|
+
{ property: "borderTopWidth", value: { type: "unit", unit: "px", value: 1 } },
|
|
2092
|
+
{
|
|
2093
|
+
property: "borderRightWidth",
|
|
2094
|
+
value: { type: "unit", unit: "px", value: 1 }
|
|
2095
|
+
},
|
|
2096
|
+
{
|
|
2097
|
+
property: "borderBottomWidth",
|
|
2098
|
+
value: { type: "unit", unit: "px", value: 1 }
|
|
2099
|
+
},
|
|
2100
|
+
{
|
|
2101
|
+
property: "borderLeftWidth",
|
|
2102
|
+
value: { type: "unit", unit: "px", value: 1 }
|
|
1972
2103
|
}
|
|
1973
|
-
|
|
1974
|
-
const
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
}
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
2104
|
+
];
|
|
2105
|
+
const hr = [
|
|
2106
|
+
{ property: "height", value: { type: "unit", unit: "number", value: 0 } },
|
|
2107
|
+
{ property: "color", value: { type: "keyword", value: "inherit" } },
|
|
2108
|
+
{ property: "boxSizing", value: { type: "keyword", value: "border-box" } },
|
|
2109
|
+
{ property: "borderTopWidth", value: { type: "unit", unit: "px", value: 1 } },
|
|
2110
|
+
{
|
|
2111
|
+
property: "borderRightWidth",
|
|
2112
|
+
value: { type: "unit", unit: "px", value: 1 }
|
|
2113
|
+
},
|
|
2114
|
+
{
|
|
2115
|
+
property: "borderBottomWidth",
|
|
2116
|
+
value: { type: "unit", unit: "px", value: 1 }
|
|
2117
|
+
},
|
|
2118
|
+
{
|
|
2119
|
+
property: "borderLeftWidth",
|
|
2120
|
+
value: { type: "unit", unit: "px", value: 1 }
|
|
1989
2121
|
}
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2122
|
+
];
|
|
2123
|
+
const b = [
|
|
2124
|
+
{
|
|
2125
|
+
property: "fontWeight",
|
|
2126
|
+
value: { type: "unit", unit: "number", value: 700 }
|
|
2127
|
+
},
|
|
2128
|
+
{ property: "boxSizing", value: { type: "keyword", value: "border-box" } },
|
|
2129
|
+
{ property: "borderTopWidth", value: { type: "unit", unit: "px", value: 1 } },
|
|
2130
|
+
{
|
|
2131
|
+
property: "borderRightWidth",
|
|
2132
|
+
value: { type: "unit", unit: "px", value: 1 }
|
|
2133
|
+
},
|
|
2134
|
+
{
|
|
2135
|
+
property: "borderBottomWidth",
|
|
2136
|
+
value: { type: "unit", unit: "px", value: 1 }
|
|
2137
|
+
},
|
|
2138
|
+
{
|
|
2139
|
+
property: "borderLeftWidth",
|
|
2140
|
+
value: { type: "unit", unit: "px", value: 1 }
|
|
2003
2141
|
}
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
MemberExpression(node) {
|
|
2019
|
-
if (executable === false || node.optional) {
|
|
2020
|
-
return;
|
|
2021
|
-
}
|
|
2022
|
-
if (node.computed === false) {
|
|
2023
|
-
const dotIndex = expression.indexOf(".", node.object.end);
|
|
2024
|
-
replacements.push([dotIndex, dotIndex, "?"]);
|
|
2025
|
-
}
|
|
2026
|
-
if (node.computed === true) {
|
|
2027
|
-
const dotIndex = expression.indexOf("[", node.object.end);
|
|
2028
|
-
replacements.push([dotIndex, dotIndex, "?."]);
|
|
2029
|
-
}
|
|
2142
|
+
];
|
|
2143
|
+
const code = [
|
|
2144
|
+
{
|
|
2145
|
+
property: "fontFamily",
|
|
2146
|
+
value: {
|
|
2147
|
+
type: "fontFamily",
|
|
2148
|
+
value: [
|
|
2149
|
+
"ui-monospace",
|
|
2150
|
+
"SFMono-Regular",
|
|
2151
|
+
"Consolas",
|
|
2152
|
+
"Liberation Mono",
|
|
2153
|
+
"Menlo",
|
|
2154
|
+
"monospace"
|
|
2155
|
+
]
|
|
2030
2156
|
}
|
|
2031
|
-
}
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2157
|
+
},
|
|
2158
|
+
{ property: "fontSize", value: { type: "unit", unit: "em", value: 1 } },
|
|
2159
|
+
{ property: "boxSizing", value: { type: "keyword", value: "border-box" } },
|
|
2160
|
+
{ property: "borderTopWidth", value: { type: "unit", unit: "px", value: 1 } },
|
|
2161
|
+
{
|
|
2162
|
+
property: "borderRightWidth",
|
|
2163
|
+
value: { type: "unit", unit: "px", value: 1 }
|
|
2164
|
+
},
|
|
2165
|
+
{
|
|
2166
|
+
property: "borderBottomWidth",
|
|
2167
|
+
value: { type: "unit", unit: "px", value: 1 }
|
|
2168
|
+
},
|
|
2169
|
+
{
|
|
2170
|
+
property: "borderLeftWidth",
|
|
2171
|
+
value: { type: "unit", unit: "px", value: 1 }
|
|
2037
2172
|
}
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2173
|
+
];
|
|
2174
|
+
const sub = [
|
|
2175
|
+
{ property: "fontSize", value: { type: "unit", unit: "%", value: 75 } },
|
|
2176
|
+
{ property: "lineHeight", value: { type: "unit", unit: "number", value: 0 } },
|
|
2177
|
+
{ property: "position", value: { type: "keyword", value: "relative" } },
|
|
2178
|
+
{ property: "verticalAlign", value: { type: "keyword", value: "baseline" } },
|
|
2179
|
+
{ property: "boxSizing", value: { type: "keyword", value: "border-box" } },
|
|
2180
|
+
{ property: "borderTopWidth", value: { type: "unit", unit: "px", value: 1 } },
|
|
2181
|
+
{
|
|
2182
|
+
property: "borderRightWidth",
|
|
2183
|
+
value: { type: "unit", unit: "px", value: 1 }
|
|
2184
|
+
},
|
|
2185
|
+
{
|
|
2186
|
+
property: "borderBottomWidth",
|
|
2187
|
+
value: { type: "unit", unit: "px", value: 1 }
|
|
2188
|
+
},
|
|
2189
|
+
{
|
|
2190
|
+
property: "borderLeftWidth",
|
|
2191
|
+
value: { type: "unit", unit: "px", value: 1 }
|
|
2192
|
+
},
|
|
2193
|
+
{ property: "bottom", value: { type: "unit", unit: "em", value: -0.25 } }
|
|
2194
|
+
];
|
|
2195
|
+
const sup = [
|
|
2196
|
+
{ property: "fontSize", value: { type: "unit", unit: "%", value: 75 } },
|
|
2197
|
+
{ property: "lineHeight", value: { type: "unit", unit: "number", value: 0 } },
|
|
2198
|
+
{ property: "position", value: { type: "keyword", value: "relative" } },
|
|
2199
|
+
{ property: "verticalAlign", value: { type: "keyword", value: "baseline" } },
|
|
2200
|
+
{ property: "boxSizing", value: { type: "keyword", value: "border-box" } },
|
|
2201
|
+
{ property: "borderTopWidth", value: { type: "unit", unit: "px", value: 1 } },
|
|
2202
|
+
{
|
|
2203
|
+
property: "borderRightWidth",
|
|
2204
|
+
value: { type: "unit", unit: "px", value: 1 }
|
|
2205
|
+
},
|
|
2206
|
+
{
|
|
2207
|
+
property: "borderBottomWidth",
|
|
2208
|
+
value: { type: "unit", unit: "px", value: 1 }
|
|
2209
|
+
},
|
|
2210
|
+
{
|
|
2211
|
+
property: "borderLeftWidth",
|
|
2212
|
+
value: { type: "unit", unit: "px", value: 1 }
|
|
2213
|
+
},
|
|
2214
|
+
{ property: "top", value: { type: "unit", unit: "em", value: -0.5 } }
|
|
2215
|
+
];
|
|
2216
|
+
const input = [
|
|
2217
|
+
{ property: "fontFamily", value: { type: "keyword", value: "inherit" } },
|
|
2218
|
+
{ property: "fontSize", value: { type: "unit", unit: "%", value: 100 } },
|
|
2219
|
+
{
|
|
2220
|
+
property: "lineHeight",
|
|
2221
|
+
value: { type: "unit", unit: "number", value: 1.15 }
|
|
2222
|
+
},
|
|
2223
|
+
{ property: "marginTop", value: { type: "unit", unit: "number", value: 0 } },
|
|
2224
|
+
{
|
|
2225
|
+
property: "marginRight",
|
|
2226
|
+
value: { type: "unit", unit: "number", value: 0 }
|
|
2227
|
+
},
|
|
2228
|
+
{
|
|
2229
|
+
property: "marginBottom",
|
|
2230
|
+
value: { type: "unit", unit: "number", value: 0 }
|
|
2231
|
+
},
|
|
2232
|
+
{ property: "marginLeft", value: { type: "unit", unit: "number", value: 0 } },
|
|
2233
|
+
{ property: "boxSizing", value: { type: "keyword", value: "border-box" } },
|
|
2234
|
+
{ property: "borderTopWidth", value: { type: "unit", unit: "px", value: 1 } },
|
|
2235
|
+
{
|
|
2236
|
+
property: "borderRightWidth",
|
|
2237
|
+
value: { type: "unit", unit: "px", value: 1 }
|
|
2238
|
+
},
|
|
2239
|
+
{
|
|
2240
|
+
property: "borderBottomWidth",
|
|
2241
|
+
value: { type: "unit", unit: "px", value: 1 }
|
|
2242
|
+
},
|
|
2243
|
+
{
|
|
2244
|
+
property: "borderLeftWidth",
|
|
2245
|
+
value: { type: "unit", unit: "px", value: 1 }
|
|
2246
|
+
},
|
|
2247
|
+
{ property: "borderTopStyle", value: { type: "keyword", value: "solid" } },
|
|
2248
|
+
{ property: "borderRightStyle", value: { type: "keyword", value: "solid" } },
|
|
2249
|
+
{ property: "borderBottomStyle", value: { type: "keyword", value: "solid" } },
|
|
2250
|
+
{ property: "borderLeftStyle", value: { type: "keyword", value: "solid" } }
|
|
2251
|
+
];
|
|
2252
|
+
const textarea = input;
|
|
2253
|
+
const radio = [
|
|
2254
|
+
{ property: "fontFamily", value: { type: "keyword", value: "inherit" } },
|
|
2255
|
+
{ property: "fontSize", value: { type: "unit", unit: "%", value: 100 } },
|
|
2256
|
+
{
|
|
2257
|
+
property: "lineHeight",
|
|
2258
|
+
value: { type: "unit", unit: "number", value: 1.15 }
|
|
2259
|
+
},
|
|
2260
|
+
{ property: "marginTop", value: { type: "unit", unit: "number", value: 0 } },
|
|
2261
|
+
{
|
|
2262
|
+
property: "marginRight",
|
|
2263
|
+
value: { type: "unit", unit: "number", value: 0 }
|
|
2264
|
+
},
|
|
2265
|
+
{
|
|
2266
|
+
property: "marginBottom",
|
|
2267
|
+
value: { type: "unit", unit: "number", value: 0 }
|
|
2268
|
+
},
|
|
2269
|
+
{ property: "marginLeft", value: { type: "unit", unit: "number", value: 0 } },
|
|
2270
|
+
{ property: "boxSizing", value: { type: "keyword", value: "border-box" } },
|
|
2271
|
+
{ property: "borderTopWidth", value: { type: "unit", unit: "px", value: 1 } },
|
|
2272
|
+
{
|
|
2273
|
+
property: "borderRightWidth",
|
|
2274
|
+
value: { type: "unit", unit: "px", value: 1 }
|
|
2275
|
+
},
|
|
2276
|
+
{
|
|
2277
|
+
property: "borderBottomWidth",
|
|
2278
|
+
value: { type: "unit", unit: "px", value: 1 }
|
|
2279
|
+
},
|
|
2280
|
+
{
|
|
2281
|
+
property: "borderLeftWidth",
|
|
2282
|
+
value: { type: "unit", unit: "px", value: 1 }
|
|
2283
|
+
},
|
|
2284
|
+
{ property: "borderTopStyle", value: { type: "keyword", value: "none" } },
|
|
2285
|
+
{ property: "borderRightStyle", value: { type: "keyword", value: "none" } },
|
|
2286
|
+
{ property: "borderBottomStyle", value: { type: "keyword", value: "none" } },
|
|
2287
|
+
{ property: "borderLeftStyle", value: { type: "keyword", value: "none" } }
|
|
2288
|
+
];
|
|
2289
|
+
const checkbox = radio;
|
|
2290
|
+
const button = [
|
|
2291
|
+
{ property: "fontFamily", value: { type: "keyword", value: "inherit" } },
|
|
2292
|
+
{ property: "fontSize", value: { type: "unit", unit: "%", value: 100 } },
|
|
2293
|
+
{
|
|
2294
|
+
property: "lineHeight",
|
|
2295
|
+
value: { type: "unit", unit: "number", value: 1.15 }
|
|
2296
|
+
},
|
|
2297
|
+
{ property: "marginTop", value: { type: "unit", unit: "number", value: 0 } },
|
|
2298
|
+
{
|
|
2299
|
+
property: "marginRight",
|
|
2300
|
+
value: { type: "unit", unit: "number", value: 0 }
|
|
2301
|
+
},
|
|
2302
|
+
{
|
|
2303
|
+
property: "marginBottom",
|
|
2304
|
+
value: { type: "unit", unit: "number", value: 0 }
|
|
2305
|
+
},
|
|
2306
|
+
{ property: "marginLeft", value: { type: "unit", unit: "number", value: 0 } },
|
|
2307
|
+
{ property: "boxSizing", value: { type: "keyword", value: "border-box" } },
|
|
2308
|
+
{ property: "borderTopWidth", value: { type: "unit", unit: "px", value: 1 } },
|
|
2309
|
+
{
|
|
2310
|
+
property: "borderRightWidth",
|
|
2311
|
+
value: { type: "unit", unit: "px", value: 1 }
|
|
2312
|
+
},
|
|
2313
|
+
{
|
|
2314
|
+
property: "borderBottomWidth",
|
|
2315
|
+
value: { type: "unit", unit: "px", value: 1 }
|
|
2316
|
+
},
|
|
2317
|
+
{
|
|
2318
|
+
property: "borderLeftWidth",
|
|
2319
|
+
value: { type: "unit", unit: "px", value: 1 }
|
|
2320
|
+
},
|
|
2321
|
+
{ property: "borderTopStyle", value: { type: "keyword", value: "solid" } },
|
|
2322
|
+
{ property: "borderRightStyle", value: { type: "keyword", value: "solid" } },
|
|
2323
|
+
{ property: "borderBottomStyle", value: { type: "keyword", value: "solid" } },
|
|
2324
|
+
{ property: "borderLeftStyle", value: { type: "keyword", value: "solid" } },
|
|
2325
|
+
{ property: "textTransform", value: { type: "keyword", value: "none" } }
|
|
2326
|
+
];
|
|
2327
|
+
const select = button;
|
|
2328
|
+
const rootComponent = "ws:root";
|
|
2329
|
+
const rootMeta = {
|
|
2330
|
+
type: "container",
|
|
2331
|
+
label: "Global Root",
|
|
2332
|
+
icon: SettingsIcon,
|
|
2333
|
+
presetStyle: {
|
|
2334
|
+
html
|
|
2045
2335
|
}
|
|
2046
|
-
return;
|
|
2047
2336
|
};
|
|
2048
|
-
const
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
return transpileExpression({
|
|
2055
|
-
expression,
|
|
2056
|
-
executable: true,
|
|
2057
|
-
replaceVariable: (identifier) => {
|
|
2058
|
-
const depId = decodeDataSourceVariable(identifier);
|
|
2059
|
-
const dep = depId ? dataSources.get(depId) : void 0;
|
|
2060
|
-
if (dep) {
|
|
2061
|
-
usedDataSources == null ? void 0 : usedDataSources.set(dep.id, dep);
|
|
2062
|
-
return scope.getName(dep.id, dep.name);
|
|
2063
|
-
}
|
|
2064
|
-
}
|
|
2065
|
-
});
|
|
2337
|
+
const collectionComponent = "ws:collection";
|
|
2338
|
+
const collectionMeta = {
|
|
2339
|
+
type: "container",
|
|
2340
|
+
label: "Collection",
|
|
2341
|
+
icon: ListViewIcon,
|
|
2342
|
+
stylable: false
|
|
2066
2343
|
};
|
|
2067
|
-
const
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2344
|
+
const descendantComponent = "ws:descendant";
|
|
2345
|
+
const descendantMeta = {
|
|
2346
|
+
type: "control",
|
|
2347
|
+
label: "Descendant",
|
|
2348
|
+
icon: PaintBrushIcon,
|
|
2349
|
+
constraints: {
|
|
2350
|
+
relation: "parent",
|
|
2351
|
+
component: { $in: ["HtmlEmbed", "MarkdownEmbed"] }
|
|
2072
2352
|
}
|
|
2073
2353
|
};
|
|
2074
|
-
const
|
|
2075
|
-
const
|
|
2076
|
-
const
|
|
2077
|
-
|
|
2078
|
-
|
|
2354
|
+
const blockComponent = "ws:block";
|
|
2355
|
+
const blockTemplateComponent = "ws:block-template";
|
|
2356
|
+
const blockTemplateMeta = {
|
|
2357
|
+
type: "container",
|
|
2358
|
+
icon: AddTemplateInstanceIcon,
|
|
2359
|
+
stylable: false,
|
|
2360
|
+
constraints: {
|
|
2361
|
+
relation: "parent",
|
|
2362
|
+
component: { $eq: blockComponent }
|
|
2079
2363
|
}
|
|
2080
|
-
return pages.pages.find(
|
|
2081
|
-
(page) => page.id === idOrPath || getPagePath(page.id, pages) === idOrPath
|
|
2082
|
-
);
|
|
2083
2364
|
};
|
|
2084
|
-
const
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2365
|
+
const blockMeta = {
|
|
2366
|
+
type: "container",
|
|
2367
|
+
label: "Content Block",
|
|
2368
|
+
icon: ContentBlockIcon,
|
|
2369
|
+
constraints: [
|
|
2370
|
+
{
|
|
2371
|
+
relation: "ancestor",
|
|
2372
|
+
component: { $nin: [collectionComponent, blockComponent] }
|
|
2373
|
+
},
|
|
2374
|
+
{
|
|
2375
|
+
relation: "child",
|
|
2376
|
+
component: { $eq: blockTemplateComponent }
|
|
2377
|
+
}
|
|
2378
|
+
],
|
|
2379
|
+
stylable: false
|
|
2380
|
+
};
|
|
2381
|
+
const coreMetas = {
|
|
2382
|
+
[rootComponent]: rootMeta,
|
|
2383
|
+
[collectionComponent]: collectionMeta,
|
|
2384
|
+
[descendantComponent]: descendantMeta,
|
|
2385
|
+
[blockComponent]: blockMeta,
|
|
2386
|
+
[blockTemplateComponent]: blockTemplateMeta
|
|
2387
|
+
};
|
|
2388
|
+
const isCoreComponent = (component) => component === rootComponent || component === collectionComponent || component === descendantComponent || component === blockComponent || component === blockTemplateComponent;
|
|
2389
|
+
const ROOT_INSTANCE_ID = ":root";
|
|
2390
|
+
const traverseInstances = (instances, instanceId, callback) => {
|
|
2391
|
+
const instance = instances.get(instanceId);
|
|
2392
|
+
if (instance === void 0) {
|
|
2393
|
+
return;
|
|
2394
|
+
}
|
|
2395
|
+
const skipTraversingChildren = callback(instance);
|
|
2396
|
+
if (skipTraversingChildren === false) {
|
|
2397
|
+
return;
|
|
2398
|
+
}
|
|
2399
|
+
for (const child of instance.children) {
|
|
2400
|
+
if (child.type === "id") {
|
|
2401
|
+
traverseInstances(instances, child.value, callback);
|
|
2402
|
+
}
|
|
2403
|
+
}
|
|
2404
|
+
};
|
|
2405
|
+
const findTreeInstanceIds = (instances, rootInstanceId) => {
|
|
2406
|
+
const ids = /* @__PURE__ */ new Set([rootInstanceId]);
|
|
2407
|
+
traverseInstances(instances, rootInstanceId, (instance) => {
|
|
2408
|
+
ids.add(instance.id);
|
|
2409
|
+
});
|
|
2410
|
+
return ids;
|
|
2411
|
+
};
|
|
2412
|
+
const parseComponentName = (componentName) => {
|
|
2413
|
+
const parts = componentName.split(":");
|
|
2414
|
+
let namespace;
|
|
2415
|
+
let name2;
|
|
2416
|
+
if (parts.length === 1) {
|
|
2417
|
+
[name2] = parts;
|
|
2418
|
+
} else {
|
|
2419
|
+
[namespace, name2] = parts;
|
|
2420
|
+
}
|
|
2421
|
+
return [namespace, name2];
|
|
2422
|
+
};
|
|
2423
|
+
const transpileExpression = ({
|
|
2424
|
+
expression,
|
|
2425
|
+
executable = false,
|
|
2426
|
+
replaceVariable
|
|
2427
|
+
}) => {
|
|
2428
|
+
let root;
|
|
2429
|
+
try {
|
|
2430
|
+
root = parseExpressionAt(expression, 0, { ecmaVersion: "latest" });
|
|
2431
|
+
} catch (error) {
|
|
2432
|
+
const message = error.message;
|
|
2433
|
+
throw Error(`${message} in ${JSON.stringify(expression)}`);
|
|
2434
|
+
}
|
|
2435
|
+
const replacements = [];
|
|
2436
|
+
const replaceIdentifier = (node, assignee) => {
|
|
2437
|
+
const newName = replaceVariable == null ? void 0 : replaceVariable(node.name, assignee);
|
|
2438
|
+
if (newName) {
|
|
2439
|
+
replacements.push([node.start, node.end, newName]);
|
|
2440
|
+
}
|
|
2441
|
+
};
|
|
2442
|
+
simple(root, {
|
|
2443
|
+
Identifier: (node) => replaceIdentifier(node, false),
|
|
2444
|
+
AssignmentExpression(node) {
|
|
2445
|
+
simple(node.left, {
|
|
2446
|
+
Identifier: (node2) => replaceIdentifier(node2, true)
|
|
2447
|
+
});
|
|
2448
|
+
},
|
|
2449
|
+
MemberExpression(node) {
|
|
2450
|
+
if (executable === false || node.optional) {
|
|
2451
|
+
return;
|
|
2452
|
+
}
|
|
2453
|
+
if (node.computed === false) {
|
|
2454
|
+
const dotIndex = expression.indexOf(".", node.object.end);
|
|
2455
|
+
replacements.push([dotIndex, dotIndex, "?"]);
|
|
2456
|
+
}
|
|
2457
|
+
if (node.computed === true) {
|
|
2458
|
+
const dotIndex = expression.indexOf("[", node.object.end);
|
|
2459
|
+
replacements.push([dotIndex, dotIndex, "?."]);
|
|
2460
|
+
}
|
|
2461
|
+
}
|
|
2462
|
+
});
|
|
2463
|
+
replacements.sort(([leftStart], [rightStart]) => rightStart - leftStart);
|
|
2464
|
+
for (const [start, end, fragment] of replacements) {
|
|
2465
|
+
const before = expression.slice(0, start);
|
|
2466
|
+
const after = expression.slice(end);
|
|
2467
|
+
expression = before + fragment + after;
|
|
2468
|
+
}
|
|
2469
|
+
return expression;
|
|
2470
|
+
};
|
|
2471
|
+
const dataSourceVariablePrefix = "$ws$dataSource$";
|
|
2472
|
+
const decodeDataSourceVariable = (name2) => {
|
|
2473
|
+
if (name2.startsWith(dataSourceVariablePrefix)) {
|
|
2474
|
+
const encoded = name2.slice(dataSourceVariablePrefix.length);
|
|
2475
|
+
return encoded.replaceAll("__DASH__", "-");
|
|
2476
|
+
}
|
|
2477
|
+
return;
|
|
2478
|
+
};
|
|
2479
|
+
const generateExpression = ({
|
|
2480
|
+
expression,
|
|
2481
|
+
dataSources,
|
|
2482
|
+
usedDataSources,
|
|
2483
|
+
scope
|
|
2484
|
+
}) => {
|
|
2485
|
+
return transpileExpression({
|
|
2486
|
+
expression,
|
|
2487
|
+
executable: true,
|
|
2488
|
+
replaceVariable: (identifier) => {
|
|
2489
|
+
const depId = decodeDataSourceVariable(identifier);
|
|
2490
|
+
const dep = depId ? dataSources.get(depId) : void 0;
|
|
2491
|
+
if (dep) {
|
|
2492
|
+
usedDataSources == null ? void 0 : usedDataSources.set(dep.id, dep);
|
|
2493
|
+
return scope.getName(dep.id, dep.name);
|
|
2494
|
+
}
|
|
2495
|
+
}
|
|
2496
|
+
});
|
|
2497
|
+
};
|
|
2498
|
+
const executeExpression = (expression) => {
|
|
2499
|
+
try {
|
|
2500
|
+
const fn = new Function(`return (${expression})`);
|
|
2501
|
+
return fn();
|
|
2502
|
+
} catch {
|
|
2503
|
+
}
|
|
2504
|
+
};
|
|
2505
|
+
const tokenRegex = new RegExp(":(?<name>\\w+)(?<modifier>[?*]?)|(?<wildcard>(?<!:\\w+)\\*)");
|
|
2506
|
+
const isPathnamePattern = (pathname) => tokenRegex.test(pathname);
|
|
2507
|
+
const findPageByIdOrPath = (idOrPath, pages) => {
|
|
2508
|
+
if (idOrPath === "" || idOrPath === "/" || idOrPath === pages.homePage.id) {
|
|
2509
|
+
return pages.homePage;
|
|
2510
|
+
}
|
|
2511
|
+
return pages.pages.find(
|
|
2512
|
+
(page) => page.id === idOrPath || getPagePath(page.id, pages) === idOrPath
|
|
2513
|
+
);
|
|
2514
|
+
};
|
|
2515
|
+
const getPagePath = (id, pages) => {
|
|
2516
|
+
const foldersMap = /* @__PURE__ */ new Map();
|
|
2517
|
+
const childParentMap = /* @__PURE__ */ new Map();
|
|
2518
|
+
for (const folder of pages.folders) {
|
|
2519
|
+
foldersMap.set(folder.id, folder);
|
|
2520
|
+
for (const childId of folder.children) {
|
|
2521
|
+
childParentMap.set(childId, folder.id);
|
|
2522
|
+
}
|
|
2523
|
+
}
|
|
2524
|
+
const paths = [];
|
|
2525
|
+
let currentId = id;
|
|
2526
|
+
const allPages = [pages.homePage, ...pages.pages];
|
|
2527
|
+
for (const page of allPages) {
|
|
2528
|
+
if (page.id === id) {
|
|
2529
|
+
paths.push(page.path);
|
|
2530
|
+
currentId = childParentMap.get(page.id);
|
|
2100
2531
|
break;
|
|
2101
2532
|
}
|
|
2102
2533
|
}
|
|
@@ -2227,973 +2658,250 @@ const generateResources = ({
|
|
|
2227
2658
|
if (dataSource.type === "parameter") {
|
|
2228
2659
|
if (dataSource.id !== page.systemDataSourceId) {
|
|
2229
2660
|
continue;
|
|
2230
|
-
}
|
|
2231
|
-
const name2 = scope.getName(dataSource.id, dataSource.name);
|
|
2232
|
-
generatedVariables += ` const ${name2} = _props.system
|
|
2233
|
-
`;
|
|
2234
|
-
}
|
|
2235
|
-
}
|
|
2236
|
-
let generated = "";
|
|
2237
|
-
generated += `import type { System, ResourceRequest } from "@webstudio-is/sdk";
|
|
2238
|
-
`;
|
|
2239
|
-
generated += `export const getResources = (_props: { system: System }) => {
|
|
2240
|
-
`;
|
|
2241
|
-
generated += generatedVariables;
|
|
2242
|
-
generated += generatedRequests;
|
|
2243
|
-
generated += ` const _data = new Map<string, ResourceRequest>([
|
|
2244
|
-
`;
|
|
2245
|
-
for (const dataSource of dataSources.values()) {
|
|
2246
|
-
if (dataSource.type === "resource") {
|
|
2247
|
-
const name2 = scope.getName(dataSource.resourceId, dataSource.name);
|
|
2248
|
-
generated += ` ["${name2}", ${name2}],
|
|
2249
|
-
`;
|
|
2250
|
-
}
|
|
2251
|
-
}
|
|
2252
|
-
generated += ` ])
|
|
2253
|
-
`;
|
|
2254
|
-
generated += ` const _action = new Map<string, ResourceRequest>([
|
|
2255
|
-
`;
|
|
2256
|
-
for (const prop of props2.values()) {
|
|
2257
|
-
if (prop.type === "resource") {
|
|
2258
|
-
const name2 = scope.getName(prop.value, prop.name);
|
|
2259
|
-
generated += ` ["${name2}", ${name2}],
|
|
2260
|
-
`;
|
|
2261
|
-
}
|
|
2262
|
-
}
|
|
2263
|
-
generated += ` ])
|
|
2264
|
-
`;
|
|
2265
|
-
generated += ` return { data: _data, action: _action }
|
|
2266
|
-
`;
|
|
2267
|
-
generated += `}
|
|
2268
|
-
`;
|
|
2269
|
-
return generated;
|
|
2270
|
-
};
|
|
2271
|
-
const getMethod = (value) => {
|
|
2272
|
-
switch (value == null ? void 0 : value.toLowerCase()) {
|
|
2273
|
-
case "get":
|
|
2274
|
-
return "get";
|
|
2275
|
-
case "delete":
|
|
2276
|
-
return "delete";
|
|
2277
|
-
case "put":
|
|
2278
|
-
return "put";
|
|
2279
|
-
default:
|
|
2280
|
-
return "post";
|
|
2281
|
-
}
|
|
2282
|
-
};
|
|
2283
|
-
const replaceFormActionsWithResources = ({
|
|
2284
|
-
props: props2,
|
|
2285
|
-
instances,
|
|
2286
|
-
resources
|
|
2287
|
-
}) => {
|
|
2288
|
-
var _a, _b;
|
|
2289
|
-
const formProps = /* @__PURE__ */ new Map();
|
|
2290
|
-
for (const prop of props2.values()) {
|
|
2291
|
-
if (prop.name === "method" && prop.type === "string" && ((_a = instances.get(prop.instanceId)) == null ? void 0 : _a.component) === "Form") {
|
|
2292
|
-
let data = formProps.get(prop.instanceId);
|
|
2293
|
-
if (data === void 0) {
|
|
2294
|
-
data = {};
|
|
2295
|
-
formProps.set(prop.instanceId, data);
|
|
2296
|
-
}
|
|
2297
|
-
data.method = prop.value;
|
|
2298
|
-
props2.delete(prop.id);
|
|
2299
|
-
}
|
|
2300
|
-
if (prop.name === "action" && prop.type === "string" && prop.value && ((_b = instances.get(prop.instanceId)) == null ? void 0 : _b.component) === "Form") {
|
|
2301
|
-
let data = formProps.get(prop.instanceId);
|
|
2302
|
-
if (data === void 0) {
|
|
2303
|
-
data = {};
|
|
2304
|
-
formProps.set(prop.instanceId, data);
|
|
2305
|
-
}
|
|
2306
|
-
data.action = prop.value;
|
|
2307
|
-
props2.set(prop.id, {
|
|
2308
|
-
id: prop.id,
|
|
2309
|
-
instanceId: prop.instanceId,
|
|
2310
|
-
name: prop.name,
|
|
2311
|
-
type: "resource",
|
|
2312
|
-
value: prop.instanceId
|
|
2313
|
-
});
|
|
2314
|
-
}
|
|
2315
|
-
}
|
|
2316
|
-
for (const [instanceId, { action, method }] of formProps) {
|
|
2317
|
-
if (action) {
|
|
2318
|
-
resources.set(instanceId, {
|
|
2319
|
-
id: instanceId,
|
|
2320
|
-
name: "action",
|
|
2321
|
-
method: getMethod(method),
|
|
2322
|
-
url: JSON.stringify(action),
|
|
2323
|
-
headers: []
|
|
2324
|
-
});
|
|
2325
|
-
}
|
|
2326
|
-
}
|
|
2327
|
-
};
|
|
2328
|
-
const generatePageMeta = ({
|
|
2329
|
-
globalScope,
|
|
2330
|
-
page,
|
|
2331
|
-
dataSources,
|
|
2332
|
-
assets
|
|
2333
|
-
}) => {
|
|
2334
|
-
var _a;
|
|
2335
|
-
const localScope = createScope(["system", "resources"]);
|
|
2336
|
-
const usedDataSources = /* @__PURE__ */ new Map();
|
|
2337
|
-
const titleExpression = generateExpression({
|
|
2338
|
-
expression: page.title,
|
|
2339
|
-
dataSources,
|
|
2340
|
-
usedDataSources,
|
|
2341
|
-
scope: localScope
|
|
2342
|
-
});
|
|
2343
|
-
const descriptionExpression = generateExpression({
|
|
2344
|
-
expression: page.meta.description ?? "undefined",
|
|
2345
|
-
dataSources,
|
|
2346
|
-
usedDataSources,
|
|
2347
|
-
scope: localScope
|
|
2348
|
-
});
|
|
2349
|
-
const excludePageFromSearchExpression = generateExpression({
|
|
2350
|
-
expression: page.meta.excludePageFromSearch ?? "undefined",
|
|
2351
|
-
dataSources,
|
|
2352
|
-
usedDataSources,
|
|
2353
|
-
scope: localScope
|
|
2354
|
-
});
|
|
2355
|
-
const languageExpression = generateExpression({
|
|
2356
|
-
expression: page.meta.language ?? "undefined",
|
|
2357
|
-
dataSources,
|
|
2358
|
-
usedDataSources,
|
|
2359
|
-
scope: localScope
|
|
2360
|
-
});
|
|
2361
|
-
const socialImageAssetNameExpression = JSON.stringify(
|
|
2362
|
-
page.meta.socialImageAssetId ? (_a = assets.get(page.meta.socialImageAssetId)) == null ? void 0 : _a.name : void 0
|
|
2363
|
-
);
|
|
2364
|
-
const socialImageUrlExpression = generateExpression({
|
|
2365
|
-
expression: page.meta.socialImageUrl ?? "undefined",
|
|
2366
|
-
dataSources,
|
|
2367
|
-
usedDataSources,
|
|
2368
|
-
scope: localScope
|
|
2369
|
-
});
|
|
2370
|
-
const statusExpression = generateExpression({
|
|
2371
|
-
expression: page.meta.status ?? "undefined",
|
|
2372
|
-
dataSources,
|
|
2373
|
-
usedDataSources,
|
|
2374
|
-
scope: localScope
|
|
2375
|
-
});
|
|
2376
|
-
const redirectExpression = generateExpression({
|
|
2377
|
-
expression: page.meta.redirect ?? "undefined",
|
|
2378
|
-
dataSources,
|
|
2379
|
-
usedDataSources,
|
|
2380
|
-
scope: localScope
|
|
2381
|
-
});
|
|
2382
|
-
let customExpression = "";
|
|
2383
|
-
customExpression += `[
|
|
2384
|
-
`;
|
|
2385
|
-
for (const customMeta of page.meta.custom ?? []) {
|
|
2386
|
-
if (customMeta.property.trim().length === 0) {
|
|
2387
|
-
continue;
|
|
2388
|
-
}
|
|
2389
|
-
const propertyExpression = JSON.stringify(customMeta.property);
|
|
2390
|
-
const contentExpression = generateExpression({
|
|
2391
|
-
expression: customMeta.content,
|
|
2392
|
-
dataSources,
|
|
2393
|
-
usedDataSources,
|
|
2394
|
-
scope: localScope
|
|
2395
|
-
});
|
|
2396
|
-
customExpression += ` {
|
|
2397
|
-
`;
|
|
2398
|
-
customExpression += ` property: ${propertyExpression},
|
|
2399
|
-
`;
|
|
2400
|
-
customExpression += ` content: ${contentExpression},
|
|
2401
|
-
`;
|
|
2402
|
-
customExpression += ` },
|
|
2403
|
-
`;
|
|
2404
|
-
}
|
|
2405
|
-
customExpression += ` ]`;
|
|
2406
|
-
let generated = "";
|
|
2407
|
-
generated += `export const getPageMeta = ({
|
|
2408
|
-
`;
|
|
2409
|
-
generated += ` system,
|
|
2410
|
-
`;
|
|
2411
|
-
generated += ` resources,
|
|
2412
|
-
`;
|
|
2413
|
-
generated += `}: {
|
|
2414
|
-
`;
|
|
2415
|
-
generated += ` system: System;
|
|
2416
|
-
`;
|
|
2417
|
-
generated += ` resources: Record<string, any>;
|
|
2418
|
-
`;
|
|
2419
|
-
generated += `}): PageMeta => {
|
|
2420
|
-
`;
|
|
2421
|
-
for (const dataSource of usedDataSources.values()) {
|
|
2422
|
-
if (dataSource.type === "variable") {
|
|
2423
|
-
const valueName = localScope.getName(dataSource.id, dataSource.name);
|
|
2424
|
-
const initialValueString = JSON.stringify(dataSource.value.value);
|
|
2425
|
-
generated += ` let ${valueName} = ${initialValueString}
|
|
2426
|
-
`;
|
|
2427
|
-
continue;
|
|
2428
|
-
}
|
|
2429
|
-
if (dataSource.type === "parameter") {
|
|
2430
|
-
if (dataSource.id === page.systemDataSourceId) {
|
|
2431
|
-
const valueName = localScope.getName(dataSource.id, dataSource.name);
|
|
2432
|
-
generated += ` let ${valueName} = system
|
|
2433
|
-
`;
|
|
2434
|
-
}
|
|
2435
|
-
continue;
|
|
2436
|
-
}
|
|
2437
|
-
if (dataSource.type === "resource") {
|
|
2438
|
-
const valueName = localScope.getName(dataSource.id, dataSource.name);
|
|
2439
|
-
const resourceName = globalScope.getName(
|
|
2440
|
-
dataSource.resourceId,
|
|
2441
|
-
dataSource.name
|
|
2442
|
-
);
|
|
2443
|
-
generated += ` let ${valueName} = resources.${resourceName}
|
|
2444
|
-
`;
|
|
2445
|
-
continue;
|
|
2446
|
-
}
|
|
2447
|
-
}
|
|
2448
|
-
generated += ` return {
|
|
2449
|
-
`;
|
|
2450
|
-
generated += ` title: ${titleExpression},
|
|
2451
|
-
`;
|
|
2452
|
-
generated += ` description: ${descriptionExpression},
|
|
2453
|
-
`;
|
|
2454
|
-
generated += ` excludePageFromSearch: ${excludePageFromSearchExpression},
|
|
2455
|
-
`;
|
|
2456
|
-
generated += ` language: ${languageExpression},
|
|
2457
|
-
`;
|
|
2458
|
-
generated += ` socialImageAssetName: ${socialImageAssetNameExpression},
|
|
2459
|
-
`;
|
|
2460
|
-
generated += ` socialImageUrl: ${socialImageUrlExpression},
|
|
2461
|
-
`;
|
|
2462
|
-
generated += ` status: ${statusExpression},
|
|
2463
|
-
`;
|
|
2464
|
-
generated += ` redirect: ${redirectExpression},
|
|
2465
|
-
`;
|
|
2466
|
-
generated += ` custom: ${customExpression},
|
|
2467
|
-
`;
|
|
2468
|
-
generated += ` };
|
|
2469
|
-
`;
|
|
2470
|
-
generated += `};
|
|
2471
|
-
`;
|
|
2472
|
-
return generated;
|
|
2473
|
-
};
|
|
2474
|
-
const AccordionIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M13.056 8H14.5V4.101a1.3 1.3 0 0 0-1.3-1.299H2.8a1.3 1.3 0 0 0-1.3 1.3V8H13.056ZM13.056 13.198h.145a1.3 1.3 0 0 0 1.299-1.3V8h-13v3.899a1.3 1.3 0 0 0 1.3 1.299h10.256Z"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="m10.026 4.913.975.976.976-.976M10.026 10.111l.975.976.976-.976"/></svg>`;
|
|
2475
|
-
const AddTemplateInstanceIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M4.5 2H3.333A1.333 1.333 0 0 0 2 3.333V4.5M14 12.667c0 .021 0 .042-.002.063M11.5 14h1.167a1.333 1.333 0 0 0 1.331-1.27m0 0V11.5M2 11.5v1.167A1.333 1.333 0 0 0 3.333 14H4.5M7 14h2M2 7v2M8.461 4.77H14M11.23 2v5.538"/></svg>`;
|
|
2476
|
-
const BlockquoteIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path fill="currentColor" fill-rule="evenodd" d="M6.142 8.5c-.056.516-.205.928-.465 1.293-.349.488-.933.943-1.9 1.427a.5.5 0 1 0 .447.894c1.032-.516 1.782-1.061 2.266-1.74.494-.691.677-1.47.677-2.374V5c0-.644-.523-1.167-1.167-1.167H3.333c-.644 0-1.166.523-1.166 1.167v2.333c0 .645.522 1.167 1.166 1.167h2.809ZM12.808 8.5c-.055.516-.204.928-.465 1.293-.348.488-.933.943-1.9 1.427a.5.5 0 1 0 .447.894c1.033-.516 1.782-1.061 2.267-1.74.494-.691.676-1.47.676-2.374V5c0-.644-.522-1.167-1.166-1.167H10c-.644 0-1.167.523-1.167 1.167v2.333c0 .645.523 1.167 1.167 1.167h2.808Z" clip-rule="evenodd"/></svg>`;
|
|
2477
|
-
const BodyIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M12.667 2H3.333C2.597 2 2 2.597 2 3.333v9.334C2 13.403 2.597 14 3.333 14h9.334c.736 0 1.333-.597 1.333-1.333V3.333C14 2.597 13.403 2 12.667 2ZM2 6h12"/></svg>`;
|
|
2478
|
-
const BoldIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M4 8h6a2.667 2.667 0 0 1 0 5.333H4.667A.667.667 0 0 1 4 12.667V3.333a.667.667 0 0 1 .667-.666h4.666a2.667 2.667 0 1 1 0 5.333"/></svg>`;
|
|
2479
|
-
const BoxIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M12.667 2H3.333C2.597 2 2 2.597 2 3.333v9.334C2 13.403 2.597 14 3.333 14h9.334c.736 0 1.333-.597 1.333-1.333V3.333C14 2.597 13.403 2 12.667 2Z"/></svg>`;
|
|
2480
|
-
const BracesIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M5.333 2h-.666a1.333 1.333 0 0 0-1.334 1.333v3.334A1.333 1.333 0 0 1 2 8a1.333 1.333 0 0 1 1.333 1.333v3.334c0 .733.6 1.333 1.334 1.333h.666M10.667 14h.666a1.333 1.333 0 0 0 1.334-1.333V9.333C12.667 8.6 13.267 8 14 8a1.333 1.333 0 0 1-1.333-1.333V3.333A1.333 1.333 0 0 0 11.333 2h-.666"/></svg>`;
|
|
2481
|
-
const ButtonElementIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path fill="currentColor" fill-rule="evenodd" d="M1.833 8a3.5 3.5 0 0 1 3.5-3.5h5.334a3.5 3.5 0 1 1 0 7H5.333a3.5 3.5 0 0 1-3.5-3.5Zm3.5-4.5a4.5 4.5 0 0 0 0 9h5.334a4.5 4.5 0 1 0 0-9H5.333ZM5.72 8a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM8 9a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm4.28-1a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z" clip-rule="evenodd"/></svg>`;
|
|
2482
|
-
const CalendarIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M7.333 9.333H8V12M10.667 1.333V4M2 6.667h12M5.333 1.333V4"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M12.667 2.667H3.333C2.597 2.667 2 3.264 2 4v9.333c0 .737.597 1.334 1.333 1.334h9.334c.736 0 1.333-.597 1.333-1.334V4c0-.736-.597-1.333-1.333-1.333Z"/></svg>`;
|
|
2483
|
-
const CheckMarkIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.091" d="m13.636 3.667-8 8L2 8.03"/></svg>`;
|
|
2484
|
-
const CheckboxCheckedIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M12.667 2H3.333C2.597 2 2 2.597 2 3.333v9.334C2 13.403 2.597 14 3.333 14h9.334c.736 0 1.333-.597 1.333-1.333V3.333C14 2.597 13.403 2 12.667 2Z"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="m6 8.238 1.383 1.383L10.003 7"/></svg>`;
|
|
2485
|
-
const CollapsibleIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M8 14.667v-4M8 5.333v-4M2.5 8h-1M6.5 8h-1M10.5 8h-1M14.5 8h-1M10 12.667l-2-2-2 2M10 3.333l-2 2-2-2"/></svg>`;
|
|
2486
|
-
const ContentBlockIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M8 2H3.333A1.333 1.333 0 0 0 2 3.333v9.334A1.333 1.333 0 0 0 3.333 14h9.334A1.334 1.334 0 0 0 14 12.667V8"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M12.25 1.75a1.414 1.414 0 1 1 2 2L8.24 9.76a1.333 1.333 0 0 1-.568.336l-1.916.56a.334.334 0 0 1-.413-.413l.56-1.916c.063-.214.179-.41.337-.568L12.25 1.75Z"/></svg>`;
|
|
2487
|
-
const ContentIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M4.667 5.333h4M4.667 8H10M4.667 10.667h4M3.313 14A1.312 1.312 0 0 1 2 12.687v0V3.5A1.5 1.5 0 0 1 3.5 2h9A1.5 1.5 0 0 1 14 3.5v9.188"/></svg>`;
|
|
2488
|
-
const DialogIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path fill="#D2D2D2" d="M13.444 1H2.556C1.696 1 1 1.696 1 2.556v10.888C1 14.304 1.696 15 2.556 15h10.888c.86 0 1.556-.696 1.556-1.556V2.556C15 1.696 14.304 1 13.444 1Z"/><path fill="#fff" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M11.334 5.667H4.667v4.666h6.667V5.667Z"/></svg>`;
|
|
2489
|
-
const EmbedIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M12 10.667 14.667 8 12 5.333M4 5.333 1.333 8 4 10.667M9.667 2.667 6.333 13.333"/></svg>`;
|
|
2490
|
-
const FormTextAreaIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M3.333 14h9.334c.736 0 1.333-.597 1.333-1.333V3.522C14 2.682 13.318 2 12.478 2h-9C2.662 2 2 2.662 2 3.478v9.189C2 13.403 2.597 14 3.333 14ZM3.83 6.636V3.943"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="m10.496 13.76 1.724-1.725 1.717-1.717"/></svg>`;
|
|
2491
|
-
const FormTextFieldIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M3.333 2.667H4a2 2 0 0 1 2 2 2 2 0 0 1 2-2h.667M8.667 13.333H8a2 2 0 0 1-2-2 2 2 0 0 1-2 2h-.667M3.333 10.667h-.666a1.333 1.333 0 0 1-1.334-1.334V6.667a1.333 1.333 0 0 1 1.334-1.334h.666M8.667 5.333h4.666a1.333 1.333 0 0 1 1.334 1.334v2.666a1.333 1.333 0 0 1-1.334 1.334H8.667M6 4.667v6.666"/></svg>`;
|
|
2492
|
-
const FormIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M13.184 5.5h.731a.75.75 0 0 0 .75-.75v-1.5a.75.75 0 0 0-.75-.75H2.085a.75.75 0 0 0-.75.75v1.5c0 .414.336.75.75.75h11.099ZM13.184 10.5h.732a.75.75 0 0 0 .75-.75v-1.5a.75.75 0 0 0-.75-.75H2.084a.75.75 0 0 0-.75.75v1.5c0 .414.336.75.75.75h11.099Z"/><path fill="currentColor" d="M6.613 14.5h.222a.5.5 0 0 0 .5-.5v-1a.5.5 0 0 0-.5-.5h-5.5a.5.5 0 0 0-.5.5v1a.5.5 0 0 0 .5.5H6.613Z"/></svg>`;
|
|
2493
|
-
const HeaderIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M12.667 2H3.333C2.597 2 2 2.597 2 3.333v9.334C2 13.403 2.597 14 3.333 14h9.334c.736 0 1.333-.597 1.333-1.333V3.333C14 2.597 13.403 2 12.667 2ZM4 4h8"/></svg>`;
|
|
2494
|
-
const HeadingIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M4 8h8M4 13.333V2.667M12 13.333V2.667"/></svg>`;
|
|
2495
|
-
const ImageIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M12.667 2H3.333C2.597 2 2 2.597 2 3.333v9.334C2 13.403 2.597 14 3.333 14h9.334c.736 0 1.333-.597 1.333-1.333V3.333C14 2.597 13.403 2 12.667 2Z"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M6 7.333a1.333 1.333 0 1 0 0-2.666 1.333 1.333 0 0 0 0 2.666ZM14 10l-2.057-2.057a1.333 1.333 0 0 0-1.886 0L4 14"/></svg>`;
|
|
2496
|
-
const ItemIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M2 6h.007M5.333 10H14M5.333 6H14"/></svg>`;
|
|
2497
|
-
const LabelIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M12.667 2H3.333C2.597 2 2 2.597 2 3.333v9.334C2 13.403 2.597 14 3.333 14h9.334c.736 0 1.333-.597 1.333-1.333V3.333C14 2.597 13.403 2 12.667 2Z"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M6.476 11.074V4.926m0 6.148h3.77v-.615m-3.77.615h-.722m.722-6.148h.632m-.632 0h-.722"/></svg>`;
|
|
2498
|
-
const LinkIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M8.943 11.771 8 12.714A3.333 3.333 0 0 1 3.286 8l.943-.943M7.057 4.229 8 3.286A3.333 3.333 0 1 1 12.714 8l-.943.943M6.114 9.886l3.772-3.772"/></svg>`;
|
|
2499
|
-
const ListItemIcon = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" width="100%" height="100%" style="display: block;"><path d="M3.7 6.175a.85.85 0 1 1-1.7 0 .85.85 0 0 1 1.7 0Z"/><path fill-rule="evenodd" d="M5 6.175c0-.345.28-.625.625-.625h7.75a.625.625 0 1 1 0 1.25h-7.75A.625.625 0 0 1 5 6.175ZM5 10.05c0-.345.28-.625.625-.625h7.75a.625.625 0 1 1 0 1.25h-7.75A.625.625 0 0 1 5 10.05Z" clip-rule="evenodd"/></svg>`;
|
|
2500
|
-
const ListViewIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path fill="currentColor" fill-rule="evenodd" d="M3.333 2.5a.833.833 0 0 0-.833.833v9.334c0 .46.373.833.833.833h9.334c.46 0 .833-.373.833-.833V3.333a.833.833 0 0 0-.833-.833H3.333ZM1.5 3.333c0-1.012.82-1.833 1.833-1.833h9.334c1.012 0 1.833.82 1.833 1.833v9.334c0 1.012-.82 1.833-1.833 1.833H3.333A1.833 1.833 0 0 1 1.5 12.667V3.333Z" clip-rule="evenodd"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M14 6H2M14 10H2"/></svg>`;
|
|
2501
|
-
const ListIcon = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" width="100%" height="100%" style="display: block;"><path d="M3.7 4.35a.85.85 0 1 1-1.7 0 .85.85 0 0 1 1.7 0Z"/><path fill-rule="evenodd" d="M5 4.35c0-.346.28-.626.625-.626h7.75a.625.625 0 1 1 0 1.25h-7.75A.625.625 0 0 1 5 4.35Z" clip-rule="evenodd"/><path d="M3.7 8A.85.85 0 1 1 2 8a.85.85 0 0 1 1.7 0Z"/><path fill-rule="evenodd" d="M5 8c0-.345.28-.625.625-.625h7.75a.625.625 0 1 1 0 1.25h-7.75A.625.625 0 0 1 5 8Z" clip-rule="evenodd"/><path d="M3.7 11.65a.85.85 0 1 1-1.7 0 .85.85 0 0 1 1.7 0Z"/><path fill-rule="evenodd" d="M5 11.65c0-.346.28-.626.625-.626h7.75a.625.625 0 1 1 0 1.25h-7.75A.625.625 0 0 1 5 11.65Z" clip-rule="evenodd"/></svg>`;
|
|
2502
|
-
const MarkdownEmbedIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M4.667 5.333h4M4.667 8H10M14 8.75V3.5A1.5 1.5 0 0 0 12.5 2h-9A1.5 1.5 0 0 0 2 3.5v9.191c0 .725.588 1.313 1.313 1.313h4.691"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M11 14.314v-3l1.5 1.523 1.5-1.523v3"/></svg>`;
|
|
2503
|
-
const MinusIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M3.333 8h9.334"/></svg>`;
|
|
2504
|
-
const NavigationMenuIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M14 7v5.833c0 .645-.597 1.167-1.333 1.167H3.333C2.597 14 2 13.478 2 12.833V7"/><path fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M10.978 2.003H2.6a.6.6 0 0 0-.6.6v1.4h11.971v-1.4a.6.6 0 0 0-.6-.6h-2.393Z"/></svg>`;
|
|
2505
|
-
const OverlayIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path fill="#D2D2D2" d="M13.444 1H2.556C1.696 1 1 1.696 1 2.556v10.888C1 14.304 1.696 15 2.556 15h10.888c.86 0 1.556-.696 1.556-1.556V2.556C15 1.696 14.304 1 13.444 1Z"/></svg>`;
|
|
2506
|
-
const PaintBrushIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="m6.04 7.933 5.38-5.373a1.9 1.9 0 1 1 2.687 2.687l-5.374 5.386M4.713 9.96c-1.106 0-2 .9-2 2.013 0 .887-1.666 1.014-1.333 1.347.72.733 1.66 1.347 2.667 1.347 1.466 0 2.666-1.2 2.666-2.694a2.007 2.007 0 0 0-2-2.013Z"/></svg>`;
|
|
2507
|
-
const PopoverIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M14 6V4a1.334 1.334 0 0 0-1.333-1.333h-10A1.333 1.333 0 0 0 1.333 4v6.667c0 .733.6 1.333 1.334 1.333h2.666"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M13.333 8.667h-4C8.597 8.667 8 9.264 8 10v2c0 .736.597 1.333 1.333 1.333h4c.737 0 1.334-.597 1.334-1.333v-2c0-.736-.597-1.333-1.334-1.333Z"/></svg>`;
|
|
2508
|
-
const RadioCheckedIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M8 14.5a6.5 6.5 0 1 0 0-13 6.5 6.5 0 0 0 0 13Z"/><path fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M10.5 8a2.5 2.5 0 1 1-5 0 2.5 2.5 0 0 1 5 0Z"/></svg>`;
|
|
2509
|
-
const RadioGroupIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path fill="#000" stroke="#000" stroke-linecap="round" stroke-linejoin="round" d="M8.839 8a1.82 1.82 0 1 1-3.64 0 1.82 1.82 0 0 1 3.64 0Z"/><path stroke="#000" stroke-linecap="round" stroke-linejoin="round" d="M7.019 13.027a5.027 5.027 0 1 0 0-10.054 5.027 5.027 0 0 0 0 10.054Z"/><path stroke="#000" stroke-linecap="round" d="M12.629 12.077v0a6.73 6.73 0 0 0-.337-8.565v0"/></svg>`;
|
|
2510
|
-
const SelectIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M13.184 10.33h.149c.736 0 1.332-.597 1.332-1.332V6.332c0-.735-.596-1.332-1.332-1.332H2.667c-.735 0-1.332.597-1.332 1.332v2.666c0 .735.597 1.332 1.333 1.332h10.516Z"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="m10.078 7.165 1 1 1-1"/></svg>`;
|
|
2511
|
-
const SettingsIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M13.987 6H9.32M13.932 6h-12M14 10.5H2"/><rect width="4" height="4" x="1.932" y="8.534" fill="#fff" stroke="currentColor" rx="2"/><rect width="4" height="4" x="10.068" y="4" fill="#fff" stroke="currentColor" rx="2"/></svg>`;
|
|
2512
|
-
const SlotComponentIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M4.5 2H3.333A1.333 1.333 0 0 0 2 3.333V4.5M14 4.5V3.333A1.333 1.333 0 0 0 12.667 2H11.5M14 12.667c0 .021 0 .042-.002.063M11.5 14h1.167a1.333 1.333 0 0 0 1.331-1.27m0 0V11.5M2 11.5v1.167A1.333 1.333 0 0 0 3.333 14H4.5M7 2h2M7 14h2M2 7v2M14 7v2"/></svg>`;
|
|
2513
|
-
const SubscriptIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M2.667 3.333 8 8.667M8 3.333 2.667 8.667M13.333 12.667h-2.666c0-1 .293-1.334 1-1.667.706-.333 1.666-.78 1.666-1.667 0-.313-.113-.62-.32-.86a1.407 1.407 0 0 0-1.746-.293c-.28.16-.494.413-.6.713"/></svg>`;
|
|
2514
|
-
const SuperscriptIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M2.667 12.667 8 7.333M8 12.667 2.667 7.333M13.333 8h-2.666c0-1 .294-1.333 1-1.667.705-.333 1.666-.777 1.666-1.665 0-.315-.113-.62-.322-.86a1.403 1.403 0 0 0-1.745-.29c-.28.159-.492.409-.6.706"/></svg>`;
|
|
2515
|
-
const SwitchIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M10.667 4H5.333a4 4 0 1 0 0 8h5.334a4 4 0 0 0 0-8Z"/><path fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M5.333 9.333a1.333 1.333 0 1 0 0-2.666 1.333 1.333 0 0 0 0 2.666Z"/></svg>`;
|
|
2516
|
-
const TabsIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M9.75 5H13M9.75 5H7.401A1.684 1.684 0 0 1 6 4.25v0l-.5-.75-.5-.75L4.5 2m5.25 3-1-1.5-.5-.75-.5-.75M4.5 2H3v0a1.5 1.5 0 0 0-1.5 1.5v9A1.5 1.5 0 0 0 3 14h10v0a1.5 1.5 0 0 0 1.5-1.5v0-6A1.5 1.5 0 0 0 13 5v0M4.5 2h3.25m0 0h2.375v0c.547 0 1.057.273 1.36.728l.015.022.5.75L13 5"/></svg>`;
|
|
2517
|
-
const TextAlignLeftIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M10 8H2M11.333 12H2M14 4H2"/></svg>`;
|
|
2518
|
-
const TextItalicIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M12.667 2.667h-6M9.333 13.333h-6M10 2.667 6 13.333"/></svg>`;
|
|
2519
|
-
const TextIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M2.667 4.667v-2h10.666v2M6 13.333h4M8 2.667v10.666"/></svg>`;
|
|
2520
|
-
const TooltipIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="#000" stroke-linecap="round" stroke-linejoin="round" d="M14 10a1.333 1.333 0 0 1-1.333 1.333h-8L2 14V3.333A1.333 1.333 0 0 1 3.333 2h9.334A1.333 1.333 0 0 1 14 3.333V10Z"/></svg>`;
|
|
2521
|
-
const TriggerIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M11.915 7.354v-.647a1.294 1.294 0 1 0-2.587 0"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M9.328 6.707V6.06a1.294 1.294 0 1 0-2.587 0v.647"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M6.74 6.383V2.826a1.293 1.293 0 1 0-2.586 0v6.467"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M11.914 7.353a1.293 1.293 0 0 1 2.587 0v1.94a5.174 5.174 0 0 1-5.174 5.174H8.034c-1.81 0-2.91-.556-3.874-1.513l-2.328-2.328a1.293 1.293 0 0 1 1.83-1.824L4.8 9.94"/></svg>`;
|
|
2522
|
-
const ViewportIcon = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" width="100%" height="100%" style="display: block;"><path fill-rule="evenodd" d="M5.173 1.35h.157a.65.65 0 0 1 0 1.3H5.2c-.57 0-.96 0-1.26.025-.294.024-.446.068-.553.122a1.35 1.35 0 0 0-.59.59c-.054.107-.098.259-.122.552-.025.301-.025.69-.025 1.261v.13a.65.65 0 0 1-1.3 0v-.157c0-.537 0-.98.03-1.34.03-.373.095-.715.259-1.036a2.65 2.65 0 0 1 1.158-1.158c.32-.164.663-.229 1.036-.26.36-.029.803-.029 1.34-.029Zm6.888 1.325c-.301-.024-.69-.025-1.261-.025h-.13a.65.65 0 1 1 0-1.3h.157c.537 0 .98 0 1.34.03.373.03.715.095 1.036.259.499.254.904.66 1.158 1.158.164.32.229.663.26 1.036.029.36.029.803.029 1.34v.157a.65.65 0 1 1-1.3 0V5.2c0-.57 0-.96-.025-1.26-.024-.294-.068-.446-.122-.553a1.35 1.35 0 0 0-.59-.59c-.107-.054-.26-.098-.552-.122ZM2 10.02a.65.65 0 0 1 .65.65v.13c0 .57 0 .96.025 1.26.024.294.068.446.122.553.13.254.336.46.59.59.107.054.259.098.552.122.301.025.69.025 1.261.025h.13a.65.65 0 1 1 0 1.3h-.157c-.537 0-.98 0-1.34-.03-.373-.03-.715-.095-1.036-.259a2.65 2.65 0 0 1-1.158-1.158c-.164-.32-.23-.663-.26-1.037-.029-.36-.029-.802-.029-1.34v-.156a.65.65 0 0 1 .65-.65Zm12 0a.65.65 0 0 1 .65.65v.157c0 .537 0 .98-.03 1.34-.03.373-.095.715-.259 1.036a2.65 2.65 0 0 1-1.158 1.158c-.32.164-.663.23-1.037.26-.36.029-.802.029-1.34.029h-.156a.65.65 0 1 1 0-1.3h.13c.57 0 .96 0 1.26-.025.294-.024.446-.068.553-.122.254-.13.46-.336.59-.59.054-.107.098-.259.122-.552.025-.301.025-.69.025-1.261v-.13a.65.65 0 0 1 .65-.65ZM8 10.033a2.033 2.033 0 1 0 0-4.066 2.033 2.033 0 0 0 0 4.066Zm0 1.3a3.333 3.333 0 1 0 0-6.666 3.333 3.333 0 0 0 0 6.666Z" clip-rule="evenodd"/></svg>`;
|
|
2523
|
-
const VimeoIcon = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 22 22" fill="currentColor" width="100%" height="100%" style="display: block;"><path d="M20.158 6.738c-.082 1.785-1.329 4.23-3.74 7.333-2.492 3.24-4.6 4.861-6.327 4.861-1.068 0-1.972-.986-2.711-2.961L5.9 10.543c-.548-1.973-1.136-2.96-1.766-2.96-.136 0-.617.288-1.439.863l-.862-1.111c.904-.795 1.797-1.59 2.675-2.388C5.715 3.905 6.621 3.356 7.225 3.3c1.427-.136 2.305.84 2.635 2.928.356 2.254.603 3.655.74 4.203.412 1.87.865 2.804 1.359 2.804.384 0 .96-.607 1.73-1.82.767-1.212 1.178-2.135 1.233-2.768.11-1.047-.301-1.572-1.234-1.572-.44 0-.892.1-1.357.3.9-2.951 2.622-4.386 5.164-4.304 1.883.055 2.771 1.277 2.663 3.667Z"/></svg>`;
|
|
2524
|
-
const WebhookFormIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M12 11.32H8.007c-.734 0-1.3.627-1.654 1.267a2.666 2.666 0 0 1-5.02-1.254A2.62 2.62 0 0 1 1.713 10"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M4 11.333 6.087 7.48c.353-.647.066-1.453-.334-2.067a2.667 2.667 0 1 1 4.594-2.706"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="m8 4 2.087 3.82c.353.647 1.18.847 1.913.847A2.667 2.667 0 0 1 12 14"/></svg>`;
|
|
2525
|
-
const XmlIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M12.163 9.02v-4L8.83 1.686h-5.5A1.333 1.333 0 0 0 1.997 3.02v6"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M8.164 2.186v1.667a1.333 1.333 0 0 0 1.333 1.333h2.667M1.997 11.314l3 3M4.997 11.314l-3 3M6.997 14.314v-3l1.5 1.523 1.5-1.523v3M12.163 11.314v3h1.84"/></svg>`;
|
|
2526
|
-
const Youtube1cIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 16 16" width="100%" height="100%" style="display: block;"><path fill-rule="evenodd" d="M13.47 3.299a1.771 1.771 0 0 1 1.238 1.263C15 5.675 15 8 15 8s0 2.325-.293 3.438a1.771 1.771 0 0 1-1.238 1.263C12.38 13 8 13 8 13s-4.378 0-5.47-.299a1.771 1.771 0 0 1-1.237-1.263C1 10.325 1 8 1 8s0-2.325.293-3.438A1.771 1.771 0 0 1 2.53 3.299C3.622 3 8 3 8 3s4.378 0 5.47.299Zm-3.232 4.7L6.6 10.144V5.857L10.238 8Z" clip-rule="evenodd"/></svg>`;
|
|
2527
|
-
const div = [
|
|
2528
|
-
{ property: "boxSizing", value: { type: "keyword", value: "border-box" } },
|
|
2529
|
-
{ property: "borderTopWidth", value: { type: "unit", unit: "px", value: 1 } },
|
|
2530
|
-
{
|
|
2531
|
-
property: "borderRightWidth",
|
|
2532
|
-
value: { type: "unit", unit: "px", value: 1 }
|
|
2533
|
-
},
|
|
2534
|
-
{
|
|
2535
|
-
property: "borderBottomWidth",
|
|
2536
|
-
value: { type: "unit", unit: "px", value: 1 }
|
|
2537
|
-
},
|
|
2538
|
-
{
|
|
2539
|
-
property: "borderLeftWidth",
|
|
2540
|
-
value: { type: "unit", unit: "px", value: 1 }
|
|
2541
|
-
},
|
|
2542
|
-
{ property: "outlineWidth", value: { type: "unit", unit: "px", value: 1 } }
|
|
2543
|
-
];
|
|
2544
|
-
const address = div;
|
|
2545
|
-
const article = div;
|
|
2546
|
-
const aside = div;
|
|
2547
|
-
const figure = div;
|
|
2548
|
-
const footer = div;
|
|
2549
|
-
const header = div;
|
|
2550
|
-
const main$1 = div;
|
|
2551
|
-
const nav = div;
|
|
2552
|
-
const section = div;
|
|
2553
|
-
const form = div;
|
|
2554
|
-
const label = div;
|
|
2555
|
-
const time = div;
|
|
2556
|
-
const h1 = div;
|
|
2557
|
-
const h2 = div;
|
|
2558
|
-
const h3 = div;
|
|
2559
|
-
const h4 = div;
|
|
2560
|
-
const h5 = div;
|
|
2561
|
-
const h6 = div;
|
|
2562
|
-
const i = div;
|
|
2563
|
-
const img = div;
|
|
2564
|
-
const a = div;
|
|
2565
|
-
const li = div;
|
|
2566
|
-
const ul = div;
|
|
2567
|
-
const ol = div;
|
|
2568
|
-
const p = div;
|
|
2569
|
-
const span = div;
|
|
2570
|
-
const html = [
|
|
2571
|
-
{ property: "display", value: { type: "keyword", value: "grid" } },
|
|
2572
|
-
{ property: "minHeight", value: { type: "unit", unit: "%", value: 100 } },
|
|
2573
|
-
{
|
|
2574
|
-
property: "fontFamily",
|
|
2575
|
-
value: { type: "fontFamily", value: ["Arial", "Roboto", "sans-serif"] }
|
|
2576
|
-
},
|
|
2577
|
-
{ property: "fontSize", value: { type: "unit", unit: "px", value: 16 } },
|
|
2578
|
-
{
|
|
2579
|
-
property: "lineHeight",
|
|
2580
|
-
value: { type: "unit", unit: "number", value: 1.2 }
|
|
2581
|
-
},
|
|
2582
|
-
{
|
|
2583
|
-
property: "whiteSpaceCollapse",
|
|
2584
|
-
value: { type: "keyword", value: "preserve" }
|
|
2585
|
-
}
|
|
2586
|
-
];
|
|
2587
|
-
const body = [
|
|
2588
|
-
{ property: "marginTop", value: { type: "unit", unit: "number", value: 0 } },
|
|
2589
|
-
{
|
|
2590
|
-
property: "marginRight",
|
|
2591
|
-
value: { type: "unit", unit: "number", value: 0 }
|
|
2592
|
-
},
|
|
2593
|
-
{
|
|
2594
|
-
property: "marginBottom",
|
|
2595
|
-
value: { type: "unit", unit: "number", value: 0 }
|
|
2596
|
-
},
|
|
2597
|
-
{ property: "marginLeft", value: { type: "unit", unit: "number", value: 0 } },
|
|
2598
|
-
{ property: "boxSizing", value: { type: "keyword", value: "border-box" } },
|
|
2599
|
-
{ property: "borderTopWidth", value: { type: "unit", unit: "px", value: 1 } },
|
|
2600
|
-
{
|
|
2601
|
-
property: "borderRightWidth",
|
|
2602
|
-
value: { type: "unit", unit: "px", value: 1 }
|
|
2603
|
-
},
|
|
2604
|
-
{
|
|
2605
|
-
property: "borderBottomWidth",
|
|
2606
|
-
value: { type: "unit", unit: "px", value: 1 }
|
|
2607
|
-
},
|
|
2608
|
-
{
|
|
2609
|
-
property: "borderLeftWidth",
|
|
2610
|
-
value: { type: "unit", unit: "px", value: 1 }
|
|
2611
|
-
}
|
|
2612
|
-
];
|
|
2613
|
-
const hr = [
|
|
2614
|
-
{ property: "height", value: { type: "unit", unit: "number", value: 0 } },
|
|
2615
|
-
{ property: "color", value: { type: "keyword", value: "inherit" } },
|
|
2616
|
-
{ property: "boxSizing", value: { type: "keyword", value: "border-box" } },
|
|
2617
|
-
{ property: "borderTopWidth", value: { type: "unit", unit: "px", value: 1 } },
|
|
2618
|
-
{
|
|
2619
|
-
property: "borderRightWidth",
|
|
2620
|
-
value: { type: "unit", unit: "px", value: 1 }
|
|
2621
|
-
},
|
|
2622
|
-
{
|
|
2623
|
-
property: "borderBottomWidth",
|
|
2624
|
-
value: { type: "unit", unit: "px", value: 1 }
|
|
2625
|
-
},
|
|
2626
|
-
{
|
|
2627
|
-
property: "borderLeftWidth",
|
|
2628
|
-
value: { type: "unit", unit: "px", value: 1 }
|
|
2629
|
-
}
|
|
2630
|
-
];
|
|
2631
|
-
const b = [
|
|
2632
|
-
{
|
|
2633
|
-
property: "fontWeight",
|
|
2634
|
-
value: { type: "unit", unit: "number", value: 700 }
|
|
2635
|
-
},
|
|
2636
|
-
{ property: "boxSizing", value: { type: "keyword", value: "border-box" } },
|
|
2637
|
-
{ property: "borderTopWidth", value: { type: "unit", unit: "px", value: 1 } },
|
|
2638
|
-
{
|
|
2639
|
-
property: "borderRightWidth",
|
|
2640
|
-
value: { type: "unit", unit: "px", value: 1 }
|
|
2641
|
-
},
|
|
2642
|
-
{
|
|
2643
|
-
property: "borderBottomWidth",
|
|
2644
|
-
value: { type: "unit", unit: "px", value: 1 }
|
|
2645
|
-
},
|
|
2646
|
-
{
|
|
2647
|
-
property: "borderLeftWidth",
|
|
2648
|
-
value: { type: "unit", unit: "px", value: 1 }
|
|
2649
|
-
}
|
|
2650
|
-
];
|
|
2651
|
-
const code = [
|
|
2652
|
-
{
|
|
2653
|
-
property: "fontFamily",
|
|
2654
|
-
value: {
|
|
2655
|
-
type: "fontFamily",
|
|
2656
|
-
value: [
|
|
2657
|
-
"ui-monospace",
|
|
2658
|
-
"SFMono-Regular",
|
|
2659
|
-
"Consolas",
|
|
2660
|
-
"Liberation Mono",
|
|
2661
|
-
"Menlo",
|
|
2662
|
-
"monospace"
|
|
2663
|
-
]
|
|
2664
|
-
}
|
|
2665
|
-
},
|
|
2666
|
-
{ property: "fontSize", value: { type: "unit", unit: "em", value: 1 } },
|
|
2667
|
-
{ property: "boxSizing", value: { type: "keyword", value: "border-box" } },
|
|
2668
|
-
{ property: "borderTopWidth", value: { type: "unit", unit: "px", value: 1 } },
|
|
2669
|
-
{
|
|
2670
|
-
property: "borderRightWidth",
|
|
2671
|
-
value: { type: "unit", unit: "px", value: 1 }
|
|
2672
|
-
},
|
|
2673
|
-
{
|
|
2674
|
-
property: "borderBottomWidth",
|
|
2675
|
-
value: { type: "unit", unit: "px", value: 1 }
|
|
2676
|
-
},
|
|
2677
|
-
{
|
|
2678
|
-
property: "borderLeftWidth",
|
|
2679
|
-
value: { type: "unit", unit: "px", value: 1 }
|
|
2680
|
-
}
|
|
2681
|
-
];
|
|
2682
|
-
const sub = [
|
|
2683
|
-
{ property: "fontSize", value: { type: "unit", unit: "%", value: 75 } },
|
|
2684
|
-
{ property: "lineHeight", value: { type: "unit", unit: "number", value: 0 } },
|
|
2685
|
-
{ property: "position", value: { type: "keyword", value: "relative" } },
|
|
2686
|
-
{ property: "verticalAlign", value: { type: "keyword", value: "baseline" } },
|
|
2687
|
-
{ property: "boxSizing", value: { type: "keyword", value: "border-box" } },
|
|
2688
|
-
{ property: "borderTopWidth", value: { type: "unit", unit: "px", value: 1 } },
|
|
2689
|
-
{
|
|
2690
|
-
property: "borderRightWidth",
|
|
2691
|
-
value: { type: "unit", unit: "px", value: 1 }
|
|
2692
|
-
},
|
|
2693
|
-
{
|
|
2694
|
-
property: "borderBottomWidth",
|
|
2695
|
-
value: { type: "unit", unit: "px", value: 1 }
|
|
2696
|
-
},
|
|
2697
|
-
{
|
|
2698
|
-
property: "borderLeftWidth",
|
|
2699
|
-
value: { type: "unit", unit: "px", value: 1 }
|
|
2700
|
-
},
|
|
2701
|
-
{ property: "bottom", value: { type: "unit", unit: "em", value: -0.25 } }
|
|
2702
|
-
];
|
|
2703
|
-
const sup = [
|
|
2704
|
-
{ property: "fontSize", value: { type: "unit", unit: "%", value: 75 } },
|
|
2705
|
-
{ property: "lineHeight", value: { type: "unit", unit: "number", value: 0 } },
|
|
2706
|
-
{ property: "position", value: { type: "keyword", value: "relative" } },
|
|
2707
|
-
{ property: "verticalAlign", value: { type: "keyword", value: "baseline" } },
|
|
2708
|
-
{ property: "boxSizing", value: { type: "keyword", value: "border-box" } },
|
|
2709
|
-
{ property: "borderTopWidth", value: { type: "unit", unit: "px", value: 1 } },
|
|
2710
|
-
{
|
|
2711
|
-
property: "borderRightWidth",
|
|
2712
|
-
value: { type: "unit", unit: "px", value: 1 }
|
|
2713
|
-
},
|
|
2714
|
-
{
|
|
2715
|
-
property: "borderBottomWidth",
|
|
2716
|
-
value: { type: "unit", unit: "px", value: 1 }
|
|
2717
|
-
},
|
|
2718
|
-
{
|
|
2719
|
-
property: "borderLeftWidth",
|
|
2720
|
-
value: { type: "unit", unit: "px", value: 1 }
|
|
2721
|
-
},
|
|
2722
|
-
{ property: "top", value: { type: "unit", unit: "em", value: -0.5 } }
|
|
2723
|
-
];
|
|
2724
|
-
const input = [
|
|
2725
|
-
{ property: "fontFamily", value: { type: "keyword", value: "inherit" } },
|
|
2726
|
-
{ property: "fontSize", value: { type: "unit", unit: "%", value: 100 } },
|
|
2727
|
-
{
|
|
2728
|
-
property: "lineHeight",
|
|
2729
|
-
value: { type: "unit", unit: "number", value: 1.15 }
|
|
2730
|
-
},
|
|
2731
|
-
{ property: "marginTop", value: { type: "unit", unit: "number", value: 0 } },
|
|
2732
|
-
{
|
|
2733
|
-
property: "marginRight",
|
|
2734
|
-
value: { type: "unit", unit: "number", value: 0 }
|
|
2735
|
-
},
|
|
2736
|
-
{
|
|
2737
|
-
property: "marginBottom",
|
|
2738
|
-
value: { type: "unit", unit: "number", value: 0 }
|
|
2739
|
-
},
|
|
2740
|
-
{ property: "marginLeft", value: { type: "unit", unit: "number", value: 0 } },
|
|
2741
|
-
{ property: "boxSizing", value: { type: "keyword", value: "border-box" } },
|
|
2742
|
-
{ property: "borderTopWidth", value: { type: "unit", unit: "px", value: 1 } },
|
|
2743
|
-
{
|
|
2744
|
-
property: "borderRightWidth",
|
|
2745
|
-
value: { type: "unit", unit: "px", value: 1 }
|
|
2746
|
-
},
|
|
2747
|
-
{
|
|
2748
|
-
property: "borderBottomWidth",
|
|
2749
|
-
value: { type: "unit", unit: "px", value: 1 }
|
|
2750
|
-
},
|
|
2751
|
-
{
|
|
2752
|
-
property: "borderLeftWidth",
|
|
2753
|
-
value: { type: "unit", unit: "px", value: 1 }
|
|
2754
|
-
},
|
|
2755
|
-
{ property: "borderTopStyle", value: { type: "keyword", value: "solid" } },
|
|
2756
|
-
{ property: "borderRightStyle", value: { type: "keyword", value: "solid" } },
|
|
2757
|
-
{ property: "borderBottomStyle", value: { type: "keyword", value: "solid" } },
|
|
2758
|
-
{ property: "borderLeftStyle", value: { type: "keyword", value: "solid" } }
|
|
2759
|
-
];
|
|
2760
|
-
const textarea = input;
|
|
2761
|
-
const radio = [
|
|
2762
|
-
{ property: "fontFamily", value: { type: "keyword", value: "inherit" } },
|
|
2763
|
-
{ property: "fontSize", value: { type: "unit", unit: "%", value: 100 } },
|
|
2764
|
-
{
|
|
2765
|
-
property: "lineHeight",
|
|
2766
|
-
value: { type: "unit", unit: "number", value: 1.15 }
|
|
2767
|
-
},
|
|
2768
|
-
{ property: "marginTop", value: { type: "unit", unit: "number", value: 0 } },
|
|
2769
|
-
{
|
|
2770
|
-
property: "marginRight",
|
|
2771
|
-
value: { type: "unit", unit: "number", value: 0 }
|
|
2772
|
-
},
|
|
2773
|
-
{
|
|
2774
|
-
property: "marginBottom",
|
|
2775
|
-
value: { type: "unit", unit: "number", value: 0 }
|
|
2776
|
-
},
|
|
2777
|
-
{ property: "marginLeft", value: { type: "unit", unit: "number", value: 0 } },
|
|
2778
|
-
{ property: "boxSizing", value: { type: "keyword", value: "border-box" } },
|
|
2779
|
-
{ property: "borderTopWidth", value: { type: "unit", unit: "px", value: 1 } },
|
|
2780
|
-
{
|
|
2781
|
-
property: "borderRightWidth",
|
|
2782
|
-
value: { type: "unit", unit: "px", value: 1 }
|
|
2783
|
-
},
|
|
2784
|
-
{
|
|
2785
|
-
property: "borderBottomWidth",
|
|
2786
|
-
value: { type: "unit", unit: "px", value: 1 }
|
|
2787
|
-
},
|
|
2788
|
-
{
|
|
2789
|
-
property: "borderLeftWidth",
|
|
2790
|
-
value: { type: "unit", unit: "px", value: 1 }
|
|
2791
|
-
},
|
|
2792
|
-
{ property: "borderTopStyle", value: { type: "keyword", value: "none" } },
|
|
2793
|
-
{ property: "borderRightStyle", value: { type: "keyword", value: "none" } },
|
|
2794
|
-
{ property: "borderBottomStyle", value: { type: "keyword", value: "none" } },
|
|
2795
|
-
{ property: "borderLeftStyle", value: { type: "keyword", value: "none" } }
|
|
2796
|
-
];
|
|
2797
|
-
const checkbox = radio;
|
|
2798
|
-
const button = [
|
|
2799
|
-
{ property: "fontFamily", value: { type: "keyword", value: "inherit" } },
|
|
2800
|
-
{ property: "fontSize", value: { type: "unit", unit: "%", value: 100 } },
|
|
2801
|
-
{
|
|
2802
|
-
property: "lineHeight",
|
|
2803
|
-
value: { type: "unit", unit: "number", value: 1.15 }
|
|
2804
|
-
},
|
|
2805
|
-
{ property: "marginTop", value: { type: "unit", unit: "number", value: 0 } },
|
|
2806
|
-
{
|
|
2807
|
-
property: "marginRight",
|
|
2808
|
-
value: { type: "unit", unit: "number", value: 0 }
|
|
2809
|
-
},
|
|
2810
|
-
{
|
|
2811
|
-
property: "marginBottom",
|
|
2812
|
-
value: { type: "unit", unit: "number", value: 0 }
|
|
2813
|
-
},
|
|
2814
|
-
{ property: "marginLeft", value: { type: "unit", unit: "number", value: 0 } },
|
|
2815
|
-
{ property: "boxSizing", value: { type: "keyword", value: "border-box" } },
|
|
2816
|
-
{ property: "borderTopWidth", value: { type: "unit", unit: "px", value: 1 } },
|
|
2817
|
-
{
|
|
2818
|
-
property: "borderRightWidth",
|
|
2819
|
-
value: { type: "unit", unit: "px", value: 1 }
|
|
2820
|
-
},
|
|
2821
|
-
{
|
|
2822
|
-
property: "borderBottomWidth",
|
|
2823
|
-
value: { type: "unit", unit: "px", value: 1 }
|
|
2824
|
-
},
|
|
2825
|
-
{
|
|
2826
|
-
property: "borderLeftWidth",
|
|
2827
|
-
value: { type: "unit", unit: "px", value: 1 }
|
|
2828
|
-
},
|
|
2829
|
-
{ property: "borderTopStyle", value: { type: "keyword", value: "solid" } },
|
|
2830
|
-
{ property: "borderRightStyle", value: { type: "keyword", value: "solid" } },
|
|
2831
|
-
{ property: "borderBottomStyle", value: { type: "keyword", value: "solid" } },
|
|
2832
|
-
{ property: "borderLeftStyle", value: { type: "keyword", value: "solid" } },
|
|
2833
|
-
{ property: "textTransform", value: { type: "keyword", value: "none" } }
|
|
2834
|
-
];
|
|
2835
|
-
const select = button;
|
|
2836
|
-
const rootComponent = "ws:root";
|
|
2837
|
-
const rootMeta = {
|
|
2838
|
-
category: "hidden",
|
|
2839
|
-
type: "container",
|
|
2840
|
-
label: "Global Root",
|
|
2841
|
-
icon: SettingsIcon,
|
|
2842
|
-
presetStyle: {
|
|
2843
|
-
html
|
|
2661
|
+
}
|
|
2662
|
+
const name2 = scope.getName(dataSource.id, dataSource.name);
|
|
2663
|
+
generatedVariables += ` const ${name2} = _props.system
|
|
2664
|
+
`;
|
|
2665
|
+
}
|
|
2844
2666
|
}
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
{
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
{
|
|
2860
|
-
name: "data",
|
|
2861
|
-
type: "json",
|
|
2862
|
-
value: [
|
|
2863
|
-
"Collection Item 1",
|
|
2864
|
-
"Collection Item 2",
|
|
2865
|
-
"Collection Item 3"
|
|
2866
|
-
]
|
|
2867
|
-
},
|
|
2868
|
-
{
|
|
2869
|
-
name: "item",
|
|
2870
|
-
type: "parameter",
|
|
2871
|
-
variableName: "collectionItem",
|
|
2872
|
-
variableAlias: "Collection Item"
|
|
2873
|
-
}
|
|
2874
|
-
],
|
|
2875
|
-
children: [
|
|
2876
|
-
{
|
|
2877
|
-
type: "instance",
|
|
2878
|
-
component: "Box",
|
|
2879
|
-
children: [
|
|
2880
|
-
{
|
|
2881
|
-
type: "instance",
|
|
2882
|
-
component: "Text",
|
|
2883
|
-
children: [{ type: "expression", value: "collectionItem" }]
|
|
2884
|
-
}
|
|
2885
|
-
]
|
|
2886
|
-
}
|
|
2887
|
-
]
|
|
2667
|
+
let generated = "";
|
|
2668
|
+
generated += `import type { System, ResourceRequest } from "@webstudio-is/sdk";
|
|
2669
|
+
`;
|
|
2670
|
+
generated += `export const getResources = (_props: { system: System }) => {
|
|
2671
|
+
`;
|
|
2672
|
+
generated += generatedVariables;
|
|
2673
|
+
generated += generatedRequests;
|
|
2674
|
+
generated += ` const _data = new Map<string, ResourceRequest>([
|
|
2675
|
+
`;
|
|
2676
|
+
for (const dataSource of dataSources.values()) {
|
|
2677
|
+
if (dataSource.type === "resource") {
|
|
2678
|
+
const name2 = scope.getName(dataSource.resourceId, dataSource.name);
|
|
2679
|
+
generated += ` ["${name2}", ${name2}],
|
|
2680
|
+
`;
|
|
2888
2681
|
}
|
|
2889
|
-
|
|
2682
|
+
}
|
|
2683
|
+
generated += ` ])
|
|
2684
|
+
`;
|
|
2685
|
+
generated += ` const _action = new Map<string, ResourceRequest>([
|
|
2686
|
+
`;
|
|
2687
|
+
for (const prop of props2.values()) {
|
|
2688
|
+
if (prop.type === "resource") {
|
|
2689
|
+
const name2 = scope.getName(prop.value, prop.name);
|
|
2690
|
+
generated += ` ["${name2}", ${name2}],
|
|
2691
|
+
`;
|
|
2692
|
+
}
|
|
2693
|
+
}
|
|
2694
|
+
generated += ` ])
|
|
2695
|
+
`;
|
|
2696
|
+
generated += ` return { data: _data, action: _action }
|
|
2697
|
+
`;
|
|
2698
|
+
generated += `}
|
|
2699
|
+
`;
|
|
2700
|
+
return generated;
|
|
2890
2701
|
};
|
|
2891
|
-
const
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2702
|
+
const getMethod = (value) => {
|
|
2703
|
+
switch (value == null ? void 0 : value.toLowerCase()) {
|
|
2704
|
+
case "get":
|
|
2705
|
+
return "get";
|
|
2706
|
+
case "delete":
|
|
2707
|
+
return "delete";
|
|
2708
|
+
case "put":
|
|
2709
|
+
return "put";
|
|
2710
|
+
default:
|
|
2711
|
+
return "post";
|
|
2900
2712
|
}
|
|
2901
2713
|
};
|
|
2902
|
-
const
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
|
|
2908
|
-
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
|
|
2714
|
+
const replaceFormActionsWithResources = ({
|
|
2715
|
+
props: props2,
|
|
2716
|
+
instances,
|
|
2717
|
+
resources
|
|
2718
|
+
}) => {
|
|
2719
|
+
var _a, _b;
|
|
2720
|
+
const formProps = /* @__PURE__ */ new Map();
|
|
2721
|
+
for (const prop of props2.values()) {
|
|
2722
|
+
if (prop.name === "method" && prop.type === "string" && ((_a = instances.get(prop.instanceId)) == null ? void 0 : _a.component) === "Form") {
|
|
2723
|
+
let data = formProps.get(prop.instanceId);
|
|
2724
|
+
if (data === void 0) {
|
|
2725
|
+
data = {};
|
|
2726
|
+
formProps.set(prop.instanceId, data);
|
|
2727
|
+
}
|
|
2728
|
+
data.method = prop.value;
|
|
2729
|
+
props2.delete(prop.id);
|
|
2730
|
+
}
|
|
2731
|
+
if (prop.name === "action" && prop.type === "string" && prop.value && ((_b = instances.get(prop.instanceId)) == null ? void 0 : _b.component) === "Form") {
|
|
2732
|
+
let data = formProps.get(prop.instanceId);
|
|
2733
|
+
if (data === void 0) {
|
|
2734
|
+
data = {};
|
|
2735
|
+
formProps.set(prop.instanceId, data);
|
|
2736
|
+
}
|
|
2737
|
+
data.action = prop.value;
|
|
2738
|
+
props2.set(prop.id, {
|
|
2739
|
+
id: prop.id,
|
|
2740
|
+
instanceId: prop.instanceId,
|
|
2741
|
+
name: prop.name,
|
|
2742
|
+
type: "resource",
|
|
2743
|
+
value: prop.instanceId
|
|
2744
|
+
});
|
|
2745
|
+
}
|
|
2746
|
+
}
|
|
2747
|
+
for (const [instanceId, { action, method }] of formProps) {
|
|
2748
|
+
if (action) {
|
|
2749
|
+
resources.set(instanceId, {
|
|
2750
|
+
id: instanceId,
|
|
2751
|
+
name: "action",
|
|
2752
|
+
method: getMethod(method),
|
|
2753
|
+
url: JSON.stringify(action),
|
|
2754
|
+
headers: []
|
|
2755
|
+
});
|
|
2756
|
+
}
|
|
2912
2757
|
}
|
|
2913
2758
|
};
|
|
2914
|
-
const
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
2759
|
+
const generatePageMeta = ({
|
|
2760
|
+
globalScope,
|
|
2761
|
+
page,
|
|
2762
|
+
dataSources,
|
|
2763
|
+
assets
|
|
2764
|
+
}) => {
|
|
2765
|
+
var _a;
|
|
2766
|
+
const localScope = createScope(["system", "resources"]);
|
|
2767
|
+
const usedDataSources = /* @__PURE__ */ new Map();
|
|
2768
|
+
const titleExpression = generateExpression({
|
|
2769
|
+
expression: page.title,
|
|
2770
|
+
dataSources,
|
|
2771
|
+
usedDataSources,
|
|
2772
|
+
scope: localScope
|
|
2773
|
+
});
|
|
2774
|
+
const descriptionExpression = generateExpression({
|
|
2775
|
+
expression: page.meta.description ?? "undefined",
|
|
2776
|
+
dataSources,
|
|
2777
|
+
usedDataSources,
|
|
2778
|
+
scope: localScope
|
|
2779
|
+
});
|
|
2780
|
+
const excludePageFromSearchExpression = generateExpression({
|
|
2781
|
+
expression: page.meta.excludePageFromSearch ?? "undefined",
|
|
2782
|
+
dataSources,
|
|
2783
|
+
usedDataSources,
|
|
2784
|
+
scope: localScope
|
|
2785
|
+
});
|
|
2786
|
+
const languageExpression = generateExpression({
|
|
2787
|
+
expression: page.meta.language ?? "undefined",
|
|
2788
|
+
dataSources,
|
|
2789
|
+
usedDataSources,
|
|
2790
|
+
scope: localScope
|
|
2791
|
+
});
|
|
2792
|
+
const socialImageAssetNameExpression = JSON.stringify(
|
|
2793
|
+
page.meta.socialImageAssetId ? (_a = assets.get(page.meta.socialImageAssetId)) == null ? void 0 : _a.name : void 0
|
|
2794
|
+
);
|
|
2795
|
+
const socialImageUrlExpression = generateExpression({
|
|
2796
|
+
expression: page.meta.socialImageUrl ?? "undefined",
|
|
2797
|
+
dataSources,
|
|
2798
|
+
usedDataSources,
|
|
2799
|
+
scope: localScope
|
|
2800
|
+
});
|
|
2801
|
+
const statusExpression = generateExpression({
|
|
2802
|
+
expression: page.meta.status ?? "undefined",
|
|
2803
|
+
dataSources,
|
|
2804
|
+
usedDataSources,
|
|
2805
|
+
scope: localScope
|
|
2806
|
+
});
|
|
2807
|
+
const redirectExpression = generateExpression({
|
|
2808
|
+
expression: page.meta.redirect ?? "undefined",
|
|
2809
|
+
dataSources,
|
|
2810
|
+
usedDataSources,
|
|
2811
|
+
scope: localScope
|
|
2812
|
+
});
|
|
2813
|
+
let customExpression = "";
|
|
2814
|
+
customExpression += `[
|
|
2815
|
+
`;
|
|
2816
|
+
for (const customMeta of page.meta.custom ?? []) {
|
|
2817
|
+
if (customMeta.property.trim().length === 0) {
|
|
2818
|
+
continue;
|
|
2927
2819
|
}
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
label: "Heading 3",
|
|
2976
|
-
props: [
|
|
2977
|
-
{
|
|
2978
|
-
name: "tag",
|
|
2979
|
-
type: "string",
|
|
2980
|
-
value: "h3"
|
|
2981
|
-
}
|
|
2982
|
-
],
|
|
2983
|
-
children: []
|
|
2984
|
-
},
|
|
2985
|
-
{
|
|
2986
|
-
component: "Heading",
|
|
2987
|
-
type: "instance",
|
|
2988
|
-
label: "Heading 4",
|
|
2989
|
-
props: [
|
|
2990
|
-
{
|
|
2991
|
-
name: "tag",
|
|
2992
|
-
type: "string",
|
|
2993
|
-
value: "h4"
|
|
2994
|
-
}
|
|
2995
|
-
],
|
|
2996
|
-
children: []
|
|
2997
|
-
},
|
|
2998
|
-
{
|
|
2999
|
-
component: "Heading",
|
|
3000
|
-
type: "instance",
|
|
3001
|
-
label: "Heading 5",
|
|
3002
|
-
props: [
|
|
3003
|
-
{
|
|
3004
|
-
name: "tag",
|
|
3005
|
-
type: "string",
|
|
3006
|
-
value: "h5"
|
|
3007
|
-
}
|
|
3008
|
-
],
|
|
3009
|
-
children: []
|
|
3010
|
-
},
|
|
3011
|
-
{
|
|
3012
|
-
component: "Heading",
|
|
3013
|
-
type: "instance",
|
|
3014
|
-
label: "Heading 6",
|
|
3015
|
-
props: [
|
|
3016
|
-
{
|
|
3017
|
-
name: "tag",
|
|
3018
|
-
type: "string",
|
|
3019
|
-
value: "h6"
|
|
3020
|
-
}
|
|
3021
|
-
],
|
|
3022
|
-
children: []
|
|
3023
|
-
},
|
|
3024
|
-
{
|
|
3025
|
-
component: "List",
|
|
3026
|
-
type: "instance",
|
|
3027
|
-
label: "List (Unordered)",
|
|
3028
|
-
children: [
|
|
3029
|
-
{
|
|
3030
|
-
component: "ListItem",
|
|
3031
|
-
type: "instance",
|
|
3032
|
-
children: []
|
|
3033
|
-
}
|
|
3034
|
-
]
|
|
3035
|
-
},
|
|
3036
|
-
{
|
|
3037
|
-
component: "List",
|
|
3038
|
-
type: "instance",
|
|
3039
|
-
label: "List (Ordered)",
|
|
3040
|
-
props: [
|
|
3041
|
-
{
|
|
3042
|
-
name: "ordered",
|
|
3043
|
-
type: "boolean",
|
|
3044
|
-
value: true
|
|
3045
|
-
}
|
|
3046
|
-
],
|
|
3047
|
-
children: [
|
|
3048
|
-
{
|
|
3049
|
-
component: "ListItem",
|
|
3050
|
-
type: "instance",
|
|
3051
|
-
children: []
|
|
3052
|
-
}
|
|
3053
|
-
]
|
|
3054
|
-
},
|
|
3055
|
-
{
|
|
3056
|
-
component: "Link",
|
|
3057
|
-
type: "instance",
|
|
3058
|
-
children: []
|
|
3059
|
-
},
|
|
3060
|
-
{
|
|
3061
|
-
component: "Image",
|
|
3062
|
-
type: "instance",
|
|
3063
|
-
styles: [
|
|
3064
|
-
{
|
|
3065
|
-
property: "marginRight",
|
|
3066
|
-
value: {
|
|
3067
|
-
type: "keyword",
|
|
3068
|
-
value: "auto"
|
|
3069
|
-
}
|
|
3070
|
-
},
|
|
3071
|
-
{
|
|
3072
|
-
property: "marginLeft",
|
|
3073
|
-
value: {
|
|
3074
|
-
type: "keyword",
|
|
3075
|
-
value: "auto"
|
|
3076
|
-
}
|
|
3077
|
-
},
|
|
3078
|
-
{
|
|
3079
|
-
property: "width",
|
|
3080
|
-
value: {
|
|
3081
|
-
type: "unit",
|
|
3082
|
-
unit: "%",
|
|
3083
|
-
value: 100
|
|
3084
|
-
}
|
|
3085
|
-
},
|
|
3086
|
-
{
|
|
3087
|
-
property: "height",
|
|
3088
|
-
value: {
|
|
3089
|
-
type: "keyword",
|
|
3090
|
-
value: "auto"
|
|
3091
|
-
}
|
|
3092
|
-
}
|
|
3093
|
-
],
|
|
3094
|
-
children: []
|
|
3095
|
-
},
|
|
3096
|
-
{
|
|
3097
|
-
component: "Separator",
|
|
3098
|
-
type: "instance",
|
|
3099
|
-
children: []
|
|
3100
|
-
},
|
|
3101
|
-
{
|
|
3102
|
-
component: "Blockquote",
|
|
3103
|
-
type: "instance",
|
|
3104
|
-
children: []
|
|
3105
|
-
},
|
|
3106
|
-
{
|
|
3107
|
-
component: "HtmlEmbed",
|
|
3108
|
-
type: "instance",
|
|
3109
|
-
children: []
|
|
3110
|
-
},
|
|
3111
|
-
{
|
|
3112
|
-
component: "CodeText",
|
|
3113
|
-
type: "instance",
|
|
3114
|
-
children: []
|
|
3115
|
-
}
|
|
3116
|
-
]
|
|
3117
|
-
},
|
|
3118
|
-
{
|
|
3119
|
-
type: "instance",
|
|
3120
|
-
component: "Paragraph",
|
|
3121
|
-
children: [
|
|
3122
|
-
{
|
|
3123
|
-
type: "text",
|
|
3124
|
-
value: "The Content Block component designates regions on the page where pre-styled instances can be inserted in "
|
|
3125
|
-
},
|
|
3126
|
-
{
|
|
3127
|
-
type: "instance",
|
|
3128
|
-
component: "RichTextLink",
|
|
3129
|
-
children: [
|
|
3130
|
-
{
|
|
3131
|
-
type: "text",
|
|
3132
|
-
value: "Content mode"
|
|
3133
|
-
}
|
|
3134
|
-
],
|
|
3135
|
-
props: [
|
|
3136
|
-
{
|
|
3137
|
-
type: "string",
|
|
3138
|
-
name: "href",
|
|
3139
|
-
value: "https://wstd.us/content-block"
|
|
3140
|
-
}
|
|
3141
|
-
]
|
|
3142
|
-
},
|
|
3143
|
-
{
|
|
3144
|
-
type: "text",
|
|
3145
|
-
value: "."
|
|
3146
|
-
}
|
|
3147
|
-
]
|
|
3148
|
-
},
|
|
3149
|
-
{
|
|
3150
|
-
type: "instance",
|
|
3151
|
-
component: "List",
|
|
3152
|
-
children: [
|
|
3153
|
-
{
|
|
3154
|
-
type: "instance",
|
|
3155
|
-
component: "ListItem",
|
|
3156
|
-
children: [
|
|
3157
|
-
{
|
|
3158
|
-
type: "text",
|
|
3159
|
-
value: "In Content mode, you can edit any direct child instances that were pre-added to the Content Block, as well as add new instances predefined in Templates."
|
|
3160
|
-
}
|
|
3161
|
-
]
|
|
3162
|
-
},
|
|
3163
|
-
{
|
|
3164
|
-
type: "instance",
|
|
3165
|
-
component: "ListItem",
|
|
3166
|
-
children: [
|
|
3167
|
-
{
|
|
3168
|
-
type: "text",
|
|
3169
|
-
value: "To predefine instances for insertion in Content mode, switch to Design mode and add them to the Templates container."
|
|
3170
|
-
}
|
|
3171
|
-
]
|
|
3172
|
-
},
|
|
3173
|
-
{
|
|
3174
|
-
type: "instance",
|
|
3175
|
-
component: "ListItem",
|
|
3176
|
-
children: [
|
|
3177
|
-
{
|
|
3178
|
-
type: "text",
|
|
3179
|
-
value: "To insert predefined instances in Content mode, click the + button while hovering over the Content Block on the canvas and choose an instance from the list."
|
|
3180
|
-
}
|
|
3181
|
-
]
|
|
3182
|
-
}
|
|
3183
|
-
]
|
|
3184
|
-
}
|
|
3185
|
-
]
|
|
2820
|
+
const propertyExpression = JSON.stringify(customMeta.property);
|
|
2821
|
+
const contentExpression = generateExpression({
|
|
2822
|
+
expression: customMeta.content,
|
|
2823
|
+
dataSources,
|
|
2824
|
+
usedDataSources,
|
|
2825
|
+
scope: localScope
|
|
2826
|
+
});
|
|
2827
|
+
customExpression += ` {
|
|
2828
|
+
`;
|
|
2829
|
+
customExpression += ` property: ${propertyExpression},
|
|
2830
|
+
`;
|
|
2831
|
+
customExpression += ` content: ${contentExpression},
|
|
2832
|
+
`;
|
|
2833
|
+
customExpression += ` },
|
|
2834
|
+
`;
|
|
2835
|
+
}
|
|
2836
|
+
customExpression += ` ]`;
|
|
2837
|
+
let generated = "";
|
|
2838
|
+
generated += `export const getPageMeta = ({
|
|
2839
|
+
`;
|
|
2840
|
+
generated += ` system,
|
|
2841
|
+
`;
|
|
2842
|
+
generated += ` resources,
|
|
2843
|
+
`;
|
|
2844
|
+
generated += `}: {
|
|
2845
|
+
`;
|
|
2846
|
+
generated += ` system: System;
|
|
2847
|
+
`;
|
|
2848
|
+
generated += ` resources: Record<string, any>;
|
|
2849
|
+
`;
|
|
2850
|
+
generated += `}): PageMeta => {
|
|
2851
|
+
`;
|
|
2852
|
+
for (const dataSource of usedDataSources.values()) {
|
|
2853
|
+
if (dataSource.type === "variable") {
|
|
2854
|
+
const valueName = localScope.getName(dataSource.id, dataSource.name);
|
|
2855
|
+
const initialValueString = JSON.stringify(dataSource.value.value);
|
|
2856
|
+
generated += ` let ${valueName} = ${initialValueString}
|
|
2857
|
+
`;
|
|
2858
|
+
continue;
|
|
2859
|
+
}
|
|
2860
|
+
if (dataSource.type === "parameter") {
|
|
2861
|
+
if (dataSource.id === page.systemDataSourceId) {
|
|
2862
|
+
const valueName = localScope.getName(dataSource.id, dataSource.name);
|
|
2863
|
+
generated += ` let ${valueName} = system
|
|
2864
|
+
`;
|
|
2865
|
+
}
|
|
2866
|
+
continue;
|
|
3186
2867
|
}
|
|
3187
|
-
|
|
3188
|
-
|
|
3189
|
-
const
|
|
3190
|
-
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
|
-
|
|
3194
|
-
|
|
2868
|
+
if (dataSource.type === "resource") {
|
|
2869
|
+
const valueName = localScope.getName(dataSource.id, dataSource.name);
|
|
2870
|
+
const resourceName = globalScope.getName(
|
|
2871
|
+
dataSource.resourceId,
|
|
2872
|
+
dataSource.name
|
|
2873
|
+
);
|
|
2874
|
+
generated += ` let ${valueName} = resources.${resourceName}
|
|
2875
|
+
`;
|
|
2876
|
+
continue;
|
|
2877
|
+
}
|
|
2878
|
+
}
|
|
2879
|
+
generated += ` return {
|
|
2880
|
+
`;
|
|
2881
|
+
generated += ` title: ${titleExpression},
|
|
2882
|
+
`;
|
|
2883
|
+
generated += ` description: ${descriptionExpression},
|
|
2884
|
+
`;
|
|
2885
|
+
generated += ` excludePageFromSearch: ${excludePageFromSearchExpression},
|
|
2886
|
+
`;
|
|
2887
|
+
generated += ` language: ${languageExpression},
|
|
2888
|
+
`;
|
|
2889
|
+
generated += ` socialImageAssetName: ${socialImageAssetNameExpression},
|
|
2890
|
+
`;
|
|
2891
|
+
generated += ` socialImageUrl: ${socialImageUrlExpression},
|
|
2892
|
+
`;
|
|
2893
|
+
generated += ` status: ${statusExpression},
|
|
2894
|
+
`;
|
|
2895
|
+
generated += ` redirect: ${redirectExpression},
|
|
2896
|
+
`;
|
|
2897
|
+
generated += ` custom: ${customExpression},
|
|
2898
|
+
`;
|
|
2899
|
+
generated += ` };
|
|
2900
|
+
`;
|
|
2901
|
+
generated += `};
|
|
2902
|
+
`;
|
|
2903
|
+
return generated;
|
|
3195
2904
|
};
|
|
3196
|
-
const isCoreComponent = (component) => component === rootComponent || component === collectionComponent || component === descendantComponent || component === blockComponent || component === blockTemplateComponent;
|
|
3197
2905
|
const createImageValueTransformer = (assets, { assetBaseUrl }) => (styleValue) => {
|
|
3198
2906
|
if (styleValue.type === "image" && styleValue.value.type === "asset") {
|
|
3199
2907
|
const asset = assets.get(styleValue.value.value);
|
|
@@ -3671,8 +3379,7 @@ ${indexAttribute}="${index}"`;
|
|
|
3671
3379
|
let conditionValue;
|
|
3672
3380
|
let collectionDataValue;
|
|
3673
3381
|
let collectionItemValue;
|
|
3674
|
-
|
|
3675
|
-
const classes = classMapArray !== void 0 ? [JSON.stringify(classMapArray.join(" "))] : [];
|
|
3382
|
+
let classNameValue;
|
|
3676
3383
|
for (const prop of props2.values()) {
|
|
3677
3384
|
if (prop.instanceId !== instance.id) {
|
|
3678
3385
|
continue;
|
|
@@ -3706,7 +3413,7 @@ ${indexAttribute}="${index}"`;
|
|
|
3706
3413
|
continue;
|
|
3707
3414
|
}
|
|
3708
3415
|
if (prop.name === "className" && propValue !== void 0) {
|
|
3709
|
-
|
|
3416
|
+
classNameValue = propValue;
|
|
3710
3417
|
continue;
|
|
3711
3418
|
}
|
|
3712
3419
|
if (propValue !== void 0) {
|
|
@@ -3714,9 +3421,16 @@ ${indexAttribute}="${index}"`;
|
|
|
3714
3421
|
${prop.name}={${propValue}}`;
|
|
3715
3422
|
}
|
|
3716
3423
|
}
|
|
3717
|
-
|
|
3718
|
-
|
|
3719
|
-
|
|
3424
|
+
const classMapArray = classesMap == null ? void 0 : classesMap.get(instance.id);
|
|
3425
|
+
if (classMapArray || classNameValue) {
|
|
3426
|
+
let classNameTemplate = classMapArray ? classMapArray.join(" ") : "";
|
|
3427
|
+
if (classNameValue) {
|
|
3428
|
+
if (classNameTemplate) {
|
|
3429
|
+
classNameTemplate += " ";
|
|
3430
|
+
}
|
|
3431
|
+
classNameTemplate += "${" + classNameValue + "}";
|
|
3432
|
+
}
|
|
3433
|
+
generatedProps += "\nclassName={`" + classNameTemplate + "`}";
|
|
3720
3434
|
}
|
|
3721
3435
|
let generatedElement = "";
|
|
3722
3436
|
if (instance.component === blockTemplateComponent) {
|
|
@@ -4077,15 +3791,15 @@ const htmlToJsx = (html2) => {
|
|
|
4077
3791
|
}
|
|
4078
3792
|
return result;
|
|
4079
3793
|
};
|
|
4080
|
-
const meta$
|
|
3794
|
+
const meta$I = {
|
|
4081
3795
|
category: "general",
|
|
4082
3796
|
type: "container",
|
|
4083
3797
|
description: "Slot is a container for content that you want to reference across the project. Changes made to a Slot's children will be reflected in all other instances of that Slot.",
|
|
4084
3798
|
icon: SlotComponentIcon,
|
|
4085
3799
|
stylable: false,
|
|
4086
|
-
order:
|
|
3800
|
+
order: 5
|
|
4087
3801
|
};
|
|
4088
|
-
const meta$
|
|
3802
|
+
const meta$H = {
|
|
4089
3803
|
type: "container",
|
|
4090
3804
|
icon: "",
|
|
4091
3805
|
stylable: false
|
|
@@ -4112,14 +3826,14 @@ const presetStyle$E = {
|
|
|
4112
3826
|
}
|
|
4113
3827
|
]
|
|
4114
3828
|
};
|
|
4115
|
-
const meta$
|
|
3829
|
+
const meta$G = {
|
|
4116
3830
|
category: "general",
|
|
4117
3831
|
type: "embed",
|
|
4118
3832
|
label: "HTML Embed",
|
|
4119
3833
|
description: "Used to add HTML code to the page, such as an SVG or script.",
|
|
4120
3834
|
icon: EmbedIcon,
|
|
4121
3835
|
presetStyle: presetStyle$E,
|
|
4122
|
-
order:
|
|
3836
|
+
order: 2
|
|
4123
3837
|
};
|
|
4124
3838
|
({
|
|
4125
3839
|
props: {
|
|
@@ -4142,7 +3856,7 @@ const meta$C = {
|
|
|
4142
3856
|
},
|
|
4143
3857
|
initialProps: ["className", "clientOnly", "executeScriptOnCanvas"]
|
|
4144
3858
|
});
|
|
4145
|
-
const meta$
|
|
3859
|
+
const meta$F = {
|
|
4146
3860
|
type: "embed",
|
|
4147
3861
|
icon: MarkdownEmbedIcon,
|
|
4148
3862
|
presetStyle: {
|
|
@@ -4171,7 +3885,7 @@ const presetStyle$D = {
|
|
|
4171
3885
|
}
|
|
4172
3886
|
]
|
|
4173
3887
|
};
|
|
4174
|
-
const meta$
|
|
3888
|
+
const meta$E = {
|
|
4175
3889
|
type: "container",
|
|
4176
3890
|
icon: BodyIcon,
|
|
4177
3891
|
states: defaultStates,
|
|
@@ -4189,7 +3903,7 @@ const presetStyle$C = {
|
|
|
4189
3903
|
nav,
|
|
4190
3904
|
section
|
|
4191
3905
|
};
|
|
4192
|
-
const meta$
|
|
3906
|
+
const meta$D = {
|
|
4193
3907
|
category: "general",
|
|
4194
3908
|
type: "container",
|
|
4195
3909
|
description: "A container for content. By default this is a Div, but the tag can be changed in settings.",
|
|
@@ -4207,7 +3921,7 @@ const presetStyle$B = {
|
|
|
4207
3921
|
}
|
|
4208
3922
|
]
|
|
4209
3923
|
};
|
|
4210
|
-
const meta$
|
|
3924
|
+
const meta$C = {
|
|
4211
3925
|
type: "container",
|
|
4212
3926
|
icon: TextIcon,
|
|
4213
3927
|
states: defaultStates,
|
|
@@ -4221,7 +3935,7 @@ const presetStyle$A = {
|
|
|
4221
3935
|
h5,
|
|
4222
3936
|
h6
|
|
4223
3937
|
};
|
|
4224
|
-
const meta$
|
|
3938
|
+
const meta$B = {
|
|
4225
3939
|
type: "container",
|
|
4226
3940
|
icon: HeadingIcon,
|
|
4227
3941
|
constraints: {
|
|
@@ -4234,7 +3948,7 @@ const meta$x = {
|
|
|
4234
3948
|
const presetStyle$z = {
|
|
4235
3949
|
p
|
|
4236
3950
|
};
|
|
4237
|
-
const meta$
|
|
3951
|
+
const meta$A = {
|
|
4238
3952
|
type: "container",
|
|
4239
3953
|
icon: TextAlignLeftIcon,
|
|
4240
3954
|
constraints: {
|
|
@@ -4253,7 +3967,7 @@ const presetStyle$y = {
|
|
|
4253
3967
|
}
|
|
4254
3968
|
]
|
|
4255
3969
|
};
|
|
4256
|
-
const meta$
|
|
3970
|
+
const meta$z = {
|
|
4257
3971
|
type: "container",
|
|
4258
3972
|
icon: LinkIcon,
|
|
4259
3973
|
constraints: {
|
|
@@ -4274,14 +3988,14 @@ const meta$v = {
|
|
|
4274
3988
|
}
|
|
4275
3989
|
]
|
|
4276
3990
|
};
|
|
4277
|
-
const meta$
|
|
4278
|
-
...meta$
|
|
3991
|
+
const meta$y = {
|
|
3992
|
+
...meta$z,
|
|
4279
3993
|
type: "rich-text-child"
|
|
4280
3994
|
};
|
|
4281
3995
|
const presetStyle$x = {
|
|
4282
3996
|
span
|
|
4283
3997
|
};
|
|
4284
|
-
const meta$
|
|
3998
|
+
const meta$x = {
|
|
4285
3999
|
type: "rich-text-child",
|
|
4286
4000
|
label: "Text",
|
|
4287
4001
|
icon: PaintBrushIcon,
|
|
@@ -4291,7 +4005,7 @@ const meta$t = {
|
|
|
4291
4005
|
const presetStyle$w = {
|
|
4292
4006
|
b
|
|
4293
4007
|
};
|
|
4294
|
-
const meta$
|
|
4008
|
+
const meta$w = {
|
|
4295
4009
|
type: "rich-text-child",
|
|
4296
4010
|
label: "Bold Text",
|
|
4297
4011
|
icon: BoldIcon,
|
|
@@ -4307,7 +4021,7 @@ const presetStyle$v = {
|
|
|
4307
4021
|
}
|
|
4308
4022
|
]
|
|
4309
4023
|
};
|
|
4310
|
-
const meta$
|
|
4024
|
+
const meta$v = {
|
|
4311
4025
|
type: "rich-text-child",
|
|
4312
4026
|
label: "Italic Text",
|
|
4313
4027
|
icon: TextItalicIcon,
|
|
@@ -4317,7 +4031,7 @@ const meta$r = {
|
|
|
4317
4031
|
const presetStyle$u = {
|
|
4318
4032
|
sup
|
|
4319
4033
|
};
|
|
4320
|
-
const meta$
|
|
4034
|
+
const meta$u = {
|
|
4321
4035
|
type: "rich-text-child",
|
|
4322
4036
|
label: "Superscript Text",
|
|
4323
4037
|
icon: SuperscriptIcon,
|
|
@@ -4327,7 +4041,7 @@ const meta$q = {
|
|
|
4327
4041
|
const presetStyle$t = {
|
|
4328
4042
|
sub
|
|
4329
4043
|
};
|
|
4330
|
-
const meta$
|
|
4044
|
+
const meta$t = {
|
|
4331
4045
|
type: "rich-text-child",
|
|
4332
4046
|
label: "Subscript Text",
|
|
4333
4047
|
icon: SubscriptIcon,
|
|
@@ -4337,7 +4051,7 @@ const meta$p = {
|
|
|
4337
4051
|
const presetStyle$s = {
|
|
4338
4052
|
button
|
|
4339
4053
|
};
|
|
4340
|
-
const meta$
|
|
4054
|
+
const meta$s = {
|
|
4341
4055
|
icon: ButtonElementIcon,
|
|
4342
4056
|
type: "container",
|
|
4343
4057
|
constraints: {
|
|
@@ -4360,7 +4074,7 @@ const presetStyle$r = {
|
|
|
4360
4074
|
}
|
|
4361
4075
|
]
|
|
4362
4076
|
};
|
|
4363
|
-
const meta$
|
|
4077
|
+
const meta$r = {
|
|
4364
4078
|
category: "forms",
|
|
4365
4079
|
constraints: {
|
|
4366
4080
|
relation: "ancestor",
|
|
@@ -4386,7 +4100,7 @@ const meta$n = {
|
|
|
4386
4100
|
//{ selector: ":read-write", label: "Read Write" },
|
|
4387
4101
|
]
|
|
4388
4102
|
};
|
|
4389
|
-
const meta$
|
|
4103
|
+
const meta$q = {
|
|
4390
4104
|
label: "Webhook Form",
|
|
4391
4105
|
icon: WebhookFormIcon,
|
|
4392
4106
|
type: "container",
|
|
@@ -4408,7 +4122,7 @@ const presetStyle$q = {
|
|
|
4408
4122
|
{ property: "minHeight", value: { type: "unit", unit: "px", value: 20 } }
|
|
4409
4123
|
]
|
|
4410
4124
|
};
|
|
4411
|
-
const meta$
|
|
4125
|
+
const meta$p = {
|
|
4412
4126
|
category: "forms",
|
|
4413
4127
|
type: "container",
|
|
4414
4128
|
label: "Form",
|
|
@@ -4445,7 +4159,7 @@ const presetStyle$p = {
|
|
|
4445
4159
|
}
|
|
4446
4160
|
]
|
|
4447
4161
|
};
|
|
4448
|
-
const meta$
|
|
4162
|
+
const meta$o = {
|
|
4449
4163
|
category: "media",
|
|
4450
4164
|
type: "embed",
|
|
4451
4165
|
description: "Add an image asset to the page. Webstudio automatically converts images to WebP or AVIF format and makes them responsive for best performance.",
|
|
@@ -4502,7 +4216,7 @@ const presetStyle$o = {
|
|
|
4502
4216
|
}
|
|
4503
4217
|
]
|
|
4504
4218
|
};
|
|
4505
|
-
const meta$
|
|
4219
|
+
const meta$n = {
|
|
4506
4220
|
type: "container",
|
|
4507
4221
|
icon: BlockquoteIcon,
|
|
4508
4222
|
states: defaultStates,
|
|
@@ -4540,7 +4254,7 @@ const presetStyle$n = {
|
|
|
4540
4254
|
}
|
|
4541
4255
|
]
|
|
4542
4256
|
};
|
|
4543
|
-
const meta$
|
|
4257
|
+
const meta$m = {
|
|
4544
4258
|
type: "container",
|
|
4545
4259
|
icon: ListIcon,
|
|
4546
4260
|
states: defaultStates,
|
|
@@ -4549,7 +4263,7 @@ const meta$i = {
|
|
|
4549
4263
|
const presetStyle$m = {
|
|
4550
4264
|
li
|
|
4551
4265
|
};
|
|
4552
|
-
const meta$
|
|
4266
|
+
const meta$l = {
|
|
4553
4267
|
type: "container",
|
|
4554
4268
|
constraints: {
|
|
4555
4269
|
// cannot use parent relation here
|
|
@@ -4591,14 +4305,14 @@ const presetStyle$l = {
|
|
|
4591
4305
|
}
|
|
4592
4306
|
]
|
|
4593
4307
|
};
|
|
4594
|
-
const meta$
|
|
4308
|
+
const meta$k = {
|
|
4595
4309
|
category: "general",
|
|
4596
4310
|
type: "embed",
|
|
4597
4311
|
description: "Used to visually divide sections of content, helping to improve readability and organization within a webpage.",
|
|
4598
4312
|
icon: MinusIcon,
|
|
4599
4313
|
states: defaultStates,
|
|
4600
4314
|
presetStyle: presetStyle$l,
|
|
4601
|
-
order:
|
|
4315
|
+
order: 3
|
|
4602
4316
|
};
|
|
4603
4317
|
const presetStyle$k = {
|
|
4604
4318
|
code: [
|
|
@@ -4629,7 +4343,7 @@ const presetStyle$k = {
|
|
|
4629
4343
|
}
|
|
4630
4344
|
]
|
|
4631
4345
|
};
|
|
4632
|
-
const meta$
|
|
4346
|
+
const meta$j = {
|
|
4633
4347
|
category: "general",
|
|
4634
4348
|
type: "embed",
|
|
4635
4349
|
description: "Use this component when you want to display code as text on the page.",
|
|
@@ -4640,7 +4354,7 @@ const meta$f = {
|
|
|
4640
4354
|
},
|
|
4641
4355
|
states: defaultStates,
|
|
4642
4356
|
presetStyle: presetStyle$k,
|
|
4643
|
-
order:
|
|
4357
|
+
order: 5
|
|
4644
4358
|
};
|
|
4645
4359
|
const presetStyle$j = {
|
|
4646
4360
|
label: [
|
|
@@ -4648,7 +4362,7 @@ const presetStyle$j = {
|
|
|
4648
4362
|
{ property: "display", value: { type: "keyword", value: "block" } }
|
|
4649
4363
|
]
|
|
4650
4364
|
};
|
|
4651
|
-
const meta$
|
|
4365
|
+
const meta$i = {
|
|
4652
4366
|
constraints: {
|
|
4653
4367
|
relation: "ancestor",
|
|
4654
4368
|
component: { $nin: ["Button", "Link"] }
|
|
@@ -4670,7 +4384,7 @@ const presetStyle$i = {
|
|
|
4670
4384
|
}
|
|
4671
4385
|
]
|
|
4672
4386
|
};
|
|
4673
|
-
const meta$
|
|
4387
|
+
const meta$h = {
|
|
4674
4388
|
category: "forms",
|
|
4675
4389
|
type: "control",
|
|
4676
4390
|
label: "Text Area",
|
|
@@ -4705,7 +4419,7 @@ const presetStyle$h = {
|
|
|
4705
4419
|
}
|
|
4706
4420
|
]
|
|
4707
4421
|
};
|
|
4708
|
-
const meta$
|
|
4422
|
+
const meta$g = {
|
|
4709
4423
|
constraints: {
|
|
4710
4424
|
relation: "ancestor",
|
|
4711
4425
|
component: { $nin: ["Button", "Link"] }
|
|
@@ -4735,7 +4449,7 @@ const presetStyle$g = {
|
|
|
4735
4449
|
}
|
|
4736
4450
|
]
|
|
4737
4451
|
};
|
|
4738
|
-
const meta$
|
|
4452
|
+
const meta$f = {
|
|
4739
4453
|
constraints: {
|
|
4740
4454
|
relation: "ancestor",
|
|
4741
4455
|
component: { $nin: ["Button", "Link"] }
|
|
@@ -4757,7 +4471,7 @@ const meta$b = {
|
|
|
4757
4471
|
const presetStyle$f = {
|
|
4758
4472
|
div
|
|
4759
4473
|
};
|
|
4760
|
-
const meta$
|
|
4474
|
+
const meta$e = {
|
|
4761
4475
|
type: "container",
|
|
4762
4476
|
icon: VimeoIcon,
|
|
4763
4477
|
states: defaultStates,
|
|
@@ -4770,9 +4484,9 @@ const meta$a = {
|
|
|
4770
4484
|
const presetStyle$e = {
|
|
4771
4485
|
div
|
|
4772
4486
|
};
|
|
4773
|
-
const meta$
|
|
4487
|
+
const meta$d = {
|
|
4774
4488
|
type: "container",
|
|
4775
|
-
icon:
|
|
4489
|
+
icon: YoutubeIcon,
|
|
4776
4490
|
states: defaultStates,
|
|
4777
4491
|
presetStyle: presetStyle$e,
|
|
4778
4492
|
constraints: {
|
|
@@ -4780,8 +4494,8 @@ const meta$9 = {
|
|
|
4780
4494
|
component: { $nin: ["Button", "Link", "Heading"] }
|
|
4781
4495
|
}
|
|
4782
4496
|
};
|
|
4783
|
-
const meta$
|
|
4784
|
-
...meta$
|
|
4497
|
+
const meta$c = {
|
|
4498
|
+
...meta$o,
|
|
4785
4499
|
category: "hidden",
|
|
4786
4500
|
label: "Preview Image",
|
|
4787
4501
|
constraints: {
|
|
@@ -4792,7 +4506,7 @@ const meta$8 = {
|
|
|
4792
4506
|
const presetStyle$d = {
|
|
4793
4507
|
button
|
|
4794
4508
|
};
|
|
4795
|
-
const meta$
|
|
4509
|
+
const meta$b = {
|
|
4796
4510
|
category: "hidden",
|
|
4797
4511
|
type: "container",
|
|
4798
4512
|
constraints: [
|
|
@@ -4813,7 +4527,7 @@ const meta$7 = {
|
|
|
4813
4527
|
const presetStyle$c = {
|
|
4814
4528
|
div
|
|
4815
4529
|
};
|
|
4816
|
-
const meta$
|
|
4530
|
+
const meta$a = {
|
|
4817
4531
|
type: "container",
|
|
4818
4532
|
constraints: {
|
|
4819
4533
|
relation: "ancestor",
|
|
@@ -4825,7 +4539,7 @@ const meta$6 = {
|
|
|
4825
4539
|
category: "hidden",
|
|
4826
4540
|
label: "Spinner"
|
|
4827
4541
|
};
|
|
4828
|
-
const meta$
|
|
4542
|
+
const meta$9 = {
|
|
4829
4543
|
category: "xml",
|
|
4830
4544
|
order: 6,
|
|
4831
4545
|
type: "container",
|
|
@@ -4833,7 +4547,7 @@ const meta$5 = {
|
|
|
4833
4547
|
stylable: false,
|
|
4834
4548
|
description: "XML Node"
|
|
4835
4549
|
};
|
|
4836
|
-
const meta$
|
|
4550
|
+
const meta$8 = {
|
|
4837
4551
|
category: "xml",
|
|
4838
4552
|
type: "container",
|
|
4839
4553
|
description: "Converts machine-readable date and time to ISO format.",
|
|
@@ -4844,7 +4558,7 @@ const meta$4 = {
|
|
|
4844
4558
|
const presetStyle$b = {
|
|
4845
4559
|
time
|
|
4846
4560
|
};
|
|
4847
|
-
const meta$
|
|
4561
|
+
const meta$7 = {
|
|
4848
4562
|
category: "localization",
|
|
4849
4563
|
type: "container",
|
|
4850
4564
|
description: "Converts machine-readable date and time to a human-readable format.",
|
|
@@ -4861,7 +4575,7 @@ const presetStyle$a = {
|
|
|
4861
4575
|
}
|
|
4862
4576
|
]
|
|
4863
4577
|
};
|
|
4864
|
-
const meta$
|
|
4578
|
+
const meta$6 = {
|
|
4865
4579
|
constraints: {
|
|
4866
4580
|
relation: "ancestor",
|
|
4867
4581
|
component: { $nin: ["Button", "Link"] }
|
|
@@ -4893,7 +4607,7 @@ const presetStyle$9 = {
|
|
|
4893
4607
|
}
|
|
4894
4608
|
]
|
|
4895
4609
|
};
|
|
4896
|
-
const meta$
|
|
4610
|
+
const meta$5 = {
|
|
4897
4611
|
category: "hidden",
|
|
4898
4612
|
constraints: {
|
|
4899
4613
|
relation: "parent",
|
|
@@ -4914,56 +4628,109 @@ const meta$1 = {
|
|
|
4914
4628
|
{ selector: ":disabled", label: "Disabled" }
|
|
4915
4629
|
]
|
|
4916
4630
|
};
|
|
4631
|
+
const meta$4 = {
|
|
4632
|
+
icon: HeaderIcon,
|
|
4633
|
+
type: "container",
|
|
4634
|
+
stylable: false,
|
|
4635
|
+
description: "Inserts children into the head of the document",
|
|
4636
|
+
constraints: [
|
|
4637
|
+
{
|
|
4638
|
+
relation: "ancestor",
|
|
4639
|
+
component: { $nin: ["HeadSlot"] }
|
|
4640
|
+
},
|
|
4641
|
+
{
|
|
4642
|
+
relation: "child",
|
|
4643
|
+
component: { $in: ["HeadLink", "HeadMeta", "HeadTitle"] }
|
|
4644
|
+
}
|
|
4645
|
+
]
|
|
4646
|
+
};
|
|
4647
|
+
const meta$3 = {
|
|
4648
|
+
category: "hidden",
|
|
4649
|
+
icon: ResourceIcon,
|
|
4650
|
+
type: "container",
|
|
4651
|
+
stylable: false,
|
|
4652
|
+
constraints: {
|
|
4653
|
+
relation: "parent",
|
|
4654
|
+
component: { $eq: "HeadSlot" }
|
|
4655
|
+
}
|
|
4656
|
+
};
|
|
4657
|
+
const meta$2 = {
|
|
4658
|
+
category: "hidden",
|
|
4659
|
+
icon: WindowInfoIcon,
|
|
4660
|
+
type: "container",
|
|
4661
|
+
stylable: false,
|
|
4662
|
+
constraints: {
|
|
4663
|
+
relation: "parent",
|
|
4664
|
+
component: { $eq: "HeadSlot" }
|
|
4665
|
+
}
|
|
4666
|
+
};
|
|
4667
|
+
const meta$1 = {
|
|
4668
|
+
category: "hidden",
|
|
4669
|
+
icon: WindowTitleIcon,
|
|
4670
|
+
type: "container",
|
|
4671
|
+
stylable: false,
|
|
4672
|
+
constraints: {
|
|
4673
|
+
relation: "parent",
|
|
4674
|
+
component: { $eq: "HeadSlot" }
|
|
4675
|
+
}
|
|
4676
|
+
};
|
|
4917
4677
|
const baseComponentMetas = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4918
4678
|
__proto__: null,
|
|
4919
|
-
Blockquote: meta$
|
|
4920
|
-
Body: meta$
|
|
4921
|
-
Bold: meta$
|
|
4922
|
-
Box: meta$
|
|
4923
|
-
Button: meta$
|
|
4924
|
-
Checkbox: meta$
|
|
4925
|
-
CodeText: meta$
|
|
4926
|
-
Form: meta$
|
|
4927
|
-
Fragment: meta$
|
|
4928
|
-
|
|
4929
|
-
|
|
4930
|
-
|
|
4931
|
-
|
|
4932
|
-
|
|
4933
|
-
|
|
4934
|
-
|
|
4935
|
-
|
|
4936
|
-
|
|
4937
|
-
|
|
4938
|
-
|
|
4939
|
-
|
|
4940
|
-
|
|
4941
|
-
|
|
4942
|
-
|
|
4943
|
-
|
|
4944
|
-
|
|
4945
|
-
|
|
4946
|
-
|
|
4947
|
-
|
|
4948
|
-
|
|
4949
|
-
|
|
4950
|
-
|
|
4951
|
-
|
|
4952
|
-
|
|
4953
|
-
|
|
4954
|
-
|
|
4955
|
-
|
|
4956
|
-
|
|
4957
|
-
|
|
4958
|
-
|
|
4679
|
+
Blockquote: meta$n,
|
|
4680
|
+
Body: meta$E,
|
|
4681
|
+
Bold: meta$w,
|
|
4682
|
+
Box: meta$D,
|
|
4683
|
+
Button: meta$s,
|
|
4684
|
+
Checkbox: meta$f,
|
|
4685
|
+
CodeText: meta$j,
|
|
4686
|
+
Form: meta$q,
|
|
4687
|
+
Fragment: meta$H,
|
|
4688
|
+
HeadLink: meta$3,
|
|
4689
|
+
HeadMeta: meta$2,
|
|
4690
|
+
HeadSlot: meta$4,
|
|
4691
|
+
HeadTitle: meta$1,
|
|
4692
|
+
Heading: meta$B,
|
|
4693
|
+
HtmlEmbed: meta$G,
|
|
4694
|
+
Image: meta$o,
|
|
4695
|
+
Input: meta$r,
|
|
4696
|
+
Italic: meta$v,
|
|
4697
|
+
Label: meta$i,
|
|
4698
|
+
Link: meta$z,
|
|
4699
|
+
List: meta$m,
|
|
4700
|
+
ListItem: meta$l,
|
|
4701
|
+
MarkdownEmbed: meta$F,
|
|
4702
|
+
Option: meta$5,
|
|
4703
|
+
Paragraph: meta$A,
|
|
4704
|
+
RadioButton: meta$g,
|
|
4705
|
+
RemixForm: meta$p,
|
|
4706
|
+
RichTextLink: meta$y,
|
|
4707
|
+
Select: meta$6,
|
|
4708
|
+
Separator: meta$k,
|
|
4709
|
+
Slot: meta$I,
|
|
4710
|
+
Span: meta$x,
|
|
4711
|
+
Subscript: meta$t,
|
|
4712
|
+
Superscript: meta$u,
|
|
4713
|
+
Text: meta$C,
|
|
4714
|
+
Textarea: meta$h,
|
|
4715
|
+
Time: meta$7,
|
|
4716
|
+
Vimeo: meta$e,
|
|
4717
|
+
VimeoPlayButton: meta$b,
|
|
4718
|
+
VimeoPreviewImage: meta$c,
|
|
4719
|
+
VimeoSpinner: meta$a,
|
|
4720
|
+
XmlNode: meta$9,
|
|
4721
|
+
XmlTime: meta$8,
|
|
4722
|
+
YouTube: meta$d
|
|
4723
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
4724
|
+
const animationComponentMetas = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4725
|
+
__proto__: null
|
|
4959
4726
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4960
4727
|
const remixComponentMetas = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4961
4728
|
__proto__: null,
|
|
4962
|
-
Body: meta$
|
|
4963
|
-
Form: meta$
|
|
4964
|
-
Link: meta$
|
|
4965
|
-
RemixForm: meta$
|
|
4966
|
-
RichTextLink: meta$
|
|
4729
|
+
Body: meta$E,
|
|
4730
|
+
Form: meta$q,
|
|
4731
|
+
Link: meta$z,
|
|
4732
|
+
RemixForm: meta$p,
|
|
4733
|
+
RichTextLink: meta$y
|
|
4967
4734
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4968
4735
|
const presetStyle$8 = {
|
|
4969
4736
|
div
|
|
@@ -5791,7 +5558,7 @@ const radixComponentMetas = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object
|
|
|
5791
5558
|
TooltipContent: metaTooltipContent,
|
|
5792
5559
|
TooltipTrigger: metaTooltipTrigger
|
|
5793
5560
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5794
|
-
const createFramework$
|
|
5561
|
+
const createFramework$2 = async () => {
|
|
5795
5562
|
const routeTemplatesDir = join("app", "route-templates");
|
|
5796
5563
|
const htmlTemplate = await readFile(
|
|
5797
5564
|
join(routeTemplatesDir, "html.tsx"),
|
|
@@ -5819,12 +5586,25 @@ const createFramework$1 = async () => {
|
|
|
5819
5586
|
new Set(Object.keys(radixComponentMetas))
|
|
5820
5587
|
);
|
|
5821
5588
|
}
|
|
5589
|
+
const animationComponentNamespacedMetas = {};
|
|
5590
|
+
for (const [name2, meta2] of Object.entries(animationComponentMetas)) {
|
|
5591
|
+
const namespace = "@webstudio-is/sdk-components-animation";
|
|
5592
|
+
animationComponentNamespacedMetas[`${namespace}:${name2}`] = namespaceMeta(
|
|
5593
|
+
meta2,
|
|
5594
|
+
namespace,
|
|
5595
|
+
new Set(Object.keys(animationComponentMetas))
|
|
5596
|
+
);
|
|
5597
|
+
}
|
|
5822
5598
|
return {
|
|
5823
5599
|
components: [
|
|
5824
5600
|
{
|
|
5825
5601
|
source: "@webstudio-is/sdk-components-react",
|
|
5826
5602
|
metas: baseComponentMetas
|
|
5827
5603
|
},
|
|
5604
|
+
{
|
|
5605
|
+
source: "@webstudio-is/sdk-components-animation",
|
|
5606
|
+
metas: animationComponentNamespacedMetas
|
|
5607
|
+
},
|
|
5828
5608
|
{
|
|
5829
5609
|
source: "@webstudio-is/sdk-components-react-radix",
|
|
5830
5610
|
metas: radixComponentNamespacedMetas
|
|
@@ -5864,6 +5644,87 @@ const createFramework$1 = async () => {
|
|
|
5864
5644
|
]
|
|
5865
5645
|
};
|
|
5866
5646
|
};
|
|
5647
|
+
const reactRouterComponentMetas = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5648
|
+
__proto__: null,
|
|
5649
|
+
Body: meta$E,
|
|
5650
|
+
Form: meta$q,
|
|
5651
|
+
Link: meta$z,
|
|
5652
|
+
RemixForm: meta$p,
|
|
5653
|
+
RichTextLink: meta$y
|
|
5654
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
5655
|
+
const createFramework$1 = async () => {
|
|
5656
|
+
const routeTemplatesDir = join("app", "route-templates");
|
|
5657
|
+
const htmlTemplate = await readFile(
|
|
5658
|
+
join(routeTemplatesDir, "html.tsx"),
|
|
5659
|
+
"utf8"
|
|
5660
|
+
);
|
|
5661
|
+
const xmlTemplate = await readFile(
|
|
5662
|
+
join(routeTemplatesDir, "xml.tsx"),
|
|
5663
|
+
"utf8"
|
|
5664
|
+
);
|
|
5665
|
+
const defaultSitemapTemplate = await readFile(
|
|
5666
|
+
join(routeTemplatesDir, "default-sitemap.tsx"),
|
|
5667
|
+
"utf8"
|
|
5668
|
+
);
|
|
5669
|
+
const redirectTemplate = await readFile(
|
|
5670
|
+
join(routeTemplatesDir, "redirect.tsx"),
|
|
5671
|
+
"utf8"
|
|
5672
|
+
);
|
|
5673
|
+
await rm(routeTemplatesDir, { recursive: true, force: true });
|
|
5674
|
+
const radixComponentNamespacedMetas = {};
|
|
5675
|
+
for (const [name2, meta2] of Object.entries(radixComponentMetas)) {
|
|
5676
|
+
const namespace = "@webstudio-is/sdk-components-react-radix";
|
|
5677
|
+
radixComponentNamespacedMetas[`${namespace}:${name2}`] = namespaceMeta(
|
|
5678
|
+
meta2,
|
|
5679
|
+
namespace,
|
|
5680
|
+
new Set(Object.keys(radixComponentMetas))
|
|
5681
|
+
);
|
|
5682
|
+
}
|
|
5683
|
+
return {
|
|
5684
|
+
components: [
|
|
5685
|
+
{
|
|
5686
|
+
source: "@webstudio-is/sdk-components-react",
|
|
5687
|
+
metas: baseComponentMetas
|
|
5688
|
+
},
|
|
5689
|
+
{
|
|
5690
|
+
source: "@webstudio-is/sdk-components-react-radix",
|
|
5691
|
+
metas: radixComponentNamespacedMetas
|
|
5692
|
+
},
|
|
5693
|
+
{
|
|
5694
|
+
source: "@webstudio-is/sdk-components-react-router",
|
|
5695
|
+
metas: reactRouterComponentMetas
|
|
5696
|
+
}
|
|
5697
|
+
],
|
|
5698
|
+
html: ({ pagePath }) => [
|
|
5699
|
+
{
|
|
5700
|
+
file: join("app", "routes", `${generateRemixRoute(pagePath)}.tsx`),
|
|
5701
|
+
template: htmlTemplate
|
|
5702
|
+
}
|
|
5703
|
+
],
|
|
5704
|
+
xml: ({ pagePath }) => [
|
|
5705
|
+
{
|
|
5706
|
+
file: join("app", "routes", `${generateRemixRoute(pagePath)}.tsx`),
|
|
5707
|
+
template: xmlTemplate
|
|
5708
|
+
}
|
|
5709
|
+
],
|
|
5710
|
+
redirect: ({ pagePath }) => [
|
|
5711
|
+
{
|
|
5712
|
+
file: join("app", "routes", `${generateRemixRoute(pagePath)}.ts`),
|
|
5713
|
+
template: redirectTemplate
|
|
5714
|
+
}
|
|
5715
|
+
],
|
|
5716
|
+
defaultSitemap: () => [
|
|
5717
|
+
{
|
|
5718
|
+
file: join(
|
|
5719
|
+
"app",
|
|
5720
|
+
"routes",
|
|
5721
|
+
`${generateRemixRoute("/sitemap.xml")}.tsx`
|
|
5722
|
+
),
|
|
5723
|
+
template: defaultSitemapTemplate
|
|
5724
|
+
}
|
|
5725
|
+
]
|
|
5726
|
+
};
|
|
5727
|
+
};
|
|
5867
5728
|
const generateVikeRoute = (pagePath) => {
|
|
5868
5729
|
if (pagePath === "/") {
|
|
5869
5730
|
return "index";
|
|
@@ -5894,12 +5755,25 @@ const createFramework = async () => {
|
|
|
5894
5755
|
new Set(Object.keys(radixComponentMetas))
|
|
5895
5756
|
);
|
|
5896
5757
|
}
|
|
5758
|
+
const animationComponentNamespacedMetas = {};
|
|
5759
|
+
for (const [name2, meta2] of Object.entries(animationComponentMetas)) {
|
|
5760
|
+
const namespace = "@webstudio-is/sdk-components-animation";
|
|
5761
|
+
animationComponentNamespacedMetas[`${namespace}:${name2}`] = namespaceMeta(
|
|
5762
|
+
meta2,
|
|
5763
|
+
namespace,
|
|
5764
|
+
new Set(Object.keys(animationComponentMetas))
|
|
5765
|
+
);
|
|
5766
|
+
}
|
|
5897
5767
|
return {
|
|
5898
5768
|
components: [
|
|
5899
5769
|
{
|
|
5900
5770
|
source: "@webstudio-is/sdk-components-react",
|
|
5901
5771
|
metas: baseComponentMetas
|
|
5902
5772
|
},
|
|
5773
|
+
{
|
|
5774
|
+
source: "@webstudio-is/sdk-components-animation",
|
|
5775
|
+
metas: animationComponentNamespacedMetas
|
|
5776
|
+
},
|
|
5903
5777
|
{
|
|
5904
5778
|
source: "@webstudio-is/sdk-components-react-radix",
|
|
5905
5779
|
metas: radixComponentNamespacedMetas
|
|
@@ -6045,8 +5919,10 @@ Please check webstudio --help for more details`
|
|
|
6045
5919
|
let framework;
|
|
6046
5920
|
if (options.template.includes("ssg")) {
|
|
6047
5921
|
framework = await createFramework();
|
|
6048
|
-
} else {
|
|
5922
|
+
} else if (options.template.includes("react-router-docker")) {
|
|
6049
5923
|
framework = await createFramework$1();
|
|
5924
|
+
} else {
|
|
5925
|
+
framework = await createFramework$2();
|
|
6050
5926
|
}
|
|
6051
5927
|
const constants2 = await import(pathToFileURL(join(cwd(), "app/constants.mjs")).href);
|
|
6052
5928
|
const { assetBaseUrl } = constants2;
|
|
@@ -6597,7 +6473,7 @@ const getDeploymentInstructions = (deployTarget) => {
|
|
|
6597
6473
|
}
|
|
6598
6474
|
};
|
|
6599
6475
|
const name = "webstudio";
|
|
6600
|
-
const version = "0.
|
|
6476
|
+
const version = "0.199.0";
|
|
6601
6477
|
const description = "Webstudio CLI";
|
|
6602
6478
|
const author = "Webstudio <github@webstudio.is>";
|
|
6603
6479
|
const homepage = "https://webstudio.is";
|
|
@@ -6649,6 +6525,7 @@ const dependencies = {
|
|
|
6649
6525
|
const devDependencies = {
|
|
6650
6526
|
"@netlify/remix-adapter": "^2.5.1",
|
|
6651
6527
|
"@netlify/remix-edge-adapter": "3.4.2",
|
|
6528
|
+
"@react-router/dev": "^7.1.1",
|
|
6652
6529
|
"@remix-run/cloudflare": "^2.15.2",
|
|
6653
6530
|
"@remix-run/cloudflare-pages": "^2.15.2",
|
|
6654
6531
|
"@remix-run/dev": "^2.15.2",
|
|
@@ -6663,16 +6540,21 @@ const devDependencies = {
|
|
|
6663
6540
|
"@webstudio-is/image": "workspace:*",
|
|
6664
6541
|
"@webstudio-is/react-sdk": "workspace:*",
|
|
6665
6542
|
"@webstudio-is/sdk": "workspace:*",
|
|
6543
|
+
"@webstudio-is/sdk-components-animation": "workspace:*",
|
|
6666
6544
|
"@webstudio-is/sdk-components-react": "workspace:*",
|
|
6667
6545
|
"@webstudio-is/sdk-components-react-radix": "workspace:*",
|
|
6668
6546
|
"@webstudio-is/sdk-components-react-remix": "workspace:*",
|
|
6547
|
+
"@webstudio-is/sdk-components-react-router": "workspace:*",
|
|
6669
6548
|
"@webstudio-is/tsconfig": "workspace:*",
|
|
6549
|
+
h3: "^1.13.1",
|
|
6550
|
+
ipx: "^3.0.1",
|
|
6670
6551
|
prettier: "3.4.2",
|
|
6671
6552
|
"react-dom": "18.3.0-canary-14898b6a9-20240318",
|
|
6553
|
+
"react-router": "^7.1.1",
|
|
6672
6554
|
"ts-expect": "^1.3.0",
|
|
6673
6555
|
vike: "^0.4.210",
|
|
6674
6556
|
vite: "^5.4.11",
|
|
6675
|
-
vitest: "^
|
|
6557
|
+
vitest: "^3.0.2",
|
|
6676
6558
|
wrangler: "^3.63.2"
|
|
6677
6559
|
};
|
|
6678
6560
|
const packageJson = {
|