@fusion.dev/helix 0.165.0 → 0.166.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 +809 -5
- package/dist/code-block/root/code-block-root.css.js +2 -1
- package/dist/element-events.generated.js +15 -2
- package/dist/menu/item/menu-item.css.js +3 -0
- package/dist/menu/root/menu-root.css.js +1 -1
- package/dist/sandbox/root/sandbox-root.d.ts +26 -0
- package/dist/sandbox/root/sandbox-root.js +28 -3
- package/dist/sandbox/source/sandbox-source.d.ts +6 -0
- package/dist/sandbox/source/sandbox-source.js +9 -2
- package/lint.json +1 -1
- package/package.json +6 -6
- package/types/jsx.d.ts +260 -2
- package/types/vue.d.ts +75 -3
- package/types/words.d.ts +20 -0
package/types/vue.d.ts
CHANGED
|
@@ -192,14 +192,14 @@ import type {
|
|
|
192
192
|
HelixHistoryEvent,
|
|
193
193
|
HelixPinEvent,
|
|
194
194
|
HelixBeforeToggleEvent,
|
|
195
|
-
HelixToggleEvent,
|
|
196
195
|
HelixCopyEvent,
|
|
196
|
+
HelixCopyErrorEvent,
|
|
197
|
+
HelixToggleEvent,
|
|
197
198
|
HelixSampleEndEvent,
|
|
198
199
|
HelixSampleStartEvent,
|
|
199
200
|
HelixCreateEvent,
|
|
200
201
|
HelixFilterEvent,
|
|
201
202
|
HelixLoadMoreEvent,
|
|
202
|
-
HelixCopyErrorEvent,
|
|
203
203
|
HelixBeforeReorderEvent,
|
|
204
204
|
HelixExpandEvent,
|
|
205
205
|
HelixFilteredEvent,
|
|
@@ -3958,9 +3958,18 @@ export type HelixCodeBlockElementEvent<E = Event> = TypedEvent<
|
|
|
3958
3958
|
HelixCodeBlock,
|
|
3959
3959
|
E
|
|
3960
3960
|
>;
|
|
3961
|
+
/** `helix-before-change` event type */
|
|
3962
|
+
export type HelixCodeBlockHelixBeforeChangeElementEvent =
|
|
3963
|
+
HelixCodeBlockElementEvent<HelixBeforeChangeEvent>;
|
|
3961
3964
|
/** `helix-before-toggle` event type */
|
|
3962
3965
|
export type HelixCodeBlockHelixBeforeToggleElementEvent =
|
|
3963
3966
|
HelixCodeBlockElementEvent<HelixBeforeToggleEvent>;
|
|
3967
|
+
/** `helix-copy` event type */
|
|
3968
|
+
export type HelixCodeBlockHelixCopyElementEvent =
|
|
3969
|
+
HelixCodeBlockElementEvent<HelixCopyEvent>;
|
|
3970
|
+
/** `helix-copy-error` event type */
|
|
3971
|
+
export type HelixCodeBlockHelixCopyErrorElementEvent =
|
|
3972
|
+
HelixCodeBlockElementEvent<HelixCopyErrorEvent>;
|
|
3964
3973
|
/** `helix-toggle` event type */
|
|
3965
3974
|
export type HelixCodeBlockHelixToggleElementEvent =
|
|
3966
3975
|
HelixCodeBlockElementEvent<HelixToggleEvent>;
|
|
@@ -4032,6 +4041,15 @@ block lays out. Not for a diff, whose files each scroll on their own. */
|
|
|
4032
4041
|
"expand-label"?: (HelixCodeBlock["expandLabel"]) | undefined;
|
|
4033
4042
|
/** The expand button's words while the cap hides lines. */
|
|
4034
4043
|
expandLabel?: (HelixCodeBlock["expandLabel"]) | undefined;
|
|
4044
|
+
/** The name of the file shown, where the block holds several Code Blocks:
|
|
4045
|
+
the `label` of one, or its `language` without one.
|
|
4046
|
+
|
|
4047
|
+
Unset, or a name no file has, shows the first. */
|
|
4048
|
+
file?: (HelixCodeBlock["file"]) | undefined;
|
|
4049
|
+
/** The name of the file tabs, read by screen readers. */
|
|
4050
|
+
"files-label"?: (HelixCodeBlock["filesLabel"]) | undefined;
|
|
4051
|
+
/** The name of the file tabs, read by screen readers. */
|
|
4052
|
+
filesLabel?: (HelixCodeBlock["filesLabel"]) | undefined;
|
|
4035
4053
|
/** The words of a button that hides a run of unchanged lines it showed, in a
|
|
4036
4054
|
diff with `context-lines`. `{count}` is how many, and each language
|
|
4037
4055
|
writes the forms it has. */
|
|
@@ -4168,8 +4186,16 @@ read, nor for a diff. */
|
|
|
4168
4186
|
};
|
|
4169
4187
|
|
|
4170
4188
|
export type HelixCodeBlockVueEvents = {
|
|
4189
|
+
/** A file tab showed its file, whose name `file` now holds. */
|
|
4190
|
+
change: HelixCodeBlockElementEvent;
|
|
4191
|
+
/** A file tab is about to show its file, with the file's name in `detail.value`. Cancelable: cancel it to keep the file shown. */
|
|
4192
|
+
"helix-before-change": HelixCodeBlockHelixBeforeChangeElementEvent;
|
|
4171
4193
|
/** The wrap button was pressed, with the `wrap` it asks for in `detail.checked`. Cancelable: cancel it to keep the lines as they are. */
|
|
4172
4194
|
"helix-before-toggle": HelixCodeBlockHelixBeforeToggleElementEvent;
|
|
4195
|
+
/** The copy button put the code on the clipboard, with the text in `detail.value`. */
|
|
4196
|
+
"helix-copy": HelixCodeBlockHelixCopyElementEvent;
|
|
4197
|
+
/** A press on the copy button put nothing on the clipboard: the browser did not allow the write, or there was no code. */
|
|
4198
|
+
"helix-copy-error": HelixCodeBlockHelixCopyErrorElementEvent;
|
|
4173
4199
|
/** Fired after the wrap button changed `wrap`, with the new value in `detail.checked`. */
|
|
4174
4200
|
"helix-toggle": HelixCodeBlockHelixToggleElementEvent;
|
|
4175
4201
|
};
|
|
@@ -12087,6 +12113,9 @@ export type HelixMenuHelixBeforeCloseElementEvent =
|
|
|
12087
12113
|
/** `helix-before-open` event type */
|
|
12088
12114
|
export type HelixMenuHelixBeforeOpenElementEvent =
|
|
12089
12115
|
HelixMenuElementEvent<HelixBeforeOpenEvent>;
|
|
12116
|
+
/** `helix-filter` event type */
|
|
12117
|
+
export type HelixMenuHelixFilterElementEvent =
|
|
12118
|
+
HelixMenuElementEvent<HelixFilterEvent>;
|
|
12090
12119
|
/** `helix-select` event type */
|
|
12091
12120
|
export type HelixMenuHelixSelectElementEvent =
|
|
12092
12121
|
HelixMenuElementEvent<HelixSelectEvent>;
|
|
@@ -12142,6 +12171,18 @@ Ark UI's `closeOnSelect` does. A row's own `close-on-select` wins over this. */
|
|
|
12142
12171
|
/** Whether the menu is the trigger's context menu: it opens where the reader
|
|
12143
12172
|
asks for one, with a right-click, a long press, Shift+F10 or the menu key. */
|
|
12144
12173
|
context?: (HelixMenu["context"]) | undefined;
|
|
12174
|
+
/** The text the rows are filtered by, which the filter field holds.
|
|
12175
|
+
|
|
12176
|
+
Cleared as the menu closes and as a submenu opens or closes, so each page
|
|
12177
|
+
starts with every row showing. */
|
|
12178
|
+
filter?: (HelixMenu["filter"]) | undefined;
|
|
12179
|
+
/** Whether the menu shows a field above its rows that narrows them as the
|
|
12180
|
+
reader types, with focus staying in the field. */
|
|
12181
|
+
filterable?: (HelixMenu["filterable"]) | undefined;
|
|
12182
|
+
/** The filter field's name and placeholder. */
|
|
12183
|
+
"filter-label"?: (HelixMenu["filterLabel"]) | undefined;
|
|
12184
|
+
/** The filter field's name and placeholder. */
|
|
12185
|
+
filterLabel?: (HelixMenu["filterLabel"]) | undefined;
|
|
12145
12186
|
/** Accessible name for the surface.
|
|
12146
12187
|
|
|
12147
12188
|
Empty by default, which names the surface by its trigger, so a menu opened
|
|
@@ -12154,6 +12195,10 @@ to open the menu. Translate it with the rest of your interface. */
|
|
|
12154
12195
|
/** The description a trigger gives under `open-on="long-press"`, saying how
|
|
12155
12196
|
to open the menu. Translate it with the rest of your interface. */
|
|
12156
12197
|
longPressLabel?: (HelixMenu["longPressLabel"]) | undefined;
|
|
12198
|
+
/** The text shown when the filter keeps no rows. */
|
|
12199
|
+
"no-results-text"?: (HelixMenu["noResultsText"]) | undefined;
|
|
12200
|
+
/** The text shown when the filter keeps no rows. */
|
|
12201
|
+
noResultsText?: (HelixMenu["noResultsText"]) | undefined;
|
|
12157
12202
|
/** Space between the trigger and the surface, in pixels. */
|
|
12158
12203
|
offset?: (HelixMenu["offset"]) | undefined;
|
|
12159
12204
|
/** What opens the menu from its trigger. `long-press` leaves a press to the
|
|
@@ -12171,6 +12216,13 @@ It moves if that side does not fit. */
|
|
|
12171
12216
|
/** How a submenu opens. `drill` shows it in place of the page showing, with
|
|
12172
12217
|
a way back. `flyout` opens it in a panel of its own beside its row. */
|
|
12173
12218
|
submenus?: (HelixMenu["submenus"]) | undefined;
|
|
12219
|
+
/** Whether a row is kept by the filter: a function given the row's words and
|
|
12220
|
+
the filter, trimmed, that returns `true` to keep it showing, as React
|
|
12221
|
+
Aria's `Autocomplete` takes `filter`. See Listbox's `filterMatch`.
|
|
12222
|
+
|
|
12223
|
+
Absent, a row is kept where its words hold the filter, in any case. A
|
|
12224
|
+
property only, there being no way to write a function in markup. */
|
|
12225
|
+
filterMatch?: (HelixMenu["filterMatch"]) | undefined;
|
|
12174
12226
|
};
|
|
12175
12227
|
|
|
12176
12228
|
export type HelixMenuVueEvents = {
|
|
@@ -12180,6 +12232,8 @@ export type HelixMenuVueEvents = {
|
|
|
12180
12232
|
"helix-before-close": HelixMenuHelixBeforeCloseElementEvent;
|
|
12181
12233
|
/** The menu is about to open. Cancelable: cancel it to keep it closed. */
|
|
12182
12234
|
"helix-before-open": HelixMenuHelixBeforeOpenElementEvent;
|
|
12235
|
+
/** The text in the filter field changed, with the new text in `detail.value`. Cancelable: cancel it to keep every row showing and narrow the rows yourself. */
|
|
12236
|
+
"helix-filter": HelixMenuHelixFilterElementEvent;
|
|
12183
12237
|
/** An item was chosen. Cancelable: cancel it to keep the menu open. */
|
|
12184
12238
|
"helix-select": HelixMenuHelixSelectElementEvent;
|
|
12185
12239
|
};
|
|
@@ -15041,6 +15095,16 @@ gives. */
|
|
|
15041
15095
|
"panel-size"?: (HelixSandbox["panelSize"] | `${number}`) | undefined;
|
|
15042
15096
|
/** Height of the panel, in pixels. */
|
|
15043
15097
|
panelSize?: (HelixSandbox["panelSize"]) | undefined;
|
|
15098
|
+
/** How long typing rests before the preview runs the new source, in
|
|
15099
|
+
milliseconds, as Sandpack's `recompileDelay` does. The preview reloads its
|
|
15100
|
+
frame on each run, so a word typed runs it once. `0` runs it on every
|
|
15101
|
+
edit. */
|
|
15102
|
+
"preview-delay"?: (HelixSandbox["previewDelay"] | `${number}`) | undefined;
|
|
15103
|
+
/** How long typing rests before the preview runs the new source, in
|
|
15104
|
+
milliseconds, as Sandpack's `recompileDelay` does. The preview reloads its
|
|
15105
|
+
frame on each run, so a word typed runs it once. `0` runs it on every
|
|
15106
|
+
edit. */
|
|
15107
|
+
previewDelay?: (HelixSandbox["previewDelay"]) | undefined;
|
|
15044
15108
|
/** The name of the divider between the panes, read by screen readers.
|
|
15045
15109
|
`{pane}` is the lead pane, `source` or `preview`, whose share the
|
|
15046
15110
|
divider's value is, so each is a whole sentence: "Resize source pane" or
|
|
@@ -15101,6 +15165,14 @@ export type HelixSandboxSourceVueProps = {
|
|
|
15101
15165
|
"field-label"?: (HelixSandboxSource["fieldLabel"]) | undefined;
|
|
15102
15166
|
/** The editable region's name, read by screen readers. */
|
|
15103
15167
|
fieldLabel?: (HelixSandboxSource["fieldLabel"]) | undefined;
|
|
15168
|
+
/** The editable region's name where the pane has a `label`, so each file's
|
|
15169
|
+
field says which file it holds. `{field}` is `field-label` and `{name}`
|
|
15170
|
+
the pane's `label`. */
|
|
15171
|
+
"field-name-label"?: (HelixSandboxSource["fieldNameLabel"]) | undefined;
|
|
15172
|
+
/** The editable region's name where the pane has a `label`, so each file's
|
|
15173
|
+
field says which file it holds. `{field}` is `field-label` and `{name}`
|
|
15174
|
+
the pane's `label`. */
|
|
15175
|
+
fieldNameLabel?: (HelixSandboxSource["fieldNameLabel"]) | undefined;
|
|
15104
15176
|
/** The field's description, read by screen readers while Tab indents. */
|
|
15105
15177
|
"keys-description"?: (HelixSandboxSource["keysDescription"]) | undefined;
|
|
15106
15178
|
/** The field's description, read by screen readers while Tab indents. */
|
|
@@ -24122,7 +24194,7 @@ export interface WcToolkitVueGlobalComponents {
|
|
|
24122
24194
|
HelixSandboxPreviewVueProps,
|
|
24123
24195
|
HelixSandboxPreviewVueEvents
|
|
24124
24196
|
>;
|
|
24125
|
-
/** 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 event carries the pane's 'name', so one sandbox can hold several panes. 'html' sets the preview's markup, 'css' sets its stylesheet, and 'js' sets a script that runs as a module after the markup. The sandbox ignores a pane with any other name, so that pane can show content without changing the preview. **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. 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. */
|
|
24197
|
+
/** 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. 'html' sets the preview's markup, 'css' sets its stylesheet, and 'js' sets a script that runs as a module after the markup. The sandbox ignores a pane with any other name, so that pane can show content without changing the preview. **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. */
|
|
24126
24198
|
"helix-sandbox": DefineCustomElement<
|
|
24127
24199
|
HelixSandbox,
|
|
24128
24200
|
HelixSandboxVueProps,
|
package/types/words.d.ts
CHANGED
|
@@ -464,6 +464,12 @@ declare module '@fusion.dev/helix-core' {
|
|
|
464
464
|
* English: `Later years`
|
|
465
465
|
*/
|
|
466
466
|
nextYearsLabel: Message
|
|
467
|
+
/**
|
|
468
|
+
* The text shown when the filter keeps no rows.
|
|
469
|
+
*
|
|
470
|
+
* English: `No matches`
|
|
471
|
+
*/
|
|
472
|
+
noResultsText: Message
|
|
467
473
|
/**
|
|
468
474
|
* What screen readers hear when the map is turned back to face north.
|
|
469
475
|
*
|
|
@@ -1157,6 +1163,12 @@ declare module '@fusion.dev/helix-core' {
|
|
|
1157
1163
|
* English: `Show all lines`
|
|
1158
1164
|
*/
|
|
1159
1165
|
expandLabel: Message
|
|
1166
|
+
/**
|
|
1167
|
+
* The name of the file tabs, read by screen readers.
|
|
1168
|
+
*
|
|
1169
|
+
* English: `Files`
|
|
1170
|
+
*/
|
|
1171
|
+
filesLabel: Message
|
|
1160
1172
|
/**
|
|
1161
1173
|
* The words of a button that hides a run of unchanged lines it showed, in a
|
|
1162
1174
|
* diff with `context-lines`. `{count}` is how many, and each language
|
|
@@ -2187,6 +2199,14 @@ declare module '@fusion.dev/helix-core' {
|
|
|
2187
2199
|
* English: `Example source`
|
|
2188
2200
|
*/
|
|
2189
2201
|
fieldLabel: Message
|
|
2202
|
+
/**
|
|
2203
|
+
* The editable region's name where the pane has a `label`, so each file's
|
|
2204
|
+
* field says which file it holds. `{field}` is `field-label` and `{name}`
|
|
2205
|
+
* the pane's `label`.
|
|
2206
|
+
*
|
|
2207
|
+
* English: `{field}, {name}`
|
|
2208
|
+
*/
|
|
2209
|
+
fieldNameLabel: Message
|
|
2190
2210
|
/**
|
|
2191
2211
|
* The field's description, read by screen readers while Tab indents.
|
|
2192
2212
|
*
|