@zakkster/lite-ui-fx 1.0.5 → 1.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/llms.txt CHANGED
@@ -1,7 +1,7 @@
1
1
  # @zakkster/lite-ui-fx
2
2
  > Canvas-hijacked UI components with pluggable recipe system. 50 built-in recipes.
3
3
 
4
- VERSION 1.0.5
4
+ VERSION 1.2.0
5
5
 
6
6
  ## Install
7
7
  npm i @zakkster/lite-ui-fx
@@ -14,31 +14,42 @@ Recipe = { tick(), init?(), onHover?(), onClick?(), onToggle?(), onDrag?(), dest
14
14
  ## Import -- Controller
15
15
  import { mountUIFX, UIType } from '@zakkster/lite-ui-fx';
16
16
 
17
- ## Import -- Recipes (3 volumes, 50 total)
18
- import { SwarmToggle, MagneticButton, SparkSlider } from './recipes/UIFXRecipes.js';
19
- import { PendulumToggle, HeartbeatButton, AuroraSlider } from './recipes/UIFXRecipes2.js';
20
- import { VolumeKnob, WaterLevel, TimerCountdown } from './recipes/UIFXRecipes3.js';
17
+ ## Import -- Recipes (one ./recipes subpath, 50 total, tree-shakeable)
18
+ import { SwarmToggle, MagneticButton, SparkSlider } from '@zakkster/lite-ui-fx/recipes';
19
+ import { PendulumToggle, HeartbeatButton, AuroraSlider } from '@zakkster/lite-ui-fx/recipes';
20
+ import { VolumeKnob, WaterLevel, TimerCountdown } from '@zakkster/lite-ui-fx/recipes';
21
+
22
+ ## Import -- Recipe registry (data-driven pickers)
23
+ import { RECIPES, RECIPE_META, RECIPE_NAMES, registerRecipe, mountRecipe } from '@zakkster/lite-ui-fx/recipes';
24
+ // RECIPES id->factory (null-proto); RECIPE_META { id, name, type, family, themeable, motionSafe }; RECIPE_NAMES frozen.
25
+ // mountRecipe(container, id, options?): resolves id fail-closed (did-you-mean), asserts META.type, mounts.
21
26
 
22
27
  ## Mount
23
28
  const instance = mountUIFX(container, UIType.TOGGLE, SwarmToggle, { label: 'Sound' });
24
29
  instance.destroy(); // cleanup
25
30
 
31
+ ## Options (4th arg; unknown option or recipe-hook keys throw a did-you-mean -- fail closed)
32
+ width, height, padding=40, label // geometry + accessible label
33
+ value // slider start, number 0..1 (default 0.5); out-of-range or non-number throws
34
+ checked // toggle start, boolean (default false)
35
+ disabled // native disabled attr + state.disabled for recipes to render
36
+
26
37
  ## Element Types
27
38
  UIType.TOGGLE -> <input type="checkbox" role="switch"> -> state.toggled, onToggle(checked)
28
39
  UIType.BUTTON -> <button> -> state.active, onClick(x, y, state)
29
40
  UIType.SLIDER -> <input type="range"> -> state.val (0-1), onDrag(val, velocity)
30
41
 
31
42
  ## State Object (provided to tick every frame)
32
- { hover, active, focused, toggled, val, w, h, padding, dpr }
43
+ { hover, active, focused, toggled, disabled, val, w, h, padding, dpr }
33
44
 
34
45
  ## 50 Built-in Recipes
35
46
 
36
- ### Vol. 1 (UIFXRecipes.js) -- 10 recipes
47
+ ### Vol. 1 -- 10 recipes
37
48
  Toggles: SwarmToggle, LiquidToggle, NeonPulseToggle
38
49
  Buttons: MagneticButton, ShatterButton, ConfettiButton, GlitchButton
39
50
  Sliders: SparkSlider, CosmicSlider, LaserSlider
40
51
 
41
- ### Vol. 2 (UIFXRecipes2.js) -- 20 recipes
52
+ ### Vol. 2 -- 20 recipes
42
53
  Toggles: PendulumToggle, CircuitToggle, LightningToggle, DNAToggle
43
54
  Buttons: HeartbeatButton, BreathingButton, InkSplashButton, PixelDissolveButton, FireworkButton
44
55
  Sliders: AuroraSlider, WaveSlider, ElasticBandSlider, GravitySlider
@@ -47,7 +58,7 @@ Checkboxes: RippleCheck, MorphCheck
47
58
  Counters: FlameCounter, GlitchCounter
48
59
  Rating: BubbleRating
49
60
 
50
- ### Vol. 3 (UIFXRecipes3.js) -- 20 recipes
61
+ ### Vol. 3 -- 20 recipes
51
62
  Knobs: VolumeKnob, CompassKnob
52
63
  Progress: RingProgress, BatteryGauge, SignalMeter
53
64
  Controls: PillTabs, Stepper, RadioOrbit
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zakkster/lite-ui-fx",
3
- "version": "1.0.5",
3
+ "version": "1.2.0",
4
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.",
5
5
  "author": "Zahary Shinikchiev <shinikchiev@yahoo.com>",
6
6
  "license": "MIT",
@@ -12,13 +12,19 @@
12
12
  ".": {
13
13
  "import": "./UIFXController.js",
14
14
  "types": "./UIFXController.d.ts"
15
+ },
16
+ "./recipes": {
17
+ "import": "./UIFXRecipes.js",
18
+ "types": "./UIFXRecipes.d.ts"
15
19
  }
16
20
  },
17
21
  "files": [
18
22
  "UIFXController.js",
19
23
  "UIFXController.d.ts",
24
+ "UIFXRecipes.js",
25
+ "UIFXRecipes.d.ts",
26
+ "UIFX-RECIPE-GUIDE.md",
20
27
  "llms.txt",
21
- "recipes/UIFX-RECIPE-GUIDE.md",
22
28
  "CHANGELOG.md",
23
29
  "README.md",
24
30
  "LICENSE"
@@ -41,14 +47,15 @@
41
47
  "node": ">=18"
42
48
  },
43
49
  "dependencies": {
44
- "@zakkster/lite-ticker": "^1.0.0",
45
50
  "@zakkster/lite-lerp": "^1.0.0",
46
- "@zakkster/lite-random": "^1.0.0"
51
+ "@zakkster/lite-random": "^1.0.0",
52
+ "@zakkster/lite-ticker": "^1.0.0"
47
53
  },
48
54
  "devDependencies": {
49
55
  "@zakkster/lite-gc-profiler": "^1.16.0",
50
56
  "@zakkster/lite-leak": "^1.10.0",
51
- "@zakkster/lite-signal": "^1.5.1"
57
+ "@zakkster/lite-signal": "^1.5.1",
58
+ "esbuild": "^0.28.2"
52
59
  },
53
60
  "scripts": {
54
61
  "test": "node --test test/*.test.mjs",