@fusion.dev/helix 0.182.2 → 0.184.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/custom-elements.json +477 -116
- package/dist/bar-chart/root/bar-chart-root.css.js +1 -1
- package/dist/code-block/index.d.ts +1 -0
- package/dist/code-block/index.js +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/menu/filter/index.d.ts +1 -0
- package/dist/menu/filter/index.js +5 -0
- package/dist/menu/filter/menu-filter.css.d.ts +1 -0
- package/dist/menu/filter/menu-filter.css.js +2 -0
- package/dist/menu/root/menu-root.css.js +1 -1
- package/dist/sandbox/compile.d.ts +63 -0
- package/dist/sandbox/compile.js +52 -0
- package/dist/sandbox/preview/sandbox-preview.d.ts +29 -1
- package/dist/sandbox/preview/sandbox-preview.js +45 -7
- package/dist/sandbox/root/sandbox-root.d.ts +4 -0
- package/dist/sandbox/root/sandbox-root.js +1 -1
- package/lint.json +1 -1
- package/package.json +6 -6
- package/types/jsx.d.ts +144 -16
- package/types/vue.d.ts +36 -6
- package/types/words.d.ts +7 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fusion.dev/helix",
|
|
3
3
|
"description": "Styled component tier. Extends the headless tier with token-driven presentation.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.184.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Ross Sheppard <ross.sheppard@fusion.dev>",
|
|
7
7
|
"repository": {
|
|
@@ -54,14 +54,14 @@
|
|
|
54
54
|
},
|
|
55
55
|
"bugs": "https://github.com/project-fusion/fusion/issues",
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@fusion.dev/helix-core": "0.
|
|
58
|
-
"@fusion.dev/helix-headless": "0.
|
|
59
|
-
"@fusion.dev/helix-styles": "0.
|
|
57
|
+
"@fusion.dev/helix-core": "0.184.0",
|
|
58
|
+
"@fusion.dev/helix-headless": "0.184.0",
|
|
59
|
+
"@fusion.dev/helix-styles": "0.184.0",
|
|
60
60
|
"tslib": "^2.8.1"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
|
-
"@fusion.dev/helix-cem": "0.
|
|
64
|
-
"@fusion.dev/helix-testing": "0.
|
|
63
|
+
"@fusion.dev/helix-cem": "0.184.0",
|
|
64
|
+
"@fusion.dev/helix-testing": "0.184.0",
|
|
65
65
|
"@fusion.dev/scripts": "0.0.0-dev",
|
|
66
66
|
"@happy-dom/global-registrator": "^20.14.5",
|
|
67
67
|
"@lit-labs/ssr": "^4.1.0",
|
package/types/jsx.d.ts
CHANGED
|
@@ -8045,7 +8045,11 @@ whole of it, which Shiki writes, are taken off, so the lines sit level
|
|
|
8045
8045
|
with the gutter's numbers and the block keeps one tab stop. The code stays
|
|
8046
8046
|
in the slot, so the copy button copies it as written and a reader without
|
|
8047
8047
|
the script still has it. Not called on a server, which has no code to
|
|
8048
|
-
read, nor for a diff.
|
|
8048
|
+
read, nor for a diff.
|
|
8049
|
+
|
|
8050
|
+
Absent, the block draws with the highlighter `registerHighlighter` gave
|
|
8051
|
+
every block, where an entry such as `@fusion.dev/helix-sandbox/code-block`
|
|
8052
|
+
registered one, and plain otherwise. */
|
|
8049
8053
|
highlight?: (HelixCodeBlock["highlight"]) | undefined;
|
|
8050
8054
|
|
|
8051
8055
|
/** A file tab showed its file, whose name `file` now holds. */
|
|
@@ -8285,7 +8289,11 @@ whole of it, which Shiki writes, are taken off, so the lines sit level
|
|
|
8285
8289
|
with the gutter's numbers and the block keeps one tab stop. The code stays
|
|
8286
8290
|
in the slot, so the copy button copies it as written and a reader without
|
|
8287
8291
|
the script still has it. Not called on a server, which has no code to
|
|
8288
|
-
read, nor for a diff.
|
|
8292
|
+
read, nor for a diff.
|
|
8293
|
+
|
|
8294
|
+
Absent, the block draws with the highlighter `registerHighlighter` gave
|
|
8295
|
+
every block, where an entry such as `@fusion.dev/helix-sandbox/code-block`
|
|
8296
|
+
registered one, and plain otherwise. */
|
|
8289
8297
|
"prop:highlight"?: (HelixCodeBlock["highlight"]) | undefined;
|
|
8290
8298
|
/** A file tab showed its file, whose name `file` now holds. */
|
|
8291
8299
|
"on:change"?: ((e: HelixCodeBlockElementEvent) => void) | undefined;
|
|
@@ -24301,7 +24309,11 @@ Cleared as the menu closes and as a submenu opens or closes, so each page
|
|
|
24301
24309
|
starts with every row showing. */
|
|
24302
24310
|
filter?: (HelixMenu["filter"]) | undefined;
|
|
24303
24311
|
/** Whether the menu shows a field above its rows that narrows them as the
|
|
24304
|
-
reader types, with focus staying in the field
|
|
24312
|
+
reader types, with focus staying in the field, once
|
|
24313
|
+
`@fusion.dev/helix/menu/filter` (or `@fusion.dev/helix-headless/menu/filter`)
|
|
24314
|
+
is imported. Without that import it does nothing, so a menu that never
|
|
24315
|
+
filters carries none of the filter's code, and a development build says
|
|
24316
|
+
which import is missing. */
|
|
24305
24317
|
filterable?: (HelixMenu["filterable"]) | undefined;
|
|
24306
24318
|
/** The filter field's name and placeholder. */
|
|
24307
24319
|
"filter-label"?: (HelixMenu["filterLabel"]) | undefined;
|
|
@@ -24435,7 +24447,11 @@ Cleared as the menu closes and as a submenu opens or closes, so each page
|
|
|
24435
24447
|
starts with every row showing. */
|
|
24436
24448
|
"prop:filter"?: (HelixMenu["filter"]) | undefined;
|
|
24437
24449
|
/** Whether the menu shows a field above its rows that narrows them as the
|
|
24438
|
-
reader types, with focus staying in the field
|
|
24450
|
+
reader types, with focus staying in the field, once
|
|
24451
|
+
`@fusion.dev/helix/menu/filter` (or `@fusion.dev/helix-headless/menu/filter`)
|
|
24452
|
+
is imported. Without that import it does nothing, so a menu that never
|
|
24453
|
+
filters carries none of the filter's code, and a development build says
|
|
24454
|
+
which import is missing. */
|
|
24439
24455
|
"prop:filterable"?: (HelixMenu["filterable"]) | undefined;
|
|
24440
24456
|
/** The filter field's name and placeholder. */
|
|
24441
24457
|
"attr:filter-label"?: (HelixMenu["filterLabel"]) | undefined;
|
|
@@ -36806,6 +36822,12 @@ number, and both are carried as one comma-separated value, which is what a
|
|
|
36806
36822
|
form submits. `TimePicker` carries the longer note on the interaction and
|
|
36807
36823
|
on why a wheel cannot do either. */
|
|
36808
36824
|
mode?: (HelixTimeInput["mode"]) | undefined;
|
|
36825
|
+
/** The words on the list's button that chooses the current time, drawn with
|
|
36826
|
+
`show-now`. */
|
|
36827
|
+
"now-label"?: (HelixTimeInput["nowLabel"]) | undefined;
|
|
36828
|
+
/** The words on the list's button that chooses the current time, drawn with
|
|
36829
|
+
`show-now`. */
|
|
36830
|
+
nowLabel?: (HelixTimeInput["nowLabel"]) | undefined;
|
|
36809
36831
|
/** Placeholder text shown before a time is entered. */
|
|
36810
36832
|
placeholder?: (HelixTimeInput["placeholder"]) | undefined;
|
|
36811
36833
|
/** The message shown when a range holds more than two times.
|
|
@@ -36846,6 +36868,14 @@ removes rather than as "Remove" said once per time. */
|
|
|
36846
36868
|
may give them, the field writes them, and the list's `step` counts seconds.
|
|
36847
36869
|
See Time Picker's `seconds`. */
|
|
36848
36870
|
seconds?: (HelixTimeInput["seconds"]) | undefined;
|
|
36871
|
+
/** Draws a button under the times in the list that chooses the current time,
|
|
36872
|
+
moved to the nearest time on offer. See Time Picker's `show-now`. Its words
|
|
36873
|
+
are `now-label`. */
|
|
36874
|
+
"show-now"?: (HelixTimeInput["showNow"]) | undefined;
|
|
36875
|
+
/** Draws a button under the times in the list that chooses the current time,
|
|
36876
|
+
moved to the nearest time on offer. See Time Picker's `show-now`. Its words
|
|
36877
|
+
are `now-label`. */
|
|
36878
|
+
showNow?: (HelixTimeInput["showNow"]) | undefined;
|
|
36849
36879
|
/** How far apart the offered times are, in minutes, or in seconds with
|
|
36850
36880
|
`seconds`. */
|
|
36851
36881
|
step?: (HelixTimeInput["step"]) | undefined;
|
|
@@ -37214,6 +37244,12 @@ number, and both are carried as one comma-separated value, which is what a
|
|
|
37214
37244
|
form submits. `TimePicker` carries the longer note on the interaction and
|
|
37215
37245
|
on why a wheel cannot do either. */
|
|
37216
37246
|
"prop:mode"?: (HelixTimeInput["mode"]) | undefined;
|
|
37247
|
+
/** The words on the list's button that chooses the current time, drawn with
|
|
37248
|
+
`show-now`. */
|
|
37249
|
+
"attr:now-label"?: (HelixTimeInput["nowLabel"]) | undefined;
|
|
37250
|
+
/** The words on the list's button that chooses the current time, drawn with
|
|
37251
|
+
`show-now`. */
|
|
37252
|
+
"prop:nowLabel"?: (HelixTimeInput["nowLabel"]) | undefined;
|
|
37217
37253
|
/** Placeholder text shown before a time is entered. */
|
|
37218
37254
|
"prop:placeholder"?: (HelixTimeInput["placeholder"]) | undefined;
|
|
37219
37255
|
/** The message shown when a range holds more than two times.
|
|
@@ -37254,6 +37290,14 @@ removes rather than as "Remove" said once per time. */
|
|
|
37254
37290
|
may give them, the field writes them, and the list's `step` counts seconds.
|
|
37255
37291
|
See Time Picker's `seconds`. */
|
|
37256
37292
|
"prop:seconds"?: (HelixTimeInput["seconds"]) | undefined;
|
|
37293
|
+
/** Draws a button under the times in the list that chooses the current time,
|
|
37294
|
+
moved to the nearest time on offer. See Time Picker's `show-now`. Its words
|
|
37295
|
+
are `now-label`. */
|
|
37296
|
+
"bool:show-now"?: (HelixTimeInput["showNow"]) | undefined;
|
|
37297
|
+
/** Draws a button under the times in the list that chooses the current time,
|
|
37298
|
+
moved to the nearest time on offer. See Time Picker's `show-now`. Its words
|
|
37299
|
+
are `now-label`. */
|
|
37300
|
+
"prop:showNow"?: (HelixTimeInput["showNow"]) | undefined;
|
|
37257
37301
|
/** How far apart the offered times are, in minutes, or in seconds with
|
|
37258
37302
|
`seconds`. */
|
|
37259
37303
|
"prop:step"?: (HelixTimeInput["step"]) | undefined;
|
|
@@ -42018,6 +42062,13 @@ are rendered at a time.
|
|
|
42018
42062
|
An `aria-label` or `aria-labelledby` on the host names the list too, and
|
|
42019
42063
|
wins over this. */
|
|
42020
42064
|
label?: (HelixVirtualList["label"]) | undefined;
|
|
42065
|
+
/** How items of more than one column are laid out. `grid`, the default, puts
|
|
42066
|
+
them in lines of equal columns. `waterfall` puts each item, in the order
|
|
42067
|
+
of the set, under the column that ends highest, as a wall of photos of
|
|
42068
|
+
different heights is: `columns`, or `min-column-width`, says how many
|
|
42069
|
+
columns. Rows of a waterfall are measured, and Up and Down move along a
|
|
42070
|
+
column. */
|
|
42071
|
+
layout?: (HelixVirtualList["layout"]) | undefined;
|
|
42021
42072
|
/** Marks the list as busy fetching more items, and draws a row after the last
|
|
42022
42073
|
item that says so.
|
|
42023
42074
|
|
|
@@ -42050,14 +42101,15 @@ follows the box as it resizes, which `columns` then does not decide. */
|
|
|
42050
42101
|
/** Which way the list runs. `horizontal` lays the items out along a line
|
|
42051
42102
|
and scrolls it sideways: Left and Right move between items, the other
|
|
42052
42103
|
way round on a right-to-left page, and `estimate` is an item's width. A
|
|
42053
|
-
grid always
|
|
42104
|
+
grid and a waterfall always run down. */
|
|
42054
42105
|
orientation?: (HelixVirtualList["orientation"]) | undefined;
|
|
42055
42106
|
/** Lets a reader move items, once `@fusion.dev/helix/virtual-list/reorder`
|
|
42056
42107
|
(or `@fusion.dev/helix-headless/virtual-list/reorder`) is imported: Alt
|
|
42057
42108
|
with an arrow moves the row the keys are on, and a pointer drags a row.
|
|
42058
42109
|
The list moves no item itself: you move your `items` on `helix-reorder`.
|
|
42059
42110
|
Without that import it does nothing, so a list that never moves items
|
|
42060
|
-
carries none of the code. A list of one column, without sections
|
|
42111
|
+
carries none of the code. A list of one column, without sections or a
|
|
42112
|
+
waterfall. */
|
|
42061
42113
|
reorderable?: (HelixVirtualList["reorderable"]) | undefined;
|
|
42062
42114
|
/** The field of each item that names its section, as a key or a path of
|
|
42063
42115
|
keys. Set, the items are drawn in sections: a header, then the items, in
|
|
@@ -42182,6 +42234,13 @@ are rendered at a time.
|
|
|
42182
42234
|
An `aria-label` or `aria-labelledby` on the host names the list too, and
|
|
42183
42235
|
wins over this. */
|
|
42184
42236
|
"prop:label"?: (HelixVirtualList["label"]) | undefined;
|
|
42237
|
+
/** How items of more than one column are laid out. `grid`, the default, puts
|
|
42238
|
+
them in lines of equal columns. `waterfall` puts each item, in the order
|
|
42239
|
+
of the set, under the column that ends highest, as a wall of photos of
|
|
42240
|
+
different heights is: `columns`, or `min-column-width`, says how many
|
|
42241
|
+
columns. Rows of a waterfall are measured, and Up and Down move along a
|
|
42242
|
+
column. */
|
|
42243
|
+
"prop:layout"?: (HelixVirtualList["layout"]) | undefined;
|
|
42185
42244
|
/** Marks the list as busy fetching more items, and draws a row after the last
|
|
42186
42245
|
item that says so.
|
|
42187
42246
|
|
|
@@ -42214,14 +42273,15 @@ follows the box as it resizes, which `columns` then does not decide. */
|
|
|
42214
42273
|
/** Which way the list runs. `horizontal` lays the items out along a line
|
|
42215
42274
|
and scrolls it sideways: Left and Right move between items, the other
|
|
42216
42275
|
way round on a right-to-left page, and `estimate` is an item's width. A
|
|
42217
|
-
grid always
|
|
42276
|
+
grid and a waterfall always run down. */
|
|
42218
42277
|
"prop:orientation"?: (HelixVirtualList["orientation"]) | undefined;
|
|
42219
42278
|
/** Lets a reader move items, once `@fusion.dev/helix/virtual-list/reorder`
|
|
42220
42279
|
(or `@fusion.dev/helix-headless/virtual-list/reorder`) is imported: Alt
|
|
42221
42280
|
with an arrow moves the row the keys are on, and a pointer drags a row.
|
|
42222
42281
|
The list moves no item itself: you move your `items` on `helix-reorder`.
|
|
42223
42282
|
Without that import it does nothing, so a list that never moves items
|
|
42224
|
-
carries none of the code. A list of one column, without sections
|
|
42283
|
+
carries none of the code. A list of one column, without sections or a
|
|
42284
|
+
waterfall. */
|
|
42225
42285
|
"prop:reorderable"?: (HelixVirtualList["reorderable"]) | undefined;
|
|
42226
42286
|
/** The field of each item that names its section, as a key or a path of
|
|
42227
42287
|
keys. Set, the items are drawn in sections: a header, then the items, in
|
|
@@ -44148,6 +44208,7 @@ export type CustomElements = {
|
|
|
44148
44208
|
* - `bar`: One column. Under `stacked`, one segment of a category's column.
|
|
44149
44209
|
* - `bar-end`: The bar at a column's far end, the end away from zero, which is the end to round. A column standing alone is its own far end. Under `stacked`, the last positive segment above zero and the last negative one below it. Its `data-end` is `positive` or `negative`. A blank or a zero is never the end. Set together with `bar`.
|
|
44150
44210
|
* - `bar-end-negative`: A far end below zero, whose far end is its bottom, or its inline start when the bars run across. Set together with `bar-end`.
|
|
44211
|
+
* - `bar-negative`: A bar below zero, standing alone or any segment of a stack below it, whose base is its top, or its inline end when the bars run across. Set together with `bar`.
|
|
44151
44212
|
* - `bar-wash-end`: The far stop of a bar's gradient, where one is used.
|
|
44152
44213
|
* - `bar-wash-start`: The stop of a bar's gradient at its base.
|
|
44153
44214
|
* - `baseline`: The line the columns stand on.
|
|
@@ -47493,7 +47554,11 @@ export type CustomElements = {
|
|
|
47493
47554
|
* with the gutter's numbers and the block keeps one tab stop. The code stays
|
|
47494
47555
|
* in the slot, so the copy button copies it as written and a reader without
|
|
47495
47556
|
* the script still has it. Not called on a server, which has no code to
|
|
47496
|
-
* read, nor for a diff.
|
|
47557
|
+
* read, nor for a diff.
|
|
47558
|
+
*
|
|
47559
|
+
* Absent, the block draws with the highlighter `registerHighlighter` gave
|
|
47560
|
+
* every block, where an entry such as `@fusion.dev/helix-sandbox/code-block`
|
|
47561
|
+
* registered one, and plain otherwise. (property only)
|
|
47497
47562
|
* - `whenSettled`: Resolves a frame after the first update, when transitions are switched on.
|
|
47498
47563
|
*
|
|
47499
47564
|
* **Named `whenSettled` because `settled` is taken four times over**, by
|
|
@@ -58347,7 +58412,11 @@ export type CustomElements = {
|
|
|
58347
58412
|
* Cleared as the menu closes and as a submenu opens or closes, so each page
|
|
58348
58413
|
* starts with every row showing.
|
|
58349
58414
|
* - `filterable`: Whether the menu shows a field above its rows that narrows them as the
|
|
58350
|
-
* reader types, with focus staying in the field
|
|
58415
|
+
* reader types, with focus staying in the field, once
|
|
58416
|
+
* `@fusion.dev/helix/menu/filter` (or `@fusion.dev/helix-headless/menu/filter`)
|
|
58417
|
+
* is imported. Without that import it does nothing, so a menu that never
|
|
58418
|
+
* filters carries none of the filter's code, and a development build says
|
|
58419
|
+
* which import is missing.
|
|
58351
58420
|
* - `filter-label`/`filterLabel`: The filter field's name and placeholder.
|
|
58352
58421
|
* - `label`: Accessible name for the surface.
|
|
58353
58422
|
*
|
|
@@ -62660,6 +62729,15 @@ export type CustomElements = {
|
|
|
62660
62729
|
* in the `js` pane or in another module loads it. A sandbox writes each pane
|
|
62661
62730
|
* named for a module file here.
|
|
62662
62731
|
*
|
|
62732
|
+
* **A module in TypeScript or JSX runs too**: a path ending in `.ts`, `.tsx`
|
|
62733
|
+
* or `.jsx` is compiled to JavaScript first, and imported by its path or by
|
|
62734
|
+
* its path without the extension. The compiler, Sucrase, loads from `cdn` the
|
|
62735
|
+
* first time a module needs it, so the package carries none and a preview
|
|
62736
|
+
* with no such module loads none. JSX compiles to the automatic runtime,
|
|
62737
|
+
* `react/jsx-runtime`, from `dependencies`, or to the one a
|
|
62738
|
+
* `@jsxImportSource` comment names. What fails to compile shows in the
|
|
62739
|
+
* `error` part as an error the example threw, when the example imports it.
|
|
62740
|
+
*
|
|
62663
62741
|
* **Examples render in a frame**, so an example's styles and scripts do not
|
|
62664
62742
|
* affect the page around the sandbox, and `position: fixed` stays inside the
|
|
62665
62743
|
* pane. The frame starts empty, with its own stylesheets and its own custom
|
|
@@ -62843,6 +62921,10 @@ export type CustomElements = {
|
|
|
62843
62921
|
* - `js` sets a script that runs as a module after the markup.
|
|
62844
62922
|
* - A module file name ending in `.js` or `.mjs`, such as `utils.js`, is a
|
|
62845
62923
|
* module the other scripts import by its path, `./utils.js`.
|
|
62924
|
+
* - A module file name ending in `.ts`, `.tsx` or `.jsx`, such as `app.tsx`,
|
|
62925
|
+
* is one too, which the preview compiles to JavaScript first. The `js` pane
|
|
62926
|
+
* runs it with `import './app.tsx'`. A file that does not compile shows
|
|
62927
|
+
* why over the preview, as an error the example threw.
|
|
62846
62928
|
* - `package.json` sets the npm packages the scripts import by name, from its
|
|
62847
62929
|
* `dependencies`, which load from the preview's `cdn`.
|
|
62848
62930
|
*
|
|
@@ -68224,6 +68306,8 @@ export type CustomElements = {
|
|
|
68224
68306
|
* number, and both are carried as one comma-separated value, which is what a
|
|
68225
68307
|
* form submits. `TimePicker` carries the longer note on the interaction and
|
|
68226
68308
|
* on why a wheel cannot do either.
|
|
68309
|
+
* - `now-label`/`nowLabel`: The words on the list's button that chooses the current time, drawn with
|
|
68310
|
+
* `show-now`.
|
|
68227
68311
|
* - `placeholder`: Placeholder text shown before a time is entered.
|
|
68228
68312
|
* - `range-length-message`/`rangeLengthMessage`: The message shown when a range holds more than two times.
|
|
68229
68313
|
*
|
|
@@ -68241,6 +68325,9 @@ export type CustomElements = {
|
|
|
68241
68325
|
* - `seconds`: Whether times carry their seconds: the value is `HH:mm:ss`, a typed time
|
|
68242
68326
|
* may give them, the field writes them, and the list's `step` counts seconds.
|
|
68243
68327
|
* See Time Picker's `seconds`.
|
|
68328
|
+
* - `show-now`/`showNow`: Draws a button under the times in the list that chooses the current time,
|
|
68329
|
+
* moved to the nearest time on offer. See Time Picker's `show-now`. Its words
|
|
68330
|
+
* are `now-label`.
|
|
68244
68331
|
* - `step`: How far apart the offered times are, in minutes, or in seconds with
|
|
68245
68332
|
* `seconds`.
|
|
68246
68333
|
* - `time-style`/`timeStyle`: Whether the field shows the time in the local style or as the value
|
|
@@ -71855,6 +71942,12 @@ export type CustomElements = {
|
|
|
71855
71942
|
*
|
|
71856
71943
|
* An `aria-label` or `aria-labelledby` on the host names the list too, and
|
|
71857
71944
|
* wins over this.
|
|
71945
|
+
* - `layout`: How items of more than one column are laid out. `grid`, the default, puts
|
|
71946
|
+
* them in lines of equal columns. `waterfall` puts each item, in the order
|
|
71947
|
+
* of the set, under the column that ends highest, as a wall of photos of
|
|
71948
|
+
* different heights is: `columns`, or `min-column-width`, says how many
|
|
71949
|
+
* columns. Rows of a waterfall are measured, and Up and Down move along a
|
|
71950
|
+
* column.
|
|
71858
71951
|
* - `loading`: Marks the list as busy fetching more items, and draws a row after the last
|
|
71859
71952
|
* item that says so.
|
|
71860
71953
|
*
|
|
@@ -71877,13 +71970,14 @@ export type CustomElements = {
|
|
|
71877
71970
|
* - `orientation`: Which way the list runs. `horizontal` lays the items out along a line
|
|
71878
71971
|
* and scrolls it sideways: Left and Right move between items, the other
|
|
71879
71972
|
* way round on a right-to-left page, and `estimate` is an item's width. A
|
|
71880
|
-
* grid always
|
|
71973
|
+
* grid and a waterfall always run down.
|
|
71881
71974
|
* - `reorderable`: Lets a reader move items, once `@fusion.dev/helix/virtual-list/reorder`
|
|
71882
71975
|
* (or `@fusion.dev/helix-headless/virtual-list/reorder`) is imported: Alt
|
|
71883
71976
|
* with an arrow moves the row the keys are on, and a pointer drags a row.
|
|
71884
71977
|
* The list moves no item itself: you move your `items` on `helix-reorder`.
|
|
71885
71978
|
* Without that import it does nothing, so a list that never moves items
|
|
71886
|
-
* carries none of the code. A list of one column, without sections
|
|
71979
|
+
* carries none of the code. A list of one column, without sections or a
|
|
71980
|
+
* waterfall.
|
|
71887
71981
|
* - `section-field`/`sectionField`: The field of each item that names its section, as a key or a path of
|
|
71888
71982
|
* keys. Set, the items are drawn in sections: a header, then the items, in
|
|
71889
71983
|
* an element with the `group` role that the header names. A section starts
|
|
@@ -73888,6 +73982,7 @@ export type CustomElementsSolidJs = {
|
|
|
73888
73982
|
* - `bar`: One column. Under `stacked`, one segment of a category's column.
|
|
73889
73983
|
* - `bar-end`: The bar at a column's far end, the end away from zero, which is the end to round. A column standing alone is its own far end. Under `stacked`, the last positive segment above zero and the last negative one below it. Its `data-end` is `positive` or `negative`. A blank or a zero is never the end. Set together with `bar`.
|
|
73890
73984
|
* - `bar-end-negative`: A far end below zero, whose far end is its bottom, or its inline start when the bars run across. Set together with `bar-end`.
|
|
73985
|
+
* - `bar-negative`: A bar below zero, standing alone or any segment of a stack below it, whose base is its top, or its inline end when the bars run across. Set together with `bar`.
|
|
73891
73986
|
* - `bar-wash-end`: The far stop of a bar's gradient, where one is used.
|
|
73892
73987
|
* - `bar-wash-start`: The stop of a bar's gradient at its base.
|
|
73893
73988
|
* - `baseline`: The line the columns stand on.
|
|
@@ -77282,7 +77377,11 @@ export type CustomElementsSolidJs = {
|
|
|
77282
77377
|
* with the gutter's numbers and the block keeps one tab stop. The code stays
|
|
77283
77378
|
* in the slot, so the copy button copies it as written and a reader without
|
|
77284
77379
|
* the script still has it. Not called on a server, which has no code to
|
|
77285
|
-
* read, nor for a diff.
|
|
77380
|
+
* read, nor for a diff.
|
|
77381
|
+
*
|
|
77382
|
+
* Absent, the block draws with the highlighter `registerHighlighter` gave
|
|
77383
|
+
* every block, where an entry such as `@fusion.dev/helix-sandbox/code-block`
|
|
77384
|
+
* registered one, and plain otherwise. (property only)
|
|
77286
77385
|
* - `whenSettled`: Resolves a frame after the first update, when transitions are switched on.
|
|
77287
77386
|
*
|
|
77288
77387
|
* **Named `whenSettled` because `settled` is taken four times over**, by
|
|
@@ -88303,7 +88402,11 @@ export type CustomElementsSolidJs = {
|
|
|
88303
88402
|
* Cleared as the menu closes and as a submenu opens or closes, so each page
|
|
88304
88403
|
* starts with every row showing.
|
|
88305
88404
|
* - `filterable`: Whether the menu shows a field above its rows that narrows them as the
|
|
88306
|
-
* reader types, with focus staying in the field
|
|
88405
|
+
* reader types, with focus staying in the field, once
|
|
88406
|
+
* `@fusion.dev/helix/menu/filter` (or `@fusion.dev/helix-headless/menu/filter`)
|
|
88407
|
+
* is imported. Without that import it does nothing, so a menu that never
|
|
88408
|
+
* filters carries none of the filter's code, and a development build says
|
|
88409
|
+
* which import is missing.
|
|
88307
88410
|
* - `filter-label`/`filterLabel`: The filter field's name and placeholder.
|
|
88308
88411
|
* - `label`: Accessible name for the surface.
|
|
88309
88412
|
*
|
|
@@ -92695,6 +92798,15 @@ export type CustomElementsSolidJs = {
|
|
|
92695
92798
|
* in the `js` pane or in another module loads it. A sandbox writes each pane
|
|
92696
92799
|
* named for a module file here.
|
|
92697
92800
|
*
|
|
92801
|
+
* **A module in TypeScript or JSX runs too**: a path ending in `.ts`, `.tsx`
|
|
92802
|
+
* or `.jsx` is compiled to JavaScript first, and imported by its path or by
|
|
92803
|
+
* its path without the extension. The compiler, Sucrase, loads from `cdn` the
|
|
92804
|
+
* first time a module needs it, so the package carries none and a preview
|
|
92805
|
+
* with no such module loads none. JSX compiles to the automatic runtime,
|
|
92806
|
+
* `react/jsx-runtime`, from `dependencies`, or to the one a
|
|
92807
|
+
* `@jsxImportSource` comment names. What fails to compile shows in the
|
|
92808
|
+
* `error` part as an error the example threw, when the example imports it.
|
|
92809
|
+
*
|
|
92698
92810
|
* **Examples render in a frame**, so an example's styles and scripts do not
|
|
92699
92811
|
* affect the page around the sandbox, and `position: fixed` stays inside the
|
|
92700
92812
|
* pane. The frame starts empty, with its own stylesheets and its own custom
|
|
@@ -92881,6 +92993,10 @@ export type CustomElementsSolidJs = {
|
|
|
92881
92993
|
* - `js` sets a script that runs as a module after the markup.
|
|
92882
92994
|
* - A module file name ending in `.js` or `.mjs`, such as `utils.js`, is a
|
|
92883
92995
|
* module the other scripts import by its path, `./utils.js`.
|
|
92996
|
+
* - A module file name ending in `.ts`, `.tsx` or `.jsx`, such as `app.tsx`,
|
|
92997
|
+
* is one too, which the preview compiles to JavaScript first. The `js` pane
|
|
92998
|
+
* runs it with `import './app.tsx'`. A file that does not compile shows
|
|
92999
|
+
* why over the preview, as an error the example threw.
|
|
92884
93000
|
* - `package.json` sets the npm packages the scripts import by name, from its
|
|
92885
93001
|
* `dependencies`, which load from the preview's `cdn`.
|
|
92886
93002
|
*
|
|
@@ -98362,6 +98478,8 @@ export type CustomElementsSolidJs = {
|
|
|
98362
98478
|
* number, and both are carried as one comma-separated value, which is what a
|
|
98363
98479
|
* form submits. `TimePicker` carries the longer note on the interaction and
|
|
98364
98480
|
* on why a wheel cannot do either.
|
|
98481
|
+
* - `now-label`/`nowLabel`: The words on the list's button that chooses the current time, drawn with
|
|
98482
|
+
* `show-now`.
|
|
98365
98483
|
* - `placeholder`: Placeholder text shown before a time is entered.
|
|
98366
98484
|
* - `range-length-message`/`rangeLengthMessage`: The message shown when a range holds more than two times.
|
|
98367
98485
|
*
|
|
@@ -98379,6 +98497,9 @@ export type CustomElementsSolidJs = {
|
|
|
98379
98497
|
* - `seconds`: Whether times carry their seconds: the value is `HH:mm:ss`, a typed time
|
|
98380
98498
|
* may give them, the field writes them, and the list's `step` counts seconds.
|
|
98381
98499
|
* See Time Picker's `seconds`.
|
|
98500
|
+
* - `show-now`/`showNow`: Draws a button under the times in the list that chooses the current time,
|
|
98501
|
+
* moved to the nearest time on offer. See Time Picker's `show-now`. Its words
|
|
98502
|
+
* are `now-label`.
|
|
98382
98503
|
* - `step`: How far apart the offered times are, in minutes, or in seconds with
|
|
98383
98504
|
* `seconds`.
|
|
98384
98505
|
* - `time-style`/`timeStyle`: Whether the field shows the time in the local style or as the value
|
|
@@ -102057,6 +102178,12 @@ export type CustomElementsSolidJs = {
|
|
|
102057
102178
|
*
|
|
102058
102179
|
* An `aria-label` or `aria-labelledby` on the host names the list too, and
|
|
102059
102180
|
* wins over this.
|
|
102181
|
+
* - `layout`: How items of more than one column are laid out. `grid`, the default, puts
|
|
102182
|
+
* them in lines of equal columns. `waterfall` puts each item, in the order
|
|
102183
|
+
* of the set, under the column that ends highest, as a wall of photos of
|
|
102184
|
+
* different heights is: `columns`, or `min-column-width`, says how many
|
|
102185
|
+
* columns. Rows of a waterfall are measured, and Up and Down move along a
|
|
102186
|
+
* column.
|
|
102060
102187
|
* - `loading`: Marks the list as busy fetching more items, and draws a row after the last
|
|
102061
102188
|
* item that says so.
|
|
102062
102189
|
*
|
|
@@ -102079,13 +102206,14 @@ export type CustomElementsSolidJs = {
|
|
|
102079
102206
|
* - `orientation`: Which way the list runs. `horizontal` lays the items out along a line
|
|
102080
102207
|
* and scrolls it sideways: Left and Right move between items, the other
|
|
102081
102208
|
* way round on a right-to-left page, and `estimate` is an item's width. A
|
|
102082
|
-
* grid always
|
|
102209
|
+
* grid and a waterfall always run down.
|
|
102083
102210
|
* - `reorderable`: Lets a reader move items, once `@fusion.dev/helix/virtual-list/reorder`
|
|
102084
102211
|
* (or `@fusion.dev/helix-headless/virtual-list/reorder`) is imported: Alt
|
|
102085
102212
|
* with an arrow moves the row the keys are on, and a pointer drags a row.
|
|
102086
102213
|
* The list moves no item itself: you move your `items` on `helix-reorder`.
|
|
102087
102214
|
* Without that import it does nothing, so a list that never moves items
|
|
102088
|
-
* carries none of the code. A list of one column, without sections
|
|
102215
|
+
* carries none of the code. A list of one column, without sections or a
|
|
102216
|
+
* waterfall.
|
|
102089
102217
|
* - `section-field`/`sectionField`: The field of each item that names its section, as a key or a path of
|
|
102090
102218
|
* keys. Set, the items are drawn in sections: a header, then the items, in
|
|
102091
102219
|
* an element with the `group` role that the header names. A section starts
|
package/types/vue.d.ts
CHANGED
|
@@ -4261,7 +4261,11 @@ whole of it, which Shiki writes, are taken off, so the lines sit level
|
|
|
4261
4261
|
with the gutter's numbers and the block keeps one tab stop. The code stays
|
|
4262
4262
|
in the slot, so the copy button copies it as written and a reader without
|
|
4263
4263
|
the script still has it. Not called on a server, which has no code to
|
|
4264
|
-
read, nor for a diff.
|
|
4264
|
+
read, nor for a diff.
|
|
4265
|
+
|
|
4266
|
+
Absent, the block draws with the highlighter `registerHighlighter` gave
|
|
4267
|
+
every block, where an entry such as `@fusion.dev/helix-sandbox/code-block`
|
|
4268
|
+
registered one, and plain otherwise. */
|
|
4265
4269
|
highlight?: (HelixCodeBlock["highlight"]) | undefined;
|
|
4266
4270
|
};
|
|
4267
4271
|
|
|
@@ -12495,7 +12499,11 @@ Cleared as the menu closes and as a submenu opens or closes, so each page
|
|
|
12495
12499
|
starts with every row showing. */
|
|
12496
12500
|
filter?: (HelixMenu["filter"]) | undefined;
|
|
12497
12501
|
/** Whether the menu shows a field above its rows that narrows them as the
|
|
12498
|
-
reader types, with focus staying in the field
|
|
12502
|
+
reader types, with focus staying in the field, once
|
|
12503
|
+
`@fusion.dev/helix/menu/filter` (or `@fusion.dev/helix-headless/menu/filter`)
|
|
12504
|
+
is imported. Without that import it does nothing, so a menu that never
|
|
12505
|
+
filters carries none of the filter's code, and a development build says
|
|
12506
|
+
which import is missing. */
|
|
12499
12507
|
filterable?: (HelixMenu["filterable"]) | undefined;
|
|
12500
12508
|
/** The filter field's name and placeholder. */
|
|
12501
12509
|
"filter-label"?: (HelixMenu["filterLabel"]) | undefined;
|
|
@@ -19001,6 +19009,12 @@ number, and both are carried as one comma-separated value, which is what a
|
|
|
19001
19009
|
form submits. `TimePicker` carries the longer note on the interaction and
|
|
19002
19010
|
on why a wheel cannot do either. */
|
|
19003
19011
|
mode?: (HelixTimeInput["mode"]) | undefined;
|
|
19012
|
+
/** The words on the list's button that chooses the current time, drawn with
|
|
19013
|
+
`show-now`. */
|
|
19014
|
+
"now-label"?: (HelixTimeInput["nowLabel"]) | undefined;
|
|
19015
|
+
/** The words on the list's button that chooses the current time, drawn with
|
|
19016
|
+
`show-now`. */
|
|
19017
|
+
nowLabel?: (HelixTimeInput["nowLabel"]) | undefined;
|
|
19004
19018
|
/** Placeholder text shown before a time is entered. */
|
|
19005
19019
|
placeholder?: (HelixTimeInput["placeholder"]) | undefined;
|
|
19006
19020
|
/** The message shown when a range holds more than two times.
|
|
@@ -19041,6 +19055,14 @@ removes rather than as "Remove" said once per time. */
|
|
|
19041
19055
|
may give them, the field writes them, and the list's `step` counts seconds.
|
|
19042
19056
|
See Time Picker's `seconds`. */
|
|
19043
19057
|
seconds?: (HelixTimeInput["seconds"]) | undefined;
|
|
19058
|
+
/** Draws a button under the times in the list that chooses the current time,
|
|
19059
|
+
moved to the nearest time on offer. See Time Picker's `show-now`. Its words
|
|
19060
|
+
are `now-label`. */
|
|
19061
|
+
"show-now"?: (HelixTimeInput["showNow"]) | undefined;
|
|
19062
|
+
/** Draws a button under the times in the list that chooses the current time,
|
|
19063
|
+
moved to the nearest time on offer. See Time Picker's `show-now`. Its words
|
|
19064
|
+
are `now-label`. */
|
|
19065
|
+
showNow?: (HelixTimeInput["showNow"]) | undefined;
|
|
19044
19066
|
/** How far apart the offered times are, in minutes, or in seconds with
|
|
19045
19067
|
`seconds`. */
|
|
19046
19068
|
step?: (HelixTimeInput["step"]) | undefined;
|
|
@@ -21570,6 +21592,13 @@ are rendered at a time.
|
|
|
21570
21592
|
An `aria-label` or `aria-labelledby` on the host names the list too, and
|
|
21571
21593
|
wins over this. */
|
|
21572
21594
|
label?: (HelixVirtualList["label"]) | undefined;
|
|
21595
|
+
/** How items of more than one column are laid out. `grid`, the default, puts
|
|
21596
|
+
them in lines of equal columns. `waterfall` puts each item, in the order
|
|
21597
|
+
of the set, under the column that ends highest, as a wall of photos of
|
|
21598
|
+
different heights is: `columns`, or `min-column-width`, says how many
|
|
21599
|
+
columns. Rows of a waterfall are measured, and Up and Down move along a
|
|
21600
|
+
column. */
|
|
21601
|
+
layout?: (HelixVirtualList["layout"]) | undefined;
|
|
21573
21602
|
/** Marks the list as busy fetching more items, and draws a row after the last
|
|
21574
21603
|
item that says so.
|
|
21575
21604
|
|
|
@@ -21602,14 +21631,15 @@ follows the box as it resizes, which `columns` then does not decide. */
|
|
|
21602
21631
|
/** Which way the list runs. `horizontal` lays the items out along a line
|
|
21603
21632
|
and scrolls it sideways: Left and Right move between items, the other
|
|
21604
21633
|
way round on a right-to-left page, and `estimate` is an item's width. A
|
|
21605
|
-
grid always
|
|
21634
|
+
grid and a waterfall always run down. */
|
|
21606
21635
|
orientation?: (HelixVirtualList["orientation"]) | undefined;
|
|
21607
21636
|
/** Lets a reader move items, once `@fusion.dev/helix/virtual-list/reorder`
|
|
21608
21637
|
(or `@fusion.dev/helix-headless/virtual-list/reorder`) is imported: Alt
|
|
21609
21638
|
with an arrow moves the row the keys are on, and a pointer drags a row.
|
|
21610
21639
|
The list moves no item itself: you move your `items` on `helix-reorder`.
|
|
21611
21640
|
Without that import it does nothing, so a list that never moves items
|
|
21612
|
-
carries none of the code. A list of one column, without sections
|
|
21641
|
+
carries none of the code. A list of one column, without sections or a
|
|
21642
|
+
waterfall. */
|
|
21613
21643
|
reorderable?: (HelixVirtualList["reorderable"]) | undefined;
|
|
21614
21644
|
/** The field of each item that names its section, as a key or a path of
|
|
21615
21645
|
keys. Set, the items are drawn in sections: a header, then the items, in
|
|
@@ -24869,13 +24899,13 @@ export interface WcToolkitVueGlobalComponents {
|
|
|
24869
24899
|
HelixRatingVueProps,
|
|
24870
24900
|
HelixRatingVueEvents
|
|
24871
24901
|
>;
|
|
24872
|
-
/** A sandboxed '<iframe>' that loads 'src', a document you provide. That document imports what the examples need, listens for a render message, and writes the markup into itself. **Without 'src', the frame loads a built-in document**, so a sandbox renders with nothing to host. It runs HTML, CSS, and scripts, and reports the console, uncaught errors, its height, and presses as a frame on 'servePreview' does. It defines no element, so an example that uses Helix components needs a 'src' that imports them. **'imports' lets an example import packages by name** in the built-in document, as an import map: each name maps to the address of an ES module, such as '{"canvas-confetti": "https://esm.sh/canvas-confetti@1.9.3"}', and 'import confetti from 'canvas-confetti'' in the 'js' pane then loads it. A CDN that serves npm packages as modules, such as esm.sh or jsDelivr's '+esm', gives every package an address. A new map loads the document again, since a browser reads one only as a document starts. A 'src' document declares its own. **'dependencies' names packages by version instead**, as a 'package.json' does: '{"canvas-confetti": "^1.9"}' loads 'canvas-confetti' and the paths under it from 'cdn', 'https://esm.sh/' by default, at the version or range given. An address in 'imports' wins over a package of the same name. **'modules' holds files the example imports by a relative path**: each path, such as 'utils.js', to its source, and 'import { add } from './utils.js'' in the 'js' pane or in another module loads it. A sandbox writes each pane named for a module file here. **Examples render in a frame**, so an example's styles and scripts do not affect the page around the sandbox, and 'position: fixed' stays inside the pane. The frame starts empty, with its own stylesheets and its own custom element registry, so 'src' must load the styles and components the examples use. **The source is untrusted, and the frame keeps it isolated.** The frame uses 'sandbox="allow-scripts"' and never 'allow-same-origin'. Together, the two let a document on the same origin remove its own sandbox, which is the same as having none. **A preview says where it is.** It is ':state(loading)' from the moment it has a 'src' until that document can take the example, and again through 'reload()'. It is ':state(failed)' once the example throws an error it does not catch, until the next source is sent, which a frame on 'servePreview' reports. A page draws its own spinner or message from either, such as a sibling shown by 'helix-sandbox-preview:state(failed) + .message'. **A failed preview shows the error over the example**, in the 'error' part, until the next source is sent. The terminal says it too, so the part is not announced, and it is the frame's description while it shows, so a screen reader reads it with the frame. Hide it with '::part(error) { display: none }' where the page draws its own. **'controls' draws two buttons in the preview's corner**: one reloads the frame's document, as 'reload()' does, and one opens the example in a new tab, as 'open()' does. The tab runs it in a frame sandboxed as this one is. */
|
|
24902
|
+
/** A sandboxed '<iframe>' that loads 'src', a document you provide. That document imports what the examples need, listens for a render message, and writes the markup into itself. **Without 'src', the frame loads a built-in document**, so a sandbox renders with nothing to host. It runs HTML, CSS, and scripts, and reports the console, uncaught errors, its height, and presses as a frame on 'servePreview' does. It defines no element, so an example that uses Helix components needs a 'src' that imports them. **'imports' lets an example import packages by name** in the built-in document, as an import map: each name maps to the address of an ES module, such as '{"canvas-confetti": "https://esm.sh/canvas-confetti@1.9.3"}', and 'import confetti from 'canvas-confetti'' in the 'js' pane then loads it. A CDN that serves npm packages as modules, such as esm.sh or jsDelivr's '+esm', gives every package an address. A new map loads the document again, since a browser reads one only as a document starts. A 'src' document declares its own. **'dependencies' names packages by version instead**, as a 'package.json' does: '{"canvas-confetti": "^1.9"}' loads 'canvas-confetti' and the paths under it from 'cdn', 'https://esm.sh/' by default, at the version or range given. An address in 'imports' wins over a package of the same name. **'modules' holds files the example imports by a relative path**: each path, such as 'utils.js', to its source, and 'import { add } from './utils.js'' in the 'js' pane or in another module loads it. A sandbox writes each pane named for a module file here. **A module in TypeScript or JSX runs too**: a path ending in '.ts', '.tsx' or '.jsx' is compiled to JavaScript first, and imported by its path or by its path without the extension. The compiler, Sucrase, loads from 'cdn' the first time a module needs it, so the package carries none and a preview with no such module loads none. JSX compiles to the automatic runtime, 'react/jsx-runtime', from 'dependencies', or to the one a '@jsxImportSource' comment names. What fails to compile shows in the 'error' part as an error the example threw, when the example imports it. **Examples render in a frame**, so an example's styles and scripts do not affect the page around the sandbox, and 'position: fixed' stays inside the pane. The frame starts empty, with its own stylesheets and its own custom element registry, so 'src' must load the styles and components the examples use. **The source is untrusted, and the frame keeps it isolated.** The frame uses 'sandbox="allow-scripts"' and never 'allow-same-origin'. Together, the two let a document on the same origin remove its own sandbox, which is the same as having none. **A preview says where it is.** It is ':state(loading)' from the moment it has a 'src' until that document can take the example, and again through 'reload()'. It is ':state(failed)' once the example throws an error it does not catch, until the next source is sent, which a frame on 'servePreview' reports. A page draws its own spinner or message from either, such as a sibling shown by 'helix-sandbox-preview:state(failed) + .message'. **A failed preview shows the error over the example**, in the 'error' part, until the next source is sent. The terminal says it too, so the part is not announced, and it is the frame's description while it shows, so a screen reader reads it with the frame. Hide it with '::part(error) { display: none }' where the page draws its own. **'controls' draws two buttons in the preview's corner**: one reloads the frame's document, as 'reload()' does, and one opens the example in a new tab, as 'open()' does. The tab runs it in a frame sandboxed as this one is. */
|
|
24873
24903
|
"helix-sandbox-preview": DefineCustomElement<
|
|
24874
24904
|
HelixSandboxPreview,
|
|
24875
24905
|
HelixSandboxPreviewVueProps,
|
|
24876
24906
|
HelixSandboxPreviewVueEvents
|
|
24877
24907
|
>;
|
|
24878
|
-
/** A source pane dispatches 'helix-before-edit', which bubbles, and the sandbox passes the value to the preview slotted into it. The source pane and the preview do not reference each other, so you can replace either one or use it alone. The preview runs an edit once typing has rested for 'preview-delay', 300 milliseconds by default, so a word typed reloads it once. A pane's text when the sandbox starts reaches it at once. The event carries the pane's 'name', so one sandbox can hold several panes. The names the sandbox writes into its previews: - 'html' sets the preview's markup. - 'css' sets its stylesheet. - 'js' sets a script that runs as a module after the markup. - A module file name ending in '.js' or '.mjs', such as 'utils.js', is a module the other scripts import by its path, './utils.js'. - 'package.json' sets the npm packages the scripts import by name, from its 'dependencies', which load from the preview's 'cdn'. The sandbox ignores a pane with any other name, so that pane can show content without changing the preview. **The sandbox is ':state(modified)' while a source pane holds an edit**, and that pane's file tab is also 'file-modified' and described as modified to a screen reader. 'reset()' puts every pane back to the source it was given. **The dividers are two nested 'helix-splitter' elements**, which handle the pointer, the keyboard, and the corner. The inner splitter holds the panes and the outer one holds the panel, so the panel spans the full width. **Several source panes are files**, one shown at a time under a row of tabs, each named by the pane's 'label' or, without one, its 'name'. 'file' holds the 'name' of the pane shown. The tabs are a tab list: the arrow keys move between them and show each pane, and 'Home' and 'End' go to the first and the last. Choosing one sends 'helix-before-change' with the pane's 'name', which you can cancel, and 'change' once 'file' holds it. The panes not shown carry 'hidden'. One pane draws no tabs. **Any editor can be the source pane**: an element in the 'source' slot with a 'name' that dispatches 'helix-before-edit' with its text, which bubbles. A wrapper around CodeMirror or Monaco sends one on each change and is a pane like 'helix-sandbox-source', and the sandbox reads its 'value' to seed the preview. Dispatch 'helix-caret' from it too for the status bar's position. Sandbox is styled only and has behavior, as 'Aura' is. Its behavior is the hand-off from a source pane to a preview frame, which works with any pane that sends 'helix-before-edit', and what it draws is the layout around them: dividers, file tabs, and a panel. A page that wants another look slots its own panes and keeps the hand-off, so there is nothing for a headless version to hold. A development build warns about a source pane with no 'label' and no 'name', whose file tab would have no words. On a focused divider, the arrow keys move it, and 'Home' and 'End' move it to its ends. 'Enter' on the panes divider shuts the lead pane, and pressed again it opens the pane where it was. 'Enter' on the panel divider shuts the panel to 'panel-collapsed-size', and pressed again it opens the panel to its last height. */
|
|
24908
|
+
/** A source pane dispatches 'helix-before-edit', which bubbles, and the sandbox passes the value to the preview slotted into it. The source pane and the preview do not reference each other, so you can replace either one or use it alone. The preview runs an edit once typing has rested for 'preview-delay', 300 milliseconds by default, so a word typed reloads it once. A pane's text when the sandbox starts reaches it at once. The event carries the pane's 'name', so one sandbox can hold several panes. The names the sandbox writes into its previews: - 'html' sets the preview's markup. - 'css' sets its stylesheet. - 'js' sets a script that runs as a module after the markup. - A module file name ending in '.js' or '.mjs', such as 'utils.js', is a module the other scripts import by its path, './utils.js'. - A module file name ending in '.ts', '.tsx' or '.jsx', such as 'app.tsx', is one too, which the preview compiles to JavaScript first. The 'js' pane runs it with 'import './app.tsx''. A file that does not compile shows why over the preview, as an error the example threw. - 'package.json' sets the npm packages the scripts import by name, from its 'dependencies', which load from the preview's 'cdn'. The sandbox ignores a pane with any other name, so that pane can show content without changing the preview. **The sandbox is ':state(modified)' while a source pane holds an edit**, and that pane's file tab is also 'file-modified' and described as modified to a screen reader. 'reset()' puts every pane back to the source it was given. **The dividers are two nested 'helix-splitter' elements**, which handle the pointer, the keyboard, and the corner. The inner splitter holds the panes and the outer one holds the panel, so the panel spans the full width. **Several source panes are files**, one shown at a time under a row of tabs, each named by the pane's 'label' or, without one, its 'name'. 'file' holds the 'name' of the pane shown. The tabs are a tab list: the arrow keys move between them and show each pane, and 'Home' and 'End' go to the first and the last. Choosing one sends 'helix-before-change' with the pane's 'name', which you can cancel, and 'change' once 'file' holds it. The panes not shown carry 'hidden'. One pane draws no tabs. **Any editor can be the source pane**: an element in the 'source' slot with a 'name' that dispatches 'helix-before-edit' with its text, which bubbles. A wrapper around CodeMirror or Monaco sends one on each change and is a pane like 'helix-sandbox-source', and the sandbox reads its 'value' to seed the preview. Dispatch 'helix-caret' from it too for the status bar's position. Sandbox is styled only and has behavior, as 'Aura' is. Its behavior is the hand-off from a source pane to a preview frame, which works with any pane that sends 'helix-before-edit', and what it draws is the layout around them: dividers, file tabs, and a panel. A page that wants another look slots its own panes and keeps the hand-off, so there is nothing for a headless version to hold. A development build warns about a source pane with no 'label' and no 'name', whose file tab would have no words. On a focused divider, the arrow keys move it, and 'Home' and 'End' move it to its ends. 'Enter' on the panes divider shuts the lead pane, and pressed again it opens the pane where it was. 'Enter' on the panel divider shuts the panel to 'panel-collapsed-size', and pressed again it opens the panel to its last height. */
|
|
24879
24909
|
"helix-sandbox": DefineCustomElement<
|
|
24880
24910
|
HelixSandbox,
|
|
24881
24911
|
HelixSandboxVueProps,
|
package/types/words.d.ts
CHANGED
|
@@ -502,6 +502,13 @@ declare module '@fusion.dev/helix-core' {
|
|
|
502
502
|
* English: `Notes`
|
|
503
503
|
*/
|
|
504
504
|
notesLabel: Message
|
|
505
|
+
/**
|
|
506
|
+
* The words on the list's button that chooses the current time, drawn with
|
|
507
|
+
* `show-now`.
|
|
508
|
+
*
|
|
509
|
+
* English: `Now`
|
|
510
|
+
*/
|
|
511
|
+
nowLabel: Message
|
|
505
512
|
/**
|
|
506
513
|
* The `overview`'s sentence. `{busiestLabel}` and `{totalLabel}` are
|
|
507
514
|
* `busiest-label` and `total-label`, `{busiest}` the busiest reading's name
|