asciify-engine 4.29.0 → 4.31.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.
Files changed (119) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/THIRD_PARTY.md +3 -0
  3. package/dist/field.cjs +1 -1
  4. package/dist/field.d.cts +1 -1
  5. package/dist/field.d.ts +1 -1
  6. package/dist/field.js +1 -1
  7. package/dist/{glyph-field-DRC-7uVf.d.ts → glyph-field-BCwGhohg.d.ts} +11 -0
  8. package/dist/{glyph-field-C2fQIlnq.d.cts → glyph-field-DKWHAMml.d.cts} +11 -0
  9. package/dist/kit/chunk-26HU7QJW.js +1 -0
  10. package/dist/kit/{chunk-4NV5APSJ.js → chunk-2NACMWVV.js} +1 -1
  11. package/dist/kit/chunk-2ZBPTNGK.js +1 -0
  12. package/dist/kit/{chunk-G4ZSMTFN.js → chunk-4NR7QENR.js} +1 -1
  13. package/dist/kit/{chunk-KY5KCIZE.js → chunk-62KEKWSM.js} +1 -1
  14. package/dist/kit/chunk-6646EUJY.js +1 -0
  15. package/dist/kit/{chunk-2FH6GGV6.js → chunk-6G2ZVIBS.js} +1 -1
  16. package/dist/kit/chunk-6YLMG37G.js +1 -0
  17. package/dist/kit/{chunk-FPCCX4FM.js → chunk-7DBDSJ5R.js} +1 -1
  18. package/dist/kit/chunk-7NS6YAD3.js +1 -0
  19. package/dist/kit/chunk-7OPCQDAL.js +1 -0
  20. package/dist/kit/{chunk-3OD5BMF5.js → chunk-AAV5QNHU.js} +1 -1
  21. package/dist/kit/chunk-AU33Y2SZ.js +1 -0
  22. package/dist/kit/{chunk-KCEYRIU4.js → chunk-BGPEFFKK.js} +1 -1
  23. package/dist/kit/{chunk-KDROJANO.js → chunk-BJJUDT26.js} +1 -1
  24. package/dist/kit/{chunk-2LBQ7QJT.js → chunk-BO4CPM26.js} +1 -1
  25. package/dist/kit/chunk-BQ53B2HP.js +1 -0
  26. package/dist/kit/chunk-BV6AOHFU.js +1 -0
  27. package/dist/kit/{chunk-QVICL57J.js → chunk-CH64MY3U.js} +1 -1
  28. package/dist/kit/{chunk-6G5MPND3.js → chunk-CIGEXHZ5.js} +1 -1
  29. package/dist/kit/{chunk-LVCGC3SO.js → chunk-CMGMCRAD.js} +1 -1
  30. package/dist/kit/{chunk-4U72YE65.js → chunk-CZL5WMU6.js} +1 -1
  31. package/dist/kit/chunk-DANNL7WR.js +1 -0
  32. package/dist/kit/{chunk-PB5E3D4E.js → chunk-DKRZSP5K.js} +1 -1
  33. package/dist/kit/{chunk-KFXMLIVF.js → chunk-E427W6P5.js} +1 -1
  34. package/dist/kit/{chunk-776H2BJ7.js → chunk-ECGALF3G.js} +1 -1
  35. package/dist/kit/chunk-EOTPXDMH.js +1 -0
  36. package/dist/kit/{chunk-K6JX64AS.js → chunk-FU4WW3PU.js} +1 -1
  37. package/dist/kit/chunk-GI5BNKBL.js +1 -0
  38. package/dist/kit/{chunk-Z2FRNFMB.js → chunk-HENGH3DE.js} +1 -1
  39. package/dist/kit/chunk-I377LEZA.js +1 -0
  40. package/dist/kit/chunk-IFZDWKIX.js +1 -0
  41. package/dist/kit/{chunk-3MHEDZLZ.js → chunk-J7TFGVZT.js} +1 -1
  42. package/dist/kit/{chunk-WDS7VM2E.js → chunk-J7Y2KBXK.js} +1 -1
  43. package/dist/kit/{chunk-KXI3T72F.js → chunk-JF3WEYIE.js} +1 -1
  44. package/dist/kit/{chunk-Z3KD6CLE.js → chunk-JSRXW3FL.js} +1 -1
  45. package/dist/kit/chunk-KO5NAI4S.js +1 -0
  46. package/dist/kit/chunk-LZGSWPH4.js +1 -0
  47. package/dist/kit/{chunk-ILXVBO7M.js → chunk-MT23DCGU.js} +1 -1
  48. package/dist/kit/{chunk-NF4WVWAC.js → chunk-MWUPCAET.js} +1 -1
  49. package/dist/kit/chunk-MZDZ6G75.js +1 -0
  50. package/dist/kit/{chunk-3YSK7V26.js → chunk-N7J4UAWY.js} +1 -1
  51. package/dist/kit/{chunk-YSN7EHSH.js → chunk-NP7UG7DS.js} +1 -1
  52. package/dist/kit/{chunk-ZCXNGJGB.js → chunk-NQ4PFWOG.js} +1 -1
  53. package/dist/kit/chunk-NSKX2OFA.js +1 -0
  54. package/dist/kit/{chunk-TRDA73HN.js → chunk-O25QXHEZ.js} +1 -1
  55. package/dist/kit/chunk-ODLKGAX2.js +1 -0
  56. package/dist/kit/chunk-P5M6AQQX.js +1 -0
  57. package/dist/kit/{chunk-W4U5CK6L.js → chunk-P5MVACML.js} +1 -1
  58. package/dist/kit/chunk-PZKQUZQK.js +1 -0
  59. package/dist/kit/{chunk-EKYEA7Z4.js → chunk-QRSVLQ2I.js} +1 -1
  60. package/dist/kit/{chunk-CGSWUO67.js → chunk-R3ALZFUQ.js} +1 -1
  61. package/dist/kit/{chunk-7DXSG526.js → chunk-RGV7VRYC.js} +1 -1
  62. package/dist/kit/chunk-RPSE33GI.js +1 -0
  63. package/dist/kit/chunk-RU2KQTTL.js +1 -0
  64. package/dist/kit/chunk-SBAUVRBY.js +1 -0
  65. package/dist/kit/chunk-SQNULNT3.js +1 -0
  66. package/dist/kit/{chunk-HYVTFKWX.js → chunk-TJHSBZBF.js} +1 -1
  67. package/dist/kit/{chunk-FWODCYYJ.js → chunk-UHLNVM63.js} +1 -1
  68. package/dist/kit/{chunk-UOYBFLGJ.js → chunk-UT6MJP5B.js} +1 -1
  69. package/dist/kit/{chunk-6WU247CB.js → chunk-UXDJSGED.js} +1 -1
  70. package/dist/kit/{chunk-GBNV3GXG.js → chunk-UZR3T5XA.js} +1 -1
  71. package/dist/kit/{chunk-FHN3PPSI.js → chunk-V3J6KJQ2.js} +1 -1
  72. package/dist/kit/{chunk-KLRF3S7O.js → chunk-V42Q4L2G.js} +1 -1
  73. package/dist/kit/{chunk-ZWZZMU5P.js → chunk-VQ4KIRBW.js} +1 -1
  74. package/dist/kit/chunk-VWFC5XOB.js +1 -0
  75. package/dist/kit/chunk-VXPUEFYR.js +1 -0
  76. package/dist/kit/{chunk-RXOPJJC4.js → chunk-W3GINZLK.js} +1 -1
  77. package/dist/kit/{chunk-F6F2C3RH.js → chunk-WOKKM6CG.js} +1 -1
  78. package/dist/kit/{chunk-OZFSNW5N.js → chunk-WPWCFCEZ.js} +1 -1
  79. package/dist/kit/{chunk-H5KHXZWR.js → chunk-WRBLIULG.js} +1 -1
  80. package/dist/kit/{chunk-SDSW7422.js → chunk-WSWIOD2C.js} +1 -1
  81. package/dist/kit/{chunk-NW4U2YRE.js → chunk-X6GAMLEH.js} +1 -1
  82. package/dist/kit/chunk-XB7XBYHA.js +1 -0
  83. package/dist/kit/{chunk-B3TY6UXJ.js → chunk-XDX6WLED.js} +1 -1
  84. package/dist/kit/chunk-XJBVU5QP.js +1 -0
  85. package/dist/kit/{chunk-42KMN727.js → chunk-XVA7UGUQ.js} +1 -1
  86. package/dist/kit/{chunk-DMRPBFLW.js → chunk-YFW377RN.js} +1 -1
  87. package/dist/kit/{chunk-CG6SGQMY.js → chunk-ZGCKUXYP.js} +1 -1
  88. package/dist/kit/{chunk-XUCYFWC3.js → chunk-ZTCSVEHT.js} +1 -1
  89. package/dist/kit.cjs +1 -1
  90. package/dist/kit.d.cts +235 -6
  91. package/dist/kit.d.ts +235 -6
  92. package/dist/kit.js +1 -1
  93. package/package.json +1 -1
  94. package/skills/asciify-engine/SKILL.md +4 -4
  95. package/skills/asciify-engine/references/applying-asciify.md +19 -2
  96. package/skills/asciify-engine/references/components.md +107 -0
  97. package/skills/asciify-engine/references/glyph-field.md +2 -0
  98. package/skills/asciify-engine/references/kit.md +165 -3
  99. package/skills/asciify-engine/references/scenario-prompts.md +17 -1
  100. package/dist/kit/chunk-2GAV4OAK.js +0 -1
  101. package/dist/kit/chunk-3LJ5C3U3.js +0 -1
  102. package/dist/kit/chunk-3VEMKDBW.js +0 -1
  103. package/dist/kit/chunk-7M2FFUZ3.js +0 -1
  104. package/dist/kit/chunk-AIGAJMNN.js +0 -1
  105. package/dist/kit/chunk-BFBG3VHI.js +0 -1
  106. package/dist/kit/chunk-E3FPFANJ.js +0 -1
  107. package/dist/kit/chunk-EEV6Y7NH.js +0 -1
  108. package/dist/kit/chunk-GF72XM4C.js +0 -1
  109. package/dist/kit/chunk-GKR3ROYR.js +0 -1
  110. package/dist/kit/chunk-I5R2347P.js +0 -1
  111. package/dist/kit/chunk-KEE55QSD.js +0 -1
  112. package/dist/kit/chunk-M5VVLYI2.js +0 -1
  113. package/dist/kit/chunk-ORSI57T2.js +0 -1
  114. package/dist/kit/chunk-PGFBIU7R.js +0 -1
  115. package/dist/kit/chunk-QSTDYL35.js +0 -1
  116. package/dist/kit/chunk-UVLKCAKH.js +0 -1
  117. package/dist/kit/chunk-VBWG7HQA.js +0 -1
  118. package/dist/kit/chunk-VV2KP7ZW.js +0 -1
  119. package/dist/kit/chunk-WI2AF2KE.js +0 -1
