jaml-ui 0.26.4 → 0.26.5

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 (33) hide show
  1. package/README.md +22 -7
  2. package/dist/assets/searchPoolWorker-CejAnH4a.js +35 -0
  3. package/dist/assets/searchPoolWorker-CejAnH4a.js.map +1 -0
  4. package/dist/chunks/motelyItemDecoder-Bg12hhB2.js +248 -0
  5. package/dist/chunks/motelyItemDecoder-Bg12hhB2.js.map +1 -0
  6. package/dist/chunks/searchPoolWorker-CTtPOuxF.js +8 -0
  7. package/dist/chunks/searchPoolWorker-CTtPOuxF.js.map +1 -0
  8. package/dist/chunks/{ui-BRMCKSX4.js → ui-0liG4zOw.js} +2 -2
  9. package/dist/chunks/{ui-BRMCKSX4.js.map → ui-0liG4zOw.js.map} +1 -1
  10. package/dist/components/JamlIde.d.ts +8 -1
  11. package/dist/components/JamlIdeToolbar.d.ts +3 -1
  12. package/dist/components/jamlMap/CategoryPicker.d.ts +1 -0
  13. package/dist/components/jamlMap/JokerPicker.d.ts +1 -0
  14. package/dist/config.d.ts +7 -0
  15. package/dist/hooks/searchPoolWorker.d.ts +60 -0
  16. package/dist/hooks/searchWorker.d.ts +1 -0
  17. package/dist/hooks/useAnalyzer.d.ts +17 -0
  18. package/dist/hooks/useJamlLibrary.d.ts +13 -0
  19. package/dist/hooks/useMotelyRuntime.d.ts +11 -0
  20. package/dist/hooks/useSearch.d.ts +5 -6
  21. package/dist/hooks/useSearchPool.d.ts +42 -0
  22. package/dist/index.d.ts +5 -1
  23. package/dist/index.js +3056 -3064
  24. package/dist/index.js.map +1 -1
  25. package/dist/lib/hooks/useSeedAnalyzer.d.ts +10 -3
  26. package/dist/motely.d.ts +3 -1
  27. package/dist/motely.js +22 -21
  28. package/dist/motely.js.map +1 -1
  29. package/dist/motelyBoot.d.ts +13 -0
  30. package/dist/ui.js +1 -1
  31. package/package.json +7 -4
  32. package/dist/chunks/motelyItemDecoder-BFCFW_BF.js +0 -113
  33. package/dist/chunks/motelyItemDecoder-BFCFW_BF.js.map +0 -1
