@stealthscale/component-media 0.2.1 → 0.2.2

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.
@@ -0,0 +1,3 @@
1
+ export const dropped = {"AutoplayIndicatorProps": {"conditions": 0, "foreign": 0}, "AutoplayTriggerProps": {"conditions": 284, "foreign": 1051}, "ControlProps": {"conditions": 284, "foreign": 1041}, "IndicatorGroupProps": {"conditions": 284, "foreign": 1041}, "IndicatorProps": {"conditions": 284, "foreign": 1051}, "IndicatorsProps": {"conditions": 0, "foreign": 0}, "ItemGroupProps": {"conditions": 284, "foreign": 1041}, "ItemProps": {"conditions": 284, "foreign": 1041}, "NextTriggerProps": {"conditions": 284, "foreign": 1051}, "PrevTriggerProps": {"conditions": 284, "foreign": 1051}, "ProgressTextProps": {"conditions": 284, "foreign": 1040}, "RootProps": {"conditions": 284, "foreign": 1037}};
2
+ export const parts = {"AutoplayIndicatorProps": [{"accepts": "ReactNode", "fallback": "", "kind": "option", "name": "pause", "refers": ["react.ReactElement", "react.ReactPortal"], "required": true, "says": "Glyph shown while the carousel rotates, the action a press takes."}, {"accepts": "ReactNode", "fallback": "", "kind": "option", "name": "play", "refers": ["react.ReactElement", "react.ReactPortal"], "required": true, "says": "Glyph shown while the carousel does not rotate."}], "AutoplayTriggerProps": [{"accepts": "\"glow\" | \"pulse\"", "fallback": "", "kind": "variant", "name": "effect", "refers": [], "required": false, "says": "The halo around the button, in the palette's solid at half opacity."}, {"accepts": "Lift", "fallback": "", "kind": "variant", "name": "elevation", "refers": ["kit.Lift"], "required": false, "says": ""}, {"accepts": "\"accent\" | \"error\" | \"info\" | \"neutral\" | \"primary\" | \"secondary\" | \"success\" | \"warning\"", "fallback": "", "kind": "variant", "name": "palette", "refers": [], "required": false, "says": "Palette of every look. The base sets `primary`."}, {"accepts": "\"square\"", "fallback": "", "kind": "variant", "name": "shape", "refers": [], "required": false, "says": ""}, {"accepts": "Scale", "fallback": "", "kind": "variant", "name": "size", "refers": ["kit.Scale"], "required": false, "says": ""}, {"accepts": "string", "fallback": "", "kind": "option", "name": "startLabel", "refers": [], "required": false, "says": "Name of the control while the carousel does not rotate, \"Start slide rotation\" unless the caller passes another."}, {"accepts": "string", "fallback": "", "kind": "option", "name": "stopLabel", "refers": [], "required": false, "says": "Name of the control while the carousel rotates, \"Stop slide rotation\" unless the caller passes another."}, {"accepts": "\"ghost\" | \"glass\" | \"outline\" | \"plain\" | \"solid\" | \"subtle\" | \"surface\"", "fallback": "", "kind": "variant", "name": "variant", "refers": [], "required": false, "says": ""}], "ControlProps": [], "IndicatorGroupProps": [], "IndicatorProps": [{"accepts": "number", "fallback": "", "kind": "option", "name": "index", "refers": [], "required": true, "says": "Index of the page the dot moves to, from zero."}, {"accepts": "string", "fallback": "", "kind": "option", "name": "label", "refers": [], "required": false, "says": "Accessible name of the dot, \"Go to slide N\" unless the caller passes another."}, {"accepts": "boolean", "fallback": "", "kind": "option", "name": "readOnly", "refers": [], "required": false, "says": "Whether the dot only shows its page and a press does nothing."}], "IndicatorsProps": [{"accepts": "((page: number) => string)", "fallback": "", "kind": "option", "name": "label", "refers": [], "required": false, "says": "Returns the accessible name of a dot from its page, counted from one. \"Go to slide N\" unless the caller passes another function."}], "ItemGroupProps": [], "ItemProps": [{"accepts": "number", "fallback": "", "kind": "option", "name": "index", "refers": [], "required": true, "says": "Position of the slide among the slides, from zero."}, {"accepts": "\"center\" | \"end\" | \"start\"", "fallback": "", "kind": "option", "name": "snapAlign", "refers": [], "required": false, "says": "Edge of the slide the scroller snaps to, `start` unless the caller passes another."}], "NextTriggerProps": [{"accepts": "\"glow\" | \"pulse\"", "fallback": "", "kind": "variant", "name": "effect", "refers": [], "required": false, "says": "The halo around the button, in the palette's solid at half opacity."}, {"accepts": "Lift", "fallback": "", "kind": "variant", "name": "elevation", "refers": ["kit.Lift"], "required": false, "says": ""}, {"accepts": "string", "fallback": "", "kind": "option", "name": "label", "refers": [], "required": false, "says": "Accessible name of the trigger, \"Next slide\" unless the caller passes another."}, {"accepts": "\"accent\" | \"error\" | \"info\" | \"neutral\" | \"primary\" | \"secondary\" | \"success\" | \"warning\"", "fallback": "", "kind": "variant", "name": "palette", "refers": [], "required": false, "says": "Palette of every look. The base sets `primary`."}, {"accepts": "\"square\"", "fallback": "", "kind": "variant", "name": "shape", "refers": [], "required": false, "says": ""}, {"accepts": "Scale", "fallback": "", "kind": "variant", "name": "size", "refers": ["kit.Scale"], "required": false, "says": ""}, {"accepts": "\"ghost\" | \"glass\" | \"outline\" | \"plain\" | \"solid\" | \"subtle\" | \"surface\"", "fallback": "", "kind": "variant", "name": "variant", "refers": [], "required": false, "says": ""}], "PrevTriggerProps": [{"accepts": "\"glow\" | \"pulse\"", "fallback": "", "kind": "variant", "name": "effect", "refers": [], "required": false, "says": "The halo around the button, in the palette's solid at half opacity."}, {"accepts": "Lift", "fallback": "", "kind": "variant", "name": "elevation", "refers": ["kit.Lift"], "required": false, "says": ""}, {"accepts": "string", "fallback": "", "kind": "option", "name": "label", "refers": [], "required": false, "says": "Accessible name of the trigger, \"Previous slide\" unless the caller passes another."}, {"accepts": "\"accent\" | \"error\" | \"info\" | \"neutral\" | \"primary\" | \"secondary\" | \"success\" | \"warning\"", "fallback": "", "kind": "variant", "name": "palette", "refers": [], "required": false, "says": "Palette of every look. The base sets `primary`."}, {"accepts": "\"square\"", "fallback": "", "kind": "variant", "name": "shape", "refers": [], "required": false, "says": ""}, {"accepts": "Scale", "fallback": "", "kind": "variant", "name": "size", "refers": ["kit.Scale"], "required": false, "says": ""}, {"accepts": "\"ghost\" | \"glass\" | \"outline\" | \"plain\" | \"solid\" | \"subtle\" | \"surface\"", "fallback": "", "kind": "variant", "name": "variant", "refers": [], "required": false, "says": ""}], "ProgressTextProps": [{"accepts": "((details: ProgressTextDetails) => string)", "fallback": "", "kind": "option", "name": "text", "refers": ["carousel.ProgressTextDetails"], "required": false, "says": "Returns the text from the current page and the number of pages, both counted from one."}], "RootProps": [{"accepts": "boolean", "fallback": "false", "kind": "option", "name": "allowMouseDrag", "refers": [], "required": false, "says": "Whether to allow scrolling via dragging with mouse"}, {"accepts": "boolean | { delay: number; }", "fallback": "false", "kind": "option", "name": "autoplay", "refers": [], "required": false, "says": "Whether to scroll automatically. The default delay is 4000ms."}, {"accepts": "boolean", "fallback": "false", "kind": "option", "name": "autoSize", "refers": [], "required": false, "says": "Whether to enable variable width slides."}, {"accepts": "\"outside\" | \"overlay\"", "fallback": "", "kind": "variant", "name": "controls", "refers": [], "required": false, "says": "Where the controls go: beside the slides in the root's flow, or over the slides."}, {"accepts": "number", "fallback": "0", "kind": "option", "name": "defaultPage", "refers": [], "required": false, "says": "The initial page to scroll to when rendered. Use when you don't need to control the page of the carousel."}, {"accepts": "\"ltr\" | \"rtl\"", "fallback": "\"ltr\"", "kind": "option", "name": "dir", "refers": [], "required": false, "says": "The document's text/writing direction."}, {"accepts": "(() => Document | Node | ShadowRoot)", "fallback": "", "kind": "option", "name": "getRootNode", "refers": [], "required": false, "says": "A root node to correctly resolve document in custom environments. E.x.: Iframes, Electron."}, {"accepts": "string", "fallback": "", "kind": "option", "name": "id", "refers": [], "required": false, "says": "The unique identifier of the machine."}, {"accepts": "ElementIds", "fallback": "", "kind": "option", "name": "ids", "refers": ["carousel.ElementIds"], "required": false, "says": "The ids of the elements in the carousel. Useful for composition."}, {"accepts": "number | number[]", "fallback": "0.6", "kind": "option", "name": "inViewThreshold", "refers": [], "required": false, "says": "The threshold for determining if an item is in view."}, {"accepts": "boolean", "fallback": "false", "kind": "option", "name": "loop", "refers": [], "required": false, "says": "Whether the carousel should loop around."}, {"accepts": "((details: AutoplayStatusDetails) => void)", "fallback": "", "kind": "option", "name": "onAutoplayStatusChange", "refers": ["carousel.AutoplayStatusDetails"], "required": false, "says": "Function called when the autoplay status changes."}, {"accepts": "((details: DragStatusDetails) => void)", "fallback": "", "kind": "option", "name": "onDragStatusChange", "refers": ["carousel.DragStatusDetails"], "required": false, "says": "Function called when the drag status changes."}, {"accepts": "((details: PageChangeDetails) => void)", "fallback": "", "kind": "option", "name": "onPageChange", "refers": ["carousel.PageChangeDetails"], "required": false, "says": "Function called when the page changes."}, {"accepts": "\"horizontal\" | \"vertical\"", "fallback": "\"horizontal\"", "kind": "option", "name": "orientation", "refers": [], "required": false, "says": "The orientation of the element."}, {"accepts": "string", "fallback": "", "kind": "option", "name": "padding", "refers": [], "required": false, "says": "Defines the extra space added around the scrollable area, enabling nearby items to remain partially in view."}, {"accepts": "number", "fallback": "", "kind": "option", "name": "page", "refers": [], "required": false, "says": "The controlled page of the carousel."}, {"accepts": "\"accent\" | \"error\" | \"info\" | \"neutral\" | \"primary\" | \"secondary\" | \"success\" | \"warning\"", "fallback": "", "kind": "variant", "name": "palette", "refers": [], "required": false, "says": "Palette of the dots."}, {"accepts": "\"l1\" | \"l2\" | \"l3\"", "fallback": "", "kind": "variant", "name": "radius", "refers": [], "required": false, "says": "Corner radius token of the slides and of the scroller's focus ring."}, {"accepts": "Ratio", "fallback": "", "kind": "variant", "name": "ratio", "refers": ["kit.Ratio"], "required": false, "says": "Aspect ratio token of the scroller, whose height a vertical carousel needs. A horizontal carousel without it is as tall as its slides."}, {"accepts": "number", "fallback": "", "kind": "option", "name": "slideCount", "refers": [], "required": true, "says": "The total number of slides. Useful for SSR to render the initial ating the snap points."}, {"accepts": "number | \"auto\"", "fallback": "\"auto\"", "kind": "option", "name": "slidesPerMove", "refers": [], "required": false, "says": "The number of slides to scroll at a time."}, {"accepts": "number", "fallback": "1", "kind": "option", "name": "slidesPerPage", "refers": [], "required": false, "says": "The number of slides to show at a time."}, {"accepts": "\"mandatory\" | \"proximity\"", "fallback": "\"mandatory\"", "kind": "option", "name": "snapType", "refers": [], "required": false, "says": "The snap type of the item."}, {"accepts": "string", "fallback": "\"0px\"", "kind": "option", "name": "spacing", "refers": [], "required": false, "says": "The amount of space between items."}]};
3
+ export const shapes = {"react.ReactElement": [{"accepts": "string | JSXElementConstructor<any>", "name": "type", "says": ""}, {"accepts": "unknown", "name": "props", "says": ""}, {"accepts": "string | null", "name": "key", "says": ""}], "react.ReactPortal": [{"accepts": "ReactNode", "name": "children", "says": ""}, {"accepts": "string | JSXElementConstructor<any>", "name": "type", "says": ""}, {"accepts": "unknown", "name": "props", "says": ""}, {"accepts": "string | null", "name": "key", "says": ""}], "kit.Lift": [{"accepts": "", "name": "\"floating\"", "says": ""}, {"accepts": "", "name": "\"raised\"", "says": ""}], "kit.Scale": [{"accepts": "", "name": "\"2xl\"", "says": ""}, {"accepts": "", "name": "\"3xl\"", "says": ""}, {"accepts": "", "name": "\"4xl\"", "says": ""}, {"accepts": "", "name": "\"lg\"", "says": ""}, {"accepts": "", "name": "\"md\"", "says": ""}, {"accepts": "", "name": "\"sm\"", "says": ""}, {"accepts": "", "name": "\"xl\"", "says": ""}, {"accepts": "", "name": "\"xs\"", "says": ""}], "carousel.ProgressTextDetails": [{"accepts": "number", "name": "page", "says": ""}, {"accepts": "number", "name": "totalPages", "says": ""}], "carousel.ElementIds": [{"accepts": "string", "name": "root", "says": ""}, {"accepts": "((index: number) => string)", "name": "item", "says": ""}, {"accepts": "string", "name": "itemGroup", "says": ""}, {"accepts": "string", "name": "nextTrigger", "says": ""}, {"accepts": "string", "name": "prevTrigger", "says": ""}, {"accepts": "string", "name": "indicatorGroup", "says": ""}, {"accepts": "((index: number) => string)", "name": "indicator", "says": ""}], "carousel.PageChangeDetails": [{"accepts": "number", "name": "page", "says": ""}, {"accepts": "number", "name": "pageSnapPoint", "says": ""}], "carousel.DragStatusDetails": [{"accepts": "\"dragging\" | \"dragging.end\" | \"dragging.start\"", "name": "type", "says": ""}, {"accepts": "number", "name": "page", "says": ""}, {"accepts": "boolean", "name": "isDragging", "says": ""}], "carousel.AutoplayStatusDetails": [{"accepts": "\"autoplay\" | \"autoplay.start\" | \"autoplay.stop\"", "name": "type", "says": ""}, {"accepts": "number", "name": "page", "says": ""}, {"accepts": "boolean", "name": "isPlaying", "says": ""}], "kit.Ratio": [{"accepts": "", "name": "\"golden\"", "says": ""}, {"accepts": "", "name": "\"landscape\"", "says": ""}, {"accepts": "", "name": "\"portrait\"", "says": ""}, {"accepts": "", "name": "\"square\"", "says": ""}, {"accepts": "", "name": "\"ultrawide\"", "says": ""}, {"accepts": "", "name": "\"video\"", "says": ""}, {"accepts": "", "name": "\"wide\"", "says": ""}]};
@@ -0,0 +1,206 @@
1
+ import { t as __exportAll } from "../../rolldown-runtime-D7D4PA-g.js";
2
+ import { r as recipe } from "../../recipes-CBo6SSP8.js";
3
+ import { f as Iframe } from "../../shared-DH0DrBx7.js";
4
+ import { c } from "react/compiler-runtime";
5
+ import { jsx } from "react/jsx-runtime";
6
+ import { Room, scenesOf, specimen, useWords } from "@stealthscale/specimen";
7
+ //#region src/iframe/examples/email.example.tsx
8
+ var email_example_exports = /* @__PURE__ */ __exportAll({
9
+ Email: () => Email,
10
+ source: () => source$1
11
+ });
12
+ const BODY$1 = "margin:0;padding:24px;font:15px/1.5 system-ui,sans-serif;color:#1f2328;background:#fff";
13
+ function Email(props) {
14
+ const $ = c(20);
15
+ const { i18n, t } = useWords("iframe");
16
+ const t0 = `<!doctype html><html lang="${i18n.language}"><body style="${BODY$1}">`;
17
+ let t1;
18
+ if ($[0] !== t) {
19
+ t1 = t("email.from");
20
+ $[0] = t;
21
+ $[1] = t1;
22
+ } else t1 = $[1];
23
+ const t2 = `<p style="margin:0 0 16px;font-weight:600">${t1}</p>`;
24
+ let t3;
25
+ if ($[2] !== t) {
26
+ t3 = t("email.heading");
27
+ $[2] = t;
28
+ $[3] = t3;
29
+ } else t3 = $[3];
30
+ const t4 = `<h1 style="margin:0 0 8px;font-size:20px">${t3}</h1>`;
31
+ let t5;
32
+ if ($[4] !== t) {
33
+ t5 = t("email.body");
34
+ $[4] = t;
35
+ $[5] = t5;
36
+ } else t5 = $[5];
37
+ const t6 = `<p style="margin:0 0 16px">${t5}</p>`;
38
+ let t7;
39
+ if ($[6] !== t) {
40
+ t7 = t("email.amount");
41
+ $[6] = t;
42
+ $[7] = t7;
43
+ } else t7 = $[7];
44
+ const t8 = `<p style="margin:0;font-size:24px;font-weight:600">${t7}</p>`;
45
+ let t9;
46
+ if ($[8] !== t0 || $[9] !== t2 || $[10] !== t4 || $[11] !== t6 || $[12] !== t8) {
47
+ t9 = [
48
+ t0,
49
+ t2,
50
+ t4,
51
+ t6,
52
+ t8,
53
+ "</body></html>"
54
+ ];
55
+ $[8] = t0;
56
+ $[9] = t2;
57
+ $[10] = t4;
58
+ $[11] = t6;
59
+ $[12] = t8;
60
+ $[13] = t9;
61
+ } else t9 = $[13];
62
+ const html = t9.join("");
63
+ let t10;
64
+ if ($[14] !== t) {
65
+ t10 = t("email.title");
66
+ $[14] = t;
67
+ $[15] = t10;
68
+ } else t10 = $[15];
69
+ let t11;
70
+ if ($[16] !== html || $[17] !== props || $[18] !== t10) {
71
+ t11 = /* @__PURE__ */ jsx(Iframe, {
72
+ srcDoc: html,
73
+ title: t10,
74
+ ...props
75
+ });
76
+ $[16] = html;
77
+ $[17] = props;
78
+ $[18] = t10;
79
+ $[19] = t11;
80
+ } else t11 = $[19];
81
+ return t11;
82
+ }
83
+ const source$1 = "import { type ReactElement } from \"react\";\n\nimport { useWords } from \"@stealthscale/specimen\";\n\nimport { Iframe, IframeProps } from \"@stealthscale/component-media\";\n\nconst BODY =\n \"margin:0;padding:24px;font:15px/1.5 system-ui,sans-serif;color:#1f2328;background:#fff\";\n\nexport function Email(props: Omit<IframeProps, \"title\">): ReactElement {\n const { i18n, t } = useWords(\"iframe\");\n const html = [\n `<!doctype html><html lang=\"${i18n.language}\"><body style=\"${BODY}\">`,\n `<p style=\"margin:0 0 16px;font-weight:600\">${t(\"email.from\")}</p>`,\n `<h1 style=\"margin:0 0 8px;font-size:20px\">${t(\"email.heading\")}</h1>`,\n `<p style=\"margin:0 0 16px\">${t(\"email.body\")}</p>`,\n `<p style=\"margin:0;font-size:24px;font-weight:600\">${t(\"email.amount\")}</p>`,\n \"</body></html>\",\n ].join(\"\");\n\n return <Iframe srcDoc={html} title={t(\"email.title\")} {...props} />;\n}\n";
84
+ //#endregion
85
+ //#region src/iframe/examples/widget.example.tsx
86
+ var widget_example_exports = /* @__PURE__ */ __exportAll({
87
+ Widget: () => Widget,
88
+ source: () => source
89
+ });
90
+ const BODY = "margin:0;padding:16px;font:15px/1.5 system-ui,sans-serif;color:#1f2328;background:#fff";
91
+ const SCRIPT = "const input=document.querySelector('input');const output=document.querySelector('output');const show=()=>{output.textContent=(Number(input.value)*0.92).toFixed(2)};input.addEventListener('input',show);show();";
92
+ function Widget() {
93
+ const $ = c(13);
94
+ const { i18n, t } = useWords("iframe");
95
+ const t0 = `<!doctype html><html lang="${i18n.language}"><body style="${BODY}">`;
96
+ let t1;
97
+ if ($[0] !== t) {
98
+ t1 = t("widget.amount");
99
+ $[0] = t;
100
+ $[1] = t1;
101
+ } else t1 = $[1];
102
+ const t2 = `<label style="display:block;margin:0 0 8px">${t1} `;
103
+ let t3;
104
+ if ($[2] !== t) {
105
+ t3 = t("widget.converted");
106
+ $[2] = t;
107
+ $[3] = t3;
108
+ } else t3 = $[3];
109
+ const t4 = `<p style="margin:0">${t3} <output>0</output> EUR</p>`;
110
+ let t5;
111
+ if ($[4] !== t0 || $[5] !== t2 || $[6] !== t4) {
112
+ t5 = [
113
+ t0,
114
+ t2,
115
+ "<input inputmode=\"decimal\" style=\"font:inherit;width:8em\" value=\"250\"></label>",
116
+ t4,
117
+ `<script>${SCRIPT}<\/script>`,
118
+ "</body></html>"
119
+ ];
120
+ $[4] = t0;
121
+ $[5] = t2;
122
+ $[6] = t4;
123
+ $[7] = t5;
124
+ } else t5 = $[7];
125
+ const html = t5.join("");
126
+ let t6;
127
+ if ($[8] !== t) {
128
+ t6 = t("widget.title");
129
+ $[8] = t;
130
+ $[9] = t6;
131
+ } else t6 = $[9];
132
+ let t7;
133
+ if ($[10] !== html || $[11] !== t6) {
134
+ t7 = /* @__PURE__ */ jsx(Iframe, {
135
+ ratio: "wide",
136
+ sandbox: "allow-scripts",
137
+ srcDoc: html,
138
+ title: t6
139
+ });
140
+ $[10] = html;
141
+ $[11] = t6;
142
+ $[12] = t7;
143
+ } else t7 = $[12];
144
+ return t7;
145
+ }
146
+ const source = "import { type ReactElement } from \"react\";\n\nimport { useWords } from \"@stealthscale/specimen\";\n\nimport { Iframe } from \"@stealthscale/component-media\";\n\nconst BODY =\n \"margin:0;padding:16px;font:15px/1.5 system-ui,sans-serif;color:#1f2328;background:#fff\";\n\nconst SCRIPT =\n \"const input=document.querySelector('input');const output=document.querySelector('output');\" +\n \"const show=()=>{output.textContent=(Number(input.value)*0.92).toFixed(2)};\" +\n \"input.addEventListener('input',show);show();\";\n\nexport function Widget(): ReactElement {\n const { i18n, t } = useWords(\"iframe\");\n const html = [\n `<!doctype html><html lang=\"${i18n.language}\"><body style=\"${BODY}\">`,\n `<label style=\"display:block;margin:0 0 8px\">${t(\"widget.amount\")} `,\n '<input inputmode=\"decimal\" style=\"font:inherit;width:8em\" value=\"250\"></label>',\n `<p style=\"margin:0\">${t(\"widget.converted\")} <output>0</output> EUR</p>`,\n `<script>${SCRIPT}<\/script>`,\n \"</body></html>\",\n ].join(\"\");\n\n return <Iframe ratio=\"wide\" sandbox=\"allow-scripts\" srcDoc={html} title={t(\"widget.title\")} />;\n}\n";
147
+ //#endregion
148
+ //#region src/iframe/iframe.specimen.tsx
149
+ /**
150
+ * Catalogue page for the sandboxed frame.
151
+ *
152
+ * @remarks
153
+ * `scenesOf` generates the ratio and corner scenes from the email preview, each frame in an `sm`
154
+ * room. The corner scene holds the square ratio, which fits the whole email at every width.
155
+ * The hand-written scenes show the preview with the sandbox that grants nothing, and a
156
+ * converter that needs scripts with the one capability it needs. Every frame renders its document
157
+ * from `srcDoc`, so no scene loads from the network. The words are keys under `iframe` in
158
+ * `locales/en/specimen/iframe.json`.
159
+ */
160
+ /**
161
+ * Hand-written scene for an email preview in a frame that grants nothing.
162
+ */
163
+ const preview = {
164
+ about: "iframe.preview.about",
165
+ draw: () => /* @__PURE__ */ jsx(Room, {
166
+ size: "sm",
167
+ children: /* @__PURE__ */ jsx(Email, { ratio: "portrait" })
168
+ }),
169
+ example: email_example_exports,
170
+ props: { ratio: "portrait" },
171
+ title: "iframe.preview.title"
172
+ };
173
+ /**
174
+ * Hand-written scene for a framed converter that needs scripts.
175
+ */
176
+ const scripted = {
177
+ about: "iframe.scripted.about",
178
+ draw: () => /* @__PURE__ */ jsx(Room, {
179
+ size: "sm",
180
+ children: /* @__PURE__ */ jsx(Widget, {})
181
+ }),
182
+ example: widget_example_exports,
183
+ title: "iframe.scripted.title"
184
+ };
185
+ var iframe_specimen_default = specimen({
186
+ about: "iframe.about",
187
+ id: "components/media/iframe",
188
+ imports: "import { Iframe } from \"@stealthscale/component-media\";",
189
+ scenes: [
190
+ preview,
191
+ scripted,
192
+ ...scenesOf(recipe, {
193
+ axes: { radius: { with: { ratio: "square" } } },
194
+ draw: (props) => /* @__PURE__ */ jsx(Room, {
195
+ size: "sm",
196
+ children: /* @__PURE__ */ jsx(Email, { ...props })
197
+ }),
198
+ example: email_example_exports,
199
+ namespace: "iframe",
200
+ order: ["ratio", "radius"]
201
+ })
202
+ ],
203
+ title: "iframe.title"
204
+ });
205
+ //#endregion
206
+ export { iframe_specimen_default as default, preview, scripted };
@@ -0,0 +1,3 @@
1
+ export const dropped = {"IframeProps": {"conditions": 284, "foreign": 1054}};
2
+ export const parts = {"IframeProps": [{"accepts": "\"l1\" | \"l2\" | \"l3\"", "fallback": "", "kind": "variant", "name": "radius", "refers": [], "required": false, "says": "Corner radius token. The axis leaves out `full`, because a framed document's content reaches the frame's corners and a fully round corner clips it."}, {"accepts": "Ratio", "fallback": "", "kind": "variant", "name": "ratio", "refers": ["kit.Ratio"], "required": false, "says": "Aspect ratio token the frame keeps before and after its document loads."}, {"accepts": "string", "fallback": "", "kind": "option", "name": "title", "refers": [], "required": true, "says": "Accessible name of the frame: what it shows, such as \"Preview of the March invoice email\", for a reader who cannot see it."}]};
3
+ export const shapes = {"kit.Ratio": [{"accepts": "", "name": "\"golden\"", "says": ""}, {"accepts": "", "name": "\"landscape\"", "says": ""}, {"accepts": "", "name": "\"portrait\"", "says": ""}, {"accepts": "", "name": "\"square\"", "says": ""}, {"accepts": "", "name": "\"ultrawide\"", "says": ""}, {"accepts": "", "name": "\"video\"", "says": ""}, {"accepts": "", "name": "\"wide\"", "says": ""}]};