kuinetic 0.2.2 → 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 (52) hide show
  1. package/README.md +2 -2
  2. package/dist/esm/{chunk-K2M7O6W5.mjs → chunk-FASAEQDR.mjs} +32 -1
  3. package/dist/esm/{chunk-XDDJVANU.mjs → chunk-FYMZW5N2.mjs} +2301 -528
  4. package/dist/esm/{chunk-BBQ22D7A.mjs → chunk-MZQG2VMG.mjs} +202 -2
  5. package/dist/esm/core/index.mjs +21 -3
  6. package/dist/esm/effects/index.mjs +2 -2
  7. package/dist/esm/index.mjs +35 -4
  8. package/dist/esm/notes/index.mjs +1075 -0
  9. package/dist/kuinetic.all.js +2502 -501
  10. package/dist/kuinetic.all.min.js +2 -2
  11. package/dist/kuinetic.css +238 -65
  12. package/dist/kuinetic.js +2501 -500
  13. package/dist/kuinetic.min.css +1 -1
  14. package/dist/kuinetic.min.js +1 -1
  15. package/dist/kuinetic.notes.js +1 -0
  16. package/dist/types/3d/flattening.d.ts +8 -7
  17. package/dist/types/core/deck-viewer.d.ts +87 -0
  18. package/dist/types/core/describe.d.ts +174 -0
  19. package/dist/types/core/gesture.d.ts +10 -0
  20. package/dist/types/core/index.d.ts +6 -2
  21. package/dist/types/core/target.d.ts +28 -0
  22. package/dist/types/core/timing-contract.d.ts +61 -0
  23. package/dist/types/core/types.d.ts +59 -0
  24. package/dist/types/effects/auto-motion.d.ts +169 -0
  25. package/dist/types/effects/carousel/deck.d.ts +170 -0
  26. package/dist/types/effects/carousel/drag.d.ts +6 -0
  27. package/dist/types/effects/carousel/fit.d.ts +130 -0
  28. package/dist/types/effects/carousel/index.d.ts +6 -23
  29. package/dist/types/effects/carousel/stack.d.ts +77 -0
  30. package/dist/types/effects/catalog/interaction-reveal.d.ts +69 -9
  31. package/dist/types/effects/forms/primitives.d.ts +1 -2
  32. package/dist/types/effects/gestures/index.d.ts +3 -4
  33. package/dist/types/effects/shared.d.ts +3 -30
  34. package/dist/types/effects/step-index.d.ts +48 -10
  35. package/dist/types/effects/swipe-event.d.ts +75 -0
  36. package/dist/types/index.d.ts +26 -0
  37. package/dist/types/notes/catalog-core.d.ts +3 -0
  38. package/dist/types/notes/catalog.d.ts +3 -0
  39. package/dist/types/notes/index.d.ts +13 -0
  40. package/dist/types/notes/interaction-reveal.d.ts +3 -0
  41. package/dist/types/notes/interaction.d.ts +6 -0
  42. package/dist/types/notes/keys.d.ts +7 -0
  43. package/dist/types/notes/mechanics.d.ts +7 -0
  44. package/dist/types/notes/scroll-nav-forms.d.ts +6 -0
  45. package/dist/types/notes/shared.d.ts +6 -0
  46. package/dist/types/notes/showcase.d.ts +7 -0
  47. package/dist/types/notes/text.d.ts +3 -0
  48. package/dist/types/showcase/compare.d.ts +9 -0
  49. package/dist/types/showcase/index.d.ts +3 -0
  50. package/dist/types/showcase/lightbox.d.ts +23 -1
  51. package/dist/types/showcase/modal-shell.d.ts +11 -0
  52. package/package.json +7 -3
package/README.md CHANGED
@@ -10,7 +10,7 @@ wherever CSS can do it. Standalone, MIT, npm + CDN, framework-agnostic. No produ
10
10
  <h1 data-kui="fade-up">Hello.</h1>
