@fusion.dev/helix 0.162.1 → 0.163.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 +635 -9
- package/dist/canvas/index.d.ts +1 -1
- package/dist/canvas/root/canvas-root.css.js +1 -1
- package/dist/canvas/root/canvas-root.d.ts +2 -0
- package/dist/element-events.generated.js +2 -0
- package/dist/sandbox/preview/sandbox-preview.css.js +4 -1
- package/dist/sandbox/preview/sandbox-preview.d.ts +50 -0
- package/dist/sandbox/preview/sandbox-preview.js +75 -13
- package/dist/sandbox/root/sandbox-root.css.js +1 -1
- package/dist/sandbox/root/sandbox-root.d.ts +55 -0
- package/dist/sandbox/root/sandbox-root.js +111 -4
- package/dist/sandbox/source/sandbox-source.d.ts +5 -0
- package/dist/sandbox/source/sandbox-source.js +4 -0
- package/lint.json +1 -1
- package/package.json +6 -6
- package/types/jsx.d.ts +295 -12
- package/types/vue.d.ts +73 -5
- package/types/words.d.ts +20 -0
package/types/vue.d.ts
CHANGED
|
@@ -2674,6 +2674,13 @@ zoom as a percentage, written the way the element's locale writes one. */
|
|
|
2674
2674
|
/** What screen readers hear after a zoom button or key, with `{zoom}` for the
|
|
2675
2675
|
zoom as a percentage, written the way the element's locale writes one. */
|
|
2676
2676
|
zoomedLabel?: (HelixCanvas["zoomedLabel"]) | undefined;
|
|
2677
|
+
/** Draws every connection's line: a function from where it leaves and
|
|
2678
|
+
arrives, and the sides it does, to its SVG path and where its label sits.
|
|
2679
|
+
|
|
2680
|
+
Absent, or returning nothing for a connection, draws the board's own
|
|
2681
|
+
route. A function that throws draws the board's own too, and the error is
|
|
2682
|
+
reported to the page as an uncaught one. Set it as a property. */
|
|
2683
|
+
edgeRoute?: (HelixCanvas["edgeRoute"]) | undefined;
|
|
2677
2684
|
/** The board's current view: the document's point at the middle of the view,
|
|
2678
2685
|
and the zoom.
|
|
2679
2686
|
|
|
@@ -11964,7 +11971,8 @@ was never tickable look identical from here. Announcing only the ticked one
|
|
|
11964
11971
|
as a checkbox tells a reader its siblings are commands, which is the one
|
|
11965
11972
|
thing they are not.
|
|
11966
11973
|
|
|
11967
|
-
`checked`
|
|
11974
|
+
`checked` and `exclusive` imply it, so a row that is on, or one of a set,
|
|
11975
|
+
never has to say both.
|
|
11968
11976
|
|
|
11969
11977
|
Choosing the row checks or unchecks it, after a `helix-before-toggle` that
|
|
11970
11978
|
you can cancel. */
|
|
@@ -11974,6 +11982,18 @@ you can cancel. */
|
|
|
11974
11982
|
The row changes it when it is chosen. Not reflected: the attribute is the
|
|
11975
11983
|
state you start the row in, and `:state(checked)` carries the current one. */
|
|
11976
11984
|
checked?: (HelixMenuItem["checked"]) | undefined;
|
|
11985
|
+
/** Whether choosing the row closes the menu.
|
|
11986
|
+
|
|
11987
|
+
Unset takes the menu's `close-on-select`, which is on, and keeps the menu
|
|
11988
|
+
open after a Space on a choice row. Write `close-on-select="false"` for a
|
|
11989
|
+
row that changes something the reader is watching, such as a zoom step. */
|
|
11990
|
+
"close-on-select"?: (HelixMenuItem["closeOnSelect"]) | undefined;
|
|
11991
|
+
/** Whether choosing the row closes the menu.
|
|
11992
|
+
|
|
11993
|
+
Unset takes the menu's `close-on-select`, which is on, and keeps the menu
|
|
11994
|
+
open after a Space on a choice row. Write `close-on-select="false"` for a
|
|
11995
|
+
row that changes something the reader is watching, such as a zoom step. */
|
|
11996
|
+
closeOnSelect?: (HelixMenuItem["closeOnSelect"]) | undefined;
|
|
11977
11997
|
/** Whether the row is disabled, so it cannot be chosen. */
|
|
11978
11998
|
disabled?: (HelixMenuItem["disabled"]) | undefined;
|
|
11979
11999
|
/** Whether the link downloads the file when the row is chosen.
|
|
@@ -11990,8 +12010,7 @@ that row and unchecks the others. Choosing the row that is checked leaves
|
|
|
11990
12010
|
it checked. `menuitemradio` tells a reader which kind of set they are in,
|
|
11991
12011
|
where `menuitemcheckbox` says every row is independent.
|
|
11992
12012
|
|
|
11993
|
-
|
|
11994
|
-
one of a set of anything. */
|
|
12013
|
+
It makes the row a choice, so it needs no `checkable` beside it. */
|
|
11995
12014
|
exclusive?: (HelixMenuItem["exclusive"]) | undefined;
|
|
11996
12015
|
/** The URL the row links to. Setting it renders the row as a link.
|
|
11997
12016
|
|
|
@@ -12079,6 +12098,18 @@ the resolved state for stylesheets, which is what the mirror is for. */
|
|
|
12079
12098
|
"back-label"?: (HelixMenu["backLabel"]) | undefined;
|
|
12080
12099
|
/** The text of the row that returns from a submenu. */
|
|
12081
12100
|
backLabel?: (HelixMenu["backLabel"]) | undefined;
|
|
12101
|
+
/** Whether choosing a row closes the menu.
|
|
12102
|
+
|
|
12103
|
+
On by default, and a Space on a choice row leaves the menu open either way.
|
|
12104
|
+
Write `close-on-select="false"` to keep the menu open after every choice, as
|
|
12105
|
+
Ark UI's `closeOnSelect` does. A row's own `close-on-select` wins over this. */
|
|
12106
|
+
"close-on-select"?: (HelixMenu["closeOnSelect"]) | undefined;
|
|
12107
|
+
/** Whether choosing a row closes the menu.
|
|
12108
|
+
|
|
12109
|
+
On by default, and a Space on a choice row leaves the menu open either way.
|
|
12110
|
+
Write `close-on-select="false"` to keep the menu open after every choice, as
|
|
12111
|
+
Ark UI's `closeOnSelect` does. A row's own `close-on-select` wins over this. */
|
|
12112
|
+
closeOnSelect?: (HelixMenu["closeOnSelect"]) | undefined;
|
|
12082
12113
|
/** Whether the menu is the trigger's context menu: it opens where the reader
|
|
12083
12114
|
asks for one, with a right-click, a long press, Shift+F10 or the menu key. */
|
|
12084
12115
|
context?: (HelixMenu["context"]) | undefined;
|
|
@@ -14776,6 +14807,9 @@ keyed on this attribute, and of the 56 tokens that differ by scheme the
|
|
|
14776
14807
|
theme engine emits 19. The other 37 would stay light in a dark preview,
|
|
14777
14808
|
including every one of the 24 series colors a chart reads. */
|
|
14778
14809
|
colorMode?: (HelixSandboxPreview["colorMode"]) | undefined;
|
|
14810
|
+
/** Whether the preview draws a reload button and a button that opens the
|
|
14811
|
+
example in a new tab, in its corner. */
|
|
14812
|
+
controls?: (HelixSandboxPreview["controls"]) | undefined;
|
|
14779
14813
|
/** Writing direction inside the frame.
|
|
14780
14814
|
|
|
14781
14815
|
Not reflected. It is payload for the render message and nothing selects on
|
|
@@ -14797,6 +14831,18 @@ Not reflected, for `direction`'s reason: the placement is applied by the
|
|
|
14797
14831
|
document inside the frame, against its own root, so no rule on this side
|
|
14798
14832
|
could read it. */
|
|
14799
14833
|
layout?: (HelixSandboxPreview["layout"]) | undefined;
|
|
14834
|
+
/** The name of the button that opens the example in a new tab, under
|
|
14835
|
+
`controls`. */
|
|
14836
|
+
"open-label"?: (HelixSandboxPreview["openLabel"]) | undefined;
|
|
14837
|
+
/** The name of the button that opens the example in a new tab, under
|
|
14838
|
+
`controls`. */
|
|
14839
|
+
openLabel?: (HelixSandboxPreview["openLabel"]) | undefined;
|
|
14840
|
+
/** The name of the button that reloads the frame's document, under
|
|
14841
|
+
`controls`. */
|
|
14842
|
+
"reload-label"?: (HelixSandboxPreview["reloadLabel"]) | undefined;
|
|
14843
|
+
/** The name of the button that reloads the frame's document, under
|
|
14844
|
+
`controls`. */
|
|
14845
|
+
reloadLabel?: (HelixSandboxPreview["reloadLabel"]) | undefined;
|
|
14800
14846
|
/** A script to run as a module after the markup, on every render of new
|
|
14801
14847
|
source. A sandbox writes its `js` pane here. */
|
|
14802
14848
|
script?: (HelixSandboxPreview["script"]) | undefined;
|
|
@@ -14818,6 +14864,9 @@ export type HelixSandboxPreviewVueEvents = {
|
|
|
14818
14864
|
|
|
14819
14865
|
/** `HelixSandbox` component event */
|
|
14820
14866
|
export type HelixSandboxElementEvent<E = Event> = TypedEvent<HelixSandbox, E>;
|
|
14867
|
+
/** `helix-before-change` event type */
|
|
14868
|
+
export type HelixSandboxHelixBeforeChangeElementEvent =
|
|
14869
|
+
HelixSandboxElementEvent<HelixBeforeChangeEvent>;
|
|
14821
14870
|
/** `helix-before-edit` event type */
|
|
14822
14871
|
export type HelixSandboxHelixBeforeEditElementEvent =
|
|
14823
14872
|
HelixSandboxElementEvent<HelixBeforeEditEvent>;
|
|
@@ -14885,6 +14934,14 @@ sandbox back to the size it already was.
|
|
|
14885
14934
|
Declared rather than captured, so it is a number a consumer states and can
|
|
14886
14935
|
change, and it needs no first frame to be read on. */
|
|
14887
14936
|
defaultSplit?: (HelixSandbox["defaultSplit"]) | undefined;
|
|
14937
|
+
/** The `name` of the source pane shown, where the sandbox holds several.
|
|
14938
|
+
|
|
14939
|
+
Unset, or a name no pane has, shows the first. */
|
|
14940
|
+
file?: (HelixSandbox["file"]) | undefined;
|
|
14941
|
+
/** The name of the file tabs, read by screen readers. */
|
|
14942
|
+
"files-label"?: (HelixSandbox["filesLabel"]) | undefined;
|
|
14943
|
+
/** The name of the file tabs, read by screen readers. */
|
|
14944
|
+
filesLabel?: (HelixSandbox["filesLabel"]) | undefined;
|
|
14888
14945
|
/** Which pane comes first, before the divider.
|
|
14889
14946
|
|
|
14890
14947
|
A sandbox is read in one of two directions and the two are not a
|
|
@@ -14958,6 +15015,10 @@ is `preview`. */
|
|
|
14958
15015
|
};
|
|
14959
15016
|
|
|
14960
15017
|
export type HelixSandboxVueEvents = {
|
|
15018
|
+
/** A file tab showed its pane, whose `name` `file` now holds. */
|
|
15019
|
+
change: HelixSandboxElementEvent;
|
|
15020
|
+
/** Fired before a file tab shows its pane, with the pane's `name`. Cancelable: cancel it to keep the pane shown. */
|
|
15021
|
+
"helix-before-change": HelixSandboxHelixBeforeChangeElementEvent;
|
|
14961
15022
|
/** Fired before the source is edited. The source pane dispatches it, and you can listen for it on the sandbox. Cancelable: cancel it to keep the source unchanged. */
|
|
14962
15023
|
"helix-before-edit": HelixSandboxHelixBeforeEditElementEvent;
|
|
14963
15024
|
/** Fired before the panel's divider is released, with the panel's height in pixels. A panel dragged closed reports `panel-collapsed-size`, its smallest height. Cancelable: cancel it to keep the current height. */
|
|
@@ -15002,6 +15063,9 @@ export type HelixSandboxSourceVueProps = {
|
|
|
15002
15063
|
"keys-description"?: (HelixSandboxSource["keysDescription"]) | undefined;
|
|
15003
15064
|
/** The field's description, read by screen readers while Tab indents. */
|
|
15004
15065
|
keysDescription?: (HelixSandboxSource["keysDescription"]) | undefined;
|
|
15066
|
+
/** The pane's file name, such as `index.html`, on its tab where a sandbox
|
|
15067
|
+
holds several panes. Empty puts the pane's `name` on the tab. */
|
|
15068
|
+
label?: (HelixSandboxSource["label"]) | undefined;
|
|
15005
15069
|
/** Which source this pane holds. Every `helix-before-edit` event includes it.
|
|
15006
15070
|
|
|
15007
15071
|
`html` and `css` are what the sandbox root routes on; any other name is
|
|
@@ -21130,6 +21194,10 @@ export type CustomCssProperties = {
|
|
|
21130
21194
|
"--canvas-label-editor-inline-size"?: (string) | undefined;
|
|
21131
21195
|
/** The size of the label on a connection. */
|
|
21132
21196
|
"--canvas-label-font-size"?: (string) | undefined;
|
|
21197
|
+
/** The height of the minimap, under `controls="minimap"`. */
|
|
21198
|
+
"--canvas-minimap-block-size"?: (string) | undefined;
|
|
21199
|
+
/** The width of the minimap, under `controls="minimap"`. */
|
|
21200
|
+
"--canvas-minimap-inline-size"?: (string) | undefined;
|
|
21133
21201
|
/** The frame's corners. */
|
|
21134
21202
|
"--canvas-radius"?: (string) | undefined;
|
|
21135
21203
|
/** The color of what is selected: a card's outline, its corners and its move handle, a connection and its ends, and the box drawn to select. */
|
|
@@ -23966,13 +24034,13 @@ export interface WcToolkitVueGlobalComponents {
|
|
|
23966
24034
|
HelixRatingVueProps,
|
|
23967
24035
|
HelixRatingVueEvents
|
|
23968
24036
|
>;
|
|
23969
|
-
/** 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. **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'. */
|
|
24037
|
+
/** 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. **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. 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. */
|
|
23970
24038
|
"helix-sandbox-preview": DefineCustomElement<
|
|
23971
24039
|
HelixSandboxPreview,
|
|
23972
24040
|
HelixSandboxPreviewVueProps,
|
|
23973
24041
|
HelixSandboxPreviewVueEvents
|
|
23974
24042
|
>;
|
|
23975
|
-
/** 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. 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. */
|
|
24043
|
+
/** 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. */
|
|
23976
24044
|
"helix-sandbox": DefineCustomElement<
|
|
23977
24045
|
HelixSandbox,
|
|
23978
24046
|
HelixSandboxVueProps,
|
package/types/words.d.ts
CHANGED
|
@@ -2107,6 +2107,12 @@ declare module '@fusion.dev/helix-core' {
|
|
|
2107
2107
|
* English: `Resize panes and panel`
|
|
2108
2108
|
*/
|
|
2109
2109
|
cornerLabel: Message
|
|
2110
|
+
/**
|
|
2111
|
+
* The name of the file tabs, read by screen readers.
|
|
2112
|
+
*
|
|
2113
|
+
* English: `Files`
|
|
2114
|
+
*/
|
|
2115
|
+
filesLabel: Message
|
|
2110
2116
|
/**
|
|
2111
2117
|
* The name of the panel's divider, read by screen readers.
|
|
2112
2118
|
*
|
|
@@ -2130,6 +2136,20 @@ declare module '@fusion.dev/helix-core' {
|
|
|
2130
2136
|
* English: `Preview`
|
|
2131
2137
|
*/
|
|
2132
2138
|
label: Message
|
|
2139
|
+
/**
|
|
2140
|
+
* The name of the button that opens the example in a new tab, under
|
|
2141
|
+
* `controls`.
|
|
2142
|
+
*
|
|
2143
|
+
* English: `Open preview in a new tab`
|
|
2144
|
+
*/
|
|
2145
|
+
openLabel: Message
|
|
2146
|
+
/**
|
|
2147
|
+
* The name of the button that reloads the frame's document, under
|
|
2148
|
+
* `controls`.
|
|
2149
|
+
*
|
|
2150
|
+
* English: `Reload preview`
|
|
2151
|
+
*/
|
|
2152
|
+
reloadLabel: Message
|
|
2133
2153
|
}
|
|
2134
2154
|
'helix-sandbox-source': {
|
|
2135
2155
|
/**
|