jaml-ui 0.31.0 → 0.32.2

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 (98) hide show
  1. package/README.md +193 -61
  2. package/assets/fonts/README.md +14 -0
  3. package/assets/fonts/m6x11.ttf +0 -0
  4. package/assets/fonts/m6x11plus.ttf +0 -0
  5. package/dist/.gitkeep +0 -0
  6. package/dist/assets/searchPoolWorker-Ck5flXVS.js +40 -0
  7. package/dist/assets/searchPoolWorker-Ck5flXVS.js.map +1 -0
  8. package/dist/assets.d.ts +1 -1
  9. package/dist/chunks/{assets-D80i9sMq.js → assets-Bb6wV80_.js} +3 -3
  10. package/dist/chunks/assets-Bb6wV80_.js.map +1 -0
  11. package/dist/chunks/jamlSeeds-3ILzc_rj.js +66 -0
  12. package/dist/chunks/jamlSeeds-3ILzc_rj.js.map +1 -0
  13. package/dist/chunks/motelyItemFormats-CNrFzcCI.js +1836 -0
  14. package/dist/chunks/motelyItemFormats-CNrFzcCI.js.map +1 -0
  15. package/dist/chunks/{searchPoolWorker-DUope_8B.js → searchPoolWorker-gPdRA_pa.js} +2 -2
  16. package/dist/chunks/searchPoolWorker-gPdRA_pa.js.map +1 -0
  17. package/dist/chunks/{spriteMapper-C4_5G1Z6.js → spriteMapper-CajFGgUU.js} +2 -2
  18. package/dist/chunks/spriteMapper-CajFGgUU.js.map +1 -0
  19. package/dist/chunks/tokens-Qrhlekc4.js.map +1 -1
  20. package/dist/chunks/{ui-DRov81qO.js → ui-CgjJDJdZ.js} +1346 -1195
  21. package/dist/chunks/ui-CgjJDJdZ.js.map +1 -0
  22. package/dist/components/CardFan.d.ts +0 -9
  23. package/dist/components/JamlAestheticSelector.d.ts +3 -3
  24. package/dist/components/JamlIde.d.ts +1 -4
  25. package/dist/components/JamlSeedSpinner.d.ts +3 -1
  26. package/dist/components/Jamlyzer.d.ts +5 -8
  27. package/dist/components/MotelyHello.d.ts +5 -0
  28. package/dist/components/SeedFinderApp.d.ts +7 -0
  29. package/dist/components/StandardCard.d.ts +14 -0
  30. package/dist/components/cardEnums.d.ts +48 -0
  31. package/dist/components/jamlMap/JokerPicker.d.ts +2 -1
  32. package/dist/components/jamlMap/MysterySlot.d.ts +2 -1
  33. package/dist/core.d.ts +1 -0
  34. package/dist/core.js +7 -7
  35. package/dist/core.js.map +1 -1
  36. package/dist/hooks/useAnalyzer.d.ts +1 -1
  37. package/dist/hooks/useSearchPool.d.ts +1 -1
  38. package/dist/index.d.ts +6 -4
  39. package/dist/index.js +3870 -3591
  40. package/dist/index.js.map +1 -1
  41. package/dist/lib/data/constants.d.ts +3 -3
  42. package/dist/lib/jaml/jamlData.d.ts +1 -0
  43. package/dist/lib/jaml/jamlSchema.d.ts +10 -60
  44. package/dist/lib/jaml/jamlSeeds.d.ts +7 -0
  45. package/dist/lib/types.d.ts +3 -2
  46. package/dist/motely.d.ts +1 -2
  47. package/dist/motely.js +125 -1999
  48. package/dist/motely.js.map +1 -1
  49. package/dist/r3f.js +1 -1
  50. package/dist/r3f.js.map +1 -1
  51. package/dist/ui/JimboBadge.d.ts +1 -1
  52. package/dist/ui/{footer.d.ts → JimboBalatroFooter.d.ts} +4 -2
  53. package/dist/ui/JimboCopyButton.d.ts +27 -0
  54. package/dist/ui/JimboDeckAndStakeSelectorModal.d.ts +30 -0
  55. package/dist/ui/JimboIconButton.d.ts +8 -3
  56. package/dist/ui/JimboInlineEdit.d.ts +16 -0
  57. package/dist/ui/JimboListItem.d.ts +11 -0
  58. package/dist/ui/JimboPanelSplitter.d.ts +8 -0
  59. package/dist/ui/JimboSeedCopyChip.d.ts +16 -0
  60. package/dist/ui/JimboSelect.d.ts +15 -3
  61. package/dist/ui/JimboSpinner.d.ts +18 -0
  62. package/dist/ui/JimboStepper.d.ts +19 -7
  63. package/dist/ui/JimboValueBadge.d.ts +19 -0
  64. package/dist/ui/codeBlock.d.ts +4 -0
  65. package/dist/ui/hooks.d.ts +30 -3
  66. package/dist/ui/jimbo.css +1 -1
  67. package/dist/ui/jimboApp.d.ts +2 -2
  68. package/dist/ui/jimboBackground.d.ts +12 -5
  69. package/dist/ui/jimboCopyRow.d.ts +2 -2
  70. package/dist/ui/jimboInset.d.ts +3 -3
  71. package/dist/ui/jimboLayout.d.ts +25 -0
  72. package/dist/ui/jimboLink.d.ts +12 -0
  73. package/dist/ui/jimboTabs.d.ts +6 -6
  74. package/dist/ui/jimboText.d.ts +2 -3
  75. package/dist/ui.d.ts +12 -4
  76. package/dist/ui.js +3 -3
  77. package/fonts.css +20 -5
  78. package/package.json +7 -6
  79. package/assets/fonts/m6x11plusplus.otf +0 -0
  80. package/dist/assets/searchPoolWorker-BPJ3Mf0o.js +0 -40
  81. package/dist/assets/searchPoolWorker-BPJ3Mf0o.js.map +0 -1
  82. package/dist/chunks/Layer-Ckd_T6Fw.js +0 -17
  83. package/dist/chunks/Layer-Ckd_T6Fw.js.map +0 -1
  84. package/dist/chunks/assets-D80i9sMq.js.map +0 -1
  85. package/dist/chunks/runtime-C-It0krH.js +0 -10
  86. package/dist/chunks/runtime-C-It0krH.js.map +0 -1
  87. package/dist/chunks/searchPoolWorker-DUope_8B.js.map +0 -1
  88. package/dist/chunks/spriteMapper-C4_5G1Z6.js.map +0 -1
  89. package/dist/chunks/ui-DRov81qO.js.map +0 -1
  90. package/dist/components/CardList.d.ts +0 -8
  91. package/dist/components/Standardcard.d.ts +0 -18
  92. package/dist/config.d.ts +0 -10
  93. package/dist/fonts/m6x11plus.otf +0 -0
  94. package/dist/hooks/useMotelyRuntime.d.ts +0 -11
  95. package/dist/providers/MotelyProvider.d.ts +0 -11
  96. package/dist/ui/JimboFloating.d.ts +0 -8
  97. package/dist/ui/PanelSplitter.d.ts +0 -8
  98. package/jaml.schema.json +0 -1219
