kuinetic 0.2.1 → 0.2.3

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.
Files changed (64) hide show
  1. package/README.md +15 -8
  2. package/dist/esm/advanced/index.mjs +5 -5
  3. package/dist/esm/{chunk-U43BX5O2.mjs → chunk-FASAEQDR.mjs} +54 -7
  4. package/dist/esm/{chunk-BN2Y4UKB.mjs → chunk-FYMZW5N2.mjs} +2373 -541
  5. package/dist/esm/{chunk-RVTYN6NZ.mjs → chunk-MZQG2VMG.mjs} +208 -2
  6. package/dist/esm/core/index.mjs +21 -3
  7. package/dist/esm/effects/index.mjs +2 -2
  8. package/dist/esm/index.mjs +35 -4
  9. package/dist/esm/notes/index.mjs +1075 -0
  10. package/dist/kuinetic.advanced.js +63 -25
  11. package/dist/kuinetic.advanced.min.js +3 -3
  12. package/dist/kuinetic.all.js +2658 -538
  13. package/dist/kuinetic.all.min.js +2 -2
  14. package/dist/kuinetic.css +238 -65
  15. package/dist/kuinetic.js +2657 -537
  16. package/dist/kuinetic.min.css +1 -1
  17. package/dist/kuinetic.min.js +2 -2
  18. package/dist/kuinetic.notes.js +1 -0
  19. package/dist/types/3d/flattening.d.ts +8 -7
  20. package/dist/types/advanced/camera-3d.d.ts +0 -4
  21. package/dist/types/advanced/fluid-cursor.d.ts +0 -4
  22. package/dist/types/advanced/particles.d.ts +0 -4
  23. package/dist/types/advanced/scenes.d.ts +0 -4
  24. package/dist/types/browser/boot.d.ts +9 -4
  25. package/dist/types/core/activation.d.ts +11 -0
  26. package/dist/types/core/compile.d.ts +7 -0
  27. package/dist/types/core/deck-viewer.d.ts +87 -0
  28. package/dist/types/core/derived/types.d.ts +0 -1
  29. package/dist/types/core/describe.d.ts +174 -0
  30. package/dist/types/core/gesture.d.ts +16 -1
  31. package/dist/types/core/index.d.ts +6 -2
  32. package/dist/types/core/stagger.d.ts +1 -1
  33. package/dist/types/core/target.d.ts +28 -0
  34. package/dist/types/core/timing-contract.d.ts +61 -0
  35. package/dist/types/core/types.d.ts +59 -0
  36. package/dist/types/effects/auto-motion.d.ts +169 -0
  37. package/dist/types/effects/carousel/deck.d.ts +170 -0
  38. package/dist/types/effects/carousel/drag.d.ts +6 -0
  39. package/dist/types/effects/carousel/fit.d.ts +130 -0
  40. package/dist/types/effects/carousel/index.d.ts +6 -23
  41. package/dist/types/effects/carousel/stack.d.ts +77 -0
  42. package/dist/types/effects/catalog/interaction-reveal.d.ts +69 -9
  43. package/dist/types/effects/forms/primitives.d.ts +1 -2
  44. package/dist/types/effects/gestures/index.d.ts +3 -4
  45. package/dist/types/effects/shared.d.ts +3 -30
  46. package/dist/types/effects/step-index.d.ts +48 -10
  47. package/dist/types/effects/swipe-event.d.ts +75 -0
  48. package/dist/types/index.d.ts +26 -0
  49. package/dist/types/notes/catalog-core.d.ts +3 -0
  50. package/dist/types/notes/catalog.d.ts +3 -0
  51. package/dist/types/notes/index.d.ts +13 -0
  52. package/dist/types/notes/interaction-reveal.d.ts +3 -0
  53. package/dist/types/notes/interaction.d.ts +6 -0
  54. package/dist/types/notes/keys.d.ts +7 -0
  55. package/dist/types/notes/mechanics.d.ts +7 -0
  56. package/dist/types/notes/scroll-nav-forms.d.ts +6 -0
  57. package/dist/types/notes/shared.d.ts +6 -0
  58. package/dist/types/notes/showcase.d.ts +7 -0
  59. package/dist/types/notes/text.d.ts +3 -0
  60. package/dist/types/showcase/compare.d.ts +9 -0
  61. package/dist/types/showcase/index.d.ts +3 -0
  62. package/dist/types/showcase/lightbox.d.ts +23 -1
  63. package/dist/types/showcase/modal-shell.d.ts +11 -0
  64. package/package.json +10 -4
