@fusion.dev/helix 0.212.2 → 0.214.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/types/svelte.d.ts CHANGED
@@ -141,11 +141,11 @@ declare module 'svelte/elements' {
141
141
  'helix-radio-group': Helix<'helix-radio-group'>
142
142
  'helix-radio': Helix<'helix-radio'>
143
143
  'helix-rating': Helix<'helix-rating'>
144
+ 'helix-sandbox-console': Helix<'helix-sandbox-console'>
144
145
  'helix-sandbox-preview': Helix<'helix-sandbox-preview'>
145
146
  'helix-sandbox': Helix<'helix-sandbox'>
146
147
  'helix-sandbox-source': Helix<'helix-sandbox-source'>
147
148
  'helix-sandbox-status-bar': Helix<'helix-sandbox-status-bar'>
148
- 'helix-sandbox-terminal': Helix<'helix-sandbox-terminal'>
149
149
  'helix-sandbox-toolbar': Helix<'helix-sandbox-toolbar'>
150
150
  'helix-scatter-chart': Helix<'helix-scatter-chart'>
151
151
  'helix-scroll-area': Helix<'helix-scroll-area'>
package/types/vue.d.ts CHANGED
@@ -202,10 +202,10 @@ import type {
202
202
  HelixSampleEndEvent,
203
203
  HelixSampleStartEvent,
204
204
  HelixSandbox,
205
+ HelixSandboxConsole,
205
206
  HelixSandboxPreview,
206
207
  HelixSandboxSource,
207
208
  HelixSandboxStatusBar,
208
- HelixSandboxTerminal,
209
209
  HelixSandboxToolbar,
210
210
  HelixScatterChart,
211
211
  HelixScrollArea,
@@ -11731,10 +11731,28 @@ export type HelixLogLineVueProps = {
11731
11731
  at?: (HelixLogLine["at"]) | undefined;
11732
11732
  /** How much the line matters. Absent is `info`. */
11733
11733
  level?: (HelixLogLine["level"]) | undefined;
11734
+ /** What a screen reader hears before the text of a line at each level, for a
11735
+ page in another language, keyed by level, such as `{ warn: 'Warnung:' }`.
11736
+ A line at `info` or `log` hears nothing extra, and nor does a line whose
11737
+ text already starts with its words, such as `Error: Cannot find module`.
11738
+ As an attribute it is that object as JSON. */
11739
+ "level-words"?: (HelixLogLine["levelWords"]) | undefined;
11740
+ /** What a screen reader hears before the text of a line at each level, for a
11741
+ page in another language, keyed by level, such as `{ warn: 'Warnung:' }`.
11742
+ A line at `info` or `log` hears nothing extra, and nor does a line whose
11743
+ text already starts with its words, such as `Error: Cannot find module`.
11744
+ As an attribute it is that object as JSON. */
11745
+ levelWords?: (HelixLogLine["levelWords"]) | undefined;
11734
11746
  /** What a screen reader hears for the link on a line's number. `{number}` is the number. */
11735
11747
  "line-label"?: (HelixLogLine["lineLabel"]) | undefined;
11736
11748
  /** What a screen reader hears for the link on a line's number. `{number}` is the number. */
11737
11749
  lineLabel?: (HelixLogLine["lineLabel"]) | undefined;
11750
+ /** What a screen reader hears after a line written more than once in a row.
11751
+ `{count}` is how many times, in the locale. */
11752
+ "times-label"?: (HelixLogLine["timesLabel"]) | undefined;
11753
+ /** What a screen reader hears after a line written more than once in a row.
11754
+ `{count}` is how many times, in the locale. */
11755
+ timesLabel?: (HelixLogLine["timesLabel"]) | undefined;
11738
11756
  };
11739
11757
 
11740
11758
  export type HelixLogLineVueEvents = {};
@@ -11783,6 +11801,11 @@ say that without the component knowing what a row looks like. */
11783
11801
  "loading-text"?: (HelixLog["loadingText"]) | undefined;
11784
11802
  /** The text shown and announced while the rows load. */
11785
11803
  loadingText?: (HelixLog["loadingText"]) | undefined;
11804
+ /** Folds a line written again straight after itself into it, with a count,
11805
+ as a browser's console does, so a loop writing one warning a thousand
11806
+ times is one line. For lines written or given as data, read as they
11807
+ arrive; numbers, `line-href` and the selection count a folded line once. */
11808
+ collapse?: (HelixLog["collapse"]) | undefined;
11786
11809
  /** Whether the log opens following its newest line, when `pinned` is not set.
11787
11810
  `default-pinned="false"` opens it where it starts. */
11788
11811
  "default-pinned"?: (HelixLog["defaultPinned"]) | undefined;
@@ -11825,6 +11848,11 @@ the step's heading and `{status}` is `done` or `failed`. */
11825
11848
  groupLabel?: (HelixLog["groupLabel"]) | undefined;
11826
11849
  /** The log's name, read by screen readers. */
11827
11850
  label?: (HelixLog["label"]) | undefined;
11851
+ /** The quietest level shown: `info` hides `debug` and `log` lines, `warn`
11852
+ shows warnings and errors, and `error` errors only. Unset shows every line.
11853
+ Lines it hides are kept, so lowering it shows them again, and a step shows
11854
+ while it holds a line that shows. */
11855
+ level?: (HelixLog["level"]) | undefined;
11828
11856
  /** The most lines kept, or 0 to keep them all. Past it the oldest lines are
11829
11857
  let go, and the line above the log says how many. */
11830
11858
  limit?: (HelixLog["limit"]) | undefined;
@@ -15753,6 +15781,74 @@ export type HelixRatingVueEvents = {
15753
15781
  input: HelixRatingElementEvent;
15754
15782
  };
15755
15783
 
15784
+ /** `HelixSandboxConsole` component event */
15785
+ export type HelixSandboxConsoleElementEvent<E = Event> = TypedEvent<
15786
+ HelixSandboxConsole,
15787
+ E
15788
+ >;
15789
+ /** `helix-before-change` event type */
15790
+ export type HelixSandboxConsoleHelixBeforeChangeElementEvent =
15791
+ HelixSandboxConsoleElementEvent<HelixBeforeChangeEvent>;
15792
+
15793
+ export type HelixSandboxConsoleVueProps = {
15794
+ /** The clear button's text, under `controls`. */
15795
+ "clear-label"?: (HelixSandboxConsole["clearLabel"]) | undefined;
15796
+ /** The clear button's text, under `controls`. */
15797
+ clearLabel?: (HelixSandboxConsole["clearLabel"]) | undefined;
15798
+ /** Shows a level filter and a clear button above the log.
15799
+
15800
+ Off by default, because a sandbox that puts the console in a panel often
15801
+ has a toolbar of its own for them. */
15802
+ controls?: (HelixSandboxConsole["controls"]) | undefined;
15803
+ /** Text shown before anything has been written, and while the level filter
15804
+ hides every line. */
15805
+ "empty-label"?: (HelixSandboxConsole["emptyLabel"]) | undefined;
15806
+ /** Text shown before anything has been written, and while the level filter
15807
+ hides every line. */
15808
+ emptyLabel?: (HelixSandboxConsole["emptyLabel"]) | undefined;
15809
+ /** The log's name, read by screen readers. */
15810
+ label?: (HelixSandboxConsole["label"]) | undefined;
15811
+ /** The quietest level shown: `info` hides plain logs, `warn` shows warnings
15812
+ and errors, and `error` shows errors only. Absent shows every line.
15813
+
15814
+ Lines it hides are kept, so lowering it shows them again. The filter under
15815
+ `controls` sets it. */
15816
+ level?: (HelixSandboxConsole["level"]) | undefined;
15817
+ /** The level filter's name, read by screen readers, under `controls`. */
15818
+ "level-label"?: (HelixSandboxConsole["levelLabel"]) | undefined;
15819
+ /** The level filter's name, read by screen readers, under `controls`. */
15820
+ levelLabel?: (HelixSandboxConsole["levelLabel"]) | undefined;
15821
+ /** What each choice of the level filter reads, for a page in another
15822
+ language, keyed by level, such as `{ warn: '…' }`. A level left out keeps
15823
+ its English words. As an attribute it is that object as JSON, and JSON
15824
+ that does not parse is no words. */
15825
+ "level-words"?: (HelixSandboxConsole["levelWords"]) | undefined;
15826
+ /** What each choice of the level filter reads, for a page in another
15827
+ language, keyed by level, such as `{ warn: '…' }`. A level left out keeps
15828
+ its English words. As an attribute it is that object as JSON, and JSON
15829
+ that does not parse is no words. */
15830
+ levelWords?: (HelixSandboxConsole["levelWords"]) | undefined;
15831
+ /** What a screen reader hears before a new line at each level, keyed by
15832
+ level, such as `{ warn: 'Warnung:' }`. A plain `log` hears nothing before
15833
+ its text, and nor does a line whose text already starts with its words,
15834
+ such as `Error: Boom` from `console.error(error)`. As an attribute it is
15835
+ that object as JSON. */
15836
+ "spoken-words"?: (HelixSandboxConsole["spokenWords"]) | undefined;
15837
+ /** What a screen reader hears before a new line at each level, keyed by
15838
+ level, such as `{ warn: 'Warnung:' }`. A plain `log` hears nothing before
15839
+ its text, and nor does a line whose text already starts with its words,
15840
+ such as `Error: Boom` from `console.error(error)`. As an attribute it is
15841
+ that object as JSON. */
15842
+ spokenWords?: (HelixSandboxConsole["spokenWords"]) | undefined;
15843
+ };
15844
+
15845
+ export type HelixSandboxConsoleVueEvents = {
15846
+ /** Fired after the reader chose another level in the filter. `level` holds it. */
15847
+ change: HelixSandboxConsoleElementEvent;
15848
+ /** Fired before the level filter changes, with the level chosen, `log` for every level. Cancelable: cancel it to keep the current level. */
15849
+ "helix-before-change": HelixSandboxConsoleHelixBeforeChangeElementEvent;
15850
+ };
15851
+
15756
15852
  /** `HelixSandboxPreview` component event */
15757
15853
  export type HelixSandboxPreviewElementEvent<E = Event> = TypedEvent<
15758
15854
  HelixSandboxPreview,
@@ -16190,68 +16286,6 @@ the column, written as an editor writes them, without grouping. */
16190
16286
 
16191
16287
  export type HelixSandboxStatusBarVueEvents = {};
16192
16288
 
16193
- /** `HelixSandboxTerminal` component event */
16194
- export type HelixSandboxTerminalElementEvent<E = Event> = TypedEvent<
16195
- HelixSandboxTerminal,
16196
- E
16197
- >;
16198
- /** `helix-before-change` event type */
16199
- export type HelixSandboxTerminalHelixBeforeChangeElementEvent =
16200
- HelixSandboxTerminalElementEvent<HelixBeforeChangeEvent>;
16201
-
16202
- export type HelixSandboxTerminalVueProps = {
16203
- /** The clear button's text, under `controls`. */
16204
- "clear-label"?: (HelixSandboxTerminal["clearLabel"]) | undefined;
16205
- /** The clear button's text, under `controls`. */
16206
- clearLabel?: (HelixSandboxTerminal["clearLabel"]) | undefined;
16207
- /** Shows a clear button and a level filter above the log.
16208
-
16209
- Off by default, because a sandbox that puts the terminal in a panel often
16210
- has a toolbar of its own for them. */
16211
- controls?: (HelixSandboxTerminal["controls"]) | undefined;
16212
- /** Text shown before anything has been written. */
16213
- "empty-label"?: (HelixSandboxTerminal["emptyLabel"]) | undefined;
16214
- /** Text shown before anything has been written. */
16215
- emptyLabel?: (HelixSandboxTerminal["emptyLabel"]) | undefined;
16216
- /** The log's name, read by screen readers. */
16217
- label?: (HelixSandboxTerminal["label"]) | undefined;
16218
- /** The quietest level shown: `info` hides plain logs, `warn` shows warnings
16219
- and errors, and `error` shows errors only. Absent shows every line.
16220
-
16221
- Lines it hides are kept, so lowering it shows them again. The filter under
16222
- `controls` sets it. */
16223
- level?: (HelixSandboxTerminal["level"]) | undefined;
16224
- /** The level filter's name, read by screen readers, under `controls`. */
16225
- "level-label"?: (HelixSandboxTerminal["levelLabel"]) | undefined;
16226
- /** The level filter's name, read by screen readers, under `controls`. */
16227
- levelLabel?: (HelixSandboxTerminal["levelLabel"]) | undefined;
16228
- /** What each choice of the level filter reads, for a page in another
16229
- language, keyed by level, such as `{ warn: '…' }`. A level left out keeps
16230
- its English words. As an attribute it is that object as JSON, and JSON
16231
- that does not parse is no words. */
16232
- "level-words"?: (HelixSandboxTerminal["levelWords"]) | undefined;
16233
- /** What each choice of the level filter reads, for a page in another
16234
- language, keyed by level, such as `{ warn: '…' }`. A level left out keeps
16235
- its English words. As an attribute it is that object as JSON, and JSON
16236
- that does not parse is no words. */
16237
- levelWords?: (HelixSandboxTerminal["levelWords"]) | undefined;
16238
- /** What a screen reader is told a repeated line's count is. `{count}` is how
16239
- many times it was written, two or more, in the locale, and a language
16240
- writes the forms it has: `{count, plural, few {# razy} other {# razy}}`. */
16241
- "times-label"?: (HelixSandboxTerminal["timesLabel"]) | undefined;
16242
- /** What a screen reader is told a repeated line's count is. `{count}` is how
16243
- many times it was written, two or more, in the locale, and a language
16244
- writes the forms it has: `{count, plural, few {# razy} other {# razy}}`. */
16245
- timesLabel?: (HelixSandboxTerminal["timesLabel"]) | undefined;
16246
- };
16247
-
16248
- export type HelixSandboxTerminalVueEvents = {
16249
- /** Fired after the reader chose another level in the filter. `level` holds it. */
16250
- change: HelixSandboxTerminalElementEvent;
16251
- /** Fired before the level filter changes, with the level chosen, `log` for every level. Cancelable: cancel it to keep the current level. */
16252
- "helix-before-change": HelixSandboxTerminalHelixBeforeChangeElementEvent;
16253
- };
16254
-
16255
16289
  export type HelixSandboxToolbarVueProps = {};
16256
16290
 
16257
16291
  export type HelixSandboxToolbarVueEvents = {};
@@ -20169,10 +20203,24 @@ exit code, written as the process gave it, and code `0` is a clean exit. */
20169
20203
  "find-controls-label"?: (HelixTerminal["findControlsLabel"]) | undefined;
20170
20204
  /** The name of the find bar's row of buttons, read by screen readers. */
20171
20205
  findControlsLabel?: (HelixTerminal["findControlsLabel"]) | undefined;
20206
+ /** What the find bar says when its regular expression cannot be read. */
20207
+ "find-invalid-label"?: (HelixTerminal["findInvalidLabel"]) | undefined;
20208
+ /** What the find bar says when its regular expression cannot be read. */
20209
+ findInvalidLabel?: (HelixTerminal["findInvalidLabel"]) | undefined;
20172
20210
  /** The find button's label, and the find field's name and placeholder. */
20173
20211
  "find-label"?: (HelixTerminal["findLabel"]) | undefined;
20174
20212
  /** The find button's label, and the find field's name and placeholder. */
20175
20213
  findLabel?: (HelixTerminal["findLabel"]) | undefined;
20214
+ /** Whether the find bar matches case, so "Error" does not find "error". The
20215
+ reader turns it on and off from the bar. */
20216
+ "find-match-case"?: (HelixTerminal["findMatchCase"]) | undefined;
20217
+ /** Whether the find bar matches case, so "Error" does not find "error". The
20218
+ reader turns it on and off from the bar. */
20219
+ findMatchCase?: (HelixTerminal["findMatchCase"]) | undefined;
20220
+ /** The match case button's label. */
20221
+ "find-match-case-label"?: (HelixTerminal["findMatchCaseLabel"]) | undefined;
20222
+ /** The match case button's label. */
20223
+ findMatchCaseLabel?: (HelixTerminal["findMatchCaseLabel"]) | undefined;
20176
20224
  /** The next match button's label. */
20177
20225
  "find-next-label"?: (HelixTerminal["findNextLabel"]) | undefined;
20178
20226
  /** The next match button's label. */
@@ -20181,6 +20229,24 @@ exit code, written as the process gave it, and code `0` is a clean exit. */
20181
20229
  "find-previous-label"?: (HelixTerminal["findPreviousLabel"]) | undefined;
20182
20230
  /** The previous match button's label. */
20183
20231
  findPreviousLabel?: (HelixTerminal["findPreviousLabel"]) | undefined;
20232
+ /** Whether the find bar reads what the reader types as a regular expression,
20233
+ in JavaScript's syntax. The reader turns it on and off from the bar. */
20234
+ "find-regex"?: (HelixTerminal["findRegex"]) | undefined;
20235
+ /** Whether the find bar reads what the reader types as a regular expression,
20236
+ in JavaScript's syntax. The reader turns it on and off from the bar. */
20237
+ findRegex?: (HelixTerminal["findRegex"]) | undefined;
20238
+ /** The regular expression button's label. */
20239
+ "find-regex-label"?: (HelixTerminal["findRegexLabel"]) | undefined;
20240
+ /** The regular expression button's label. */
20241
+ findRegexLabel?: (HelixTerminal["findRegexLabel"]) | undefined;
20242
+ /** Whether the find bar matches whole words only. The reader turns it on and off from the bar. */
20243
+ "find-whole-word"?: (HelixTerminal["findWholeWord"]) | undefined;
20244
+ /** Whether the find bar matches whole words only. The reader turns it on and off from the bar. */
20245
+ findWholeWord?: (HelixTerminal["findWholeWord"]) | undefined;
20246
+ /** The whole word button's label. */
20247
+ "find-whole-word-label"?: (HelixTerminal["findWholeWordLabel"]) | undefined;
20248
+ /** The whole word button's label. */
20249
+ findWholeWordLabel?: (HelixTerminal["findWholeWordLabel"]) | undefined;
20184
20250
  /** The fullscreen button's label. */
20185
20251
  "fullscreen-label"?: (HelixTerminal["fullscreenLabel"]) | undefined;
20186
20252
  /** The fullscreen button's label. */
@@ -25359,6 +25425,8 @@ export type CustomCssProperties = {
25359
25425
  "--rating-step"?: (string) | undefined;
25360
25426
  /** The number of steps in the whole row: `max` divided by `step`. */
25361
25427
  "--rating-steps"?: (string) | undefined;
25428
+ /** Height of the console. */
25429
+ "--sandbox-console-size"?: (string) | undefined;
25362
25430
  /** The invisible width of a divider's drag target. */
25363
25431
  "--sandbox-grab"?: (string) | undefined;
25364
25432
  /** Minimum height of the sandbox. */
@@ -25395,8 +25463,6 @@ export type CustomCssProperties = {
25395
25463
  "--sandbox-source-tag-color"?: (string) | undefined;
25396
25464
  /** Color of the bar's text. */
25397
25465
  "--sandbox-status-bar-color"?: (string) | undefined;
25398
- /** Height of the scrolling region. */
25399
- "--sandbox-terminal-size"?: (string) | undefined;
25400
25466
  /** Space between items. */
25401
25467
  "--sandbox-toolbar-gap"?: (string) | undefined;
25402
25468
  /** The bar's height. Defaults to the height of a large control. */
@@ -25723,6 +25789,12 @@ export type CustomCssProperties = {
25723
25789
  "--switch-on-color"?: (string) | undefined;
25724
25790
  /** Color of the thumb, in both states. */
25725
25791
  "--switch-thumb-color"?: (string) | undefined;
25792
+ /** The least height of a cell, and so of its row. Unset, every row is as tall as a control, whatever its cells hold. */
25793
+ "--table-cell-min-block-size"?: (string) | undefined;
25794
+ /** The space above and below a cell's content. Two values set the space above and the space below. */
25795
+ "--table-padding-block"?: (string) | undefined;
25796
+ /** The color of the line under a cell, which is the line between rows. It takes a color only, because it fills the color in a border shorthand, and a full border value makes the rule invalid. It is drawn on the cells, because the row is `display: contents`. */
25797
+ "--table-rule-color"?: (string) | undefined;
25726
25798
  /** The text alignment of the column above the cell: `start`, `center`, or `end`, and unset when the column sets none. The table writes it, and the stylesheet that draws the cell reads it for `justify-content` and `text-align`, which both follow the writing direction. */
25727
25799
  "--table-cell-align"?: (string) | undefined;
25728
25800
  /** How tall the table's box is while `windowed`, when it scrolls its rows. 24em by default. */
@@ -26949,7 +27021,13 @@ export interface WcToolkitVueGlobalComponents {
26949
27021
  HelixRatingVueProps,
26950
27022
  HelixRatingVueEvents
26951
27023
  >;
26952
- /** 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. **'relay' lets a frame on a login-protected site load its own files.** The frame's opaque origin makes every request it sends cross-site, and a login cookie is not sent on one, so behind a login such as a Vercel preview the frame's script and stylesheet come back as the login page. With 'relay' set to path prefixes, such as '/sandbox/ /fonts/', the frame can ask this element for a file under them and gets the body back, fetched from this page with its cookies. The page fetches only a 'GET' on its own origin, under those prefixes, in plain characters, following no redirect, and it passes on only a script, a stylesheet, a font, a model, or an image of up to 8 MB. Name only prefixes that hold files the site serves to anyone: an example in the frame is untrusted, and it can ask too. Empty, the default, relays nothing. A frame asks only while its own origin is opaque, so a page elsewhere that frames the same document without a sandbox cannot use the answer to run script on the site. **'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. */
27024
+ /** The sandbox receives 'helix-console' events from the preview and passes them to the console. The preview is a separate document, so messages cross 'postMessage' and arrive as text. **Drawn by a Log**, which keeps the newest line in view while a reader stays at the end, holds the last 200 lines, and folds a line written again straight after itself into one line with a count, so an example with a render loop does not fill the panel with the same warning. Each line keeps its console level, and a warning or an error is drawn apart. **What a screen reader hears.** Each new line is read as it arrives, its level first except a plain 'log', so an error does not sound like any other line. A repeat of the line before it is not read again. A reader moving through the lines hears a debug, warning or error line's level too. **'controls' adds a level filter and a clear button** above the log. Both are also yours to drive without them: 'clear()' empties the console, and 'level' hides the quieter lines. */
27025
+ "helix-sandbox-console": DefineCustomElement<
27026
+ HelixSandboxConsole,
27027
+ HelixSandboxConsoleVueProps,
27028
+ HelixSandboxConsoleVueEvents
27029
+ >;
27030
+ /** 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 console 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. **'relay' lets a frame on a login-protected site load its own files.** The frame's opaque origin makes every request it sends cross-site, and a login cookie is not sent on one, so behind a login such as a Vercel preview the frame's script and stylesheet come back as the login page. With 'relay' set to path prefixes, such as '/sandbox/ /fonts/', the frame can ask this element for a file under them and gets the body back, fetched from this page with its cookies. The page fetches only a 'GET' on its own origin, under those prefixes, in plain characters, following no redirect, and it passes on only a script, a stylesheet, a font, a model, or an image of up to 8 MB. Name only prefixes that hold files the site serves to anyone: an example in the frame is untrusted, and it can ask too. Empty, the default, relays nothing. A frame asks only while its own origin is opaque, so a page elsewhere that frames the same document without a sandbox cannot use the answer to run script on the site. **'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. */
26953
27031
  "helix-sandbox-preview": DefineCustomElement<
26954
27032
  HelixSandboxPreview,
26955
27033
  HelixSandboxPreviewVueProps,
@@ -26973,12 +27051,6 @@ export interface WcToolkitVueGlobalComponents {
26973
27051
  HelixSandboxStatusBarVueProps,
26974
27052
  HelixSandboxStatusBarVueEvents
26975
27053
  >;
26976
- /** The sandbox receives 'helix-console' events from the preview and passes them to the terminal. The preview is a separate document, so messages cross 'postMessage' and arrive as text. **Repeats collapse.** Consecutive identical lines show as one line with a count, so an example with a render loop does not fill the panel with the same warning. Only consecutive repeats collapse, so the order of messages is kept. The panel has 'role="log"', the role for an append-only stream. Screen readers announce new output without reading the whole panel again. A line's level is read before it, except a plain 'log', so an error does not sound like any other line. **'controls' adds a clear button and a level filter** above the log. Both are also yours to drive without them: 'clear()' empties the log, and 'level' hides the quieter lines. */
26977
- "helix-sandbox-terminal": DefineCustomElement<
26978
- HelixSandboxTerminal,
26979
- HelixSandboxTerminalVueProps,
26980
- HelixSandboxTerminalVueEvents
26981
- >;
26982
27054
  /** Spans the source pane and the preview, and holds controls for the whole sandbox. Files go at the start and menus at the end, as in most editors. The toolbar does not have 'role="toolbar"'. That role gives a group of similar controls one tab stop with a roving tabindex. The toolbar holds a tab list, which has its own arrow-key behavior that the role would break. Use 'helix-toolbar' for a row of buttons. Both slots are bare, so an empty slot adds no box and no gap. */
26983
27055
  "helix-sandbox-toolbar": DefineCustomElement<
26984
27056
  HelixSandboxToolbar,
package/types/words.d.ts CHANGED
@@ -2377,6 +2377,16 @@ declare module '@fusion.dev/helix-core' {
2377
2377
  * English: `{status, select, failed {{heading} failed} other {{heading} finished}}`
2378
2378
  */
2379
2379
  groupLabel: Message
2380
+ /**
2381
+ * What a screen reader hears before the text of a line at each level, for a
2382
+ * page in another language, keyed by level, such as `{ warn: 'Warnung:' }`.
2383
+ * A line at `info` or `log` hears nothing extra, and nor does a line whose
2384
+ * text already starts with its words, such as `Error: Cannot find module`.
2385
+ * As an attribute it is that object as JSON.
2386
+ *
2387
+ * English: `{ debug: 'Debug:', error: 'Error:', warn: 'Warning:', }`
2388
+ */
2389
+ levelWords: MessageTable
2380
2390
  /**
2381
2391
  * What a screen reader hears for the link on a line's number. `{number}` is the number.
2382
2392
  *
@@ -2408,6 +2418,13 @@ declare module '@fusion.dev/helix-core' {
2408
2418
  * English: `{status, select, pending {waiting} running {running} done {finished} failed {failed} skipped {skipped} other {}}`
2409
2419
  */
2410
2420
  statusLabel: Message
2421
+ /**
2422
+ * What a screen reader hears after a line written more than once in a row.
2423
+ * `{count}` is how many times, in the locale.
2424
+ *
2425
+ * English: `{count} times`
2426
+ */
2427
+ timesLabel: Message
2411
2428
  }
2412
2429
  'helix-map': {
2413
2430
  /**
@@ -3174,6 +3191,52 @@ declare module '@fusion.dev/helix-core' {
3174
3191
  */
3175
3192
  separatorLabel: Message
3176
3193
  }
3194
+ 'helix-sandbox-console': {
3195
+ /**
3196
+ * The clear button's text, under `controls`.
3197
+ *
3198
+ * English: `Clear`
3199
+ */
3200
+ clearLabel: Message
3201
+ /**
3202
+ * Text shown before anything has been written, and while the level filter
3203
+ * hides every line.
3204
+ *
3205
+ * English: `Nothing written to the console yet.`
3206
+ */
3207
+ emptyLabel: Message
3208
+ /**
3209
+ * The log's name, read by screen readers.
3210
+ *
3211
+ * English: `Console output`
3212
+ */
3213
+ label: Message
3214
+ /**
3215
+ * The level filter's name, read by screen readers, under `controls`.
3216
+ *
3217
+ * English: `Levels shown`
3218
+ */
3219
+ levelLabel: Message
3220
+ /**
3221
+ * What each choice of the level filter reads, for a page in another
3222
+ * language, keyed by level, such as `{ warn: '…' }`. A level left out keeps
3223
+ * its English words. As an attribute it is that object as JSON, and JSON
3224
+ * that does not parse is no words.
3225
+ *
3226
+ * English: `{ error: 'Errors', info: 'Info and above', log: 'All levels', warn: 'Warnings and errors', }`
3227
+ */
3228
+ levelWords: MessageTable
3229
+ /**
3230
+ * What a screen reader hears before a new line at each level, keyed by
3231
+ * level, such as `{ warn: 'Warnung:' }`. A plain `log` hears nothing before
3232
+ * its text, and nor does a line whose text already starts with its words,
3233
+ * such as `Error: Boom` from `console.error(error)`. As an attribute it is
3234
+ * that object as JSON.
3235
+ *
3236
+ * English: `{ error: 'Error:', info: 'Info:', warn: 'Warning:', }`
3237
+ */
3238
+ spokenWords: MessageTable
3239
+ }
3177
3240
  'helix-sandbox-preview': {
3178
3241
  /**
3179
3242
  * The frame's name, read by screen readers.
@@ -3233,49 +3296,6 @@ declare module '@fusion.dev/helix-core' {
3233
3296
  */
3234
3297
  positionLabel: Message
3235
3298
  }
3236
- 'helix-sandbox-terminal': {
3237
- /**
3238
- * The clear button's text, under `controls`.
3239
- *
3240
- * English: `Clear`
3241
- */
3242
- clearLabel: Message
3243
- /**
3244
- * Text shown before anything has been written.
3245
- *
3246
- * English: `Nothing written to the console yet.`
3247
- */
3248
- emptyLabel: Message
3249
- /**
3250
- * The log's name, read by screen readers.
3251
- *
3252
- * English: `Console output`
3253
- */
3254
- label: Message
3255
- /**
3256
- * The level filter's name, read by screen readers, under `controls`.
3257
- *
3258
- * English: `Levels shown`
3259
- */
3260
- levelLabel: Message
3261
- /**
3262
- * What each choice of the level filter reads, for a page in another
3263
- * language, keyed by level, such as `{ warn: '…' }`. A level left out keeps
3264
- * its English words. As an attribute it is that object as JSON, and JSON
3265
- * that does not parse is no words.
3266
- *
3267
- * English: `{ error: 'Errors', info: 'Info and above', log: 'All levels', warn: 'Warnings and errors', }`
3268
- */
3269
- levelWords: MessageTable
3270
- /**
3271
- * What a screen reader is told a repeated line's count is. `{count}` is how
3272
- * many times it was written, two or more, in the locale, and a language
3273
- * writes the forms it has: `{count, plural, few {# razy} other {# razy}}`.
3274
- *
3275
- * English: `{count} times`
3276
- */
3277
- timesLabel: Message
3278
- }
3279
3299
  'helix-scatter-chart': {
3280
3300
  /**
3281
3301
  * The word for the strength of the relation, `{correlationLabel}` in
@@ -4181,12 +4201,24 @@ declare module '@fusion.dev/helix-core' {
4181
4201
  * English: `Find controls`
4182
4202
  */
4183
4203
  findControlsLabel: Message
4204
+ /**
4205
+ * What the find bar says when its regular expression cannot be read.
4206
+ *
4207
+ * English: `Not a valid regular expression`
4208
+ */
4209
+ findInvalidLabel: Message
4184
4210
  /**
4185
4211
  * The find button's label, and the find field's name and placeholder.
4186
4212
  *
4187
4213
  * English: `Find`
4188
4214
  */
4189
4215
  findLabel: Message
4216
+ /**
4217
+ * The match case button's label.
4218
+ *
4219
+ * English: `Match case`
4220
+ */
4221
+ findMatchCaseLabel: Message
4190
4222
  /**
4191
4223
  * The next match button's label.
4192
4224
  *
@@ -4199,6 +4231,18 @@ declare module '@fusion.dev/helix-core' {
4199
4231
  * English: `Previous match`
4200
4232
  */
4201
4233
  findPreviousLabel: Message
4234
+ /**
4235
+ * The regular expression button's label.
4236
+ *
4237
+ * English: `Use regular expression`
4238
+ */
4239
+ findRegexLabel: Message
4240
+ /**
4241
+ * The whole word button's label.
4242
+ *
4243
+ * English: `Match whole word`
4244
+ */
4245
+ findWholeWordLabel: Message
4202
4246
  /**
4203
4247
  * The fullscreen button's label.
4204
4248
  *
@@ -1,10 +0,0 @@
1
- import type { ConsoleDetail } from '@fusion.dev/helix-core';
2
- /** A console level, from the quietest to the loudest. */
3
- export type ConsoleLevel = ConsoleDetail['level'];
4
- /** The four levels in order, the quietest first. */
5
- export declare const LEVELS: readonly ConsoleLevel[];
6
- /**
7
- * Whether a line at `level` shows under a terminal's `level`, which is the
8
- * quietest it shows. No floor, or one that names no level, shows every line.
9
- */
10
- export declare const shows: (level: ConsoleLevel, floor: string | undefined) => boolean;
@@ -1,5 +0,0 @@
1
- export const LEVELS = ['log', 'info', 'warn', 'error'];
2
- export const shows = (level, floor) => {
3
- const from = LEVELS.indexOf(floor);
4
- return from < 0 || LEVELS.indexOf(level) >= from;
5
- };
@@ -1,2 +0,0 @@
1
- import { createSheet } from '@fusion.dev/helix-core';
2
- export const styles = createSheet(`:host {block-size: var(--sandbox-terminal-size, 100%);display: grid;grid-template-rows: minmax(0, 1fr);min-block-size: 0}:host([controls]) {grid-template-rows: auto minmax(0, 1fr)}[part="controls"] {align-items: center;border-block-end: var(--helix-border-thin) solid var(--helix-color-border);display: flex;font-family: var(--helix-font-sans);font-size: var(--helix-text-xs);gap: var(--helix-space-xs);justify-content: space-between;padding: var(--helix-space-2xs) var(--helix-space-sm)}[part="filter"], [part="clear"] {background-color: transparent;border: var(--helix-border-thin) solid var(--helix-color-border);border-radius: var(--helix-radii-sm);color: var(--helix-color-foreground);font: inherit;padding: var(--helix-space-2xs) var(--helix-space-xs)}[part="filter"] {font-size: max(var(--helix-text-field-min), var(--helix-text-xs))}[part="clear"] {cursor: pointer}[part="clear"]:hover {background-color: var(--helix-color-surface-sunken)}[part="filter"]:focus-visible, [part="clear"]:focus-visible {outline: var(--helix-size-focus-ring) solid var(--helix-color-focus-ring);outline-offset: var(--helix-size-focus-offset)}[part="log"] {font-family: var(--helix-font-mono);font-size: var(--helix-text-xs);line-height: var(--helix-leading-normal);overflow: auto;padding: var(--helix-space-xs) var(--helix-space-sm)}[part="log"]:focus-visible {outline: var(--helix-size-focus-ring) solid var(--helix-color-focus-ring);outline-offset: calc(var(--helix-size-focus-offset) * -1)}[part="empty"] {color: var(--helix-color-foreground-muted);margin: var(--helix-space-none)}[part="entry"] {align-items: baseline;color: var(--helix-color-foreground-muted);display: grid;gap: var(--helix-space-xs);grid-template-columns: 3.5rem minmax(0, 1fr) auto;padding-block: var(--helix-space-2xs)}[part="level"] {color: var(--helix-color-foreground-muted);text-transform: uppercase}[part="message"] {white-space: pre-wrap;word-break: break-word}[part="count"] {background-color: var(--helix-color-surface-sunken);border-radius: var(--helix-radii-full);color: var(--helix-color-foreground-muted);padding-inline: var(--helix-space-2xs)}[data-level="warn"], [data-level="warn"] [part="level"] {color: var(--helix-color-warning)}[data-level="error"], [data-level="error"] [part="level"] {color: var(--helix-color-danger)}`);