vintage-frames 0.3.0 → 0.5.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 +181 -32
- package/dist/components/vf-button.js +25 -25
- package/dist/components/vf-checkbox.js +15 -15
- package/dist/components/vf-container.d.ts +37 -3
- package/dist/components/vf-container.js +32 -10
- package/dist/components/vf-desktop.d.ts +103 -22
- package/dist/components/vf-desktop.js +100 -121
- package/dist/components/vf-dialog.d.ts +19 -15
- package/dist/components/vf-dialog.js +45 -53
- package/dist/components/vf-icon.js +56 -56
- package/dist/components/vf-list-item.js +16 -16
- package/dist/components/vf-list.js +26 -26
- package/dist/components/vf-menu-item.js +24 -24
- package/dist/components/vf-menu.js +27 -27
- package/dist/components/vf-number-field.js +17 -17
- package/dist/components/vf-progress-bar.js +3 -3
- package/dist/components/vf-radio-group.js +13 -13
- package/dist/components/vf-radio.js +16 -16
- package/dist/components/vf-select.js +27 -27
- package/dist/components/vf-slider.js +32 -32
- package/dist/components/vf-window.js +69 -69
- package/dist/index.d.ts +14 -0
- package/dist/index.js +73 -71
- package/dist/modal-dialog.js +21 -21
- package/dist/pattern-fill.d.ts +91 -0
- package/dist/pattern-fill.js +74 -0
- package/dist/patterns.d.ts +80 -0
- package/dist/patterns.js +477 -0
- package/dist/scroll-rail.js +37 -37
- package/dist/styles/recipes/pattern.d.ts +2 -12
- package/dist/styles/recipes/pattern.js +11 -15
- package/dist/styles/recipes/scroll-rail.d.ts +3 -12
- package/dist/styles/recipes/scroll-rail.js +7 -15
- package/dist/styles/recipes/surface.d.ts +18 -7
- package/dist/styles/recipes/surface.js +15 -0
- package/dist/text-control.js +11 -11
- package/dist/tile-grid.d.ts +4 -2
- package/dist/tile-grid.js +3 -3
- package/dist/toggle-control.js +5 -5
- package/dist/track-width.d.ts +7 -0
- package/dist/track-width.js +6 -3
- package/docs/SPEC.md +14 -10
- package/editor/vscode.html-custom-data.json +14 -4
- package/editor/web-types.json +46 -8
- package/package.json +3 -1
package/custom-elements.json
CHANGED
|
@@ -1974,7 +1974,7 @@
|
|
|
1974
1974
|
"declarations": [
|
|
1975
1975
|
{
|
|
1976
1976
|
"kind": "class",
|
|
1977
|
-
"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
|
|
1977
|
+
"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` says what to\npaint. No border, role, keyboard behavior or selection; what it holds\ndecides what it is.\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 whole-surface\nraster mechanism as the desktop dither, so it is 1-bit at every density\nand zoom (src/pattern-fill.ts). A declared `width`/`height` sizes the\nraster exactly; an undeclared axis (`fill-width`, a shrink-wrapped\nheight) is measured. Under 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.",
|
|
1978
1978
|
"name": "VfContainer",
|
|
1979
1979
|
"slots": [
|
|
1980
1980
|
{
|
|
@@ -1983,6 +1983,45 @@
|
|
|
1983
1983
|
}
|
|
1984
1984
|
],
|
|
1985
1985
|
"members": [
|
|
1986
|
+
{
|
|
1987
|
+
"kind": "field",
|
|
1988
|
+
"name": "pattern",
|
|
1989
|
+
"type": {
|
|
1990
|
+
"text": "string | null | undefined"
|
|
1991
|
+
},
|
|
1992
|
+
"description": "A 1-bit fill for the box: a library pattern by name (`bricks`,\n`gray-50`, … — the 38 standard MacPaint patterns, docs/PATTERNS.md) or\nsixteen hex digits stating a custom 8×8 pattern row by row, bit 7 the\nleftmost pixel, 1 = ink (`\"DD 77 DD 77 DD 77 DD 77\"`). Painted in black\non a `--vf-white` ground under the content, anchored at the box's\ntop-left. Unset, the container paints nothing; an unrecognized value\npaints nothing and warns once.",
|
|
1993
|
+
"attribute": "pattern"
|
|
1994
|
+
},
|
|
1995
|
+
{
|
|
1996
|
+
"kind": "field",
|
|
1997
|
+
"name": "_pattern",
|
|
1998
|
+
"type": {
|
|
1999
|
+
"text": "Pattern | null"
|
|
2000
|
+
},
|
|
2001
|
+
"privacy": "private",
|
|
2002
|
+
"default": "null",
|
|
2003
|
+
"description": "`pattern`, resolved — what the fill paints; null paints nothing."
|
|
2004
|
+
},
|
|
2005
|
+
{
|
|
2006
|
+
"kind": "field",
|
|
2007
|
+
"name": "#warnedPattern",
|
|
2008
|
+
"privacy": "private",
|
|
2009
|
+
"type": {
|
|
2010
|
+
"text": "boolean"
|
|
2011
|
+
},
|
|
2012
|
+
"default": "false",
|
|
2013
|
+
"description": "One warning per element for an unrecognized `pattern`, not per render."
|
|
2014
|
+
},
|
|
2015
|
+
{
|
|
2016
|
+
"kind": "field",
|
|
2017
|
+
"name": "box",
|
|
2018
|
+
"type": {
|
|
2019
|
+
"text": "HTMLDivElement"
|
|
2020
|
+
},
|
|
2021
|
+
"privacy": "private",
|
|
2022
|
+
"readonly": true,
|
|
2023
|
+
"description": "The shadow box the fill paints on; exists from the first render."
|
|
2024
|
+
},
|
|
1986
2025
|
{
|
|
1987
2026
|
"kind": "field",
|
|
1988
2027
|
"name": "scale",
|
|
@@ -1999,6 +2038,14 @@
|
|
|
1999
2038
|
"default": "new GridSnapController(this)",
|
|
2000
2039
|
"description": "Hold the box on the device-pixel grid — see the\nclass doc. The host is what gets measured; `.box` (vf-snap) is where the\ncorrection lands."
|
|
2001
2040
|
},
|
|
2041
|
+
{
|
|
2042
|
+
"kind": "field",
|
|
2043
|
+
"name": "patternFill",
|
|
2044
|
+
"privacy": "private",
|
|
2045
|
+
"readonly": true,
|
|
2046
|
+
"default": "new PatternFillController(this, { getBox: () => this.box, getPattern: () => this._pattern, getSize: () => ({ width: this.width, height: this.height }), })",
|
|
2047
|
+
"description": "The pattern fill, painted on `.box` so it rides the snap correction with\nthe coordinate system. A declared axis sizes the raster exactly; an\nundeclared one is measured (src/pattern-fill.ts)."
|
|
2048
|
+
},
|
|
2002
2049
|
{
|
|
2003
2050
|
"kind": "field",
|
|
2004
2051
|
"name": "width",
|
|
@@ -2052,23 +2099,15 @@
|
|
|
2052
2099
|
}
|
|
2053
2100
|
}
|
|
2054
2101
|
],
|
|
2055
|
-
"
|
|
2102
|
+
"attributes": [
|
|
2056
2103
|
{
|
|
2057
|
-
"name": "
|
|
2058
|
-
"
|
|
2104
|
+
"name": "pattern",
|
|
2105
|
+
"type": {
|
|
2106
|
+
"text": "string | null | undefined"
|
|
2107
|
+
},
|
|
2108
|
+
"description": "A 1-bit fill for the box: a library pattern by name (`bricks`,\n`gray-50`, … — the 38 standard MacPaint patterns, docs/PATTERNS.md) or\nsixteen hex digits stating a custom 8×8 pattern row by row, bit 7 the\nleftmost pixel, 1 = ink (`\"DD 77 DD 77 DD 77 DD 77\"`). Painted in black\non a `--vf-white` ground under the content, anchored at the box's\ntop-left. Unset, the container paints nothing; an unrecognized value\npaints nothing and warns once.",
|
|
2109
|
+
"fieldName": "pattern"
|
|
2059
2110
|
},
|
|
2060
|
-
{
|
|
2061
|
-
"name": "VfPositioned",
|
|
2062
|
-
"module": "/src/position.js"
|
|
2063
|
-
}
|
|
2064
|
-
],
|
|
2065
|
-
"superclass": {
|
|
2066
|
-
"name": "LitElement",
|
|
2067
|
-
"package": "lit"
|
|
2068
|
-
},
|
|
2069
|
-
"tagName": "vf-container",
|
|
2070
|
-
"customElement": true,
|
|
2071
|
-
"attributes": [
|
|
2072
2111
|
{
|
|
2073
2112
|
"name": "width",
|
|
2074
2113
|
"type": {
|
|
@@ -2117,7 +2156,23 @@
|
|
|
2117
2156
|
"module": "src/position.ts"
|
|
2118
2157
|
}
|
|
2119
2158
|
}
|
|
2120
|
-
]
|
|
2159
|
+
],
|
|
2160
|
+
"mixins": [
|
|
2161
|
+
{
|
|
2162
|
+
"name": "VfSized",
|
|
2163
|
+
"module": "/src/size.js"
|
|
2164
|
+
},
|
|
2165
|
+
{
|
|
2166
|
+
"name": "VfPositioned",
|
|
2167
|
+
"module": "/src/position.js"
|
|
2168
|
+
}
|
|
2169
|
+
],
|
|
2170
|
+
"superclass": {
|
|
2171
|
+
"name": "LitElement",
|
|
2172
|
+
"package": "lit"
|
|
2173
|
+
},
|
|
2174
|
+
"tagName": "vf-container",
|
|
2175
|
+
"customElement": true
|
|
2121
2176
|
}
|
|
2122
2177
|
],
|
|
2123
2178
|
"exports": [
|
|
@@ -2145,22 +2200,22 @@
|
|
|
2145
2200
|
"declarations": [
|
|
2146
2201
|
{
|
|
2147
2202
|
"kind": "class",
|
|
2148
|
-
"description": "`<vf-desktop>` — the full-bleed classic desktop container.\n\nRenders the 50
|
|
2203
|
+
"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, at pointer-gesture\nends), so tabbing walks the stack the way the eye does and Shift+Tab is\nits 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.\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 top 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, one whole-surface raster at one image px per system px, 1-bit at\nevery density and zoom (src/pattern-fill.ts).\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`).",
|
|
2149
2204
|
"name": "VfDesktop",
|
|
2150
2205
|
"cssProperties": [
|
|
2151
2206
|
{
|
|
2152
|
-
"description": "base color under the desktop
|
|
2207
|
+
"description": "base color under the desktop pattern — occluded by the pattern's opaque paper, so it only shows through a custom `--vf-desktop-pattern`",
|
|
2153
2208
|
"name": "--vf-desktop",
|
|
2154
2209
|
"default": "#808080"
|
|
2155
2210
|
},
|
|
2156
2211
|
{
|
|
2157
|
-
"description": "
|
|
2212
|
+
"description": "a consumer's own desktop tile, in place of `pattern` — the kit's default is the 50% checker drawn as opaque black-on-white rects on a 30-system-px tile. Override the whole tile; consumer art renders as a placed tile grid at that same geometry (raster art magnifies nearest-neighbor, the `vf-img` idiom)",
|
|
2158
2213
|
"name": "--vf-desktop-pattern"
|
|
2159
2214
|
}
|
|
2160
2215
|
],
|
|
2161
2216
|
"cssParts": [
|
|
2162
2217
|
{
|
|
2163
|
-
"description": "The
|
|
2218
|
+
"description": "The patterned screen surface — the whole-system-px raster (inset by `bezel` when one is set).",
|
|
2164
2219
|
"name": "desktop"
|
|
2165
2220
|
}
|
|
2166
2221
|
],
|
|
@@ -2201,6 +2256,16 @@
|
|
|
2201
2256
|
"description": "Width of the black screen bezel, in system px (`0` = none), added onto\nthe declared screen on every side — a `width=\"502\" bezel=\"5\"` desktop\nrenders a 512-system-px host box. The compact Mac's CRT showed an\nunlit black margin between the desktop's raster and the case; `bezel`\ndraws it around the screen and puts the classic screen-corner mask on\nthe screen's two *top* corners — only the top pair was rounded in the\nframebuffer. Flow, window coordinates and the drag clip all belong to\nthe screen, so windows crop at its edge. Inside a bezeled desktop a\nmenu bar needs no `rounded` of its own — the desktop's mask lands on\nthe same pixels.",
|
|
2202
2257
|
"attribute": "bezel"
|
|
2203
2258
|
},
|
|
2259
|
+
{
|
|
2260
|
+
"kind": "field",
|
|
2261
|
+
"name": "pattern",
|
|
2262
|
+
"type": {
|
|
2263
|
+
"text": "string | null | undefined"
|
|
2264
|
+
},
|
|
2265
|
+
"default": "'gray-50'",
|
|
2266
|
+
"description": "The desktop pattern — System 7's General Controls setting. A library\npattern by name (`gray-50`, the classic dither, by default; `gray-75`,\n`bricks`, … — docs/PATTERNS.md) or sixteen hex digits stating a custom\n8×8 pattern, as on `vf-container`. Painted black on opaque white over\nthe whole screen, 1-bit at every density and zoom. A\n`--vf-desktop-pattern` token override still wins and renders the\nconsumer's tile as a placed grid; an unrecognized value warns once and\nkeeps the dither.",
|
|
2267
|
+
"attribute": "pattern"
|
|
2268
|
+
},
|
|
2204
2269
|
{
|
|
2205
2270
|
"kind": "method",
|
|
2206
2271
|
"name": "fitWithin",
|
|
@@ -2252,21 +2317,51 @@
|
|
|
2252
2317
|
},
|
|
2253
2318
|
{
|
|
2254
2319
|
"kind": "field",
|
|
2255
|
-
"name": "
|
|
2320
|
+
"name": "_token",
|
|
2256
2321
|
"type": {
|
|
2257
2322
|
"text": "string"
|
|
2258
2323
|
},
|
|
2259
2324
|
"privacy": "private",
|
|
2260
2325
|
"default": "''",
|
|
2261
|
-
"description": "The consumer's `--vf-desktop-pattern` override, or `''` for the kit\
|
|
2326
|
+
"description": "The consumer's `--vf-desktop-pattern` override, or `''` for the kit\npattern — which of the two exact-fill paths render() takes (see\nsrc/tile-grid.ts). Re-read every update; a token swapped at runtime\nwithout touching the component wants a `requestUpdate()`."
|
|
2262
2327
|
},
|
|
2263
2328
|
{
|
|
2264
2329
|
"kind": "field",
|
|
2265
|
-
"name": "
|
|
2330
|
+
"name": "_desktopPattern",
|
|
2331
|
+
"type": {
|
|
2332
|
+
"text": "Pattern"
|
|
2333
|
+
},
|
|
2334
|
+
"privacy": "private",
|
|
2335
|
+
"default": "PATTERNS[DEFAULT_PATTERN]",
|
|
2336
|
+
"description": "`pattern`, resolved — the kit path's art; the dither when unset."
|
|
2337
|
+
},
|
|
2338
|
+
{
|
|
2339
|
+
"kind": "field",
|
|
2340
|
+
"name": "#warnedPattern",
|
|
2341
|
+
"privacy": "private",
|
|
2342
|
+
"type": {
|
|
2343
|
+
"text": "boolean"
|
|
2344
|
+
},
|
|
2345
|
+
"default": "false",
|
|
2346
|
+
"description": "One warning per element for an unrecognized `pattern`, not per render."
|
|
2347
|
+
},
|
|
2348
|
+
{
|
|
2349
|
+
"kind": "field",
|
|
2350
|
+
"name": "screen",
|
|
2351
|
+
"type": {
|
|
2352
|
+
"text": "HTMLDivElement"
|
|
2353
|
+
},
|
|
2266
2354
|
"privacy": "private",
|
|
2267
2355
|
"readonly": true,
|
|
2268
|
-
"
|
|
2269
|
-
|
|
2356
|
+
"description": "The screen surface the pattern paints on; exists from the first render."
|
|
2357
|
+
},
|
|
2358
|
+
{
|
|
2359
|
+
"kind": "field",
|
|
2360
|
+
"name": "patternFill",
|
|
2361
|
+
"privacy": "private",
|
|
2362
|
+
"readonly": true,
|
|
2363
|
+
"default": "new PatternFillController(this, { getBox: () => this.screen, getPattern: () => (this._token ? null : this._desktopPattern), getSize: () => ({ width: this.width ?? DEFAULT_SCREEN_WIDTH, height: this.height ?? DEFAULT_SCREEN_HEIGHT, }), })",
|
|
2364
|
+
"description": "The desktop pattern, painted as the screen's own background\n(src/pattern-fill.ts) from the declared raster — scale-independent, so\ndensity and zoom re-encode nothing — and silent while a consumer token\nowns the fill."
|
|
2270
2365
|
},
|
|
2271
2366
|
{
|
|
2272
2367
|
"kind": "field",
|
|
@@ -2278,6 +2373,26 @@
|
|
|
2278
2373
|
"default": "0",
|
|
2279
2374
|
"description": "Monotonic z-index counter for window stacking."
|
|
2280
2375
|
},
|
|
2376
|
+
{
|
|
2377
|
+
"kind": "field",
|
|
2378
|
+
"name": "_activeWindow",
|
|
2379
|
+
"type": {
|
|
2380
|
+
"text": "HTMLElement | null"
|
|
2381
|
+
},
|
|
2382
|
+
"privacy": "private",
|
|
2383
|
+
"default": "null",
|
|
2384
|
+
"description": "The active document-tier window, or null when the tier is deactivated\n(or empty). The single change-tracked truth behind activeWindow\nand the `vf-activate` event — written only by _setActive."
|
|
2385
|
+
},
|
|
2386
|
+
{
|
|
2387
|
+
"kind": "field",
|
|
2388
|
+
"name": "_deactivated",
|
|
2389
|
+
"type": {
|
|
2390
|
+
"text": "boolean"
|
|
2391
|
+
},
|
|
2392
|
+
"privacy": "private",
|
|
2393
|
+
"default": "false",
|
|
2394
|
+
"description": "Whether the document tier was *deliberately* deactivated (a\nclearActive call) — as opposed to `_activeWindow` being null\nbecause nothing has activated yet. Slot changes preserve a deliberate\ndeactivation instead of promoting a survivor; a newly slotted document\nwindow still activates (opening a window brings its application forward)."
|
|
2395
|
+
},
|
|
2281
2396
|
{
|
|
2282
2397
|
"kind": "field",
|
|
2283
2398
|
"name": "_awaitingUpgrade",
|
|
@@ -2353,6 +2468,25 @@
|
|
|
2353
2468
|
],
|
|
2354
2469
|
"description": "Bring a slotted window to the front of its tier. A document-tier window\nalso becomes the single active window (clearing `active` on the other\ndocument windows); a utility window restacks within the floating tier\nand leaves every `active` state alone.\n\nThe light-DOM order of the slotted windows follows (_syncDomOrder):\nvisual stacking and sequential focus order come from independent channels\n(z-index vs DOM position), and letting them drift apart is how a desktop\ntabs front-to-back one way and back-to-front the other, with widgets\nreachable only travelling backwards. Deferred to the end of any in-flight\npointer gesture — moving a node clears the pointer capture a title-bar\ndrag or grow-box resize holds on it, and a background window must stay\ndraggable in the same gesture that raises it."
|
|
2355
2470
|
},
|
|
2471
|
+
{
|
|
2472
|
+
"kind": "field",
|
|
2473
|
+
"name": "activeWindow",
|
|
2474
|
+
"type": {
|
|
2475
|
+
"text": "HTMLElement | null"
|
|
2476
|
+
},
|
|
2477
|
+
"description": "The active document-tier window, or null while the tier is deactivated\n(or has no windows). Utility windows are never the holder.",
|
|
2478
|
+
"readonly": true
|
|
2479
|
+
},
|
|
2480
|
+
{
|
|
2481
|
+
"kind": "method",
|
|
2482
|
+
"name": "clearActive",
|
|
2483
|
+
"return": {
|
|
2484
|
+
"type": {
|
|
2485
|
+
"text": "void"
|
|
2486
|
+
}
|
|
2487
|
+
},
|
|
2488
|
+
"description": "Deactivate the whole document tier — clear `active` from every document\nwindow, leaving none the holder. Pages route \"the user clicked the\nFinder\" presses — on the bare dither, on their own desktop furniture\n(an icon layer) — through here; the deactivated state holds until a\ndocument window is pressed, focused, brought to front, or newly\nslotted."
|
|
2489
|
+
},
|
|
2356
2490
|
{
|
|
2357
2491
|
"kind": "method",
|
|
2358
2492
|
"name": "_restack",
|
|
@@ -2474,11 +2608,11 @@
|
|
|
2474
2608
|
{
|
|
2475
2609
|
"name": "win",
|
|
2476
2610
|
"type": {
|
|
2477
|
-
"text": "HTMLElement"
|
|
2611
|
+
"text": "HTMLElement | null"
|
|
2478
2612
|
}
|
|
2479
2613
|
}
|
|
2480
2614
|
],
|
|
2481
|
-
"description": "Set `active` on `win` only, clearing it on every other *document-tier*\nwindow. Utility
|
|
2615
|
+
"description": "Set `active` on `win` only, clearing it on every other *document-tier*\nwindow (`null` clears the whole tier — the deactivated state). Utility\nwindows stand outside the invariant: a palette keeps whatever `active`\nstate it has (true by default, so its dither and widgets stay drawn\nwhile document windows trade the highlight). The one write site of\n_activeWindow, so `vf-activate` fires exactly on a change of\nholder — re-asserting the current holder is silent."
|
|
2482
2616
|
},
|
|
2483
2617
|
{
|
|
2484
2618
|
"kind": "method",
|
|
@@ -2573,6 +2707,12 @@
|
|
|
2573
2707
|
}
|
|
2574
2708
|
}
|
|
2575
2709
|
],
|
|
2710
|
+
"events": [
|
|
2711
|
+
{
|
|
2712
|
+
"description": "The active document-tier window changed. Detail `{ window: HTMLElement | null }` — the new holder, or `null` when the document tier deactivated (a {@link clearActive} call, or the active window leaving the DOM with none behind it). Fired once per change of holder, never for a re-assertion of the same one.",
|
|
2713
|
+
"name": "vf-activate"
|
|
2714
|
+
}
|
|
2715
|
+
],
|
|
2576
2716
|
"attributes": [
|
|
2577
2717
|
{
|
|
2578
2718
|
"name": "width",
|
|
@@ -2595,6 +2735,15 @@
|
|
|
2595
2735
|
"description": "Width of the black screen bezel, in system px (`0` = none), added onto\nthe declared screen on every side — a `width=\"502\" bezel=\"5\"` desktop\nrenders a 512-system-px host box. The compact Mac's CRT showed an\nunlit black margin between the desktop's raster and the case; `bezel`\ndraws it around the screen and puts the classic screen-corner mask on\nthe screen's two *top* corners — only the top pair was rounded in the\nframebuffer. Flow, window coordinates and the drag clip all belong to\nthe screen, so windows crop at its edge. Inside a bezeled desktop a\nmenu bar needs no `rounded` of its own — the desktop's mask lands on\nthe same pixels.",
|
|
2596
2736
|
"fieldName": "bezel"
|
|
2597
2737
|
},
|
|
2738
|
+
{
|
|
2739
|
+
"name": "pattern",
|
|
2740
|
+
"type": {
|
|
2741
|
+
"text": "string | null | undefined"
|
|
2742
|
+
},
|
|
2743
|
+
"default": "DEFAULT_PATTERN",
|
|
2744
|
+
"description": "The desktop pattern — System 7's General Controls setting. A library\npattern by name (`gray-50`, the classic dither, by default; `gray-75`,\n`bricks`, … — docs/PATTERNS.md) or sixteen hex digits stating a custom\n8×8 pattern, as on `vf-container`. Painted black on opaque white over\nthe whole screen, 1-bit at every density and zoom. A\n`--vf-desktop-pattern` token override still wins and renders the\nconsumer's tile as a placed grid; an unrecognized value warns once and\nkeeps the dither.",
|
|
2745
|
+
"fieldName": "pattern"
|
|
2746
|
+
},
|
|
2598
2747
|
{
|
|
2599
2748
|
"name": "top",
|
|
2600
2749
|
"type": {
|
|
@@ -2659,7 +2808,7 @@
|
|
|
2659
2808
|
"declarations": [
|
|
2660
2809
|
{
|
|
2661
2810
|
"kind": "class",
|
|
2662
|
-
"description": "`<vf-dialog>` — the System 7 modal dialog shell.\n\nTwo chromes, one modal lifecycle (native `<dialog>` for top-layer rendering\nand focus trapping, with a fully transparent backdrop — no dimming):\n\n- **Default:**
|
|
2811
|
+
"description": "`<vf-dialog>` — the System 7 modal dialog shell.\n\nTwo chromes, one modal lifecycle (native `<dialog>` for top-layer rendering\nand focus trapping, with a fully transparent backdrop — no dimming). Both\nare the same dBoxProc double frame — 1px outer rule, 2px gap, 2px inner\nband, no shadow (vfModalFrame):\n\n- **Default:** the movable modal (movableDBoxProc) — the striped title bar\n set into the top of that frame, with a centered title over a white body.\n Drag the title bar to move it. `closable` adds the standard close box\n (left of the bar) — the HIG's own figures disagree on whether a movable\n modal carries one (Figure 5-1 says yes, Figure 6-1 and the Chapter 6 text\n say no), so the component enables either reading rather than enforcing\n one.\n- **`frame=\"plain\"`:** the modal dialog box — the bare frame, no title bar —\n and immovable, like the original. A `heading` renders as a centered\n display-face heading at the top of the body (the reference art's \"Dialog\n title\"); `closable` is ignored, there being no bar to carry the widget.\n\nOpen it with `show()` (or set the `open` attribute/property); close with\n`close()`. Escape closes it and fires `vf-close` with\n`{ reason: 'escape' }`; the close box and programmatic closing fire\n`{ reason: 'close' }`.",
|
|
2663
2812
|
"name": "VfDialog",
|
|
2664
2813
|
"cssProperties": [
|
|
2665
2814
|
{
|
|
@@ -2681,7 +2830,7 @@
|
|
|
2681
2830
|
],
|
|
2682
2831
|
"cssParts": [
|
|
2683
2832
|
{
|
|
2684
|
-
"description": "The outer
|
|
2833
|
+
"description": "The outer frame (the double frame's 1px rule; the bar and the inner band sit inside it).",
|
|
2685
2834
|
"name": "frame"
|
|
2686
2835
|
},
|
|
2687
2836
|
{
|
|
@@ -2777,7 +2926,7 @@
|
|
|
2777
2926
|
"type": {
|
|
2778
2927
|
"text": "'plain' | undefined"
|
|
2779
2928
|
},
|
|
2780
|
-
"description": "Frame chrome. Omit for the
|
|
2929
|
+
"description": "Frame chrome. Omit for the movable modal (the double frame with the\nstriped title bar set into it); `'plain'` for the immovable modal dialog\nbox (the bare double frame, no bar).",
|
|
2781
2930
|
"attribute": "frame",
|
|
2782
2931
|
"reflects": true
|
|
2783
2932
|
},
|
|
@@ -3332,7 +3481,7 @@
|
|
|
3332
3481
|
"type": {
|
|
3333
3482
|
"text": "'plain' | undefined"
|
|
3334
3483
|
},
|
|
3335
|
-
"description": "Frame chrome. Omit for the
|
|
3484
|
+
"description": "Frame chrome. Omit for the movable modal (the double frame with the\nstriped title bar set into it); `'plain'` for the immovable modal dialog\nbox (the bare double frame, no bar).",
|
|
3336
3485
|
"fieldName": "frame"
|
|
3337
3486
|
},
|
|
3338
3487
|
{
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import n from "../
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
1
|
+
import { deferActivation as e } from "../events.js";
|
|
2
|
+
import { vfElement as t } from "../define.js";
|
|
3
|
+
import { ScaleController as n } from "../scale.js";
|
|
4
|
+
import r from "../_virtual/_@oxc-project_runtime@0.143.0/helpers/esm/decorate.js";
|
|
5
|
+
import { VfPositioned as i } from "../position.js";
|
|
6
|
+
import { vfDisplay as a } from "../styles/recipes/display-face.js";
|
|
7
|
+
import { vfBase as o } from "../styles/recipes/host.js";
|
|
8
|
+
import { vfFocusUnderline as s } from "../styles/recipes/focus.js";
|
|
9
|
+
import { GridSnapController as c } from "../grid-snap.js";
|
|
10
|
+
import { BUTTON_FACE as l, BUTTON_FRAME as u, RING_FRAME as d, RING_HOLE as f, steppedRectClip as p, steppedRingClip as m } from "../pixel-frame.js";
|
|
11
11
|
import { VfShadowRoleControl as h } from "../form-control.js";
|
|
12
12
|
import { css as g, html as _, nothing as v, unsafeCSS as y } from "lit";
|
|
13
13
|
import { property as b, query as x } from "lit/decorators.js";
|
|
14
14
|
//#region src/components/vf-button.ts
|
|
15
|
-
var S = "vf-submitter", C = class extends
|
|
16
|
-
constructor(...
|
|
17
|
-
super(...
|
|
18
|
-
this.isDisabled || this.#e || this.resolvedType !== "button" &&
|
|
15
|
+
var S = "vf-submitter", C = class extends i(h) {
|
|
16
|
+
constructor(...t) {
|
|
17
|
+
super(...t), this.type = "button", this.name = "", this.value = "", this.formAction = "", this.formEnctype = "", this.formMethod = "", this.formNoValidate = !1, this.formTarget = "", this.scale = new n(this), this.gridSnap = new c(this), this.#e = !1, this.handleClick = (t) => {
|
|
18
|
+
this.isDisabled || this.#e || this.resolvedType !== "button" && e(this, t, () => this.activate());
|
|
19
19
|
};
|
|
20
20
|
}
|
|
21
21
|
static {
|
|
@@ -26,8 +26,8 @@ var S = "vf-submitter", C = class extends r(h) {
|
|
|
26
26
|
}
|
|
27
27
|
static {
|
|
28
28
|
this.styles = [
|
|
29
|
+
o,
|
|
29
30
|
a,
|
|
30
|
-
i,
|
|
31
31
|
g`
|
|
32
32
|
:host {
|
|
33
33
|
display: inline-flex;
|
|
@@ -61,7 +61,7 @@ var S = "vf-submitter", C = class extends r(h) {
|
|
|
61
61
|
bottom: calc(var(--vf-scale, 1) * -${4}px - var(--vf-snap-dy, 0px));
|
|
62
62
|
right: calc(var(--vf-scale, 1) * -${4}px - var(--vf-snap-dx, 0px));
|
|
63
63
|
background: var(--vf-black, #000);
|
|
64
|
-
clip-path: ${y(
|
|
64
|
+
clip-path: ${y(m(d, f))};
|
|
65
65
|
pointer-events: none;
|
|
66
66
|
}
|
|
67
67
|
/* Disabled default: the fat outer ring dims to gray; the inner button
|
|
@@ -131,12 +131,12 @@ var S = "vf-submitter", C = class extends r(h) {
|
|
|
131
131
|
}
|
|
132
132
|
button::before {
|
|
133
133
|
background: var(--vf-black, #000);
|
|
134
|
-
clip-path: ${y(
|
|
134
|
+
clip-path: ${y(p(u))};
|
|
135
135
|
}
|
|
136
136
|
/* Face: white fill inset one pixel, with its own traced corner steps. */
|
|
137
137
|
button::after {
|
|
138
138
|
background: var(--vf-white, #fff);
|
|
139
|
-
clip-path: ${y(
|
|
139
|
+
clip-path: ${y(p(l))};
|
|
140
140
|
}
|
|
141
141
|
/* Pressed: instant white-on-black inversion. */
|
|
142
142
|
button:active:not(:disabled) {
|
|
@@ -167,7 +167,7 @@ var S = "vf-submitter", C = class extends r(h) {
|
|
|
167
167
|
outline: none;
|
|
168
168
|
}
|
|
169
169
|
button:focus-visible .label::after {
|
|
170
|
-
${
|
|
170
|
+
${s}
|
|
171
171
|
}
|
|
172
172
|
/* Disabled: only the label dims to gray; the solid black border stays. */
|
|
173
173
|
button:disabled {
|
|
@@ -213,22 +213,22 @@ var S = "vf-submitter", C = class extends r(h) {
|
|
|
213
213
|
}
|
|
214
214
|
}
|
|
215
215
|
};
|
|
216
|
-
|
|
216
|
+
r([b({ reflect: !0 })], C.prototype, "variant", void 0), r([b({ reflect: !0 })], C.prototype, "type", void 0), r([b({ reflect: !0 })], C.prototype, "name", void 0), r([b({ reflect: !0 })], C.prototype, "value", void 0), r([b({
|
|
217
217
|
attribute: "formaction",
|
|
218
218
|
reflect: !0
|
|
219
|
-
})], C.prototype, "formAction", void 0),
|
|
219
|
+
})], C.prototype, "formAction", void 0), r([b({
|
|
220
220
|
attribute: "formenctype",
|
|
221
221
|
reflect: !0
|
|
222
|
-
})], C.prototype, "formEnctype", void 0),
|
|
222
|
+
})], C.prototype, "formEnctype", void 0), r([b({
|
|
223
223
|
attribute: "formmethod",
|
|
224
224
|
reflect: !0
|
|
225
|
-
})], C.prototype, "formMethod", void 0),
|
|
225
|
+
})], C.prototype, "formMethod", void 0), r([b({
|
|
226
226
|
type: Boolean,
|
|
227
227
|
attribute: "formnovalidate",
|
|
228
228
|
reflect: !0
|
|
229
|
-
})], C.prototype, "formNoValidate", void 0),
|
|
229
|
+
})], C.prototype, "formNoValidate", void 0), r([b({
|
|
230
230
|
attribute: "formtarget",
|
|
231
231
|
reflect: !0
|
|
232
|
-
})], C.prototype, "formTarget", void 0),
|
|
232
|
+
})], C.prototype, "formTarget", void 0), r([x("button")], C.prototype, "buttonEl", void 0), C = r([t("vf-button")], C);
|
|
233
233
|
//#endregion
|
|
234
234
|
export { C as VfButton };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
1
|
+
import { emit as e, emitNative as t } from "../events.js";
|
|
2
|
+
import { vfElement as n } from "../define.js";
|
|
3
|
+
import r from "../_virtual/_@oxc-project_runtime@0.143.0/helpers/esm/decorate.js";
|
|
4
|
+
import { VfPositioned as i } from "../position.js";
|
|
5
|
+
import { vfDisplay as a } from "../styles/recipes/display-face.js";
|
|
6
|
+
import { vfBase as o } from "../styles/recipes/host.js";
|
|
7
|
+
import { vfFocusUnderline as s } from "../styles/recipes/focus.js";
|
|
8
|
+
import { vfToggle as c } from "../styles/recipes/toggle.js";
|
|
9
9
|
import { CHECKBOX_X as l, glyphSvg as u } from "../glyphs.js";
|
|
10
10
|
import { VfFormControl as d } from "../form-control.js";
|
|
11
11
|
import { VfToggleControl as f } from "../toggle-control.js";
|
|
@@ -13,12 +13,12 @@ import { css as p, html as m } from "lit";
|
|
|
13
13
|
import { property as h, state as g } from "lit/decorators.js";
|
|
14
14
|
import { classMap as _ } from "lit/directives/class-map.js";
|
|
15
15
|
//#region src/components/vf-checkbox.ts
|
|
16
|
-
var v = class extends
|
|
16
|
+
var v = class extends i(f(d)) {
|
|
17
17
|
static {
|
|
18
18
|
this.styles = [
|
|
19
|
-
i,
|
|
20
|
-
r,
|
|
21
19
|
o,
|
|
20
|
+
a,
|
|
21
|
+
c,
|
|
22
22
|
p`
|
|
23
23
|
/* Keyboard focus underlines the box itself — not the label, and not a
|
|
24
24
|
ring around either (see vfFocusUnderline). Both adjustments below are
|
|
@@ -28,7 +28,7 @@ var v = class extends n(f(d)) {
|
|
|
28
28
|
blank row and the rule itself: −(1 + 1 + 1). */
|
|
29
29
|
:host(:focus-visible) .box::after {
|
|
30
30
|
--vf-focus-underline-offset: -3px;
|
|
31
|
-
${
|
|
31
|
+
${s}
|
|
32
32
|
left: calc(var(--vf-scale, 1) * -1px);
|
|
33
33
|
right: calc(var(--vf-scale, 1) * -1px);
|
|
34
34
|
}
|
|
@@ -132,12 +132,12 @@ var v = class extends n(f(d)) {
|
|
|
132
132
|
this.checked = !0;
|
|
133
133
|
}
|
|
134
134
|
activate() {
|
|
135
|
-
this.checked = !this.checked, this.focus(),
|
|
135
|
+
this.checked = !this.checked, this.focus(), e(this, "vf-change", { checked: this.checked }), t(this, "input"), t(this, "change");
|
|
136
136
|
}
|
|
137
137
|
};
|
|
138
|
-
|
|
138
|
+
r([h({
|
|
139
139
|
type: Boolean,
|
|
140
140
|
reflect: !0
|
|
141
|
-
})], v.prototype, "checked", void 0),
|
|
141
|
+
})], v.prototype, "checked", void 0), r([h({ reflect: !0 })], v.prototype, "name", void 0), r([h()], v.prototype, "value", void 0), r([g()], v.prototype, "_hasLabel", void 0), v = r([n("vf-checkbox")], v);
|
|
142
142
|
//#endregion
|
|
143
143
|
export { v as VfCheckbox };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LitElement } from 'lit';
|
|
1
|
+
import { LitElement, type PropertyValues } from 'lit';
|
|
2
2
|
declare const VfContainer_base: (new (...args: any[]) => import("../size.js").VfSizedInterface) & (new (...args: any[]) => import("../position.js").VfPositionedInterface) & typeof LitElement;
|
|
3
3
|
/**
|
|
4
4
|
* `<vf-container>` — a box that is nothing but its declared size.
|
|
@@ -41,8 +41,20 @@ declare const VfContainer_base: (new (...args: any[]) => import("../size.js").Vf
|
|
|
41
41
|
* width, because a layout box that silently claimed a size nobody declared
|
|
42
42
|
* would be inventing one (the `vf-stack` rule, held here too).
|
|
43
43
|
*
|
|
44
|
-
* **It paints nothing and means nothing
|
|
45
|
-
* keyboard behavior or selection
|
|
44
|
+
* **It paints nothing and means nothing** — unless `pattern` says what to
|
|
45
|
+
* paint. No border, role, keyboard behavior or selection; what it holds
|
|
46
|
+
* decides what it is.
|
|
47
|
+
*
|
|
48
|
+
* **`pattern` fills the box with a 1-bit pattern**: one of the 38 standard
|
|
49
|
+
* MacPaint patterns by name (`pattern="bricks"`, `pattern="gray-50"` —
|
|
50
|
+
* docs/PATTERNS.md has the table), or sixteen hex digits stating a custom
|
|
51
|
+
* 8×8 pattern row by row, the way a PAT resource did. It is painted as the
|
|
52
|
+
* box's own background — black ink on a `--vf-white` ground, anchored at
|
|
53
|
+
* the box's top-left corner, under the content — by the same whole-surface
|
|
54
|
+
* raster mechanism as the desktop dither, so it is 1-bit at every density
|
|
55
|
+
* and zoom (src/pattern-fill.ts). A declared `width`/`height` sizes the
|
|
56
|
+
* raster exactly; an undeclared axis (`fill-width`, a shrink-wrapped
|
|
57
|
+
* height) is measured. Under forced colors the pattern goes flat Canvas.
|
|
46
58
|
*
|
|
47
59
|
* **It holds its box on the device-pixel grid** — with a `GridSnapController`.
|
|
48
60
|
* A container's box is itself the consumer's coordinate system, including for
|
|
@@ -71,7 +83,22 @@ declare const VfContainer_base: (new (...args: any[]) => import("../size.js").Vf
|
|
|
71
83
|
* fills it to the declared box.
|
|
72
84
|
*/
|
|
73
85
|
export declare class VfContainer extends VfContainer_base {
|
|
86
|
+
#private;
|
|
74
87
|
static styles: import("lit").CSSResult[];
|
|
88
|
+
/**
|
|
89
|
+
* A 1-bit fill for the box: a library pattern by name (`bricks`,
|
|
90
|
+
* `gray-50`, … — the 38 standard MacPaint patterns, docs/PATTERNS.md) or
|
|
91
|
+
* sixteen hex digits stating a custom 8×8 pattern row by row, bit 7 the
|
|
92
|
+
* leftmost pixel, 1 = ink (`"DD 77 DD 77 DD 77 DD 77"`). Painted in black
|
|
93
|
+
* on a `--vf-white` ground under the content, anchored at the box's
|
|
94
|
+
* top-left. Unset, the container paints nothing; an unrecognized value
|
|
95
|
+
* paints nothing and warns once.
|
|
96
|
+
*/
|
|
97
|
+
pattern?: string | null;
|
|
98
|
+
/** `pattern`, resolved — what the fill paints; null paints nothing. */
|
|
99
|
+
private _pattern;
|
|
100
|
+
/** The shadow box the fill paints on; exists from the first render. */
|
|
101
|
+
private readonly box;
|
|
75
102
|
/**
|
|
76
103
|
* Default-on display scaling (true 72dpi size); see src/scale.ts. Without
|
|
77
104
|
* one, a lone container on a plain page would resolve its declared size
|
|
@@ -85,6 +112,13 @@ export declare class VfContainer extends VfContainer_base {
|
|
|
85
112
|
* correction lands.
|
|
86
113
|
*/
|
|
87
114
|
private readonly gridSnap;
|
|
115
|
+
/**
|
|
116
|
+
* The pattern fill, painted on `.box` so it rides the snap correction with
|
|
117
|
+
* the coordinate system. A declared axis sizes the raster exactly; an
|
|
118
|
+
* undeclared one is measured (src/pattern-fill.ts).
|
|
119
|
+
*/
|
|
120
|
+
private readonly patternFill;
|
|
121
|
+
protected willUpdate(changed: PropertyValues<this>): void;
|
|
88
122
|
protected render(): import("lit-html").TemplateResult<1>;
|
|
89
123
|
}
|
|
90
124
|
declare global {
|