@@ -1,3 +1,25 @@
1
- import type { Preset, Primitive } from '../core/types.js';
1
+ import type { DeckViewerRequest } from '../core/deck-viewer.js';
2
+ import type { Cleanup, Preset, Primitive } from '../core/types.js';
3
+ /**
4
+ * Click-to-view for a deck: `carousel-3d lightbox:true` and every other deck with the parameter.
5
+ * Provided to the decks through `core/deck-viewer.ts` by `registerShowcase`.
6
+ *
7
+ * Every card of the deck becomes one gallery, opened at the card clicked, through the same
8
+ * `galleryContent` the `lightbox` effect opens — buttons, keys, swipe, `loop`, the media rules and
9
+ * the one shared modal shell, unforked.
10
+ *
11
+ * What counts as a click is the deck's to say, and it already says it. The listener is on the host
12
+ * in the *bubble* phase, and a deck's drag consumes the click that ends a drag in the *capture*
13
+ * phase on the same host (`carousel/drag.ts`'s `guardClicks`), with `stopPropagation` — so a drag
14
+ * never reaches this listener, and nothing here re-derives a threshold. (That a tap's click lands
15
+ * on the card at all, rather than on the host, rests on the drag taking pointer capture only once a
16
+ * press becomes a drag — `capturePointer: 'drag'` in `createRingDrag`.) A card turned away from
17
+ * the viewer is `pointer-events: none` (`carousel.css`) and cannot be the target; the
18
+ * `data-kui-ring-face` check repeats that for an engine whose hit-testing ignores it.
19
+ *
20
+ * @returns Removes the listener and releases this deck's hold on the shared modal.
21
+ * @complexity O(n) per click in the deck's cards; O(1) space between clicks.
22
+ */
23
+ export declare function attachDeckLightbox(request: DeckViewerRequest): Cleanup;
2
24
  export declare const LIGHTBOX_PRIMITIVE: Primitive;
3
25
  export declare const LIGHTBOX_PRESETS: Preset[];
@@ -7,6 +7,17 @@ export interface ModalContent {
7
7
  reducedMotion: boolean;
8
8
  onKey?: (event: KeyboardEvent) => void;
9
9
  onClose?: () => void;
10
+ /**
11
+ * Whether a click on `target` lands on the content and keeps the viewer open. Omitted, anything
12
+ * inside the content node counts; a viewer whose node fills the screen narrows it to its media.
13
+ */
14
+ inside?: (target: Element) => boolean;
15
+ /**
16
+ * The element that opened this content — a deck's card, a `lightbox` trigger. The shell announces
17
+ * `kui:viewer` from it on open and on close (`core/deck-viewer.ts`), which is how a deck it sits in
18
+ * pauses its own motion for exactly as long as the viewer shows one of its cards.
19
+ */
20
+ opener?: Element;
10
21
  }
11
22
  export interface ModalShell {
12
23
  open(content: ModalContent): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kuinetic",
3
- "version": "0.2.1",
3
+ "version": "0.2.3",
4
4
  "description": "Declarative web animation from HTML attributes. Native CSS where possible, JS only where necessary.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -37,6 +37,10 @@
37
37
  "types": "./dist/types/advanced/index.d.ts",
38
38
  "default": "./dist/esm/advanced/index.mjs"
39
39
  },
40
+ "./notes": {
41
+ "types": "./dist/types/notes/index.d.ts",
42
+ "default": "./dist/esm/notes/index.mjs"
43
+ },
40
44
  "./css": "./dist/kuinetic.css",
41
45
  "./package.json": "./package.json"
42
46
  },
@@ -50,8 +54,8 @@
50
54
  "lint:dead": "knip",
51
55
  "ci": "npm run build:dist && node scripts/verify-tiers.mjs && npm run typecheck && npm run lint && npm run lint:deps && npm run lint:dead && npm run check:css-coverage && npm run test:coverage && npm run test:browser",
52
56
  "size": "npm run build:dist && size-limit",
