jaml-ui 0.10.0 → 0.10.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/dist/assets.js +1 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/ui/jimboCopyRow.d.ts +5 -0
- package/dist/ui/jimboCopyRow.js +36 -0
- package/dist/ui.d.ts +1 -0
- package/dist/ui.js +1 -0
- package/dist/version.d.ts +1 -0
- package/dist/version.js +2 -0
- package/package.json +2 -1
package/dist/assets.js
CHANGED
|
@@ -11,8 +11,7 @@ export const JAML_ASSET_FILES = {
|
|
|
11
11
|
tags: "tags.png",
|
|
12
12
|
};
|
|
13
13
|
const assetKeyByFileName = Object.fromEntries(Object.entries(JAML_ASSET_FILES).map(([key, fileName]) => [fileName, key]));
|
|
14
|
-
|
|
15
|
-
const JAML_UI_VERSION = "0.10.0";
|
|
14
|
+
import { JAML_UI_VERSION } from "./version.js";
|
|
16
15
|
const CDN_BASE = `https://cdn.seedfinder.app/jaml-ui/${JAML_UI_VERSION}/assets/`;
|
|
17
16
|
const defaultAssetUrls = {
|
|
18
17
|
deck: `${CDN_BASE}${JAML_ASSET_FILES.deck}`,
|
package/dist/index.d.ts
CHANGED
|
@@ -21,3 +21,4 @@ export { MotelyVersionBadge, type MotelyVersionBadgeProps, type MotelyCapabiliti
|
|
|
21
21
|
export { extractVisualJamlItems, type JamlPreviewGroups, type JamlPreviewItem, type JamlPreviewSection, type JamlPreviewVisualType, } from "./utils/jamlMapPreview.js";
|
|
22
22
|
export { useMotelyStream, type StreamItem, type StreamState } from "./hooks/useShopStream.js";
|
|
23
23
|
export { useSearch, type SearchResult, type SearchStatus, type UseSearchState, } from "./hooks/useSearch.js";
|
|
24
|
+
export { useAnalyzer, type AnalyzerStatus, } from "./hooks/useAnalyzer.js";
|
package/dist/index.js
CHANGED
|
@@ -22,3 +22,4 @@ export { MotelyVersionBadge, } from "./components/MotelyVersionBadge.js";
|
|
|
22
22
|
export { extractVisualJamlItems, } from "./utils/jamlMapPreview.js";
|
|
23
23
|
export { useMotelyStream } from "./hooks/useShopStream.js";
|
|
24
24
|
export { useSearch, } from "./hooks/useSearch.js";
|
|
25
|
+
export { useAnalyzer, } from "./hooks/useAnalyzer.js";
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useState } from 'react';
|
|
4
|
+
import { JimboColorOption } from './tokens.js';
|
|
5
|
+
import { JimboText } from './jimboText.js';
|
|
6
|
+
export function JimboCopyRow({ value, label }) {
|
|
7
|
+
const [copied, setCopied] = useState(false);
|
|
8
|
+
const C = JimboColorOption;
|
|
9
|
+
function copy() {
|
|
10
|
+
navigator.clipboard.writeText(value).then(() => {
|
|
11
|
+
setCopied(true);
|
|
12
|
+
setTimeout(() => setCopied(false), 1500);
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
return (_jsxs("div", { style: { display: 'flex', flexDirection: 'column', gap: 4 }, children: [label && (_jsx(JimboText, { size: "xs", tone: "grey", uppercase: true, style: { letterSpacing: 2 }, children: label })), _jsxs("div", { style: { display: 'flex', alignItems: 'center', gap: 8 }, children: [_jsx("div", { style: {
|
|
16
|
+
flex: 1,
|
|
17
|
+
padding: '6px 10px',
|
|
18
|
+
background: C.DARKEST,
|
|
19
|
+
border: `2px solid ${C.PANEL_EDGE}`,
|
|
20
|
+
borderRadius: 4,
|
|
21
|
+
wordBreak: 'break-all',
|
|
22
|
+
}, children: _jsx(JimboText, { size: "sm", children: value }) }), _jsx("button", { type: "button", onClick: copy, style: {
|
|
23
|
+
fontFamily: "'m6x11plus', 'Courier New', monospace",
|
|
24
|
+
fontSize: 11,
|
|
25
|
+
letterSpacing: 2,
|
|
26
|
+
color: copied ? C.GREEN_TEXT : C.GOLD_TEXT,
|
|
27
|
+
background: copied ? 'rgba(53,189,134,0.12)' : 'rgba(228,182,67,0.12)',
|
|
28
|
+
border: `1px solid ${copied ? C.GREEN_TEXT : C.GOLD_TEXT}`,
|
|
29
|
+
borderRadius: 4,
|
|
30
|
+
padding: '4px 12px',
|
|
31
|
+
cursor: 'pointer',
|
|
32
|
+
flexShrink: 0,
|
|
33
|
+
transition: 'color 0.15s, background 0.15s, border-color 0.15s',
|
|
34
|
+
textTransform: 'uppercase',
|
|
35
|
+
}, children: copied ? 'Copied' : 'Copy' })] })] }));
|
|
36
|
+
}
|
package/dist/ui.d.ts
CHANGED
package/dist/ui.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const JAML_UI_VERSION = "0.10.1";
|
package/dist/version.js
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jaml-ui",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.1",
|
|
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",
|
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
"LICENSE"
|
|
40
40
|
],
|
|
41
41
|
"scripts": {
|
|
42
|
+
"prebuild": "node scripts/gen-version.mjs",
|
|
42
43
|
"build": "tsc --pretty false",
|
|
43
44
|
"dev": "tsc --watch",
|
|
44
45
|
"demo": "vite --config demo/vite.config.ts",
|