jaml-ui 4.4.0 → 6.0.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 (105) hide show
  1. package/assets/jammy-seed-mascot.png +0 -0
  2. package/dist/assets/8BitDeck-B09C1jGy.png +0 -0
  3. package/dist/assets/BlindChips-Bnvhn76w.png +0 -0
  4. package/dist/assets/Boosters-Bqv_YhIn.png +0 -0
  5. package/dist/assets/Editions-B3YPqPOl.png +0 -0
  6. package/dist/assets/Enhancers-DhIlUuTX.png +0 -0
  7. package/dist/assets/Jokers-1egXSFFQ.png +0 -0
  8. package/dist/assets/Tarots-DkrFk7iW.png +0 -0
  9. package/dist/assets/Vouchers-Cdp8BeSE.png +0 -0
  10. package/dist/assets/balatro-stake-chips-BdO-bw7c.png +0 -0
  11. package/dist/assets/jammy-seed-mascot-BdoW3O33.png +0 -0
  12. package/dist/assets/m6x11plus-C8RqtTtG.ttf +0 -0
  13. package/dist/assets/stickers-B6y5vEyc.png +0 -0
  14. package/dist/assets/tags-BdxcVWR4.png +0 -0
  15. package/dist/assets.js +38 -0
  16. package/dist/assets.js.map +1 -0
  17. package/dist/chunks/JimboSwipeDeck-eog6nv7F.js +2122 -0
  18. package/dist/chunks/JimboSwipeDeck-eog6nv7F.js.map +1 -0
  19. package/dist/components/DailyRitualView.d.ts +17 -0
  20. package/dist/components/DeckStakePicker.d.ts +12 -0
  21. package/dist/components/JamlIdeToolbar.d.ts +2 -5
  22. package/dist/components/JamlIdeVisual.d.ts +2 -1
  23. package/dist/components/Jamlyzer.d.ts +14 -2
  24. package/dist/components/JamlyzerBulk.d.ts +5 -4
  25. package/dist/components/JamlyzerView.d.ts +1 -12
  26. package/dist/components/SeedCalculus.d.ts +17 -0
  27. package/dist/components/SeedLab.d.ts +21 -0
  28. package/dist/components/jamlSeedUtils.d.ts +1 -0
  29. package/dist/components/jamlyzer/JamlyzerAnteDetails.d.ts +4 -0
  30. package/dist/components/jamlyzer/JamlyzerErraticDeck.d.ts +2 -2
  31. package/dist/components/jamlyzer/JamlyzerPackSection.d.ts +1 -5
  32. package/dist/components/jamlyzer/JamlyzerPulls.d.ts +2 -2
  33. package/dist/components/jamlyzer/JamlyzerSeedCard.d.ts +21 -0
  34. package/dist/components/jamlyzer/JamlyzerTape.d.ts +10 -0
  35. package/dist/components/jamlyzer/highlight.d.ts +3 -3
  36. package/dist/decode/motelyItemDecoder.d.ts +1 -0
  37. package/dist/decode/motelySprite.d.ts +10 -13
  38. package/dist/decode/motelySpriteLut.generated.d.ts +2 -0
  39. package/dist/index.d.ts +14 -1
  40. package/dist/index.js +20029 -16982
  41. package/dist/index.js.map +1 -1
  42. package/dist/json-render/JimboJsonRenderer.d.ts +21 -0
  43. package/dist/json-render/catalog.d.ts +304 -180
  44. package/dist/json-render/index.d.ts +5 -30
  45. package/dist/json-render/registry.d.ts +2 -12
  46. package/dist/lib/daily/ritual.d.ts +43 -0
  47. package/dist/lib/jaml/{parseClauses.d.ts → jaml.d.ts} +17 -13
  48. package/dist/lib/jaml/rarity.d.ts +53 -0
  49. package/dist/lib/jaml/rarityData.generated.d.ts +727 -0
  50. package/dist/motely.js +688 -76
  51. package/dist/motely.js.map +1 -1
  52. package/dist/sprites.js +438 -0
  53. package/dist/sprites.js.map +1 -0
  54. package/dist/ui/JimboApp.d.ts +8 -6
  55. package/dist/ui/JimboBackground.d.ts +5 -13
  56. package/dist/ui/JimboButton.d.ts +1 -1
  57. package/dist/ui/JimboDock.d.ts +21 -0
  58. package/dist/ui/JimboMascot.d.ts +51 -5
  59. package/dist/ui/JimboOrbitalMenu.d.ts +81 -9
  60. package/dist/ui/JimboPanelSpinner.d.ts +14 -0
  61. package/dist/ui/JimboSeedCopyChip.d.ts +1 -2
  62. package/dist/ui/JimboShopBelt.d.ts +9 -0
  63. package/dist/ui/JimboSlider.d.ts +11 -0
  64. package/dist/ui/dockTree.d.ts +31 -0
  65. package/dist/ui/hooks.d.ts +1 -1
  66. package/dist/ui/jammySeedMascotImage.d.ts +1 -1
  67. package/dist/ui/jimbo.css +1 -1
  68. package/dist/ui/orbitalLayout.d.ts +149 -0
  69. package/dist/ui/orbitalMenuStore.d.ts +70 -0
  70. package/dist/ui/tokens.d.ts +9 -36
  71. package/dist/ui/useMotionPreference.d.ts +19 -0
  72. package/dist/ui.d.ts +18 -3
  73. package/dist/ui.js +78 -34
  74. package/dist/vocab.d.ts +26 -0
  75. package/package.json +136 -126
  76. package/README.md +0 -78
  77. package/assets/fonts/README.md +0 -14
  78. package/dist/chunks/JimboSwipeDeck-Cbe5Jdmw.js +0 -986
  79. package/dist/chunks/JimboSwipeDeck-Cbe5Jdmw.js.map +0 -1
  80. package/dist/chunks/Layer-B5y9UIAt.js +0 -19
  81. package/dist/chunks/Layer-B5y9UIAt.js.map +0 -1
  82. package/dist/chunks/motelyItemDecoder-Cb-RjvQ0.js +0 -692
  83. package/dist/chunks/motelyItemDecoder-Cb-RjvQ0.js.map +0 -1
  84. package/dist/chunks/spriteMapper-Dfr2_j0_.js +0 -501
  85. package/dist/chunks/spriteMapper-Dfr2_j0_.js.map +0 -1
  86. package/dist/components/jamlyzer/JamlyzerRail.d.ts +0 -14
  87. package/dist/core.d.ts +0 -5
  88. package/dist/core.js +0 -41
  89. package/dist/core.js.map +0 -1
  90. package/dist/json-render/builders/analyzer.d.ts +0 -23
  91. package/dist/json-render/builders/encyclopedia.d.ts +0 -14
  92. package/dist/json-render/builders/search.d.ts +0 -24
  93. package/dist/json-render/components/domain.d.ts +0 -59
  94. package/dist/json-render/components/game.d.ts +0 -18
  95. package/dist/json-render/components/layout.d.ts +0 -47
  96. package/dist/json-render/components/mascot.d.ts +0 -23
  97. package/dist/json-render/components/reference.d.ts +0 -39
  98. package/dist/json-render/engine.d.ts +0 -38
  99. package/dist/json-render/knowledge/bosses.d.ts +0 -18
  100. package/dist/json-render/knowledge/decks.d.ts +0 -22
  101. package/dist/json-render/knowledge/jokers.d.ts +0 -23
  102. package/dist/json-render/knowledge/synergies.d.ts +0 -21
  103. package/dist/lib/motely/jamlParse.d.ts +0 -4
  104. package/dist/lib/motely/runtime.d.ts +0 -1
  105. package/dist/motely.d.ts +0 -4