package/dist/kit.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { G as GlyphField, r as GlyphFieldOptions } from './glyph-field-C2fQIlnq.cjs';
1
+ import { G as GlyphField, r as GlyphFieldOptions, m as FieldMark } from './glyph-field-DKWHAMml.cjs';
2
2
  import { C as CHARACTER_SETS } from './characters-BgECi5Lf.cjs';
3
3
  import './hover-guide-DdFnAnfU.cjs';
4
4
 
@@ -154,8 +154,18 @@ interface DecodeOptions extends KitOptions {
154
154
  text?: string;
155
155
  /** Total length in ms: the first 30% is drift alone, then the words resolve left to right. Default 800. */
156
156
  duration?: number;
157
- /** `visible` decodes when the element scrolls into view; `manual` waits for `replay()`. Default `visible`. */
158
- trigger?: 'visible' | 'manual';
157
+ /**
158
+ * `visible` decodes when the element scrolls into view; `manual` waits for `replay()`; `scroll` ties the decode to scroll
159
+ * position, resolving as the element rises into view and undoing as it leaves (and idling while the page is still). Default `visible`.
160
+ */
161
+ trigger?: 'visible' | 'manual' | 'scroll';
162
+ /**
163
+ * Flip through other alphabets before landing: `true` for the built-in set (kana, Hangul, accented Latin, Cyrillic, Greek, then
164
+ * digits and signs) or your own list, one string of letters per alphabet. Each flip fills every unresolved letter from one
165
+ * alphabet, drawn in the element's font at the letter's own place; letters lock left to right over the last 60% of the run.
166
+ * The default `duration` becomes 1400.
167
+ */
168
+ scramble?: boolean | string[];
159
169
  /** Decode again when the pointer enters. Default true. */
160
170
  replayOnHover?: boolean;
161
171
  /** `glyphs` keeps the headline in characters; `text` hands back to the crisp HTML text at the end. Default `glyphs`. */
@@ -165,6 +175,8 @@ interface DecodeHandle extends KitHandle<DecodeOptions> {
165
175
  /** Plays the decode again from the drift. */
166
176
  replay(): void;
167
177
  }
178
+ /** The built-in alphabets `scramble: true` flips through. */
179
+ declare const SCRAMBLE_SCRIPTS: string[];
168
180
  /** A headline that condenses out of a drifting field of characters, left to right through a flickering band. */
169
181
  declare function decode(element: HTMLElement, options?: DecodeOptions): DecodeHandle;
170
182
 
@@ -402,6 +414,13 @@ interface WordmarkOptions extends KitOptions {
402
414
  artHeight?: number;
403
415
  /** The canvas's accessible name when the word is not the element's own text. Default the word. */
404
416
  label?: string;
417
+ /**
418
+ * The word gathers out of scattered pieces: `visible` once as it scrolls into view (over `duration`), `scroll` with scroll
419
+ * position, scattering again as it leaves. Off under reduced motion. Default off.
420
+ */
421
+ assemble?: 'visible' | 'scroll' | false;
422
+ /** Ms the `visible` assembly takes. Default 1400. */
423
+ duration?: number;
405
424
  }
406
425
  interface WordmarkHandle extends KitHandle<WordmarkOptions> {
407
426
  /** Sets the word again, as large as fits. */
@@ -665,9 +684,13 @@ interface PageDissolveHandle extends KitHandle<PageDissolveOptions> {
665
684
  /** A page or panel transition: one wave of characters from where the user clicked carries the old view out and the next one in. */
666
685
  declare function pageDissolve(container: HTMLElement, options?: PageDissolveOptions): PageDissolveHandle;
667
686
 
668
- type CursorTrailStyle = 'trail' | 'wake' | 'water' | 'sparkle';
687
+ type CursorTrailStyle = 'trail' | 'wake' | 'water' | 'sparkle' | 'spray';
669
688
  interface CursorTrailOptions extends KitOptions {
670
- /** `trail` the ink trail of a kit field's `hover: 'trail'` (the wordmark's), `wake` a softer, wider band along the path, `water` rings that spread from it, `sparkle` glints scattered along it. Default `trail`. */
689
+ /**
690
+ * `trail` the ink trail of a kit field's `hover: 'trail'` (the wordmark's), `wake` a softer, wider band along the path, `water`
691
+ * rings that spread from it, `sparkle` glints scattered along it, `spray` patches of diagonal hatching sprayed round the path
692
+ * (a drag draws a hatched selection box). Default `trail`.
693
+ */
671
694
  style?: CursorTrailStyle;
672
695
  /** Characters from empty to dense; the head of the trail takes the last one. Default ` .:-=+*#%@`. */
673
696
  charset?: string;
@@ -689,6 +712,11 @@ interface CursorTrailOptions extends KitOptions {
689
712
  zIndex?: number;
690
713
  /** More elements to stay quiet over, as a selector, on top of inputs, dialogs and `[data-ascii-cursor-skip]`. */
691
714
  skip?: string;
715
+ /**
716
+ * Small monospaced coordinate tags (`412, 168`) beside the newest marks and at a drag box's corners, in the ink with
717
+ * `--ascii-readout-text` (default white) on it. Decoration, hidden from assistive technology. Default false.
718
+ */
719
+ readout?: boolean;
692
720
  }
693
721
  interface CursorTrailHandle extends KitHandle<CursorTrailOptions> {
694
722
  /** True while something is fading on screen. */
@@ -703,6 +731,198 @@ interface CursorTrailHandle extends KitHandle<CursorTrailOptions> {
703
731
  */
704
732
  declare function cursorTrail(options?: CursorTrailOptions): CursorTrailHandle;
705
733
 
734
+ interface GlobePoint {
735
+ lat: number;
736
+ lon: number;
737
+ }
738
+ interface GlobeOptions extends KitOptions {
739
+ /** Degrees a second the globe turns; negative turns it the other way, 0 holds it. Default 6. */
740
+ speed?: number;
741
+ /** Longitude facing the viewer at the start, in degrees. Default -30 (the Americas and the Atlantic). */
742
+ lon?: number;
743
+ /** Tilt toward the viewer in degrees; positive shows more of the north. Default 18. */
744
+ tilt?: number;
745
+ /** Where land is, as a tone from 0 to 1 (or a boolean) for a latitude and longitude in degrees. Default the built-in world map. */
746
+ land?: (lat: number, lon: number) => number | boolean;
747
+ /** Latitude and longitude lines every this many degrees; 0 for none. Default 15. */
748
+ graticule?: number;
749
+ /** Places marked with a bright dot and a ring that keeps spreading from it. */
750
+ points?: GlobePoint[];
751
+ /** How strongly the far side's land shows through the near side's ocean, 0 to 1. Default 0.22. */
752
+ backside?: number;
753
+ /** The globe's diameter as a share of the element's shorter side. Default 0.92. */
754
+ size?: number;
755
+ /** Drag to turn it, with a little momentum. Default true. */
756
+ drag?: boolean;
757
+ /** Read to assistive technology. Without one the globe is decoration. */
758
+ label?: string;
759
+ }
760
+ interface GlobeHandle extends KitHandle<GlobeOptions> {
761
+ /** Turns the globe until `lon` (and `lat`, when given, through the tilt) faces the viewer. */
762
+ rotateTo(lon: number, lat?: number): void;
763
+ /** The longitude facing the viewer now. */
764
+ readonly lon: number;
765
+ }
766
+ /**
767
+ * A globe of dots: land, a faint ocean, latitude and longitude lines and the far side's land showing through, turning slowly.
768
+ * Drag turns it; `points` mark places with a spreading ring. It holds still under reduced motion, and a globe with `speed: 0`
769
+ * and no points draws once and idles.
770
+ */
771
+ declare function globe(element: HTMLElement, options?: GlobeOptions): GlobeHandle;
772
+
773
+ /** What swims. A `school` is one shoal of small fish that move together; its `count` is how many fish are in it. */
774
+ type OceanKind = 'fish' | 'shark' | 'hammerhead' | 'manta' | 'jellyfish' | 'school';
775
+ declare const OCEAN_KINDS: readonly OceanKind[];
776
+ interface OceanCreature {
777
+ kind: OceanKind;
778
+ /** Multiplies the kind's own length, which follows the element's shorter side. Default 1. */
779
+ size?: number;
780
+ /** How many: individuals, or for a `school` the fish in it. Default 1 (a school 28). Scaled by `density`. */
781
+ count?: number;
782
+ }
783
+ interface OceanOptions extends KitOptions {
784
+ /** What swims. Default a shark, a hammerhead, a manta, four fish, two jellyfish and a school of 28. */
785
+ creatures?: OceanCreature[];
786
+ /** Swimming pace, 0 holds everything; 1 is natural. Default 1. */
787
+ speed?: number;
788
+ /** Multiplies every count. Default 1. */
789
+ density?: number;
790
+ /** How far the depth layers go, 0 to 1: far creatures are smaller, fainter and slower. 0 puts everything on one plane. Default 0.7. */
791
+ depth?: number;
792
+ /** An ink per kind, as a CSS colour or theme token (`--brand`). Kinds without one use `ink`. Draws in source colour. */
793
+ palette?: Partial<Record<OceanKind, string>>;
794
+ /** `transparent` (default) or a CSS colour or token for the water behind the characters. */
795
+ background?: string;
796
+ /** The cursor scatters small fish and sharks turn to investigate it; a press sends a ripple. Default true. */
797
+ interactive?: boolean;
798
+ /** A press sends a ring through the field and scatters the fish near it. Default true; needs `interactive`. */
799
+ ripples?: boolean;
800
+ /** At the element's edges creatures turn back (`turn`, default) or swim out and come in on the other side (`wrap`). */
801
+ edges?: 'turn' | 'wrap';
802
+ /** The same seed always lays out and moves the same ocean. Default 1. */
803
+ seed?: number;
804
+ /** `under` (default) sits behind the element's content, as a background; `over` draws above it. */
805
+ layer?: 'under' | 'over';
806
+ /** Read to assistive technology. Without one the ocean is decoration. */
807
+ label?: string;
808
+ }
809
+ interface OceanHandle extends KitHandle<OceanOptions> {
810
+ /** Adds creatures of a kind (a whole school for `school`); returns how many were added. */
811
+ add(kind: OceanKind, options?: {
812
+ size?: number;
813
+ count?: number;
814
+ }): number;
815
+ /** Removes the most recently added creature of `kind` (or of any kind), a whole school at once. Returns whether one went. */
816
+ remove(kind?: OceanKind): boolean;
817
+ /** Creatures swimming now, every fish of a school counted. */
818
+ readonly count: number;
819
+ }
820
+ /**
821
+ * An ocean drawn as characters: fish, sharks, hammerheads, mantas, jellyfish and schools seen from above, each a procedural body
822
+ * that swims with a travelling wave, steers, wanders and schools, in depth layers that are smaller and fainter the deeper they
823
+ * swim. The cursor scatters small fish and sharks turn to investigate it; a press sends a ripple. It holds a still composition
824
+ * under reduced motion, and pauses off screen and in a hidden tab.
825
+ */
826
+ declare function ocean(element: HTMLElement, options?: OceanOptions): OceanHandle;
827
+
828
+ /** A frame to morph through: an image URL or element, a canvas, a video, or a function that draws white-on-black each frame. */
829
+ type MorphSource = string | HTMLImageElement | HTMLCanvasElement | HTMLVideoElement | ((pen: CanvasRenderingContext2D, w: number, h: number, now: number) => void);
830
+ interface MorphFieldOptions extends KitOptions {
831
+ /** The frames, in order. A function source animates every frame (a turning scene); the others are stills or video. */
832
+ sources: MorphSource[];
833
+ /** Ms each frame holds before the next morphs in. Default 3200. */
834
+ hold?: number;
835
+ /** Ms a morph takes. Default 1000. */
836
+ transition?: number;
837
+ /** Cycle through the frames on its own. Default true; off under reduced motion. */
838
+ autoplay?: boolean;
839
+ /** `cover` fills the element, cropping; `contain` fits inside it. Default `cover`. */
840
+ fit?: 'cover' | 'contain';
841
+ /** `under` sits below the element's content (a hero), `over` above it. Default `under`. */
842
+ layer?: 'under' | 'over';
843
+ /** Called as each morph starts, with the frame it is heading to: keep a caption or a counter ("2/5") in step. */
844
+ onChange?: (index: number) => void;
845
+ /** Read to assistive technology. Without one the field is decoration. */
846
+ label?: string;
847
+ }
848
+ interface MorphFieldHandle extends KitHandle<MorphFieldOptions> {
849
+ /** Morphs to the next frame. */
850
+ next(): void;
851
+ /** Morphs to frame `index`. */
852
+ go(index: number): void;
853
+ /** The frame showing, or being morphed to. */
854
+ readonly index: number;
855
+ }
856
+ /**
857
+ * Frames that morph into one another as the field's marks: by default diagonal engraved lines whose weight follows the tone, so
858
+ * one picture's stripes thin away as the next one's thicken. Holds each frame, then cross-fades; idles between morphs unless a
859
+ * frame is a video or a drawing function.
860
+ */
861
+ declare function morphField(element: HTMLElement, options: MorphFieldOptions): MorphFieldHandle;
862
+
863
+ interface DitherLight {
864
+ /** Centre as a share of the element's width and height; may lie outside 0..1 to light from past an edge. */
865
+ x: number;
866
+ y: number;
867
+ /** Radius as a share of the element's longer side. Default 0.6. */
868
+ radius?: number;
869
+ /** Peak tone, 0 to 1. Default 1. */
870
+ strength?: number;
871
+ }
872
+ interface DitherGradientOptions extends KitOptions {
873
+ /** The lights the gradient is made of. Default one broad light rising from just below the bottom edge. */
874
+ lights?: DitherLight[];
875
+ /** Tone of the ground between the lights, 0 to 1. Default 0.05. */
876
+ base?: number;
877
+ /** How much the lights drift and breathe, 0 (still: draws once, then idles) to 1. Default 0.35. */
878
+ motion?: number;
879
+ /** How far the first light leans toward the pointer, as a share of the element; 0 for none. Default 0.06. */
880
+ follow?: number;
881
+ /** `under` sits below the element's content (a hero's ground); `over` above it. Default `under`. */
882
+ layer?: 'under' | 'over';
883
+ }
884
+ interface DitherGradientHandle extends KitHandle<DitherGradientOptions> {
885
+ /** Replaces the lights; the next frame draws them. */
886
+ setLights(lights: DitherLight[]): void;
887
+ }
888
+ /**
889
+ * A gradient of soft lights drawn as a two-tone dither: the field's ink on the element's own background. The lights drift and
890
+ * breathe gently and the first leans toward the pointer. With `motion: 0` and the pointer away it draws once and idles; reduced
891
+ * motion draws one still frame.
892
+ */
893
+ declare function ditherGradient(element: HTMLElement, options?: DitherGradientOptions): DitherGradientHandle;
894
+
895
+ interface DitherImageOptions extends KitOptions {
896
+ /** The image: a URL or an `<img>`. Default the first `<img>` inside, hidden while the field draws it. */
897
+ src?: string | HTMLImageElement;
898
+ /**
899
+ * The brand's two tones: `[ground, ink]`, each a CSS colour or token. The ground fills the element under the marks; leave it
900
+ * `'transparent'` to keep the element's own background. Default `['transparent', '--ascii-ink-strong']`.
901
+ */
902
+ tones?: [string, string];
903
+ /** The mark the image is drawn in: `dither` (Bayer dots), `pixel`, `mosaic`, `dot`, `engraving`, `stipple`, … Default `dither`. */
904
+ mark?: FieldMark;
905
+ /** Cell size in CSS px. Default 5. */
906
+ cellSize?: number;
907
+ /** `visible` develops the image in from blank when it scrolls into view, `scroll` ties that to scroll position, `none` shows it at once. Default `visible`. */
908
+ reveal?: 'none' | 'visible' | 'scroll';
909
+ /** Length of the `visible` reveal in ms. Default 1100. */
910
+ duration?: number;
911
+ /** Cover crop focus, 0 to 1 on each axis. Default the centre. */
912
+ focus?: {
913
+ x: number;
914
+ y: number;
915
+ };
916
+ /** The canvas's accessible name. Default the image's `alt`. */
917
+ label?: string;
918
+ }
919
+ interface DitherImageHandle extends KitHandle<DitherImageOptions> {
920
+ /** Plays the reveal again from blank. */
921
+ replay(): void;
922
+ }
923
+ /** An image drawn in a brand's two tones as dither, pixels, dots or engraving, developing in as it scrolls into view. */
924
+ declare function ditherImage(element: HTMLElement, options?: DitherImageOptions): DitherImageHandle;
925
+
706
926
  interface SwipeDeckOptions extends KitOptions {
707
927
  /** The cards, in order. Each card's first `img` is drawn in characters. Default `[data-card]`. */
708
928
  cards?: string;
@@ -1164,6 +1384,15 @@ declare const cascade: BackgroundPreset;
1164
1384
  /** Points wander in their own cells, and neighbours close enough are linked by fine lines that come and go. */
1165
1385
  declare const constellation: BackgroundPreset;
1166
1386
 
1387
+ /** Thin branching veins: a faint network at rest, and new veins that grow toward the cursor and burst from a click. */
1388
+ declare const capillary: BackgroundPreset;
1389
+
1390
+ /** Soft blotches drifting on a slow current; the pointer stirs them into swirls that settle back. */
1391
+ declare const estuary: BackgroundPreset;
1392
+
1393
+ /** Rings of characters a click sends out across the field, a strong front and two echoes, over a faint grain. */
1394
+ declare const shockwave: BackgroundPreset;
1395
+
1167
1396
  /**
1168
1397
  * Curtains of light at three depths hang from the top in vertical rays, the nearest tallest and brightest, folding slowly.
1169
1398
  * @deprecated Retired from the curated set; kept so existing code still runs. `mesh` is the closest current preset.
@@ -1425,4 +1654,4 @@ declare function subscribeGlobalLook(listener: (look: GlobalLook | null) => void
1425
1654
  declare function setFieldBudget(n: number): void;
1426
1655
  declare const getFieldBudget: () => number;
1427
1656
 
1428
- export { type AccordionHandle, type AccordionImage, type AccordionOptions, type ArtPanelHandle, type ArtPanelOptions, type AsciiVideoHandle, type AsciiVideoOptions, BEAM_PALETTES, type BackgroundCharset, type BackgroundContext, type BackgroundCursor, type BackgroundHandle, type BackgroundMark, type BackgroundOptions, type BackgroundPreset, type BackgroundRun, type BackgroundSettings, type BeamHandle, type BeamMode, type BeamOptions, type BeamPalette, type BlockChartHandle, type BlockChartOptions, type Box, type ButtonLoadingHandle, type ButtonLoadingOptions, type ButtonState, type CodeInputHandle, type CodeInputOptions, type CodeState, type CommandPaletteHandle, type CommandPaletteOptions, type CompareHandle, type CompareOptions, type CursorTrailHandle, type CursorTrailOptions, type CursorTrailStyle, type DecodeHandle, type DecodeOptions, type DisintegrateOptions, type DropState, type DroppedImage, type DropzoneHandle, type DropzoneOptions, type FieldBackgroundHandle, type FieldBackgroundOptions, type FieldPreset, type GenerateState, type GlobalLook, type ImageGenerateHandle, type ImageGenerateOptions, type ImageStream, type ImageUpdate, KIT_STYLES, type KitHandle, type KitOptions, type KitStyle, type LikeBurstHandle, type LikeBurstOptions, type LikeMark, type OdometerHandle, type OdometerOptions, type OrbState, PILL_TONES, type PageDissolveHandle, type PageDissolveOptions, type PaintFrame, type PillHandle, type PillOptions, type PillTone, type PricingGlowHandle, type PricingGlowOptions, type PullRefreshHandle, type PullRefreshOptions, type PullState, type SkeletonBlock, type SkeletonHandle, type SkeletonOptions, type SlideToConfirmHandle, type SlideToConfirmOptions, type StatusOrbHandle, type StatusOrbOptions, type StreamState, type StreamTextHandle, type StreamTextOptions, type Surface, type SurfaceConfig, type SwipeDeckHandle, type SwipeDeckOptions, type TabsHandle, type TabsOptions, type TemplateDraw, type TemplateFrame, type ThinkingHandle, type ThinkingOptions, type ThinkingState, type Toast, type ToastStackHandle, type ToastStackOptions, VOICE_PALETTES, type VoiceOrbHandle, type VoiceOrbOptions, type VoicePalette, type VoiceState, type WordmarkHandle, type WordmarkOptions, accordion, artPanel, asciiVideo, aurora, background, backgroundCharset, beam, beamPalette, blockChart, buttonLoading, cascade, caustics, circuit, codeInput, commandPalette, compare, constellation, contour, cursorTrail, decode, disintegrate, dna, drift, dropzone, dune, etch, facet, fieldBackground, fire, fluid, getFieldBudget, getGlobalLook, grid, halftone, halo, imageGenerate, interference, likeBurst, mesh, moire, morph, mountCanvas, mountSurface, noise, odometer, pageDissolve, pill, pricingGlow, pullRefresh, pulse, rain, resolveColor, ripple, setFieldBudget, setGlobalLook, silk, skeleton, slideToConfirm, stars, statusOrb, streamText, subscribeGlobalLook, swell, swipeDeck, tabs, terrain, thinking, toastStack, veil, voiceOrb, voidWell, wave, weave, wordField, wordmark };
1657
+ export { type AccordionHandle, type AccordionImage, type AccordionOptions, type ArtPanelHandle, type ArtPanelOptions, type AsciiVideoHandle, type AsciiVideoOptions, BEAM_PALETTES, type BackgroundCharset, type BackgroundContext, type BackgroundCursor, type BackgroundHandle, type BackgroundMark, type BackgroundOptions, type BackgroundPreset, type BackgroundRun, type BackgroundSettings, type BeamHandle, type BeamMode, type BeamOptions, type BeamPalette, type BlockChartHandle, type BlockChartOptions, type Box, type ButtonLoadingHandle, type ButtonLoadingOptions, type ButtonState, type CodeInputHandle, type CodeInputOptions, type CodeState, type CommandPaletteHandle, type CommandPaletteOptions, type CompareHandle, type CompareOptions, type CursorTrailHandle, type CursorTrailOptions, type CursorTrailStyle, type DecodeHandle, type DecodeOptions, type DisintegrateOptions, type DitherGradientHandle, type DitherGradientOptions, type DitherImageHandle, type DitherImageOptions, type DitherLight, type DropState, type DroppedImage, type DropzoneHandle, type DropzoneOptions, type FieldBackgroundHandle, type FieldBackgroundOptions, type FieldPreset, type GenerateState, type GlobalLook, type GlobeHandle, type GlobeOptions, type GlobePoint, type ImageGenerateHandle, type ImageGenerateOptions, type ImageStream, type ImageUpdate, KIT_STYLES, type KitHandle, type KitOptions, type KitStyle, type LikeBurstHandle, type LikeBurstOptions, type LikeMark, type MorphFieldHandle, type MorphFieldOptions, type MorphSource, OCEAN_KINDS, type OceanCreature, type OceanHandle, type OceanKind, type OceanOptions, type OdometerHandle, type OdometerOptions, type OrbState, PILL_TONES, type PageDissolveHandle, type PageDissolveOptions, type PaintFrame, type PillHandle, type PillOptions, type PillTone, type PricingGlowHandle, type PricingGlowOptions, type PullRefreshHandle, type PullRefreshOptions, type PullState, SCRAMBLE_SCRIPTS, type SkeletonBlock, type SkeletonHandle, type SkeletonOptions, type SlideToConfirmHandle, type SlideToConfirmOptions, type StatusOrbHandle, type StatusOrbOptions, type StreamState, type StreamTextHandle, type StreamTextOptions, type Surface, type SurfaceConfig, type SwipeDeckHandle, type SwipeDeckOptions, type TabsHandle, type TabsOptions, type TemplateDraw, type TemplateFrame, type ThinkingHandle, type ThinkingOptions, type ThinkingState, type Toast, type ToastStackHandle, type ToastStackOptions, VOICE_PALETTES, type VoiceOrbHandle, type VoiceOrbOptions, type VoicePalette, type VoiceState, type WordmarkHandle, type WordmarkOptions, accordion, artPanel, asciiVideo, aurora, background, backgroundCharset, beam, beamPalette, blockChart, buttonLoading, capillary, cascade, caustics, circuit, codeInput, commandPalette, compare, constellation, contour, cursorTrail, decode, disintegrate, ditherGradient, ditherImage, dna, drift, dropzone, dune, estuary, etch, facet, fieldBackground, fire, fluid, getFieldBudget, getGlobalLook, globe, grid, halftone, halo, imageGenerate, interference, likeBurst, mesh, moire, morph, morphField, mountCanvas, mountSurface, noise, ocean, odometer, pageDissolve, pill, pricingGlow, pullRefresh, pulse, rain, resolveColor, ripple, setFieldBudget, setGlobalLook, shockwave, silk, skeleton, slideToConfirm, stars, statusOrb, streamText, subscribeGlobalLook, swell, swipeDeck, tabs, terrain, thinking, toastStack, veil, voiceOrb, voidWell, wave, weave, wordField, wordmark };
package/dist/kit.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { G as GlyphField, r as GlyphFieldOptions } from './glyph-field-DRC-7uVf.js';
1
+ import { G as GlyphField, r as GlyphFieldOptions, m as FieldMark } from './glyph-field-BCwGhohg.js';
2
2
  import { C as CHARACTER_SETS } from './characters-BgECi5Lf.js';
3
3
  import './hover-guide-DdFnAnfU.js';
4
4
 
@@ -154,8 +154,18 @@ interface DecodeOptions extends KitOptions {
154
154
  text?: string;
155
155
  /** Total length in ms: the first 30% is drift alone, then the words resolve left to right. Default 800. */
156
156
  duration?: number;
157
- /** `visible` decodes when the element scrolls into view; `manual` waits for `replay()`. Default `visible`. */
158
- trigger?: 'visible' | 'manual';
157
+ /**
158
+ * `visible` decodes when the element scrolls into view; `manual` waits for `replay()`; `scroll` ties the decode to scroll
159
+ * position, resolving as the element rises into view and undoing as it leaves (and idling while the page is still). Default `visible`.
160
+ */
161
+ trigger?: 'visible' | 'manual' | 'scroll';
162
+ /**
163
+ * Flip through other alphabets before landing: `true` for the built-in set (kana, Hangul, accented Latin, Cyrillic, Greek, then
164
+ * digits and signs) or your own list, one string of letters per alphabet. Each flip fills every unresolved letter from one
165
+ * alphabet, drawn in the element's font at the letter's own place; letters lock left to right over the last 60% of the run.
166
+ * The default `duration` becomes 1400.
167
+ */
168
+ scramble?: boolean | string[];
159
169
  /** Decode again when the pointer enters. Default true. */
160
170
  replayOnHover?: boolean;
161
171
  /** `glyphs` keeps the headline in characters; `text` hands back to the crisp HTML text at the end. Default `glyphs`. */
@@ -165,6 +175,8 @@ interface DecodeHandle extends KitHandle<DecodeOptions> {
165
175
  /** Plays the decode again from the drift. */
166
176
  replay(): void;
167
177
  }
178
+ /** The built-in alphabets `scramble: true` flips through. */
179
+ declare const SCRAMBLE_SCRIPTS: string[];
168
180
  /** A headline that condenses out of a drifting field of characters, left to right through a flickering band. */
169
181
  declare function decode(element: HTMLElement, options?: DecodeOptions): DecodeHandle;
170
182
 
@@ -402,6 +414,13 @@ interface WordmarkOptions extends KitOptions {
402
414
  artHeight?: number;
403
415
  /** The canvas's accessible name when the word is not the element's own text. Default the word. */
404
416
  label?: string;
417
+ /**
418
+ * The word gathers out of scattered pieces: `visible` once as it scrolls into view (over `duration`), `scroll` with scroll
419
+ * position, scattering again as it leaves. Off under reduced motion. Default off.
420
+ */
421
+ assemble?: 'visible' | 'scroll' | false;
422
+ /** Ms the `visible` assembly takes. Default 1400. */
423
+ duration?: number;
405
424
  }
406
425
  interface WordmarkHandle extends KitHandle<WordmarkOptions> {
407
426
  /** Sets the word again, as large as fits. */
@@ -665,9 +684,13 @@ interface PageDissolveHandle extends KitHandle<PageDissolveOptions> {
665
684
  /** A page or panel transition: one wave of characters from where the user clicked carries the old view out and the next one in. */
666
685
  declare function pageDissolve(container: HTMLElement, options?: PageDissolveOptions): PageDissolveHandle;
667
686
 
668
- type CursorTrailStyle = 'trail' | 'wake' | 'water' | 'sparkle';
687
+ type CursorTrailStyle = 'trail' | 'wake' | 'water' | 'sparkle' | 'spray';
669
688
  interface CursorTrailOptions extends KitOptions {
670
- /** `trail` the ink trail of a kit field's `hover: 'trail'` (the wordmark's), `wake` a softer, wider band along the path, `water` rings that spread from it, `sparkle` glints scattered along it. Default `trail`. */
689
+ /**
690
+ * `trail` the ink trail of a kit field's `hover: 'trail'` (the wordmark's), `wake` a softer, wider band along the path, `water`
691
+ * rings that spread from it, `sparkle` glints scattered along it, `spray` patches of diagonal hatching sprayed round the path
692
+ * (a drag draws a hatched selection box). Default `trail`.
693
+ */
671
694
  style?: CursorTrailStyle;
672
695
  /** Characters from empty to dense; the head of the trail takes the last one. Default ` .:-=+*#%@`. */
673
696
  charset?: string;
@@ -689,6 +712,11 @@ interface CursorTrailOptions extends KitOptions {
689
712
  zIndex?: number;
690
713
  /** More elements to stay quiet over, as a selector, on top of inputs, dialogs and `[data-ascii-cursor-skip]`. */
691
714
  skip?: string;
715
+ /**
716
+ * Small monospaced coordinate tags (`412, 168`) beside the newest marks and at a drag box's corners, in the ink with
717
+ * `--ascii-readout-text` (default white) on it. Decoration, hidden from assistive technology. Default false.
718
+ */
719
+ readout?: boolean;
692
720
  }
693
721
  interface CursorTrailHandle extends KitHandle<CursorTrailOptions> {
694
722
  /** True while something is fading on screen. */
@@ -703,6 +731,198 @@ interface CursorTrailHandle extends KitHandle<CursorTrailOptions> {
703
731
  */
704
732
  declare function cursorTrail(options?: CursorTrailOptions): CursorTrailHandle;
705
733
 
734
+ interface GlobePoint {
735
+ lat: number;
736
+ lon: number;
737
+ }
738
+ interface GlobeOptions extends KitOptions {
739
+ /** Degrees a second the globe turns; negative turns it the other way, 0 holds it. Default 6. */
740
+ speed?: number;
741
+ /** Longitude facing the viewer at the start, in degrees. Default -30 (the Americas and the Atlantic). */
742
+ lon?: number;
743
+ /** Tilt toward the viewer in degrees; positive shows more of the north. Default 18. */
744
+ tilt?: number;
745
+ /** Where land is, as a tone from 0 to 1 (or a boolean) for a latitude and longitude in degrees. Default the built-in world map. */
746
+ land?: (lat: number, lon: number) => number | boolean;
747
+ /** Latitude and longitude lines every this many degrees; 0 for none. Default 15. */
748
+ graticule?: number;
749
+ /** Places marked with a bright dot and a ring that keeps spreading from it. */
750
+ points?: GlobePoint[];
751
+ /** How strongly the far side's land shows through the near side's ocean, 0 to 1. Default 0.22. */
752
+ backside?: number;
753
+ /** The globe's diameter as a share of the element's shorter side. Default 0.92. */
754
+ size?: number;
755
+ /** Drag to turn it, with a little momentum. Default true. */
756
+ drag?: boolean;
757
+ /** Read to assistive technology. Without one the globe is decoration. */
758
+ label?: string;
759
+ }
760
+ interface GlobeHandle extends KitHandle<GlobeOptions> {
761
+ /** Turns the globe until `lon` (and `lat`, when given, through the tilt) faces the viewer. */
762
+ rotateTo(lon: number, lat?: number): void;
763
+ /** The longitude facing the viewer now. */
764
+ readonly lon: number;
765
+ }
766
+ /**
767
+ * A globe of dots: land, a faint ocean, latitude and longitude lines and the far side's land showing through, turning slowly.
768
+ * Drag turns it; `points` mark places with a spreading ring. It holds still under reduced motion, and a globe with `speed: 0`
769
+ * and no points draws once and idles.
770
+ */
771
+ declare function globe(element: HTMLElement, options?: GlobeOptions): GlobeHandle;
772
+
773
+ /** What swims. A `school` is one shoal of small fish that move together; its `count` is how many fish are in it. */
774
+ type OceanKind = 'fish' | 'shark' | 'hammerhead' | 'manta' | 'jellyfish' | 'school';
775
+ declare const OCEAN_KINDS: readonly OceanKind[];
776
+ interface OceanCreature {
777
+ kind: OceanKind;
778
+ /** Multiplies the kind's own length, which follows the element's shorter side. Default 1. */
779
+ size?: number;
780
+ /** How many: individuals, or for a `school` the fish in it. Default 1 (a school 28). Scaled by `density`. */
781
+ count?: number;
782
+ }
783
+ interface OceanOptions extends KitOptions {
784
+ /** What swims. Default a shark, a hammerhead, a manta, four fish, two jellyfish and a school of 28. */
785
+ creatures?: OceanCreature[];
786
+ /** Swimming pace, 0 holds everything; 1 is natural. Default 1. */
787
+ speed?: number;
788
+ /** Multiplies every count. Default 1. */
789
+ density?: number;
790
+ /** How far the depth layers go, 0 to 1: far creatures are smaller, fainter and slower. 0 puts everything on one plane. Default 0.7. */
791
+ depth?: number;
792
+ /** An ink per kind, as a CSS colour or theme token (`--brand`). Kinds without one use `ink`. Draws in source colour. */
793
+ palette?: Partial<Record<OceanKind, string>>;
794
+ /** `transparent` (default) or a CSS colour or token for the water behind the characters. */
795
+ background?: string;
796
+ /** The cursor scatters small fish and sharks turn to investigate it; a press sends a ripple. Default true. */
797
+ interactive?: boolean;
798
+ /** A press sends a ring through the field and scatters the fish near it. Default true; needs `interactive`. */
799
+ ripples?: boolean;
800
+ /** At the element's edges creatures turn back (`turn`, default) or swim out and come in on the other side (`wrap`). */
801
+ edges?: 'turn' | 'wrap';
802
+ /** The same seed always lays out and moves the same ocean. Default 1. */
803
+ seed?: number;
804
+ /** `under` (default) sits behind the element's content, as a background; `over` draws above it. */
805
+ layer?: 'under' | 'over';
806
+ /** Read to assistive technology. Without one the ocean is decoration. */
807
+ label?: string;
808
+ }
809
+ interface OceanHandle extends KitHandle<OceanOptions> {
810
+ /** Adds creatures of a kind (a whole school for `school`); returns how many were added. */
811
+ add(kind: OceanKind, options?: {
812
+ size?: number;
813
+ count?: number;
814
+ }): number;
815
+ /** Removes the most recently added creature of `kind` (or of any kind), a whole school at once. Returns whether one went. */
816
+ remove(kind?: OceanKind): boolean;
817
+ /** Creatures swimming now, every fish of a school counted. */
818
+ readonly count: number;
819
+ }
820
+ /**
821
+ * An ocean drawn as characters: fish, sharks, hammerheads, mantas, jellyfish and schools seen from above, each a procedural body
822
+ * that swims with a travelling wave, steers, wanders and schools, in depth layers that are smaller and fainter the deeper they
823
+ * swim. The cursor scatters small fish and sharks turn to investigate it; a press sends a ripple. It holds a still composition
824
+ * under reduced motion, and pauses off screen and in a hidden tab.
825
+ */
826
+ declare function ocean(element: HTMLElement, options?: OceanOptions): OceanHandle;
827
+
828
+ /** A frame to morph through: an image URL or element, a canvas, a video, or a function that draws white-on-black each frame. */
829
+ type MorphSource = string | HTMLImageElement | HTMLCanvasElement | HTMLVideoElement | ((pen: CanvasRenderingContext2D, w: number, h: number, now: number) => void);
830
+ interface MorphFieldOptions extends KitOptions {
831
+ /** The frames, in order. A function source animates every frame (a turning scene); the others are stills or video. */
832
+ sources: MorphSource[];
833
+ /** Ms each frame holds before the next morphs in. Default 3200. */
834
+ hold?: number;
835
+ /** Ms a morph takes. Default 1000. */
836
+ transition?: number;
837
+ /** Cycle through the frames on its own. Default true; off under reduced motion. */
838
+ autoplay?: boolean;
839
+ /** `cover` fills the element, cropping; `contain` fits inside it. Default `cover`. */
840
+ fit?: 'cover' | 'contain';
841
+ /** `under` sits below the element's content (a hero), `over` above it. Default `under`. */
842
+ layer?: 'under' | 'over';
843
+ /** Called as each morph starts, with the frame it is heading to: keep a caption or a counter ("2/5") in step. */
844
+ onChange?: (index: number) => void;
845
+ /** Read to assistive technology. Without one the field is decoration. */
846
+ label?: string;
847
+ }
848
+ interface MorphFieldHandle extends KitHandle<MorphFieldOptions> {
849
+ /** Morphs to the next frame. */
850
+ next(): void;
851
+ /** Morphs to frame `index`. */
852
+ go(index: number): void;
853
+ /** The frame showing, or being morphed to. */
854
+ readonly index: number;
855
+ }
856
+ /**
857
+ * Frames that morph into one another as the field's marks: by default diagonal engraved lines whose weight follows the tone, so
858
+ * one picture's stripes thin away as the next one's thicken. Holds each frame, then cross-fades; idles between morphs unless a
859
+ * frame is a video or a drawing function.
860
+ */
861
+ declare function morphField(element: HTMLElement, options: MorphFieldOptions): MorphFieldHandle;
862
+
863
+ interface DitherLight {
864
+ /** Centre as a share of the element's width and height; may lie outside 0..1 to light from past an edge. */
865
+ x: number;
866
+ y: number;
867
+ /** Radius as a share of the element's longer side. Default 0.6. */
868
+ radius?: number;
869
+ /** Peak tone, 0 to 1. Default 1. */
870
+ strength?: number;
871
+ }
872
+ interface DitherGradientOptions extends KitOptions {
873
+ /** The lights the gradient is made of. Default one broad light rising from just below the bottom edge. */
874
+ lights?: DitherLight[];
875
+ /** Tone of the ground between the lights, 0 to 1. Default 0.05. */
876
+ base?: number;
877
+ /** How much the lights drift and breathe, 0 (still: draws once, then idles) to 1. Default 0.35. */
878
+ motion?: number;
879
+ /** How far the first light leans toward the pointer, as a share of the element; 0 for none. Default 0.06. */
880
+ follow?: number;
881
+ /** `under` sits below the element's content (a hero's ground); `over` above it. Default `under`. */
882
+ layer?: 'under' | 'over';
883
+ }
884
+ interface DitherGradientHandle extends KitHandle<DitherGradientOptions> {
885
+ /** Replaces the lights; the next frame draws them. */
886
+ setLights(lights: DitherLight[]): void;
887
+ }
888
+ /**
889
+ * A gradient of soft lights drawn as a two-tone dither: the field's ink on the element's own background. The lights drift and
890
+ * breathe gently and the first leans toward the pointer. With `motion: 0` and the pointer away it draws once and idles; reduced
891
+ * motion draws one still frame.
892
+ */
893
+ declare function ditherGradient(element: HTMLElement, options?: DitherGradientOptions): DitherGradientHandle;
894
+
895
+ interface DitherImageOptions extends KitOptions {
896
+ /** The image: a URL or an `<img>`. Default the first `<img>` inside, hidden while the field draws it. */
897
+ src?: string | HTMLImageElement;
898
+ /**
899
+ * The brand's two tones: `[ground, ink]`, each a CSS colour or token. The ground fills the element under the marks; leave it
900
+ * `'transparent'` to keep the element's own background. Default `['transparent', '--ascii-ink-strong']`.
901
+ */
902
+ tones?: [string, string];
903
+ /** The mark the image is drawn in: `dither` (Bayer dots), `pixel`, `mosaic`, `dot`, `engraving`, `stipple`, … Default `dither`. */
904
+ mark?: FieldMark;
905
+ /** Cell size in CSS px. Default 5. */
906
+ cellSize?: number;
907
+ /** `visible` develops the image in from blank when it scrolls into view, `scroll` ties that to scroll position, `none` shows it at once. Default `visible`. */
908
+ reveal?: 'none' | 'visible' | 'scroll';
909
+ /** Length of the `visible` reveal in ms. Default 1100. */
910
+ duration?: number;
911
+ /** Cover crop focus, 0 to 1 on each axis. Default the centre. */
912
+ focus?: {
913
+ x: number;
914
+ y: number;
915
+ };
916
+ /** The canvas's accessible name. Default the image's `alt`. */
917
+ label?: string;
918
+ }
919
+ interface DitherImageHandle extends KitHandle<DitherImageOptions> {
920
+ /** Plays the reveal again from blank. */
921
+ replay(): void;
922
+ }
923
+ /** An image drawn in a brand's two tones as dither, pixels, dots or engraving, developing in as it scrolls into view. */
924
+ declare function ditherImage(element: HTMLElement, options?: DitherImageOptions): DitherImageHandle;
925
+
706
926
  interface SwipeDeckOptions extends KitOptions {
707
927
  /** The cards, in order. Each card's first `img` is drawn in characters. Default `[data-card]`. */
708
928
  cards?: string;
@@ -1164,6 +1384,15 @@ declare const cascade: BackgroundPreset;
1164
1384
  /** Points wander in their own cells, and neighbours close enough are linked by fine lines that come and go. */
1165
1385
  declare const constellation: BackgroundPreset;
1166
1386
 
1387
+ /** Thin branching veins: a faint network at rest, and new veins that grow toward the cursor and burst from a click. */
1388
+ declare const capillary: BackgroundPreset;
1389
+
1390
+ /** Soft blotches drifting on a slow current; the pointer stirs them into swirls that settle back. */
1391
+ declare const estuary: BackgroundPreset;
1392
+
1393
+ /** Rings of characters a click sends out across the field, a strong front and two echoes, over a faint grain. */
1394
+ declare const shockwave: BackgroundPreset;
1395
+
1167
1396
  /**
1168
1397
  * Curtains of light at three depths hang from the top in vertical rays, the nearest tallest and brightest, folding slowly.
1169
1398
  * @deprecated Retired from the curated set; kept so existing code still runs. `mesh` is the closest current preset.
@@ -1425,4 +1654,4 @@ declare function subscribeGlobalLook(listener: (look: GlobalLook | null) => void
1425
1654
  declare function setFieldBudget(n: number): void;
1426
1655
  declare const getFieldBudget: () => number;
1427
1656
 
1428
- export { type AccordionHandle, type AccordionImage, type AccordionOptions, type ArtPanelHandle, type ArtPanelOptions, type AsciiVideoHandle, type AsciiVideoOptions, BEAM_PALETTES, type BackgroundCharset, type BackgroundContext, type BackgroundCursor, type BackgroundHandle, type BackgroundMark, type BackgroundOptions, type BackgroundPreset, type BackgroundRun, type BackgroundSettings, type BeamHandle, type BeamMode, type BeamOptions, type BeamPalette, type BlockChartHandle, type BlockChartOptions, type Box, type ButtonLoadingHandle, type ButtonLoadingOptions, type ButtonState, type CodeInputHandle, type CodeInputOptions, type CodeState, type CommandPaletteHandle, type CommandPaletteOptions, type CompareHandle, type CompareOptions, type CursorTrailHandle, type CursorTrailOptions, type CursorTrailStyle, type DecodeHandle, type DecodeOptions, type DisintegrateOptions, type DropState, type DroppedImage, type DropzoneHandle, type DropzoneOptions, type FieldBackgroundHandle, type FieldBackgroundOptions, type FieldPreset, type GenerateState, type GlobalLook, type ImageGenerateHandle, type ImageGenerateOptions, type ImageStream, type ImageUpdate, KIT_STYLES, type KitHandle, type KitOptions, type KitStyle, type LikeBurstHandle, type LikeBurstOptions, type LikeMark, type OdometerHandle, type OdometerOptions, type OrbState, PILL_TONES, type PageDissolveHandle, type PageDissolveOptions, type PaintFrame, type PillHandle, type PillOptions, type PillTone, type PricingGlowHandle, type PricingGlowOptions, type PullRefreshHandle, type PullRefreshOptions, type PullState, type SkeletonBlock, type SkeletonHandle, type SkeletonOptions, type SlideToConfirmHandle, type SlideToConfirmOptions, type StatusOrbHandle, type StatusOrbOptions, type StreamState, type StreamTextHandle, type StreamTextOptions, type Surface, type SurfaceConfig, type SwipeDeckHandle, type SwipeDeckOptions, type TabsHandle, type TabsOptions, type TemplateDraw, type TemplateFrame, type ThinkingHandle, type ThinkingOptions, type ThinkingState, type Toast, type ToastStackHandle, type ToastStackOptions, VOICE_PALETTES, type VoiceOrbHandle, type VoiceOrbOptions, type VoicePalette, type VoiceState, type WordmarkHandle, type WordmarkOptions, accordion, artPanel, asciiVideo, aurora, background, backgroundCharset, beam, beamPalette, blockChart, buttonLoading, cascade, caustics, circuit, codeInput, commandPalette, compare, constellation, contour, cursorTrail, decode, disintegrate, dna, drift, dropzone, dune, etch, facet, fieldBackground, fire, fluid, getFieldBudget, getGlobalLook, grid, halftone, halo, imageGenerate, interference, likeBurst, mesh, moire, morph, mountCanvas, mountSurface, noise, odometer, pageDissolve, pill, pricingGlow, pullRefresh, pulse, rain, resolveColor, ripple, setFieldBudget, setGlobalLook, silk, skeleton, slideToConfirm, stars, statusOrb, streamText, subscribeGlobalLook, swell, swipeDeck, tabs, terrain, thinking, toastStack, veil, voiceOrb, voidWell, wave, weave, wordField, wordmark };
1657
+ export { type AccordionHandle, type AccordionImage, type AccordionOptions, type ArtPanelHandle, type ArtPanelOptions, type AsciiVideoHandle, type AsciiVideoOptions, BEAM_PALETTES, type BackgroundCharset, type BackgroundContext, type BackgroundCursor, type BackgroundHandle, type BackgroundMark, type BackgroundOptions, type BackgroundPreset, type BackgroundRun, type BackgroundSettings, type BeamHandle, type BeamMode, type BeamOptions, type BeamPalette, type BlockChartHandle, type BlockChartOptions, type Box, type ButtonLoadingHandle, type ButtonLoadingOptions, type ButtonState, type CodeInputHandle, type CodeInputOptions, type CodeState, type CommandPaletteHandle, type CommandPaletteOptions, type CompareHandle, type CompareOptions, type CursorTrailHandle, type CursorTrailOptions, type CursorTrailStyle, type DecodeHandle, type DecodeOptions, type DisintegrateOptions, type DitherGradientHandle, type DitherGradientOptions, type DitherImageHandle, type DitherImageOptions, type DitherLight, type DropState, type DroppedImage, type DropzoneHandle, type DropzoneOptions, type FieldBackgroundHandle, type FieldBackgroundOptions, type FieldPreset, type GenerateState, type GlobalLook, type GlobeHandle, type GlobeOptions, type GlobePoint, type ImageGenerateHandle, type ImageGenerateOptions, type ImageStream, type ImageUpdate, KIT_STYLES, type KitHandle, type KitOptions, type KitStyle, type LikeBurstHandle, type LikeBurstOptions, type LikeMark, type MorphFieldHandle, type MorphFieldOptions, type MorphSource, OCEAN_KINDS, type OceanCreature, type OceanHandle, type OceanKind, type OceanOptions, type OdometerHandle, type OdometerOptions, type OrbState, PILL_TONES, type PageDissolveHandle, type PageDissolveOptions, type PaintFrame, type PillHandle, type PillOptions, type PillTone, type PricingGlowHandle, type PricingGlowOptions, type PullRefreshHandle, type PullRefreshOptions, type PullState, SCRAMBLE_SCRIPTS, type SkeletonBlock, type SkeletonHandle, type SkeletonOptions, type SlideToConfirmHandle, type SlideToConfirmOptions, type StatusOrbHandle, type StatusOrbOptions, type StreamState, type StreamTextHandle, type StreamTextOptions, type Surface, type SurfaceConfig, type SwipeDeckHandle, type SwipeDeckOptions, type TabsHandle, type TabsOptions, type TemplateDraw, type TemplateFrame, type ThinkingHandle, type ThinkingOptions, type ThinkingState, type Toast, type ToastStackHandle, type ToastStackOptions, VOICE_PALETTES, type VoiceOrbHandle, type VoiceOrbOptions, type VoicePalette, type VoiceState, type WordmarkHandle, type WordmarkOptions, accordion, artPanel, asciiVideo, aurora, background, backgroundCharset, beam, beamPalette, blockChart, buttonLoading, capillary, cascade, caustics, circuit, codeInput, commandPalette, compare, constellation, contour, cursorTrail, decode, disintegrate, ditherGradient, ditherImage, dna, drift, dropzone, dune, estuary, etch, facet, fieldBackground, fire, fluid, getFieldBudget, getGlobalLook, globe, grid, halftone, halo, imageGenerate, interference, likeBurst, mesh, moire, morph, morphField, mountCanvas, mountSurface, noise, ocean, odometer, pageDissolve, pill, pricingGlow, pullRefresh, pulse, rain, resolveColor, ripple, setFieldBudget, setGlobalLook, shockwave, silk, skeleton, slideToConfirm, stars, statusOrb, streamText, subscribeGlobalLook, swell, swipeDeck, tabs, terrain, thinking, toastStack, veil, voiceOrb, voidWell, wave, weave, wordField, wordmark };
package/dist/kit.js CHANGED
@@ -1 +1 @@
1
- export{voidWell}from"./kit/chunk-7M2FFUZ3.js";export{wave}from"./kit/chunk-2GAV4OAK.js";export{weave}from"./kit/chunk-W4U5CK6L.js";export{morph}from"./kit/chunk-GKR3ROYR.js";export{noise}from"./kit/chunk-M5VVLYI2.js";export{pulse}from"./kit/chunk-KEE55QSD.js";export{rain}from"./kit/chunk-BFBG3VHI.js";export{silk}from"./kit/chunk-3LJ5C3U3.js";export{stars}from"./kit/chunk-ORSI57T2.js";export{terrain}from"./kit/chunk-QSTDYL35.js";export{veil}from"./kit/chunk-CGSWUO67.js";export{circuit}from"./kit/chunk-E3FPFANJ.js";export{dna}from"./kit/chunk-AIGAJMNN.js";export{dune}from"./kit/chunk-ZCXNGJGB.js";export{etch}from"./kit/chunk-CG6SGQMY.js";export{facet}from"./kit/chunk-6WU247CB.js";export{fire}from"./kit/chunk-UVLKCAKH.js";export{grid}from"./kit/chunk-WI2AF2KE.js";export{moire}from"./kit/chunk-B3TY6UXJ.js";import"./kit/chunk-XPXMCXYI.js";import"./kit/chunk-ZCHGV2CV.js";export{mountCanvas}from"./kit/chunk-3OD5BMF5.js";export{ripple}from"./kit/chunk-Z3KD6CLE.js";export{halo}from"./kit/chunk-6G5MPND3.js";export{interference}from"./kit/chunk-EKYEA7Z4.js";export{mesh}from"./kit/chunk-776H2BJ7.js";export{cascade}from"./kit/chunk-TRDA73HN.js";export{constellation}from"./kit/chunk-3MHEDZLZ.js";export{aurora}from"./kit/chunk-FHN3PPSI.js";export{halftone}from"./kit/chunk-DMRPBFLW.js";export{pullRefresh}from"./kit/chunk-4U72YE65.js";export{background,backgroundCharset}from"./kit/chunk-NW4U2YRE.js";export{swell}from"./kit/chunk-KY5KCIZE.js";export{drift}from"./kit/chunk-GBNV3GXG.js";export{wordField}from"./kit/chunk-RXOPJJC4.js";export{fluid}from"./kit/chunk-UOYBFLGJ.js";export{caustics}from"./kit/chunk-F6F2C3RH.js";export{contour}from"./kit/chunk-FPCCX4FM.js";import"./kit/chunk-3VEMKDBW.js";export{codeInput}from"./kit/chunk-KFXMLIVF.js";export{toastStack}from"./kit/chunk-OZFSNW5N.js";export{thinking}from"./kit/chunk-ZWZZMU5P.js";export{streamText}from"./kit/chunk-4NV5APSJ.js";export{compare}from"./kit/chunk-YSN7EHSH.js";export{accordion}from"./kit/chunk-G4ZSMTFN.js";export{dropzone}from"./kit/chunk-HYVTFKWX.js";export{disintegrate}from"./kit/chunk-3YSK7V26.js";export{VOICE_PALETTES,voiceOrb}from"./kit/chunk-KXI3T72F.js";export{commandPalette}from"./kit/chunk-PGFBIU7R.js";import"./kit/chunk-PB5E3D4E.js";export{likeBurst}from"./kit/chunk-NF4WVWAC.js";export{blockChart}from"./kit/chunk-VBWG7HQA.js";export{pageDissolve}from"./kit/chunk-LVCGC3SO.js";import"./kit/chunk-Z2FRNFMB.js";export{cursorTrail}from"./kit/chunk-EEV6Y7NH.js";export{swipeDeck}from"./kit/chunk-FWODCYYJ.js";export{slideToConfirm}from"./kit/chunk-K6JX64AS.js";export{tabs}from"./kit/chunk-KLRF3S7O.js";export{imageGenerate}from"./kit/chunk-KDROJANO.js";export{fieldBackground}from"./kit/chunk-ILXVBO7M.js";export{wordmark}from"./kit/chunk-I5R2347P.js";export{asciiVideo}from"./kit/chunk-2LBQ7QJT.js";export{artPanel}from"./kit/chunk-XUCYFWC3.js";export{pricingGlow}from"./kit/chunk-42KMN727.js";import"./kit/chunk-7DXSG526.js";export{BEAM_PALETTES,beam,beamPalette}from"./kit/chunk-SDSW7422.js";export{decode}from"./kit/chunk-VV2KP7ZW.js";export{odometer}from"./kit/chunk-2FH6GGV6.js";export{buttonLoading}from"./kit/chunk-QVICL57J.js";export{statusOrb}from"./kit/chunk-KCEYRIU4.js";export{skeleton}from"./kit/chunk-H5KHXZWR.js";export{PILL_TONES,pill}from"./kit/chunk-WDS7VM2E.js";export{mountSurface,resolveColor}from"./kit/chunk-GF72XM4C.js";export{KIT_STYLES,getFieldBudget,getGlobalLook,setFieldBudget,setGlobalLook,subscribeGlobalLook}from"./kit/chunk-FEAFQY7O.js";//# sourceMappingURL=kit.js.map
1
+ export{voidWell}from"./kit/chunk-MZDZ6G75.js";export{wave}from"./kit/chunk-KO5NAI4S.js";export{weave}from"./kit/chunk-P5MVACML.js";export{morph}from"./kit/chunk-6YLMG37G.js";export{noise}from"./kit/chunk-7NS6YAD3.js";export{pulse}from"./kit/chunk-XJBVU5QP.js";export{rain}from"./kit/chunk-RPSE33GI.js";export{silk}from"./kit/chunk-6646EUJY.js";export{stars}from"./kit/chunk-DANNL7WR.js";export{terrain}from"./kit/chunk-RU2KQTTL.js";export{veil}from"./kit/chunk-R3ALZFUQ.js";export{circuit}from"./kit/chunk-26HU7QJW.js";export{dna}from"./kit/chunk-P5M6AQQX.js";export{dune}from"./kit/chunk-NQ4PFWOG.js";export{etch}from"./kit/chunk-ZGCKUXYP.js";export{facet}from"./kit/chunk-UXDJSGED.js";export{fire}from"./kit/chunk-XB7XBYHA.js";export{grid}from"./kit/chunk-VXPUEFYR.js";export{moire}from"./kit/chunk-XDX6WLED.js";import"./kit/chunk-XPXMCXYI.js";export{mountCanvas}from"./kit/chunk-AAV5QNHU.js";export{mesh}from"./kit/chunk-ECGALF3G.js";export{cascade}from"./kit/chunk-O25QXHEZ.js";export{constellation}from"./kit/chunk-J7TFGVZT.js";export{capillary}from"./kit/chunk-7OPCQDAL.js";export{estuary}from"./kit/chunk-LZGSWPH4.js";export{shockwave}from"./kit/chunk-2ZBPTNGK.js";import"./kit/chunk-ZCHGV2CV.js";import"./kit/chunk-ODLKGAX2.js";export{aurora}from"./kit/chunk-V3J6KJQ2.js";export{halftone}from"./kit/chunk-YFW377RN.js";export{drift}from"./kit/chunk-UZR3T5XA.js";export{wordField}from"./kit/chunk-W3GINZLK.js";export{fluid}from"./kit/chunk-UT6MJP5B.js";export{caustics}from"./kit/chunk-WOKKM6CG.js";export{contour}from"./kit/chunk-7DBDSJ5R.js";export{ripple}from"./kit/chunk-JSRXW3FL.js";export{halo}from"./kit/chunk-CIGEXHZ5.js";export{interference}from"./kit/chunk-QRSVLQ2I.js";export{streamText}from"./kit/chunk-2NACMWVV.js";export{compare}from"./kit/chunk-NP7UG7DS.js";export{accordion}from"./kit/chunk-4NR7QENR.js";export{dropzone}from"./kit/chunk-TJHSBZBF.js";export{disintegrate}from"./kit/chunk-N7J4UAWY.js";export{pullRefresh}from"./kit/chunk-CZL5WMU6.js";export{background,backgroundCharset}from"./kit/chunk-X6GAMLEH.js";export{swell}from"./kit/chunk-62KEKWSM.js";import"./kit/chunk-VWFC5XOB.js";export{OCEAN_KINDS,ocean}from"./kit/chunk-EOTPXDMH.js";export{morphField}from"./kit/chunk-AU33Y2SZ.js";export{ditherGradient}from"./kit/chunk-BV6AOHFU.js";export{ditherImage}from"./kit/chunk-GI5BNKBL.js";export{swipeDeck}from"./kit/chunk-UHLNVM63.js";export{codeInput}from"./kit/chunk-E427W6P5.js";export{toastStack}from"./kit/chunk-WPWCFCEZ.js";export{thinking}from"./kit/chunk-VQ4KIRBW.js";export{VOICE_PALETTES,voiceOrb}from"./kit/chunk-JF3WEYIE.js";export{commandPalette}from"./kit/chunk-PZKQUZQK.js";import"./kit/chunk-DKRZSP5K.js";export{slideToConfirm}from"./kit/chunk-FU4WW3PU.js";export{likeBurst}from"./kit/chunk-MWUPCAET.js";export{blockChart}from"./kit/chunk-NSKX2OFA.js";export{pageDissolve}from"./kit/chunk-CMGMCRAD.js";import"./kit/chunk-HENGH3DE.js";export{cursorTrail}from"./kit/chunk-BQ53B2HP.js";export{globe}from"./kit/chunk-SBAUVRBY.js";export{tabs}from"./kit/chunk-V42Q4L2G.js";export{imageGenerate}from"./kit/chunk-BJJUDT26.js";export{fieldBackground}from"./kit/chunk-MT23DCGU.js";export{wordmark}from"./kit/chunk-SQNULNT3.js";export{asciiVideo}from"./kit/chunk-BO4CPM26.js";export{artPanel}from"./kit/chunk-ZTCSVEHT.js";export{pricingGlow}from"./kit/chunk-XVA7UGUQ.js";import"./kit/chunk-RGV7VRYC.js";export{BEAM_PALETTES,beam,beamPalette}from"./kit/chunk-WSWIOD2C.js";export{SCRAMBLE_SCRIPTS,decode}from"./kit/chunk-IFZDWKIX.js";export{odometer}from"./kit/chunk-6G2ZVIBS.js";export{buttonLoading}from"./kit/chunk-CH64MY3U.js";export{statusOrb}from"./kit/chunk-BGPEFFKK.js";export{skeleton}from"./kit/chunk-WRBLIULG.js";export{PILL_TONES,pill}from"./kit/chunk-J7Y2KBXK.js";export{mountSurface,resolveColor}from"./kit/chunk-I377LEZA.js";export{KIT_STYLES,getFieldBudget,getGlobalLook,setFieldBudget,setGlobalLook,subscribeGlobalLook}from"./kit/chunk-FEAFQY7O.js";//# sourceMappingURL=kit.js.map