vintage-frames 0.12.7 → 0.13.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 +19 -19
- package/dist/chrome.d.ts +1 -1
- package/dist/components/vf-container.d.ts +5 -7
- package/dist/components/vf-container.js +1 -5
- package/dist/components/vf-desktop.d.ts +4 -5
- package/dist/components/vf-desktop.js +13 -18
- package/dist/components/vf-progress-bar.d.ts +2 -2
- package/dist/components/vf-progress-bar.js +55 -41
- package/dist/components/vf-slider.js +11 -11
- package/dist/components/vf-swatch.d.ts +2 -2
- package/dist/components/vf-swatch.js +37 -38
- package/dist/components/vf-window.d.ts +6 -9
- package/dist/components/vf-window.js +76 -77
- package/dist/index.d.ts +10 -9
- package/dist/index.js +62 -62
- package/dist/pattern-fill.d.ts +21 -50
- package/dist/pattern-fill.js +19 -54
- package/dist/scroll-rail.d.ts +6 -6
- package/dist/scroll-rail.js +24 -29
- package/dist/styles/recipes/pattern.d.ts +19 -10
- package/dist/styles/recipes/pattern.js +27 -18
- package/dist/styles/recipes/scroll-rail.d.ts +14 -7
- package/dist/styles/recipes/scroll-rail.js +14 -24
- package/dist/styles/recipes/tile.d.ts +11 -3
- package/dist/styles/recipes/tile.js +12 -12
- package/dist/tile-grid.d.ts +98 -64
- package/dist/tile-grid.js +63 -30
- package/dist/track-width.d.ts +1 -2
- package/docs/SPEC.md +11 -11
- package/editor/vscode.html-custom-data.json +2 -2
- package/editor/web-types.json +3 -3
- package/package.json +1 -1
package/custom-elements.json
CHANGED
|
@@ -2246,7 +2246,7 @@
|
|
|
2246
2246
|
"declarations": [
|
|
2247
2247
|
{
|
|
2248
2248
|
"kind": "class",
|
|
2249
|
-
"description": "`<vf-container>` — a box that is nothing but its declared size.\n\nThe kit's positioned-placement story (src/position.ts) ends with one line of\nCSS it can't write for you: children placed with `top`/`left` need a\npositioned ancestor, and while every kit container is one — a window body, a\nstack, a fieldset — a region of *your own* needs `position: relative` in a\nstylesheet. This component is that region as an element: declare `width` and\n`height` in whole system px, slot anything into it, place children against\nits origin. A DITL's enclosing rectangle, with nothing drawn in it.\n\n```html\n<vf-container width=\"200\" height=\"120\">\n <vf-icon label=\"System\" width=\"64\" top=\"8\" left=\"12\">…</vf-icon>\n <vf-icon label=\"Finder\" width=\"64\" top=\"8\" left=\"104\">…</vf-icon>\n</vf-container>\n```\n\nThe rectangle is the whole API — `width`/`height` here, plus the `top`/`left`\npair nearly every component takes (VfPositioned), so a container is\nitself placeable: inside a window, a desktop, or another container, at whole\nsystem px that keep its box on the device-pixel grid by construction.\n\n**It is not a `vf-stack`.** The stack is a flexbox with opinions — it\ndistributes children along an axis, compiles `fill-width`/`fill-height` into\nflex, defaults a cross-axis alignment. This box has no layout opinion at\nall: in-flow children get normal flow, placed children get a coordinate\nsystem, and that is the whole API. Reach for it when the stack's opinions\nare the thing in the way — a field of placed icons, a fixed stage for\nabsolutely-positioned art, a consumer's own composition that brings its\nlayout with it.\n\n**The declared size is the layout.** `width`/`height` land on the host as a\nlive `calc(var(--vf-scale, 1) * Npx)` (VfSized), so the box scales\nwith the display and sits on the device-pixel grid by construction. Content\nthat outgrows the box overflows it rather than growing it — the number is\nthe layout, and content that doesn't fit is a number to raise. Leave a\ndimension off and that axis shrink-wraps: `fit-content`, not the parent's\nwidth, because a layout box that silently claimed a size nobody declared\nwould be inventing one (the `vf-stack` rule, held here too).\n\n**It paints nothing and means nothing** — unless `pattern` or `rule` say\nwhat to paint. No role, keyboard behavior or selection; what it holds\ndecides what it is.\n\n**`rule` draws the 1px rule on the edges it names** — `rule=\"bottom\"` is\nthe menu bar's anatomy (the box's rows over one row of ink), `rule=\"top\"`\na status strip's, all four a framed box. The rule is the box's own border\n(vfRule), inside the declared size, so a 24px `rule=\"bottom\"`\nstrip is 23 rows of box over the line; content, `fill-width` children and\nplaced children begin inside it, as a rectangle's interior begins inside\nFrameRect's line.\n\n**`pattern` fills the box with a 1-bit pattern**: one of the 38 standard\nMacPaint patterns by name (`pattern=\"bricks\"`, `pattern=\"gray-50\"` —\ndocs/PATTERNS.md has the table), or sixteen hex digits stating a custom\n8×8 pattern row by row, the way a PAT resource did. It is painted as the\nbox's own background — black ink on a `--vf-white` ground, anchored at\nthe box's top-left corner, under the content — by the same
|
|
2249
|
+
"description": "`<vf-container>` — a box that is nothing but its declared size.\n\nThe kit's positioned-placement story (src/position.ts) ends with one line of\nCSS it can't write for you: children placed with `top`/`left` need a\npositioned ancestor, and while every kit container is one — a window body, a\nstack, a fieldset — a region of *your own* needs `position: relative` in a\nstylesheet. This component is that region as an element: declare `width` and\n`height` in whole system px, slot anything into it, place children against\nits origin. A DITL's enclosing rectangle, with nothing drawn in it.\n\n```html\n<vf-container width=\"200\" height=\"120\">\n <vf-icon label=\"System\" width=\"64\" top=\"8\" left=\"12\">…</vf-icon>\n <vf-icon label=\"Finder\" width=\"64\" top=\"8\" left=\"104\">…</vf-icon>\n</vf-container>\n```\n\nThe rectangle is the whole API — `width`/`height` here, plus the `top`/`left`\npair nearly every component takes (VfPositioned), so a container is\nitself placeable: inside a window, a desktop, or another container, at whole\nsystem px that keep its box on the device-pixel grid by construction.\n\n**It is not a `vf-stack`.** The stack is a flexbox with opinions — it\ndistributes children along an axis, compiles `fill-width`/`fill-height` into\nflex, defaults a cross-axis alignment. This box has no layout opinion at\nall: in-flow children get normal flow, placed children get a coordinate\nsystem, and that is the whole API. Reach for it when the stack's opinions\nare the thing in the way — a field of placed icons, a fixed stage for\nabsolutely-positioned art, a consumer's own composition that brings its\nlayout with it.\n\n**The declared size is the layout.** `width`/`height` land on the host as a\nlive `calc(var(--vf-scale, 1) * Npx)` (VfSized), so the box scales\nwith the display and sits on the device-pixel grid by construction. Content\nthat outgrows the box overflows it rather than growing it — the number is\nthe layout, and content that doesn't fit is a number to raise. Leave a\ndimension off and that axis shrink-wraps: `fit-content`, not the parent's\nwidth, because a layout box that silently claimed a size nobody declared\nwould be inventing one (the `vf-stack` rule, held here too).\n\n**It paints nothing and means nothing** — unless `pattern` or `rule` say\nwhat to paint. No role, keyboard behavior or selection; what it holds\ndecides what it is.\n\n**`rule` draws the 1px rule on the edges it names** — `rule=\"bottom\"` is\nthe menu bar's anatomy (the box's rows over one row of ink), `rule=\"top\"`\na status strip's, all four a framed box. The rule is the box's own border\n(vfRule), inside the declared size, so a 24px `rule=\"bottom\"`\nstrip is 23 rows of box over the line; content, `fill-width` children and\nplaced children begin inside it, as a rectangle's interior begins inside\nFrameRect's line.\n\n**`pattern` fills the box with a 1-bit pattern**: one of the 38 standard\nMacPaint patterns by name (`pattern=\"bricks\"`, `pattern=\"gray-50\"` —\ndocs/PATTERNS.md has the table), or sixteen hex digits stating a custom\n8×8 pattern row by row, the way a PAT resource did. It is painted as the\nbox's own background — black ink on a `--vf-white` ground, anchored at\nthe box's top-left corner, under the content — by the same repeating tile\nas the desktop dither, so it is 1-bit at every density and zoom and a box\nof any size, declared or not, costs nothing more (src/pattern-fill.ts).\nUnder forced colors the pattern goes flat Canvas.\n\n**It holds its box on the device-pixel grid** — with a `GridSnapController`.\nA container's box is itself the consumer's coordinate system, including for\nnon-`vf` content that cannot correct itself, so the box is the thing to\nhold on the grid. The shadow box below owns the `position: relative` anchor\nand the `vf-snap` class together, so the correction\nmoves the whole coordinate system — everything placed against it rides\nalong instead of being re-corrected child by child. (`vf-stack` shipped\nwithout a controller on the theory that slotted `vf-*` children correct\ntheir own origins; this component is where that theory's gap — consumer\ncontent — became visible, and the stack has since adopted the same\narrangement.)\n\nLike the stack it is **typographically transparent**: `vfBase`'s chrome\ndress is returned to `inherit` on the host, so wrapping content in a sized\nbox changes nothing about how that content reads.\n\n`fill-width` / `fill-height` work here the way they do everywhere: read\nabout the host (be as big as *its* parent allows), and compiled for slotted\nchildren — `width: 100%` in normal flow, so a child filling the cross of a\ndeclared box needs no stylesheet. A height fill needs a declared `height`\nto resolve against; with none it is inert, not an error.",
|
|
2250
2250
|
"name": "VfContainer",
|
|
2251
2251
|
"slots": [
|
|
2252
2252
|
{
|
|
@@ -2344,8 +2344,8 @@
|
|
|
2344
2344
|
"name": "patternFill",
|
|
2345
2345
|
"privacy": "private",
|
|
2346
2346
|
"readonly": true,
|
|
2347
|
-
"default": "new PatternFillController(this, { getBox: () => this.box, getPattern: () => this._pattern,
|
|
2348
|
-
"description": "The pattern fill, painted on `.box` so it rides the snap correction with\nthe coordinate system
|
|
2347
|
+
"default": "new PatternFillController(this, { getBox: () => this.box, getPattern: () => this._pattern, })",
|
|
2348
|
+
"description": "The pattern fill, painted on `.box` so it rides the snap correction with\nthe coordinate system (src/pattern-fill.ts)."
|
|
2349
2349
|
},
|
|
2350
2350
|
{
|
|
2351
2351
|
"kind": "field",
|
|
@@ -2563,7 +2563,7 @@
|
|
|
2563
2563
|
"declarations": [
|
|
2564
2564
|
{
|
|
2565
2565
|
"kind": "class",
|
|
2566
|
-
"description": "`<vf-desktop>` — the full-bleed classic desktop container.\n\nRenders the desktop pattern — the classic 50% dither by default, or any of\nthe standard patterns by name (`pattern`, System 7's General Controls\nsetting) — and manages the stacking order and `active` state of slotted\n`vf-window` children: a `pointerdown` or\n`focusin` (keyboard focus) anywhere inside a window brings it to the front\nand makes it the single active window. The windows' light-DOM order is kept\nin step with the stacking order (bottom-most first, synced in a task once\nany pointer gesture has ended), so tabbing walks the stack the way the eye\ndoes and Shift+Tab is its exact mirror.\n\nUtility windows (`vf-window[variant=\"utility\"]`) stack in a floating tier\nabove every document-tier window, restack only among themselves, and stand\noutside the single-active invariant entirely — clicking a palette neither\ndeactivates the active document window nor greys the palette, exactly as\nSystem 7's floating windoids behaved while their application was frontmost.\nA slotted `vf-menu-bar` (or a free-standing `vf-menu`) sits on a tier\nabove both, so its dropped menus cover palettes and document windows\nalike; only the screen-corner mask is in front of it.\n\n**Deactivation.** On a real System 7 machine clicking the desktop clicked\nthe *Finder* — the frontmost application's windows lost their stripes.\nclearActive is that gesture's handler: it clears `active` from\nthe whole document tier, and **zero active windows is a legal state**,\nheld until a press or keyboard focus re-enters a document window (or a\nnew one is slotted, which activates it — opening a window brings its\napplication forward). The desktop never takes this decision itself: its\nfurniture is slotted light DOM (an icon layer, say), so only the page\nknows which of its children — or which presses on the bare dither — mean\n\"the Finder\", and it routes those through `clearActive()`. Left alone,\nthe classic always-one-active behavior is unchanged. activeWindow\nreads the current holder, and every change of holder — including to and\nfrom none — fires `vf-activate`.\n\nThe desktop is a raster with an explicit size, always: **`width` and\n`height`**, in system px, the way a WIND resource declared a window's —\nthe host box renders at the declared screen plus `2 × bezel` per axis, a\nwhole number of system pixels by construction (default 512×342, the\ncompact Mac's screen). Pure CSS sizing is not supported; the page sets\nthe numbers — directly, or via VfDesktop.fitWithin on\n`resize`/`onScaleChange` for a viewport-filling desktop — and positions\nthe sized box with its own stylesheet, keeping any sub-system-pixel\nslack on its side. `bezel` (system px) draws the black screen surround —\nthe CRT's unlit margin — around the screen, rounding its four corners\nwith the classic corner mask.\n\n**`pattern`** names the desktop pattern — `gray-50` (the dither) by\ndefault, any of the 38 standard patterns (docs/PATTERNS.md), or sixteen\nhex digits stating a custom 8×8 pattern, as on `vf-container`. It is\npainted as the screen's own background: black ink on an opaque white\npaper,
|
|
2566
|
+
"description": "`<vf-desktop>` — the full-bleed classic desktop container.\n\nRenders the desktop pattern — the classic 50% dither by default, or any of\nthe standard patterns by name (`pattern`, System 7's General Controls\nsetting) — and manages the stacking order and `active` state of slotted\n`vf-window` children: a `pointerdown` or\n`focusin` (keyboard focus) anywhere inside a window brings it to the front\nand makes it the single active window. The windows' light-DOM order is kept\nin step with the stacking order (bottom-most first, synced in a task once\nany pointer gesture has ended), so tabbing walks the stack the way the eye\ndoes and Shift+Tab is its exact mirror.\n\nUtility windows (`vf-window[variant=\"utility\"]`) stack in a floating tier\nabove every document-tier window, restack only among themselves, and stand\noutside the single-active invariant entirely — clicking a palette neither\ndeactivates the active document window nor greys the palette, exactly as\nSystem 7's floating windoids behaved while their application was frontmost.\nA slotted `vf-menu-bar` (or a free-standing `vf-menu`) sits on a tier\nabove both, so its dropped menus cover palettes and document windows\nalike; only the screen-corner mask is in front of it.\n\n**Deactivation.** On a real System 7 machine clicking the desktop clicked\nthe *Finder* — the frontmost application's windows lost their stripes.\nclearActive is that gesture's handler: it clears `active` from\nthe whole document tier, and **zero active windows is a legal state**,\nheld until a press or keyboard focus re-enters a document window (or a\nnew one is slotted, which activates it — opening a window brings its\napplication forward). The desktop never takes this decision itself: its\nfurniture is slotted light DOM (an icon layer, say), so only the page\nknows which of its children — or which presses on the bare dither — mean\n\"the Finder\", and it routes those through `clearActive()`. Left alone,\nthe classic always-one-active behavior is unchanged. activeWindow\nreads the current holder, and every change of holder — including to and\nfrom none — fires `vf-activate`.\n\nThe desktop is a raster with an explicit size, always: **`width` and\n`height`**, in system px, the way a WIND resource declared a window's —\nthe host box renders at the declared screen plus `2 × bezel` per axis, a\nwhole number of system pixels by construction (default 512×342, the\ncompact Mac's screen). Pure CSS sizing is not supported; the page sets\nthe numbers — directly, or via VfDesktop.fitWithin on\n`resize`/`onScaleChange` for a viewport-filling desktop — and positions\nthe sized box with its own stylesheet, keeping any sub-system-pixel\nslack on its side. `bezel` (system px) draws the black screen surround —\nthe CRT's unlit margin — around the screen, rounding its four corners\nwith the classic corner mask.\n\n**`pattern`** names the desktop pattern — `gray-50` (the dither) by\ndefault, any of the 38 standard patterns (docs/PATTERNS.md), or sixteen\nhex digits stating a custom 8×8 pattern, as on `vf-container`. It is\npainted as the screen's own background: black ink on an opaque white\npaper, a repeating tile drawn at the display's resolution, 1-bit at every\ndensity and zoom (src/pattern-fill.ts).\n\n**The drag surface.** The Finder dragged an icon as a dotted outline drawn\non the *screen*, clipped at its edge and phase-locked to its raster, so\nthe screen hosts the layer that outline draws on: a full-bleed child of\nthe screen, `pointer-events: none` (never a hit for the page's\n`elementsFromPoint`), whose children paint one tier above the menu bar\nand under the corner mask — the layer itself is deliberately no stacking\ncontext, since a blend inside one would composite against nothing. An\nicon reaches it without an import, the menu-handshake idiom: on a drag's\nfirst step it dispatches `vf-drag-surface-request` (bubbles, non-composed,\n`detail.surface` null), and the nearest desktop on its light-DOM path\nfills the detail with the layer. A window asks the same way and draws\nthere with the same pen: its zoom rects when it opens from a rect\n(`vf-window.show({ from })`), its outline under an `outline-drag`. Not the\ntop layer: stable Safari cannot\nblend an element there against the page (src/cursor.ts), and a second\nkit entry in the top layer would need a re-promotion handshake.\n\nCustom properties:\n- `--vf-desktop-pattern` — a consumer's own tile art in place of the\n pattern (the kit's default is a 1-bit 50% checker, opaque\n black-on-white on a 30-system-px tile). Set, it wins over `pattern` and\n renders as a placed tile grid at that same 30-px geometry\n (src/tile-grid.ts); a token swapped at runtime without touching the\n component wants a `requestUpdate()`.\n- `--vf-desktop` — base color painted *under* the pattern (default\n `#808080`). The pattern's paper is opaque, so this only becomes visible\n when `--vf-desktop-pattern` is overridden with a tile that has\n transparent cells (or with `none`).",
|
|
2567
2567
|
"name": "VfDesktop",
|
|
2568
2568
|
"cssProperties": [
|
|
2569
2569
|
{
|
|
@@ -2764,8 +2764,8 @@
|
|
|
2764
2764
|
"name": "patternFill",
|
|
2765
2765
|
"privacy": "private",
|
|
2766
2766
|
"readonly": true,
|
|
2767
|
-
"default": "new PatternFillController(this, { getBox: () => this.screen, getPattern: () => (this._token ? null : this._desktopPattern),
|
|
2768
|
-
"description": "The desktop pattern, painted as the screen's own background\n(src/pattern-fill.ts)
|
|
2767
|
+
"default": "new PatternFillController(this, { getBox: () => this.screen, getPattern: () => (this._token ? null : this._desktopPattern), })",
|
|
2768
|
+
"description": "The desktop pattern, painted as the screen's own background\n(src/pattern-fill.ts) — a repeating tile, so resizing the screen\nre-encodes nothing — and silent while a consumer token owns the fill."
|
|
2769
2769
|
},
|
|
2770
2770
|
{
|
|
2771
2771
|
"kind": "field",
|
|
@@ -11689,15 +11689,15 @@
|
|
|
11689
11689
|
},
|
|
11690
11690
|
"privacy": "private",
|
|
11691
11691
|
"default": "''",
|
|
11692
|
-
"description": "The consumer's `--vf-progress-stripes` override, or `''` for the kit\nbarber — which
|
|
11692
|
+
"description": "The consumer's `--vf-progress-stripes` override, or `''` for the kit\nbarber — which path the strip takes (src/tile-grid.ts). Re-read every\nupdate; a runtime token swap wants a `requestUpdate()`."
|
|
11693
11693
|
},
|
|
11694
11694
|
{
|
|
11695
11695
|
"kind": "field",
|
|
11696
|
-
"name": "#
|
|
11696
|
+
"name": "#barberTile",
|
|
11697
11697
|
"privacy": "private",
|
|
11698
11698
|
"readonly": true,
|
|
11699
|
-
"default": "new
|
|
11700
|
-
"description": "The
|
|
11699
|
+
"default": "new RepeatTileController(this, { getBox: () => this.renderRoot?.querySelector<HTMLElement>('.vf-tile-strip'), getArt: () => (this.indeterminate && !this._pattern ? BARBER : null), property: '--_vf-barber-tile', })",
|
|
11700
|
+
"description": "The kit barber: the strip carries the repeating tile as\n`--_vf-barber-tile`."
|
|
11701
11701
|
},
|
|
11702
11702
|
{
|
|
11703
11703
|
"kind": "field",
|
|
@@ -16965,15 +16965,15 @@
|
|
|
16965
16965
|
},
|
|
16966
16966
|
"privacy": "private",
|
|
16967
16967
|
"default": "''",
|
|
16968
|
-
"description": "The consumer's `--vf-swatch-checker` override, or `''` for the kit\nchecker — which
|
|
16968
|
+
"description": "The consumer's `--vf-swatch-checker` override, or `''` for the kit\nchecker — which path render() takes (src/tile-grid.ts). Re-read every\nupdate; a runtime token swap wants a `requestUpdate()`."
|
|
16969
16969
|
},
|
|
16970
16970
|
{
|
|
16971
16971
|
"kind": "field",
|
|
16972
|
-
"name": "#
|
|
16972
|
+
"name": "#checkerTile",
|
|
16973
16973
|
"privacy": "private",
|
|
16974
16974
|
"readonly": true,
|
|
16975
|
-
"default": "new
|
|
16976
|
-
"description": "The
|
|
16975
|
+
"default": "new RepeatTileController(this, { getBox: () => this.renderRoot?.querySelector<HTMLElement>('.fill'), getArt: () => (this._pattern ? null : CHECKER), property: '--_vf-checker-tile', })",
|
|
16976
|
+
"description": "The kit checker: `.fill` carries the repeating tile as\n`--_vf-checker-tile`."
|
|
16977
16977
|
},
|
|
16978
16978
|
{
|
|
16979
16979
|
"kind": "field",
|
|
@@ -20388,15 +20388,15 @@
|
|
|
20388
20388
|
},
|
|
20389
20389
|
"privacy": "private",
|
|
20390
20390
|
"default": "''",
|
|
20391
|
-
"description": "The consumer's `--vf-dots-pattern` override, or `''` for the kit dots —\nwhich
|
|
20391
|
+
"description": "The consumer's `--vf-dots-pattern` override, or `''` for the kit dots —\nwhich path the utility bar takes (src/tile-grid.ts). Re-read every\nupdate; a runtime token swap wants a `requestUpdate()`."
|
|
20392
20392
|
},
|
|
20393
20393
|
{
|
|
20394
20394
|
"kind": "field",
|
|
20395
|
-
"name": "#
|
|
20395
|
+
"name": "#dotsTile",
|
|
20396
20396
|
"privacy": "private",
|
|
20397
20397
|
"readonly": true,
|
|
20398
|
-
"default": "new
|
|
20399
|
-
"description": "The
|
|
20398
|
+
"default": "new RepeatTileController(this, { getBox: () => this.renderRoot?.querySelector<HTMLElement>('.vf-dots'), getArt: () => (this.variant === 'utility' && !this._dotsPattern ? DOTS : null), property: '--_vf-dots-tile', })",
|
|
20399
|
+
"description": "The kit dots: the utility bar's `.vf-dots` layer carries the repeating\ntile as `--_vf-dots-tile` (`vfDots`), whatever the window's width."
|
|
20400
20400
|
},
|
|
20401
20401
|
{
|
|
20402
20402
|
"kind": "method",
|
|
@@ -20407,7 +20407,7 @@
|
|
|
20407
20407
|
"text": "unknown"
|
|
20408
20408
|
}
|
|
20409
20409
|
},
|
|
20410
|
-
"description": "
|
|
20410
|
+
"description": "A consumer `--vf-dots-pattern`'s placed tile grid, rendered into the\nutility bar's `.vf-dots` layer at the token's documented 30-px geometry\n(src/tile-grid.ts): the bar interior is the declared width minus the\nframe borders. A window with no declared width renders none, and the\nlayer repeats the token in CSS instead (`vf-dots-token`)."
|
|
20411
20411
|
},
|
|
20412
20412
|
{
|
|
20413
20413
|
"kind": "field",
|
package/dist/chrome.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type TemplateResult } from 'lit';
|
|
2
2
|
import type { ReactiveController, ReactiveControllerHost } from 'lit';
|
|
3
3
|
import type { DragController } from './drag.js';
|
|
4
|
-
export declare const chromeTitleBar: (drag: DragController, content: unknown, textureClass?:
|
|
4
|
+
export declare const chromeTitleBar: (drag: DragController, content: unknown, textureClass?: string, texture?: unknown) => TemplateResult;
|
|
5
5
|
/**
|
|
6
6
|
* Holds the flex-centered `.vf-title` patch on the placement lattice.
|
|
7
7
|
*
|
|
@@ -58,11 +58,10 @@ declare const VfContainer_base: (new (...args: any[]) => import("../size.js").Vf
|
|
|
58
58
|
* docs/PATTERNS.md has the table), or sixteen hex digits stating a custom
|
|
59
59
|
* 8×8 pattern row by row, the way a PAT resource did. It is painted as the
|
|
60
60
|
* box's own background — black ink on a `--vf-white` ground, anchored at
|
|
61
|
-
* the box's top-left corner, under the content — by the same
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
* height) is measured. Under forced colors the pattern goes flat Canvas.
|
|
61
|
+
* the box's top-left corner, under the content — by the same repeating tile
|
|
62
|
+
* as the desktop dither, so it is 1-bit at every density and zoom and a box
|
|
63
|
+
* of any size, declared or not, costs nothing more (src/pattern-fill.ts).
|
|
64
|
+
* Under forced colors the pattern goes flat Canvas.
|
|
66
65
|
*
|
|
67
66
|
* **It holds its box on the device-pixel grid** — with a `GridSnapController`.
|
|
68
67
|
* A container's box is itself the consumer's coordinate system, including for
|
|
@@ -134,8 +133,7 @@ export declare class VfContainer extends VfContainer_base {
|
|
|
134
133
|
private readonly gridSnap;
|
|
135
134
|
/**
|
|
136
135
|
* The pattern fill, painted on `.box` so it rides the snap correction with
|
|
137
|
-
* the coordinate system.
|
|
138
|
-
* undeclared one is measured (src/pattern-fill.ts).
|
|
136
|
+
* the coordinate system (src/pattern-fill.ts).
|
|
139
137
|
*/
|
|
140
138
|
private readonly patternFill;
|
|
141
139
|
protected willUpdate(changed: PropertyValues<this>): void;
|
|
@@ -15,11 +15,7 @@ var v = class extends f(r(p)) {
|
|
|
15
15
|
constructor(...e) {
|
|
16
16
|
super(...e), this._pattern = null, this.#e = !1, this._rule = [], this.#t = !1, this.scale = new t(this), this.gridSnap = new d(this), this.patternFill = new l(this, {
|
|
17
17
|
getBox: () => this.box,
|
|
18
|
-
getPattern: () => this._pattern
|
|
19
|
-
getSize: () => ({
|
|
20
|
-
width: this.width,
|
|
21
|
-
height: this.height
|
|
22
|
-
})
|
|
18
|
+
getPattern: () => this._pattern
|
|
23
19
|
});
|
|
24
20
|
}
|
|
25
21
|
static {
|
|
@@ -52,8 +52,8 @@ declare const VfDesktop_base: (new (...args: any[]) => import("../position.js").
|
|
|
52
52
|
* default, any of the 38 standard patterns (docs/PATTERNS.md), or sixteen
|
|
53
53
|
* hex digits stating a custom 8×8 pattern, as on `vf-container`. It is
|
|
54
54
|
* painted as the screen's own background: black ink on an opaque white
|
|
55
|
-
* paper,
|
|
56
|
-
*
|
|
55
|
+
* paper, a repeating tile drawn at the display's resolution, 1-bit at every
|
|
56
|
+
* density and zoom (src/pattern-fill.ts).
|
|
57
57
|
*
|
|
58
58
|
* **The drag surface.** The Finder dragged an icon as a dotted outline drawn
|
|
59
59
|
* on the *screen*, clipped at its edge and phase-locked to its raster, so
|
|
@@ -187,9 +187,8 @@ export declare class VfDesktop extends VfDesktop_base {
|
|
|
187
187
|
private readonly dragSurface;
|
|
188
188
|
/**
|
|
189
189
|
* The desktop pattern, painted as the screen's own background
|
|
190
|
-
* (src/pattern-fill.ts)
|
|
191
|
-
*
|
|
192
|
-
* owns the fill.
|
|
190
|
+
* (src/pattern-fill.ts) — a repeating tile, so resizing the screen
|
|
191
|
+
* re-encodes nothing — and silent while a consumer token owns the fill.
|
|
193
192
|
*/
|
|
194
193
|
private readonly patternFill;
|
|
195
194
|
/** Monotonic z-index counter for window stacking. */
|
|
@@ -5,8 +5,8 @@ import a from "../_virtual/_@oxc-project_runtime@0.143.0/helpers/esm/decorate.js
|
|
|
5
5
|
import { VfPositioned as o, placementIn as s } from "../position.js";
|
|
6
6
|
import { vfBase as c } from "../styles/recipes/host.js";
|
|
7
7
|
import { tileImage as l, tileRects as u, tileSpan as d } from "../styles/recipes/tile.js";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
8
|
+
import { patternOverride as f, tileGrid as p, vfTileGrid as m } from "../tile-grid.js";
|
|
9
|
+
import { PATTERNS as h, parsePattern as g, patternMotif as _ } from "../patterns.js";
|
|
10
10
|
import { PatternFillController as v, vfPatternFill as y } from "../pattern-fill.js";
|
|
11
11
|
import { GridSnapController as b } from "../grid-snap.js";
|
|
12
12
|
import { DocumentListenersController as x } from "../document-listeners.js";
|
|
@@ -14,15 +14,11 @@ import { SCREEN_CORNER as S, steppedCornerClip as C } from "../pixel-frame.js";
|
|
|
14
14
|
import { LitElement as w, css as T, html as E, unsafeCSS as D } from "lit";
|
|
15
15
|
import { property as O, query as k, queryAssignedElements as A } from "lit/decorators.js";
|
|
16
16
|
//#region src/components/vf-desktop.ts
|
|
17
|
-
var j = 1e6, M = 2 * j, N = 2000001, P = 512, F = 342, I = "gray-50", L =
|
|
17
|
+
var j = 1e6, M = 2 * j, N = 2000001, P = 512, F = 342, I = "gray-50", L = _(h[I], "#000000", "#ffffff"), R = l(L.width, L.height, u(L.rects)), z = d(L.width), B = class extends o(w) {
|
|
18
18
|
constructor(...e) {
|
|
19
|
-
super(...e), this.width = P, this.height = F, this.bezel = 0, this.pattern = I, this.scale = new n(this), this.gridSnap = new b(this), this._token = "", this._desktopPattern =
|
|
19
|
+
super(...e), this.width = P, this.height = F, this.bezel = 0, this.pattern = I, this.scale = new n(this), this.gridSnap = new b(this), this._token = "", this._desktopPattern = h[I], this.#e = !1, this.patternFill = new v(this, {
|
|
20
20
|
getBox: () => this.screen,
|
|
21
|
-
getPattern: () => this._token ? null : this._desktopPattern
|
|
22
|
-
getSize: () => ({
|
|
23
|
-
width: this.width ?? P,
|
|
24
|
-
height: this.height ?? F
|
|
25
|
-
})
|
|
21
|
+
getPattern: () => this._token ? null : this._desktopPattern
|
|
26
22
|
}), this._zCounter = 0, this._activeWindow = null, this._deactivated = !1, this._awaitingUpgrade = !1, this._pointerGesture = !1, this._restoringFocus = !1, this._domSyncTimer = 0, this._gestureEnd = new x(this, () => [[
|
|
27
23
|
document,
|
|
28
24
|
"pointerup",
|
|
@@ -51,7 +47,7 @@ var j = 1e6, M = 2 * j, N = 2000001, P = 512, F = 342, I = "gray-50", L = m(f[I]
|
|
|
51
47
|
static {
|
|
52
48
|
this.styles = [
|
|
53
49
|
c,
|
|
54
|
-
|
|
50
|
+
m,
|
|
55
51
|
y,
|
|
56
52
|
T`
|
|
57
53
|
:host {
|
|
@@ -89,10 +85,9 @@ var j = 1e6, M = 2 * j, N = 2000001, P = 512, F = 342, I = "gray-50", L = m(f[I]
|
|
|
89
85
|
dither — and shows only through a consumer token's translucent
|
|
90
86
|
tile (see the --vf-desktop note in the class doc). The pattern
|
|
91
87
|
itself is this element's own background, written by the
|
|
92
|
-
PatternFillController:
|
|
93
|
-
|
|
94
|
-
1
|
|
95
|
-
(src/tile-grid.ts, src/pattern-fill.ts). */
|
|
88
|
+
PatternFillController: a 120-system-px tile drawn at the device
|
|
89
|
+
resolution it is shown at and repeated, so every engine copies it
|
|
90
|
+
1:1 (src/pattern-fill.ts). */
|
|
96
91
|
background-color: var(--vf-desktop, #808080);
|
|
97
92
|
/* Forced colors: the pattern is literal black ink on white, which
|
|
98
93
|
ignores a dark theme entirely. A backdrop is decoration, and
|
|
@@ -298,9 +293,9 @@ var j = 1e6, M = 2 * j, N = 2000001, P = 512, F = 342, I = "gray-50", L = m(f[I]
|
|
|
298
293
|
r && n instanceof HTMLElement && n.isConnected && this._deepActiveElement() !== n && (this._restoringFocus = !0, n.focus({ preventScroll: !0 }), this._restoringFocus = !1);
|
|
299
294
|
}
|
|
300
295
|
willUpdate(e) {
|
|
301
|
-
if (super.willUpdate(e), this._token =
|
|
302
|
-
let e =
|
|
303
|
-
e === null && this.pattern?.trim() && !this.#e && (this.#e = !0, console.warn(`vf-desktop: unknown pattern "${this.pattern}" — a library name (docs/PATTERNS.md) or sixteen hex digits. Keeping ${I}.`)), this._desktopPattern = e ??
|
|
296
|
+
if (super.willUpdate(e), this._token = f(this, "--vf-desktop-pattern"), e.has("pattern")) {
|
|
297
|
+
let e = g(this.pattern);
|
|
298
|
+
e === null && this.pattern?.trim() && !this.#e && (this.#e = !0, console.warn(`vf-desktop: unknown pattern "${this.pattern}" — a library name (docs/PATTERNS.md) or sixteen hex digits. Keeping ${I}.`)), this._desktopPattern = e ?? h[I];
|
|
304
299
|
}
|
|
305
300
|
}
|
|
306
301
|
updated(e) {
|
|
@@ -311,7 +306,7 @@ var j = 1e6, M = 2 * j, N = 2000001, P = 512, F = 342, I = "gray-50", L = m(f[I]
|
|
|
311
306
|
}
|
|
312
307
|
render() {
|
|
313
308
|
let e = this.width ?? P, t = this.height ?? F, n = this._token ? E`<div class="vf-tile-grid">
|
|
314
|
-
${
|
|
309
|
+
${p({
|
|
315
310
|
cols: Math.ceil(e / z),
|
|
316
311
|
rows: Math.ceil(t / z),
|
|
317
312
|
tile: z
|
|
@@ -48,8 +48,8 @@ export declare class VfProgressBar extends VfProgressBar_base {
|
|
|
48
48
|
private readonly trackSize;
|
|
49
49
|
/**
|
|
50
50
|
* The consumer's `--vf-progress-stripes` override, or `''` for the kit
|
|
51
|
-
* barber — which
|
|
52
|
-
*
|
|
51
|
+
* barber — which path the strip takes (src/tile-grid.ts). Re-read every
|
|
52
|
+
* update; a runtime token swap wants a `requestUpdate()`.
|
|
53
53
|
*/
|
|
54
54
|
private _pattern;
|
|
55
55
|
constructor();
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { vfElement as e } from "../define.js";
|
|
2
|
-
import { ScaleController as t, sys as n,
|
|
3
|
-
import
|
|
4
|
-
import { VfPositioned as
|
|
5
|
-
import { vfBase as
|
|
6
|
-
import { tileImage as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
2
|
+
import { ScaleController as t, sys as n, toSys as r } from "../scale.js";
|
|
3
|
+
import i from "../_virtual/_@oxc-project_runtime@0.143.0/helpers/esm/decorate.js";
|
|
4
|
+
import { VfPositioned as a } from "../position.js";
|
|
5
|
+
import { vfBase as o } from "../styles/recipes/host.js";
|
|
6
|
+
import { tileImage as s, tileRects as c, tileSpan as l, vfTileMaskSize as u } from "../styles/recipes/tile.js";
|
|
7
|
+
import { RepeatTileController as d, patternOverride as f, tileGrid as p, vfRepeatTileSize as m, vfTileGrid as h } from "../tile-grid.js";
|
|
8
|
+
import { GridSnapController as g } from "../grid-snap.js";
|
|
9
|
+
import { TrackWidthController as _ } from "../track-width.js";
|
|
10
10
|
import { LitElement as v, css as y, html as b, unsafeCSS as x } from "lit";
|
|
11
11
|
import { property as S, query as C } from "lit/decorators.js";
|
|
12
12
|
//#region src/components/vf-progress-bar.ts
|
|
@@ -113,10 +113,14 @@ var w = 12, T = [
|
|
|
113
113
|
1,
|
|
114
114
|
1
|
|
115
115
|
]
|
|
116
|
-
], E =
|
|
116
|
+
], E = {
|
|
117
|
+
width: w,
|
|
118
|
+
height: w,
|
|
119
|
+
rects: T
|
|
120
|
+
}, D = s(w, w, c(T)), O = l(w), k = class extends a(v) {
|
|
117
121
|
static {
|
|
118
122
|
this.styles = [
|
|
119
|
-
|
|
123
|
+
o,
|
|
120
124
|
h,
|
|
121
125
|
y`
|
|
122
126
|
:host {
|
|
@@ -147,25 +151,30 @@ var w = 12, T = [
|
|
|
147
151
|
\ bands are a staircase of axis-aligned 1px rects (genuine pixel
|
|
148
152
|
art — a *diagonal* edge would blur where these stay pixel-exact)
|
|
149
153
|
over this themeable white ground. The art itself rides the
|
|
150
|
-
.vf-tile-strip child (src/tile-grid.ts): the kit's
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
+
.vf-tile-strip child (src/tile-grid.ts): the kit's repeating
|
|
155
|
+
tile, or a consumer --vf-progress-stripes token's placed tile grid
|
|
156
|
+
at the token's documented 60-px tile geometry. This layer is the
|
|
157
|
+
strip's containing block and its clip. */
|
|
154
158
|
position: relative;
|
|
155
159
|
background-color: var(--vf-white, #fff);
|
|
156
|
-
--_vf-tile-image: var(--vf-progress-stripes, ${x(
|
|
160
|
+
--_vf-tile-image: var(--vf-progress-stripes, ${x(D)});
|
|
157
161
|
}
|
|
158
|
-
/* The animated strip:
|
|
159
|
-
the fill), and each cycle
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
box — no CSS length
|
|
162
|
+
/* The animated strip: the fill's width plus one 12px cell, resting
|
|
163
|
+
that cell to the left (fully covering the fill), and each cycle
|
|
164
|
+
advances one whole cell in 4 chunky steps — steppy, not smooth,
|
|
165
|
+
wrapping with zero phase jump because the art's period is the cell.
|
|
166
|
+
The animated value is a layout property, so every step is one
|
|
167
|
+
quantized length paint-snapped like any placed box — no CSS length
|
|
168
|
+
ever accumulates a phase. */
|
|
164
169
|
.vf-tile-strip {
|
|
165
170
|
position: absolute;
|
|
166
171
|
top: 0;
|
|
167
172
|
height: 100%;
|
|
173
|
+
width: calc(100% + var(--vf-scale, 1) * 12px);
|
|
168
174
|
left: calc(var(--vf-scale, 1) * -12px);
|
|
175
|
+
background-image: var(--_vf-barber-tile, none);
|
|
176
|
+
${m}
|
|
177
|
+
image-rendering: pixelated;
|
|
169
178
|
animation: vf-barber 0.4s steps(4, end) infinite;
|
|
170
179
|
}
|
|
171
180
|
@keyframes vf-barber {
|
|
@@ -179,8 +188,8 @@ var w = 12, T = [
|
|
|
179
188
|
/* Forced colors: the fill and track are the bar's whole reading, and
|
|
180
189
|
both have their own tokens with literal fallbacks the override
|
|
181
190
|
flattens to Canvas — remapped here like the palette tokens in vfBase.
|
|
182
|
-
The strip's
|
|
183
|
-
|
|
191
|
+
The strip's tile would keep its literal black ink (invisible on a
|
|
192
|
+
dark theme), so the strip hides and the layer repaints as a mask
|
|
184
193
|
over the ink token — same tile, same token a consumer overrides —
|
|
185
194
|
with the animation on the mask's position. The span-tiled mask keeps
|
|
186
195
|
the zoom caveat (no mask pipeline rasterizes exactly at a zoom-minted
|
|
@@ -192,8 +201,8 @@ var w = 12, T = [
|
|
|
192
201
|
}
|
|
193
202
|
.fill.stripes {
|
|
194
203
|
background-color: var(--vf-progress-fill, CanvasText);
|
|
195
|
-
mask-image: var(--vf-progress-stripes, ${x(
|
|
196
|
-
${
|
|
204
|
+
mask-image: var(--vf-progress-stripes, ${x(D)});
|
|
205
|
+
${u(w)}
|
|
197
206
|
animation: vf-barber-mask 0.4s steps(4, end) infinite;
|
|
198
207
|
}
|
|
199
208
|
.fill.stripes .vf-tile-strip {
|
|
@@ -220,7 +229,11 @@ var w = 12, T = [
|
|
|
220
229
|
#e;
|
|
221
230
|
#t;
|
|
222
231
|
constructor() {
|
|
223
|
-
super(), this.scale = new t(this), this.gridSnap = new
|
|
232
|
+
super(), this.scale = new t(this), this.gridSnap = new g(this), this.value = 0, this.max = 100, this.indeterminate = !1, this.label = "", this.trackSize = new _(this, () => this.track), this._pattern = "", this.#e = new d(this, {
|
|
233
|
+
getBox: () => this.renderRoot?.querySelector(".vf-tile-strip"),
|
|
234
|
+
getArt: () => this.indeterminate && !this._pattern ? E : null,
|
|
235
|
+
property: "--_vf-barber-tile"
|
|
236
|
+
}), this.#t = this.attachInternals(), this.#t.role = "progressbar", this.#t.ariaValueMin = "0";
|
|
224
237
|
}
|
|
225
238
|
get effectiveMax() {
|
|
226
239
|
return this.max > 0 ? this.max : 100;
|
|
@@ -229,44 +242,45 @@ var w = 12, T = [
|
|
|
229
242
|
return Math.min(Math.max(this.value, 0), this.effectiveMax);
|
|
230
243
|
}
|
|
231
244
|
willUpdate(e) {
|
|
232
|
-
super.willUpdate(e), this.indeterminate && (this._pattern =
|
|
245
|
+
super.willUpdate(e), this.indeterminate && (this._pattern = f(this, "--vf-progress-stripes"));
|
|
233
246
|
}
|
|
234
247
|
updated(e) {
|
|
235
248
|
e.has("label") && (this.#t.ariaLabel = this.label || null), e.has("max") && (this.#t.ariaValueMax = String(this.effectiveMax)), (e.has("value") || e.has("max") || e.has("indeterminate")) && (this.#t.ariaValueNow = this.indeterminate ? null : String(this.clampedValue));
|
|
236
249
|
}
|
|
237
250
|
render() {
|
|
238
251
|
if (this.indeterminate) {
|
|
239
|
-
let e =
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
252
|
+
let e = null;
|
|
253
|
+
if (this._pattern) {
|
|
254
|
+
let t = r(this.trackSize.width, this), n = Math.max(1, Math.ceil((t + w) / O));
|
|
255
|
+
e = p({
|
|
256
|
+
cols: n,
|
|
257
|
+
rows: 1,
|
|
258
|
+
tile: O
|
|
259
|
+
});
|
|
260
|
+
}
|
|
247
261
|
return b`
|
|
248
262
|
<div class="track vf-snap" part="track">
|
|
249
263
|
<div class="fill stripes vf-tile-grid" part="fill">
|
|
250
|
-
<div class="vf-tile-strip">${
|
|
264
|
+
<div class="vf-tile-strip">${e}</div>
|
|
251
265
|
</div>
|
|
252
266
|
</div>
|
|
253
267
|
`;
|
|
254
268
|
}
|
|
255
|
-
let e = this.clampedValue / this.effectiveMax, t =
|
|
269
|
+
let e = this.clampedValue / this.effectiveMax, t = r(this.trackSize.width, this), i = t > 0 ? `${n(Math.round(e * t), this)}px` : `${e * 100}%`;
|
|
256
270
|
return b`
|
|
257
271
|
<div class="track vf-snap" part="track">
|
|
258
272
|
<div
|
|
259
273
|
class="fill ${e <= 0 ? "empty" : ""}"
|
|
260
274
|
part="fill"
|
|
261
|
-
style="width: ${
|
|
275
|
+
style="width: ${i}"
|
|
262
276
|
></div>
|
|
263
277
|
</div>
|
|
264
278
|
`;
|
|
265
279
|
}
|
|
266
280
|
};
|
|
267
|
-
|
|
281
|
+
i([S({ type: Number })], k.prototype, "value", void 0), i([S({ type: Number })], k.prototype, "max", void 0), i([S({
|
|
268
282
|
type: Boolean,
|
|
269
283
|
reflect: !0
|
|
270
|
-
})],
|
|
284
|
+
})], k.prototype, "indeterminate", void 0), i([S()], k.prototype, "label", void 0), i([C(".track")], k.prototype, "track", void 0), k = i([e("vf-progress-bar")], k);
|
|
271
285
|
//#endregion
|
|
272
|
-
export {
|
|
286
|
+
export { k as VfProgressBar };
|
|
@@ -5,12 +5,12 @@ import o from "../_virtual/_@oxc-project_runtime@0.143.0/helpers/esm/decorate.js
|
|
|
5
5
|
import { VfPositioned as s } from "../position.js";
|
|
6
6
|
import { vfBase as c } from "../styles/recipes/host.js";
|
|
7
7
|
import { vfFocusUnderline as l } from "../styles/recipes/focus.js";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
8
|
+
import { GridSnapController as u } from "../grid-snap.js";
|
|
9
|
+
import { SLIDER_THUMB as d, SLIDER_THUMB_FACE as f } from "../glyphs.js";
|
|
10
|
+
import { VfFormControl as p } from "../form-control.js";
|
|
11
|
+
import { FocusRuleController as m } from "../focus-modality.js";
|
|
12
|
+
import { decimalsOf as h } from "../number.js";
|
|
13
|
+
import { TrackWidthController as g } from "../track-width.js";
|
|
14
14
|
import { css as _, html as v } from "lit";
|
|
15
15
|
import { property as y, query as b } from "lit/decorators.js";
|
|
16
16
|
//#region src/components/vf-slider.ts
|
|
@@ -21,7 +21,7 @@ function D(e, t) {
|
|
|
21
21
|
};
|
|
22
22
|
return r(1, 0, e - 2, 1), r(1, 3, e - 2, 1), r(0, 1, 1, 2), r(e - 1, 1, 1, 2), r(1, 1, Math.min(Math.max(t, 0), e - 1) - 1, 2), n.join("");
|
|
23
23
|
}
|
|
24
|
-
var O = class extends s(
|
|
24
|
+
var O = class extends s(p) {
|
|
25
25
|
static {
|
|
26
26
|
this.styles = [c, _`
|
|
27
27
|
:host {
|
|
@@ -110,7 +110,7 @@ var O = class extends s(m) {
|
|
|
110
110
|
#t;
|
|
111
111
|
#n;
|
|
112
112
|
constructor() {
|
|
113
|
-
super(), this.value = 0, this.min = 0, this.max = 100, this.step = 1, this.name = "", this.label = "", this.trackSize = new
|
|
113
|
+
super(), this.value = 0, this.min = 0, this.max = 100, this.step = 1, this.name = "", this.label = "", this.trackSize = new g(this, () => this.track), this.scale = new r(this), this.gridSnap = new u(this), this.selfManagedTabIndex = !1, this.#e = new m(this), this.#t = 0, this.#n = !1, this.#f = (e) => {
|
|
114
114
|
if (!(this.isDisabled || e.button !== 0)) {
|
|
115
115
|
e.preventDefault(), this.#e.suppress(), this.focus(), this.#n = !0, this.#t = this.value;
|
|
116
116
|
try {
|
|
@@ -181,7 +181,7 @@ var O = class extends s(m) {
|
|
|
181
181
|
}
|
|
182
182
|
#o(e) {
|
|
183
183
|
let t = this.#i, n = Math.round((e - this.min) / t), r = this.#a(this.min + n * t);
|
|
184
|
-
return Number(r.toFixed(
|
|
184
|
+
return Number(r.toFixed(h(t)));
|
|
185
185
|
}
|
|
186
186
|
get #s() {
|
|
187
187
|
let e = Number.isFinite(this.value) ? this.value : this.min;
|
|
@@ -242,8 +242,8 @@ var O = class extends s(m) {
|
|
|
242
242
|
shape-rendering="crispEdges"
|
|
243
243
|
aria-hidden="true"
|
|
244
244
|
>
|
|
245
|
-
<path class="thumb-face" d=${
|
|
246
|
-
<path class="thumb-outline" d=${
|
|
245
|
+
<path class="thumb-face" d=${f.d}></path>
|
|
246
|
+
<path class="thumb-outline" d=${d.d}></path>
|
|
247
247
|
</svg>
|
|
248
248
|
</span>
|
|
249
249
|
</div>
|
|
@@ -83,8 +83,8 @@ export declare class VfSwatch extends VfSwatch_base {
|
|
|
83
83
|
private readonly gridSnap;
|
|
84
84
|
/**
|
|
85
85
|
* The consumer's `--vf-swatch-checker` override, or `''` for the kit
|
|
86
|
-
* checker — which
|
|
87
|
-
*
|
|
86
|
+
* checker — which path render() takes (src/tile-grid.ts). Re-read every
|
|
87
|
+
* update; a runtime token swap wants a `requestUpdate()`.
|
|
88
88
|
*/
|
|
89
89
|
private _pattern;
|
|
90
90
|
protected willUpdate(changed: PropertyValues<this>): void;
|