53
- "build": "npm run generate:css && esbuild src/index.ts --bundle --format=iife --global-name=kuinetic --minify --sourcemap=linked --outfile=demo/kuinetic.js && esbuild src/css/index.css --bundle --outfile=demo/kuinetic.css && npx @tailwindcss/cli -i demo/tailwind-entry.css -o demo/tailwind.css && node scripts/build-tiers.mjs demo && node scripts/build-standalone.mjs demo && npm run sync:docs",
54
- "build:dist": "npm run clean:dist && npm run generate:css && esbuild src/index.ts src/core/index.ts src/effects/index.ts src/advanced/index.ts --bundle --format=esm --splitting --outdir=dist/esm --out-extension:.js=.mjs && esbuild src/index.ts --bundle --format=iife --global-name=kuinetic --outfile=dist/kuinetic.js && esbuild src/css/index.css --bundle --outfile=dist/kuinetic.css && esbuild src/index.ts --bundle --format=iife --global-name=kuinetic --minify --outfile=dist/kuinetic.min.js && esbuild src/css/index.css --bundle --minify --outfile=dist/kuinetic.min.css && tsc -p tsconfig.build.json && node scripts/build-tiers.mjs && node scripts/build-standalone.mjs",
57
+ "build": "npm run generate:css && esbuild src/index.ts --bundle --format=iife --global-name=kuinetic --minify --sourcemap=linked --outfile=demo/kuinetic.js && esbuild src/notes/index.ts --bundle --format=iife --global-name=kuineticNotes --minify --outfile=demo/kuinetic.notes.js && esbuild src/css/index.css --bundle --outfile=demo/kuinetic.css && npx @tailwindcss/cli -i demo/tailwind-entry.css -o demo/tailwind.css && node scripts/build-tiers.mjs demo && node scripts/build-standalone.mjs demo && npm run sync:docs",
58
+ "build:dist": "npm run clean:dist && npm run generate:css && esbuild src/index.ts src/core/index.ts src/effects/index.ts src/advanced/index.ts src/notes/index.ts --bundle --format=esm --splitting --outdir=dist/esm --out-extension:.js=.mjs && esbuild src/index.ts --bundle --format=iife --global-name=kuinetic --outfile=dist/kuinetic.js && esbuild src/notes/index.ts --bundle --format=iife --global-name=kuineticNotes --minify --outfile=dist/kuinetic.notes.js &&esbuild src/css/index.css --bundle --outfile=dist/kuinetic.css && esbuild src/index.ts --bundle --format=iife --global-name=kuinetic --minify --outfile=dist/kuinetic.min.js && esbuild src/css/index.css --bundle --minify --outfile=dist/kuinetic.min.css && tsc -p tsconfig.build.json && node scripts/build-tiers.mjs && node scripts/build-standalone.mjs",
55
59
  "verify:standalone": "npm run build:dist && node scripts/verify-standalone.mjs",
56
60
  "verify:tiers": "npm run build:dist && node scripts/verify-tiers.mjs",
57
61
  "verify:pack": "npm run build:dist && node scripts/verify-pack.mjs",
@@ -63,6 +67,9 @@
63
67
  "test:browser": "npm run build && node scripts/run-browser-tests.mjs",
64
68
  "test:visual": "npm run build && node scripts/visual-regression.mjs",
65
69
  "test:visual:update": "npm run build && node scripts/visual-regression.mjs --update",
70
+ "test:visual:pages": "npm run build && node scripts/visual-regression-pages.mjs",
71
+ "test:visual:pages:update": "npm run build && node scripts/visual-regression-pages.mjs --update",
72
+ "test:pages": "npm run build && node scripts/run-browser-tests.mjs --only page-",
66
73
  "generate:css": "node scripts/generate-preset-css.mjs",
67
74
  "generate:nav": "node scripts/generate-nav-header.mjs",
68
75
  "record": "npm run build && node scripts/verify-browser.mjs --record",
@@ -89,7 +96,6 @@
89
96
  "pngjs": "^7.0.0",
90
97
  "size-limit": "^13.0.3",
91
98
  "tailwindcss": "^4.3.3",
92
- "three": "^0.186.0",
93
99
  "typescript": "^5.9.3",
94
100
  "typescript-eslint": "^8.66.0",
95
101
  "vitest": "^2.1.9"