@webstudio-is/react-sdk 0.51.0 → 0.52.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/cjs/components/{blockquote.cjs → blockquote.js} +2 -1
- package/lib/cjs/components/{blockquote.ws.cjs → blockquote.ws.js} +57 -35
- package/lib/cjs/components/{body.cjs → body.js} +2 -1
- package/lib/cjs/components/{body.ws.cjs → body.ws.js} +30 -46
- package/lib/cjs/components/{bold.cjs → bold.js} +2 -1
- package/lib/cjs/components/{bold.ws.cjs → bold.ws.js} +6 -1
- package/lib/cjs/components/{box.ws.cjs → box.ws.js} +11 -4
- package/lib/cjs/components/{button.cjs → button.js} +2 -1
- package/lib/cjs/components/{button.ws.cjs → button.ws.js} +6 -1
- package/lib/cjs/components/{code.cjs → code.js} +1 -0
- package/lib/cjs/components/{code.ws.cjs → code.ws.js} +31 -25
- package/lib/cjs/components/{form.cjs → form.js} +2 -1
- package/lib/cjs/components/{form.ws.cjs → form.ws.js} +8 -8
- package/lib/cjs/components/{heading.ws.cjs → heading.ws.js} +11 -1
- package/lib/cjs/components/{image.cjs → image.js} +2 -1
- package/lib/cjs/components/{image.ws.cjs → image.ws.js} +15 -11
- package/lib/cjs/components/{input.cjs → input.js} +2 -1
- package/lib/cjs/components/{input.ws.cjs → input.ws.js} +6 -1
- package/lib/cjs/components/{italic.cjs → italic.js} +2 -1
- package/lib/cjs/components/{italic.ws.cjs → italic.ws.js} +8 -4
- package/lib/cjs/components/{link-block.cjs → link-block.js} +3 -1
- package/lib/cjs/components/{link-block.ws.cjs → link-block.ws.js} +7 -7
- package/lib/cjs/components/{link.cjs → link.js} +3 -1
- package/lib/cjs/components/{link.ws.cjs → link.ws.js} +13 -9
- package/lib/cjs/components/{list-item.cjs → list-item.js} +2 -1
- package/lib/cjs/components/{list-item.ws.cjs → list-item.ws.js} +6 -1
- package/lib/cjs/components/{list.ws.cjs → list.ws.js} +29 -10
- package/lib/cjs/components/{paragraph.cjs → paragraph.js} +2 -1
- package/lib/cjs/components/{paragraph.ws.cjs → paragraph.ws.js} +6 -1
- package/lib/cjs/components/{separator.cjs → separator.js} +2 -1
- package/lib/cjs/components/{separator.ws.cjs → separator.ws.js} +27 -11
- package/lib/cjs/components/{span.cjs → span.js} +2 -1
- package/lib/cjs/components/{span.ws.cjs → span.ws.js} +6 -1
- package/lib/cjs/components/{subscript.cjs → subscript.js} +2 -1
- package/lib/cjs/components/{subscript.ws.cjs → subscript.ws.js} +6 -1
- package/lib/cjs/components/{superscript.cjs → superscript.js} +2 -1
- package/lib/cjs/components/{superscript.ws.cjs → superscript.ws.js} +6 -1
- package/lib/cjs/components/{text-block.cjs → text-block.js} +2 -1
- package/lib/cjs/components/{text-block.ws.cjs → text-block.ws.js} +9 -5
- package/lib/cjs/css/css.js +64 -0
- package/lib/cjs/css/global-rules.js +37 -0
- package/lib/cjs/css/{index.cjs → index.js} +3 -1
- package/lib/cjs/css/normalize-type-check.js +26 -0
- package/lib/cjs/css/normalize.js +358 -0
- package/lib/cjs/css/presets.js +61 -0
- package/lib/cjs/css/style-rules.js +62 -0
- package/lib/cjs/package.json +1 -0
- package/lib/cjs/pubsub/{create.cjs → create.js} +6 -35
- package/lib/cjs/pubsub/raf-queue.js +45 -0
- package/lib/cjs/tree/{webstudio-component.cjs → webstudio-component.js} +1 -0
- package/lib/components/blockquote.js +2 -1
- package/lib/components/blockquote.ws.js +57 -35
- package/lib/components/body.js +2 -1
- package/lib/components/body.ws.js +30 -46
- package/lib/components/bold.js +2 -1
- package/lib/components/bold.ws.js +7 -2
- package/lib/components/box.ws.js +22 -4
- package/lib/components/button.js +2 -1
- package/lib/components/button.ws.js +7 -2
- package/lib/components/code.js +1 -0
- package/lib/components/code.ws.js +31 -25
- package/lib/components/form.js +2 -1
- package/lib/components/form.ws.js +8 -8
- package/lib/components/heading.ws.js +11 -1
- package/lib/components/image.js +2 -1
- package/lib/components/image.ws.js +15 -11
- package/lib/components/input.js +2 -1
- package/lib/components/input.ws.js +7 -2
- package/lib/components/italic.js +2 -1
- package/lib/components/italic.ws.js +9 -5
- package/lib/components/link-block.js +3 -1
- package/lib/components/link-block.ws.js +7 -7
- package/lib/components/link.js +3 -1
- package/lib/components/link.ws.js +14 -10
- package/lib/components/list-item.js +2 -1
- package/lib/components/list-item.ws.js +6 -1
- package/lib/components/list.ws.js +29 -10
- package/lib/components/paragraph.js +2 -1
- package/lib/components/paragraph.ws.js +6 -1
- package/lib/components/separator.js +2 -1
- package/lib/components/separator.ws.js +27 -11
- package/lib/components/span.js +2 -1
- package/lib/components/span.ws.js +7 -2
- package/lib/components/subscript.js +2 -1
- package/lib/components/subscript.ws.js +6 -1
- package/lib/components/superscript.js +2 -1
- package/lib/components/superscript.ws.js +6 -1
- package/lib/components/text-block.js +2 -1
- package/lib/components/text-block.ws.js +10 -6
- package/lib/css/css.js +44 -0
- package/lib/css/get-browser-style.js +3 -1
- package/lib/css/global-rules.js +20 -0
- package/lib/css/index.js +3 -1
- package/lib/css/normalize-type-check.js +3 -0
- package/lib/css/normalize.js +338 -0
- package/lib/css/presets.js +41 -0
- package/lib/css/style-rules.js +42 -0
- package/lib/pubsub/create.js +6 -25
- package/lib/pubsub/raf-queue.js +25 -0
- package/lib/tree/webstudio-component.js +1 -0
- package/lib/types/app/custom-components/image.d.ts +6 -0
- package/lib/types/app/custom-components/index.d.ts +26 -0
- package/lib/types/app/custom-components/link-block.d.ts +6 -0
- package/lib/types/app/custom-components/link.d.ts +6 -0
- package/lib/types/app/custom-components/rich-text-link.d.ts +6 -0
- package/lib/types/app/custom-components/shared/remix-link.d.ts +10 -0
- package/lib/types/app/handle-request.server.d.ts +2 -0
- package/lib/types/app/index.d.ts +3 -0
- package/lib/types/app/params.d.ts +5 -0
- package/lib/types/app/root.d.ts +8 -0
- package/lib/types/components/__generated__/blockquote.props.d.ts +2 -0
- package/lib/types/components/__generated__/body.props.d.ts +2 -0
- package/lib/types/components/__generated__/bold.props.d.ts +2 -0
- package/lib/types/components/__generated__/box.props.d.ts +2 -0
- package/lib/types/components/__generated__/button.props.d.ts +2 -0
- package/lib/types/components/__generated__/code.props.d.ts +2 -0
- package/lib/types/components/__generated__/form.props.d.ts +2 -0
- package/lib/types/components/__generated__/fragment.props.d.ts +2 -0
- package/lib/types/components/__generated__/heading.props.d.ts +2 -0
- package/lib/types/components/__generated__/image.props.d.ts +2 -0
- package/lib/types/components/__generated__/input.props.d.ts +2 -0
- package/lib/types/components/__generated__/italic.props.d.ts +2 -0
- package/lib/types/components/__generated__/link-block.props.d.ts +2 -0
- package/lib/types/components/__generated__/link.props.d.ts +2 -0
- package/lib/types/components/__generated__/list-item.props.d.ts +2 -0
- package/lib/types/components/__generated__/list.props.d.ts +2 -0
- package/lib/types/components/__generated__/paragraph.props.d.ts +2 -0
- package/lib/types/components/__generated__/rich-text-link.props.d.ts +2 -0
- package/lib/types/components/__generated__/separator.props.d.ts +2 -0
- package/lib/types/components/__generated__/slot.props.d.ts +2 -0
- package/lib/types/components/__generated__/span.props.d.ts +2 -0
- package/lib/types/components/__generated__/subscript.props.d.ts +2 -0
- package/lib/types/components/__generated__/superscript.props.d.ts +2 -0
- package/lib/types/components/__generated__/text-block.props.d.ts +2 -0
- package/lib/types/components/blockquote.d.ts +3 -0
- package/lib/types/components/blockquote.stories.d.ts +5 -0
- package/lib/types/components/blockquote.ws.d.ts +3 -0
- package/lib/types/components/body.d.ts +3 -0
- package/lib/types/components/body.stories.d.ts +6 -0
- package/lib/types/components/body.ws.d.ts +3 -0
- package/lib/types/components/bold.d.ts +3 -0
- package/lib/types/components/bold.stories.d.ts +5 -0
- package/lib/types/components/bold.ws.d.ts +3 -0
- package/lib/types/components/box.d.ts +7 -0
- package/lib/types/components/box.stories.d.ts +9 -0
- package/lib/types/components/box.ws.d.ts +3 -0
- package/lib/types/components/button.d.ts +7 -0
- package/lib/types/components/button.stories.d.ts +9 -0
- package/lib/types/components/button.ws.d.ts +3 -0
- package/lib/types/components/code.d.ts +9 -0
- package/lib/types/components/code.stories.d.ts +11 -0
- package/lib/types/components/code.ws.d.ts +3 -0
- package/lib/types/components/component-meta.d.ts +605 -0
- package/lib/types/components/components-utils.d.ts +34 -0
- package/lib/types/components/components.d.ts +31 -0
- package/lib/types/components/form.d.ts +3 -0
- package/lib/types/components/form.stories.d.ts +5 -0
- package/lib/types/components/form.ws.d.ts +3 -0
- package/lib/types/components/fragment.d.ts +6 -0
- package/lib/types/components/fragment.ws.d.ts +3 -0
- package/lib/types/components/heading.d.ts +7 -0
- package/lib/types/components/heading.stories.d.ts +9 -0
- package/lib/types/components/heading.ws.d.ts +3 -0
- package/lib/types/components/image.d.ts +3 -0
- package/lib/types/components/image.stories.d.ts +5 -0
- package/lib/types/components/image.ws.d.ts +3 -0
- package/lib/types/components/index.d.ts +17 -0
- package/lib/types/components/input.d.ts +3 -0
- package/lib/types/components/input.stories.d.ts +5 -0
- package/lib/types/components/input.ws.d.ts +3 -0
- package/lib/types/components/italic.d.ts +3 -0
- package/lib/types/components/italic.stories.d.ts +5 -0
- package/lib/types/components/italic.ws.d.ts +3 -0
- package/lib/types/components/link-block.d.ts +3 -0
- package/lib/types/components/link-block.stories.d.ts +13 -0
- package/lib/types/components/link-block.ws.d.ts +3 -0
- package/lib/types/components/link.d.ts +9 -0
- package/lib/types/components/link.stories.d.ts +13 -0
- package/lib/types/components/link.ws.d.ts +3 -0
- package/lib/types/components/list-item.d.ts +3 -0
- package/lib/types/components/list-item.stories.d.ts +5 -0
- package/lib/types/components/list-item.ws.d.ts +3 -0
- package/lib/types/components/list.d.ts +9 -0
- package/lib/types/components/list.stories.d.ts +9 -0
- package/lib/types/components/list.ws.d.ts +3 -0
- package/lib/types/components/paragraph.d.ts +3 -0
- package/lib/types/components/paragraph.stories.d.ts +5 -0
- package/lib/types/components/paragraph.ws.d.ts +3 -0
- package/lib/types/components/rich-text-link.d.ts +2 -0
- package/lib/types/components/rich-text-link.stories.d.ts +13 -0
- package/lib/types/components/rich-text-link.ws.d.ts +3 -0
- package/lib/types/components/separator.d.ts +3 -0
- package/lib/types/components/separator.stories.d.ts +5 -0
- package/lib/types/components/separator.ws.d.ts +3 -0
- package/lib/types/components/slot.d.ts +6 -0
- package/lib/types/components/slot.stories.d.ts +9 -0
- package/lib/types/components/slot.ws.d.ts +3 -0
- package/lib/types/components/span.d.ts +3 -0
- package/lib/types/components/span.stories.d.ts +5 -0
- package/lib/types/components/span.ws.d.ts +3 -0
- package/lib/types/components/subscript.d.ts +3 -0
- package/lib/types/components/subscript.stories.d.ts +5 -0
- package/lib/types/components/subscript.ws.d.ts +3 -0
- package/lib/types/components/superscript.d.ts +3 -0
- package/lib/types/components/superscript.stories.d.ts +5 -0
- package/lib/types/components/superscript.ws.d.ts +3 -0
- package/lib/types/components/text-block.d.ts +3 -0
- package/lib/types/components/text-block.stories.d.ts +5 -0
- package/lib/types/components/text-block.ws.d.ts +3 -0
- package/lib/types/context.d.ts +9 -0
- package/lib/types/css/css.d.ts +10 -0
- package/lib/types/css/get-browser-style.d.ts +2 -0
- package/lib/types/css/global-rules.d.ts +44 -0
- package/lib/types/css/index.d.ts +4 -0
- package/lib/types/css/normalize-type-check.d.ts +1 -0
- package/lib/types/css/normalize.d.ts +2429 -0
- package/lib/types/css/presets.d.ts +38 -0
- package/lib/types/css/style-rules.d.ts +248 -0
- package/lib/types/css/style-rules.test.d.ts +1 -0
- package/lib/types/index.d.ts +9 -0
- package/lib/types/props.d.ts +97 -0
- package/lib/types/props.test.d.ts +1 -0
- package/lib/types/pubsub/create.d.ts +28 -0
- package/lib/types/pubsub/index.d.ts +1 -0
- package/lib/types/pubsub/raf-queue.d.ts +1 -0
- package/lib/types/tree/create-elements-tree.d.ts +16 -0
- package/lib/types/tree/index.d.ts +3 -0
- package/lib/types/tree/root.d.ts +25 -0
- package/lib/types/tree/session-storage-polyfill.d.ts +2 -0
- package/lib/types/tree/webstudio-component.d.ts +15 -0
- package/package.json +20 -19
- package/src/components/blockquote.tsx +1 -1
- package/src/components/blockquote.ws.tsx +63 -36
- package/src/components/body.tsx +1 -1
- package/src/components/body.ws.tsx +39 -47
- package/src/components/bold.tsx +1 -1
- package/src/components/bold.ws.tsx +10 -2
- package/src/components/box.ws.ts +28 -5
- package/src/components/button.tsx +1 -1
- package/src/components/button.ws.tsx +10 -2
- package/src/components/code.tsx +1 -1
- package/src/components/code.ws.tsx +36 -28
- package/src/components/component-meta.ts +4 -1
- package/src/components/form.tsx +1 -1
- package/src/components/form.ws.tsx +11 -9
- package/src/components/heading.ws.tsx +16 -0
- package/src/components/image.tsx +1 -1
- package/src/components/image.ws.tsx +19 -12
- package/src/components/input.tsx +1 -1
- package/src/components/input.ws.tsx +10 -2
- package/src/components/italic.tsx +1 -1
- package/src/components/italic.ws.tsx +12 -6
- package/src/components/link-block.tsx +1 -0
- package/src/components/link-block.ws.tsx +10 -8
- package/src/components/link.tsx +2 -0
- package/src/components/link.ws.tsx +17 -11
- package/src/components/list-item.tsx +1 -1
- package/src/components/list-item.ws.tsx +8 -0
- package/src/components/list.tsx +2 -0
- package/src/components/list.ws.tsx +32 -11
- package/src/components/paragraph.tsx +1 -1
- package/src/components/paragraph.ws.tsx +8 -0
- package/src/components/separator.tsx +1 -1
- package/src/components/separator.ws.tsx +33 -12
- package/src/components/span.tsx +1 -1
- package/src/components/span.ws.tsx +10 -2
- package/src/components/subscript.tsx +1 -1
- package/src/components/subscript.ws.tsx +8 -0
- package/src/components/superscript.tsx +1 -1
- package/src/components/superscript.ws.tsx +8 -0
- package/src/components/text-block.tsx +1 -1
- package/src/components/text-block.ws.tsx +14 -7
- package/src/context.tsx +2 -1
- package/src/css/css.ts +57 -0
- package/src/css/get-browser-style.ts +6 -1
- package/src/css/global-rules.ts +29 -0
- package/src/css/index.ts +3 -1
- package/src/css/normalize-type-check.ts +13 -0
- package/src/css/normalize.ts +519 -0
- package/src/css/presets.ts +42 -0
- package/src/css/style-rules.test.ts +147 -0
- package/src/css/style-rules.ts +66 -0
- package/src/props.ts +0 -2
- package/src/pubsub/create.ts +7 -38
- package/src/pubsub/raf-queue.ts +31 -0
- package/src/tree/create-elements-tree.tsx +2 -1
- package/src/tree/webstudio-component.tsx +1 -0
- package/lib/cjs/css/categories.cjs +0 -250
- package/lib/css/categories.js +0 -230
- package/src/css/categories.ts +0 -254
- /package/lib/cjs/app/custom-components/{image.cjs → image.js} +0 -0
- /package/lib/cjs/app/custom-components/{index.cjs → index.js} +0 -0
- /package/lib/cjs/app/custom-components/{link-block.cjs → link-block.js} +0 -0
- /package/lib/cjs/app/custom-components/{link.cjs → link.js} +0 -0
- /package/lib/cjs/app/custom-components/{rich-text-link.cjs → rich-text-link.js} +0 -0
- /package/lib/cjs/app/custom-components/shared/{remix-link.cjs → remix-link.js} +0 -0
- /package/lib/cjs/app/{handle-request.server.cjs → handle-request.server.js} +0 -0
- /package/lib/cjs/app/{index.cjs → index.js} +0 -0
- /package/lib/cjs/app/{params.cjs → params.js} +0 -0
- /package/lib/cjs/app/{root.cjs → root.js} +0 -0
- /package/lib/cjs/components/__generated__/{blockquote.props.cjs → blockquote.props.js} +0 -0
- /package/lib/cjs/components/__generated__/{body.props.cjs → body.props.js} +0 -0
- /package/lib/cjs/components/__generated__/{bold.props.cjs → bold.props.js} +0 -0
- /package/lib/cjs/components/__generated__/{box.props.cjs → box.props.js} +0 -0
- /package/lib/cjs/components/__generated__/{button.props.cjs → button.props.js} +0 -0
- /package/lib/cjs/components/__generated__/{code.props.cjs → code.props.js} +0 -0
- /package/lib/cjs/components/__generated__/{form.props.cjs → form.props.js} +0 -0
- /package/lib/cjs/components/__generated__/{fragment.props.cjs → fragment.props.js} +0 -0
- /package/lib/cjs/components/__generated__/{heading.props.cjs → heading.props.js} +0 -0
- /package/lib/cjs/components/__generated__/{image.props.cjs → image.props.js} +0 -0
- /package/lib/cjs/components/__generated__/{input.props.cjs → input.props.js} +0 -0
- /package/lib/cjs/components/__generated__/{italic.props.cjs → italic.props.js} +0 -0
- /package/lib/cjs/components/__generated__/{link-block.props.cjs → link-block.props.js} +0 -0
- /package/lib/cjs/components/__generated__/{link.props.cjs → link.props.js} +0 -0
- /package/lib/cjs/components/__generated__/{list-item.props.cjs → list-item.props.js} +0 -0
- /package/lib/cjs/components/__generated__/{list.props.cjs → list.props.js} +0 -0
- /package/lib/cjs/components/__generated__/{paragraph.props.cjs → paragraph.props.js} +0 -0
- /package/lib/cjs/components/__generated__/{rich-text-link.props.cjs → rich-text-link.props.js} +0 -0
- /package/lib/cjs/components/__generated__/{separator.props.cjs → separator.props.js} +0 -0
- /package/lib/cjs/components/__generated__/{slot.props.cjs → slot.props.js} +0 -0
- /package/lib/cjs/components/__generated__/{span.props.cjs → span.props.js} +0 -0
- /package/lib/cjs/components/__generated__/{subscript.props.cjs → subscript.props.js} +0 -0
- /package/lib/cjs/components/__generated__/{superscript.props.cjs → superscript.props.js} +0 -0
- /package/lib/cjs/components/__generated__/{text-block.props.cjs → text-block.props.js} +0 -0
- /package/lib/cjs/components/{box.cjs → box.js} +0 -0
- /package/lib/cjs/components/{component-meta.cjs → component-meta.js} +0 -0
- /package/lib/cjs/components/{components-utils.cjs → components-utils.js} +0 -0
- /package/lib/cjs/components/{components.cjs → components.js} +0 -0
- /package/lib/cjs/components/{fragment.cjs → fragment.js} +0 -0
- /package/lib/cjs/components/{fragment.ws.cjs → fragment.ws.js} +0 -0
- /package/lib/cjs/components/{heading.cjs → heading.js} +0 -0
- /package/lib/cjs/components/{index.cjs → index.js} +0 -0
- /package/lib/cjs/components/{list.cjs → list.js} +0 -0
- /package/lib/cjs/components/{rich-text-link.cjs → rich-text-link.js} +0 -0
- /package/lib/cjs/components/{rich-text-link.ws.cjs → rich-text-link.ws.js} +0 -0
- /package/lib/cjs/components/{slot.cjs → slot.js} +0 -0
- /package/lib/cjs/components/{slot.ws.cjs → slot.ws.js} +0 -0
- /package/lib/cjs/{context.cjs → context.js} +0 -0
- /package/lib/cjs/css/{get-browser-style.cjs → get-browser-style.js} +0 -0
- /package/lib/cjs/{index.cjs → index.js} +0 -0
- /package/lib/cjs/{props.cjs → props.js} +0 -0
- /package/lib/cjs/pubsub/{index.cjs → index.js} +0 -0
- /package/lib/cjs/tree/{create-elements-tree.cjs → create-elements-tree.js} +0 -0
- /package/lib/cjs/tree/{index.cjs → index.js} +0 -0
- /package/lib/cjs/tree/{root.cjs → root.js} +0 -0
- /package/lib/cjs/tree/{session-storage-polyfill.cjs → session-storage-polyfill.js} +0 -0
|
@@ -23,13 +23,18 @@ __export(list_item_ws_exports, {
|
|
|
23
23
|
});
|
|
24
24
|
module.exports = __toCommonJS(list_item_ws_exports);
|
|
25
25
|
var import_icons = require("@webstudio-is/icons");
|
|
26
|
+
var import_normalize = require("../css/normalize");
|
|
26
27
|
var import_list_item = require("./__generated__/list-item.props");
|
|
28
|
+
const presetStyle = {
|
|
29
|
+
li: import_normalize.li
|
|
30
|
+
};
|
|
27
31
|
const meta = {
|
|
28
32
|
category: "typography",
|
|
29
33
|
type: "rich-text",
|
|
30
34
|
label: "List Item",
|
|
31
35
|
Icon: import_icons.ListItemIcon,
|
|
32
|
-
children: ["List Item you can edit"]
|
|
36
|
+
children: ["List Item you can edit"],
|
|
37
|
+
presetStyle
|
|
33
38
|
};
|
|
34
39
|
const propsMeta = {
|
|
35
40
|
props: import_list_item.props
|
|
@@ -24,18 +24,37 @@ __export(list_ws_exports, {
|
|
|
24
24
|
module.exports = __toCommonJS(list_ws_exports);
|
|
25
25
|
var import_icons = require("@webstudio-is/icons");
|
|
26
26
|
var import_list = require("./__generated__/list.props");
|
|
27
|
+
var import_normalize = require("../css/normalize");
|
|
27
28
|
const presetStyle = {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
ol: {
|
|
30
|
+
...import_normalize.ol,
|
|
31
|
+
marginTop: {
|
|
32
|
+
type: "keyword",
|
|
33
|
+
value: "0"
|
|
34
|
+
},
|
|
35
|
+
marginBottom: {
|
|
36
|
+
type: "keyword",
|
|
37
|
+
value: "10px"
|
|
38
|
+
},
|
|
39
|
+
paddingLeft: {
|
|
40
|
+
type: "keyword",
|
|
41
|
+
value: "40px"
|
|
42
|
+
}
|
|
31
43
|
},
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
44
|
+
ul: {
|
|
45
|
+
...import_normalize.ul,
|
|
46
|
+
marginTop: {
|
|
47
|
+
type: "keyword",
|
|
48
|
+
value: "0"
|
|
49
|
+
},
|
|
50
|
+
marginBottom: {
|
|
51
|
+
type: "keyword",
|
|
52
|
+
value: "10px"
|
|
53
|
+
},
|
|
54
|
+
paddingLeft: {
|
|
55
|
+
type: "keyword",
|
|
56
|
+
value: "40px"
|
|
57
|
+
}
|
|
39
58
|
}
|
|
40
59
|
};
|
|
41
60
|
const meta = {
|
|
@@ -18,7 +18,8 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
var paragraph_exports = {};
|
|
20
20
|
__export(paragraph_exports, {
|
|
21
|
-
Paragraph: () => Paragraph
|
|
21
|
+
Paragraph: () => Paragraph,
|
|
22
|
+
defaultTag: () => defaultTag
|
|
22
23
|
});
|
|
23
24
|
module.exports = __toCommonJS(paragraph_exports);
|
|
24
25
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
@@ -23,13 +23,18 @@ __export(paragraph_ws_exports, {
|
|
|
23
23
|
});
|
|
24
24
|
module.exports = __toCommonJS(paragraph_ws_exports);
|
|
25
25
|
var import_icons = require("@webstudio-is/icons");
|
|
26
|
+
var import_normalize = require("../css/normalize");
|
|
26
27
|
var import_paragraph = require("./__generated__/paragraph.props");
|
|
28
|
+
const presetStyle = {
|
|
29
|
+
p: import_normalize.p
|
|
30
|
+
};
|
|
27
31
|
const meta = {
|
|
28
32
|
category: "typography",
|
|
29
33
|
type: "rich-text",
|
|
30
34
|
label: "Paragraph",
|
|
31
35
|
Icon: import_icons.TextAlignLeftIcon,
|
|
32
|
-
children: ["Pragraph you can edit"]
|
|
36
|
+
children: ["Pragraph you can edit"],
|
|
37
|
+
presetStyle
|
|
33
38
|
};
|
|
34
39
|
const propsMeta = {
|
|
35
40
|
props: import_paragraph.props
|
|
@@ -18,7 +18,8 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
var separator_exports = {};
|
|
20
20
|
__export(separator_exports, {
|
|
21
|
-
Separator: () => Separator
|
|
21
|
+
Separator: () => Separator,
|
|
22
|
+
defaultTag: () => defaultTag
|
|
22
23
|
});
|
|
23
24
|
module.exports = __toCommonJS(separator_exports);
|
|
24
25
|
var import_react = require("react");
|
|
@@ -24,18 +24,34 @@ __export(separator_ws_exports, {
|
|
|
24
24
|
module.exports = __toCommonJS(separator_ws_exports);
|
|
25
25
|
var import_icons = require("@webstudio-is/icons");
|
|
26
26
|
var import_separator = require("./__generated__/separator.props");
|
|
27
|
+
var import_normalize = require("../css/normalize");
|
|
27
28
|
const presetStyle = {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
29
|
+
hr: {
|
|
30
|
+
...import_normalize.hr,
|
|
31
|
+
height: {
|
|
32
|
+
type: "keyword",
|
|
33
|
+
value: "1px"
|
|
34
|
+
},
|
|
35
|
+
backgroundColor: {
|
|
36
|
+
type: "keyword",
|
|
37
|
+
value: "gray"
|
|
38
|
+
},
|
|
39
|
+
borderTopStyle: {
|
|
40
|
+
type: "keyword",
|
|
41
|
+
value: "none"
|
|
42
|
+
},
|
|
43
|
+
borderRightStyle: {
|
|
44
|
+
type: "keyword",
|
|
45
|
+
value: "none"
|
|
46
|
+
},
|
|
47
|
+
borderLeftStyle: {
|
|
48
|
+
type: "keyword",
|
|
49
|
+
value: "none"
|
|
50
|
+
},
|
|
51
|
+
borderBottomStyle: {
|
|
52
|
+
type: "keyword",
|
|
53
|
+
value: "none"
|
|
54
|
+
}
|
|
39
55
|
}
|
|
40
56
|
};
|
|
41
57
|
const meta = {
|
|
@@ -18,7 +18,8 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
var span_exports = {};
|
|
20
20
|
__export(span_exports, {
|
|
21
|
-
Span: () => Span
|
|
21
|
+
Span: () => Span,
|
|
22
|
+
defaultTag: () => defaultTag
|
|
22
23
|
});
|
|
23
24
|
module.exports = __toCommonJS(span_exports);
|
|
24
25
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
@@ -23,11 +23,16 @@ __export(span_ws_exports, {
|
|
|
23
23
|
});
|
|
24
24
|
module.exports = __toCommonJS(span_ws_exports);
|
|
25
25
|
var import_icons = require("@webstudio-is/icons");
|
|
26
|
+
var import_normalize = require("../css/normalize");
|
|
26
27
|
var import_span = require("./__generated__/span.props");
|
|
28
|
+
const presetStyle = {
|
|
29
|
+
span: import_normalize.span
|
|
30
|
+
};
|
|
27
31
|
const meta = {
|
|
28
32
|
type: "rich-text-child",
|
|
29
33
|
label: "Styled Text",
|
|
30
|
-
Icon: import_icons.
|
|
34
|
+
Icon: import_icons.PaintBrushIcon,
|
|
35
|
+
presetStyle
|
|
31
36
|
};
|
|
32
37
|
const propsMeta = {
|
|
33
38
|
props: import_span.props
|
|
@@ -18,7 +18,8 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
var subscript_exports = {};
|
|
20
20
|
__export(subscript_exports, {
|
|
21
|
-
Subscript: () => Subscript
|
|
21
|
+
Subscript: () => Subscript,
|
|
22
|
+
defaultTag: () => defaultTag
|
|
22
23
|
});
|
|
23
24
|
module.exports = __toCommonJS(subscript_exports);
|
|
24
25
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
@@ -23,11 +23,16 @@ __export(subscript_ws_exports, {
|
|
|
23
23
|
});
|
|
24
24
|
module.exports = __toCommonJS(subscript_ws_exports);
|
|
25
25
|
var import_icons = require("@webstudio-is/icons");
|
|
26
|
+
var import_normalize = require("../css/normalize");
|
|
26
27
|
var import_subscript = require("./__generated__/subscript.props");
|
|
28
|
+
const presetStyle = {
|
|
29
|
+
sub: import_normalize.sub
|
|
30
|
+
};
|
|
27
31
|
const meta = {
|
|
28
32
|
type: "rich-text-child",
|
|
29
33
|
label: "Subscript Text",
|
|
30
|
-
Icon: import_icons.SubscriptIcon
|
|
34
|
+
Icon: import_icons.SubscriptIcon,
|
|
35
|
+
presetStyle
|
|
31
36
|
};
|
|
32
37
|
const propsMeta = {
|
|
33
38
|
props: import_subscript.props
|
|
@@ -18,7 +18,8 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
var superscript_exports = {};
|
|
20
20
|
__export(superscript_exports, {
|
|
21
|
-
Superscript: () => Superscript
|
|
21
|
+
Superscript: () => Superscript,
|
|
22
|
+
defaultTag: () => defaultTag
|
|
22
23
|
});
|
|
23
24
|
module.exports = __toCommonJS(superscript_exports);
|
|
24
25
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
@@ -23,11 +23,16 @@ __export(superscript_ws_exports, {
|
|
|
23
23
|
});
|
|
24
24
|
module.exports = __toCommonJS(superscript_ws_exports);
|
|
25
25
|
var import_icons = require("@webstudio-is/icons");
|
|
26
|
+
var import_normalize = require("../css/normalize");
|
|
26
27
|
var import_superscript = require("./__generated__/superscript.props");
|
|
28
|
+
const presetStyle = {
|
|
29
|
+
sup: import_normalize.sup
|
|
30
|
+
};
|
|
27
31
|
const meta = {
|
|
28
32
|
type: "rich-text-child",
|
|
29
33
|
label: "Superscript Text",
|
|
30
|
-
Icon: import_icons.SuperscriptIcon
|
|
34
|
+
Icon: import_icons.SuperscriptIcon,
|
|
35
|
+
presetStyle
|
|
31
36
|
};
|
|
32
37
|
const propsMeta = {
|
|
33
38
|
props: import_superscript.props
|
|
@@ -18,7 +18,8 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
var text_block_exports = {};
|
|
20
20
|
__export(text_block_exports, {
|
|
21
|
-
TextBlock: () => TextBlock
|
|
21
|
+
TextBlock: () => TextBlock,
|
|
22
|
+
defaultTag: () => defaultTag
|
|
22
23
|
});
|
|
23
24
|
module.exports = __toCommonJS(text_block_exports);
|
|
24
25
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
@@ -24,18 +24,22 @@ __export(text_block_ws_exports, {
|
|
|
24
24
|
module.exports = __toCommonJS(text_block_ws_exports);
|
|
25
25
|
var import_icons = require("@webstudio-is/icons");
|
|
26
26
|
var import_text_block = require("./__generated__/text-block.props");
|
|
27
|
+
var import_normalize = require("../css/normalize");
|
|
27
28
|
const presetStyle = {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
div: {
|
|
30
|
+
...import_normalize.div,
|
|
31
|
+
minHeight: {
|
|
32
|
+
type: "unit",
|
|
33
|
+
unit: "em",
|
|
34
|
+
value: 1
|
|
35
|
+
}
|
|
32
36
|
}
|
|
33
37
|
};
|
|
34
38
|
const meta = {
|
|
35
39
|
category: "typography",
|
|
36
40
|
type: "rich-text",
|
|
37
41
|
label: "Text Block",
|
|
38
|
-
Icon: import_icons.
|
|
42
|
+
Icon: import_icons.TextBlockIcon,
|
|
39
43
|
presetStyle,
|
|
40
44
|
children: ["Block of text you can edit"]
|
|
41
45
|
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var css_exports = {};
|
|
20
|
+
__export(css_exports, {
|
|
21
|
+
generateCssText: () => generateCssText
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(css_exports);
|
|
24
|
+
var import_css_engine = require("@webstudio-is/css-engine");
|
|
25
|
+
var import_components_utils = require("../components/components-utils");
|
|
26
|
+
var import_components = require("../components");
|
|
27
|
+
var import_tree = require("../tree");
|
|
28
|
+
var import_global_rules = require("./global-rules");
|
|
29
|
+
var import_style_rules = require("./style-rules");
|
|
30
|
+
const generateCssText = (data) => {
|
|
31
|
+
const assets = new Map(
|
|
32
|
+
data.assets.map((asset) => [asset.id, asset])
|
|
33
|
+
);
|
|
34
|
+
const breakpoints = new Map(data.breakpoints);
|
|
35
|
+
const styles = new Map(data.styles);
|
|
36
|
+
const styleSourceSelections = new Map(data.styleSourceSelections);
|
|
37
|
+
const engine = (0, import_css_engine.createCssEngine)({ name: "ssr" });
|
|
38
|
+
(0, import_global_rules.addGlobalRules)(engine, { assets });
|
|
39
|
+
for (const breakpoint of breakpoints.values()) {
|
|
40
|
+
engine.addMediaRule(breakpoint.id, breakpoint);
|
|
41
|
+
}
|
|
42
|
+
for (const component of (0, import_components_utils.getComponentNames)()) {
|
|
43
|
+
const meta = (0, import_components.getComponentMeta)(component);
|
|
44
|
+
const presetStyle = meta?.presetStyle;
|
|
45
|
+
if (presetStyle !== void 0) {
|
|
46
|
+
for (const [tag, style] of Object.entries(presetStyle)) {
|
|
47
|
+
engine.addStyleRule(
|
|
48
|
+
`${tag}:where([${import_tree.componentAttribute}=${component}])`,
|
|
49
|
+
{
|
|
50
|
+
style
|
|
51
|
+
}
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
const styleRules = (0, import_style_rules.getStyleRules)(styles, styleSourceSelections);
|
|
57
|
+
for (const { breakpointId, instanceId, style } of styleRules) {
|
|
58
|
+
engine.addStyleRule(`[${import_tree.idAttribute}="${instanceId}"]`, {
|
|
59
|
+
breakpoint: breakpointId,
|
|
60
|
+
style
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
return engine.cssText;
|
|
64
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var global_rules_exports = {};
|
|
20
|
+
__export(global_rules_exports, {
|
|
21
|
+
addGlobalRules: () => addGlobalRules
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(global_rules_exports);
|
|
24
|
+
var import_fonts = require("@webstudio-is/fonts");
|
|
25
|
+
const addGlobalRules = (engine, { assets }) => {
|
|
26
|
+
engine.addPlaintextRule("html {margin: 0; height: 100%}");
|
|
27
|
+
const fontAssets = [];
|
|
28
|
+
for (const asset of assets.values()) {
|
|
29
|
+
if (asset && import_fonts.FONT_FORMATS.has(asset.format)) {
|
|
30
|
+
fontAssets.push(asset);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
const fontFaces = (0, import_fonts.getFontFaces)(fontAssets);
|
|
34
|
+
for (const fontFace of fontFaces) {
|
|
35
|
+
engine.addFontFaceRule(fontFace);
|
|
36
|
+
}
|
|
37
|
+
};
|
|
@@ -16,4 +16,6 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
16
16
|
var css_exports = {};
|
|
17
17
|
module.exports = __toCommonJS(css_exports);
|
|
18
18
|
__reExport(css_exports, require("./get-browser-style"), module.exports);
|
|
19
|
-
__reExport(css_exports, require("./
|
|
19
|
+
__reExport(css_exports, require("./global-rules"), module.exports);
|
|
20
|
+
__reExport(css_exports, require("./style-rules"), module.exports);
|
|
21
|
+
__reExport(css_exports, require("./css"), module.exports);
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
|
+
for (let key of __getOwnPropNames(from))
|
|
11
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
12
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
+
}
|
|
14
|
+
return to;
|
|
15
|
+
};
|
|
16
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
17
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
18
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
19
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
20
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
+
mod
|
|
23
|
+
));
|
|
24
|
+
var normalize = __toESM(require("./normalize"), 1);
|
|
25
|
+
const normalizeWithKeyof = { ...normalize };
|
|
26
|
+
normalizeWithKeyof;
|