@zakkster/lite-ui-fx 1.9.1 → 1.11.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/llms.txt CHANGED
@@ -1,7 +1,7 @@
1
1
  # @zakkster/lite-ui-fx
2
2
  > Canvas-hijacked UI components with pluggable recipe system. 57 built-in recipes.
3
3
 
4
- VERSION 1.9.1
4
+ VERSION 1.11.0
5
5
 
6
6
  ## Install
7
7
  npm i @zakkster/lite-ui-fx
@@ -87,6 +87,42 @@ driven // U5 host clock: boolean; true = no ticker/RAF, the host calls instan
87
87
  // padding, disabled, seed, colors, theme, text, font, ticker, driven. The hijack-
88
88
  // only keys (value/checked/knobMode/announce) throw -- a group uses index, not value.
89
89
 
90
+ ## Mount -- HEADLESS SKIN mode (E1): paint a lite-headless primitive
91
+ // skinHeadless: a FOURTH mount adapter. It places a canvas over a @zakkster/lite-
92
+ // headless primitive and drives a recipe from the primitive's PAINTED state
93
+ // attributes (its docs/CSS_CONTRACT.md) -- lite-ui-fx paints, lite-headless behaves.
94
+ // Arm's-length: couples through the attribute contract, NEVER an import, so
95
+ // lite-headless is never a dependency. Structurally a decoration: host byte-
96
+ // identical, one overlay canvas + one MutationObserver removed on destroy; the
97
+ // lite-headless handle is never destroyed (the caller owns it).
98
+ import { skinHeadless, SwitchSkin, SliderSkin, ProgressSkin, RatingSkin } from '@zakkster/lite-ui-fx/headless';
99
+ import { CheckboxSkin, CheckboxGroupSkin, SelectSkin, MeterSkin, StepsSkin, AccordionSkin, SkeletonSkin } from '@zakkster/lite-ui-fx/headless'; // E1b
100
+ import { HEADLESS_SKINS, SKIN_META, SKIN_NAMES } from '@zakkster/lite-ui-fx/headless';
101
+ const skin = skinHeadless(handle, SwitchSkin, { host: switchThumbEl, theme });
102
+ skin.el // the skinned host (unchanged)
103
+ skin.canvas // the overlay (the only DOM node added)
104
+ skin.state // read-only; driven by the observer from painted attrs
105
+ skin.tick(dtMs) // driven mode only
106
+ skin.destroy() // remove overlay + observer + listeners; host + handle untouched
107
+ // A skin is an ordinary recipe PLUS a descriptor: recipe.headless = { attrs:string[],
108
+ // read(host, handle, state) }. skinHeadless observes `attrs` and calls read() at
109
+ // EVENT time (never per frame) to parse painted state into preallocated slots.
110
+ // options: { host(REQUIRED), padding, seed, colors, theme, text, font, ticker, driven };
111
+ // hijack-only keys throw. setValue/setChecked throw (a skin reflects the primitive).
112
+ // Skins (SKIN_META, a registry SEPARATE from RECIPES -- the 57-recipe count is
113
+ // unchanged). E1: SwitchSkin (data-checked/aria-checked), SliderSkin (aria-
114
+ // valuenow/min/max + data-dragging), ProgressSkin (aria-valuenow/max + data-
115
+ // complete/data-loading), RatingSkin (aria-valuenow/max over N). E1b (0009):
116
+ // CheckboxSkin (tri-state aria-checked true|false|mixed + data-checked/data-
117
+ // indeterminate), CheckboxGroupSkin (same body over a checkbox-group master),
118
+ // SelectSkin (the select TRIGGER: aria-expanded + handle.value(); the portaled
119
+ // listbox open-state is a follow-on), MeterSkin (aria-valuenow/min/max + data-zone),
120
+ // StepsSkin (data-step-count/data-current-index/data-complete), AccordionSkin
121
+ // (aria-expanded/data-open), SkeletonSkin (data-loading/aria-busy shimmer). 11
122
+ // total, each themeable, born zero-alloc + t6-gated. A painted attr is truthy when
123
+ // PRESENT with any value but "false" (handles boolean data-disabled and value
124
+ // data-checked="true").
125
+
90
126
  ## Host clock (U5) -- three mutually-exclusive modes, both mount modes
