vintage-frames 0.1.0 → 0.2.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/README.md +12 -233
- package/custom-elements.json +290 -38
- package/dist/components/vf-button.d.ts +1 -1
- package/dist/components/vf-container.d.ts +2 -2
- package/dist/components/vf-desktop.d.ts +1 -1
- package/dist/components/vf-fieldset.d.ts +1 -1
- package/dist/components/vf-fieldset.js +6 -1
- package/dist/components/vf-grid.d.ts +1 -1
- package/dist/components/vf-icon.d.ts +1 -1
- package/dist/components/vf-img.d.ts +1 -1
- package/dist/components/vf-label.d.ts +1 -1
- package/dist/components/vf-list-item.d.ts +9 -1
- package/dist/components/vf-list-item.js +15 -14
- package/dist/components/vf-list.d.ts +1 -1
- package/dist/components/vf-menu-bar.d.ts +1 -1
- package/dist/components/vf-menu-item.d.ts +10 -1
- package/dist/components/vf-menu-item.js +35 -34
- package/dist/components/vf-menu.d.ts +11 -2
- package/dist/components/vf-menu.js +33 -32
- package/dist/components/vf-option.d.ts +11 -1
- package/dist/components/vf-option.js +16 -15
- package/dist/components/vf-paragraph.d.ts +3 -3
- package/dist/components/vf-progress-bar.d.ts +1 -1
- package/dist/components/vf-scroll-area.d.ts +1 -1
- package/dist/components/vf-select.d.ts +1 -1
- package/dist/components/vf-separator.d.ts +1 -1
- package/dist/components/vf-slider.d.ts +1 -1
- package/dist/components/vf-stack.d.ts +27 -9
- package/dist/components/vf-stack.js +30 -8
- package/dist/components/vf-swatch.d.ts +1 -1
- package/dist/components/vf-window.d.ts +1 -1
- package/dist/cross-center.d.ts +76 -0
- package/dist/cross-center.js +69 -0
- package/dist/define.d.ts +2 -2
- package/dist/define.js +1 -1
- package/dist/grid-snap.d.ts +2 -24
- package/dist/grid-snap.js +7 -33
- package/dist/index.d.ts +5 -5
- package/dist/index.js +50 -50
- package/dist/position.d.ts +11 -2
- package/dist/styles/recipes/host.js +14 -1
- package/dist/styles/recipes/toggle.js +16 -0
- package/dist/text-control.d.ts +1 -1
- package/docs/SPEC.md +287 -2249
- package/editor/vscode.html-custom-data.json +48 -8
- package/editor/web-types.json +92 -12
- package/package.json +2 -4
package/dist/index.js
CHANGED
|
@@ -19,53 +19,53 @@ import { vfToggle as te } from "./styles/recipes/toggle.js";
|
|
|
19
19
|
import { vfField as ne } from "./styles/recipes/field.js";
|
|
20
20
|
import { vfScrollRail as re } from "./styles/recipes/scroll-rail.js";
|
|
21
21
|
import { TileRasterCache as ie, patternOverride as ae, tileGrid as oe, vfTileGrid as se } from "./tile-grid.js";
|
|
22
|
-
import { GridSnapController as ce,
|
|
23
|
-
import { DocumentListenersController as
|
|
24
|
-
import { BUTTON_FACE as
|
|
25
|
-
import { VfDesktop as
|
|
26
|
-
import { VfSized as
|
|
27
|
-
import { DragController as
|
|
28
|
-
import { emit as
|
|
29
|
-
import { ScrollStateController as
|
|
30
|
-
import { BLINK_FLIPS as
|
|
31
|
-
import { CARET_DOWN as
|
|
32
|
-
import { ScrollRailController as
|
|
33
|
-
import { VfScrollArea as
|
|
34
|
-
import { VfWindow as
|
|
35
|
-
import { VfModalDialog as
|
|
36
|
-
import { VfButtonGroup as
|
|
37
|
-
import { VfDialog as
|
|
38
|
-
import { VfSeparator as
|
|
39
|
-
import { VfFormControl as
|
|
40
|
-
import { VfButton as
|
|
41
|
-
import { VfSwatch as
|
|
42
|
-
import { VfToggleControl as
|
|
43
|
-
import { VfCheckbox as
|
|
44
|
-
import { VfRadio as
|
|
45
|
-
import { VfRadioGroup as
|
|
46
|
-
import { FocusRuleController as
|
|
47
|
-
import { VfTextControlBase as
|
|
48
|
-
import { VfTextField as
|
|
49
|
-
import { VfTextArea as
|
|
50
|
-
import { VfNumberField as
|
|
51
|
-
import { VfOption as
|
|
52
|
-
import { VfSelect as
|
|
53
|
-
import { TrackWidthController as
|
|
54
|
-
import { VfProgressBar as
|
|
55
|
-
import { VfSlider as
|
|
56
|
-
import { VfLabel as
|
|
57
|
-
import { VfParagraph as
|
|
58
|
-
import { VfImg as
|
|
59
|
-
import { VfIcon as
|
|
60
|
-
import { VfMenuBar as
|
|
61
|
-
import { VfMenu as
|
|
62
|
-
import { VfMenuItem as
|
|
63
|
-
import { VfList as
|
|
64
|
-
import { VfListItem as
|
|
65
|
-
import { VfFieldset as
|
|
66
|
-
import { VfGrid as
|
|
67
|
-
import { VfStack as
|
|
68
|
-
import { VfContainer as
|
|
69
|
-
import { CURSOR_ARROW as
|
|
70
|
-
import { applyCursor as
|
|
71
|
-
export {
|
|
22
|
+
import { GridSnapController as ce, requestGridSnap as le } from "./grid-snap.js";
|
|
23
|
+
import { DocumentListenersController as ue } from "./document-listeners.js";
|
|
24
|
+
import { BUTTON_FACE as de, BUTTON_FRAME as fe, RING_FRAME as pe, RING_HOLE as me, RING_INSET as he, SCREEN_CORNER as ge, steppedCornerClip as _e, steppedRectClip as ve, steppedRingClip as ye } from "./pixel-frame.js";
|
|
25
|
+
import { VfDesktop as be } from "./components/vf-desktop.js";
|
|
26
|
+
import { VfSized as xe } from "./size.js";
|
|
27
|
+
import { DragController as Se } from "./drag.js";
|
|
28
|
+
import { emit as Ce } from "./events.js";
|
|
29
|
+
import { ScrollStateController as we } from "./scroll-state.js";
|
|
30
|
+
import { BLINK_FLIPS as Te, BLINK_INTERVAL_MS as Ee, PRESS_HOLD_MS as De, RENAME_DELAY_MS as Oe, prefersReducedMotion as ke, runSelectionBlink as Ae } from "./motion.js";
|
|
31
|
+
import { CARET_DOWN as je, CHECKBOX_X as Me, CHECKMARK as Ne, RADIO_DOT as Pe, RADIO_FACE as Fe, RADIO_RING as Ie, RADIO_RING_PRESSED as Le, SLIDER_THUMB as Re, SLIDER_THUMB_FACE as ze, STEPPER as Be, STEPPER_DOWN_FILL as Ve, STEPPER_UP_FILL as He, glyphSvg as Ue } from "./glyphs.js";
|
|
32
|
+
import { ScrollRailController as We, renderScrollRail as Ge } from "./scroll-rail.js";
|
|
33
|
+
import { VfScrollArea as Ke } from "./components/vf-scroll-area.js";
|
|
34
|
+
import { VfWindow as qe } from "./components/vf-window.js";
|
|
35
|
+
import { VfModalDialog as Je, modalDialogStyles as Ye } from "./modal-dialog.js";
|
|
36
|
+
import { VfButtonGroup as Xe } from "./components/vf-button-group.js";
|
|
37
|
+
import { VfDialog as Ze } from "./components/vf-dialog.js";
|
|
38
|
+
import { VfSeparator as Qe } from "./components/vf-separator.js";
|
|
39
|
+
import { VfFormControl as $e } from "./form-control.js";
|
|
40
|
+
import { VfButton as et } from "./components/vf-button.js";
|
|
41
|
+
import { VfSwatch as tt } from "./components/vf-swatch.js";
|
|
42
|
+
import { VfToggleControl as nt } from "./toggle-control.js";
|
|
43
|
+
import { VfCheckbox as rt } from "./components/vf-checkbox.js";
|
|
44
|
+
import { VfRadio as it } from "./components/vf-radio.js";
|
|
45
|
+
import { VfRadioGroup as at } from "./components/vf-radio-group.js";
|
|
46
|
+
import { FocusRuleController as ot, focusModality as st, trackFocusModality as ct } from "./focus-modality.js";
|
|
47
|
+
import { VfTextControlBase as lt } from "./text-control.js";
|
|
48
|
+
import { VfTextField as ut } from "./components/vf-text-field.js";
|
|
49
|
+
import { VfTextArea as dt } from "./components/vf-text-area.js";
|
|
50
|
+
import { VfNumberField as ft } from "./components/vf-number-field.js";
|
|
51
|
+
import { VfOption as pt } from "./components/vf-option.js";
|
|
52
|
+
import { VfSelect as mt } from "./components/vf-select.js";
|
|
53
|
+
import { TrackWidthController as ht } from "./track-width.js";
|
|
54
|
+
import { VfProgressBar as gt } from "./components/vf-progress-bar.js";
|
|
55
|
+
import { VfSlider as _t } from "./components/vf-slider.js";
|
|
56
|
+
import { VfLabel as vt } from "./components/vf-label.js";
|
|
57
|
+
import { VfParagraph as yt } from "./components/vf-paragraph.js";
|
|
58
|
+
import { VfImg as bt } from "./components/vf-img.js";
|
|
59
|
+
import { VfIcon as xt } from "./components/vf-icon.js";
|
|
60
|
+
import { VfMenuBar as St } from "./components/vf-menu-bar.js";
|
|
61
|
+
import { VfMenu as Ct } from "./components/vf-menu.js";
|
|
62
|
+
import { VfMenuItem as wt } from "./components/vf-menu-item.js";
|
|
63
|
+
import { VfList as Tt } from "./components/vf-list.js";
|
|
64
|
+
import { VfListItem as Et } from "./components/vf-list-item.js";
|
|
65
|
+
import { VfFieldset as Dt } from "./components/vf-fieldset.js";
|
|
66
|
+
import { VfGrid as Ot } from "./components/vf-grid.js";
|
|
67
|
+
import { VfStack as kt } from "./components/vf-stack.js";
|
|
68
|
+
import { VfContainer as At } from "./components/vf-container.js";
|
|
69
|
+
import { CURSOR_ARROW as jt, CURSOR_CROSSHAIR as Mt, CURSOR_I_BEAM as Nt, CURSOR_WAIT as Pt } from "./cursor-art.js";
|
|
70
|
+
import { applyCursor as Ft } from "./cursor.js";
|
|
71
|
+
export { Te as BLINK_FLIPS, Ee as BLINK_INTERVAL_MS, de as BUTTON_FACE, fe as BUTTON_FRAME, je as CARET_DOWN, Me as CHECKBOX_X, Ne as CHECKMARK, n as CLASSIC_DPI, r as CSS_REFERENCE_DPI, jt as CURSOR_ARROW, Mt as CURSOR_CROSSHAIR, Nt as CURSOR_I_BEAM, Pt as CURSOR_WAIT, ue as DocumentListenersController, Se as DragController, ot as FocusRuleController, ce as GridSnapController, E as PIXEL_GRID_METRICS, De as PRESS_HOLD_MS, w as PlacementController, Pe as RADIO_DOT, Fe as RADIO_FACE, Ie as RADIO_RING, Le as RADIO_RING_PRESSED, Oe as RENAME_DELAY_MS, pe as RING_FRAME, me as RING_HOLE, he as RING_INSET, ge as SCREEN_CORNER, Re as SLIDER_THUMB, ze as SLIDER_THUMB_FACE, Be as STEPPER, Ve as STEPPER_DOWN_FILL, He as STEPPER_UP_FILL, i as SYSTEM_PX_IN_CSS_PX, u as ScaleController, We as ScrollRailController, we as ScrollStateController, L as TILE_LATTICE, ie as TileRasterCache, ht as TrackWidthController, O as VF_BODY_FAMILY, j as VF_DISPLAY_FAMILY, et as VfButton, Xe as VfButtonGroup, rt as VfCheckbox, At as VfContainer, be as VfDesktop, Ze as VfDialog, Dt as VfFieldset, $e as VfFormControl, Ot as VfGrid, xt as VfIcon, bt as VfImg, vt as VfLabel, Tt as VfList, Et as VfListItem, Ct as VfMenu, St as VfMenuBar, wt as VfMenuItem, Je as VfModalDialog, ft as VfNumberField, pt as VfOption, yt as VfParagraph, T as VfPositioned, gt as VfProgressBar, it as VfRadio, at as VfRadioGroup, Ke as VfScrollArea, mt as VfSelect, Qe as VfSeparator, xe as VfSized, _t as VfSlider, kt as VfStack, tt as VfSwatch, dt as VfTextArea, lt as VfTextControlBase, ut as VfTextField, nt as VfToggleControl, qe as VfWindow, Ft as applyCursor, d as applyScale, e as defineElement, a as devicePxPerSystemPx, f as effectiveScale, Ce as emit, st as focusModality, p as getScale, o as getZoom, Ue as glyphSvg, Ye as modalDialogStyles, m as onScaleChange, s as onZoomChange, ae as patternOverride, ke as prefersReducedMotion, k as registerBodyFace, M as registerDisplayFace, D as registerEmbeddedFont, Ge as renderScrollRail, le as requestGridSnap, c as resetZoomBaseline, Ae as runSelectionBlink, h as snapSys, g as snapToDevicePx, _ as snapToSystemPx, _e as steppedCornerClip, ve as steppedRectClip, ye as steppedRingClip, v as sys, y as sysLength, b as sysLengths, x as systemPxQuantum, oe as tileGrid, R as tileImage, z as tileRaster, B as tileRects, V as tileSpan, S as toSys, C as toSysExact, ct as trackFocusModality, l as truePixelRatio, F as vfBase, A as vfBodyDecls, q as vfChromeFrame, N as vfDisplay, P as vfDisplayDecls, W as vfDots, t as vfElement, ne as vfField, Q as vfFocus, $ as vfFocusRing, ee as vfFocusUnderline, K as vfHardShadowDecls, J as vfModalFrame, Y as vfPanel, re as vfScrollRail, I as vfStaticText, G as vfStripes, se as vfTileGrid, H as vfTileMaskSize, U as vfTileSize, X as vfTitleBar, te as vfToggle, Z as vfWindowWidgets };
|
package/dist/position.d.ts
CHANGED
|
@@ -11,8 +11,17 @@ export declare abstract class VfPositionedInterface extends LitElement {
|
|
|
11
11
|
left?: number | null;
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
|
-
* Explicit placement — `top`/`left` in whole system px, on
|
|
15
|
-
*
|
|
14
|
+
* Explicit placement — `top`/`left` in whole system px, on **every** component.
|
|
15
|
+
*
|
|
16
|
+
* No exceptions, deliberately. These are web components, and a consumer may put
|
|
17
|
+
* one wherever they like; the kit does not get to decide that a `vf-option` is
|
|
18
|
+
* only ever a popup row. The rows a container normally owns (`vf-option`,
|
|
19
|
+
* `vf-menu-item`, `vf-list-item`) and a bar's `vf-menu` take the pair on the
|
|
20
|
+
* same terms as anything else — and stating an origin on one *inside* its
|
|
21
|
+
* managing parent does take it out of that parent's flow layout, which is the
|
|
22
|
+
* placement working, not failing. Each of those components documents what its
|
|
23
|
+
* container stops doing for it. `vf-dialog` takes the pair in viewport
|
|
24
|
+
* coordinates, the one difference the platform forces (see modal-dialog.ts).
|
|
16
25
|
*
|
|
17
26
|
* A DITL resource laid a dialog out as a list of items, each with a rectangle
|
|
18
27
|
* in the window's own coordinates; arranging controls by stating where they go
|
|
@@ -51,7 +51,20 @@ var n = t`
|
|
|
51
51
|
painted element(s). Absolutely positioned satellites that anchor to the
|
|
52
52
|
host (vf-menu's panel, the default button's ring) compose the same
|
|
53
53
|
variables into their own insets instead. Controller-owned — never set the
|
|
54
|
-
variables by hand.
|
|
54
|
+
variables by hand.
|
|
55
|
+
|
|
56
|
+
The reset below makes the two properties per-host: custom properties
|
|
57
|
+
inherit, so without it a host needing no correction of its own would
|
|
58
|
+
resolve an ancestor component's values here and its paint would leave the
|
|
59
|
+
grid by exactly that amount — invisibly, since the controller measures
|
|
60
|
+
the host box, which never moves. (Measured: a placed vf-button on a
|
|
61
|
+
corrected vf-desktop painted at the desktop's -0.39px offset.) The
|
|
62
|
+
controller's writes land on the host's inline style, which wins over
|
|
63
|
+
this rule. */
|
|
64
|
+
:host {
|
|
65
|
+
--vf-snap-dx: 0px;
|
|
66
|
+
--vf-snap-dy: 0px;
|
|
67
|
+
}
|
|
55
68
|
.vf-snap {
|
|
56
69
|
position: relative;
|
|
57
70
|
left: var(--vf-snap-dx, 0px);
|
|
@@ -7,6 +7,22 @@ var t = e`
|
|
|
7
7
|
gap: calc(var(--vf-scale, 1) * 6px);
|
|
8
8
|
cursor: var(--vf-cursor, default);
|
|
9
9
|
}
|
|
10
|
+
/* The well PAINTS 3 system px below the row top. Centering the 13px well
|
|
11
|
+
in the 20px row is the layout — kept, because the host's height and its
|
|
12
|
+
exported baseline are consumer-visible (moving them off the well's
|
|
13
|
+
centered bottom reflowed every line holding a toggle) — but centering
|
|
14
|
+
lands on 3.5, an exact tie, half a system px off the pixel grid at every
|
|
15
|
+
density where 3.5 system px isn't whole device px. So the paint steps
|
|
16
|
+
back half a pixel through the same relative "top" the grid-snap
|
|
17
|
+
correction rides (this rule overrides vfBase's .vf-snap, so it must
|
|
18
|
+
compose the variable), landing the ink on row 3: ties resolve toward the
|
|
19
|
+
start, as QuickDraw's "div 2" did — the title-bar and vf-stack
|
|
20
|
+
convention. The half-pixel gap between layout box and painted box is the
|
|
21
|
+
documented snap idiom, not a fault. */
|
|
22
|
+
.box,
|
|
23
|
+
.circle {
|
|
24
|
+
top: calc(var(--vf-snap-dy, 0px) - var(--vf-scale, 1) * 0.5px);
|
|
25
|
+
}
|
|
10
26
|
/* The focus rule is drawn under the box/circle, not around the host. */
|
|
11
27
|
:host(:focus-visible) {
|
|
12
28
|
outline: none;
|
package/dist/text-control.d.ts
CHANGED
|
@@ -69,7 +69,7 @@ export declare class VfTextControlBase extends VfShadowRoleControl {
|
|
|
69
69
|
protected forwardedAttr(name: string): string | typeof nothing;
|
|
70
70
|
/** Default-on display scaling (true 72dpi size); see src/scale.ts. */
|
|
71
71
|
protected readonly scale: ScaleController;
|
|
72
|
-
/** Device-pixel grid snapping
|
|
72
|
+
/** Device-pixel grid snapping; see src/grid-snap.ts. */
|
|
73
73
|
protected readonly gridSnap: GridSnapController;
|
|
74
74
|
/**
|
|
75
75
|
* Whether the well wears the kit's dashed focus rule — keyboard focus only.
|