@@ -1,11 +1,11 @@
1
1
  export declare const DECK_OPTIONS: string[];
2
2
  export declare const STAKE_OPTIONS: string[];
3
+ export declare const EDITION_OPTIONS: string[];
4
+ export declare const SEAL_OPTIONS: string[];
5
+ export declare const ENHANCEMENT_OPTIONS: string[];
3
6
  export declare const ANTE_OPTIONS: number[];
4
7
  export declare const SLOT_OPTIONS: number[];
5
8
  export declare const RANK_OPTIONS: string[];
6
9
  export declare const SUIT_OPTIONS: string[];
7
- export declare const ENHANCEMENT_OPTIONS: string[];
8
- export declare const EDITION_OPTIONS: string[];
9
- export declare const SEAL_OPTIONS: string[];
10
10
  export declare const CLAUSE_TYPES: string[];
11
11
  export declare const SOURCE_OPTIONS: string[];
@@ -1,3 +1,4 @@
1
+ export declare const CLAUSE_TYPE_KEYS: readonly string[];
1
2
  export declare const CLAUSE_TYPES: string[];
2
3
  export declare const ARRAY_KEYS: string[];
3
4
  export declare const JAML_KEYWORDS: string[];
@@ -1,69 +1,19 @@
1
- /**
2
- * JAML Schema Bridge
3
- *
4
- * Derives all JAML schema constants from motely-wasm/jaml.schema.json.
5
- * All JAML-aware files import from here — single swap point if the API changes.
6
- */
7
- type SchemaNode = {
8
- enum?: string[];
9
- items?: {
10
- enum?: string[];
11
- };
12
- properties?: Record<string, SchemaNode>;
13
- };
14
- interface JamlSchema {
15
- version?: string;
16
- definitions?: {
17
- clause?: SchemaNode;
18
- };
19
- properties?: Record<string, SchemaNode>;
20
- }
21
- export declare const JAML_SCHEMA_VERSION: string;
22
- /** The raw JSON schema object. */
23
- export declare const jamlSchema: JamlSchema;
24
- /** Root-level metadata keys (name, author, deck, etc.) */
25
- export declare const METADATA_KEYS: readonly string[];
26
- /** Section keys that contain clause arrays. */
27
- export declare const SECTION_KEYS: readonly string[];
28
- /** Clause type keys — the primary discriminators (joker, voucher, tarot, etc.). */
1
+ export declare const DECK_VALUES: readonly string[];
2
+ export declare const STAKE_VALUES: readonly string[];
3
+ export declare const EDITION_VALUES: readonly string[];
4
+ export declare const SEAL_VALUES: readonly string[];
5
+ export declare const ENHANCEMENT_VALUES: readonly string[];
29
6
  export declare const CLAUSE_TYPE_KEYS: readonly string[];