@@ -1,12 +1,58 @@
1
- import { HTMLAttributes } from 'react';
1
+ import { HTMLAttributes, ReactNode } from 'react';
2
2
  import { JimboOrbitalMenuItem } from './JimboOrbitalMenu.js';
3
+ import { JimboOrbitalStore } from './orbitalMenuStore.js';
3
4
  export interface JimboMascotProps extends HTMLAttributes<HTMLDivElement> {
4
5
  mood?: "idle" | "happy" | "surprised";
5
6
  /** Box size in px. Default 96. */
6
7
  size?: number;
7
- /** When present, tapping the mascot toggles a radial action menu. */
8
+ /** A flat ring, no submenus. Ignored when `getMenuItems` is given. */
8
9
  menuItems?: JimboOrbitalMenuItem[];
9
- onMenuAction?: (action: string) => void;
10
+ /**
11
+ * Resolve the items for a menu path — `[]`, `["main"]`, `["main","Tools"]`.
12
+ *
13
+ * This is the seam that makes submenus, paging and the south exit the
14
+ * mascot's job rather than every consumer's. An item with a `submenu` pushes
15
+ * onto the path; one with an `action` fires `onMenuAction`.
16
+ */
17
+ getMenuItems?: (menuStack: string[]) => JimboOrbitalMenuItem[];
18
+ onMenuAction?: (action: string, item: JimboOrbitalMenuItem) => void;
19
+ /**
20
+ * Largest orbit radius the ring may use, px. Pass
21
+ * `maxOrbitRadiusForBox(w, h)` for the box the mascot is sectioned into and
22
+ * the ring can never overflow it, however many items a menu holds.
23
+ */
24
+ maxOrbitRadius?: number;
25
+ /**
26
+ * Height of the box the mascot is sectioned into, px. Pins the south button
27
+ * to the box's bottom edge at full width — Balatro's exit law — instead of
28
+ * letting it ride the orbit radius.
29
+ */
30
+ orbitBoxHeight?: number;
31
+ /**
32
+ * Width of that same box, px.
33
+ *
34
+ * Load-bearing whenever `orbitBoxHeight` is set: the ring measures the
35
+ * element it is drawn into, and left to itself that element is the mascot's
36
+ * own box — a couple of hundred pixels narrower than the territory the ring
37
+ * owns. Pills then have nowhere to fly out to and stack on the character.
38
+ * Give the ring the real square and it fills it.
39
+ *
40
+ * The ring is centered on the mascot, so place the mascot where the ring's
41
+ * center belongs — usually the middle of that square.
42
+ */
43
+ orbitBoxWidth?: number;
44
+ /** Orbit radius before item-count growth. Default 90. */
45
+ baseOrbitRadius?: number;
46
+ /** Keep the ring shut (an overlay owns the screen). */
47
+ menuHidden?: boolean;
48
+ /** South-button label at the root of the menu. Deeper in it always says Back. */
49
+ closeLabel?: string;
50
+ /** Use a private menu store instead of the shared one. */
51
+ orbitalStore?: JimboOrbitalStore;
52
+ /** Draw something else as the character — the artwork seam. */
53
+ renderImage?: (info: {
54
+ size: number;
55
+ }) => ReactNode;
10
56
  }
