jaml-ui 4.0.1 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/JamlyzerBulk.d.ts +16 -0
- package/dist/components/JamlyzerView.d.ts +11 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +5989 -1292
- package/dist/index.js.map +1 -1
- package/dist/lib/jaml/parseClauses.d.ts +35 -0
- package/package.json +4 -1
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export type JamlClauseKind = "must" | "should" | "mustNot";
|
|
2
|
+
export type JamlItemType = "joker" | "voucher" | "boss" | "tag" | "tarot" | "planet" | "spectral" | "consumable" | "standardcard" | "deck" | "stake" | "seed" | "any" | "unknown";
|
|
3
|
+
export interface ParsedJamlClause {
|
|
4
|
+
kind: JamlClauseKind;
|
|
5
|
+
itemType: JamlItemType;
|
|
6
|
+
/** Exact names as written in JAML (e.g. "WeeJoker"). */
|
|
7
|
+
names: string[];
|
|
8
|
+
/** Optional explicit ante window. */
|
|
9
|
+
antes?: number[];
|
|
10
|
+
/** Score weight for should clauses; 0 for must/mustNot. */
|
|
11
|
+
score: number;
|
|
12
|
+
/** Optional user-facing label; falls back to a generated one. */
|
|
13
|
+
label: string;
|
|
14
|
+
/** Raw clause object for advanced consumers. */
|
|
15
|
+
raw: Record<string, unknown>;
|
|
16
|
+
}
|
|
17
|
+
export interface ParsedJamlFilters {
|
|
18
|
+
deck?: string;
|
|
19
|
+
stake?: string;
|
|
20
|
+
must: ParsedJamlClause[];
|
|
21
|
+
should: ParsedJamlClause[];
|
|
22
|
+
mustNot: ParsedJamlClause[];
|
|
23
|
+
all: ParsedJamlClause[];
|
|
24
|
+
}
|
|
25
|
+
export declare function parseJamlClauses(jamlText: string): ParsedJamlFilters;
|
|
26
|
+
export declare function splitCamelCase(key: string): string;
|
|
27
|
+
export declare function normalizeName(name: string): string;
|
|
28
|
+
export declare function matchClauseToItem(clause: ParsedJamlClause, itemType: JamlItemType, itemName: string): boolean;
|
|
29
|
+
export declare function matchClauseToAnte(clause: ParsedJamlClause, ante: number): boolean;
|
|
30
|
+
export declare function highlightClassForKind(kind: JamlClauseKind): string;
|
|
31
|
+
/** Convenience matcher that maps the coarse decoder category to a JAML item type. */
|
|
32
|
+
export declare function matchMotelyItemToClause(item: {
|
|
33
|
+
category?: string;
|
|
34
|
+
displayName?: string;
|
|
35
|
+
}, clause: ParsedJamlClause): boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jaml-ui",
|
|
3
|
-
"version": "4.0
|
|
3
|
+
"version": "4.1.0",
|
|
4
4
|
"description": "Zero-dependency json-render engine + Balatro card sprites for MCP Apps.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -76,6 +76,9 @@
|
|
|
76
76
|
],
|
|
77
77
|
"author": "pifreak",
|
|
78
78
|
"license": "MIT",
|
|
79
|
+
"dependencies": {
|
|
80
|
+
"yaml": "^2.7.1"
|
|
81
|
+
},
|
|
79
82
|
"peerDependencies": {
|
|
80
83
|
"motely-wasm": "^24.0.0",
|
|
81
84
|
"react": "^18.2.0 || ^19.0.0",
|