jaml-ui 2.4.0 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +38 -225
- package/dist/chunks/Layer-B5y9UIAt.js +19 -0
- package/dist/chunks/Layer-B5y9UIAt.js.map +1 -0
- package/dist/chunks/motelySprite-BYsaes3N.js +753 -0
- package/dist/chunks/motelySprite-BYsaes3N.js.map +1 -0
- package/dist/chunks/spriteMapper-BiDkbZrD.js +480 -0
- package/dist/chunks/spriteMapper-BiDkbZrD.js.map +1 -0
- package/dist/components/DeckSprite.d.ts +1 -1
- package/dist/components/GameCard.d.ts +5 -4
- package/dist/components/JamlyzerView.d.ts +9 -0
- package/dist/components/StandardCard.d.ts +4 -3
- package/dist/core.d.ts +0 -1
- package/dist/core.js +38 -23
- package/dist/core.js.map +1 -1
- package/dist/decode/motelyItemDecoder.d.ts +5 -0
- package/dist/index.d.ts +6 -26
- package/dist/index.js +3177 -22506
- package/dist/index.js.map +1 -1
- package/dist/json-render/builders/analyzer.d.ts +23 -0
- package/dist/json-render/builders/encyclopedia.d.ts +14 -0
- package/dist/json-render/builders/search.d.ts +24 -0
- package/dist/json-render/catalog.d.ts +204 -0
- package/dist/json-render/components/domain.d.ts +58 -0
- package/dist/json-render/components/game.d.ts +18 -0
- package/dist/json-render/components/layout.d.ts +51 -0
- package/dist/json-render/components/mascot.d.ts +22 -0
- package/dist/json-render/components/reference.d.ts +38 -0
- package/dist/json-render/engine.d.ts +38 -0
- package/dist/json-render/index.d.ts +30 -0
- package/dist/json-render/knowledge/bosses.d.ts +18 -0
- package/dist/json-render/knowledge/decks.d.ts +22 -0
- package/dist/json-render/knowledge/jokers.d.ts +23 -0
- package/dist/json-render/knowledge/synergies.d.ts +21 -0
- package/dist/json-render/registry.d.ts +14 -0
- package/dist/motely.d.ts +1 -4
- package/dist/motely.js +23 -154
- package/dist/motely.js.map +1 -1
- package/dist/render/CanvasRenderer.d.ts +2 -1
- package/dist/render/useJamlCardRenderer.d.ts +15 -0
- package/dist/ui/jimbo.css +1 -2
- package/dist/ui.d.ts +0 -40
- package/dist/ui.js +58 -3
- package/dist/ui.js.map +1 -0
- package/package.json +23 -68
- package/dist/assets/searchPoolWorker-BdrYmnig.js +0 -2
- package/dist/assets/searchPoolWorker-BdrYmnig.js.map +0 -1
- package/dist/chunks/jamlSeeds-CKHvpjhC.js +0 -66
- package/dist/chunks/jamlSeeds-CKHvpjhC.js.map +0 -1
- package/dist/chunks/runtime-Dx5VPTsV.js +0 -2031
- package/dist/chunks/runtime-Dx5VPTsV.js.map +0 -1
- package/dist/chunks/searchPoolWorker-CEK2FyxS.js +0 -11
- package/dist/chunks/searchPoolWorker-CEK2FyxS.js.map +0 -1
- package/dist/chunks/spriteMapper-C8uYedXB.js +0 -2455
- package/dist/chunks/spriteMapper-C8uYedXB.js.map +0 -1
- package/dist/chunks/ui-BK5rM4AS.js +0 -3479
- package/dist/chunks/ui-BK5rM4AS.js.map +0 -1
- package/dist/components/CardFan.d.ts +0 -13
- package/dist/components/JamlAestheticSelector.d.ts +0 -12
- package/dist/components/JamlCodeEditor.d.ts +0 -7
- package/dist/components/JamlIde.d.ts +0 -44
- package/dist/components/JamlIdeToolbar.d.ts +0 -14
- package/dist/components/JamlIdeVisual.d.ts +0 -32
- package/dist/components/JamlMapPreview.d.ts +0 -11
- package/dist/components/JamlSeedInput.d.ts +0 -24
- package/dist/components/JamlSeedSpinner.d.ts +0 -9
- package/dist/components/JamlSpeedometer.d.ts +0 -16
- package/dist/components/Jamlyzer.d.ts +0 -8
- package/dist/components/JimmolateEditor.d.ts +0 -47
- package/dist/components/MotelyHello.d.ts +0 -5
- package/dist/components/MotelyVersionBadge.d.ts +0 -28
- package/dist/components/PaginatedFilterBrowser.d.ts +0 -26
- package/dist/components/RunConfigModal.d.ts +0 -8
- package/dist/components/SeedFinderApp.d.ts +0 -7
- package/dist/components/jamlMap/CategoryPicker.d.ts +0 -32
- package/dist/components/jamlMap/JamlMapEditor.d.ts +0 -14
- package/dist/components/jamlMap/JokerPicker.d.ts +0 -8
- package/dist/components/jamlMap/MysterySlot.d.ts +0 -37
- package/dist/components/jamlMap/index.d.ts +0 -4
- package/dist/components/jamlMap/jokerRarity.d.ts +0 -6
- package/dist/components/jamlSeedUtils.d.ts +0 -1
- package/dist/hooks/searchPoolWorker.d.ts +0 -61
- package/dist/hooks/searchWorker.d.ts +0 -1
- package/dist/hooks/useAnalyzer.d.ts +0 -15
- package/dist/hooks/useIntersectionObserver.d.ts +0 -14
- package/dist/hooks/useJamlLibrary.d.ts +0 -13
- package/dist/hooks/useSearch.d.ts +0 -32
- package/dist/hooks/useSearchPool.d.ts +0 -43
- package/dist/hooks/useShopStream.d.ts +0 -22
- package/dist/lib/SpriteMapper.d.ts +0 -10
- package/dist/lib/cardParser.d.ts +0 -8
- package/dist/lib/classes/BuyMetaData.d.ts +0 -11
- package/dist/lib/config.d.ts +0 -13
- package/dist/lib/const.d.ts +0 -70
- package/dist/lib/data/constants.d.ts +0 -11
- package/dist/lib/hooks/useDragScroll.d.ts +0 -4
- package/dist/lib/hooks/useJamlFilter.d.ts +0 -48
- package/dist/lib/hooks/useSeedAnalyzer.d.ts +0 -17
- package/dist/lib/jaml/jamlCompletion.d.ts +0 -12
- package/dist/lib/jaml/jamlData.d.ts +0 -4
- package/dist/lib/jaml/jamlLangCodemirror.d.ts +0 -22
- package/dist/lib/jaml/jamlObjectives.d.ts +0 -13
- package/dist/lib/jaml/jamlParser.d.ts +0 -14
- package/dist/lib/jaml/jamlPresets.d.ts +0 -8
- package/dist/lib/jaml/jamlSchema.d.ts +0 -19
- package/dist/lib/jaml/jamlSeeds.d.ts +0 -7
- package/dist/lib/motely/runtime.d.ts +0 -13
- package/dist/lib/parseDailyRitual.d.ts +0 -45
- package/dist/lib/tts/getRevealPos.d.ts +0 -5
- package/dist/lib/tts/splitTtsDisplay.d.ts +0 -19
- package/dist/lib/types.d.ts +0 -122
- package/dist/motelyDisplay.d.ts +0 -10
- package/dist/r3f/Card3D.d.ts +0 -48
- package/dist/r3f/CardTable.d.ts +0 -35
- package/dist/r3f.d.ts +0 -2
- package/dist/r3f.js +0 -275
- package/dist/r3f.js.map +0 -1
- package/dist/ui/JimboBadge.d.ts +0 -12
- package/dist/ui/JimboBalatroFooter.d.ts +0 -16
- package/dist/ui/JimboCookLever.d.ts +0 -30
- package/dist/ui/JimboCopyButton.d.ts +0 -27
- package/dist/ui/JimboDeckAndStakeSelectorModal.d.ts +0 -30
- package/dist/ui/JimboDualChip.d.ts +0 -17
- package/dist/ui/JimboIconButton.d.ts +0 -15
- package/dist/ui/JimboInlineEdit.d.ts +0 -16
- package/dist/ui/JimboInputModal.d.ts +0 -13
- package/dist/ui/JimboListItem.d.ts +0 -11
- package/dist/ui/JimboPanelSpinner.d.ts +0 -15
- package/dist/ui/JimboPicker.d.ts +0 -28
- package/dist/ui/JimboSeedCopyChip.d.ts +0 -16
- package/dist/ui/JimboSelect.d.ts +0 -30
- package/dist/ui/JimboSlider.d.ts +0 -11
- package/dist/ui/JimboSpinner.d.ts +0 -18
- package/dist/ui/JimboStepper.d.ts +0 -22
- package/dist/ui/JimboTextInput.d.ts +0 -5
- package/dist/ui/JimboToggleList.d.ts +0 -12
- package/dist/ui/JimboValueBadge.d.ts +0 -19
- package/dist/ui/codeBlock.d.ts +0 -11
- package/dist/ui/hooks.d.ts +0 -126
- package/dist/ui/ide/JamlEditor.d.ts +0 -7
- package/dist/ui/jimboApp.d.ts +0 -9
- package/dist/ui/jimboBackground.d.ts +0 -17
- package/dist/ui/jimboCopyRow.d.ts +0 -9
- package/dist/ui/jimboFilterBar.d.ts +0 -22
- package/dist/ui/jimboFlankNav.d.ts +0 -17
- package/dist/ui/jimboInfoCard.d.ts +0 -31
- package/dist/ui/jimboInset.d.ts +0 -9
- package/dist/ui/jimboLayout.d.ts +0 -25
- package/dist/ui/jimboLink.d.ts +0 -12
- package/dist/ui/jimboSectionHeader.d.ts +0 -11
- package/dist/ui/jimboStatGrid.d.ts +0 -13
- package/dist/ui/jimboTabs.d.ts +0 -21
- package/dist/ui/jimboText.d.ts +0 -25
- package/dist/ui/jimboTooltip.d.ts +0 -33
- package/dist/ui/jimboWordmark.d.ts +0 -10
- package/dist/ui/mascot/JammySpeechBox.d.ts +0 -9
- package/dist/ui/mascot/SeedMascot.d.ts +0 -37
- package/dist/ui/mascot/index.d.ts +0 -3
- package/dist/ui/mascot/menuConfig.d.ts +0 -102
- package/dist/ui/panel.d.ts +0 -32
- package/dist/ui/radial/RadialBadge.d.ts +0 -16
- package/dist/ui/radial/RadialBreadcrumb.d.ts +0 -12
- package/dist/ui/radial/RadialButton.d.ts +0 -60
- package/dist/ui/radial/RadialMenu.d.ts +0 -38
- package/dist/ui/radial/RadialPill.d.ts +0 -17
- package/dist/ui/radial/index.d.ts +0 -16
- package/dist/ui/radial/radialMenuStore.d.ts +0 -31
- package/dist/ui/radial/radialMenuViewport.d.ts +0 -6
- package/dist/ui/radial/useRadialMenu.d.ts +0 -35
- package/dist/ui/sprites.d.ts +0 -25
- package/dist/utils/jamlMapPreview.d.ts +0 -12
- package/dist/utils/jamlVisualFilter.d.ts +0 -3
package/dist/r3f.js
DELETED
|
@@ -1,275 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { d as e, i as t, m as n, t as r, x as i } from "./chunks/spriteMapper-C8uYedXB.js";
|
|
3
|
-
import * as a from "react";
|
|
4
|
-
import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
5
|
-
import { Canvas as l, useFrame as u, useLoader as d, useThree as f } from "@react-three/fiber";
|
|
6
|
-
import { Float as p } from "@react-three/drei";
|
|
7
|
-
import { animated as m, useSpring as h } from "@react-spring/three";
|
|
8
|
-
import * as g from "three";
|
|
9
|
-
import { RoomEnvironment as _ } from "three/addons/environments/RoomEnvironment.js";
|
|
10
|
-
var v = 95 / 71 * 1;
|
|
11
|
-
function y(e, n) {
|
|
12
|
-
let { pos: o, type: s } = t(e, n), c = r[s], l = i(c.assetKey), u = d(g.TextureLoader, l);
|
|
13
|
-
return a.useMemo(() => {
|
|
14
|
-
let e = u.clone();
|
|
15
|
-
return e.magFilter = g.NearestFilter, e.minFilter = g.NearestFilter, e.colorSpace = g.SRGBColorSpace, e.repeat.set(1 / c.cols, 1 / c.rows), e.offset.set(o.x / c.cols, 1 - (o.y + 1) / c.rows), e.needsUpdate = !0, e;
|
|
16
|
-
}, [
|
|
17
|
-
u,
|
|
18
|
-
c,
|
|
19
|
-
o.x,
|
|
20
|
-
o.y
|
|
21
|
-
]);
|
|
22
|
-
}
|
|
23
|
-
var b = "\n#include <common>\nuniform float uJamlTime;\nvec3 jamlHue2rgb(float h) {\n vec3 p = abs(fract(h + vec3(0.0, 2.0 / 3.0, 1.0 / 3.0)) * 6.0 - 3.0);\n return clamp(p - 1.0, 0.0, 1.0);\n}\nvec3 jamlHueShift(vec3 c, float a) {\n const vec3 k = vec3(0.57735026919);\n float ca = cos(a);\n return c * ca + cross(k, c) * sin(a) + k * dot(k, c) * (1.0 - ca);\n}\n", x = {
|
|
24
|
-
base: {
|
|
25
|
-
roughness: 1,
|
|
26
|
-
metalness: 0,
|
|
27
|
-
envMapIntensity: 0,
|
|
28
|
-
glsl: null
|
|
29
|
-
},
|
|
30
|
-
foil: {
|
|
31
|
-
roughness: .12,
|
|
32
|
-
metalness: .85,
|
|
33
|
-
envMapIntensity: 1.5,
|
|
34
|
-
glsl: null
|
|
35
|
-
},
|
|
36
|
-
holo: {
|
|
37
|
-
roughness: .28,
|
|
38
|
-
metalness: .3,
|
|
39
|
-
envMapIntensity: .6,
|
|
40
|
-
glsl: "\n#include <map_fragment>\n{\n float jNdv = abs(dot(normalize(vNormal), normalize(vViewPosition)));\n float jFres = pow(1.0 - jNdv, 1.5);\n float jPhase = vMapUv.x * 2.2 + vMapUv.y * 0.6 + jFres * 2.0 + uJamlTime * 0.15;\n diffuseColor.rgb += jamlHue2rgb(fract(jPhase)) * (0.12 + 0.55 * jFres);\n}\n"
|
|
41
|
-
},
|
|
42
|
-
polychrome: {
|
|
43
|
-
roughness: .16,
|
|
44
|
-
metalness: .5,
|
|
45
|
-
envMapIntensity: .8,
|
|
46
|
-
glsl: "\n#include <map_fragment>\n{\n float jNdv = abs(dot(normalize(vNormal), normalize(vViewPosition)));\n float jFres = pow(1.0 - jNdv, 1.5);\n float jPhase = uJamlTime * 0.1 + jFres * 0.35 + vMapUv.x * 0.12 + vMapUv.y * 0.08;\n diffuseColor.rgb = jamlHueShift(diffuseColor.rgb, jPhase * 6.2831853);\n diffuseColor.rgb += jamlHue2rgb(fract(jPhase + 0.33)) * (0.06 + 0.3 * jFres);\n}\n"
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
function S({ texture: e, edition: t }) {
|
|
50
|
-
let n = x[t], r = a.useMemo(() => ({ value: 0 }), []);
|
|
51
|
-
return u((e) => {
|
|
52
|
-
r.value = e.clock.elapsedTime;
|
|
53
|
-
}), /* @__PURE__ */ s("meshStandardMaterial", {
|
|
54
|
-
customProgramCacheKey: () => `jaml-edition-${t}`,
|
|
55
|
-
onBeforeCompile: a.useMemo(() => {
|
|
56
|
-
if (!n.glsl) return;
|
|
57
|
-
let e = n.glsl;
|
|
58
|
-
return (t) => {
|
|
59
|
-
t.uniforms.uJamlTime = r, t.fragmentShader = t.fragmentShader.replace("#include <common>", b).replace("#include <map_fragment>", e);
|
|
60
|
-
};
|
|
61
|
-
}, [n.glsl, r]),
|
|
62
|
-
map: e,
|
|
63
|
-
transparent: !0,
|
|
64
|
-
alphaTest: .5,
|
|
65
|
-
side: g.DoubleSide,
|
|
66
|
-
toneMapped: !1,
|
|
67
|
-
roughness: n.roughness,
|
|
68
|
-
metalness: n.metalness,
|
|
69
|
-
envMapIntensity: n.envMapIntensity
|
|
70
|
-
}, t);
|
|
71
|
-
}
|
|
72
|
-
function C(e) {
|
|
73
|
-
let t = n.jokers, r = d(g.TextureLoader, t.src);
|
|
74
|
-
return a.useMemo(() => {
|
|
75
|
-
let n = r.clone();
|
|
76
|
-
return n.magFilter = g.NearestFilter, n.minFilter = g.NearestFilter, n.colorSpace = g.SRGBColorSpace, n.repeat.set(1 / t.columns, 1 / t.rows), n.offset.set(e.x / t.columns, 1 - (e.y + 1) / t.rows), n.needsUpdate = !0, n;
|
|
77
|
-
}, [
|
|
78
|
-
r,
|
|
79
|
-
t,
|
|
80
|
-
e.x,
|
|
81
|
-
e.y
|
|
82
|
-
]);
|
|
83
|
-
}
|
|
84
|
-
function w({ pos: e }) {
|
|
85
|
-
let t = C(e), n = a.useRef(null);
|
|
86
|
-
return u((e) => {
|
|
87
|
-
n.current && (n.current.position.y = .04 * Math.sin(e.clock.elapsedTime * 2));
|
|
88
|
-
}), /* @__PURE__ */ c("mesh", {
|
|
89
|
-
ref: n,
|
|
90
|
-
position: [
|
|
91
|
-
0,
|
|
92
|
-
0,
|
|
93
|
-
.06
|
|
94
|
-
],
|
|
95
|
-
children: [/* @__PURE__ */ s("planeGeometry", { args: [1, v] }), /* @__PURE__ */ s("meshBasicMaterial", {
|
|
96
|
-
map: t,
|
|
97
|
-
transparent: !0,
|
|
98
|
-
alphaTest: .1,
|
|
99
|
-
side: g.DoubleSide,
|
|
100
|
-
toneMapped: !1
|
|
101
|
-
})]
|
|
102
|
-
});
|
|
103
|
-
}
|
|
104
|
-
var T = .3;
|
|
105
|
-
function E({ itemName: t, fallbackSheet: n, edition: r }) {
|
|
106
|
-
let i = y(t, n), o = a.useMemo(() => e.find((e) => e.name === t), [t]), l = a.useRef(null), [d, f] = a.useState(!1), p = h({
|
|
107
|
-
scale: d ? 1.12 : 1,
|
|
108
|
-
config: {
|
|
109
|
-
tension: 260,
|
|
110
|
-
friction: 18
|
|
111
|
-
}
|
|
112
|
-
});
|
|
113
|
-
return u((e, t) => {
|
|
114
|
-
let n = l.current;
|
|
115
|
-
if (!n) return;
|
|
116
|
-
let r = e.pointer.x * T, i = -e.pointer.y * T, a = 1 - Math.exp(-8 * t);
|
|
117
|
-
n.rotation.y += (r - n.rotation.y) * a, n.rotation.x += (i - n.rotation.x) * a;
|
|
118
|
-
}), /* @__PURE__ */ c(m.mesh, {
|
|
119
|
-
ref: l,
|
|
120
|
-
scale: p.scale.to((e) => [
|
|
121
|
-
e,
|
|
122
|
-
e,
|
|
123
|
-
e
|
|
124
|
-
]),
|
|
125
|
-
onPointerOver: () => f(!0),
|
|
126
|
-
onPointerOut: () => f(!1),
|
|
127
|
-
children: [
|
|
128
|
-
/* @__PURE__ */ s("planeGeometry", { args: [1, v] }),
|
|
129
|
-
/* @__PURE__ */ s(S, {
|
|
130
|
-
texture: i,
|
|
131
|
-
edition: r
|
|
132
|
-
}),
|
|
133
|
-
o && /* @__PURE__ */ s(w, { pos: o.pos })
|
|
134
|
-
]
|
|
135
|
-
});
|
|
136
|
-
}
|
|
137
|
-
function D() {
|
|
138
|
-
let e = f((e) => e.gl), t = f((e) => e.scene);
|
|
139
|
-
return a.useEffect(() => {
|
|
140
|
-
let n = new g.PMREMGenerator(e), r = n.fromScene(new _(), .04);
|
|
141
|
-
return t.environment = r.texture, () => {
|
|
142
|
-
t.environment = null, r.dispose(), n.dispose();
|
|
143
|
-
};
|
|
144
|
-
}, [e, t]), null;
|
|
145
|
-
}
|
|
146
|
-
function O() {
|
|
147
|
-
return /* @__PURE__ */ c(o, { children: [
|
|
148
|
-
/* @__PURE__ */ s("ambientLight", { intensity: .85 }),
|
|
149
|
-
/* @__PURE__ */ s("pointLight", {
|
|
150
|
-
position: [
|
|
151
|
-
2.5,
|
|
152
|
-
3,
|
|
153
|
-
4
|
|
154
|
-
],
|
|
155
|
-
intensity: 1.6
|
|
156
|
-
}),
|
|
157
|
-
/* @__PURE__ */ s(D, {})
|
|
158
|
-
] });
|
|
159
|
-
}
|
|
160
|
-
function k({ itemName: e, fallbackSheet: t = "Jokers", edition: n = "base", height: r = 320, className: i, style: o }) {
|
|
161
|
-
return /* @__PURE__ */ s("div", {
|
|
162
|
-
className: i,
|
|
163
|
-
style: {
|
|
164
|
-
width: "100%",
|
|
165
|
-
height: r,
|
|
166
|
-
...o
|
|
167
|
-
},
|
|
168
|
-
children: /* @__PURE__ */ c(l, {
|
|
169
|
-
camera: {
|
|
170
|
-
position: [
|
|
171
|
-
0,
|
|
172
|
-
0,
|
|
173
|
-
3
|
|
174
|
-
],
|
|
175
|
-
fov: 40
|
|
176
|
-
},
|
|
177
|
-
gl: { alpha: !0 },
|
|
178
|
-
dpr: [1, 2],
|
|
179
|
-
children: [/* @__PURE__ */ s(O, {}), /* @__PURE__ */ s(a.Suspense, {
|
|
180
|
-
fallback: null,
|
|
181
|
-
children: /* @__PURE__ */ s(p, {
|
|
182
|
-
speed: 2,
|
|
183
|
-
rotationIntensity: .6,
|
|
184
|
-
floatIntensity: .8,
|
|
185
|
-
children: /* @__PURE__ */ s(E, {
|
|
186
|
-
itemName: e,
|
|
187
|
-
fallbackSheet: t,
|
|
188
|
-
edition: n
|
|
189
|
-
})
|
|
190
|
-
})
|
|
191
|
-
})]
|
|
192
|
-
})
|
|
193
|
-
});
|
|
194
|
-
}
|
|
195
|
-
//#endregion
|
|
196
|
-
//#region src/r3f/CardTable.tsx
|
|
197
|
-
var A = (e, t = 10) => 1 - Math.exp(-t * e), j = .6;
|
|
198
|
-
function M({ itemName: e, fallbackSheet: t, edition: n, homeX: r, dragging: i, onPick: o, onRelease: l }) {
|
|
199
|
-
let d = y(e, t), p = a.useRef(null), [m, h] = a.useState(!1), { camera: _ } = f(), b = a.useMemo(() => new g.Vector3(), []);
|
|
200
|
-
return u((e, t) => {
|
|
201
|
-
let n = p.current;
|
|
202
|
-
if (!n) return;
|
|
203
|
-
let a = A(t);
|
|
204
|
-
if (i) {
|
|
205
|
-
b.set(e.pointer.x, e.pointer.y, .5).unproject(_), b.sub(_.position).normalize();
|
|
206
|
-
let t = (j - _.position.z) / b.z, r = _.position.x + b.x * t, i = _.position.y + b.y * t;
|
|
207
|
-
n.position.x += (r - n.position.x) * a, n.position.y += (i - n.position.y) * a, n.position.z += (j - n.position.z) * a, N(n, e.pointer.x * T, -e.pointer.y * T, a), P(n, 1.18, a);
|
|
208
|
-
} else n.position.x += (r - n.position.x) * a, n.position.y += (0 - n.position.y) * a, n.position.z += (0 - n.position.z) * a, N(n, m ? e.pointer.x * T : 0, m ? -e.pointer.y * T : 0, a), P(n, m ? 1.12 : 1, a);
|
|
209
|
-
}), /* @__PURE__ */ c("mesh", {
|
|
210
|
-
ref: p,
|
|
211
|
-
position: [
|
|
212
|
-
r,
|
|
213
|
-
0,
|
|
214
|
-
0
|
|
215
|
-
],
|
|
216
|
-
onPointerOver: (e) => {
|
|
217
|
-
e.stopPropagation(), h(!0);
|
|
218
|
-
},
|
|
219
|
-
onPointerOut: () => h(!1),
|
|
220
|
-
onPointerDown: (e) => {
|
|
221
|
-
e.stopPropagation(), o();
|
|
222
|
-
},
|
|
223
|
-
onPointerUp: () => l(),
|
|
224
|
-
children: [/* @__PURE__ */ s("planeGeometry", { args: [1, v] }), /* @__PURE__ */ s(S, {
|
|
225
|
-
texture: d,
|
|
226
|
-
edition: n
|
|
227
|
-
})]
|
|
228
|
-
});
|
|
229
|
-
}
|
|
230
|
-
function N(e, t, n, r) {
|
|
231
|
-
e.rotation.y += (t - e.rotation.y) * r, e.rotation.x += (n - e.rotation.x) * r;
|
|
232
|
-
}
|
|
233
|
-
function P(e, t, n) {
|
|
234
|
-
e.scale.x += (t - e.scale.x) * n, e.scale.y += (t - e.scale.y) * n, e.scale.z += (t - e.scale.z) * n;
|
|
235
|
-
}
|
|
236
|
-
function F({ items: e, height: t = 320, gap: n = 1.25, className: r, style: i }) {
|
|
237
|
-
let [o, u] = a.useState(null), d = a.useCallback(() => u(null), []), f = e.length;
|
|
238
|
-
return /* @__PURE__ */ s("div", {
|
|
239
|
-
className: r,
|
|
240
|
-
style: {
|
|
241
|
-
width: "100%",
|
|
242
|
-
height: t,
|
|
243
|
-
...i
|
|
244
|
-
},
|
|
245
|
-
children: /* @__PURE__ */ c(l, {
|
|
246
|
-
camera: {
|
|
247
|
-
position: [
|
|
248
|
-
0,
|
|
249
|
-
0,
|
|
250
|
-
3
|
|
251
|
-
],
|
|
252
|
-
fov: 40
|
|
253
|
-
},
|
|
254
|
-
gl: { alpha: !0 },
|
|
255
|
-
dpr: [1, 2],
|
|
256
|
-
onPointerMissed: d,
|
|
257
|
-
children: [/* @__PURE__ */ s(O, {}), /* @__PURE__ */ s(a.Suspense, {
|
|
258
|
-
fallback: null,
|
|
259
|
-
children: e.map((e, t) => /* @__PURE__ */ s(M, {
|
|
260
|
-
itemName: e.itemName,
|
|
261
|
-
fallbackSheet: e.fallbackSheet ?? "Jokers",
|
|
262
|
-
edition: e.edition ?? "base",
|
|
263
|
-
homeX: (t - (f - 1) / 2) * n,
|
|
264
|
-
dragging: o === t,
|
|
265
|
-
onPick: () => u(t),
|
|
266
|
-
onRelease: d
|
|
267
|
-
}, `${e.itemName}-${t}`))
|
|
268
|
-
})]
|
|
269
|
-
})
|
|
270
|
-
});
|
|
271
|
-
}
|
|
272
|
-
//#endregion
|
|
273
|
-
export { k as Card3D, F as CardTable };
|
|
274
|
-
|
|
275
|
-
//# sourceMappingURL=r3f.js.map
|
package/dist/r3f.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"r3f.js","names":[],"sources":["../src/r3f/Card3D.tsx","../src/r3f/CardTable.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { Canvas, useLoader, useFrame, useThree } from \"@react-three/fiber\";\nimport { Float } from \"@react-three/drei\";\nimport { useSpring, animated } from \"@react-spring/three\";\nimport * as THREE from \"three\";\nimport { RoomEnvironment } from \"three/addons/environments/RoomEnvironment.js\";\n\nimport { resolveJamlAssetUrl } from \"../assets.js\";\nimport { getSpriteDataOrMystery, SHEET_META, type SpriteSheetType } from \"../sprites/spriteMapper.js\";\nimport { SPRITE_SHEETS, JOKER_FACES, type SpritePos } from \"../sprites/spriteData.js\";\n\n// Balatro cards are 71x95px cells on every sheet — keep the plane at that ratio.\nexport const CARD_W = 1;\nexport const CARD_H = CARD_W * (95 / 71);\n\n/**\n * Load a spritesheet PNG and crop it to a single item's cell via UV repeat/offset.\n * Reuses jaml-ui/core's sprite metadata so the 3D card shows the *real* art,\n * pixel-perfect (NearestFilter), not a placeholder.\n */\nexport function useSpriteTexture(itemName: string, fallbackSheet: SpriteSheetType): THREE.Texture {\n const { pos, type } = getSpriteDataOrMystery(itemName, fallbackSheet);\n const meta = SHEET_META[type];\n const url = resolveJamlAssetUrl(meta.assetKey);\n const base = useLoader(THREE.TextureLoader, url);\n\n // Clone per instance: useLoader caches by URL, so cards sharing a sheet must\n // not mutate a shared texture's offset. Configure the clone, not the cached one.\n return React.useMemo(() => {\n const texture = base.clone();\n texture.magFilter = THREE.NearestFilter;\n texture.minFilter = THREE.NearestFilter;\n texture.colorSpace = THREE.SRGBColorSpace;\n texture.repeat.set(1 / meta.cols, 1 / meta.rows);\n // Three's UV origin is bottom-left; sprite rows are indexed top-down.\n texture.offset.set(pos.x / meta.cols, 1 - (pos.y + 1) / meta.rows);\n texture.needsUpdate = true;\n return texture;\n }, [base, meta, pos.x, pos.y]);\n}\n\n/** Balatro-style finishes. The card catches light differently per edition. */\nexport type CardEdition = \"base\" | \"foil\" | \"holo\" | \"polychrome\";\n\ninterface EditionParams {\n roughness: number;\n metalness: number;\n envMapIntensity: number;\n /** Fragment-shader injection for the iridescent editions; null = stock material. */\n glsl: string | null;\n}\n\n// Helpers + time uniform, spliced in after <common>. jamlHueShift is Rodrigues\n// rotation about the grey axis — a hue rotation without leaving RGB.\nconst EDITION_GLSL_COMMON = /* glsl */ `\n#include <common>\nuniform float uJamlTime;\nvec3 jamlHue2rgb(float h) {\n vec3 p = abs(fract(h + vec3(0.0, 2.0 / 3.0, 1.0 / 3.0)) * 6.0 - 3.0);\n return clamp(p - 1.0, 0.0, 1.0);\n}\nvec3 jamlHueShift(vec3 c, float a) {\n const vec3 k = vec3(0.57735026919);\n float ca = cos(a);\n return c * ca + cross(k, c) * sin(a) + k * dot(k, c) * (1.0 - ca);\n}\n`;\n\n// Holo: rainbow bands living in the card face, strongest at glancing angles —\n// the fresnel term is what makes the rainbow rake across as the card tilts.\nconst HOLO_GLSL = /* glsl */ `\n#include <map_fragment>\n{\n float jNdv = abs(dot(normalize(vNormal), normalize(vViewPosition)));\n float jFres = pow(1.0 - jNdv, 1.5);\n float jPhase = vMapUv.x * 2.2 + vMapUv.y * 0.6 + jFres * 2.0 + uJamlTime * 0.15;\n diffuseColor.rgb += jamlHue2rgb(fract(jPhase)) * (0.12 + 0.55 * jFres);\n}\n`;\n\n// Polychrome: the art itself hue-cycles (slow, whole-card), plus a faint\n// angle-driven rainbow sheen on top.\nconst POLY_GLSL = /* glsl */ `\n#include <map_fragment>\n{\n float jNdv = abs(dot(normalize(vNormal), normalize(vViewPosition)));\n float jFres = pow(1.0 - jNdv, 1.5);\n float jPhase = uJamlTime * 0.1 + jFres * 0.35 + vMapUv.x * 0.12 + vMapUv.y * 0.08;\n diffuseColor.rgb = jamlHueShift(diffuseColor.rgb, jPhase * 6.2831853);\n diffuseColor.rgb += jamlHue2rgb(fract(jPhase + 0.33)) * (0.06 + 0.3 * jFres);\n}\n`;\n\nconst EDITION_PARAMS: Record<CardEdition, EditionParams> = {\n base: { roughness: 1, metalness: 0, envMapIntensity: 0, glsl: null },\n // Foil is an actual mirror now: metal + the room env map (see CardLighting).\n foil: { roughness: 0.12, metalness: 0.85, envMapIntensity: 1.5, glsl: null },\n holo: { roughness: 0.28, metalness: 0.3, envMapIntensity: 0.6, glsl: HOLO_GLSL },\n polychrome: { roughness: 0.16, metalness: 0.5, envMapIntensity: 0.8, glsl: POLY_GLSL },\n};\n\n/**\n * The per-edition card material. Holo/polychrome patch the standard material's\n * fragment shader so the rainbow lives *in the art* and shifts with view angle —\n * not an emissive tint over the whole card.\n */\nexport function EditionCardMaterial({\n texture,\n edition,\n}: {\n texture: THREE.Texture;\n edition: CardEdition;\n}) {\n const params = EDITION_PARAMS[edition];\n const timeUniform = React.useMemo(() => ({ value: 0 }), []);\n useFrame((state) => {\n timeUniform.value = state.clock.elapsedTime;\n });\n const onBeforeCompile = React.useMemo(() => {\n if (!params.glsl) return undefined;\n const glsl = params.glsl;\n return (shader: THREE.WebGLProgramParametersWithUniforms) => {\n shader.uniforms.uJamlTime = timeUniform;\n shader.fragmentShader = shader.fragmentShader\n .replace(\"#include <common>\", EDITION_GLSL_COMMON)\n .replace(\"#include <map_fragment>\", glsl);\n };\n }, [params.glsl, timeUniform]);\n\n return (\n <meshStandardMaterial\n // Editions compile different programs — without distinct keys, three's\n // program cache would hand holo's shader to polychrome (same closure source).\n key={edition}\n customProgramCacheKey={() => `jaml-edition-${edition}`}\n onBeforeCompile={onBeforeCompile}\n map={texture}\n transparent\n alphaTest={0.5}\n side={THREE.DoubleSide}\n toneMapped={false}\n roughness={params.roughness}\n metalness={params.metalness}\n envMapIntensity={params.envMapIntensity}\n />\n );\n}\n\n/** Crop the jokers sheet to an explicit grid cell (used for legendary soul faces). */\nfunction useJokersCellTexture(pos: SpritePos): THREE.Texture {\n const sheet = SPRITE_SHEETS.jokers;\n const base = useLoader(THREE.TextureLoader, sheet.src);\n return React.useMemo(() => {\n const t = base.clone();\n t.magFilter = THREE.NearestFilter;\n t.minFilter = THREE.NearestFilter;\n t.colorSpace = THREE.SRGBColorSpace;\n t.repeat.set(1 / sheet.columns, 1 / sheet.rows);\n t.offset.set(pos.x / sheet.columns, 1 - (pos.y + 1) / sheet.rows);\n t.needsUpdate = true;\n return t;\n }, [base, sheet, pos.x, pos.y]);\n}\n\n/**\n * The legendary's soul — its glowing face — hovering on its own depth plane just\n * in front of the card. Bobs independently, so under tilt it parallaxes off the\n * base: the thing DOM compositing can never do, only real depth.\n */\nfunction SoulMesh({ pos }: { pos: SpritePos }) {\n const texture = useJokersCellTexture(pos);\n const ref = React.useRef<THREE.Mesh>(null);\n useFrame((state) => {\n if (ref.current) ref.current.position.y = 0.04 * Math.sin(state.clock.elapsedTime * 2);\n });\n return (\n <mesh ref={ref} position={[0, 0, 0.06]}>\n <planeGeometry args={[CARD_W, CARD_H]} />\n <meshBasicMaterial map={texture} transparent alphaTest={0.1} side={THREE.DoubleSide} toneMapped={false} />\n </mesh>\n );\n}\n\ninterface CardMeshProps {\n itemName: string;\n fallbackSheet: SpriteSheetType;\n edition: CardEdition;\n}\n\n// Max tilt away from facing the camera, in radians (~17°).\nexport const MAX_TILT = 0.3;\n\nfunction CardMesh({ itemName, fallbackSheet, edition }: CardMeshProps) {\n const texture = useSpriteTexture(itemName, fallbackSheet);\n const soul = React.useMemo(() => JOKER_FACES.find((j) => j.name === itemName), [itemName]);\n const meshRef = React.useRef<THREE.Mesh>(null);\n const [hovered, setHovered] = React.useState(false);\n const spring = useSpring({\n scale: hovered ? 1.12 : 1,\n config: { tension: 260, friction: 18 },\n });\n\n // Magnetic tilt: ease the card's rotation toward the pointer every frame.\n // This is the reason for r3f — a GPU transform that DOM can't do smoothly.\n useFrame((state, delta) => {\n const mesh = meshRef.current;\n if (!mesh) return;\n const targetY = state.pointer.x * MAX_TILT;\n const targetX = -state.pointer.y * MAX_TILT;\n const lerp = 1 - Math.exp(-8 * delta); // frame-rate independent easing\n mesh.rotation.y += (targetY - mesh.rotation.y) * lerp;\n mesh.rotation.x += (targetX - mesh.rotation.x) * lerp;\n });\n\n return (\n <animated.mesh\n ref={meshRef}\n scale={spring.scale.to((s) => [s, s, s])}\n onPointerOver={() => setHovered(true)}\n onPointerOut={() => setHovered(false)}\n >\n <planeGeometry args={[CARD_W, CARD_H]} />\n <EditionCardMaterial texture={texture} edition={edition} />\n {soul && <SoulMesh pos={soul.pos} />}\n </animated.mesh>\n );\n}\n\n/**\n * A procedural room env map (PMREM'd, no network fetch) so metal has something\n * to mirror — this is what makes foil actually catch and throw light instead\n * of going black. envMapIntensity 0 on base cards keeps them flat.\n */\nfunction CardEnvironment() {\n const gl = useThree((s) => s.gl);\n const scene = useThree((s) => s.scene);\n React.useEffect(() => {\n const pmrem = new THREE.PMREMGenerator(gl);\n const env = pmrem.fromScene(new RoomEnvironment(), 0.04);\n scene.environment = env.texture;\n return () => {\n scene.environment = null;\n env.dispose();\n pmrem.dispose();\n };\n }, [gl, scene]);\n return null;\n}\n\n/** Off-axis key light + soft ambient + the env map that foil mirrors. */\nexport function CardLighting() {\n return (\n <>\n <ambientLight intensity={0.85} />\n <pointLight position={[2.5, 3, 4]} intensity={1.6} />\n <CardEnvironment />\n </>\n );\n}\n\nexport interface Card3DProps {\n /** Item name to render — e.g. \"Blueprint\". Resolved against jaml-ui sprite metadata. */\n itemName: string;\n /** Which sheet to fall back to when the name doesn't resolve. Default \"Jokers\". */\n fallbackSheet?: SpriteSheetType;\n /** Finish — \"base\" | \"foil\" | \"holo\" | \"polychrome\". Default \"base\". */\n edition?: CardEdition;\n /** Pixel height of the canvas. Default 320. */\n height?: number | string;\n className?: string;\n style?: React.CSSProperties;\n}\n\n/**\n * A floating, hover-reactive 3D Balatro card that catches the light.\n *\n * ```tsx\n * import { Card3D } from \"jaml-ui/r3f\";\n * <Card3D itemName=\"Blueprint\" edition=\"holo\" />\n * ```\n *\n * Peer deps: `three`, `@react-three/fiber`, `@react-three/drei`, `@react-spring/three`.\n */\nexport function Card3D({\n itemName,\n fallbackSheet = \"Jokers\",\n edition = \"base\",\n height = 320,\n className,\n style,\n}: Card3DProps) {\n return (\n <div className={className} style={{ width: \"100%\", height, ...style }}>\n <Canvas camera={{ position: [0, 0, 3], fov: 40 }} gl={{ alpha: true }} dpr={[1, 2]}>\n <CardLighting />\n <React.Suspense fallback={null}>\n <Float speed={2} rotationIntensity={0.6} floatIntensity={0.8}>\n <CardMesh itemName={itemName} fallbackSheet={fallbackSheet} edition={edition} />\n </Float>\n </React.Suspense>\n </Canvas>\n </div>\n );\n}\n","\"use client\";\n\nimport * as React from \"react\";\nimport { Canvas, useFrame, useThree, type ThreeEvent } from \"@react-three/fiber\";\nimport * as THREE from \"three\";\n\nimport {\n useSpriteTexture,\n EditionCardMaterial,\n CardLighting,\n CARD_W,\n CARD_H,\n MAX_TILT,\n type CardEdition,\n} from \"./Card3D.js\";\nimport { type SpriteSheetType } from \"../sprites/spriteMapper.js\";\n\n// Frame-rate independent ease: how fast a value chases its target each frame.\nconst ease = (delta: number, rate = 10) => 1 - Math.exp(-rate * delta);\n// How far the card lifts toward the camera while held (world units).\nconst LIFT_Z = 0.6;\n\ninterface DraggableCardProps {\n itemName: string;\n fallbackSheet: SpriteSheetType;\n edition: CardEdition;\n homeX: number;\n dragging: boolean;\n onPick: () => void;\n onRelease: () => void;\n}\n\n/**\n * One Balatro card on the felt. At rest it sits in its slot and leans toward the\n * pointer on hover; picked up, it lifts toward the camera and chases the pointer\n * in world space, dropping back to its slot on release. Catches the light per\n * edition. All the motion is on the GPU per-frame — the reason for r3f.\n */\nfunction DraggableCard({\n itemName,\n fallbackSheet,\n edition,\n homeX,\n dragging,\n onPick,\n onRelease,\n}: DraggableCardProps) {\n const texture = useSpriteTexture(itemName, fallbackSheet);\n const meshRef = React.useRef<THREE.Mesh>(null);\n const [hovered, setHovered] = React.useState(false);\n const { camera } = useThree();\n\n // Scratch vector reused every frame so the drag loop allocates nothing.\n const scratch = React.useMemo(() => new THREE.Vector3(), []);\n\n useFrame((state, delta) => {\n const mesh = meshRef.current;\n if (!mesh) return;\n const k = ease(delta);\n\n if (dragging) {\n // Unproject the pointer (NDC) onto the lifted z-plane and chase it.\n scratch.set(state.pointer.x, state.pointer.y, 0.5).unproject(camera);\n scratch.sub(camera.position).normalize();\n const dist = (LIFT_Z - camera.position.z) / scratch.z;\n const px = camera.position.x + scratch.x * dist;\n const py = camera.position.y + scratch.y * dist;\n mesh.position.x += (px - mesh.position.x) * k;\n mesh.position.y += (py - mesh.position.y) * k;\n mesh.position.z += (LIFT_Z - mesh.position.z) * k;\n tiltTo(mesh, state.pointer.x * MAX_TILT, -state.pointer.y * MAX_TILT, k);\n scaleTo(mesh, 1.18, k);\n } else {\n // Settle back into the slot; lean toward the pointer only while hovered.\n mesh.position.x += (homeX - mesh.position.x) * k;\n mesh.position.y += (0 - mesh.position.y) * k;\n mesh.position.z += (0 - mesh.position.z) * k;\n const ty = hovered ? state.pointer.x * MAX_TILT : 0;\n const tx = hovered ? -state.pointer.y * MAX_TILT : 0;\n tiltTo(mesh, ty, tx, k);\n scaleTo(mesh, hovered ? 1.12 : 1, k);\n }\n });\n\n return (\n <mesh\n ref={meshRef}\n position={[homeX, 0, 0]}\n onPointerOver={(e: ThreeEvent<PointerEvent>) => {\n e.stopPropagation();\n setHovered(true);\n }}\n onPointerOut={() => setHovered(false)}\n onPointerDown={(e: ThreeEvent<PointerEvent>) => {\n e.stopPropagation();\n onPick();\n }}\n onPointerUp={() => onRelease()}\n >\n <planeGeometry args={[CARD_W, CARD_H]} />\n <EditionCardMaterial texture={texture} edition={edition} />\n </mesh>\n );\n}\n\nfunction tiltTo(mesh: THREE.Mesh, targetY: number, targetX: number, k: number) {\n mesh.rotation.y += (targetY - mesh.rotation.y) * k;\n mesh.rotation.x += (targetX - mesh.rotation.x) * k;\n}\n\nfunction scaleTo(mesh: THREE.Mesh, target: number, k: number) {\n mesh.scale.x += (target - mesh.scale.x) * k;\n mesh.scale.y += (target - mesh.scale.y) * k;\n mesh.scale.z += (target - mesh.scale.z) * k;\n}\n\nexport interface CardTableItem {\n /** Item name — e.g. \"Blueprint\". Resolved against jaml-ui sprite metadata. */\n itemName: string;\n /** Sheet to fall back to when the name doesn't resolve. Default \"Jokers\". */\n fallbackSheet?: SpriteSheetType;\n /** Finish — \"base\" | \"foil\" | \"holo\" | \"polychrome\". Default \"base\". */\n edition?: CardEdition;\n}\n\nexport interface CardTableProps {\n /** The cards to lay out in a row, left to right. */\n items: CardTableItem[];\n /** Pixel height of the canvas. Default 320. */\n height?: number | string;\n /** World-space distance between card centers. Default 1.25. */\n gap?: number;\n className?: string;\n style?: React.CSSProperties;\n}\n\n/**\n * A row of floating, grabbable 3D Balatro cards in a single Canvas — the shop,\n * not a swatch. Hover to lean a card toward the pointer; press to lift it off\n * the felt and drag it; release to drop it back into its slot. Foil/holo cards\n * catch and throw the light as they move.\n *\n * ```tsx\n * import { CardTable } from \"jaml-ui/r3f\";\n * <CardTable items={[{ itemName: \"Blueprint\", edition: \"holo\" }]} />\n * ```\n *\n * Peer deps: `three`, `@react-three/fiber`, `@react-three/drei`.\n */\nexport function CardTable({\n items,\n height = 320,\n gap = 1.25,\n className,\n style,\n}: CardTableProps) {\n const [dragging, setDragging] = React.useState<number | null>(null);\n const release = React.useCallback(() => setDragging(null), []);\n const n = items.length;\n\n return (\n <div className={className} style={{ width: \"100%\", height, ...style }}>\n <Canvas\n camera={{ position: [0, 0, 3], fov: 40 }}\n gl={{ alpha: true }}\n dpr={[1, 2]}\n onPointerMissed={release}\n >\n <CardLighting />\n <React.Suspense fallback={null}>\n {items.map((item, i) => (\n <DraggableCard\n key={`${item.itemName}-${i}`}\n itemName={item.itemName}\n fallbackSheet={item.fallbackSheet ?? \"Jokers\"}\n edition={item.edition ?? \"base\"}\n homeX={(i - (n - 1) / 2) * gap}\n dragging={dragging === i}\n onPick={() => setDragging(i)}\n onRelease={release}\n />\n ))}\n </React.Suspense>\n </Canvas>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;AAeA,IAAa,IAAmB,KAAK,KAAxB;AAOb,SAAgB,EAAiB,GAAkB,GAA+C;CAChG,IAAM,EAAE,QAAK,YAAS,EAAuB,GAAU,CAAa,GAC9D,IAAO,EAAW,IAClB,IAAM,EAAoB,EAAK,QAAQ,GACvC,IAAO,EAAU,EAAM,eAAe,CAAG;CAI/C,OAAO,EAAM,cAAc;EACzB,IAAM,IAAU,EAAK,MAAM;EAQ3B,OAPA,EAAQ,YAAY,EAAM,eAC1B,EAAQ,YAAY,EAAM,eAC1B,EAAQ,aAAa,EAAM,gBAC3B,EAAQ,OAAO,IAAI,IAAI,EAAK,MAAM,IAAI,EAAK,IAAI,GAE/C,EAAQ,OAAO,IAAI,EAAI,IAAI,E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AAM,MAAM,IAAS,EAAK,MAAM,KAAK,GAC1C,EAAK,MAAM,MAAM,IAAS,EAAK,MAAM,KAAK;AAC5C;AAmCA,SAAgB,EAAU,EACxB,UACA,YAAS,KACT,SAAM,MACN,cACA,YACiB;CACjB,IAAM,CAAC,GAAU,KAAe,EAAM,SAAwB,IAAI,GAC5D,IAAU,EAAM,kBAAkB,EAAY,IAAI,GAAG,CAAC,CAAC,GACvD,IAAI,EAAM;CAEhB,OACE,kBAAC,OAAD;EAAgB;EAAW,OAAO;GAAE,OAAO;GAAQ;GAAQ,GAAG;EAAM;YAClE,kBAAC,GAAD;GACE,QAAQ;IAAE,UAAU;KAAC;KAAG;KAAG;IAAC;IAAG,KAAK;GAAG;GACvC,IAAI,EAAE,OAAO,GAAK;GAClB,KAAK,CAAC,GAAG,CAAC;GACV,iBAAiB;aAJnB,CAME,kBAAC,GAAD,CAAe,CAAA,GACf,kBAAC,EAAM,UAAP;IAAgB,UAAU;cACvB,EAAM,KAAK,GAAM,MAChB,kBAAC,GAAD;KAEE,UAAU,EAAK;KACf,eAAe,EAAK,iBAAiB;KACrC,SAAS,EAAK,WAAW;KACzB,QAAQ,KAAK,IAAI,KAAK,KAAK;KAC3B,UAAU,MAAa;KACvB,cAAc,EAAY,CAAC;KAC3B,WAAW;IACZ,GARM,GAAG,EAAK,SAAS,GAAG,GAQ1B,CACF;GACa,CAAA,CACV;;CACL,CAAA;AAET"}
|
package/dist/ui/JimboBadge.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
export type JimboBadgeTone = 'dark' | 'blue' | 'red' | 'green' | 'grey' | 'orange' | 'purple';
|
|
3
|
-
export interface JimboBadgeProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
4
|
-
size?: 'sm' | 'md';
|
|
5
|
-
tone?: JimboBadgeTone;
|
|
6
|
-
children: React.ReactNode;
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* Small colored label pill. Matches Balatro's in-game tag/rarity badges.
|
|
10
|
-
* All styling via jimbo.css `.j-badge` classes.
|
|
11
|
-
*/
|
|
12
|
-
export declare function JimboBadge({ size, tone, className, children, ...props }: JimboBadgeProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
export interface JimboBalatroFooterProps {
|
|
3
|
-
/** Fade the footer out */
|
|
4
|
-
hidden?: boolean;
|
|
5
|
-
/** Extra className */
|
|
6
|
-
className?: string;
|
|
7
|
-
/** Optional inline children */
|
|
8
|
-
children?: React.ReactNode;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* Fan-site attribution footer with Balatro link. The "Balatro" in the name is
|
|
12
|
-
* load-bearing — this footer is the public disclosure that the project is a
|
|
13
|
-
* non-profit, rule-following, PlayStack-aware fan site. Always rendered;
|
|
14
|
-
* required attribution for using Balatro art.
|
|
15
|
-
*/
|
|
16
|
-
export declare function JimboBalatroFooter({ hidden, className, children }: JimboBalatroFooterProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { SpriteSheetType } from '../sprites/spriteMapper.js';
|
|
2
|
-
export interface JimboCookLeverSprite {
|
|
3
|
-
name: string;
|
|
4
|
-
sheet?: SpriteSheetType;
|
|
5
|
-
}
|
|
6
|
-
export interface JimboCookLeverProps {
|
|
7
|
-
/** Search in flight — lever stays down, reels spin. */
|
|
8
|
-
cooking: boolean;
|
|
9
|
-
/** Fired when an armed pull is released. */
|
|
10
|
-
onCook: () => void;
|
|
11
|
-
/** Fired when the knob is tapped while cooking. */
|
|
12
|
-
onStop?: () => void;
|
|
13
|
-
/**
|
|
14
|
-
* Must-clause sprites. When provided while cooking, the reels slam onto
|
|
15
|
-
* them left→right and stay locked until the next pull.
|
|
16
|
-
*/
|
|
17
|
-
matchSprites?: JimboCookLeverSprite[];
|
|
18
|
-
disabled?: boolean;
|
|
19
|
-
className?: string;
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Slot-machine lever search trigger. Grab the gold knob and pull it down —
|
|
23
|
-
* past ~70% of travel it arms; release fires `onCook` and the lever stays
|
|
24
|
-
* slammed while `cooking`. Releasing early springs it back and nothing
|
|
25
|
-
* fires (friction is the point). Tapping the knob mid-cook calls `onStop`.
|
|
26
|
-
*
|
|
27
|
-
* Engine-agnostic: the host wires its search hook into
|
|
28
|
-
* `cooking` / `onCook` / `onStop` / `matchSprites`.
|
|
29
|
-
*/
|
|
30
|
-
export declare function JimboCookLever({ cooking, onCook, onStop, matchSprites, disabled, className, }: JimboCookLeverProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { JimboTone } from './panel.js';
|
|
2
|
-
export interface JimboCopyButtonProps {
|
|
3
|
-
/** Value placed on the clipboard when the button is clicked. */
|
|
4
|
-
value: string;
|
|
5
|
-
/** Label while idle. Default "Copy". */
|
|
6
|
-
label?: string;
|
|
7
|
-
/** Label briefly shown after a successful copy. Default "Copied". */
|
|
8
|
-
copiedLabel?: string;
|
|
9
|
-
/** Button tone. Default blue for standalone copy actions; seed rows use
|
|
10
|
-
* JimboSeedCopyChip (WeeJoker harvest) instead. */
|
|
11
|
-
tone?: JimboTone;
|
|
12
|
-
/** Button size. Default "sm". */
|
|
13
|
-
size?: 'xs' | 'sm' | 'md' | 'lg';
|
|
14
|
-
/** How long to display the copied label, in ms. Default 1500. */
|
|
15
|
-
copiedDurationMs?: number;
|
|
16
|
-
/** Fired after the clipboard write resolves. */
|
|
17
|
-
onCopy?: () => void;
|
|
18
|
-
className?: string;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* The canonical copy-to-clipboard button. Single tone (red by default —
|
|
22
|
-
* stays red through the click; only the label briefly swaps to "Copied").
|
|
23
|
-
* Reusable everywhere a copy action lives: seed copy rows, code blocks,
|
|
24
|
-
* filter sharing, etc. — instead of every consumer rolling its own
|
|
25
|
-
* `<JimboButton onClick={...}>Copy</JimboButton>` + setTimeout dance.
|
|
26
|
-
*/
|
|
27
|
-
export declare function JimboCopyButton({ value, label, copiedLabel, tone, size, copiedDurationMs, onCopy, className, }: JimboCopyButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
export interface JimboDeckAndStakeSelectorModalProps {
|
|
3
|
-
/** Whether the modal is open. */
|
|
4
|
-
open: boolean;
|
|
5
|
-
/** Called when the user dismisses via the back button. */
|
|
6
|
-
onClose: () => void;
|
|
7
|
-
/** All decks the user can cycle through, in spinner order. */
|
|
8
|
-
decks: string[];
|
|
9
|
-
/** All stakes the user can cycle through, in spinner order. */
|
|
10
|
-
stakes: string[];
|
|
11
|
-
/** Currently selected deck name (must appear in `decks`). */
|
|
12
|
-
deck: string;
|
|
13
|
-
/** Currently selected stake name (must appear in `stakes`). */
|
|
14
|
-
stake: string;
|
|
15
|
-
onDeckChange: (next: string) => void;
|
|
16
|
-
onStakeChange: (next: string) => void;
|
|
17
|
-
/** Modal title text. Default: "Search seeds for". */
|
|
18
|
-
title?: string;
|
|
19
|
-
/** Description rendered under each deck / stake title. */
|
|
20
|
-
deckDescription?: (deck: string) => React.ReactNode;
|
|
21
|
-
stakeDescription?: (stake: string) => React.ReactNode;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Modal that lets a seed hunter pick the deck + stake combination they want
|
|
25
|
-
* to search seeds against. Pure JimboUI composition — `JimboModal`, two
|
|
26
|
-
* `JimboPanelSpinner`s, deck + stake sprites. No motely-wasm dependency; the
|
|
27
|
-
* caller passes deck/stake names as strings (convert from `MotelyDeck` /
|
|
28
|
-
* `MotelyStake` enums at the boundary).
|
|
29
|
-
*/
|
|
30
|
-
export declare function JimboDeckAndStakeSelectorModal({ open, onClose, decks, stakes, deck, stake, onDeckChange, onStakeChange, title, deckDescription, stakeDescription, }: JimboDeckAndStakeSelectorModalProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
export type JimboDualChipTone = 'blue' | 'red' | 'green' | 'gold' | 'dark';
|
|
3
|
-
export interface JimboDualChipHalf {
|
|
4
|
-
value: React.ReactNode;
|
|
5
|
-
tone: JimboDualChipTone;
|
|
6
|
-
label?: string;
|
|
7
|
-
}
|
|
8
|
-
export interface JimboDualChipProps {
|
|
9
|
-
left: JimboDualChipHalf;
|
|
10
|
-
right: JimboDualChipHalf;
|
|
11
|
-
className?: string;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Two stat halves joined into one pill. Used for the `0 × 0` Hands × Discards
|
|
15
|
-
* chip on Balatro's run-info side panel.
|
|
16
|
-
*/
|
|
17
|
-
export declare function JimboDualChip({ left, right, className }: JimboDualChipProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
export type JimboIconButtonTone = "default" | "destructive";
|
|
3
|
-
export interface JimboIconButtonProps {
|
|
4
|
-
"aria-label"?: string;
|
|
5
|
-
children: React.ReactNode;
|
|
6
|
-
disabled?: boolean;
|
|
7
|
-
onClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
8
|
-
/** Pass-through for drag-start guards (e.g. stopPropagation inside draggable rows). */
|
|
9
|
-
onMouseDown?: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
10
|
-
onTouchStart?: (e: React.TouchEvent<HTMLButtonElement>) => void;
|
|
11
|
-
size?: "xs" | "sm" | "md";
|
|
12
|
-
tone?: JimboIconButtonTone;
|
|
13
|
-
title?: string;
|
|
14
|
-
}
|
|
15
|
-
export declare function JimboIconButton({ onClick, onMouseDown, onTouchStart, title, "aria-label": ariaLabel, disabled, size, tone, children, }: JimboIconButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
export type JimboInlineEditSize = 'xs' | 'sm' | 'md' | 'lg';
|
|
3
|
-
export type JimboInlineEditTone = 'white' | 'gold' | 'grey';
|
|
4
|
-
export interface JimboInlineEditProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'> {
|
|
5
|
-
/** Visual size — echoes JimboText size scale. */
|
|
6
|
-
size?: JimboInlineEditSize;
|
|
7
|
-
tone?: JimboInlineEditTone;
|
|
8
|
-
/** Render at reduced opacity (e.g. description-style sub-text). */
|
|
9
|
-
dim?: boolean;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* Borderless transparent input that reads as inline text until focused —
|
|
13
|
-
* for editable titles, bylines, or descriptions inside cards/panels.
|
|
14
|
-
* Focus chrome only shows on keyboard navigation so mouse use stays clean.
|
|
15
|
-
*/
|
|
16
|
-
export declare const JimboInlineEdit: React.ForwardRefExoticComponent<JimboInlineEditProps & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export interface JimboInputModalProps {
|
|
2
|
-
cancelLabel?: string;
|
|
3
|
-
confirmLabel?: string;
|
|
4
|
-
initialValue?: string;
|
|
5
|
-
message?: string;
|
|
6
|
-
onCancel: () => void;
|
|
7
|
-
onConfirm: (value: string) => void;
|
|
8
|
-
open: boolean;
|
|
9
|
-
placeholder?: string;
|
|
10
|
-
title: string;
|
|
11
|
-
validate?: (value: string) => string | null;
|
|
12
|
-
}
|
|
13
|
-
export declare function JimboInputModal({ open, title, message, placeholder, initialValue, confirmLabel, cancelLabel, validate, onConfirm, onCancel, }: JimboInputModalProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
export interface JimboListItemProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
3
|
-
/** Visual + a11y active state. Renders the selected/hover palette. */
|
|
4
|
-
active?: boolean;
|
|
5
|
-
}
|
|
6
|
-
/**
|
|
7
|
-
* Clickable list row. Use anywhere a vertical stack of selectable rows is
|
|
8
|
-
* needed — filter browsers, seed lists, saved-search picker, etc. Composes
|
|
9
|
-
* `.j-list-item` from jimbo.css; pass extra layout inside via children.
|
|
10
|
-
*/
|
|
11
|
-
export declare const JimboListItem: React.ForwardRefExoticComponent<JimboListItemProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
export interface JimboPanelSpinnerProps {
|
|
3
|
-
label?: React.ReactNode;
|
|
4
|
-
title: React.ReactNode;
|
|
5
|
-
description?: React.ReactNode;
|
|
6
|
-
media?: React.ReactNode;
|
|
7
|
-
meta?: React.ReactNode;
|
|
8
|
-
className?: string;
|
|
9
|
-
style?: React.CSSProperties;
|
|
10
|
-
onPrev?: () => void;
|
|
11
|
-
onNext?: () => void;
|
|
12
|
-
prevDisabled?: boolean;
|
|
13
|
-
nextDisabled?: boolean;
|
|
14
|
-
}
|
|
15
|
-
export declare function JimboPanelSpinner({ label, title, description, media, meta, className, style, onPrev, onNext, prevDisabled, nextDisabled, }: JimboPanelSpinnerProps): import("react/jsx-runtime").JSX.Element;
|
package/dist/ui/JimboPicker.d.ts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
export type JimboPickerProps = React.HTMLAttributes<HTMLDivElement>;
|
|
3
|
-
/** The picker shell — vertical stack of sections/search/grid. */
|
|
4
|
-
export declare function JimboPicker({ className, ...props }: JimboPickerProps): import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
/** A titled grouping within a picker (e.g. the Legendary row). */
|
|
6
|
-
export declare function JimboPickerSection({ className, ...props }: JimboPickerProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
export interface JimboPickerGridProps extends JimboPickerProps {
|
|
8
|
-
/** Wider cells for the legendary row. */
|
|
9
|
-
legendary?: boolean;
|
|
10
|
-
/** Scrollable body with hidden scrollbar. */
|
|
11
|
-
scroll?: boolean;
|
|
12
|
-
}
|
|
13
|
-
/** The sprite grid. */
|
|
14
|
-
export declare function JimboPickerGrid({ legendary, scroll, className, ...props }: JimboPickerGridProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
-
export interface JimboPickerItemProps extends JimboPickerProps {
|
|
16
|
-
/** Dimmed (e.g. filtered-out half of a voucher pair). */
|
|
17
|
-
muted?: boolean;
|
|
18
|
-
}
|
|
19
|
-
/** A single clickable sprite cell. */
|
|
20
|
-
export declare function JimboPickerItem({ muted, className, ...props }: JimboPickerItemProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
-
/** Wrapper for the search field row. */
|
|
22
|
-
export declare function JimboPickerSearch({ className, ...props }: JimboPickerProps): import("react/jsx-runtime").JSX.Element;
|
|
23
|
-
/** A base/upgrade pair cell (vouchers). */
|
|
24
|
-
export declare function JimboPickerPair({ className, ...props }: JimboPickerProps): import("react/jsx-runtime").JSX.Element;
|
|
25
|
-
/** Empty / no-matches state inside the grid. */
|
|
26
|
-
export declare function JimboPickerEmpty({ className, ...props }: JimboPickerProps): import("react/jsx-runtime").JSX.Element;
|
|
27
|
-
/** Recessed hint panel above a grid. */
|
|
28
|
-
export declare function JimboPickerHint({ className, ...props }: JimboPickerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
export interface JimboSeedCopyChipProps {
|
|
3
|
-
value: string;
|
|
4
|
-
placeholder?: string;
|
|
5
|
-
disabled?: boolean;
|
|
6
|
-
copiedLabel?: string;
|
|
7
|
-
copiedDurationMs?: number;
|
|
8
|
-
onCopy?: (value: string) => void;
|
|
9
|
-
className?: string;
|
|
10
|
-
style?: React.CSSProperties;
|
|
11
|
-
}
|
|
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.
|
|
15
|
-
*/
|
|
16
|
-
export declare function JimboSeedCopyChip({ value, placeholder, disabled, copiedLabel, copiedDurationMs, onCopy, className, style, }: JimboSeedCopyChipProps): import("react/jsx-runtime").JSX.Element;
|
package/dist/ui/JimboSelect.d.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
export interface JimboSelectOption {
|
|
3
|
-
disabled?: boolean;
|
|
4
|
-
label?: string;
|
|
5
|
-
value: string;
|
|
6
|
-
}
|
|
7
|
-
export interface JimboSelectProps {
|
|
8
|
-
'aria-label'?: string;
|
|
9
|
-
disabled?: boolean;
|
|
10
|
-
fullWidth?: boolean;
|
|
11
|
-
onChange: (value: string) => void;
|
|
12
|
-
options: JimboSelectOption[] | string[];
|
|
13
|
-
placeholder?: string;
|
|
14
|
-
size?: 'sm' | 'md';
|
|
15
|
-
style?: React.CSSProperties;
|
|
16
|
-
value: string;
|
|
17
|
-
label?: string;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Select one of N values. There is no native `<select>` in the Balatro UI
|
|
21
|
-
* language — options are cycled with arrows, not via an OS dropdown. So
|
|
22
|
-
* JimboSelect is a `< value >` JimboSpinner that cycles through the options
|
|
23
|
-
* list. If `value` isn't in `options`, we land on the first option.
|
|
24
|
-
*
|
|
25
|
-
* Was previously a raw `<select>` element with hand-painted gold-arrow CSS
|
|
26
|
-
* gradients. That was off-brand on every axis (native control, gold control
|
|
27
|
-
* affordance, no JimboButton). Rewritten to compose JimboSpinner so it
|
|
28
|
-
* behaves like every other selector in the design system.
|
|
29
|
-
*/
|
|
30
|
-
export declare function JimboSelect({ value, options, onChange, disabled, label, 'aria-label': ariaLabel, style, }: JimboSelectProps): import("react/jsx-runtime").JSX.Element | null;
|
package/dist/ui/JimboSlider.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export interface JimboSliderProps {
|
|
2
|
-
value: number;
|
|
3
|
-
min?: number;
|
|
4
|
-
max?: number;
|
|
5
|
-
step?: number;
|
|
6
|
-
label?: string;
|
|
7
|
-
onChange?: (value: number) => void;
|
|
8
|
-
className?: string;
|
|
9
|
-
id?: string;
|
|
10
|
-
}
|
|
11
|
-
export declare function JimboSlider({ value, min, max, step, label, onChange, className, id, }: JimboSliderProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
export interface JimboSpinnerProps {
|
|
2
|
-
value: string | number;
|
|
3
|
-
label?: string;
|
|
4
|
-
onPrev?: () => void;
|
|
5
|
-
onNext?: () => void;
|
|
6
|
-
canPrev?: boolean;
|
|
7
|
-
canNext?: boolean;
|
|
8
|
-
className?: string;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* Two-state-or-more value spinner: red `<` button + value chip + red `>` button.
|
|
12
|
-
* This is the canonical Balatro on/off control (IMG_3678: `Shadows < OFF >`)
|
|
13
|
-
* AND the canonical option-cycler (deck/stake/aesthetic picker).
|
|
14
|
-
*
|
|
15
|
-
* Note: previously named JimboStepper — that was a misnomer. A stepper is a
|
|
16
|
-
* page-dot indicator (see JimboStepper). This is a spinner.
|
|
17
|
-
*/
|
|
18
|
-
export declare function JimboSpinner({ value, label, onPrev, onNext, canPrev, canNext, className, }: JimboSpinnerProps): import("react/jsx-runtime").JSX.Element;
|