11
- /** Jammy, the seed mascot — bounces, shakes, and hosts a radial menu. */
12
- export declare function JimboMascot({ mood, size, menuItems, onMenuAction, className, ...rest }: JimboMascotProps): import("react").JSX.Element;
57
+ /** Jammy, the seed mascot — bounces, shakes, and hosts the orbital menu. */
58
+ export declare function JimboMascot({ mood, size, menuItems, getMenuItems, onMenuAction, maxOrbitRadius, orbitBoxHeight, orbitBoxWidth, baseOrbitRadius, menuHidden, closeLabel, orbitalStore, renderImage, className, ...rest }: JimboMascotProps): import("react").JSX.Element;
@@ -1,15 +1,87 @@
1
- import { HTMLAttributes } from 'react';
2
- import { JimboBadgeTone } from './JimboBadge.js';
1
+ import { ReactNode } from 'react';
2
+ import { JimboStatus } from './JimboStatusPill.js';
3
+ export type JimboOrbitalTone = "red" | "blue" | "orange" | "green" | "purple";
4
+ /**
5
+ * Strict color semantics, carried over from the harvest because they are how
6
+ * the ring stays readable at a glance:
7
+ *
8
+ * RED submenu or plain action ORANGE toggle, and the way out
9
+ * BLUE talks to the assistant GREEN start (welcome screen only)
10
+ * PURPLE a counted / tallied thing
11
+ */
3
12
  export interface JimboOrbitalMenuItem {
4
13
  label: string;
5
- action: string;
6
- tone?: JimboBadgeTone;
14
+ /** Emitted through `onAction`. Omit when `submenu` is set. */
15
+ action?: string;
16
+ /** Pushes a submenu of this name instead of firing an action. */
17
+ submenu?: string;
18
+ tone?: JimboOrbitalTone;
19
+ /** Present (even as `false`) makes this a toggle and draws the state dot. */
20
+ active?: boolean;
21
+ disabled?: boolean;
22
+ /** Draws a tally on the pill's right edge. */
23
+ count?: number;
24
+ /** Drawn in place of a count. */
25
+ icon?: ReactNode;
26
+ tooltip?: string;
27
+ /** Renders a non-interactive status pill instead of a button. */
28
+ badge?: {
29
+ label: string;
30
+ status: JimboStatus;
31
+ };
32
+ /**
33
+ * Pin to the south slot. That slot is the way out — Balatro's exit law is a
34
+ * full-width button along the very bottom at any modal size — so at most one
35
+ * item should carry it.
36
+ */
37
+ south?: boolean;
38
+ /** Render at lower opacity (unavailable, but worth showing). */
39
+ dim?: boolean;
7
40
  }