11
11
  ```
12
12
 
13
- 302 named effects across scroll reveals, hover/interaction, text, numbers, layout, SVG, 3D, and
13
+ 305 named effects across scroll reveals, hover/interaction, text, numbers, layout, SVG, 3D, and
14
14
  gesture-driven motion. 3,800+ unit tests. The jsdom suite holds `src/` at 100%
15
15
  line/branch/function/statement coverage with two carve-outs: the WebGL tier in `src/advanced/`
16
16
  (`shaders.ts`, `gl-utils.ts`, `fluid-cursor.ts`, `particles.ts`), whose GPU paths cannot execute
@@ -186,7 +186,7 @@ untrusted input — see Getting Started for the full note.
186
186
  ## Docs
187
187
 
188
188
  - **Getting Started** — install, first animation, timing, composition, common mistakes.
189
- - **Catalog** — all 302 named effects, grouped by category, with renderer and channel metadata.
189
+ - **Catalog** — all 305 named effects, grouped by category, with renderer and channel metadata.
190
190
  - **Architecture** — the attribute grammar, the composition model, and why the library is built
191
191
  the way it is (`docs/design.md` in this repo).
192
192
 
@@ -36,6 +36,10 @@ function scopeParam(params, fallback) {
36
36
  function queryScoped(el, ctx, selector, scope) {
37
37
  return [...(scope === "page" ? ctx.doc : el).querySelectorAll(selector)];
38
38
  }
39
+ function queryControls(el, ctx, selector) {
40
+ const inside = [...el.querySelectorAll(selector)];
41
+ return inside.length > 0 ? inside : [...ctx.doc.querySelectorAll(selector)];
42
+ }
39
43
 
40
44
  // src/core/event-sources.ts
41
45
  function createEventSourceBindings() {
@@ -622,6 +626,10 @@ var CHANNEL = {
622
626
  */
623
627
  skew: "skew"
624
628
  };
629
+ function attributeChannel(attribute) {
630
+ return `attr:${attribute}`;
631
+ }
632
+ var SUBTREE_CHANNEL = "subtree";
625
633
  function inertInstance(destroy = () => {
626
634
  }) {
627
635
  return {
@@ -2062,6 +2070,21 @@ function emitLifecycle(el, type, detail) {
2062
2070
  el.dispatchEvent(new Ctor(type, { detail, bubbles: true, composed: true }));
2063
2071
  }
2064
2072
 
2073
+ // src/core/timing-contract.ts
2074
+ var ALL_TIMING_TOKENS = ["duration", "delay", "ease"];
2075
+ var CONTRACTS = /* @__PURE__ */ new WeakMap();
2076
+ function declareTimingContract(prepare, contract) {
2077
+ CONTRACTS.set(prepare, contract);
2078
+ return prepare;
2079
+ }
2080
+ function inheritTimingContract(inner, outer) {
2081
+ const contract = CONTRACTS.get(inner);
2082
+ return contract ? declareTimingContract(outer, contract) : outer;
2083
+ }
2084
+ function timingContractOf(primitive) {
2085
+ return primitive.prepare ? CONTRACTS.get(primitive.prepare) : void 0;
2086
+ }
2087
+
2065
2088
  // src/core/params.ts
2066
2089
  var DANGEROUS = /[;<]|\/\*|url\s*\(|expression\s*\(|@import|image-set\s*\(/i;
2067
2090
  var ABSOLUTE_OR_PROTOCOL_RELATIVE = /^(?:[a-z][a-z0-9+.-]*:|[/\\]{2})/i;
@@ -2936,12 +2959,14 @@ export {
2936
2959
  SCOPE_PARAM,
2937
2960
  scopeParam,
2938
2961
  queryScoped,
2962
+ queryControls,
2939
2963
  resolveActivationSpec,
2940
2964
  startKindOf,
2941
2965
  isOneShot,
2942
2966
  createActivationBinder,
2943
2967
  warnAboutActivation,
2944
2968
  ATTR,
2969
+ BREAKPOINT_NAMES,
2945
2970
  gatedAnimationName,
2946
2971
  gateMatches,
2947
2972
  gatesOverlap,
@@ -2961,6 +2986,8 @@ export {
2961
2986
  warnAboutToggleActions,
2962
2987
  applyToggleVerb,
2963
2988
  CHANNEL,
2989
+ attributeChannel,
2990
+ SUBTREE_CHANNEL,
2964
2991
  inertInstance,
2965
2992
  SEGMENT_HOIST_KEYS,
2966
2993
  splitTopLevel,
@@ -2996,5 +3023,9 @@ export {
2996
3023
  createCssInstance,
2997
3024
  continuousSetup,
2998
3025
  deferredInstance,
2999
- deferPrepare
3026
+ deferPrepare,
3027
+ ALL_TIMING_TOKENS,
3028
+ declareTimingContract,
3029
+ inheritTimingContract,
3030
+ timingContractOf
3000
3031
  };