@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
|
@@ -5,14 +5,12 @@ import {
|
|
|
5
5
|
} from "react";
|
|
6
6
|
import { Image as WebstudioImage, loaders } from "@webstudio-is/image";
|
|
7
7
|
import { Image as SdkImage } from "../../components/image";
|
|
8
|
-
import { usePropAsset } from "../../props";
|
|
9
|
-
import { idAttribute } from "../../tree/webstudio-component";
|
|
8
|
+
import { usePropAsset, getInstanceIdFromComponentProps } from "../../props";
|
|
10
9
|
import { getParams } from "../params";
|
|
11
10
|
const defaultTag = "img";
|
|
12
11
|
const Image = forwardRef(
|
|
13
12
|
(props, ref) => {
|
|
14
|
-
const
|
|
15
|
-
const asset = usePropAsset(componentId, "src");
|
|
13
|
+
const asset = usePropAsset(getInstanceIdFromComponentProps(props), "src");
|
|
16
14
|
const params = getParams();
|
|
17
15
|
const loader = useMemo(() => {
|
|
18
16
|
if (asset === void 0) {
|
|
@@ -1,30 +1,14 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Link } from "@remix-run/react";
|
|
2
|
+
import { Link as RemixLink } from "@remix-run/react";
|
|
3
3
|
import { forwardRef } from "react";
|
|
4
|
-
|
|
5
|
-
try {
|
|
6
|
-
new URL(href);
|
|
7
|
-
return true;
|
|
8
|
-
} catch {
|
|
9
|
-
return false;
|
|
10
|
-
}
|
|
11
|
-
};
|
|
12
|
-
const isAbsoluteUrlRemix = (href) => /^[a-z+]+:\/\//i.test(href) || href.startsWith("//");
|
|
4
|
+
import { usePropUrl, getInstanceIdFromComponentProps } from "../../../props";
|
|
13
5
|
const wrapLinkComponent = (BaseLink) => {
|
|
14
|
-
const Component = forwardRef((
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
return /* @__PURE__ */ jsx(
|
|
19
|
-
BaseLink,
|
|
20
|
-
{
|
|
21
|
-
...props,
|
|
22
|
-
href: willRemixTryToTreatAsAbsoluteAndCrash ? "" : href,
|
|
23
|
-
ref
|
|
24
|
-
}
|
|
25
|
-
);
|
|
6
|
+
const Component = forwardRef((props, ref) => {
|
|
7
|
+
const href = usePropUrl(getInstanceIdFromComponentProps(props), "href");
|
|
8
|
+
if (typeof href === "string" || href === void 0) {
|
|
9
|
+
return /* @__PURE__ */ jsx(BaseLink, { ...props, ref });
|
|
26
10
|
}
|
|
27
|
-
return /* @__PURE__ */ jsx(
|
|
11
|
+
return /* @__PURE__ */ jsx(RemixLink, { ...props, to: href.path, ref });
|
|
28
12
|
});
|
|
29
13
|
Component.displayName = BaseLink.displayName;
|
|
30
14
|
return Component;
|
|
@@ -26,13 +26,11 @@ var import_react = require("react");
|
|
|
26
26
|
var import_image = require("@webstudio-is/image");
|
|
27
27
|
var import_image2 = require("../../components/image");
|
|
28
28
|
var import_props = require("../../props");
|
|
29
|
-
var import_webstudio_component = require("../../tree/webstudio-component");
|
|
30
29
|
var import_params = require("../params");
|
|
31
30
|
const defaultTag = "img";
|
|
32
31
|
const Image = (0, import_react.forwardRef)(
|
|
33
32
|
(props, ref) => {
|
|
34
|
-
const
|
|
35
|
-
const asset = (0, import_props.usePropAsset)(componentId, "src");
|
|
33
|
+
const asset = (0, import_props.usePropAsset)((0, import_props.getInstanceIdFromComponentProps)(props), "src");
|
|
36
34
|
const params = (0, import_params.getParams)();
|
|
37
35
|
const loader = (0, import_react.useMemo)(() => {
|
|
38
36
|
if (asset === void 0) {
|
|
@@ -24,30 +24,14 @@ module.exports = __toCommonJS(remix_link_exports);
|
|
|
24
24
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
25
25
|
var import_react = require("@remix-run/react");
|
|
26
26
|
var import_react2 = require("react");
|
|
27
|
-
|
|
28
|
-
try {
|
|
29
|
-
new URL(href);
|
|
30
|
-
return true;
|
|
31
|
-
} catch {
|
|
32
|
-
return false;
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
const isAbsoluteUrlRemix = (href) => /^[a-z+]+:\/\//i.test(href) || href.startsWith("//");
|
|
27
|
+
var import_props = require("../../../props");
|
|
36
28
|
const wrapLinkComponent = (BaseLink) => {
|
|
37
|
-
const Component = (0, import_react2.forwardRef)((
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
42
|
-
BaseLink,
|
|
43
|
-
{
|
|
44
|
-
...props,
|
|
45
|
-
href: willRemixTryToTreatAsAbsoluteAndCrash ? "" : href,
|
|
46
|
-
ref
|
|
47
|
-
}
|
|
48
|
-
);
|
|
29
|
+
const Component = (0, import_react2.forwardRef)((props, ref) => {
|
|
30
|
+
const href = (0, import_props.usePropUrl)((0, import_props.getInstanceIdFromComponentProps)(props), "href");
|
|
31
|
+
if (typeof href === "string" || href === void 0) {
|
|
32
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BaseLink, { ...props, ref });
|
|
49
33
|
}
|
|
50
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react.Link, { ...props, to: href, ref });
|
|
34
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react.Link, { ...props, to: href.path, ref });
|
|
51
35
|
});
|
|
52
36
|
Component.displayName = BaseLink.displayName;
|
|
53
37
|
return Component;
|
|
@@ -25,18 +25,18 @@ const props = {
|
|
|
25
25
|
slot: { required: false, control: "text", type: "string" },
|
|
26
26
|
style: { required: false, control: "text", type: "string" },
|
|
27
27
|
title: { required: false, control: "text", type: "string" },
|
|
28
|
-
|
|
29
|
-
href: { required: false, control: "text", type: "string", defaultValue: "" },
|
|
30
|
-
hrefLang: { required: false, control: "text", type: "string" },
|
|
31
|
-
media: { required: false, control: "text", type: "string" },
|
|
32
|
-
ping: { required: false, control: "text", type: "string" },
|
|
33
|
-
rel: { required: false, control: "text", type: "string" },
|
|
28
|
+
href: { required: false, control: "text", type: "string" },
|
|
34
29
|
target: {
|
|
35
30
|
required: false,
|
|
36
31
|
control: "select",
|
|
37
32
|
type: "string",
|
|
38
33
|
options: ["_self", "_blank", "_parent", "_top"]
|
|
39
34
|
},
|
|
35
|
+
download: { required: false, control: "text", type: "string" },
|
|
36
|
+
hrefLang: { required: false, control: "text", type: "string" },
|
|
37
|
+
media: { required: false, control: "text", type: "string" },
|
|
38
|
+
ping: { required: false, control: "text", type: "string" },
|
|
39
|
+
rel: { required: false, control: "text", type: "string" },
|
|
40
40
|
type: { required: false, control: "text", type: "string" },
|
|
41
41
|
referrerPolicy: {
|
|
42
42
|
required: false,
|
|
@@ -18,7 +18,8 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
var blockquote_exports = {};
|
|
20
20
|
__export(blockquote_exports, {
|
|
21
|
-
Blockquote: () => Blockquote
|
|
21
|
+
Blockquote: () => Blockquote,
|
|
22
|
+
defaultTag: () => defaultTag
|
|
22
23
|
});
|
|
23
24
|
module.exports = __toCommonJS(blockquote_exports);
|
|
24
25
|
var import_react = require("react");
|
|
@@ -25,41 +25,63 @@ module.exports = __toCommonJS(blockquote_ws_exports);
|
|
|
25
25
|
var import_icons = require("@webstudio-is/icons");
|
|
26
26
|
var import_blockquote = require("./__generated__/blockquote.props");
|
|
27
27
|
const presetStyle = {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
28
|
+
blockquote: {
|
|
29
|
+
marginTop: {
|
|
30
|
+
type: "unit",
|
|
31
|
+
value: 0,
|
|
32
|
+
unit: "number"
|
|
33
|
+
},
|
|
34
|
+
marginRight: {
|
|
35
|
+
type: "unit",
|
|
36
|
+
value: 0,
|
|
37
|
+
unit: "number"
|
|
38
|
+
},
|
|
39
|
+
marginBottom: {
|
|
40
|
+
type: "unit",
|
|
41
|
+
value: 10,
|
|
42
|
+
unit: "px"
|
|
43
|
+
},
|
|
44
|
+
marginLeft: {
|
|
45
|
+
type: "unit",
|
|
46
|
+
value: 0,
|
|
47
|
+
unit: "number"
|
|
48
|
+
},
|
|
49
|
+
paddingTop: {
|
|
50
|
+
type: "unit",
|
|
51
|
+
value: 10,
|
|
52
|
+
unit: "px"
|
|
53
|
+
},
|
|
54
|
+
paddingBottom: {
|
|
55
|
+
type: "unit",
|
|
56
|
+
value: 10,
|
|
57
|
+
unit: "px"
|
|
58
|
+
},
|
|
59
|
+
paddingLeft: {
|
|
60
|
+
type: "unit",
|
|
61
|
+
value: 20,
|
|
62
|
+
unit: "px"
|
|
63
|
+
},
|
|
64
|
+
paddingRight: {
|
|
65
|
+
type: "unit",
|
|
66
|
+
value: 20,
|
|
67
|
+
unit: "px"
|
|
68
|
+
},
|
|
69
|
+
borderLeftWidth: {
|
|
70
|
+
type: "unit",
|
|
71
|
+
value: 5,
|
|
72
|
+
unit: "px"
|
|
73
|
+
},
|
|
74
|
+
borderLeftStyle: {
|
|
75
|
+
type: "keyword",
|
|
76
|
+
value: "solid"
|
|
77
|
+
},
|
|
78
|
+
borderLeftColor: {
|
|
79
|
+
type: "rgb",
|
|
80
|
+
r: 226,
|
|
81
|
+
g: 226,
|
|
82
|
+
b: 226,
|
|
83
|
+
alpha: 1
|
|
84
|
+
}
|
|
63
85
|
}
|
|
64
86
|
};
|
|
65
87
|
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 body_exports = {};
|
|
20
20
|
__export(body_exports, {
|
|
21
|
-
Body: () => Body
|
|
21
|
+
Body: () => Body,
|
|
22
|
+
defaultTag: () => defaultTag
|
|
22
23
|
});
|
|
23
24
|
module.exports = __toCommonJS(body_exports);
|
|
24
25
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
@@ -23,54 +23,38 @@ __export(body_ws_exports, {
|
|
|
23
23
|
});
|
|
24
24
|
module.exports = __toCommonJS(body_ws_exports);
|
|
25
25
|
var import_icons = require("@webstudio-is/icons");
|
|
26
|
+
var import_normalize = require("../css/normalize");
|
|
26
27
|
var import_body = require("./__generated__/body.props");
|
|
27
28
|
const presetStyle = {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
fontFamily: {
|
|
58
|
-
type: "keyword",
|
|
59
|
-
value: "Arial"
|
|
60
|
-
},
|
|
61
|
-
fontSize: {
|
|
62
|
-
type: "unit",
|
|
63
|
-
unit: "px",
|
|
64
|
-
value: 14
|
|
65
|
-
},
|
|
66
|
-
lineHeight: {
|
|
67
|
-
type: "unit",
|
|
68
|
-
unit: "number",
|
|
69
|
-
value: 1.5
|
|
70
|
-
},
|
|
71
|
-
color: {
|
|
72
|
-
type: "keyword",
|
|
73
|
-
value: "#232323"
|
|
29
|
+
body: {
|
|
30
|
+
...import_normalize.body,
|
|
31
|
+
minHeight: {
|
|
32
|
+
type: "unit",
|
|
33
|
+
unit: "%",
|
|
34
|
+
value: 100
|
|
35
|
+
},
|
|
36
|
+
backgroundColor: {
|
|
37
|
+
type: "keyword",
|
|
38
|
+
value: "white"
|
|
39
|
+
},
|
|
40
|
+
fontFamily: {
|
|
41
|
+
type: "keyword",
|
|
42
|
+
value: "Arial"
|
|
43
|
+
},
|
|
44
|
+
fontSize: {
|
|
45
|
+
type: "unit",
|
|
46
|
+
unit: "px",
|
|
47
|
+
value: 14
|
|
48
|
+
},
|
|
49
|
+
lineHeight: {
|
|
50
|
+
type: "unit",
|
|
51
|
+
unit: "number",
|
|
52
|
+
value: 1.5
|
|
53
|
+
},
|
|
54
|
+
color: {
|
|
55
|
+
type: "keyword",
|
|
56
|
+
value: "#232323"
|
|
57
|
+
}
|
|
74
58
|
}
|
|
75
59
|
};
|
|
76
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 bold_exports = {};
|
|
20
20
|
__export(bold_exports, {
|
|
21
|
-
Bold: () => Bold
|
|
21
|
+
Bold: () => Bold,
|
|
22
|
+
defaultTag: () => defaultTag
|
|
22
23
|
});
|
|
23
24
|
module.exports = __toCommonJS(bold_exports);
|
|
24
25
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
@@ -24,10 +24,15 @@ __export(bold_ws_exports, {
|
|
|
24
24
|
module.exports = __toCommonJS(bold_ws_exports);
|
|
25
25
|
var import_icons = require("@webstudio-is/icons");
|
|
26
26
|
var import_bold = require("./__generated__/bold.props");
|
|
27
|
+
var import_normalize = require("../css/normalize");
|
|
28
|
+
const presetStyle = {
|
|
29
|
+
b: import_normalize.b
|
|
30
|
+
};
|
|
27
31
|
const meta = {
|
|
28
32
|
type: "rich-text-child",
|
|
29
33
|
label: "Bold Text",
|
|
30
|
-
Icon: import_icons.
|
|
34
|
+
Icon: import_icons.BoldIcon,
|
|
35
|
+
presetStyle
|
|
31
36
|
};
|
|
32
37
|
const propsMeta = {
|
|
33
38
|
props: import_bold.props
|
|
@@ -24,11 +24,18 @@ __export(box_ws_exports, {
|
|
|
24
24
|
module.exports = __toCommonJS(box_ws_exports);
|
|
25
25
|
var import_icons = require("@webstudio-is/icons");
|
|
26
26
|
var import_box = require("./__generated__/box.props");
|
|
27
|
+
var import_normalize = require("../css/normalize");
|
|
27
28
|
const presetStyle = {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
div: import_normalize.div,
|
|
30
|
+
address: import_normalize.address,
|
|
31
|
+
article: import_normalize.article,
|
|
32
|
+
aside: import_normalize.aside,
|
|
33
|
+
figure: import_normalize.figure,
|
|
34
|
+
footer: import_normalize.footer,
|
|
35
|
+
header: import_normalize.header,
|
|
36
|
+
main: import_normalize.main,
|
|
37
|
+
nav: import_normalize.nav,
|
|
38
|
+
section: import_normalize.section
|
|
32
39
|
};
|
|
33
40
|
const meta = {
|
|
34
41
|
category: "general",
|
|
@@ -18,7 +18,8 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
var button_exports = {};
|
|
20
20
|
__export(button_exports, {
|
|
21
|
-
Button: () => Button
|
|
21
|
+
Button: () => Button,
|
|
22
|
+
defaultTag: () => defaultTag
|
|
22
23
|
});
|
|
23
24
|
module.exports = __toCommonJS(button_exports);
|
|
24
25
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
@@ -24,11 +24,16 @@ __export(button_ws_exports, {
|
|
|
24
24
|
module.exports = __toCommonJS(button_ws_exports);
|
|
25
25
|
var import_icons = require("@webstudio-is/icons");
|
|
26
26
|
var import_button = require("./__generated__/button.props");
|
|
27
|
+
var import_normalize = require("../css/normalize");
|
|
28
|
+
const presetStyle = {
|
|
29
|
+
button: import_normalize.button
|
|
30
|
+
};
|
|
27
31
|
const meta = {
|
|
28
32
|
category: "forms",
|
|
29
33
|
type: "container",
|
|
30
34
|
label: "Button",
|
|
31
|
-
Icon: import_icons.
|
|
35
|
+
Icon: import_icons.ButtonElementIcon,
|
|
36
|
+
presetStyle
|
|
32
37
|
};
|
|
33
38
|
const propsMeta = {
|
|
34
39
|
props: import_button.props,
|
|
@@ -19,6 +19,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
19
19
|
var code_exports = {};
|
|
20
20
|
__export(code_exports, {
|
|
21
21
|
Code: () => Code,
|
|
22
|
+
defaultTag: () => defaultTag,
|
|
22
23
|
displayVarNamespace: () => displayVarNamespace
|
|
23
24
|
});
|
|
24
25
|
module.exports = __toCommonJS(code_exports);
|
|
@@ -25,32 +25,38 @@ module.exports = __toCommonJS(code_ws_exports);
|
|
|
25
25
|
var import_icons = require("@webstudio-is/icons");
|
|
26
26
|
var import_code = require("./code");
|
|
27
27
|
var import_code2 = require("./__generated__/code.props");
|
|
28
|
+
var import_normalize = require("../css/normalize");
|
|
29
|
+
const display = {
|
|
30
|
+
type: "var",
|
|
31
|
+
value: import_code.displayVarNamespace,
|
|
32
|
+
fallbacks: [
|
|
33
|
+
{
|
|
34
|
+
type: "keyword",
|
|
35
|
+
value: "inline-block"
|
|
36
|
+
}
|
|
37
|
+
]
|
|
38
|
+
};
|
|
28
39
|
const presetStyle = {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
value: "#eee"
|
|
50
|
-
},
|
|
51
|
-
fontFamily: {
|
|
52
|
-
type: "keyword",
|
|
53
|
-
value: "monospace"
|
|
40
|
+
code: {
|
|
41
|
+
...import_normalize.code,
|
|
42
|
+
display,
|
|
43
|
+
paddingLeft: {
|
|
44
|
+
type: "unit",
|
|
45
|
+
value: 0.2,
|
|
46
|
+
unit: "em"
|
|
47
|
+
},
|
|
48
|
+
paddingRight: {
|
|
49
|
+
type: "unit",
|
|
50
|
+
value: 0.2,
|
|
51
|
+
unit: "em"
|
|
52
|
+
},
|
|
53
|
+
backgroundColor: {
|
|
54
|
+
type: "rgb",
|
|
55
|
+
r: 238,
|
|
56
|
+
g: 238,
|
|
57
|
+
b: 238,
|
|
58
|
+
alpha: 1
|
|
59
|
+
}
|
|
54
60
|
}
|
|
55
61
|
};
|
|
56
62
|
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 form_exports = {};
|
|
20
20
|
__export(form_exports, {
|
|
21
|
-
Form: () => Form
|
|
21
|
+
Form: () => Form,
|
|
22
|
+
defaultTag: () => defaultTag
|
|
22
23
|
});
|
|
23
24
|
module.exports = __toCommonJS(form_exports);
|
|
24
25
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
@@ -23,16 +23,16 @@ __export(form_ws_exports, {
|
|
|
23
23
|
});
|
|
24
24
|
module.exports = __toCommonJS(form_ws_exports);
|
|
25
25
|
var import_icons = require("@webstudio-is/icons");
|
|
26
|
+
var import_normalize = require("../css/normalize");
|
|
26
27
|
var import_form = require("./__generated__/form.props");
|
|
27
28
|
const presetStyle = {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
value: "border-box"
|
|
29
|
+
form: {
|
|
30
|
+
...import_normalize.form,
|
|
31
|
+
minHeight: {
|
|
32
|
+
type: "unit",
|
|
33
|
+
unit: "px",
|
|
34
|
+
value: 20
|
|
35
|
+
}
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
38
|
const meta = {
|
|
@@ -23,13 +23,23 @@ __export(heading_ws_exports, {
|
|
|
23
23
|
});
|
|
24
24
|
module.exports = __toCommonJS(heading_ws_exports);
|
|
25
25
|
var import_icons = require("@webstudio-is/icons");
|
|
26
|
+
var import_normalize = require("../css/normalize");
|
|
26
27
|
var import_heading = require("./__generated__/heading.props");
|
|
28
|
+
const presetStyle = {
|
|
29
|
+
h1: import_normalize.h1,
|
|
30
|
+
h2: import_normalize.h2,
|
|
31
|
+
h3: import_normalize.h3,
|
|
32
|
+
h4: import_normalize.h4,
|
|
33
|
+
h5: import_normalize.h5,
|
|
34
|
+
h6: import_normalize.h6
|
|
35
|
+
};
|
|
27
36
|
const meta = {
|
|
28
37
|
category: "typography",
|
|
29
38
|
type: "rich-text",
|
|
30
39
|
label: "Heading",
|
|
31
40
|
Icon: import_icons.HeadingIcon,
|
|
32
|
-
children: ["Heading you can edit"]
|
|
41
|
+
children: ["Heading you can edit"],
|
|
42
|
+
presetStyle
|
|
33
43
|
};
|
|
34
44
|
const propsMeta = {
|
|
35
45
|
props: import_heading.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 image_exports = {};
|
|
20
20
|
__export(image_exports, {
|
|
21
|
-
Image: () => Image
|
|
21
|
+
Image: () => Image,
|
|
22
|
+
defaultTag: () => defaultTag
|
|
22
23
|
});
|
|
23
24
|
module.exports = __toCommonJS(image_exports);
|
|
24
25
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
@@ -23,19 +23,23 @@ __export(image_ws_exports, {
|
|
|
23
23
|
});
|
|
24
24
|
module.exports = __toCommonJS(image_ws_exports);
|
|
25
25
|
var import_icons = require("@webstudio-is/icons");
|
|
26
|
+
var import_normalize = require("../css/normalize");
|
|
26
27
|
var import_image = require("./__generated__/image.props");
|
|
27
28
|
const presetStyle = {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
29
|
+
img: {
|
|
30
|
+
...import_normalize.img,
|
|
31
|
+
// Otherwise on new image insert onto canvas it can overfit screen size multiple times
|
|
32
|
+
maxWidth: {
|
|
33
|
+
type: "unit",
|
|
34
|
+
unit: "%",
|
|
35
|
+
value: 100
|
|
36
|
+
},
|
|
37
|
+
// inline | inline-block is not suitable because without line-height: 0 on the parent you get unsuitable spaces/margins
|
|
38
|
+
// see https://stackoverflow.com/questions/24771194/is-the-margin-of-inline-block-4px-is-static-for-all-browsers
|
|
39
|
+
display: {
|
|
40
|
+
type: "keyword",
|
|
41
|
+
value: "block"
|
|
42
|
+
}
|
|
39
43
|
}
|
|
40
44
|
};
|
|
41
45
|
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 input_exports = {};
|
|
20
20
|
__export(input_exports, {
|
|
21
|
-
Input: () => Input
|
|
21
|
+
Input: () => Input,
|
|
22
|
+
defaultTag: () => defaultTag
|
|
22
23
|
});
|
|
23
24
|
module.exports = __toCommonJS(input_exports);
|
|
24
25
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
@@ -23,12 +23,17 @@ __export(input_ws_exports, {
|
|
|
23
23
|
});
|
|
24
24
|
module.exports = __toCommonJS(input_ws_exports);
|
|
25
25
|
var import_icons = require("@webstudio-is/icons");
|
|
26
|
+
var import_normalize = require("../css/normalize");
|
|
26
27
|
var import_input = require("./__generated__/input.props");
|
|
28
|
+
const presetStyle = {
|
|
29
|
+
input: import_normalize.input
|
|
30
|
+
};
|
|
27
31
|
const meta = {
|
|
28
32
|
category: "forms",
|
|
29
33
|
type: "control",
|
|
30
34
|
label: "Input",
|
|
31
|
-
Icon: import_icons.
|
|
35
|
+
Icon: import_icons.FormTextFieldIcon,
|
|
36
|
+
presetStyle
|
|
32
37
|
};
|
|
33
38
|
const propsMeta = {
|
|
34
39
|
props: import_input.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 italic_exports = {};
|
|
20
20
|
__export(italic_exports, {
|
|
21
|
-
Italic: () => Italic
|
|
21
|
+
Italic: () => Italic,
|
|
22
|
+
defaultTag: () => defaultTag
|
|
22
23
|
});
|
|
23
24
|
module.exports = __toCommonJS(italic_exports);
|
|
24
25
|
var import_jsx_runtime = require("react/jsx-runtime");
|