91
127
  // default (neither option): the shared ref-counted ticker -- one RAF for all
92
128
  // components, byte-identical to earlier versions.
@@ -187,9 +223,9 @@ See UIFX-RECIPE-GUIDE.md (included in package).
187
223
  - Zero-GC in all built-in recipes: const colors + globalAlpha, precomputed
188
224
  color/label LUTs, fixed preallocated particle pools, gradients built in init.
189
225
  Gated per recipe by the t3-frame-alloc torture tier (default AND themed mount).
190
- - Themeable: all 56 recipes honour { colors, theme:{light,mid,dark}, text, font },
226
+ - Themeable: all 57 recipes honour { colors, theme:{light,mid,dark}, text, font },
191
227
  resolved once in init (zero per-frame alloc). RECIPE_META.themeable is true for
192
- all 56. A bare mount is byte-identical to pre-theming. Shipped palettes + APCA
228
+ all 57. A bare mount is byte-identical to pre-theming. Shipped palettes + APCA
193
229
  contrast are authored with @zakkster/lite-hueforge (a dev-only tool, never a
194
230
  runtime dependency).
195
231
  - U5 host clock: mount { ticker } to ride a caller-supplied lite-ticker (destroy
@@ -218,3 +254,15 @@ See UIFX-RECIPE-GUIDE.md (included in package).
218
254
  selects programmatically (fires onSelect once, no focus steal). Additive: the
219
255
  single-element API is byte-identical; the four vol.3 fakes (PillTabs/Stepper/
220
256
  RadioOrbit/BubbleRating) re-home to real group types, SegmentedSlide is new.
257
+ - E1 headless skins (./headless subpath, skinHeadless): a FOURTH mount adapter that
258
+ paints a @zakkster/lite-headless primitive by OBSERVING its painted state
259
+ attributes (one MutationObserver; parsed at event time, never per frame) --
260
+ lite-ui-fx paints, lite-headless behaves. lite-headless is a compose-target, NEVER
261
+ a dependency (the package imports it nowhere). 11 skins live in a registry
262
+ (HEADLESS_SKINS/SKIN_META) SEPARATE from the 57 recipes: E1 switch/slider/progress/
263
+ rating; E1b (decisions/0009) checkbox (tri-state) + checkbox-group master, select
264
+ (the trigger -- resolving the dropdown/item-6 decision toward a V4 skin; the
265
+ portaled listbox open-state is a follow-on), meter, steps, accordion, skeleton --
266
+ still bespoke (no lite-particles). Each themeable + zero per-frame alloc (t6-gated).
267
+ setValue/setChecked throw (a skin reflects the primitive); destroy leaves the host
268
+ + handle untouched. See 0008 + 0009.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@zakkster/lite-ui-fx",
3
- "version": "1.9.1",
4
- "description": "Canvas-hijacked UI components with a pluggable recipe system. 50 built-in recipes across toggles, buttons, sliders, knobs, loaders, checkboxes, counters, and ratings.",
3
+ "version": "1.11.0",
4
+ "description": "Canvas-hijacked UI components with a pluggable recipe system: 57 built-in recipes across toggles, buttons, sliders, knobs, loaders, checkboxes, counters and ratings, in three mount modes (hijack, decorate, grouped controls) plus a lite-headless skin adapter.",
5
5
  "author": "Zahary Shinikchiev <shinikchiev@yahoo.com>",
6
6
  "license": "MIT",
7
7
  "type": "module",
@@ -16,6 +16,10 @@
16
16
  "./recipes": {
17
17
  "import": "./UIFXRecipes.js",
18
18
  "types": "./UIFXRecipes.d.ts"
19
+ },
20
+ "./headless": {
21
+ "import": "./UIFXHeadless.js",
22
+ "types": "./UIFXHeadless.d.ts"
19
23
  }
20
24
  },
21
25
  "files": [
@@ -23,6 +27,8 @@
23
27
  "UIFXController.d.ts",
24
28
  "UIFXRecipes.js",
25
29
  "UIFXRecipes.d.ts",
30
+ "UIFXHeadless.js",
31
+ "UIFXHeadless.d.ts",
26
32
  "UIFX-RECIPE-GUIDE.md",
27
33
  "llms.txt",
28
34
  "CHANGELOG.md",