@@ -1,6 +1,13 @@
1
- import { Motely } from 'motely-wasm';
2
- export declare function useSeedAnalyzer(motely: typeof Motely | null, seed: string | null): {
3
- data: Motely.Analysis.SeedAnalysisDto | null | undefined;
1
+ import { Motely as MotelyNamespace } from 'motely-wasm';
2
+ type MotelyApi = typeof MotelyNamespace;
3
+ export declare function useSeedAnalyzer(motely: MotelyApi | null, seed: string | null, jaml?: string): {
4
+ data: Readonly<{
5
+ seed: string;
6
+ score: number;
7
+ tallies: Int32Array;
8
+ analysis?: import('motely-wasm/motely/analysis').MotelySeedAnalysis;
9
+ }> | null;
4
10
  loading: boolean;
5
11
  error: string | null;
6
12
  };
13
+ export {};
package/dist/motely.d.ts CHANGED
@@ -1,4 +1,6 @@
1
- export { Motely } from './motelyBoot.js';
1
+ export { Motely, MotelyFileSystem, ensureMotelyReady, getMotelyRuntimeSnapshot, isMotelyFileSystemReady, motelyFileSystemInitError, subscribeMotelyRuntime, type MotelyRuntimeSnapshot, type MotelyRuntimeStatus, } from './motelyBoot.js';
2
2
  export { decodeMotelyItem, decodeMotelyItemToJamlCard, motelyItemTypeName, motelyItemCategory, motelyItemDisplayName, motelyItemRenderCategory, motelyItemEditionName, motelyItemSealName, motelyItemEnhancementName, motelyStandardcardRankName, motelyStandardcardSuitName, decodeMotelyItemName, resolveMotelyItemType, warmMotelyItemCache, motelyItemCacheSize, type DecodedMotelyItem, type MotelyItemInput, type MotelyJamlCard, type MotelyRenderableCategory, type MotelyRuntimeItem, } from './decode/motelyItemDecoder.js';
3
3
  export { motelyItemToSprite, getMotelySpriteByName, type MotelySpriteData, } from './decode/motelySprite.js';
4
4
  export { motelyBossDisplayName, motelyBossDisplayNameFromKey, motelyBoosterPackDisplayName, motelyBoosterPackDisplayNameFromKey, motelyItemDisplayNameFromKey, motelyItemDisplayNameFromValue, motelyTagDisplayName, motelyTagDisplayNameFromKey, motelyVoucherDisplayName, motelyVoucherDisplayNameFromKey, } from './motelyDisplay.js';
5
+ export { useJamlLibrary, type JamlLibraryStatus, type UseJamlLibraryState, } from './hooks/useJamlLibrary.js';
6
+ export { useMotelyRuntime, useMotelyRuntimeOwner, type UseMotelyRuntimeState, } from './hooks/useMotelyRuntime.js';
package/dist/motely.js CHANGED
@@ -1,10 +1,10 @@
1
1
  "use client";
2
2
  import { n as e } from "./chunks/assets-RWUiFSTc.js";
3
3
  import { d as t, h as n, r, t as i } from "./chunks/spriteMapper-CFjN0_TV.js";
4
- import { a, c as o, d as s, f as c, g as l, h as u, i as d, l as f, m as p, n as m, o as h, p as g, r as _, s as v, t as y, u as b } from "./chunks/motelyItemDecoder-BFCFW_BF.js";
4
+ import { C as a, S as o, T as s, _ as c, a as l, b as u, c as d, d as f, f as p, g as m, h, i as g, l as _, m as v, n as y, o as b, p as x, r as S, s as C, t as w, u as T, v as E, w as D, x as O, y as k } from "./chunks/motelyItemDecoder-Bg12hhB2.js";
5
5
  //#region src/decode/motelySprite.ts
6
- function x(a) {
7
- let o = y(a);
6
+ function A(a) {
7
+ let o = w(a);
8
8
  if (!o) return null;
9
9
  if (o.category === "playing" && o.rank && o.suit) {
10
10
  let r = t[o.rank], i = n[o.suit];
@@ -31,7 +31,7 @@ function x(a) {
31
31
  category: o.category
32
32
  } : null;
33
33
  }
34
- function S(a, o = "unknown") {
34
+ function j(a, o = "unknown") {
35
35
  if (o === "playing") {
36
36
  let r = /^(.*?)\s+of\s+(.*?)$/i.exec(a);
37
37
  if (r) {
@@ -62,41 +62,42 @@ function S(a, o = "unknown") {
62
62
  }
63
63
  //#endregion
64
64
  //#region src/motelyDisplay.ts
65
- function C(e, t) {
65
+ var M = k;
66
+ function N(e, t) {
66
67
  let n = e[String(t)];
67
68
  return typeof n == "string" && n.length > 0 ? n : null;
68
69
  }
69
- function w(e) {
70
- return C(l.MotelyBossBlind, e & 255) ?? `boss#${e}`;
70
+ function P(e) {
71
+ return N(M.MotelyBossBlind, e & 255) ?? `boss#${e}`;
71
72
  }
72
- function T(e) {
73
+ function F(e) {
73
74
  return e;
74
75
  }
75
- function E(e) {
76
- return C(l.MotelyVoucher, e) ?? `voucher#${e}`;
76
+ function I(e) {
77
+ return N(M.MotelyVoucher, e) ?? `voucher#${e}`;
77
78
  }
78
- function D(e) {
79
+ function L(e) {
79
80
  return e;
80
81
  }
81
- function O(e) {
82
- return C(l.MotelyTag, e) ?? `tag#${e}`;
82
+ function R(e) {
83
+ return N(M.MotelyTag, e) ?? `tag#${e}`;
83
84
  }
84
- function k(e) {
85
+ function z(e) {
85
86
  return e;
86
87
  }
87
- function A(e) {
88
- return C(l.MotelyBoosterPack, e) ?? `pack#${e}`;
88
+ function B(e) {
89
+ return N(M.MotelyBoosterPack, e) ?? `pack#${e}`;
89
90
  }
90
- function j(e) {
91
+ function V(e) {
91
92
  return `${e} Pack`;
92
93
  }
93
- function M(e) {
94
+ function H(e) {
94
95
  return e;
95
96
  }
96
- function N(e) {
97
- return C(l.MotelyItemType, e & 65535) ?? `item#${e}`;
97
+ function U(e) {
98
+ return N(M.MotelyItemType, e & 65535) ?? `item#${e}`;
98
99
  }
99
100
  //#endregion
100
- export { l as Motely, y as decodeMotelyItem, m as decodeMotelyItemName, _ as decodeMotelyItemToJamlCard, S as getMotelySpriteByName, A as motelyBoosterPackDisplayName, j as motelyBoosterPackDisplayNameFromKey, w as motelyBossDisplayName, T as motelyBossDisplayNameFromKey, d as motelyItemCacheSize, a as motelyItemCategory, h as motelyItemDisplayName, M as motelyItemDisplayNameFromKey, N as motelyItemDisplayNameFromValue, v as motelyItemEditionName, o as motelyItemEnhancementName, f as motelyItemRenderCategory, b as motelyItemSealName, x as motelyItemToSprite, s as motelyItemTypeName, c as motelyStandardcardRankName, g as motelyStandardcardSuitName, O as motelyTagDisplayName, k as motelyTagDisplayNameFromKey, E as motelyVoucherDisplayName, D as motelyVoucherDisplayNameFromKey, p as resolveMotelyItemType, u as warmMotelyItemCache };
101
+ export { k as Motely, u as MotelyFileSystem, w as decodeMotelyItem, y as decodeMotelyItemName, S as decodeMotelyItemToJamlCard, O as ensureMotelyReady, o as getMotelyRuntimeSnapshot, j as getMotelySpriteByName, a as isMotelyFileSystemReady, B as motelyBoosterPackDisplayName, V as motelyBoosterPackDisplayNameFromKey, P as motelyBossDisplayName, F as motelyBossDisplayNameFromKey, D as motelyFileSystemInitError, g as motelyItemCacheSize, l as motelyItemCategory, b as motelyItemDisplayName, H as motelyItemDisplayNameFromKey, U as motelyItemDisplayNameFromValue, C as motelyItemEditionName, d as motelyItemEnhancementName, _ as motelyItemRenderCategory, T as motelyItemSealName, A as motelyItemToSprite, f as motelyItemTypeName, p as motelyStandardcardRankName, x as motelyStandardcardSuitName, R as motelyTagDisplayName, z as motelyTagDisplayNameFromKey, I as motelyVoucherDisplayName, L as motelyVoucherDisplayNameFromKey, v as resolveMotelyItemType, s as subscribeMotelyRuntime, E as useJamlLibrary, m as useMotelyRuntime, c as useMotelyRuntimeOwner, h as warmMotelyItemCache };
101
102
 
102
103
  //# sourceMappingURL=motely.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"motely.js","names":[],"sources":["../src/decode/motelySprite.ts","../src/motelyDisplay.ts"],"sourcesContent":["import { decodeMotelyItem, type MotelyRenderableCategory } from \"./motelyItemDecoder.js\";\r\nimport { getSpriteData, SHEET_META } from \"../sprites/spriteMapper.js\";\r\nimport { RANK_MAP, SUIT_MAP } from \"../sprites/spriteData.js\";\r\nimport { resolveJamlAssetUrl } from \"../assets.js\";\r\n\r\nexport interface MotelySpriteData {\r\n atlasPath: string;\r\n gridCol: number;\r\n gridRow: number;\r\n gridCols: number;\r\n gridRows: number;\r\n displayName: string;\r\n category: MotelyRenderableCategory;\r\n}\r\n\r\n/**\r\n * Given a raw motely-wasm item value (which may be a bitpacked integer or raw MotelyItemType),\r\n * resolves it to a sprite atlas path and grid coordinates for rendering.\r\n */\r\nexport function motelyItemToSprite(rawValue: number): MotelySpriteData | null {\r\n const decoded = decodeMotelyItem(rawValue);\r\n if (!decoded) return null;\r\n\r\n if (decoded.category === \"playing\" && decoded.rank && decoded.suit) {\r\n const col = RANK_MAP[decoded.rank];\r\n const row = SUIT_MAP[decoded.suit];\r\n if (col !== undefined && row !== undefined) {\r\n return {\r\n atlasPath: resolveJamlAssetUrl('deck'),\r\n gridCol: col,\r\n gridRow: row,\r\n gridCols: 13,\r\n gridRows: 4,\r\n displayName: decoded.displayName,\r\n category: \"playing\"\r\n };\r\n }\r\n }\r\n\r\n const sprite = getSpriteData(decoded.displayName);\r\n if (!sprite) return null;\r\n\r\n const meta = SHEET_META[sprite.type];\r\n if (!meta) return null;\r\n\r\n return {\r\n atlasPath: resolveJamlAssetUrl(meta.assetKey),\r\n gridCol: sprite.pos.x,\r\n gridRow: sprite.pos.y,\r\n gridCols: meta.cols,\r\n gridRows: meta.rows,\r\n displayName: decoded.displayName,\r\n category: decoded.category\r\n };\r\n}\r\n\r\n/**\r\n * Resolves a sprite by name and category without needing a Motely integer.\r\n */\r\nexport function getMotelySpriteByName(name: string, category: MotelyRenderableCategory = \"unknown\"): MotelySpriteData | null {\r\n if (category === \"playing\") {\r\n // Attempt to parse \"Rank of Suit\"\r\n const match = /^(.*?)\\s+of\\s+(.*?)$/i.exec(name);\r\n if (match) {\r\n const rank = match[1];\r\n const suit = match[2];\r\n const col = RANK_MAP[rank];\r\n const row = SUIT_MAP[suit];\r\n if (col !== undefined && row !== undefined) {\r\n return {\r\n atlasPath: resolveJamlAssetUrl('deck'),\r\n gridCol: col,\r\n gridRow: row,\r\n gridCols: 13,\r\n gridRows: 4,\r\n displayName: name,\r\n category: \"playing\"\r\n };\r\n }\r\n }\r\n }\r\n\r\n const sprite = getSpriteData(name);\r\n if (!sprite) return null;\r\n\r\n const meta = SHEET_META[sprite.type];\r\n if (!meta) return null;\r\n\r\n return {\r\n atlasPath: resolveJamlAssetUrl(meta.assetKey),\r\n gridCol: sprite.pos.x,\r\n gridRow: sprite.pos.y,\r\n gridCols: meta.cols,\r\n gridRows: meta.rows,\r\n displayName: name,\r\n category\r\n };\r\n}\r\n","import { Motely } from \"./motelyBoot.js\";\n\nfunction runtimeEnumKey(\n enumObject: Record<string, unknown>,\n value: number,\n): string | null {\n const key = enumObject[String(value)];\n return typeof key === \"string\" && key.length > 0 ? key : null;\n}\n\nexport function motelyBossDisplayName(value: number): string {\n const key = runtimeEnumKey(Motely.MotelyBossBlind as Record<string, unknown>, value & 0xff);\n return key ?? `boss#${value}`;\n}\n\nexport function motelyBossDisplayNameFromKey(key: string): string {\n return key;\n}\n\nexport function motelyVoucherDisplayName(value: number): string {\n const key = runtimeEnumKey(Motely.MotelyVoucher as Record<string, unknown>, value);\n return key ?? `voucher#${value}`;\n}\n\nexport function motelyVoucherDisplayNameFromKey(key: string): string {\n return key;\n}\n\nexport function motelyTagDisplayName(value: number): string {\n const key = runtimeEnumKey(Motely.MotelyTag as Record<string, unknown>, value);\n return key ?? `tag#${value}`;\n}\n\nexport function motelyTagDisplayNameFromKey(key: string): string {\n return key;\n}\n\nexport function motelyBoosterPackDisplayName(value: number): string {\n const key = runtimeEnumKey(Motely.MotelyBoosterPack as Record<string, unknown>, value);\n return key ?? `pack#${value}`;\n}\n\nexport function motelyBoosterPackDisplayNameFromKey(key: string): string {\n return `${key} Pack`;\n}\n\nexport function motelyItemDisplayNameFromKey(key: string): string {\n return key;\n}\n\nexport function motelyItemDisplayNameFromValue(value: number): string {\n const key = runtimeEnumKey(Motely.MotelyItemType as Record<string, unknown>, value & 0xffff);\n return key ?? `item#${value}`;\n}\n"],"mappings":";;;;;AAmBA,SAAgB,EAAmB,GAA2C;CAC5E,IAAM,IAAU,EAAiB,EAAS;CAC1C,IAAI,CAAC,GAAS,OAAO;CAErB,IAAI,EAAQ,aAAa,aAAa,EAAQ,QAAQ,EAAQ,MAAM;EAClE,IAAM,IAAM,EAAS,EAAQ,OACvB,IAAM,EAAS,EAAQ;EAC7B,IAAI,MAAQ,KAAA,KAAa,MAAQ,KAAA,GAC/B,O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AA6B,GAAqB;CAChE,OAAO;;AAGT,SAAgB,EAAyB,GAAuB;CAE9D,OADY,EAAe,EAAO,eAA0C,EACrE,IAAO,WAAW;;AAG3B,SAAgB,EAAgC,GAAqB;CACnE,OAAO;;AAGT,SAAgB,EAAqB,GAAuB;CAE1D,OADY,EAAe,EAAO,WAAsC,EACjE,IAAO,OAAO;;AAGvB,SAAgB,EAA4B,GAAqB;CAC/D,OAAO;;AAGT,SAAgB,EAA6B,GAAuB;CAElE,OADY,EAAe,EAAO,mBAA8C,EACzE,IAAO,QAAQ;;AAGxB,SAAgB,EAAoC,GAAqB;CACvE,OAAO,GAAG,EAAI;;AAGhB,SAAgB,EAA6B,GAAqB;CAChE,OAAO;;AAGT,SAAgB,EAA+B,GAAuB;CAEpE,OADY,EAAe,EAAO,gBAA2C,IAAQ,MAC9E,IAAO,QAAQ"}
1
+ {"version":3,"file":"motely.js","names":[],"sources":["../src/decode/motelySprite.ts","../src/motelyDisplay.ts"],"sourcesContent":["import { decodeMotelyItem, type MotelyRenderableCategory } from \"./motelyItemDecoder.js\";\r\nimport { getSpriteData, SHEET_META } from \"../sprites/spriteMapper.js\";\r\nimport { RANK_MAP, SUIT_MAP } from \"../sprites/spriteData.js\";\r\nimport { resolveJamlAssetUrl } from \"../assets.js\";\r\n\r\nexport interface MotelySpriteData {\r\n atlasPath: string;\r\n gridCol: number;\r\n gridRow: number;\r\n gridCols: number;\r\n gridRows: number;\r\n displayName: string;\r\n category: MotelyRenderableCategory;\r\n}\r\n\r\n/**\r\n * Given a raw motely-wasm item value (which may be a bitpacked integer or raw MotelyItemType),\r\n * resolves it to a sprite atlas path and grid coordinates for rendering.\r\n */\r\nexport function motelyItemToSprite(rawValue: number): MotelySpriteData | null {\r\n const decoded = decodeMotelyItem(rawValue);\r\n if (!decoded) return null;\r\n\r\n if (decoded.category === \"playing\" && decoded.rank && decoded.suit) {\r\n const col = RANK_MAP[decoded.rank];\r\n const row = SUIT_MAP[decoded.suit];\r\n if (col !== undefined && row !== undefined) {\r\n return {\r\n atlasPath: resolveJamlAssetUrl('deck'),\r\n gridCol: col,\r\n gridRow: row,\r\n gridCols: 13,\r\n gridRows: 4,\r\n displayName: decoded.displayName,\r\n category: \"playing\"\r\n };\r\n }\r\n }\r\n\r\n const sprite = getSpriteData(decoded.displayName);\r\n if (!sprite) return null;\r\n\r\n const meta = SHEET_META[sprite.type];\r\n if (!meta) return null;\r\n\r\n return {\r\n atlasPath: resolveJamlAssetUrl(meta.assetKey),\r\n gridCol: sprite.pos.x,\r\n gridRow: sprite.pos.y,\r\n gridCols: meta.cols,\r\n gridRows: meta.rows,\r\n displayName: decoded.displayName,\r\n category: decoded.category\r\n };\r\n}\r\n\r\n/**\r\n * Resolves a sprite by name and category without needing a Motely integer.\r\n */\r\nexport function getMotelySpriteByName(name: string, category: MotelyRenderableCategory = \"unknown\"): MotelySpriteData | null {\r\n if (category === \"playing\") {\r\n // Attempt to parse \"Rank of Suit\"\r\n const match = /^(.*?)\\s+of\\s+(.*?)$/i.exec(name);\r\n if (match) {\r\n const rank = match[1];\r\n const suit = match[2];\r\n const col = RANK_MAP[rank];\r\n const row = SUIT_MAP[suit];\r\n if (col !== undefined && row !== undefined) {\r\n return {\r\n atlasPath: resolveJamlAssetUrl('deck'),\r\n gridCol: col,\r\n gridRow: row,\r\n gridCols: 13,\r\n gridRows: 4,\r\n displayName: name,\r\n category: \"playing\"\r\n };\r\n }\r\n }\r\n }\r\n\r\n const sprite = getSpriteData(name);\r\n if (!sprite) return null;\r\n\r\n const meta = SHEET_META[sprite.type];\r\n if (!meta) return null;\r\n\r\n return {\r\n atlasPath: resolveJamlAssetUrl(meta.assetKey),\r\n gridCol: sprite.pos.x,\r\n gridRow: sprite.pos.y,\r\n gridCols: meta.cols,\r\n gridRows: meta.rows,\r\n displayName: name,\r\n category\r\n };\r\n}\r\n","import { Motely } from \"./motelyBoot.js\";\n\ntype RuntimeEnum = Record<string, string | number>;\ntype MotelyRuntimeEnums = typeof Motely & Record<string, RuntimeEnum>;\n\nconst MotelyEnums = Motely as MotelyRuntimeEnums;\n\nfunction runtimeEnumKey(\n enumObject: Record<string, unknown>,\n value: number,\n): string | null {\n const key = enumObject[String(value)];\n return typeof key === \"string\" && key.length > 0 ? key : null;\n}\n\nexport function motelyBossDisplayName(value: number): string {\n const key = runtimeEnumKey(MotelyEnums.MotelyBossBlind, value & 0xff);\n return key ?? `boss#${value}`;\n}\n\nexport function motelyBossDisplayNameFromKey(key: string): string {\n return key;\n}\n\nexport function motelyVoucherDisplayName(value: number): string {\n const key = runtimeEnumKey(MotelyEnums.MotelyVoucher, value);\n return key ?? `voucher#${value}`;\n}\n\nexport function motelyVoucherDisplayNameFromKey(key: string): string {\n return key;\n}\n\nexport function motelyTagDisplayName(value: number): string {\n const key = runtimeEnumKey(MotelyEnums.MotelyTag, value);\n return key ?? `tag#${value}`;\n}\n\nexport function motelyTagDisplayNameFromKey(key: string): string {\n return key;\n}\n\nexport function motelyBoosterPackDisplayName(value: number): string {\n const key = runtimeEnumKey(MotelyEnums.MotelyBoosterPack, value);\n return key ?? `pack#${value}`;\n}\n\nexport function motelyBoosterPackDisplayNameFromKey(key: string): string {\n return `${key} Pack`;\n}\n\nexport function motelyItemDisplayNameFromKey(key: string): string {\n return key;\n}\n\nexport function motelyItemDisplayNameFromValue(value: number): string {\n const key = runtimeEnumKey(MotelyEnums.MotelyItemType, value & 0xffff);\n return key ?? `item#${value}`;\n}\n"],"mappings":";;;;;AAmBA,SAAgB,EAAmB,GAA2C;CAC5E,IAAM,IAAU,EAAiB,EAAS;CAC1C,IAAI,CAAC,GAAS,OAAO;CAErB,IAAI,EAAQ,aAAa,aAAa,EAAQ,QAAQ,EAAQ,MAAM;EAClE,IAAM,IAAM,EAAS,EAAQ,OACvB,IAAM,EAAS,EAAQ;EAC7B,IAAI,MAAQ,KAAA,KAAa,MAAQ,KAAA,GAC/B,OAAO;GACL,WAAW,EAAoB,OAAO;GACtC,SAAS;GACT,SAAS;GACT,UAAU;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B,GAAuB;CAE9D,OADY,EAAe,EAAY,eAAe,EAC/C,IAAO,WAAW;;AAG3B,SAAgB,EAAgC,GAAqB;CACnE,OAAO;;AAGT,SAAgB,EAAqB,GAAuB;CAE1D,OADY,EAAe,EAAY,WAAW,EAC3C,IAAO,OAAO;;AAGvB,SAAgB,EAA4B,GAAqB;CAC/D,OAAO;;AAGT,SAAgB,EAA6B,GAAuB;CAElE,OADY,EAAe,EAAY,mBAAmB,EACnD,IAAO,QAAQ;;AAGxB,SAAgB,EAAoC,GAAqB;CACvE,OAAO,GAAG,EAAI;;AAGhB,SAAgB,EAA6B,GAAqB;CAChE,OAAO;;AAGT,SAAgB,EAA+B,GAAuB;CAEpE,OADY,EAAe,EAAY,gBAAgB,IAAQ,MACxD,IAAO,QAAQ"}
@@ -1,2 +1,15 @@
1
1
  import { Motely } from 'motely-wasm';
2
+ export type MotelyRuntimeStatus = "idle" | "booting" | "ready" | "error";
3
+ export interface MotelyRuntimeSnapshot {
4
+ status: MotelyRuntimeStatus;
5
+ error: unknown;
6
+ isFileSystemReady: boolean;
7
+ fileSystemError: unknown;
8
+ }
9
+ export declare function ensureMotelyReady(): Promise<void>;
10
+ export declare function getMotelyRuntimeSnapshot(): MotelyRuntimeSnapshot;
11
+ export declare function subscribeMotelyRuntime(listener: () => void): () => void;
12
+ export declare const MotelyFileSystem: typeof import("@rewaffle/bootsharp-file-system") | null;
13
+ export declare const motelyFileSystemInitError: unknown;
14
+ export declare const isMotelyFileSystemReady: boolean;
2
15
  export { Motely };
package/dist/ui.js CHANGED
@@ -1,3 +1,3 @@
1
- import { A as e, C as t, D as n, E as r, F as i, I as a, L as o, M as s, N as c, O as l, P as u, R as d, S as f, T as p, _ as m, a as h, b as g, c as _, d as v, f as y, g as b, h as x, i as S, j as C, k as w, l as T, m as E, n as D, o as O, p as k, r as A, s as j, t as M, u as N, v as P, w as F, x as I, y as L } from "./chunks/ui-BRMCKSX4.js";
1
+ import { A as e, C as t, D as n, E as r, F as i, I as a, L as o, M as s, N as c, O as l, P as u, R as d, S as f, T as p, _ as m, a as h, b as g, c as _, d as v, f as y, g as b, h as x, i as S, j as C, k as w, l as T, m as E, n as D, o as O, p as k, r as A, s as j, t as M, u as N, v as P, w as F, x as I, y as L } from "./chunks/ui-0liG4zOw.js";
2
2
  import { n as R, r as z, t as B } from "./chunks/tokens-B65Fzble.js";
3
3
  export { a as DeckSprite, B as JIMBO_ANIMATIONS, b as JimboApp, m as JimboAppFooter, P as JimboAppScroll, e as JimboBackButton, I as JimboBackground, F as JimboBadge, f as JimboBalatroFooter, C as JimboButton, L as JimboCodeBlock, R as JimboColorOption, _ as JimboCopyRow, t as JimboFilterBar, n as JimboFlankNav, r as JimboFloating, S as JimboIconButton, N as JimboInfoCard, v as JimboInfoCardAside, y as JimboInfoCardBody, k as JimboInfoCardSub, E as JimboInfoCardTitle, s as JimboInnerPanel, A as JimboInputModal, h as JimboInset, c as JimboModal, u as JimboPanel, x as JimboSectionHeader, D as JimboSelect, o as JimboSprite, O as JimboStatGrid, l as JimboTabs, i as JimboText, p as JimboToggleList, g as JimboTooltip, w as JimboVerticalTabs, j as JimboWordmark, M as PanelSplitter, T as Showcase, d as StakeSprite, z as withAlpha };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jaml-ui",
3
- "version": "0.26.4",
3
+ "version": "0.26.5",
4
4
  "description": "Balatro rendering components, sprite metadata, and optional Motely helpers for React apps.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -55,6 +55,7 @@
55
55
  "prepack": "npm run build",
56
56
  "storybook": "storybook dev -p 6006",
57
57
  "build-storybook": "storybook build",
58
+ "serve:storybook": "npx --yes serve storybook-static -l 3141 --cors",
58
59
  "lint": "eslint ."
59
60
  },
60
61
  "engines": {
@@ -98,6 +99,9 @@
98
99
  "@react-three/fiber": {
99
100
  "optional": true
100
101
  },
102
+ "@rewaffle/bootsharp-file-system": {
103
+ "optional": true
104
+ },
101
105
  "react-icons": {
102
106
  "optional": true
103
107
  },
@@ -132,7 +136,6 @@
132
136
  "eslint-plugin-react-hooks": "^7.1.1",
133
137
  "eslint-plugin-react-refresh": "^0.5.2",
134
138
  "globals": "^17.6.0",
135
- "motely-wasm": "^16.0.1",
136
139
  "playwright": "^1.59.1",
137
140
  "react": "^19.2.6",
138
141
  "react-dom": "^19.2.6",
@@ -158,8 +161,8 @@
158
161
  "clsx": "^2.1.1",
159
162
  "js-yaml": "^4.1.1",
160
163
  "lucide-react": "^1.14.0",
161
- "motely-wasm": "^16.0.1",
164
+ "motely-wasm": "^17.3.0",
162
165
  "tailwind-merge": "^2.6.1",
163
166
  "zustand": "^5.0.13"
164
167
  }
165
- }
168
+ }
@@ -1,113 +0,0 @@
1
- import e, { Motely as t } from "motely-wasm";
2
- //#region src/motelyBoot.ts
3
- await e.boot();
4
- //#endregion
5
- //#region src/decode/motelyItemDecoder.ts
6
- var n = t, r = {
7
- [n.MotelyItemTypeCategory.Standardcard]: "playing",
8
- [n.MotelyItemTypeCategory.SpectralCard]: "spectral",
9
- [n.MotelyItemTypeCategory.TarotCard]: "tarot",
10
- [n.MotelyItemTypeCategory.PlanetCard]: "planet",
11
- [n.MotelyItemTypeCategory.Joker]: "joker"
12
- };
13
- function i(e, t) {
14
- let n = e[String(t)];
15
- return typeof n == "string" ? n : null;
16
- }
17
- function a(e) {
18
- return e.replace(/([a-z])([A-Z])/g, "$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g, "$1 $2");
19
- }
20
- function o(e) {
21
- return e == null ? null : typeof e == "number" ? Number.isFinite(e) ? e : null : e.value ?? e.type ?? null;
22
- }
23
- function s(e) {
24
- let t = o(e);
25
- return t === null ? null : t & 65535;
26
- }
27
- function c(e) {
28
- let n = s(e);
29
- return n === null ? "Unknown" : i(t.MotelyItemType, n) ?? `item#${n}`;
30
- }
31
- function l(e) {
32
- return r[e >> 12 & 15] ?? "unknown";
33
- }
34
- function u(e) {
35
- let t = s(e);
36
- return t === null ? "unknown" : l(t);
37
- }
38
- function d(e) {
39
- return a(c(e));
40
- }
41
- function f(e) {
42
- if (e == null) return null;
43
- let n = typeof e == "number" ? e : e.edition;
44
- if (n == null) return null;
45
- let r = i(t.MotelyItemEdition, n);
46
- return !r || r === "None" ? null : r;
47
- }
48
- function p(e) {
49
- if (e == null) return null;
50
- let n = typeof e == "number" ? null : e.seal;
51
- if (n == null) return null;
52
- let r = i(t.MotelyItemSeal, n);
53
- return !r || r === "None" ? null : r;
54
- }
55
- function m(e) {
56
- if (e == null) return null;
57
- let n = typeof e == "number" ? null : e.enhancement;
58
- if (n == null) return null;
59
- let r = i(t.MotelyItemEnhancement, n);
60
- return !r || r === "None" ? null : r;
61
- }
62
- function h(e) {
63
- if (e == null) return null;
64
- let n = typeof e == "number" ? null : e.rank;
65
- return n == null ? null : i(t.MotelyStandardcardRank, n);
66
- }
67
- function g(e) {
68
- if (e == null) return null;
69
- let n = typeof e == "number" ? null : e.suit;
70
- return n == null ? null : i(t.MotelyStandardcardSuit, n);
71
- }
72
- function _(e) {
73
- return c(e);
74
- }
75
- function v(e) {
76
- let n = s(e);
77
- if (n === null) return null;
78
- let r = i(t.MotelyItemType, n) ?? `Unknown_${n}`, o = l(n);
79
- return {
80
- itemType: n,
81
- enumKey: r,
82
- displayName: a(r),
83
- category: o,
84
- edition: f(e),
85
- seal: p(e),
86
- enhancement: m(e),
87
- rank: h(e),
88
- suit: g(e)
89
- };
90
- }
91
- function y(e, t) {
92
- let n = v(e);
93
- return n ? {
94
- type: n.category === "joker" ? "joker" : n.category === "playing" ? "playing" : "consumable",
95
- card: {
96
- name: n.displayName,
97
- edition: n.edition ?? void 0,
98
- seal: n.seal ?? void 0,
99
- enhancements: n.enhancement ? [n.enhancement] : void 0,
100
- rank: n.rank ?? void 0,
101
- suit: n.suit ?? void 0,
102
- scale: t
103
- }
104
- } : null;
105
- }
106
- function b() {}
107
- function x() {
108
- return 0;
109
- }
110
- //#endregion
111
- export { l as a, m as c, c as d, h as f, t as g, b as h, x as i, u as l, s as m, _ as n, d as o, g as p, y as r, f as s, v as t, p as u };
112
-
113
- //# sourceMappingURL=motelyItemDecoder-BFCFW_BF.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"motelyItemDecoder-BFCFW_BF.js","names":[],"sources":["../../src/motelyBoot.ts","../../src/decode/motelyItemDecoder.ts"],"sourcesContent":["import bootsharp, { Motely } from \"motely-wasm\";\n\nawait bootsharp.boot();\n\nexport { Motely };\n","import { Motely } from \"../motelyBoot.js\";\n\n// motely-wasm exports MotelyItemTypeCategory at runtime but its .d.ts hasn't\n// caught up — cast unblocks the type check until motely-wasm regenerates types.\nconst M = Motely as unknown as Record<string, Record<string, number>>;\n\nconst CATEGORY_MAP: Record<number, MotelyRenderableCategory> = {\n [M.MotelyItemTypeCategory.Standardcard]: \"playing\",\n [M.MotelyItemTypeCategory.SpectralCard]: \"spectral\",\n [M.MotelyItemTypeCategory.TarotCard]: \"tarot\",\n [M.MotelyItemTypeCategory.PlanetCard]: \"planet\",\n [M.MotelyItemTypeCategory.Joker]: \"joker\",\n};\n\nexport type CardCategory = \"joker\" | \"consumable\" | \"playing\" | \"spectral\" | \"tarot\" | \"planet\";\nexport type MotelyRenderableCategory = CardCategory | \"unknown\";\n\nexport type MotelyItemInput = number | MotelyRuntimeItem | null | undefined;\n\nexport interface MotelyRuntimeItem {\n type?: number;\n value?: number;\n edition?: number;\n seal?: number;\n enhancement?: number;\n suit?: number;\n rank?: number;\n}\n\nexport interface DecodedMotelyItem {\n itemType: number;\n enumKey: string;\n displayName: string;\n category: MotelyRenderableCategory;\n edition: \"Foil\" | \"Holographic\" | \"Polychrome\" | \"Negative\" | null;\n seal: \"Gold\" | \"Red\" | \"Blue\" | \"Purple\" | null;\n enhancement: string | null;\n rank: string | null;\n suit: \"Clubs\" | \"Diamonds\" | \"Hearts\" | \"Spades\" | null;\n}\n\nexport interface MotelyJamlCard {\n type: \"joker\" | \"consumable\" | \"playing\";\n card: {\n name: string;\n edition?: \"Foil\" | \"Holographic\" | \"Polychrome\" | \"Negative\";\n seal?: string;\n enhancements?: string[];\n rank?: string;\n suit?: string;\n scale?: number;\n };\n}\n\nfunction enumKey<T extends Record<string, unknown>>(e: T, value: number): string | null {\n const k = e[String(value)];\n return typeof k === \"string\" ? k : null;\n}\n\nfunction spaceSplit(value: string): string {\n return value.replace(/([a-z])([A-Z])/g, \"$1 $2\").replace(/([A-Z]+)([A-Z][a-z])/g, \"$1 $2\");\n}\n\nfunction resolvePackedValue(input: MotelyItemInput): number | null {\n if (input == null) return null;\n if (typeof input === \"number\") return Number.isFinite(input) ? input : null;\n return input.value ?? input.type ?? null;\n}\n\nexport function resolveMotelyItemType(input: MotelyItemInput): number | null {\n const val = resolvePackedValue(input);\n return val !== null ? val & 0xffff : null;\n}\n\nexport function motelyItemTypeName(input: MotelyItemInput): string {\n const itemType = resolveMotelyItemType(input);\n if (itemType === null) return \"Unknown\";\n return enumKey(Motely.MotelyItemType as Record<string, unknown>, itemType) ?? `item#${itemType}`;\n}\n\nexport function motelyItemCategory(itemType: number): MotelyRenderableCategory {\n const catValue = (itemType >> 12) & 0xf;\n return CATEGORY_MAP[catValue] ?? \"unknown\";\n}\n\nexport function motelyItemRenderCategory(input: MotelyItemInput): MotelyRenderableCategory {\n const itemType = resolveMotelyItemType(input);\n if (itemType === null) return \"unknown\";\n return motelyItemCategory(itemType);\n}\n\nexport function motelyItemDisplayName(input: MotelyItemInput): string {\n return spaceSplit(motelyItemTypeName(input));\n}\n\nexport function motelyItemEditionName(input: MotelyItemInput): \"Foil\" | \"Holographic\" | \"Polychrome\" | \"Negative\" | null {\n if (input == null) return null;\n const val = typeof input === \"number\" ? input : input.edition;\n if (val == null) return null;\n const key = enumKey(Motely.MotelyItemEdition as Record<string, unknown>, val);\n if (!key || key === \"None\") return null;\n return key as \"Foil\" | \"Holographic\" | \"Polychrome\" | \"Negative\";\n}\n\nexport function motelyItemSealName(input: MotelyItemInput): \"Gold\" | \"Red\" | \"Blue\" | \"Purple\" | null {\n if (input == null) return null;\n const val = typeof input === \"number\" ? null : input.seal;\n if (val == null) return null;\n const key = enumKey(Motely.MotelyItemSeal as Record<string, unknown>, val);\n if (!key || key === \"None\") return null;\n return key as \"Gold\" | \"Red\" | \"Blue\" | \"Purple\";\n}\n\nexport function motelyItemEnhancementName(input: MotelyItemInput): string | null {\n if (input == null) return null;\n const val = typeof input === \"number\" ? null : input.enhancement;\n if (val == null) return null;\n const key = enumKey(Motely.MotelyItemEnhancement as Record<string, unknown>, val);\n if (!key || key === \"None\") return null;\n return key;\n}\n\nexport function motelyStandardcardRankName(input: MotelyItemInput): string | null {\n if (input == null) return null;\n const val = typeof input === \"number\" ? null : input.rank;\n if (val == null) return null;\n return enumKey(Motely.MotelyStandardcardRank as Record<string, unknown>, val);\n}\n\nexport function motelyStandardcardSuitName(input: MotelyItemInput): \"Clubs\" | \"Diamonds\" | \"Hearts\" | \"Spades\" | null {\n if (input == null) return null;\n const val = typeof input === \"number\" ? null : input.suit;\n if (val == null) return null;\n return enumKey(Motely.MotelyStandardcardSuit as Record<string, unknown>, val) as \"Clubs\" | \"Diamonds\" | \"Hearts\" | \"Spades\" | null;\n}\n\nexport function decodeMotelyItemName(input: MotelyItemInput): string {\n return motelyItemTypeName(input);\n}\n\nexport function decodeMotelyItem(input: MotelyItemInput): DecodedMotelyItem | null {\n const itemType = resolveMotelyItemType(input);\n if (itemType === null) return null;\n\n const enumKeyStr = enumKey(Motely.MotelyItemType as Record<string, unknown>, itemType) ?? `Unknown_${itemType}`;\n const category = motelyItemCategory(itemType);\n const displayName = spaceSplit(enumKeyStr);\n\n return {\n itemType,\n enumKey: enumKeyStr,\n displayName,\n category,\n edition: motelyItemEditionName(input),\n seal: motelyItemSealName(input),\n enhancement: motelyItemEnhancementName(input),\n rank: motelyStandardcardRankName(input),\n suit: motelyStandardcardSuitName(input),\n };\n}\n\nexport function decodeMotelyItemToJamlCard(input: MotelyItemInput, scale?: number): MotelyJamlCard | null {\n const decoded = decodeMotelyItem(input);\n if (!decoded) return null;\n\n const type: \"joker\" | \"consumable\" | \"playing\" =\n decoded.category === \"joker\" ? \"joker\"\n : decoded.category === \"playing\" ? \"playing\"\n : \"consumable\";\n\n return {\n type,\n card: {\n name: decoded.displayName,\n edition: decoded.edition ?? undefined,\n seal: decoded.seal ?? undefined,\n enhancements: decoded.enhancement ? [decoded.enhancement] : undefined,\n rank: decoded.rank ?? undefined,\n suit: decoded.suit ?? undefined,\n scale,\n },\n };\n}\n\nexport function warmMotelyItemCache(): void { /* no-op */ }\nexport function motelyItemCacheSize(): number { return 0; }\n"],"mappings":";;AAEA,MAAM,EAAU,MAAM;;;ACEtB,IAAM,IAAI,GAEJ,IAAyD;EAC5D,EAAE,uBAAuB,eAAe;EACxC,EAAE,uBAAuB,eAAe;EACxC,EAAE,uBAAuB,YAAY;EACrC,EAAE,uBAAuB,aAAa;EACtC,EAAE,uBAAuB,QAAQ;CACnC;AA0CD,SAAS,EAA2C,GAAM,GAA8B;CACtF,IAAM,IAAI,EAAE,OAAO,EAAM;CACzB,OAAO,OAAO,KAAM,WAAW,IAAI;;AAGrC,SAAS,EAAW,GAAuB;CACzC,OAAO,EAAM,QAAQ,mBAAmB,QAAQ,CAAC,QAAQ,yBAAyB,QAAQ;;AAG5F,SAAS,EAAmB,GAAuC;CAGjE,OAFI,KAAS,OAAa,OACtB,OAAO,KAAU,WAAiB,OAAO,SAAS,EAAM,GAAG,IAAQ,OAChE,EAAM,SAAS,EAAM,QAAQ;;AAGtC,SAAgB,EAAsB,GAAuC;CAC3E,IAAM,IAAM,EAAmB,EAAM;CACrC,OAAO,MAAQ,OAAsB,OAAf,IAAM;;AAG9B,SAAgB,EAAmB,GAAgC;CACjE,IAAM,IAAW,EAAsB,EAAM;CAE7C,OADI,MAAa,OAAa,YACvB,EAAQ,EAAO,gBAA2C,EAAS,IAAI,QAAQ;;AAGxF,SAAgB,EAAmB,GAA4C;CAE7E,OAAO,EADW,KAAY,KAAM,OACH;;AAGnC,SAAg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