@fusion.dev/helix 0.183.0 → 0.184.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +287 -102
- package/dist/code-block/index.d.ts +1 -0
- package/dist/code-block/index.js +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/menu/filter/index.d.ts +1 -0
- package/dist/menu/filter/index.js +5 -0
- package/dist/menu/filter/menu-filter.css.d.ts +1 -0
- package/dist/menu/filter/menu-filter.css.js +2 -0
- package/dist/menu/root/menu-root.css.js +1 -1
- package/dist/sandbox/compile.d.ts +63 -0
- package/dist/sandbox/compile.js +52 -0
- package/dist/sandbox/preview/sandbox-preview.d.ts +29 -1
- package/dist/sandbox/preview/sandbox-preview.js +45 -7
- package/dist/sandbox/root/sandbox-root.d.ts +4 -0
- package/dist/sandbox/root/sandbox-root.js +1 -1
- package/lint.json +1 -1
- package/package.json +6 -6
- package/types/jsx.d.ts +104 -8
- package/types/vue.d.ts +26 -4
- package/types/words.d.ts +7 -0
package/custom-elements.json
CHANGED
|
@@ -39555,6 +39555,22 @@
|
|
|
39555
39555
|
"path": "src/code-block/index.ts",
|
|
39556
39556
|
"declarations": [],
|
|
39557
39557
|
"exports": [
|
|
39558
|
+
{
|
|
39559
|
+
"kind": "js",
|
|
39560
|
+
"name": "CodeBlockHighlighter",
|
|
39561
|
+
"declaration": {
|
|
39562
|
+
"name": "CodeBlockHighlighter",
|
|
39563
|
+
"package": "@fusion.dev/helix-headless/code-block"
|
|
39564
|
+
}
|
|
39565
|
+
},
|
|
39566
|
+
{
|
|
39567
|
+
"kind": "js",
|
|
39568
|
+
"name": "registerHighlighter",
|
|
39569
|
+
"declaration": {
|
|
39570
|
+
"name": "registerHighlighter",
|
|
39571
|
+
"package": "@fusion.dev/helix-headless/code-block"
|
|
39572
|
+
}
|
|
39573
|
+
},
|
|
39558
39574
|
{
|
|
39559
39575
|
"kind": "js",
|
|
39560
39576
|
"name": "*",
|
|
@@ -39952,7 +39968,7 @@
|
|
|
39952
39968
|
"type": {
|
|
39953
39969
|
"text": "(code: string, language: string) => string | undefined"
|
|
39954
39970
|
},
|
|
39955
|
-
"description": "Turns the code into highlighted markup, which the block draws in place of\nthe plain text.\n\nCalled with the code as written and the block's `language`, and returning\nHTML, such as the output of Shiki's `codeToHtml` or Prism's `highlight`.\nOne function serves every block on a page, each block saying its own\nlanguage:\n\n```js\nfor (const block of document.querySelectorAll('helix-code-block')) {\n block.highlight = (code, lang) => codeToHtml(code, { lang, theme: 'github-light' })\n}\n```\n\n**The markup is drawn as given**, so it has to escape the code it was\nhanded, which those highlighters do. A `<pre>` and `<code>` around the\nwhole of it, which Shiki writes, are taken off, so the lines sit level\nwith the gutter's numbers and the block keeps one tab stop. The code stays\nin the slot, so the copy button copies it as written and a reader without\nthe script still has it. Not called on a server, which has no code to\nread, nor for a diff.",
|
|
39971
|
+
"description": "Turns the code into highlighted markup, which the block draws in place of\nthe plain text.\n\nCalled with the code as written and the block's `language`, and returning\nHTML, such as the output of Shiki's `codeToHtml` or Prism's `highlight`.\nOne function serves every block on a page, each block saying its own\nlanguage:\n\n```js\nfor (const block of document.querySelectorAll('helix-code-block')) {\n block.highlight = (code, lang) => codeToHtml(code, { lang, theme: 'github-light' })\n}\n```\n\n**The markup is drawn as given**, so it has to escape the code it was\nhanded, which those highlighters do. A `<pre>` and `<code>` around the\nwhole of it, which Shiki writes, are taken off, so the lines sit level\nwith the gutter's numbers and the block keeps one tab stop. The code stays\nin the slot, so the copy button copies it as written and a reader without\nthe script still has it. Not called on a server, which has no code to\nread, nor for a diff.\n\nAbsent, the block draws with the highlighter `registerHighlighter` gave\nevery block, where an entry such as `@fusion.dev/helix-sandbox/code-block`\nregistered one, and plain otherwise.",
|
|
39956
39972
|
"inheritedFrom": {
|
|
39957
39973
|
"name": "HelixHeadlessCodeBlock",
|
|
39958
39974
|
"module": "src/code-block/root/code-block-root.ts"
|
|
@@ -104909,6 +104925,14 @@
|
|
|
104909
104925
|
"module": "src/megamenu/index.js"
|
|
104910
104926
|
}
|
|
104911
104927
|
},
|
|
104928
|
+
{
|
|
104929
|
+
"kind": "js",
|
|
104930
|
+
"name": "*",
|
|
104931
|
+
"declaration": {
|
|
104932
|
+
"name": "*",
|
|
104933
|
+
"module": "src/menu/filter/index.js"
|
|
104934
|
+
}
|
|
104935
|
+
},
|
|
104912
104936
|
{
|
|
104913
104937
|
"kind": "js",
|
|
104914
104938
|
"name": "*",
|
|
@@ -135521,6 +135545,49 @@
|
|
|
135521
135545
|
}
|
|
135522
135546
|
]
|
|
135523
135547
|
},
|
|
135548
|
+
{
|
|
135549
|
+
"kind": "javascript-module",
|
|
135550
|
+
"path": "src/menu/filter/index.ts",
|
|
135551
|
+
"declarations": [],
|
|
135552
|
+
"exports": [
|
|
135553
|
+
{
|
|
135554
|
+
"kind": "js",
|
|
135555
|
+
"name": "filterMenu",
|
|
135556
|
+
"declaration": {
|
|
135557
|
+
"name": "filterMenu",
|
|
135558
|
+
"package": "@fusion.dev/helix-headless/menu/filter"
|
|
135559
|
+
}
|
|
135560
|
+
},
|
|
135561
|
+
{
|
|
135562
|
+
"kind": "js",
|
|
135563
|
+
"name": "MenuFilterController",
|
|
135564
|
+
"declaration": {
|
|
135565
|
+
"name": "MenuFilterController",
|
|
135566
|
+
"package": "@fusion.dev/helix-headless/menu/filter"
|
|
135567
|
+
}
|
|
135568
|
+
}
|
|
135569
|
+
]
|
|
135570
|
+
},
|
|
135571
|
+
{
|
|
135572
|
+
"kind": "javascript-module",
|
|
135573
|
+
"path": "src/menu/filter/menu-filter.css.ts",
|
|
135574
|
+
"declarations": [
|
|
135575
|
+
{
|
|
135576
|
+
"kind": "variable",
|
|
135577
|
+
"name": "styles"
|
|
135578
|
+
}
|
|
135579
|
+
],
|
|
135580
|
+
"exports": [
|
|
135581
|
+
{
|
|
135582
|
+
"kind": "js",
|
|
135583
|
+
"name": "styles",
|
|
135584
|
+
"declaration": {
|
|
135585
|
+
"name": "styles",
|
|
135586
|
+
"module": "src/menu/filter/menu-filter.css.ts"
|
|
135587
|
+
}
|
|
135588
|
+
}
|
|
135589
|
+
]
|
|
135590
|
+
},
|
|
135524
135591
|
{
|
|
135525
135592
|
"kind": "javascript-module",
|
|
135526
135593
|
"path": "src/menu/index.ts",
|
|
@@ -137397,7 +137464,7 @@
|
|
|
137397
137464
|
"text": "boolean"
|
|
137398
137465
|
},
|
|
137399
137466
|
"default": "false",
|
|
137400
|
-
"description": "Whether the menu shows a field above its rows that narrows them as the\nreader types, with focus staying in the field.",
|
|
137467
|
+
"description": "Whether the menu shows a field above its rows that narrows them as the\nreader types, with focus staying in the field, once\n`@fusion.dev/helix/menu/filter` (or `@fusion.dev/helix-headless/menu/filter`)\nis imported. Without that import it does nothing, so a menu that never\nfilters carries none of the filter's code, and a development build says\nwhich import is missing.",
|
|
137401
137468
|
"attribute": "filterable",
|
|
137402
137469
|
"inheritedFrom": {
|
|
137403
137470
|
"name": "HelixHeadlessMenu",
|
|
@@ -137888,27 +137955,12 @@
|
|
|
137888
137955
|
},
|
|
137889
137956
|
{
|
|
137890
137957
|
"kind": "field",
|
|
137891
|
-
"name": "
|
|
137892
|
-
"type": {
|
|
137893
|
-
"text": "HTMLInputElement | null"
|
|
137894
|
-
},
|
|
137895
|
-
"privacy": "private",
|
|
137896
|
-
"description": "The filter field, with `filterable`.",
|
|
137897
|
-
"readonly": true,
|
|
137898
|
-
"inheritedFrom": {
|
|
137899
|
-
"name": "HelixHeadlessMenu",
|
|
137900
|
-
"module": "src/menu/root/menu-root.ts"
|
|
137901
|
-
}
|
|
137902
|
-
},
|
|
137903
|
-
{
|
|
137904
|
-
"kind": "field",
|
|
137905
|
-
"name": "filterPage",
|
|
137958
|
+
"name": "filterer",
|
|
137906
137959
|
"type": {
|
|
137907
|
-
"text": "
|
|
137960
|
+
"text": "MenuFilterController | undefined"
|
|
137908
137961
|
},
|
|
137909
137962
|
"privacy": "private",
|
|
137910
|
-
"
|
|
137911
|
-
"description": "The submenu the filter narrows, or null for the top page.",
|
|
137963
|
+
"description": "The filter `menu/filter` gives this menu, which `filterable` turns on.\n\nDeclared and never initialized, because the entry sets it from the\nconstructor Lit runs initializers in, which is before this class's own\nfields: an initializer here would set it back to `undefined`.",
|
|
137912
137964
|
"inheritedFrom": {
|
|
137913
137965
|
"name": "HelixHeadlessMenu",
|
|
137914
137966
|
"module": "src/menu/root/menu-root.ts"
|
|
@@ -137916,25 +137968,12 @@
|
|
|
137916
137968
|
},
|
|
137917
137969
|
{
|
|
137918
137970
|
"kind": "field",
|
|
137919
|
-
"name": "
|
|
137971
|
+
"name": "filters",
|
|
137920
137972
|
"type": {
|
|
137921
|
-
"text": "
|
|
137973
|
+
"text": "MenuFilterController | undefined"
|
|
137922
137974
|
},
|
|
137923
137975
|
"privacy": "private",
|
|
137924
|
-
"description": "The filter
|
|
137925
|
-
"inheritedFrom": {
|
|
137926
|
-
"name": "HelixHeadlessMenu",
|
|
137927
|
-
"module": "src/menu/root/menu-root.ts"
|
|
137928
|
-
}
|
|
137929
|
-
},
|
|
137930
|
-
{
|
|
137931
|
-
"kind": "field",
|
|
137932
|
-
"name": "filtering",
|
|
137933
|
-
"type": {
|
|
137934
|
-
"text": "boolean"
|
|
137935
|
-
},
|
|
137936
|
-
"privacy": "private",
|
|
137937
|
-
"description": "Whether the filter is narrowing the rows.",
|
|
137976
|
+
"description": "The filter, while `filterable` is set and `menu/filter` is imported.",
|
|
137938
137977
|
"readonly": true,
|
|
137939
137978
|
"inheritedFrom": {
|
|
137940
137979
|
"name": "HelixHeadlessMenu",
|
|
@@ -137958,7 +137997,7 @@
|
|
|
137958
137997
|
}
|
|
137959
137998
|
}
|
|
137960
137999
|
],
|
|
137961
|
-
"description": "Whether the filter keeps a row
|
|
138000
|
+
"description": "Whether the filter keeps a row, which every row is without one.",
|
|
137962
138001
|
"inheritedFrom": {
|
|
137963
138002
|
"name": "HelixHeadlessMenu",
|
|
137964
138003
|
"module": "src/menu/root/menu-root.ts"
|
|
@@ -137981,53 +138020,7 @@
|
|
|
137981
138020
|
}
|
|
137982
138021
|
}
|
|
137983
138022
|
],
|
|
137984
|
-
"description": "Asks to filter by new text
|
|
137985
|
-
"inheritedFrom": {
|
|
137986
|
-
"name": "HelixHeadlessMenu",
|
|
137987
|
-
"module": "src/menu/root/menu-root.ts"
|
|
137988
|
-
}
|
|
137989
|
-
},
|
|
137990
|
-
{
|
|
137991
|
-
"kind": "field",
|
|
137992
|
-
"name": "handleFilterInput",
|
|
137993
|
-
"privacy": "private",
|
|
137994
|
-
"readonly": true,
|
|
137995
|
-
"inheritedFrom": {
|
|
137996
|
-
"name": "HelixHeadlessMenu",
|
|
137997
|
-
"module": "src/menu/root/menu-root.ts"
|
|
137998
|
-
}
|
|
137999
|
-
},
|
|
138000
|
-
{
|
|
138001
|
-
"kind": "method",
|
|
138002
|
-
"name": "filterBy",
|
|
138003
|
-
"privacy": "private",
|
|
138004
|
-
"return": {
|
|
138005
|
-
"type": {
|
|
138006
|
-
"text": "void"
|
|
138007
|
-
}
|
|
138008
|
-
},
|
|
138009
|
-
"parameters": [
|
|
138010
|
-
{
|
|
138011
|
-
"name": "value",
|
|
138012
|
-
"type": {
|
|
138013
|
-
"text": "string"
|
|
138014
|
-
}
|
|
138015
|
-
}
|
|
138016
|
-
],
|
|
138017
|
-
"description": "Filters by what the reader typed, and highlights the first row kept.",
|
|
138018
|
-
"inheritedFrom": {
|
|
138019
|
-
"name": "HelixHeadlessMenu",
|
|
138020
|
-
"module": "src/menu/root/menu-root.ts"
|
|
138021
|
-
}
|
|
138022
|
-
},
|
|
138023
|
-
{
|
|
138024
|
-
"kind": "field",
|
|
138025
|
-
"name": "highlighted",
|
|
138026
|
-
"type": {
|
|
138027
|
-
"text": "HelixHeadlessMenuItem | undefined"
|
|
138028
|
-
},
|
|
138029
|
-
"privacy": "private",
|
|
138030
|
-
"description": "The row the keys reached while focus stays in the filter field.",
|
|
138023
|
+
"description": "Asks to filter by new text. See `MenuFilterController.request`.",
|
|
138031
138024
|
"inheritedFrom": {
|
|
138032
138025
|
"name": "HelixHeadlessMenu",
|
|
138033
138026
|
"module": "src/menu/root/menu-root.ts"
|
|
@@ -138050,7 +138043,7 @@
|
|
|
138050
138043
|
}
|
|
138051
138044
|
}
|
|
138052
138045
|
],
|
|
138053
|
-
"description": "Moves the reader to a row: focus, or with
|
|
138046
|
+
"description": "Moves the reader to a row: focus, or with a filter the highlight, focus\nstaying in the filter field.",
|
|
138054
138047
|
"inheritedFrom": {
|
|
138055
138048
|
"name": "HelixHeadlessMenu",
|
|
138056
138049
|
"module": "src/menu/root/menu-root.ts"
|
|
@@ -138384,17 +138377,6 @@
|
|
|
138384
138377
|
"module": "src/menu/root/menu-root.ts"
|
|
138385
138378
|
}
|
|
138386
138379
|
},
|
|
138387
|
-
{
|
|
138388
|
-
"kind": "field",
|
|
138389
|
-
"name": "handleMouseDown",
|
|
138390
|
-
"privacy": "private",
|
|
138391
|
-
"readonly": true,
|
|
138392
|
-
"description": "Keeps focus in the filter field through a press on a row or the way\nback, as React Aria's virtual focus does: the press still chooses.",
|
|
138393
|
-
"inheritedFrom": {
|
|
138394
|
-
"name": "HelixHeadlessMenu",
|
|
138395
|
-
"module": "src/menu/root/menu-root.ts"
|
|
138396
|
-
}
|
|
138397
|
-
},
|
|
138398
138380
|
{
|
|
138399
138381
|
"kind": "field",
|
|
138400
138382
|
"name": "handlePointerMove",
|
|
@@ -139179,7 +139161,7 @@
|
|
|
139179
139161
|
"text": "boolean"
|
|
139180
139162
|
},
|
|
139181
139163
|
"default": "false",
|
|
139182
|
-
"description": "Whether the menu shows a field above its rows that narrows them as the\nreader types, with focus staying in the field.",
|
|
139164
|
+
"description": "Whether the menu shows a field above its rows that narrows them as the\nreader types, with focus staying in the field, once\n`@fusion.dev/helix/menu/filter` (or `@fusion.dev/helix-headless/menu/filter`)\nis imported. Without that import it does nothing, so a menu that never\nfilters carries none of the filter's code, and a development build says\nwhich import is missing.",
|
|
139183
139165
|
"fieldName": "filterable",
|
|
139184
139166
|
"inheritedFrom": {
|
|
139185
139167
|
"name": "HelixHeadlessMenu",
|
|
@@ -172401,6 +172383,96 @@
|
|
|
172401
172383
|
}
|
|
172402
172384
|
]
|
|
172403
172385
|
},
|
|
172386
|
+
{
|
|
172387
|
+
"kind": "javascript-module",
|
|
172388
|
+
"path": "src/sandbox/compile.ts",
|
|
172389
|
+
"declarations": [
|
|
172390
|
+
{
|
|
172391
|
+
"kind": "variable",
|
|
172392
|
+
"name": "COMPILER",
|
|
172393
|
+
"type": {
|
|
172394
|
+
"text": "string"
|
|
172395
|
+
},
|
|
172396
|
+
"default": "'sucrase@3.35.1'",
|
|
172397
|
+
"description": "The compiler a module file in TypeScript or JSX runs through before the\nframe loads it, by its npm name and its pinned version.\n\n**Sucrase, measured against esbuild-wasm on October 8, 2026**, on a TSX\nmodule of 241 lines with the automatic JSX runtime:\n\n| | Sucrase 3.35 | esbuild-wasm 0.28 |\n| --- | --- | --- |\n| Download, gzip | 48 KB, and 9 KB of `buffer` esm.sh adds | 3.2 MB of WebAssembly, and 19 KB |\n| First compile | 14 ms | 188 ms, the WebAssembly starting |\n| Each after | 0.8 ms | 4.6 ms |\n| Automatic JSX runtime | yes | yes |\n| Source map | yes | yes |\n\nBoth compile what a sandbox holds, and neither checks types. esbuild-wasm\ndownloads 56 times as much before the first module runs, which a reader\nwaits through on the first edit of every page. Sucrase also keeps every line\nwhere it was, so a line number in an error in the frame is the line in the\npane even where a browser ignores the source map.\n\n**Loaded the first time a module needs it**, from the preview's `cdn` as a\npackage in `dependencies` is, so the published package carries no compiler\nand a sandbox with no TypeScript loads none.\n\n**In a worker of its own**, which has no access to the page and keeps a\nlong compile off the page's thread. The worker's script is text, so the\n`import()` of an address known only at run time is one no bundler reads:\nwritten in this module, Turbopack refused to build a page that imported\nit, the TypeScript build having dropped the comments that tell bundlers to\nleave it alone. The compiler reads the source as text, and the example\nitself still runs only in the frame."
|
|
172398
|
+
},
|
|
172399
|
+
{
|
|
172400
|
+
"kind": "variable",
|
|
172401
|
+
"name": "COMPILED",
|
|
172402
|
+
"description": "Whether a module file is TypeScript or JSX, which a browser cannot run as written."
|
|
172403
|
+
},
|
|
172404
|
+
{
|
|
172405
|
+
"kind": "variable",
|
|
172406
|
+
"name": "compilers",
|
|
172407
|
+
"default": "new Map<string, Transform>()",
|
|
172408
|
+
"description": "The compiler for each `cdn`, so each is set up once a page. A spec puts a\nstand-in here, for an address of its own."
|
|
172409
|
+
},
|
|
172410
|
+
{
|
|
172411
|
+
"kind": "function",
|
|
172412
|
+
"name": "compile",
|
|
172413
|
+
"return": {
|
|
172414
|
+
"type": {
|
|
172415
|
+
"text": "Promise<string>"
|
|
172416
|
+
}
|
|
172417
|
+
},
|
|
172418
|
+
"parameters": [
|
|
172419
|
+
{
|
|
172420
|
+
"name": "cdn",
|
|
172421
|
+
"type": {
|
|
172422
|
+
"text": "string"
|
|
172423
|
+
}
|
|
172424
|
+
},
|
|
172425
|
+
{
|
|
172426
|
+
"name": "path",
|
|
172427
|
+
"type": {
|
|
172428
|
+
"text": "string"
|
|
172429
|
+
}
|
|
172430
|
+
},
|
|
172431
|
+
{
|
|
172432
|
+
"name": "source",
|
|
172433
|
+
"type": {
|
|
172434
|
+
"text": "string"
|
|
172435
|
+
}
|
|
172436
|
+
}
|
|
172437
|
+
],
|
|
172438
|
+
"description": "A module file compiled to JavaScript, with its source map inline, for the\nframe to load as its other modules.\n\n`.ts` is read as TypeScript, `.tsx` as TypeScript with JSX, and `.jsx` as\nJSX. JSX compiles to the automatic runtime, `react/jsx-runtime`, which an\nexample lists in `dependencies`, or to the runtime a\n`@jsxImportSource preact` comment in the file names.\n\n**What fails to compile still runs, as a module that throws** what the\ncompiler said, such as `Error transforming app.tsx: Unexpected token (2:1)`.\nThe frame reports it as it reports any error an example does not catch, so\nit shows over the example in the preview's `error` part and in the\nterminal, and only where the example imports the file."
|
|
172439
|
+
}
|
|
172440
|
+
],
|
|
172441
|
+
"exports": [
|
|
172442
|
+
{
|
|
172443
|
+
"kind": "js",
|
|
172444
|
+
"name": "COMPILER",
|
|
172445
|
+
"declaration": {
|
|
172446
|
+
"name": "COMPILER",
|
|
172447
|
+
"module": "src/sandbox/compile.ts"
|
|
172448
|
+
}
|
|
172449
|
+
},
|
|
172450
|
+
{
|
|
172451
|
+
"kind": "js",
|
|
172452
|
+
"name": "COMPILED",
|
|
172453
|
+
"declaration": {
|
|
172454
|
+
"name": "COMPILED",
|
|
172455
|
+
"module": "src/sandbox/compile.ts"
|
|
172456
|
+
}
|
|
172457
|
+
},
|
|
172458
|
+
{
|
|
172459
|
+
"kind": "js",
|
|
172460
|
+
"name": "compilers",
|
|
172461
|
+
"declaration": {
|
|
172462
|
+
"name": "compilers",
|
|
172463
|
+
"module": "src/sandbox/compile.ts"
|
|
172464
|
+
}
|
|
172465
|
+
},
|
|
172466
|
+
{
|
|
172467
|
+
"kind": "js",
|
|
172468
|
+
"name": "compile",
|
|
172469
|
+
"declaration": {
|
|
172470
|
+
"name": "compile",
|
|
172471
|
+
"module": "src/sandbox/compile.ts"
|
|
172472
|
+
}
|
|
172473
|
+
}
|
|
172474
|
+
]
|
|
172475
|
+
},
|
|
172404
172476
|
{
|
|
172405
172477
|
"kind": "javascript-module",
|
|
172406
172478
|
"path": "src/sandbox/frame.ts",
|
|
@@ -172805,7 +172877,7 @@
|
|
|
172805
172877
|
"declarations": [
|
|
172806
172878
|
{
|
|
172807
172879
|
"kind": "class",
|
|
172808
|
-
"description": "A sandboxed `<iframe>` that loads `src`, a document you provide. That\ndocument imports what the examples need, listens for a render message, and\nwrites the markup into itself.\n\n**Without `src`, the frame loads a built-in document**, so a sandbox renders\nwith nothing to host. It runs HTML, CSS, and scripts, and reports the\nconsole, uncaught errors, its height, and presses as a frame on\n`servePreview` does. It defines no element, so an example that uses Helix\ncomponents needs a `src` that imports them.\n\n**`imports` lets an example import packages by name** in the built-in\ndocument, as an import map: each name maps to the address of an ES module,\nsuch as `{\"canvas-confetti\": \"https://esm.sh/canvas-confetti@1.9.3\"}`, and\n`import confetti from 'canvas-confetti'` in the `js` pane then loads it. A\nCDN that serves npm packages as modules, such as esm.sh or jsDelivr's\n`+esm`, gives every package an address. A new map loads the document again,\nsince a browser reads one only as a document starts. A `src` document\ndeclares its own.\n\n**`dependencies` names packages by version instead**, as a `package.json`\ndoes: `{\"canvas-confetti\": \"^1.9\"}` loads `canvas-confetti` and the paths\nunder it from `cdn`, `https://esm.sh/` by default, at the version or range\ngiven. An address in `imports` wins over a package of the same name.\n\n**`modules` holds files the example imports by a relative path**: each path,\nsuch as `utils.js`, to its source, and `import { add } from './utils.js'`\nin the `js` pane or in another module loads it. A sandbox writes each pane\nnamed for a module file here.\n\n**Examples render in a frame**, so an example's styles and scripts do not\naffect the page around the sandbox, and `position: fixed` stays inside the\npane. The frame starts empty, with its own stylesheets and its own custom\nelement registry, so `src` must load the styles and components the examples\nuse.\n\n**The source is untrusted, and the frame keeps it isolated.** The frame uses\n`sandbox=\"allow-scripts\"` and never `allow-same-origin`. Together, the two\nlet a document on the same origin remove its own sandbox, which is the same\nas having none.\n\n**A preview says where it is.** It is `:state(loading)` from the moment it\nhas a `src` until that document can take the example, and again through\n`reload()`. It is `:state(failed)` once the example throws an error it does\nnot catch, until the next source is sent, which a frame on `servePreview`\nreports. A page draws its own spinner or message from either, such as a\nsibling shown by `helix-sandbox-preview:state(failed) + .message`.\n\n**A failed preview shows the error over the example**, in the `error` part,\nuntil the next source is sent. The terminal says it too, so the part is not\nannounced, and it is the frame's description while it shows, so a screen\nreader reads it with the frame. Hide it with `::part(error) { display: none }`\nwhere the page draws its own.\n\n**`controls` draws two buttons in the preview's corner**: one reloads the\nframe's document, as `reload()` does, and one opens the example in a new\ntab, as `open()` does. The tab runs it in a frame sandboxed as this one is.",
|
|
172880
|
+
"description": "A sandboxed `<iframe>` that loads `src`, a document you provide. That\ndocument imports what the examples need, listens for a render message, and\nwrites the markup into itself.\n\n**Without `src`, the frame loads a built-in document**, so a sandbox renders\nwith nothing to host. It runs HTML, CSS, and scripts, and reports the\nconsole, uncaught errors, its height, and presses as a frame on\n`servePreview` does. It defines no element, so an example that uses Helix\ncomponents needs a `src` that imports them.\n\n**`imports` lets an example import packages by name** in the built-in\ndocument, as an import map: each name maps to the address of an ES module,\nsuch as `{\"canvas-confetti\": \"https://esm.sh/canvas-confetti@1.9.3\"}`, and\n`import confetti from 'canvas-confetti'` in the `js` pane then loads it. A\nCDN that serves npm packages as modules, such as esm.sh or jsDelivr's\n`+esm`, gives every package an address. A new map loads the document again,\nsince a browser reads one only as a document starts. A `src` document\ndeclares its own.\n\n**`dependencies` names packages by version instead**, as a `package.json`\ndoes: `{\"canvas-confetti\": \"^1.9\"}` loads `canvas-confetti` and the paths\nunder it from `cdn`, `https://esm.sh/` by default, at the version or range\ngiven. An address in `imports` wins over a package of the same name.\n\n**`modules` holds files the example imports by a relative path**: each path,\nsuch as `utils.js`, to its source, and `import { add } from './utils.js'`\nin the `js` pane or in another module loads it. A sandbox writes each pane\nnamed for a module file here.\n\n**A module in TypeScript or JSX runs too**: a path ending in `.ts`, `.tsx`\nor `.jsx` is compiled to JavaScript first, and imported by its path or by\nits path without the extension. The compiler, Sucrase, loads from `cdn` the\nfirst time a module needs it, so the package carries none and a preview\nwith no such module loads none. JSX compiles to the automatic runtime,\n`react/jsx-runtime`, from `dependencies`, or to the one a\n`@jsxImportSource` comment names. What fails to compile shows in the\n`error` part as an error the example threw, when the example imports it.\n\n**Examples render in a frame**, so an example's styles and scripts do not\naffect the page around the sandbox, and `position: fixed` stays inside the\npane. The frame starts empty, with its own stylesheets and its own custom\nelement registry, so `src` must load the styles and components the examples\nuse.\n\n**The source is untrusted, and the frame keeps it isolated.** The frame uses\n`sandbox=\"allow-scripts\"` and never `allow-same-origin`. Together, the two\nlet a document on the same origin remove its own sandbox, which is the same\nas having none.\n\n**A preview says where it is.** It is `:state(loading)` from the moment it\nhas a `src` until that document can take the example, and again through\n`reload()`. It is `:state(failed)` once the example throws an error it does\nnot catch, until the next source is sent, which a frame on `servePreview`\nreports. A page draws its own spinner or message from either, such as a\nsibling shown by `helix-sandbox-preview:state(failed) + .message`.\n\n**A failed preview shows the error over the example**, in the `error` part,\nuntil the next source is sent. The terminal says it too, so the part is not\nannounced, and it is the frame's description while it shows, so a screen\nreader reads it with the frame. Hide it with `::part(error) { display: none }`\nwhere the page draws its own.\n\n**`controls` draws two buttons in the preview's corner**: one reloads the\nframe's document, as `reload()` does, and one opens the example in a new\ntab, as `open()` does. The tab runs it in a frame sandboxed as this one is.",
|
|
172809
172881
|
"name": "HelixSandboxPreview",
|
|
172810
172882
|
"cssParts": [
|
|
172811
172883
|
{
|
|
@@ -173021,6 +173093,31 @@
|
|
|
173021
173093
|
"privacy": "private",
|
|
173022
173094
|
"description": "What the example threw and did not catch, while the preview is `failed`."
|
|
173023
173095
|
},
|
|
173096
|
+
{
|
|
173097
|
+
"kind": "field",
|
|
173098
|
+
"name": "compiled",
|
|
173099
|
+
"privacy": "private",
|
|
173100
|
+
"default": "new Map<string, string>()",
|
|
173101
|
+
"description": "Each module file compiled to JavaScript, by its path and source."
|
|
173102
|
+
},
|
|
173103
|
+
{
|
|
173104
|
+
"kind": "field",
|
|
173105
|
+
"name": "compiling",
|
|
173106
|
+
"privacy": "private",
|
|
173107
|
+
"readonly": true,
|
|
173108
|
+
"default": "new Set<string>()",
|
|
173109
|
+
"description": "The module files being compiled, by their path and source."
|
|
173110
|
+
},
|
|
173111
|
+
{
|
|
173112
|
+
"kind": "field",
|
|
173113
|
+
"name": "map",
|
|
173114
|
+
"type": {
|
|
173115
|
+
"text": "Record<string, string>"
|
|
173116
|
+
},
|
|
173117
|
+
"privacy": "private",
|
|
173118
|
+
"default": "{}",
|
|
173119
|
+
"description": "The import map the built-in document loads with: the last one with every\nmodule file compiled, so a frame never loads without one an example\nimports."
|
|
173120
|
+
},
|
|
173024
173121
|
{
|
|
173025
173122
|
"kind": "method",
|
|
173026
173123
|
"name": "fail",
|
|
@@ -173064,12 +173161,43 @@
|
|
|
173064
173161
|
"kind": "field",
|
|
173065
173162
|
"name": "importMap",
|
|
173066
173163
|
"type": {
|
|
173067
|
-
"text": "Record<string, string>"
|
|
173164
|
+
"text": "Record<string, string> | undefined"
|
|
173068
173165
|
},
|
|
173069
173166
|
"privacy": "private",
|
|
173070
173167
|
"description": "The import map of the built-in document: each module file, by its path\nand by the address its neighbors import it at, each package in\n`dependencies` and the paths under it, and `imports` over all of them.",
|
|
173071
173168
|
"readonly": true
|
|
173072
173169
|
},
|
|
173170
|
+
{
|
|
173171
|
+
"kind": "method",
|
|
173172
|
+
"name": "compileModule",
|
|
173173
|
+
"privacy": "private",
|
|
173174
|
+
"return": {
|
|
173175
|
+
"type": {
|
|
173176
|
+
"text": "void"
|
|
173177
|
+
}
|
|
173178
|
+
},
|
|
173179
|
+
"parameters": [
|
|
173180
|
+
{
|
|
173181
|
+
"name": "key",
|
|
173182
|
+
"type": {
|
|
173183
|
+
"text": "string"
|
|
173184
|
+
}
|
|
173185
|
+
},
|
|
173186
|
+
{
|
|
173187
|
+
"name": "path",
|
|
173188
|
+
"type": {
|
|
173189
|
+
"text": "string"
|
|
173190
|
+
}
|
|
173191
|
+
},
|
|
173192
|
+
{
|
|
173193
|
+
"name": "source",
|
|
173194
|
+
"type": {
|
|
173195
|
+
"text": "string"
|
|
173196
|
+
}
|
|
173197
|
+
}
|
|
173198
|
+
],
|
|
173199
|
+
"description": "Compiles a module file, once, then draws again with it. Not on a server,\nwhich loads no frame."
|
|
173200
|
+
},
|
|
173073
173201
|
{
|
|
173074
173202
|
"kind": "field",
|
|
173075
173203
|
"name": "handleFrameLoad",
|
|
@@ -173134,7 +173262,7 @@
|
|
|
173134
173262
|
"text": "void"
|
|
173135
173263
|
}
|
|
173136
173264
|
},
|
|
173137
|
-
"description": "Sends the current source to the frame, once it is listening."
|
|
173265
|
+
"description": "Sends the current source to the frame, once it is listening and no\nmodule it may import is still compiling."
|
|
173138
173266
|
},
|
|
173139
173267
|
{
|
|
173140
173268
|
"kind": "method",
|
|
@@ -173784,7 +173912,7 @@
|
|
|
173784
173912
|
"declarations": [
|
|
173785
173913
|
{
|
|
173786
173914
|
"kind": "class",
|
|
173787
|
-
"description": "A source pane dispatches `helix-before-edit`, which bubbles, and the sandbox\npasses the value to the preview slotted into it. The source pane and the\npreview do not reference each other, so you can replace either one or use it\nalone.\n\nThe preview runs an edit once typing has rested for `preview-delay`, 300\nmilliseconds by default, so a word typed reloads it once. A pane's text when the sandbox starts reaches it at once.\n\nThe event carries the pane's `name`, so one sandbox can hold several panes.\nThe names the sandbox writes into its previews:\n\n- `html` sets the preview's markup.\n- `css` sets its stylesheet.\n- `js` sets a script that runs as a module after the markup.\n- A module file name ending in `.js` or `.mjs`, such as `utils.js`, is a\n module the other scripts import by its path, `./utils.js`.\n- `package.json` sets the npm packages the scripts import by name, from its\n `dependencies`, which load from the preview's `cdn`.\n\nThe sandbox ignores a pane with any other name, so that pane can show\ncontent without changing the preview.\n\n**The sandbox is `:state(modified)` while a source pane holds an edit**, and\nthat pane's file tab is also `file-modified` and described as modified to\na screen reader. `reset()` puts every pane back to the source it was given.\n\n**The dividers are two nested `helix-splitter` elements**, which handle the\npointer, the keyboard, and the corner. The inner splitter holds the panes and\nthe outer one holds the panel, so the panel spans the full width.\n\n**Several source panes are files**, one shown at a time under a row of\ntabs, each named by the pane's `label` or, without one, its `name`. `file`\nholds the `name` of the pane shown. The tabs are a tab list: the arrow keys\nmove between them and show each pane, and `Home` and `End` go to the first\nand the last. Choosing one sends `helix-before-change` with the pane's\n`name`, which you can cancel, and `change` once `file` holds it. The panes\nnot shown carry `hidden`. One pane draws no tabs.\n\n**Any editor can be the source pane**: an element in the `source` slot with\na `name` that dispatches `helix-before-edit` with its text, which bubbles.\nA wrapper around CodeMirror or Monaco sends one on each change and is a pane\nlike `helix-sandbox-source`, and the sandbox reads its `value` to seed the\npreview. Dispatch `helix-caret` from it too for the status bar's position.\n\nSandbox is styled only and has behavior, as `Aura` is. Its behavior is the\nhand-off from a source pane to a preview frame, which works with any pane\nthat sends `helix-before-edit`, and what it draws is the layout around them:\ndividers, file tabs, and a panel. A page that wants another look slots its\nown panes and keeps the hand-off, so there is nothing for a headless version\nto hold.\n\nA development build warns about a source pane with no `label` and no `name`,\nwhose file tab would have no words.\n\nOn a focused divider, the arrow keys move it, and `Home` and `End` move it\nto its ends. `Enter` on the panes divider shuts the lead pane, and pressed\nagain it opens the pane where it was. `Enter` on the panel divider shuts the\npanel to `panel-collapsed-size`, and pressed again it opens the panel to its\nlast height.",
|
|
173915
|
+
"description": "A source pane dispatches `helix-before-edit`, which bubbles, and the sandbox\npasses the value to the preview slotted into it. The source pane and the\npreview do not reference each other, so you can replace either one or use it\nalone.\n\nThe preview runs an edit once typing has rested for `preview-delay`, 300\nmilliseconds by default, so a word typed reloads it once. A pane's text when the sandbox starts reaches it at once.\n\nThe event carries the pane's `name`, so one sandbox can hold several panes.\nThe names the sandbox writes into its previews:\n\n- `html` sets the preview's markup.\n- `css` sets its stylesheet.\n- `js` sets a script that runs as a module after the markup.\n- A module file name ending in `.js` or `.mjs`, such as `utils.js`, is a\n module the other scripts import by its path, `./utils.js`.\n- A module file name ending in `.ts`, `.tsx` or `.jsx`, such as `app.tsx`,\n is one too, which the preview compiles to JavaScript first. The `js` pane\n runs it with `import './app.tsx'`. A file that does not compile shows\n why over the preview, as an error the example threw.\n- `package.json` sets the npm packages the scripts import by name, from its\n `dependencies`, which load from the preview's `cdn`.\n\nThe sandbox ignores a pane with any other name, so that pane can show\ncontent without changing the preview.\n\n**The sandbox is `:state(modified)` while a source pane holds an edit**, and\nthat pane's file tab is also `file-modified` and described as modified to\na screen reader. `reset()` puts every pane back to the source it was given.\n\n**The dividers are two nested `helix-splitter` elements**, which handle the\npointer, the keyboard, and the corner. The inner splitter holds the panes and\nthe outer one holds the panel, so the panel spans the full width.\n\n**Several source panes are files**, one shown at a time under a row of\ntabs, each named by the pane's `label` or, without one, its `name`. `file`\nholds the `name` of the pane shown. The tabs are a tab list: the arrow keys\nmove between them and show each pane, and `Home` and `End` go to the first\nand the last. Choosing one sends `helix-before-change` with the pane's\n`name`, which you can cancel, and `change` once `file` holds it. The panes\nnot shown carry `hidden`. One pane draws no tabs.\n\n**Any editor can be the source pane**: an element in the `source` slot with\na `name` that dispatches `helix-before-edit` with its text, which bubbles.\nA wrapper around CodeMirror or Monaco sends one on each change and is a pane\nlike `helix-sandbox-source`, and the sandbox reads its `value` to seed the\npreview. Dispatch `helix-caret` from it too for the status bar's position.\n\nSandbox is styled only and has behavior, as `Aura` is. Its behavior is the\nhand-off from a source pane to a preview frame, which works with any pane\nthat sends `helix-before-edit`, and what it draws is the layout around them:\ndividers, file tabs, and a panel. A page that wants another look slots its\nown panes and keeps the hand-off, so there is nothing for a headless version\nto hold.\n\nA development build warns about a source pane with no `label` and no `name`,\nwhose file tab would have no words.\n\nOn a focused divider, the arrow keys move it, and `Home` and `End` move it\nto its ends. `Enter` on the panes divider shuts the lead pane, and pressed\nagain it opens the pane where it was. `Enter` on the panel divider shuts the\npanel to `panel-collapsed-size`, and pressed again it opens the panel to its\nlast height.",
|
|
173788
173916
|
"name": "HelixSandbox",
|
|
173789
173917
|
"cssProperties": [
|
|
173790
173918
|
{
|
|
@@ -220435,6 +220563,23 @@
|
|
|
220435
220563
|
"module": "src/time-input/root/time-input-root.ts"
|
|
220436
220564
|
}
|
|
220437
220565
|
},
|
|
220566
|
+
{
|
|
220567
|
+
"kind": "field",
|
|
220568
|
+
"name": "nowLabel",
|
|
220569
|
+
"type": {
|
|
220570
|
+
"text": "string"
|
|
220571
|
+
},
|
|
220572
|
+
"default": "'Now'",
|
|
220573
|
+
"description": "The words on the list's button that chooses the current time, drawn with\n`show-now`.",
|
|
220574
|
+
"attribute": "now-label",
|
|
220575
|
+
"helix": {
|
|
220576
|
+
"words": true
|
|
220577
|
+
},
|
|
220578
|
+
"inheritedFrom": {
|
|
220579
|
+
"name": "HelixHeadlessTimeInput",
|
|
220580
|
+
"module": "src/time-input/root/time-input-root.ts"
|
|
220581
|
+
}
|
|
220582
|
+
},
|
|
220438
220583
|
{
|
|
220439
220584
|
"kind": "field",
|
|
220440
220585
|
"name": "placeholder",
|
|
@@ -220534,6 +220679,20 @@
|
|
|
220534
220679
|
"module": "src/time-input/root/time-input-root.ts"
|
|
220535
220680
|
}
|
|
220536
220681
|
},
|
|
220682
|
+
{
|
|
220683
|
+
"kind": "field",
|
|
220684
|
+
"name": "showNow",
|
|
220685
|
+
"type": {
|
|
220686
|
+
"text": "boolean"
|
|
220687
|
+
},
|
|
220688
|
+
"default": "false",
|
|
220689
|
+
"description": "Draws a button under the times in the list that chooses the current time,\nmoved to the nearest time on offer. See Time Picker's `show-now`. Its words\nare `now-label`.",
|
|
220690
|
+
"attribute": "show-now",
|
|
220691
|
+
"inheritedFrom": {
|
|
220692
|
+
"name": "HelixHeadlessTimeInput",
|
|
220693
|
+
"module": "src/time-input/root/time-input-root.ts"
|
|
220694
|
+
}
|
|
220695
|
+
},
|
|
220537
220696
|
{
|
|
220538
220697
|
"kind": "field",
|
|
220539
220698
|
"name": "step",
|
|
@@ -222266,6 +222425,19 @@
|
|
|
222266
222425
|
"module": "src/time-input/root/time-input-root.ts"
|
|
222267
222426
|
}
|
|
222268
222427
|
},
|
|
222428
|
+
{
|
|
222429
|
+
"name": "now-label",
|
|
222430
|
+
"type": {
|
|
222431
|
+
"text": "string"
|
|
222432
|
+
},
|
|
222433
|
+
"default": "'Now'",
|
|
222434
|
+
"description": "The words on the list's button that chooses the current time, drawn with\n`show-now`.",
|
|
222435
|
+
"fieldName": "nowLabel",
|
|
222436
|
+
"inheritedFrom": {
|
|
222437
|
+
"name": "HelixHeadlessTimeInput",
|
|
222438
|
+
"module": "src/time-input/root/time-input-root.ts"
|
|
222439
|
+
}
|
|
222440
|
+
},
|
|
222269
222441
|
{
|
|
222270
222442
|
"name": "placeholder",
|
|
222271
222443
|
"type": {
|
|
@@ -222344,6 +222516,19 @@
|
|
|
222344
222516
|
"module": "src/time-input/root/time-input-root.ts"
|
|
222345
222517
|
}
|
|
222346
222518
|
},
|
|
222519
|
+
{
|
|
222520
|
+
"name": "show-now",
|
|
222521
|
+
"type": {
|
|
222522
|
+
"text": "boolean"
|
|
222523
|
+
},
|
|
222524
|
+
"default": "false",
|
|
222525
|
+
"description": "Draws a button under the times in the list that chooses the current time,\nmoved to the nearest time on offer. See Time Picker's `show-now`. Its words\nare `now-label`.",
|
|
222526
|
+
"fieldName": "showNow",
|
|
222527
|
+
"inheritedFrom": {
|
|
222528
|
+
"name": "HelixHeadlessTimeInput",
|
|
222529
|
+
"module": "src/time-input/root/time-input-root.ts"
|
|
222530
|
+
}
|
|
222531
|
+
},
|
|
222347
222532
|
{
|
|
222348
222533
|
"name": "step",
|
|
222349
222534
|
"type": {
|
|
@@ -253867,6 +254052,6 @@
|
|
|
253867
254052
|
],
|
|
253868
254053
|
"helix": {
|
|
253869
254054
|
"package": "@fusion.dev/helix",
|
|
253870
|
-
"version": "0.
|
|
254055
|
+
"version": "0.184.0"
|
|
253871
254056
|
}
|
|
253872
254057
|
}
|
package/dist/code-block/index.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -62,6 +62,7 @@ export * from './listbox/index.js';
|
|
|
62
62
|
export * from './loader/index.js';
|
|
63
63
|
export * from './map/index.js';
|
|
64
64
|
export * from './megamenu/index.js';
|
|
65
|
+
export * from './menu/filter/index.js';
|
|
65
66
|
export * from './menu/index.js';
|
|
66
67
|
export * from './meter/index.js';
|
|
67
68
|
export * from './navigation/index.js';
|
package/dist/index.js
CHANGED
|
@@ -57,6 +57,7 @@ export * from './listbox/index.js';
|
|
|
57
57
|
export * from './loader/index.js';
|
|
58
58
|
export * from './map/index.js';
|
|
59
59
|
export * from './megamenu/index.js';
|
|
60
|
+
export * from './menu/filter/index.js';
|
|
60
61
|
export * from './menu/index.js';
|
|
61
62
|
export * from './meter/index.js';
|
|
62
63
|
export * from './navigation/index.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { filterMenu, MenuFilterController } from '@fusion.dev/helix-headless/menu/filter';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { filterMenu } from '@fusion.dev/helix-headless/menu/filter';
|
|
2
|
+
import { HelixMenu } from '../root/menu-root.js';
|
|
3
|
+
import { styles } from './menu-filter.css.js';
|
|
4
|
+
filterMenu(HelixMenu, styles);
|
|
5
|
+
export { filterMenu, MenuFilterController } from '@fusion.dev/helix-headless/menu/filter';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const styles: import("lit").CSSResult;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createSheet } from '@fusion.dev/helix-core';
|
|
2
|
+
export const styles = createSheet(`input {appearance: none;background-color: var(--menu-background-color, var(--helix-color-surface-overlay));border: none;border-block-end: var(--helix-border-thin) solid var(--helix-color-border);box-sizing: border-box;color: var(--helix-color-foreground);display: block;font-family: var(--helix-font-sans);font-size: var(--helix-text-xs);font-weight: var(--helix-weight-medium);inline-size: 100%;inset-block-start: calc(var(--helix-space-xs) * -1);margin-block: calc(var(--helix-space-xs) * -1) var(--helix-space-xs);min-block-size: var(--helix-size-control);padding-inline: var(--helix-space-sm);position: sticky;z-index: 1}input:focus-visible {outline: none}[data-filtered] slot::slotted(helix-divider) {display: none}`);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createSheet } from '@fusion.dev/helix-core';
|
|
2
|
-
export const styles = createSheet(`:host {display: contents}[part="surface"] {--helix-size-control: var(--helix-size-control-sm);--helix-size-control-loose: calc(var(--helix-size-control) * 1.2);--helix-size-control-tight: calc(var(--helix-size-control) * 0.8);--helix-size-icon: var(--helix-size-icon-sm);--helix-size-icon-loose: calc(var(--helix-size-icon) * 1.2);--helix-size-icon-tight: calc(var(--helix-size-icon) * 0.8);--menu-item-start: 0px;--menu-item-end: 0px;max-block-size: var(--menu-max-block-size, var(--floating-available-block-size, none));overflow-y: auto;--_floating-background-color: var(--menu-background-color, var(--helix-color-surface-overlay));--_floating-border-color: var(--menu-border-color, var(--helix-color-border));--_floating-border-width: var(--menu-border-width, var(--helix-border-floating));--_floating-shadow: var(--menu-shadow, var(--helix-shadow-floating));min-inline-size: var(--menu-min-inline-size, 12rem);padding-block: var(--helix-space-xs);padding-inline: var(--helix-space-none)}:host(:state(start)) [part="surface"] {--menu-item-start: calc(var(--helix-size-icon) + var(--helix-space-xs))}:host(:state(mark)) [part="surface"] {--menu-item-end: calc(var(--helix-size-icon) + var(--helix-space-xs))}[part="surface"][data-placement^="left"] {transform-origin: 100% var(--floating-arrow-y, 50%)}[part="surface"][data-placement^="right"] {transform-origin: 0 var(--floating-arrow-y, 50%)}[part="header"] {align-items: center;border-block-end: var(--helix-border-thin) solid var(--helix-color-border);display: flex;gap: var(--helix-space-2xs);margin-block-end: var(--helix-space-2xs);padding: var(--helix-space-2xs) var(--helix-space-xs) var(--helix-space-xs)}[part="back"] {align-items: center;background: none;border: none;border-radius: var(--helix-radii-sm);color: var(--helix-color-foreground-muted);cursor: pointer;display: inline-flex;justify-content: center;block-size: calc(var(--helix-size-icon) + var(--helix-space-xs));inline-size: calc(var(--helix-size-icon) + var(--helix-space-xs));padding: var(--helix-space-none)}[part="back"] svg {block-size: var(--helix-size-icon);inline-size: var(--helix-size-icon)}[part="back"]:hover {background-color: color-mix(in oklab, var(--helix-color-foreground) 8%, transparent);color: var(--helix-color-foreground)}[part="back"]:focus-visible {outline: var(--helix-size-focus-ring) solid var(--helix-color-focus-ring);outline-offset: calc(var(--helix-size-focus-offset) * -1)}[part="title"] {color: var(--helix-color-foreground);font-size: var(--helix-text-xs);font-weight: var(--helix-weight-medium)}::slotted(helix-divider) {margin-block: var(--helix-space-2xs)}[part="surface"][data-drilled] slot::slotted(:not(helix-menu-item)) {display: none}
|
|
2
|
+
export const styles = createSheet(`:host {display: contents}[part="surface"] {--helix-size-control: var(--helix-size-control-sm);--helix-size-control-loose: calc(var(--helix-size-control) * 1.2);--helix-size-control-tight: calc(var(--helix-size-control) * 0.8);--helix-size-icon: var(--helix-size-icon-sm);--helix-size-icon-loose: calc(var(--helix-size-icon) * 1.2);--helix-size-icon-tight: calc(var(--helix-size-icon) * 0.8);--menu-item-start: 0px;--menu-item-end: 0px;max-block-size: var(--menu-max-block-size, var(--floating-available-block-size, none));overflow-y: auto;--_floating-background-color: var(--menu-background-color, var(--helix-color-surface-overlay));--_floating-border-color: var(--menu-border-color, var(--helix-color-border));--_floating-border-width: var(--menu-border-width, var(--helix-border-floating));--_floating-shadow: var(--menu-shadow, var(--helix-shadow-floating));min-inline-size: var(--menu-min-inline-size, 12rem);padding-block: var(--helix-space-xs);padding-inline: var(--helix-space-none)}:host(:state(start)) [part="surface"] {--menu-item-start: calc(var(--helix-size-icon) + var(--helix-space-xs))}:host(:state(mark)) [part="surface"] {--menu-item-end: calc(var(--helix-size-icon) + var(--helix-space-xs))}[part="surface"][data-placement^="left"] {transform-origin: 100% var(--floating-arrow-y, 50%)}[part="surface"][data-placement^="right"] {transform-origin: 0 var(--floating-arrow-y, 50%)}[part="header"] {align-items: center;border-block-end: var(--helix-border-thin) solid var(--helix-color-border);display: flex;gap: var(--helix-space-2xs);margin-block-end: var(--helix-space-2xs);padding: var(--helix-space-2xs) var(--helix-space-xs) var(--helix-space-xs)}[part="back"] {align-items: center;background: none;border: none;border-radius: var(--helix-radii-sm);color: var(--helix-color-foreground-muted);cursor: pointer;display: inline-flex;justify-content: center;block-size: calc(var(--helix-size-icon) + var(--helix-space-xs));inline-size: calc(var(--helix-size-icon) + var(--helix-space-xs));padding: var(--helix-space-none)}[part="back"] svg {block-size: var(--helix-size-icon);inline-size: var(--helix-size-icon)}[part="back"]:hover {background-color: color-mix(in oklab, var(--helix-color-foreground) 8%, transparent);color: var(--helix-color-foreground)}[part="back"]:focus-visible {outline: var(--helix-size-focus-ring) solid var(--helix-color-focus-ring);outline-offset: calc(var(--helix-size-focus-offset) * -1)}[part="title"] {color: var(--helix-color-foreground);font-size: var(--helix-text-xs);font-weight: var(--helix-weight-medium)}::slotted(helix-divider) {margin-block: var(--helix-space-2xs)}[part="surface"][data-drilled] slot::slotted(:not(helix-menu-item)) {display: none}:host([loading]) [part="surface"] {opacity: 0.5}@media print {:host {display: none}}`);
|