8
- export interface JimboOrbitalMenuProps extends HTMLAttributes<HTMLDivElement> {
41
+ export interface JimboOrbitalMenuProps {
9
42
  items: JimboOrbitalMenuItem[];
10
- onAction?: (action: string) => void;
11
- /** Orbit radius in px. Default 90. */
43
+ onAction?: (action: string, item: JimboOrbitalMenuItem) => void;
44
+ /** Fired when a `submenu` item is clicked. */
45
+ onNavigate?: (submenu: string) => void;
46
+ /** Fired when the south item is clicked. */
47
+ onBack?: () => void;
48
+ /** Current menu name — keys the pills so a submenu push re-animates them. */
49
+ currentMenu?: string;
50
+ /** Collapse the pills to center (the close/push animation). */
51
+ closing?: boolean;
52
+ /** Mascot diameter (px). Pills are pushed out to clear it. */
53
+ mascotSize?: number;
54
+ /** Horizontal orbit radius (px). */
12
55
  radius?: number;
56
+ /** Vertical orbit radius (px). Defaults to `radius`. */
57
+ radiusY?: number;
58
+ /**
59
+ * Height of the box the ring is sectioned into (px).
60
+ *
61
+ * When given, geometry switches to THE ORBIT LAW (see ./orbitalLayout): pills
62
+ * stack by height and fly out to the walls, and the south button pins to the
63
+ * container's bottom edge at full width instead of riding the orbit. That is
64
+ * what makes the ring fit a short, wide box without shrinking the mascot.
65
+ */
66
+ boxHeight?: number;
67
+ /** Vertical shift (px) — hosts use it to dodge an on-screen keyboard. */
68
+ translateY?: number;
69
+ /** Rendered above the south button. */
70
+ breadcrumb?: ReactNode;
71
+ showPageControls?: boolean;
72
+ onPagePrev?: () => void;
73
+ onPageNext?: () => void;
74
+ /** Drawn at the ring's center, beneath the pills — usually a JimboMascot. */
75
+ center?: ReactNode;
76
+ className?: string;
77
+ "aria-label"?: string;
13
78
  }
14
- /** Badges arranged on a circle around a center point (mascot radial menu). */
15
- export declare function JimboOrbitalMenu({ items, onAction, radius, className, ...rest }: JimboOrbitalMenuProps): import("react").JSX.Element | null;
79
+ /**
80
+ * Orbital radial menu.
81
+ *
82
+ * The south item stays pinned under the mascot; everyone else sits at equal
83
+ * angle steps with a single outward push when a pill would overlap the center.
84
+ * See ./orbitalLayout for why there is no iterative solver — the evenness is
85
+ * the whole effect.
86
+ */
87
+ export declare function JimboOrbitalMenu({ items, onAction, onNavigate, onBack, currentMenu, closing, mascotSize, radius, radiusY, boxHeight, translateY, breadcrumb, showPageControls, onPagePrev, onPageNext, center, className, "aria-label": ariaLabel, }: JimboOrbitalMenuProps): import("react").JSX.Element | null;
@@ -0,0 +1,14 @@
1
+ import { ReactNode } from 'react';
2
+ export interface JimboPanelSpinnerProps {
3
+ label?: string;
4
+ title: string;
5
+ description?: string;
6
+ media?: ReactNode;
7
+ onPrev?: () => void;
8
+ onNext?: () => void;
9
+ canPrev?: boolean;
10
+ canNext?: boolean;
11
+ className?: string;
12
+ }
13
+ /** Fat Balatro option cycler: 140px arrows flanking a fixed-height face. */
14
+ export declare function JimboPanelSpinner({ label, title, description, media, onPrev, onNext, canPrev, canNext, className, }: JimboPanelSpinnerProps): import("react").JSX.Element;
@@ -10,7 +10,6 @@ export interface JimboSeedCopyChipProps {
10
10
  style?: React.CSSProperties;
11
11
  }
12
12
  /**
13
- * Harvested from WeeJoker SeedCard — tap-to-copy seed row with icon + value.
14
- * Idle: copy icon + seed. Copied: green check + brief confirmation label.
13
+ * Tap-to-copy seed row. Idle: copy icon + seed. Copied: green check + label.
15
14
  */
16
15
  export declare function JimboSeedCopyChip({ value, placeholder, disabled, copiedLabel, copiedDurationMs, onCopy, className, style, }: JimboSeedCopyChipProps): React.JSX.Element;
@@ -0,0 +1,9 @@
1
+ import { ReactNode } from 'react';
2
+ export interface JimboShopBeltProps {
3
+ children?: ReactNode;
4
+ className?: string;
5
+ onNearEnd?: () => void;
6
+ snap?: boolean;
7
+ }
8
+ /** Horizontal pixel-card tape. Drag follows the finger; wheel maps to x. */
9
+ export declare function JimboShopBelt({ children, className, onNearEnd, snap }: JimboShopBeltProps): import("react").JSX.Element;
@@ -0,0 +1,11 @@
1
+ import { default as React } from 'react';
2
+ export interface JimboSliderProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange" | "type"> {
3
+ /** Fires with the parsed numeric value on every input. */
4
+ onValueChange?: (value: number) => void;
5
+ }
6
+ /**
7
+ * Chunky Balatro range dial — the missing React half of `.j-slider`.
8
+ * The filled track is driven by the `--j-slider-fill` custom property so the
9
+ * gold portion always matches the thumb position.
10
+ */
11
+ export declare const JimboSlider: React.ForwardRefExoticComponent<JimboSliderProps & React.RefAttributes<HTMLInputElement>>;
@@ -0,0 +1,31 @@
1
+ /** Dock tree — layout is user data. Harvested from seedfinder.app SeedLab dock.js. */
2
+ export type DockDir = "row" | "column";
3
+ export type DockEdge = "left" | "right" | "top" | "bottom" | "center";
4
+ export interface DockGroup {
5
+ type: "group";
6
+ id: string;
7
+ panes: string[];
8
+ active: string | null;
9
+ }
10
+ export interface DockSplit {
11
+ type: "split";
12
+ id: string;
13
+ dir: DockDir;
14
+ ratio: number;
15
+ children: [DockNode, DockNode];
16
+ }
17
+ export type DockNode = DockGroup | DockSplit;
18
+ export declare function defaultPyramidDock(keys: {
19
+ filter: string;
20
+ search: string;
21
+ results: string;
22
+ jamlyze: string;
23
+ }): DockNode;
24
+ export declare function dockRemove(node: DockNode, key: string): DockNode;
25
+ export declare function dockMapGroup(node: DockNode, id: string, fn: (g: DockGroup) => DockGroup): DockNode;
26
+ export declare function dockSplitAt(node: DockNode, id: string, key: string, side: DockEdge): DockNode;
27
+ export declare function dockGroups(node: DockNode, acc?: DockGroup[]): DockGroup[];
28
+ export declare function dockActivate(node: DockNode, key: string): DockNode;
29
+ export declare function dockIsValid(node: DockNode, paneKeys: string[]): boolean;
30
+ export declare function loadDock(storageKey: string, fallback: DockNode, paneKeys: string[]): DockNode;
31
+ export declare function saveDock(storageKey: string, tree: DockNode): void;
@@ -115,7 +115,7 @@ export declare function useJamlIdeDrag(filter: JamlVisualFilter, onChange: (filt
115
115
  * Provides a magnetic 3D tilt effect for DOM elements, replicating the hover-follow
116
116
  * of Balatro cards. Continuous (tracks the cursor). Pure CSS transform — no 3D deps.
117
117
  */
118
- export declare function useDOMMagneticTilt(enabled?: boolean): {
118
+ export declare function useDOMMagneticTilt(enabledProp?: boolean): {
119
119
  handlers: {
120
120
  onPointerEnter: ((event: React.PointerEvent) => void) | undefined;
121
121
  onPointerLeave: (() => void) | undefined;