@fusion.dev/helix 0.220.0 → 0.221.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
@@ -76,6 +76,7 @@ declare module 'svelte/elements' {
76
76
  'helix-drawer': Helix<'helix-drawer'>
77
77
  'helix-drilldown-item': Helix<'helix-drilldown-item'>
78
78
  'helix-drilldown': Helix<'helix-drilldown'>
79
+ 'helix-editor': Helix<'helix-editor'>
79
80
  'helix-empty': Helix<'helix-empty'>
80
81
  'helix-file-input': Helix<'helix-file-input'>
81
82
  'helix-filter-chip': Helix<'helix-filter-chip'>
package/types/vue.d.ts CHANGED
@@ -90,6 +90,7 @@ import type {
90
90
  HelixDrilldown,
91
91
  HelixDrilldownItem,
92
92
  HelixEditEvent,
93
+ HelixEditor,
93
94
  HelixEmpty,
94
95
  HelixEndEvent,
95
96
  HelixExpandEvent,
@@ -4764,7 +4765,7 @@ Here rather than on each control. */
4764
4765
  /** The problems in the text, each underlined and listed under the editor. */
4765
4766
  diagnostics?: (HelixCodeEditor["diagnostics"]) | undefined;
4766
4767
  /** What draws the editor, such as `codeMirrorEngine()` from
4767
- `@fusion.dev/helix-editor`. Absent, the editor is a plain text field. */
4768
+ `@fusion.dev/helix-code-editor`. Absent, the editor is a plain text field. */
4768
4769
  engine?: (HelixCodeEditor["engine"]) | undefined;
4769
4770
  };
4770
4771
 
@@ -8845,6 +8846,138 @@ export type HelixDrilldownVueEvents = {
8845
8846
  "helix-select": HelixDrilldownHelixSelectElementEvent;
8846
8847
  };
8847
8848
 
8849
+ /** `HelixEditor` component event */
8850
+ export type HelixEditorElementEvent<E = Event> = TypedEvent<HelixEditor, E>;
8851
+ /** `helix-found` event type */
8852
+ export type HelixEditorHelixFoundElementEvent =
8853
+ HelixEditorElementEvent<HelixFoundEvent>;
8854
+
8855
+ export type HelixEditorVueProps = {
8856
+ /** Covers the container instead of growing with the document, for an editor
8857
+ that fills a pane, such as one side of a split view. The document scrolls
8858
+ inside the frame. The container needs a position, such as
8859
+ `position: relative`. */
8860
+ fill?: (HelixEditor["fill"]) | undefined;
8861
+ /** How the frame stands off the page. Unset, it is outlined. `plain` draws
8862
+ no edge or corners, for a document that fills a page or a pane of its own. */
8863
+ separation?: (HelixEditor["separation"]) | undefined;
8864
+ /** The block menu button's name. `{name}` is the block type at the selection. */
8865
+ "block-chosen-label"?: (HelixEditor["blockChosenLabel"]) | undefined;
8866
+ /** The block menu button's name. `{name}` is the block type at the selection. */
8867
+ blockChosenLabel?: (HelixEditor["blockChosenLabel"]) | undefined;
8868
+ /** The block menu's name, read by screen readers. */
8869
+ "block-label"?: (HelixEditor["blockLabel"]) | undefined;
8870
+ /** The block menu's name, read by screen readers. */
8871
+ blockLabel?: (HelixEditor["blockLabel"]) | undefined;
8872
+ /** The Bold button's label. */
8873
+ "bold-label"?: (HelixEditor["boldLabel"]) | undefined;
8874
+ /** The Bold button's label. */
8875
+ boldLabel?: (HelixEditor["boldLabel"]) | undefined;
8876
+ /** The Bulleted list button's label. */
8877
+ "bullet-list-label"?: (HelixEditor["bulletListLabel"]) | undefined;
8878
+ /** The Bulleted list button's label. */
8879
+ bulletListLabel?: (HelixEditor["bulletListLabel"]) | undefined;
8880
+ /** The Code block row's label in the block menu. */
8881
+ "code-block-label"?: (HelixEditor["codeBlockLabel"]) | undefined;
8882
+ /** The Code block row's label in the block menu. */
8883
+ codeBlockLabel?: (HelixEditor["codeBlockLabel"]) | undefined;
8884
+ /** The Code button's label. */
8885
+ "code-label"?: (HelixEditor["codeLabel"]) | undefined;
8886
+ /** The Code button's label. */
8887
+ codeLabel?: (HelixEditor["codeLabel"]) | undefined;
8888
+ /** The toolbar's name, read by screen readers. */
8889
+ "controls-label"?: (HelixEditor["controlsLabel"]) | undefined;
8890
+ /** The toolbar's name, read by screen readers. */
8891
+ controlsLabel?: (HelixEditor["controlsLabel"]) | undefined;
8892
+ /** The document's name where `label` is empty and the host has no `aria-label`. */
8893
+ "fallback-label"?: (HelixEditor["fallbackLabel"]) | undefined;
8894
+ /** The document's name where `label` is empty and the host has no `aria-label`. */
8895
+ fallbackLabel?: (HelixEditor["fallbackLabel"]) | undefined;
8896
+ /** The Find button's label, and the find bar's name. */
8897
+ "find-label"?: (HelixEditor["findLabel"]) | undefined;
8898
+ /** The Find button's label, and the find bar's name. */
8899
+ findLabel?: (HelixEditor["findLabel"]) | undefined;
8900
+ /** A heading's name in the block menu. `{level}` is its level, 1 to 3. */
8901
+ "heading-label"?: (HelixEditor["headingLabel"]) | undefined;
8902
+ /** A heading's name in the block menu. `{level}` is its level, 1 to 3. */
8903
+ headingLabel?: (HelixEditor["headingLabel"]) | undefined;
8904
+ /** The Italic button's label. */
8905
+ "italic-label"?: (HelixEditor["italicLabel"]) | undefined;
8906
+ /** The Italic button's label. */
8907
+ italicLabel?: (HelixEditor["italicLabel"]) | undefined;
8908
+ /** The document's name, read by screen readers. Name what it holds, such as
8909
+ "Release notes", so that several editors on one page can be told apart.
8910
+ Required. */
8911
+ label?: (HelixEditor["label"]) | undefined;
8912
+ /** The Apply button's label in the address bar. */
8913
+ "link-apply-label"?: (HelixEditor["linkApplyLabel"]) | undefined;
8914
+ /** The Apply button's label in the address bar. */
8915
+ linkApplyLabel?: (HelixEditor["linkApplyLabel"]) | undefined;
8916
+ /** The close button's label in the address bar. */
8917
+ "link-close-label"?: (HelixEditor["linkCloseLabel"]) | undefined;
8918
+ /** The close button's label in the address bar. */
8919
+ linkCloseLabel?: (HelixEditor["linkCloseLabel"]) | undefined;
8920
+ /** The name of the address bar's toolbar, read by screen readers. */
8921
+ "link-controls-label"?: (HelixEditor["linkControlsLabel"]) | undefined;
8922
+ /** The name of the address bar's toolbar, read by screen readers. */
8923
+ linkControlsLabel?: (HelixEditor["linkControlsLabel"]) | undefined;
8924
+ /** The address field's name, which it also shows while it is empty. */
8925
+ "link-field-label"?: (HelixEditor["linkFieldLabel"]) | undefined;
8926
+ /** The address field's name, which it also shows while it is empty. */
8927
+ linkFieldLabel?: (HelixEditor["linkFieldLabel"]) | undefined;
8928
+ /** The Link button's label, and the address bar's name. */
8929
+ "link-label"?: (HelixEditor["linkLabel"]) | undefined;
8930
+ /** The Link button's label, and the address bar's name. */
8931
+ linkLabel?: (HelixEditor["linkLabel"]) | undefined;
8932
+ /** The Remove button's label in the address bar. */
8933
+ "link-remove-label"?: (HelixEditor["linkRemoveLabel"]) | undefined;
8934
+ /** The Remove button's label in the address bar. */
8935
+ linkRemoveLabel?: (HelixEditor["linkRemoveLabel"]) | undefined;
8936
+ /** The Numbered list button's label. */
8937
+ "ordered-list-label"?: (HelixEditor["orderedListLabel"]) | undefined;
8938
+ /** The Numbered list button's label. */
8939
+ orderedListLabel?: (HelixEditor["orderedListLabel"]) | undefined;
8940
+ /** The Paragraph row's label in the block menu. */
8941
+ "paragraph-label"?: (HelixEditor["paragraphLabel"]) | undefined;
8942
+ /** The Paragraph row's label in the block menu. */
8943
+ paragraphLabel?: (HelixEditor["paragraphLabel"]) | undefined;
8944
+ /** The words shown in an empty document, such as "Write the release notes". */
8945
+ placeholder?: (HelixEditor["placeholder"]) | undefined;
8946
+ /** The Quote button's label. */
8947
+ "quote-label"?: (HelixEditor["quoteLabel"]) | undefined;
8948
+ /** The Quote button's label. */
8949
+ quoteLabel?: (HelixEditor["quoteLabel"]) | undefined;
8950
+ /** Shows the document and takes no edits, with no toolbar, for a document
8951
+ someone reads, or one an agent is writing. The attribute is `readonly`,
8952
+ the platform's spelling. */
8953
+ readonly?: (HelixEditor["readOnly"]) | undefined;
8954
+ /** Shows the document and takes no edits, with no toolbar, for a document
8955
+ someone reads, or one an agent is writing. The attribute is `readonly`,
8956
+ the platform's spelling. */
8957
+ readOnly?: (HelixEditor["readOnly"]) | undefined;
8958
+ /** The Redo button's label. */
8959
+ "redo-label"?: (HelixEditor["redoLabel"]) | undefined;
8960
+ /** The Redo button's label. */
8961
+ redoLabel?: (HelixEditor["redoLabel"]) | undefined;
8962
+ /** The Strikethrough button's label. */
8963
+ "strike-label"?: (HelixEditor["strikeLabel"]) | undefined;
8964
+ /** The Strikethrough button's label. */
8965
+ strikeLabel?: (HelixEditor["strikeLabel"]) | undefined;
8966
+ /** Which groups of tools the toolbar draws, as a list of `history`, `block`,
8967
+ `marks`, `link`, `lists`, and `quote`, or `none`. They are drawn in that
8968
+ order, whatever order the list is in. Absent is all six. */
8969
+ tools?: (HelixEditor["tools"]) | undefined;
8970
+ /** The Undo button's label. */
8971
+ "undo-label"?: (HelixEditor["undoLabel"]) | undefined;
8972
+ /** The Undo button's label. */
8973
+ undoLabel?: (HelixEditor["undoLabel"]) | undefined;
8974
+ };
8975
+
8976
+ export type HelixEditorVueEvents = {
8977
+ /** The find bar searched or moved among the matches, with `count` and the selected match's `index`, counting from 0, or -1 for none. */
8978
+ "helix-found": HelixEditorHelixFoundElementEvent;
8979
+ };
8980
+
8848
8981
  export type HelixEmptyVueProps = {
8849
8982
  /** The heading as words, such as "No results", drawn as a heading when
8850
8983
  nothing is slotted into `heading`.
@@ -26118,6 +26251,22 @@ export type CustomCssProperties = {
26118
26251
  "--drilldown-title-font-weight"?: (string) | undefined;
26119
26252
  /** How far a page slides as it arrives, along the line of text. */
26120
26253
  "--drilldown-travel"?: (string) | undefined;
26254
+ /** The ground the document is drawn on. Defaults to the page's background. */
26255
+ "--editor-background-color"?: (string) | undefined;
26256
+ /** The frame's edge and the line under the toolbar. */
26257
+ "--editor-border-color"?: (string) | undefined;
26258
+ /** The fill of the toolbar's strip. */
26259
+ "--editor-header-background-color"?: (string) | undefined;
26260
+ /** How far below the top of the page the toolbar stays while the document scrolls, such as the height of your own fixed header. `0` unless set. */
26261
+ "--editor-header-offset"?: (string) | undefined;
26262
+ /** The longest a line of the document runs, as a length: `72ch` unless set. */
26263
+ "--editor-measure"?: (string) | undefined;
26264
+ /** The frame's least height, which it grows from with the document: `12rem` unless set. Ignored with `fill`. */
26265
+ "--editor-min-block-size"?: (string) | undefined;
26266
+ /** The space around the document, inside the frame. */
26267
+ "--editor-padding"?: (string) | undefined;
26268
+ /** The frame's corner radius. */
26269
+ "--editor-radius"?: (string) | undefined;
26121
26270
  /** Space added above the actions. */
26122
26271
  "--empty-actions-gap"?: (string) | undefined;
26123
26272
  /** Space between the icon, the heading, the message and the actions. */
@@ -28236,7 +28385,7 @@ export interface WcToolkitVueGlobalComponents {
28236
28385
  HelixCodeBlockVueProps,
28237
28386
  HelixCodeBlockVueEvents
28238
28387
  >;
28239
- /** Drawn as Terminal and Code Block are: the code on the page's ground, with a header, a find bar and a status line each a strip on the raised surface, one frame around them. It is 24rem tall unless 'fill' is set or '--code-editor-block-size' says otherwise. An engine draws inside it: '@fusion.dev/helix-editor' themes CodeMirror's gutter, caret, selection and syntax from your tokens, and draws a problem's line number in its tone. Set 'fill' for an editor that fills a pane, such as one side of a split view. */
28388
+ /** Drawn as Terminal and Code Block are: the code on the page's ground, with a header, a find bar and a status line each a strip on the raised surface, one frame around them. It is 24rem tall unless 'fill' is set or '--code-editor-block-size' says otherwise. An engine draws inside it: '@fusion.dev/helix-code-editor' themes CodeMirror's gutter, caret, selection and syntax from your tokens, and draws a problem's line number in its tone. Set 'fill' for an editor that fills a pane, such as one side of a split view. */
28240
28389
  "helix-code-editor": DefineCustomElement<
28241
28390
  HelixCodeEditor,
28242
28391
  HelixCodeEditorVueProps,
@@ -28356,6 +28505,12 @@ export interface WcToolkitVueGlobalComponents {
28356
28505
  HelixDrilldownVueProps,
28357
28506
  HelixDrilldownVueEvents
28358
28507
  >;
28508
+ /** Drawn as Code Editor is: the document on the page's ground, and the toolbar a strip on the raised surface, one frame around them. The strip stays at the top of the page while a long document scrolls under it, and the frame grows with the document from '--editor-min-block-size'. Set 'fill' for an editor that fills a pane, where the document scrolls inside the frame. The document's headings, lists, quotes, code, and tables are drawn by the base layer's 'data-prose' rules, so it reads as your docs and chat replies do. Write 'data-prose' on the document so the base layer draws it before a renderer connects, and 'connectEditor' writes it too. Its lines keep to a readable length, '--editor-measure', centered in a wide frame. */
28509
+ "helix-editor": DefineCustomElement<
28510
+ HelixEditor,
28511
+ HelixEditorVueProps,
28512
+ HelixEditorVueEvents
28513
+ >;
28359
28514
  /** Centered with space around it. An empty view is the only thing on screen, and pressed against the top edge it looks broken. */
28360
28515
  "helix-empty": DefineCustomElement<
28361
28516
  HelixEmpty,
package/types/words.d.ts CHANGED
@@ -1897,6 +1897,146 @@ declare module '@fusion.dev/helix-core' {
1897
1897
  */
1898
1898
  loadingText: Message
1899
1899
  }
1900
+ 'helix-editor': {
1901
+ /**
1902
+ * The block menu button's name. `{name}` is the block type at the selection.
1903
+ *
1904
+ * English: `Text style: {name}`
1905
+ */
1906
+ blockChosenLabel: Message
1907
+ /**
1908
+ * The block menu's name, read by screen readers.
1909
+ *
1910
+ * English: `Text style`
1911
+ */
1912
+ blockLabel: Message
1913
+ /**
1914
+ * The Bold button's label.
1915
+ *
1916
+ * English: `Bold`
1917
+ */
1918
+ boldLabel: Message
1919
+ /**
1920
+ * The Bulleted list button's label.
1921
+ *
1922
+ * English: `Bulleted list`
1923
+ */
1924
+ bulletListLabel: Message
1925
+ /**
1926
+ * The Code block row's label in the block menu.
1927
+ *
1928
+ * English: `Code block`
1929
+ */
1930
+ codeBlockLabel: Message
1931
+ /**
1932
+ * The Code button's label.
1933
+ *
1934
+ * English: `Code`
1935
+ */
1936
+ codeLabel: Message
1937
+ /**
1938
+ * The toolbar's name, read by screen readers.
1939
+ *
1940
+ * English: `Formatting`
1941
+ */
1942
+ controlsLabel: Message
1943
+ /**
1944
+ * The document's name where `label` is empty and the host has no `aria-label`.
1945
+ *
1946
+ * English: `Editor`
1947
+ */
1948
+ fallbackLabel: Message
1949
+ /**
1950
+ * The Find button's label, and the find bar's name.
1951
+ *
1952
+ * English: `Find`
1953
+ */
1954
+ findLabel: Message
1955
+ /**
1956
+ * A heading's name in the block menu. `{level}` is its level, 1 to 3.
1957
+ *
1958
+ * English: `Heading {level}`
1959
+ */
1960
+ headingLabel: Message
1961
+ /**
1962
+ * The Italic button's label.
1963
+ *
1964
+ * English: `Italic`
1965
+ */
1966
+ italicLabel: Message
1967
+ /**
1968
+ * The Apply button's label in the address bar.
1969
+ *
1970
+ * English: `Apply link`
1971
+ */
1972
+ linkApplyLabel: Message
1973
+ /**
1974
+ * The close button's label in the address bar.
1975
+ *
1976
+ * English: `Close`
1977
+ */
1978
+ linkCloseLabel: Message
1979
+ /**
1980
+ * The name of the address bar's toolbar, read by screen readers.
1981
+ *
1982
+ * English: `Link controls`
1983
+ */
1984
+ linkControlsLabel: Message
1985
+ /**
1986
+ * The address field's name, which it also shows while it is empty.
1987
+ *
1988
+ * English: `Address`
1989
+ */
1990
+ linkFieldLabel: Message
1991
+ /**
1992
+ * The Link button's label, and the address bar's name.
1993
+ *
1994
+ * English: `Link`
1995
+ */
1996
+ linkLabel: Message
1997
+ /**
1998
+ * The Remove button's label in the address bar.
1999
+ *
2000
+ * English: `Remove link`
2001
+ */
2002
+ linkRemoveLabel: Message
2003
+ /**
2004
+ * The Numbered list button's label.
2005
+ *
2006
+ * English: `Numbered list`
2007
+ */
2008
+ orderedListLabel: Message
2009
+ /**
2010
+ * The Paragraph row's label in the block menu.
2011
+ *
2012
+ * English: `Paragraph`
2013
+ */
2014
+ paragraphLabel: Message
2015
+ /**
2016
+ * The Quote button's label.
2017
+ *
2018
+ * English: `Quote`
2019
+ */
2020
+ quoteLabel: Message
2021
+ /**
2022
+ * The Redo button's label.
2023
+ *
2024
+ * English: `Redo`
2025
+ */
2026
+ redoLabel: Message
2027
+ /**
2028
+ * The Strikethrough button's label.
2029
+ *
2030
+ * English: `Strikethrough`
2031
+ */
2032
+ strikeLabel: Message
2033
+ /**
2034
+ * The Undo button's label.
2035
+ *
2036
+ * English: `Undo`
2037
+ */
2038
+ undoLabel: Message
2039
+ }
1900
2040
  'helix-file-input': {
1901
2041
  /**
1902
2042
  * What a reader hears when a drop or a paste adds files, with `{names}` and