@fiestaboard/ui 5.4.0 → 5.4.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.
- package/dist/components/board/board-teaser.d.ts +9 -1
- package/dist/components/board/board-teaser.js +56 -52
- package/dist/components/board/board-teaser.js.map +1 -1
- package/dist/components/editor/template-editor-toolbar.d.ts +2 -1
- package/dist/components/editor/template-editor-toolbar.js +121 -120
- package/dist/components/editor/template-editor-toolbar.js.map +1 -1
- package/dist/components/editor/template-editor.js +3 -7
- package/dist/components/editor/template-editor.js.map +1 -1
- package/dist/components/plugin/board-showcase.d.ts +8 -1
- package/dist/components/plugin/board-showcase.js +17 -16
- package/dist/components/plugin/board-showcase.js.map +1 -1
- package/dist/components/plugin/plugin-card.d.ts +8 -1
- package/dist/components/plugin/plugin-card.js +8 -7
- package/dist/components/plugin/plugin-card.js.map +1 -1
- package/dist/components/plugin/scaled-board-teaser.d.ts +4 -1
- package/dist/components/plugin/scaled-board-teaser.js +12 -11
- package/dist/components/plugin/scaled-board-teaser.js.map +1 -1
- package/dist/index.js +44 -44
- package/dist/lib/board-characters.d.ts +13 -0
- package/dist/lib/board-characters.js +1 -1
- package/dist/lib/board-characters.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type Code62Glyph } from "../../lib/board-characters";
|
|
1
2
|
export interface BoardTeaserProps {
|
|
2
3
|
/** Literal board line, e.g. `"{66}AAPL +1.88%"`. */
|
|
3
4
|
teaser: string;
|
|
@@ -5,6 +6,13 @@ export interface BoardTeaserProps {
|
|
|
5
6
|
tiles?: number;
|
|
6
7
|
size?: "sm" | "md" | "lg";
|
|
7
8
|
boardType?: "black" | "white";
|
|
9
|
+
/**
|
|
10
|
+
* Which glyph the board this strip stands for draws for code 62. Already
|
|
11
|
+
* resolved by the consumer — a strip is one row with no shape of its own, so
|
|
12
|
+
* it has no `deviceType` to resolve from; a Note consumer passes `"heart"`.
|
|
13
|
+
* Defaults to `"degree"`, the glyph every Flagship carried before 2026.
|
|
14
|
+
*/
|
|
15
|
+
code62Glyph?: Code62Glyph;
|
|
8
16
|
className?: string;
|
|
9
17
|
}
|
|
10
|
-
export declare const BoardTeaser: import("react").MemoExoticComponent<({ teaser, tiles, size, boardType, className, }: BoardTeaserProps) => import("react").JSX.Element>;
|
|
18
|
+
export declare const BoardTeaser: import("react").MemoExoticComponent<({ teaser, tiles, size, boardType, code62Glyph, className, }: BoardTeaserProps) => import("react").JSX.Element>;
|
|
@@ -1,49 +1,53 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { resolveColorCode as e } from "../../lib/board-colors.js";
|
|
3
|
-
import {
|
|
4
|
-
import { gapClasses as
|
|
5
|
-
import { SEAM_CLASS as
|
|
6
|
-
import { memo as
|
|
7
|
-
import { jsx as
|
|
3
|
+
import { applyCode62Glyph as t, messageToText as n, parseLine as r } from "../../lib/board-characters.js";
|
|
4
|
+
import { gapClasses as i, radiusClasses as a, sizeClasses as o, textSizeClasses as s } from "../../lib/board-metrics.js";
|
|
5
|
+
import { SEAM_CLASS as c, charLeafBoxShadow as l, seamStyle as u } from "./board-surfaces.js";
|
|
6
|
+
import { memo as d, useMemo as f } from "react";
|
|
7
|
+
import { jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
8
8
|
//#region src/components/board/board-teaser.tsx
|
|
9
|
-
var
|
|
10
|
-
let
|
|
11
|
-
let e =
|
|
12
|
-
for (; e.length <
|
|
9
|
+
var h = d(function({ teaser: d, tiles: h = 15, size: g = "sm", boardType: _ = "black", code62Glyph: v = "degree", className: y = "" }) {
|
|
10
|
+
let b = _ === "white", x = b ? "var(--color-board-surface-light)" : "var(--color-board-surface-dark)", S = b ? "var(--color-board-text-on-light)" : "var(--color-board-text-on-dark)", C = f(() => {
|
|
11
|
+
let e = r(d).slice(0, h).map((e) => t(e, v));
|
|
12
|
+
for (; e.length < h;) e.push({
|
|
13
13
|
type: "char",
|
|
14
14
|
value: " "
|
|
15
15
|
});
|
|
16
16
|
return e;
|
|
17
|
-
}, [
|
|
18
|
-
|
|
17
|
+
}, [
|
|
18
|
+
d,
|
|
19
|
+
h,
|
|
20
|
+
v
|
|
21
|
+
]), w = f(() => n(d, "flagship", v) || "Board teaser", [d, v]), T = g === "sm" ? b ? "0 1px 2px rgba(0,0,0,0.15)" : "0 1px 2px rgba(0,0,0,0.4)" : b ? "0 2px 4px rgba(0,0,0,0.2), inset 0 1px 2px rgba(0,0,0,0.1), inset 0 -1px 2px rgba(255,255,255,0.5), inset 1px 0 1px rgba(0,0,0,0.08), inset -1px 0 1px rgba(255,255,255,0.4)" : "0 2px 4px rgba(0,0,0,0.5), inset 0 1px 2px rgba(0,0,0,0.8), inset 0 -1px 1px rgba(255,255,255,0.08), inset 1px 0 1px rgba(0,0,0,0.5), inset -1px 0 1px rgba(255,255,255,0.05)";
|
|
22
|
+
return /* @__PURE__ */ p("div", {
|
|
19
23
|
role: "img",
|
|
20
|
-
"aria-label":
|
|
24
|
+
"aria-label": w,
|
|
21
25
|
"data-slot": "board-teaser",
|
|
22
|
-
className: `inline-flex max-w-full ${
|
|
23
|
-
children: /* @__PURE__ */
|
|
26
|
+
className: `inline-flex max-w-full ${y}`,
|
|
27
|
+
children: /* @__PURE__ */ p("div", {
|
|
24
28
|
"aria-hidden": "true",
|
|
25
|
-
className: `flex ${
|
|
26
|
-
children:
|
|
29
|
+
className: `flex ${i[g]}`,
|
|
30
|
+
children: C.map((t, n) => {
|
|
27
31
|
if (t.type === "color") {
|
|
28
|
-
let r = e(t.code,
|
|
29
|
-
return
|
|
32
|
+
let r = e(t.code, b);
|
|
33
|
+
return g === "sm" ? /* @__PURE__ */ p("div", {
|
|
30
34
|
"data-teaser-tile": "",
|
|
31
|
-
className: `${
|
|
35
|
+
className: `${o[g]} ${a[g]}`,
|
|
32
36
|
style: {
|
|
33
37
|
backgroundColor: r,
|
|
34
|
-
boxShadow:
|
|
38
|
+
boxShadow: T,
|
|
35
39
|
contain: "layout style paint"
|
|
36
40
|
}
|
|
37
|
-
}, n) : /* @__PURE__ */
|
|
41
|
+
}, n) : /* @__PURE__ */ p("div", {
|
|
38
42
|
"data-teaser-tile": "",
|
|
39
|
-
className: `relative ${
|
|
43
|
+
className: `relative ${o[g]} ${a[g]} overflow-hidden`,
|
|
40
44
|
style: {
|
|
41
|
-
backgroundColor:
|
|
42
|
-
boxShadow:
|
|
45
|
+
backgroundColor: x,
|
|
46
|
+
boxShadow: T,
|
|
43
47
|
contain: "layout style paint"
|
|
44
48
|
},
|
|
45
|
-
children: /* @__PURE__ */
|
|
46
|
-
className: `absolute ${
|
|
49
|
+
children: /* @__PURE__ */ p("div", {
|
|
50
|
+
className: `absolute ${a[g]} overflow-hidden`,
|
|
47
51
|
style: {
|
|
48
52
|
top: "3px",
|
|
49
53
|
bottom: "4px",
|
|
@@ -52,57 +56,57 @@ var m = u(function({ teaser: u, tiles: m = 15, size: h = "sm", boardType: g = "b
|
|
|
52
56
|
backgroundColor: r,
|
|
53
57
|
boxShadow: "0 2px 4px rgba(0,0,0,0.3), inset 0 1px 1px rgba(255,255,255,0.15), inset 0 -1px 1px rgba(0,0,0,0.25)"
|
|
54
58
|
},
|
|
55
|
-
children: /* @__PURE__ */
|
|
56
|
-
className:
|
|
57
|
-
style:
|
|
59
|
+
children: /* @__PURE__ */ p("div", {
|
|
60
|
+
className: c,
|
|
61
|
+
style: u[_]
|
|
58
62
|
})
|
|
59
63
|
})
|
|
60
64
|
}, n);
|
|
61
65
|
}
|
|
62
|
-
let r = t.value,
|
|
63
|
-
return
|
|
66
|
+
let r = t.value, i = r === "♥";
|
|
67
|
+
return g === "sm" ? /* @__PURE__ */ p("div", {
|
|
64
68
|
"data-teaser-tile": "",
|
|
65
|
-
className: `${
|
|
69
|
+
className: `${o[g]} ${a[g]} flex items-center justify-center`,
|
|
66
70
|
style: {
|
|
67
|
-
backgroundColor:
|
|
68
|
-
boxShadow:
|
|
71
|
+
backgroundColor: x,
|
|
72
|
+
boxShadow: T,
|
|
69
73
|
contain: "layout style paint"
|
|
70
74
|
},
|
|
71
|
-
children: r !== " " && /* @__PURE__ */
|
|
72
|
-
className: `${
|
|
73
|
-
style: { color:
|
|
75
|
+
children: r !== " " && /* @__PURE__ */ p("span", {
|
|
76
|
+
className: `${s[g]} font-mono font-semibold select-none leading-none`,
|
|
77
|
+
style: { color: i ? "#eb4034" : S },
|
|
74
78
|
children: r
|
|
75
79
|
})
|
|
76
|
-
}, n) : /* @__PURE__ */
|
|
80
|
+
}, n) : /* @__PURE__ */ m("div", {
|
|
77
81
|
"data-teaser-tile": "",
|
|
78
|
-
className: `relative ${
|
|
82
|
+
className: `relative ${o[g]} ${a[g]} overflow-hidden`,
|
|
79
83
|
style: {
|
|
80
|
-
backgroundColor:
|
|
81
|
-
boxShadow:
|
|
84
|
+
backgroundColor: x,
|
|
85
|
+
boxShadow: T,
|
|
82
86
|
contain: "layout style paint"
|
|
83
87
|
},
|
|
84
88
|
children: [
|
|
85
|
-
/* @__PURE__ */
|
|
89
|
+
/* @__PURE__ */ p("div", {
|
|
86
90
|
className: "absolute inset-0 flex items-center justify-center",
|
|
87
91
|
style: {
|
|
88
92
|
zIndex: 2,
|
|
89
|
-
boxShadow:
|
|
93
|
+
boxShadow: l[_]
|
|
90
94
|
},
|
|
91
|
-
children: r !== " " && /* @__PURE__ */
|
|
92
|
-
className: `${
|
|
93
|
-
style: { color:
|
|
95
|
+
children: r !== " " && /* @__PURE__ */ p("span", {
|
|
96
|
+
className: `${s[g]} font-mono font-semibold select-none leading-none`,
|
|
97
|
+
style: { color: i ? "#eb4034" : S },
|
|
94
98
|
children: r
|
|
95
99
|
})
|
|
96
100
|
}),
|
|
97
|
-
/* @__PURE__ */
|
|
98
|
-
className:
|
|
99
|
-
style:
|
|
101
|
+
/* @__PURE__ */ p("div", {
|
|
102
|
+
className: c,
|
|
103
|
+
style: u[_]
|
|
100
104
|
}),
|
|
101
|
-
/* @__PURE__ */
|
|
105
|
+
/* @__PURE__ */ p("div", {
|
|
102
106
|
className: "absolute inset-0 pointer-events-none",
|
|
103
107
|
style: {
|
|
104
108
|
zIndex: 1,
|
|
105
|
-
background:
|
|
109
|
+
background: b ? "linear-gradient(180deg, rgba(255,255,255,0.3) 0%, transparent 50%, rgba(0,0,0,0.05) 100%)" : "linear-gradient(180deg, rgba(255,255,255,0.05) 0%, transparent 50%, rgba(0,0,0,0.2) 100%)"
|
|
106
110
|
}
|
|
107
111
|
})
|
|
108
112
|
]
|
|
@@ -112,6 +116,6 @@ var m = u(function({ teaser: u, tiles: m = 15, size: h = "sm", boardType: g = "b
|
|
|
112
116
|
});
|
|
113
117
|
});
|
|
114
118
|
//#endregion
|
|
115
|
-
export {
|
|
119
|
+
export { h as BoardTeaser };
|
|
116
120
|
|
|
117
121
|
//# sourceMappingURL=board-teaser.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"board-teaser.js","names":[],"sources":["../../../src/components/board/board-teaser.tsx"],"mappings":";;;;;;;;
|
|
1
|
+
{"version":3,"file":"board-teaser.js","names":[],"sources":["../../../src/components/board/board-teaser.tsx"],"mappings":";;;;;;;;AA4CA,IAAa,IAAc,EAAK,SAAqB,EACnD,WACA,WAAQ,IACR,UAAO,MACP,eAAY,SACZ,iBAAc,UACd,eAAY,MACO;CACnB,IAAM,IAAe,MAAc,SAC7B,IAAS,IAAe,qCAAqC,mCAC7D,IAAY,IAAe,qCAAqC,mCAEhE,IAAM,QAA4B;EACtC,IAAM,IAAS,EAAU,CAAM,CAAC,CAC7B,MAAM,GAAG,CAAK,CAAC,CACf,KAAK,MAAU,EAAiB,GAAO,CAAW,CAAC;EACtD,OAAO,EAAO,SAAS,IACrB,EAAO,KAAK;GAAE,MAAM;GAAQ,OAAO;EAAI,CAAC;EAE1C,OAAO;CACT,GAAG;EAAC;EAAQ;EAAO;CAAW,CAAC,GASzB,IAAQ,QAAc,EAAc,GAAQ,YAAY,CAAW,KAAK,gBAAgB,CAAC,GAAQ,CAAW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oBAAiB;KACjB,WAAW,YAAY,EAAY,GAAM,GAAG,EAAc,GAAM;KAChE,OAAO;MACL,iBAAiB;MACjB,WAAW;MACX,SAAS;KACX;KARF,UAAA;MAWE,kBAAC,OAAD;OACE,WAAU;OACV,OAAO;QAAE,QAAQ;QAAG,WAAW,EAAkB;OAAW;OAE3D,UAAA,MAAS,OACR,kBAAC,QAAD;QACE,WAAW,GAAG,EAAgB,GAAM;QACpC,OAAO,EAAE,OAAO,IAAU,YAAY,EAAU;QAE/C,UAAA;OACG,CAAA;MAEL,CAAA;MACL,kBAAC,OAAD;OAAK,WAAW;OAAY,OAAO,EAAU;MAAa,CAAA;MAC1D,kBAAC,OAAD;OACE,WAAU;OACV,OAAO;QACL,QAAQ;QACR,YAAY,IACR,8FACA;OACN;MACD,CAAA;KACE;IAjCE,GAAA,CAiCF;GAET,CAAC;EACE,CAAA;CACF,CAAA;AAET,CAAC"}
|
|
@@ -166,5 +166,6 @@ export interface TemplateEditorToolbarProps {
|
|
|
166
166
|
colorPickerLabels?: Partial<ColorPickerLabels>;
|
|
167
167
|
formattingPickerLabels?: Partial<FormattingPickerLabels>;
|
|
168
168
|
}
|
|
169
|
-
|
|
169
|
+
declare function TemplateEditorToolbarImpl({ editor, currentAlignment, currentWrapEnabled, onAlignmentChange, onWrapToggle, className, deviceType, onSyncFromBoard, syncFromBoardPending, drawMode, onDrawModeToggle, drawBrush, onDrawBrushChange, templateVariables, isLoadingVariables, renderVariablePicker, pluginManifests, isLoadingManifests, pluginDisplayData, resolveIcon, entityPickerSlot, labels, variablePickerLabels, colorPickerLabels, formattingPickerLabels, }: TemplateEditorToolbarProps): import("react").JSX.Element;
|
|
170
|
+
export declare const TemplateEditorToolbar: import("react").MemoExoticComponent<typeof TemplateEditorToolbarImpl>;
|
|
170
171
|
export {};
|