@webstudio-is/react-sdk 0.50.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/app/custom-components/image.js +2 -4
- package/lib/app/custom-components/shared/remix-link.js +7 -23
- package/lib/cjs/app/custom-components/{image.cjs → image.js} +1 -3
- package/lib/cjs/app/custom-components/shared/{remix-link.cjs → remix-link.js} +6 -22
- package/lib/cjs/components/__generated__/{link.props.cjs → link.props.js} +6 -6
- 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} +13 -9
- package/lib/cjs/components/{link.cjs → link.js} +15 -6
- package/lib/cjs/components/{link.ws.cjs → link.ws.js} +21 -10
- 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/{rich-text-link.ws.cjs → rich-text-link.ws.js} +5 -2
- 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/{context.cjs → context.js} +2 -1
- 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/{props.cjs → props.js} +43 -2
- package/lib/cjs/pubsub/{create.cjs → create.js} +6 -35
- package/lib/cjs/pubsub/raf-queue.js +45 -0
- package/lib/cjs/tree/{create-elements-tree.cjs → create-elements-tree.js} +8 -1
- package/lib/cjs/tree/{root.cjs → root.js} +1 -0
- package/lib/cjs/tree/{webstudio-component.cjs → webstudio-component.js} +1 -0
- package/lib/components/__generated__/link-block.props.js +5 -5
- package/lib/components/__generated__/link.props.js +6 -6
- package/lib/components/__generated__/rich-text-link.props.js +5 -5
- 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 +13 -9
- package/lib/components/link.js +15 -6
- package/lib/components/link.ws.js +22 -11
- 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/rich-text-link.ws.js +6 -3
- 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/context.js +2 -1
- 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/props.js +43 -2
- package/lib/pubsub/create.js +6 -25
- package/lib/pubsub/raf-queue.js +25 -0
- package/lib/tree/create-elements-tree.js +8 -1
- package/lib/tree/root.js +1 -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/app/custom-components/image.tsx +4 -7
- package/src/app/custom-components/shared/remix-link.tsx +12 -48
- package/src/components/__generated__/link-block.props.ts +5 -5
- package/src/components/__generated__/link.props.ts +6 -6
- package/src/components/__generated__/rich-text-link.props.ts +5 -5
- 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 +16 -10
- package/src/components/link.tsx +14 -6
- package/src/components/link.ws.tsx +25 -12
- 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/rich-text-link.ws.tsx +6 -3
- 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 +4 -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.test.ts +95 -0
- package/src/props.ts +59 -5
- package/src/pubsub/create.ts +7 -38
- package/src/pubsub/raf-queue.ts +31 -0
- package/src/tree/create-elements-tree.tsx +7 -2
- package/src/tree/root.ts +2 -0
- 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/{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/{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} +5 -5
- 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} +5 -5
- /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/{slot.cjs → slot.js} +0 -0
- /package/lib/cjs/components/{slot.ws.cjs → slot.ws.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/pubsub/{index.cjs → index.js} +0 -0
- /package/lib/cjs/tree/{index.cjs → index.js} +0 -0
- /package/lib/cjs/tree/{session-storage-polyfill.cjs → session-storage-polyfill.js} +0 -0
|
@@ -2,18 +2,18 @@ const props = {
|
|
|
2
2
|
slot: { required: false, control: "text", type: "string" },
|
|
3
3
|
style: { required: false, control: "text", type: "string" },
|
|
4
4
|
title: { required: false, control: "text", type: "string" },
|
|
5
|
-
download: { required: false, control: "text", type: "string" },
|
|
6
5
|
href: { required: false, control: "text", type: "string" },
|
|
7
|
-
hrefLang: { required: false, control: "text", type: "string" },
|
|
8
|
-
media: { required: false, control: "text", type: "string" },
|
|
9
|
-
ping: { required: false, control: "text", type: "string" },
|
|
10
|
-
rel: { required: false, control: "text", type: "string" },
|
|
11
6
|
target: {
|
|
12
7
|
required: false,
|
|
13
8
|
control: "select",
|
|
14
9
|
type: "string",
|
|
15
10
|
options: ["_self", "_blank", "_parent", "_top"]
|
|
16
11
|
},
|
|
12
|
+
download: { required: false, control: "text", type: "string" },
|
|
13
|
+
hrefLang: { required: false, control: "text", type: "string" },
|
|
14
|
+
media: { required: false, control: "text", type: "string" },
|
|
15
|
+
ping: { required: false, control: "text", type: "string" },
|
|
16
|
+
rel: { required: false, control: "text", type: "string" },
|
|
17
17
|
type: { required: false, control: "text", type: "string" },
|
|
18
18
|
referrerPolicy: {
|
|
19
19
|
required: false,
|
|
@@ -2,18 +2,18 @@ const props = {
|
|
|
2
2
|
slot: { required: false, control: "text", type: "string" },
|
|
3
3
|
style: { required: false, control: "text", type: "string" },
|
|
4
4
|
title: { required: false, control: "text", type: "string" },
|
|
5
|
-
|
|
6
|
-
href: { required: false, control: "text", type: "string", defaultValue: "" },
|
|
7
|
-
hrefLang: { required: false, control: "text", type: "string" },
|
|
8
|
-
media: { required: false, control: "text", type: "string" },
|
|
9
|
-
ping: { required: false, control: "text", type: "string" },
|
|
10
|
-
rel: { required: false, control: "text", type: "string" },
|
|
5
|
+
href: { required: false, control: "text", type: "string" },
|
|
11
6
|
target: {
|
|
12
7
|
required: false,
|
|
13
8
|
control: "select",
|
|
14
9
|
type: "string",
|
|
15
10
|
options: ["_self", "_blank", "_parent", "_top"]
|
|
16
11
|
},
|
|
12
|
+
download: { required: false, control: "text", type: "string" },
|
|
13
|
+
hrefLang: { required: false, control: "text", type: "string" },
|
|
14
|
+
media: { required: false, control: "text", type: "string" },
|
|
15
|
+
ping: { required: false, control: "text", type: "string" },
|
|
16
|
+
rel: { required: false, control: "text", type: "string" },
|
|
17
17
|
type: { required: false, control: "text", type: "string" },
|
|
18
18
|
referrerPolicy: {
|
|
19
19
|
required: false,
|
|
@@ -2,18 +2,18 @@ const props = {
|
|
|
2
2
|
slot: { required: false, control: "text", type: "string" },
|
|
3
3
|
style: { required: false, control: "text", type: "string" },
|
|
4
4
|
title: { required: false, control: "text", type: "string" },
|
|
5
|
-
download: { required: false, control: "text", type: "string" },
|
|
6
5
|
href: { required: false, control: "text", type: "string" },
|
|
7
|
-
hrefLang: { required: false, control: "text", type: "string" },
|
|
8
|
-
media: { required: false, control: "text", type: "string" },
|
|
9
|
-
ping: { required: false, control: "text", type: "string" },
|
|
10
|
-
rel: { required: false, control: "text", type: "string" },
|
|
11
6
|
target: {
|
|
12
7
|
required: false,
|
|
13
8
|
control: "select",
|
|
14
9
|
type: "string",
|
|
15
10
|
options: ["_self", "_blank", "_parent", "_top"]
|
|
16
11
|
},
|
|
12
|
+
download: { required: false, control: "text", type: "string" },
|
|
13
|
+
hrefLang: { required: false, control: "text", type: "string" },
|
|
14
|
+
media: { required: false, control: "text", type: "string" },
|
|
15
|
+
ping: { required: false, control: "text", type: "string" },
|
|
16
|
+
rel: { required: false, control: "text", type: "string" },
|
|
17
17
|
type: { required: false, control: "text", type: "string" },
|
|
18
18
|
referrerPolicy: {
|
|
19
19
|
required: false,
|
|
@@ -1,41 +1,63 @@
|
|
|
1
1
|
import { BlockquoteIcon } from "@webstudio-is/icons";
|
|
2
2
|
import { props } from "./__generated__/blockquote.props";
|
|
3
3
|
const presetStyle = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
4
|
+
blockquote: {
|
|
5
|
+
marginTop: {
|
|
6
|
+
type: "unit",
|
|
7
|
+
value: 0,
|
|
8
|
+
unit: "number"
|
|
9
|
+
},
|
|
10
|
+
marginRight: {
|
|
11
|
+
type: "unit",
|
|
12
|
+
value: 0,
|
|
13
|
+
unit: "number"
|
|
14
|
+
},
|
|
15
|
+
marginBottom: {
|
|
16
|
+
type: "unit",
|
|
17
|
+
value: 10,
|
|
18
|
+
unit: "px"
|
|
19
|
+
},
|
|
20
|
+
marginLeft: {
|
|
21
|
+
type: "unit",
|
|
22
|
+
value: 0,
|
|
23
|
+
unit: "number"
|
|
24
|
+
},
|
|
25
|
+
paddingTop: {
|
|
26
|
+
type: "unit",
|
|
27
|
+
value: 10,
|
|
28
|
+
unit: "px"
|
|
29
|
+
},
|
|
30
|
+
paddingBottom: {
|
|
31
|
+
type: "unit",
|
|
32
|
+
value: 10,
|
|
33
|
+
unit: "px"
|
|
34
|
+
},
|
|
35
|
+
paddingLeft: {
|
|
36
|
+
type: "unit",
|
|
37
|
+
value: 20,
|
|
38
|
+
unit: "px"
|
|
39
|
+
},
|
|
40
|
+
paddingRight: {
|
|
41
|
+
type: "unit",
|
|
42
|
+
value: 20,
|
|
43
|
+
unit: "px"
|
|
44
|
+
},
|
|
45
|
+
borderLeftWidth: {
|
|
46
|
+
type: "unit",
|
|
47
|
+
value: 5,
|
|
48
|
+
unit: "px"
|
|
49
|
+
},
|
|
50
|
+
borderLeftStyle: {
|
|
51
|
+
type: "keyword",
|
|
52
|
+
value: "solid"
|
|
53
|
+
},
|
|
54
|
+
borderLeftColor: {
|
|
55
|
+
type: "rgb",
|
|
56
|
+
r: 226,
|
|
57
|
+
g: 226,
|
|
58
|
+
b: 226,
|
|
59
|
+
alpha: 1
|
|
60
|
+
}
|
|
39
61
|
}
|
|
40
62
|
};
|
|
41
63
|
const meta = {
|
package/lib/components/body.js
CHANGED
|
@@ -1,52 +1,36 @@
|
|
|
1
1
|
import { BodyIcon } from "@webstudio-is/icons";
|
|
2
|
+
import { body } from "../css/normalize";
|
|
2
3
|
import { props } from "./__generated__/body.props";
|
|
3
4
|
const presetStyle = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
fontFamily: {
|
|
34
|
-
type: "keyword",
|
|
35
|
-
value: "Arial"
|
|
36
|
-
},
|
|
37
|
-
fontSize: {
|
|
38
|
-
type: "unit",
|
|
39
|
-
unit: "px",
|
|
40
|
-
value: 14
|
|
41
|
-
},
|
|
42
|
-
lineHeight: {
|
|
43
|
-
type: "unit",
|
|
44
|
-
unit: "number",
|
|
45
|
-
value: 1.5
|
|
46
|
-
},
|
|
47
|
-
color: {
|
|
48
|
-
type: "keyword",
|
|
49
|
-
value: "#232323"
|
|
5
|
+
body: {
|
|
6
|
+
...body,
|
|
7
|
+
minHeight: {
|
|
8
|
+
type: "unit",
|
|
9
|
+
unit: "%",
|
|
10
|
+
value: 100
|
|
11
|
+
},
|
|
12
|
+
backgroundColor: {
|
|
13
|
+
type: "keyword",
|
|
14
|
+
value: "white"
|
|
15
|
+
},
|
|
16
|
+
fontFamily: {
|
|
17
|
+
type: "keyword",
|
|
18
|
+
value: "Arial"
|
|
19
|
+
},
|
|
20
|
+
fontSize: {
|
|
21
|
+
type: "unit",
|
|
22
|
+
unit: "px",
|
|
23
|
+
value: 14
|
|
24
|
+
},
|
|
25
|
+
lineHeight: {
|
|
26
|
+
type: "unit",
|
|
27
|
+
unit: "number",
|
|
28
|
+
value: 1.5
|
|
29
|
+
},
|
|
30
|
+
color: {
|
|
31
|
+
type: "keyword",
|
|
32
|
+
value: "#232323"
|
|
33
|
+
}
|
|
50
34
|
}
|
|
51
35
|
};
|
|
52
36
|
const meta = {
|
package/lib/components/bold.js
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BoldIcon } from "@webstudio-is/icons";
|
|
2
2
|
import { props } from "./__generated__/bold.props";
|
|
3
|
+
import { b } from "../css/normalize";
|
|
4
|
+
const presetStyle = {
|
|
5
|
+
b
|
|
6
|
+
};
|
|
3
7
|
const meta = {
|
|
4
8
|
type: "rich-text-child",
|
|
5
9
|
label: "Bold Text",
|
|
6
|
-
Icon:
|
|
10
|
+
Icon: BoldIcon,
|
|
11
|
+
presetStyle
|
|
7
12
|
};
|
|
8
13
|
const propsMeta = {
|
|
9
14
|
props
|
package/lib/components/box.ws.js
CHANGED
|
@@ -1,10 +1,28 @@
|
|
|
1
1
|
import { BoxIcon } from "@webstudio-is/icons";
|
|
2
2
|
import { props } from "./__generated__/box.props";
|
|
3
|
+
import {
|
|
4
|
+
div,
|
|
5
|
+
address,
|
|
6
|
+
article,
|
|
7
|
+
aside,
|
|
8
|
+
figure,
|
|
9
|
+
footer,
|
|
10
|
+
header,
|
|
11
|
+
main,
|
|
12
|
+
nav,
|
|
13
|
+
section
|
|
14
|
+
} from "../css/normalize";
|
|
3
15
|
const presetStyle = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
16
|
+
div,
|
|
17
|
+
address,
|
|
18
|
+
article,
|
|
19
|
+
aside,
|
|
20
|
+
figure,
|
|
21
|
+
footer,
|
|
22
|
+
header,
|
|
23
|
+
main,
|
|
24
|
+
nav,
|
|
25
|
+
section
|
|
8
26
|
};
|
|
9
27
|
const meta = {
|
|
10
28
|
category: "general",
|
package/lib/components/button.js
CHANGED
|
@@ -1,10 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ButtonElementIcon } from "@webstudio-is/icons";
|
|
2
2
|
import { props } from "./__generated__/button.props";
|
|
3
|
+
import { button } from "../css/normalize";
|
|
4
|
+
const presetStyle = {
|
|
5
|
+
button
|
|
6
|
+
};
|
|
3
7
|
const meta = {
|
|
4
8
|
category: "forms",
|
|
5
9
|
type: "container",
|
|
6
10
|
label: "Button",
|
|
7
|
-
Icon:
|
|
11
|
+
Icon: ButtonElementIcon,
|
|
12
|
+
presetStyle
|
|
8
13
|
};
|
|
9
14
|
const propsMeta = {
|
|
10
15
|
props,
|
package/lib/components/code.js
CHANGED
|
@@ -1,32 +1,38 @@
|
|
|
1
1
|
import { CodeIcon } from "@webstudio-is/icons";
|
|
2
2
|
import { displayVarNamespace } from "./code";
|
|
3
3
|
import { props } from "./__generated__/code.props";
|
|
4
|
+
import { code } from "../css/normalize";
|
|
5
|
+
const display = {
|
|
6
|
+
type: "var",
|
|
7
|
+
value: displayVarNamespace,
|
|
8
|
+
fallbacks: [
|
|
9
|
+
{
|
|
10
|
+
type: "keyword",
|
|
11
|
+
value: "inline-block"
|
|
12
|
+
}
|
|
13
|
+
]
|
|
14
|
+
};
|
|
4
15
|
const presetStyle = {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
value: "#eee"
|
|
26
|
-
},
|
|
27
|
-
fontFamily: {
|
|
28
|
-
type: "keyword",
|
|
29
|
-
value: "monospace"
|
|
16
|
+
code: {
|
|
17
|
+
...code,
|
|
18
|
+
display,
|
|
19
|
+
paddingLeft: {
|
|
20
|
+
type: "unit",
|
|
21
|
+
value: 0.2,
|
|
22
|
+
unit: "em"
|
|
23
|
+
},
|
|
24
|
+
paddingRight: {
|
|
25
|
+
type: "unit",
|
|
26
|
+
value: 0.2,
|
|
27
|
+
unit: "em"
|
|
28
|
+
},
|
|
29
|
+
backgroundColor: {
|
|
30
|
+
type: "rgb",
|
|
31
|
+
r: 238,
|
|
32
|
+
g: 238,
|
|
33
|
+
b: 238,
|
|
34
|
+
alpha: 1
|
|
35
|
+
}
|
|
30
36
|
}
|
|
31
37
|
};
|
|
32
38
|
const meta = {
|
package/lib/components/form.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { FormIcon } from "@webstudio-is/icons";
|
|
2
|
+
import { form } from "../css/normalize";
|
|
2
3
|
import { props } from "./__generated__/form.props";
|
|
3
4
|
const presetStyle = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
value: "border-box"
|
|
5
|
+
form: {
|
|
6
|
+
...form,
|
|
7
|
+
minHeight: {
|
|
8
|
+
type: "unit",
|
|
9
|
+
unit: "px",
|
|
10
|
+
value: 20
|
|
11
|
+
}
|
|
12
12
|
}
|
|
13
13
|
};
|
|
14
14
|
const meta = {
|
|
@@ -1,11 +1,21 @@
|
|
|
1
1
|
import { HeadingIcon } from "@webstudio-is/icons";
|
|
2
|
+
import { h1, h2, h3, h4, h5, h6 } from "../css/normalize";
|
|
2
3
|
import { props } from "./__generated__/heading.props";
|
|
4
|
+
const presetStyle = {
|
|
5
|
+
h1,
|
|
6
|
+
h2,
|
|
7
|
+
h3,
|
|
8
|
+
h4,
|
|
9
|
+
h5,
|
|
10
|
+
h6
|
|
11
|
+
};
|
|
3
12
|
const meta = {
|
|
4
13
|
category: "typography",
|
|
5
14
|
type: "rich-text",
|
|
6
15
|
label: "Heading",
|
|
7
16
|
Icon: HeadingIcon,
|
|
8
|
-
children: ["Heading you can edit"]
|
|
17
|
+
children: ["Heading you can edit"],
|
|
18
|
+
presetStyle
|
|
9
19
|
};
|
|
10
20
|
const propsMeta = {
|
|
11
21
|
props,
|
package/lib/components/image.js
CHANGED
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
import { ImageIcon } from "@webstudio-is/icons";
|
|
2
|
+
import { img } from "../css/normalize";
|
|
2
3
|
import { props } from "./__generated__/image.props";
|
|
3
4
|
const presetStyle = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
5
|
+
img: {
|
|
6
|
+
...img,
|
|
7
|
+
// Otherwise on new image insert onto canvas it can overfit screen size multiple times
|
|
8
|
+
maxWidth: {
|
|
9
|
+
type: "unit",
|
|
10
|
+
unit: "%",
|
|
11
|
+
value: 100
|
|
12
|
+
},
|
|
13
|
+
// inline | inline-block is not suitable because without line-height: 0 on the parent you get unsuitable spaces/margins
|
|
14
|
+
// see https://stackoverflow.com/questions/24771194/is-the-margin-of-inline-block-4px-is-static-for-all-browsers
|
|
15
|
+
display: {
|
|
16
|
+
type: "keyword",
|
|
17
|
+
value: "block"
|
|
18
|
+
}
|
|
15
19
|
}
|
|
16
20
|
};
|
|
17
21
|
const meta = {
|
package/lib/components/input.js
CHANGED
|
@@ -1,10 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FormTextFieldIcon } from "@webstudio-is/icons";
|
|
2
|
+
import { input } from "../css/normalize";
|
|
2
3
|
import { props } from "./__generated__/input.props";
|
|
4
|
+
const presetStyle = {
|
|
5
|
+
input
|
|
6
|
+
};
|
|
3
7
|
const meta = {
|
|
4
8
|
category: "forms",
|
|
5
9
|
type: "control",
|
|
6
10
|
label: "Input",
|
|
7
|
-
Icon:
|
|
11
|
+
Icon: FormTextFieldIcon,
|
|
12
|
+
presetStyle
|
|
8
13
|
};
|
|
9
14
|
const propsMeta = {
|
|
10
15
|
props
|
package/lib/components/italic.js
CHANGED
|
@@ -1,15 +1,19 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TextItalicIcon } from "@webstudio-is/icons";
|
|
2
2
|
import { props } from "./__generated__/italic.props";
|
|
3
|
+
import { i } from "../css/normalize";
|
|
3
4
|
const presetStyle = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
i: {
|
|
6
|
+
...i,
|
|
7
|
+
fontStyle: {
|
|
8
|
+
type: "keyword",
|
|
9
|
+
value: "italic"
|
|
10
|
+
}
|
|
7
11
|
}
|
|
8
12
|
};
|
|
9
13
|
const meta = {
|
|
10
14
|
type: "rich-text-child",
|
|
11
15
|
label: "Italic Text",
|
|
12
|
-
Icon:
|
|
16
|
+
Icon: TextItalicIcon,
|
|
13
17
|
presetStyle
|
|
14
18
|
};
|
|
15
19
|
const propsMeta = {
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef } from "react";
|
|
3
3
|
import { Link } from "./link";
|
|
4
|
+
import { defaultTag } from "./link";
|
|
4
5
|
const LinkBlock = forwardRef((props, ref) => /* @__PURE__ */ jsx(Link, { ...props, ref }));
|
|
5
6
|
LinkBlock.displayName = "LinkBlock";
|
|
6
7
|
export {
|
|
7
|
-
LinkBlock
|
|
8
|
+
LinkBlock,
|
|
9
|
+
defaultTag
|
|
8
10
|
};
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { BoxLinkIcon } from "@webstudio-is/icons";
|
|
2
2
|
import { props } from "./__generated__/link-block.props";
|
|
3
|
+
import { propsMeta as linkPropsMeta } from "./link.ws";
|
|
4
|
+
import { a } from "../css/normalize";
|
|
3
5
|
const presetStyle = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
value: "inline-block"
|
|
6
|
+
a: {
|
|
7
|
+
...a,
|
|
8
|
+
display: {
|
|
9
|
+
type: "keyword",
|
|
10
|
+
value: "inline-block"
|
|
11
|
+
}
|
|
11
12
|
}
|
|
12
13
|
};
|
|
13
14
|
const meta = {
|
|
@@ -18,8 +19,11 @@ const meta = {
|
|
|
18
19
|
presetStyle
|
|
19
20
|
};
|
|
20
21
|
const propsMeta = {
|
|
21
|
-
props
|
|
22
|
-
|
|
22
|
+
props: {
|
|
23
|
+
...props,
|
|
24
|
+
href: linkPropsMeta.props.href
|
|
25
|
+
},
|
|
26
|
+
initialProps: linkPropsMeta.initialProps
|
|
23
27
|
};
|
|
24
28
|
export {
|
|
25
29
|
meta,
|