30
- /** Property keys available inside a clause. */
31
- export declare const PROPERTY_KEYS: readonly string[];
32
- /** Source-configuration keys (shopItems, boosterPacks, etc.). */
33
7
  export declare const SOURCE_KEYS: readonly string[];
34
- /**
35
- * Get the valid enum values for a given JAML key.
36
- * Checks top-level properties first, then falls back to clause properties.
37
- */
8
+ export declare const PROPERTY_KEYS: readonly string[];
9
+ export declare const METADATA_KEYS: readonly string[];
10
+ export declare const SECTION_KEYS: readonly string[];
11
+ export declare const ALL_JAML_KEYWORDS: string[];
38
12
  export declare function getValidValuesForKey(key: string): readonly string[] | null;
39
- /**
40
- * Get the available properties for a given clause type.
41
- * Returns all clause property keys (the type system doesn't restrict per-type in JSON schema v7).
42
- */
13
+ export declare function isInvalidValueForProp(value: string, prop: string): boolean;
43
14
  export declare function getAvailablePropsForType(): readonly string[];
44
- /**
45
- * Check if a property is invalid for a clause type.
46
- * In the v7 schema, all properties are available on all clause types.
47
- */
48
15
  export declare function isInvalidPropForType(): boolean;
49
- /**
50
- * Check if a value is invalid for a property.
51
- */
52
- export declare function isInvalidValueForProp(value: string, prop: string): boolean;
53
16
  export interface ValidationState {
54
17
  errors: string[];
55
18
  warnings: string[];
56
19
  }
57
- export declare const DECK_VALUES: readonly string[];
58
- export declare const STAKE_VALUES: readonly string[];
59
- export declare const EDITION_VALUES: readonly string[];
60
- export declare const SEAL_VALUES: readonly string[];
61
- export declare const ENHANCEMENT_VALUES: readonly string[];
62
- export declare const RANK_VALUES: readonly string[];
63
- export declare const SUIT_VALUES: readonly string[];
64
- export declare const STICKER_VALUES: readonly string[];
65
- /**
66
- * All JAML keywords — sections, metadata keys, clause types, and property keys.
67
- */
68
- export declare const ALL_JAML_KEYWORDS: string[];
69
- export {};
@@ -0,0 +1,7 @@
1
+ /** Read top-level `seeds:` entries from a JAML document. */
2
+ export declare function parseJamlSeeds(jaml: string): string[];
3
+ /**
4
+ * Write seeds into JAML the same way Motely CLI `--save-seeds` does:
5
+ * replace the top-level `seeds:` block (or append one if missing).
6
+ */
7
+ export declare function mergeSeedsIntoJaml(jaml: string, seeds: string[], max?: number): string;
@@ -1,5 +1,6 @@
1
- export type DeckType = 'red' | 'blue' | 'yellow' | 'green' | 'black' | 'magic' | 'nebula' | 'ghost' | 'abandoned' | 'checkered' | 'zodiac' | 'painted' | 'anaglyph' | 'plasma' | 'erratic';
2
- export type StakeType = 'white' | 'red' | 'green' | 'black' | 'blue' | 'purple' | 'orange' | 'gold';
1
+ import { MotelyDeck, MotelyStake } from 'motely-wasm/motely/enums';
2
+ export type DeckType = MotelyDeck;
3
+ export type StakeType = MotelyStake;
3
4
  /**
4
5
  * Configuration for a Daily Ritual challenge
5
6
  * Matches the dailyritual.schema.json structure
package/dist/motely.d.ts CHANGED
@@ -3,5 +3,4 @@ export { decodeMotelyItem, decodeMotelyItemToJamlCard, motelyItemTypeName, motel
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
5
  export { useJamlLibrary, type JamlLibraryStatus, type UseJamlLibraryState, } from './hooks/useJamlLibrary.js';
6
- export { useMotelyRuntime, type UseMotelyRuntimeState, type MotelyRuntimeStatus, } from './hooks/useMotelyRuntime.js';
7
- export { MotelyProvider, useMotelyContext, type MotelyContextValue, } from './providers/MotelyProvider.js';
6
+ export { ensureMotelyReady, MOTELY_BIN_PATH, type MotelyRuntimeStatus, } from './lib/motely/runtime.js';