@fiestaboard/ui 3.0.1 → 3.2.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/containment/json-tree.d.ts +59 -0
- package/dist/components/containment/json-tree.js +122 -0
- package/dist/components/containment/json-tree.js.map +1 -0
- package/dist/components/editor/color-picker-content.d.ts +25 -0
- package/dist/components/editor/color-picker-content.js +118 -0
- package/dist/components/editor/color-picker-content.js.map +1 -0
- package/dist/components/editor/constants.d.ts +87 -0
- package/dist/components/editor/constants.js +29 -0
- package/dist/components/editor/constants.js.map +1 -0
- package/dist/components/editor/draw-char-picker-content.d.ts +22 -0
- package/dist/components/editor/draw-char-picker-content.js +79 -0
- package/dist/components/editor/draw-char-picker-content.js.map +1 -0
- package/dist/components/editor/extensions/color-tile-node.d.ts +10 -0
- package/dist/components/editor/extensions/color-tile-node.js +43 -0
- package/dist/components/editor/extensions/color-tile-node.js.map +1 -0
- package/dist/components/editor/extensions/fill-space-node.d.ts +10 -0
- package/dist/components/editor/extensions/fill-space-node.js +40 -0
- package/dist/components/editor/extensions/fill-space-node.js.map +1 -0
- package/dist/components/editor/extensions/formula-node.d.ts +6 -0
- package/dist/components/editor/extensions/formula-node.js +40 -0
- package/dist/components/editor/extensions/formula-node.js.map +1 -0
- package/dist/components/editor/extensions/line-navigation.d.ts +18 -0
- package/dist/components/editor/extensions/line-navigation.js +16 -0
- package/dist/components/editor/extensions/line-navigation.js.map +1 -0
- package/dist/components/editor/extensions/single-paragraph-doc.d.ts +15 -0
- package/dist/components/editor/extensions/single-paragraph-doc.js +11 -0
- package/dist/components/editor/extensions/single-paragraph-doc.js.map +1 -0
- package/dist/components/editor/extensions/trailing-newline.d.ts +13 -0
- package/dist/components/editor/extensions/trailing-newline.js +27 -0
- package/dist/components/editor/extensions/trailing-newline.js.map +1 -0
- package/dist/components/editor/extensions/variable-node.d.ts +15 -0
- package/dist/components/editor/extensions/variable-node.js +56 -0
- package/dist/components/editor/extensions/variable-node.js.map +1 -0
- package/dist/components/editor/extensions/wrapped-text-node.d.ts +9 -0
- package/dist/components/editor/extensions/wrapped-text-node.js +31 -0
- package/dist/components/editor/extensions/wrapped-text-node.js.map +1 -0
- package/dist/components/editor/filter-picker-content.d.ts +24 -0
- package/dist/components/editor/filter-picker-content.js +146 -0
- package/dist/components/editor/filter-picker-content.js.map +1 -0
- package/dist/components/editor/formatting-picker-content.d.ts +30 -0
- package/dist/components/editor/formatting-picker-content.js +154 -0
- package/dist/components/editor/formatting-picker-content.js.map +1 -0
- package/dist/components/editor/formula/formula-editor-panel.d.ts +102 -0
- package/dist/components/editor/formula/formula-editor-panel.js +527 -0
- package/dist/components/editor/formula/formula-editor-panel.js.map +1 -0
- package/dist/components/editor/node-views/color-tile-node-view.d.ts +21 -0
- package/dist/components/editor/node-views/color-tile-node-view.js +66 -0
- package/dist/components/editor/node-views/color-tile-node-view.js.map +1 -0
- package/dist/components/editor/node-views/fill-space-node-view.d.ts +16 -0
- package/dist/components/editor/node-views/fill-space-node-view.js +43 -0
- package/dist/components/editor/node-views/fill-space-node-view.js.map +1 -0
- package/dist/components/editor/node-views/formula-node-view.d.ts +39 -0
- package/dist/components/editor/node-views/formula-node-view.js +109 -0
- package/dist/components/editor/node-views/formula-node-view.js.map +1 -0
- package/dist/components/editor/node-views/node-view-context.d.ts +58 -0
- package/dist/components/editor/node-views/node-view-context.js +22 -0
- package/dist/components/editor/node-views/node-view-context.js.map +1 -0
- package/dist/components/editor/node-views/variable-node-view.d.ts +16 -0
- package/dist/components/editor/node-views/variable-node-view.js +63 -0
- package/dist/components/editor/node-views/variable-node-view.js.map +1 -0
- package/dist/components/editor/node-views/wrapped-text-view.d.ts +14 -0
- package/dist/components/editor/node-views/wrapped-text-view.js +46 -0
- package/dist/components/editor/node-views/wrapped-text-view.js.map +1 -0
- package/dist/components/editor/template-editor-toolbar.d.ts +146 -0
- package/dist/components/editor/template-editor-toolbar.js +434 -0
- package/dist/components/editor/template-editor-toolbar.js.map +1 -0
- package/dist/components/editor/template-editor.d.ts +109 -0
- package/dist/components/editor/template-editor.js +662 -0
- package/dist/components/editor/template-editor.js.map +1 -0
- package/dist/components/editor/toolbar-dropdown.d.ts +20 -0
- package/dist/components/editor/toolbar-dropdown.js +88 -0
- package/dist/components/editor/toolbar-dropdown.js.map +1 -0
- package/dist/components/editor/utils/draw-mode.d.ts +55 -0
- package/dist/components/editor/utils/draw-mode.js +79 -0
- package/dist/components/editor/utils/draw-mode.js.map +1 -0
- package/dist/components/editor/utils/insertion.d.ts +11 -0
- package/dist/components/editor/utils/insertion.js +26 -0
- package/dist/components/editor/utils/insertion.js.map +1 -0
- package/dist/components/editor/utils/length-calculator.d.ts +36 -0
- package/dist/components/editor/utils/length-calculator.js +32 -0
- package/dist/components/editor/utils/length-calculator.js.map +1 -0
- package/dist/components/editor/utils/serialization.d.ts +34 -0
- package/dist/components/editor/utils/serialization.js +184 -0
- package/dist/components/editor/utils/serialization.js.map +1 -0
- package/dist/components/editor/utils/stroke-transaction.d.ts +36 -0
- package/dist/components/editor/utils/stroke-transaction.js +57 -0
- package/dist/components/editor/utils/stroke-transaction.js.map +1 -0
- package/dist/components/editor/variable-picker-content.d.ts +130 -0
- package/dist/components/editor/variable-picker-content.js +422 -0
- package/dist/components/editor/variable-picker-content.js.map +1 -0
- package/dist/components/feedback/status-dot.d.ts +49 -0
- package/dist/components/feedback/status-dot.js +58 -0
- package/dist/components/feedback/status-dot.js.map +1 -0
- package/dist/components/forms/secret-input.d.ts +38 -0
- package/dist/components/forms/secret-input.js +42 -0
- package/dist/components/forms/secret-input.js.map +1 -0
- package/dist/components/forms/time-picker.d.ts +87 -0
- package/dist/components/forms/time-picker.js +260 -0
- package/dist/components/forms/time-picker.js.map +1 -0
- package/dist/components/forms/toggle-card.d.ts +120 -0
- package/dist/components/forms/toggle-card.js +211 -0
- package/dist/components/forms/toggle-card.js.map +1 -0
- package/dist/components/overlays/popover.d.ts +65 -0
- package/dist/components/overlays/popover.js +89 -0
- package/dist/components/overlays/popover.js.map +1 -0
- package/dist/editor.css +164 -0
- package/dist/index.d.ts +34 -0
- package/dist/index.js +95 -61
- package/dist/lib/board-colors.d.ts +16 -0
- package/dist/lib/board-colors.js +14 -14
- package/dist/lib/board-colors.js.map +1 -1
- package/dist/lib/use-deps-changed.d.ts +33 -0
- package/dist/lib/use-deps-changed.js +11 -0
- package/dist/lib/use-deps-changed.js.map +1 -0
- package/package.json +50 -2
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Row-scoped ProseMirror transaction for draw-mode strokes.
|
|
3
|
+
*
|
|
4
|
+
* The editor keeps every board line inside a single paragraph, separated by
|
|
5
|
+
* hardBreak nodes. A stroke only touches a handful of rows, so instead of
|
|
6
|
+
* rebuilding the whole document (which rebuilds every node, drops the caret
|
|
7
|
+
* and gives each stroke a whole-doc undo footprint) we compute the affected
|
|
8
|
+
* hardBreak-delimited line ranges and replace just those. Untouched lines
|
|
9
|
+
* keep their node objects (ProseMirror structural sharing), and the
|
|
10
|
+
* selection maps through unchanged when it sits outside the painted rows.
|
|
11
|
+
*/
|
|
12
|
+
import type { Node as PMNode } from "@tiptap/pm/model";
|
|
13
|
+
import type { EditorState, Transaction } from "@tiptap/pm/state";
|
|
14
|
+
import type { CellPaint } from "./draw-mode";
|
|
15
|
+
export interface LineRange {
|
|
16
|
+
/** Position of the line's first inline node (inside the paragraph). */
|
|
17
|
+
from: number;
|
|
18
|
+
/** Position just past the line's last inline node (before the trailing hardBreak). */
|
|
19
|
+
to: number;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Content ranges of each hardBreak-delimited line in the document's single
|
|
23
|
+
* top-level paragraph.
|
|
24
|
+
*/
|
|
25
|
+
export declare function lineRanges(doc: PMNode): LineRange[];
|
|
26
|
+
/**
|
|
27
|
+
* Build a transaction that repaints only the rows a stroke touched.
|
|
28
|
+
*
|
|
29
|
+
* @param state Current editor state.
|
|
30
|
+
* @param lines Current template lines (serialized doc, split on "\n").
|
|
31
|
+
* @param byRow Cell paints grouped by row index.
|
|
32
|
+
* @param boardWidth Board columns, used to clamp painted lines.
|
|
33
|
+
* @returns The transaction to dispatch (caller adds closeHistory), or null
|
|
34
|
+
* when there is nothing to paint.
|
|
35
|
+
*/
|
|
36
|
+
export declare function buildStrokeTransaction(state: EditorState, lines: string[], byRow: Map<number, CellPaint[]>, boardWidth: number): Transaction | null;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import "../constants.js";
|
|
2
|
+
import { paintLine as e } from "./draw-mode.js";
|
|
3
|
+
import { parseLineContent as t } from "./serialization.js";
|
|
4
|
+
import { Fragment as n } from "@tiptap/pm/model";
|
|
5
|
+
//#region src/components/editor/utils/stroke-transaction.ts
|
|
6
|
+
var r = "";
|
|
7
|
+
function i(e) {
|
|
8
|
+
let t = e.firstChild;
|
|
9
|
+
if (!t) return [];
|
|
10
|
+
let n = [], r = 1;
|
|
11
|
+
return t.forEach((e, t) => {
|
|
12
|
+
if (e.type.name === "hardBreak") {
|
|
13
|
+
let i = 1 + t;
|
|
14
|
+
n.push({
|
|
15
|
+
from: r,
|
|
16
|
+
to: i
|
|
17
|
+
}), r = i + e.nodeSize;
|
|
18
|
+
}
|
|
19
|
+
}), n.push({
|
|
20
|
+
from: r,
|
|
21
|
+
to: 1 + t.content.size
|
|
22
|
+
}), n;
|
|
23
|
+
}
|
|
24
|
+
function a(a, o, s, c) {
|
|
25
|
+
if (s.size === 0) return null;
|
|
26
|
+
let l = i(a.doc);
|
|
27
|
+
if (l.length === 0) return null;
|
|
28
|
+
let { schema: u } = a, d = a.tr, f = Math.max(...s.keys());
|
|
29
|
+
if (f >= l.length) {
|
|
30
|
+
let e = l[l.length - 1].to, t = [], n = e;
|
|
31
|
+
for (let e = l.length; e <= f; e++) t.push(u.nodes.hardBreak.create(), u.text(r)), n += 1, l.push({
|
|
32
|
+
from: n,
|
|
33
|
+
to: n + 1
|
|
34
|
+
}), n += 1;
|
|
35
|
+
d.insert(e, t);
|
|
36
|
+
}
|
|
37
|
+
let p = [...s.keys()].sort((e, t) => t - e);
|
|
38
|
+
for (let i of p) {
|
|
39
|
+
let a = e(o[i] ?? "", s.get(i), c), f = [
|
|
40
|
+
{
|
|
41
|
+
type: "text",
|
|
42
|
+
text: r
|
|
43
|
+
},
|
|
44
|
+
...t(a),
|
|
45
|
+
{
|
|
46
|
+
type: "text",
|
|
47
|
+
text: r
|
|
48
|
+
}
|
|
49
|
+
], { from: p, to: m } = l[i];
|
|
50
|
+
d.replaceWith(p, m, n.fromJSON(u, f));
|
|
51
|
+
}
|
|
52
|
+
return d;
|
|
53
|
+
}
|
|
54
|
+
//#endregion
|
|
55
|
+
export { a as buildStrokeTransaction, i as lineRanges };
|
|
56
|
+
|
|
57
|
+
//# sourceMappingURL=stroke-transaction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stroke-transaction.js","names":[],"sources":["../../../../src/components/editor/utils/stroke-transaction.ts"],"mappings":";;;;;AAyBA,IAAM,IAAA;AAaN,SAAgB,EAAW,GAA0B;CACnD,IAAM,IAAY,EAAI;CACtB,IAAI,CAAC,GAAW,OAAO,CAAC;CACxB,IAAM,IAAsB,CAAC,GAEzB,IAAY;CAShB,OARA,EAAU,SAAS,GAAO,MAAW;EACnC,IAAI,EAAM,KAAK,SAAS,aAAa;GACnC,IAAM,IAAM,IAAI;GAEhB,AADA,EAAO,KAAK;IAAE,MAAM;IAAW,IAAI;GAAI,CAAC,GACxC,IAAY,IAAM,EAAM;EAC1B;CACF,CAAC,GACD,EAAO,KAAK;EAAE,MAAM;EAAW,IAAI,IAAI,EAAU,QAAQ;CAAK,CAAC,GACxD;AACT;AAYA,SAAgB,EACd,GACA,GACA,GACA,GACoB;CACpB,IAAI,EAAM,SAAS,GAAG,OAAO;CAC7B,IAAM,IAAS,EAAW,EAAM,GAAG;CACnC,IAAI,EAAO,WAAW,GAAG,OAAO;CAEhC,IAAM,EAAE,cAAW,GACb,IAAK,EAAM,IAKX,IAAS,KAAK,IAAI,GAAG,EAAM,KAAK,CAAC;CACvC,IAAI,KAAU,EAAO,QAAQ;EAC3B,IAAM,IAAM,EAAO,EAAO,SAAS,EAAE,CAAC,IAChC,IAAqB,CAAC,GACxB,IAAM;EACV,KAAK,IAAI,IAAI,EAAO,QAAQ,KAAK,GAAQ,KAIvC,AAHA,EAAS,KAAK,EAAO,MAAM,UAAU,OAAO,GAAG,EAAO,KAAK,CAAkB,CAAC,GAC9E,KAAO,GACP,EAAO,KAAK;GAAE,MAAM;GAAK,IAAI,IAAM;EAAE,CAAC,GACtC,KAAO;EAET,EAAG,OAAO,GAAK,CAAQ;CACzB;CAIA,IAAM,IAAO,CAAC,GAAG,EAAM,KAAK,CAAC,CAAC,CAAC,MAAM,GAAG,MAAM,IAAI,CAAC;CACnD,KAAK,IAAM,KAAO,GAAM;EACtB,IAAM,IAAU,EAAU,EAAM,MAAQ,IAAI,EAAM,IAAI,CAAG,GAAI,CAAU,GAEjE,IAAU;GACd;IAAE,MAAM;IAAQ,MAAM;GAAmB;GACzC,GAAG,EAAiB,CAAO;GAC3B;IAAE,MAAM;IAAQ,MAAM;GAAmB;EAC3C,GACM,EAAE,SAAM,UAAO,EAAO;EAC5B,EAAG,YAAY,GAAM,GAAI,EAAS,SAAS,GAAQ,CAAO,CAAC;CAC7D;CAEA,OAAO;AACT"}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Variable Picker Content - Extensible variable list for toolbar dropdown
|
|
3
|
+
* Automatically detects and renders nested arrays from plugin manifests.
|
|
4
|
+
* Supports rich metadata (descriptions, previews, groups) when available.
|
|
5
|
+
*
|
|
6
|
+
* PORTING NOTE — the FiestaBoard version ran three react-query calls of its own
|
|
7
|
+
* (`getTemplateVariables`, one `getPluginManifest` per enabled plugin, and a
|
|
8
|
+
* polled `getDisplaysRawBatch`). This package does no data fetching: all three
|
|
9
|
+
* arrive as already-resolved props with explicit `isLoading*` flags, so the app
|
|
10
|
+
* keeps ownership of caching, retries and the 15s display poll. See
|
|
11
|
+
* CONVENTIONS.md §3.
|
|
12
|
+
*/
|
|
13
|
+
import type { LucideIcon } from "lucide-react";
|
|
14
|
+
/** Rich per-variable metadata a plugin may publish alongside its variable list. */
|
|
15
|
+
export interface VariableMetadataEntry {
|
|
16
|
+
description?: string;
|
|
17
|
+
type?: "string" | "number" | "boolean";
|
|
18
|
+
max_length?: number;
|
|
19
|
+
group?: string;
|
|
20
|
+
preview?: string;
|
|
21
|
+
example?: string;
|
|
22
|
+
}
|
|
23
|
+
/** A named bucket that variables can be sorted into inside a category. */
|
|
24
|
+
export interface VariableGroup {
|
|
25
|
+
label: string;
|
|
26
|
+
}
|
|
27
|
+
/** Response shape of the app's `getTemplateVariables`, narrowed to what is read. */
|
|
28
|
+
export interface TemplateVariables {
|
|
29
|
+
/** Category (plugin id) → the variable names it exposes. */
|
|
30
|
+
variables: Record<string, string[]>;
|
|
31
|
+
/** Category → variable name → metadata. */
|
|
32
|
+
variable_metadata?: Record<string, Record<string, VariableMetadataEntry>>;
|
|
33
|
+
/** Category → group id → group definition. */
|
|
34
|
+
variable_groups?: Record<string, Record<string, VariableGroup>>;
|
|
35
|
+
}
|
|
36
|
+
/** Schema for a keyed map nested inside an array item (e.g. a stop's lines). */
|
|
37
|
+
export interface PluginSubArraySchema {
|
|
38
|
+
/**
|
|
39
|
+
* `index` keys are positional and shown as-is; `dynamic` keys are looked up
|
|
40
|
+
* through `key_field` on the item, so the template addresses them by value
|
|
41
|
+
* (`lines.N.next_arrival`) rather than by position.
|
|
42
|
+
*/
|
|
43
|
+
key_type?: "index" | "dynamic";
|
|
44
|
+
key_field?: string;
|
|
45
|
+
label_field?: string;
|
|
46
|
+
item_fields: string[];
|
|
47
|
+
}
|
|
48
|
+
/** Schema for one indexed array a plugin exposes (e.g. `stops`). */
|
|
49
|
+
export interface PluginArraySchema {
|
|
50
|
+
label_field?: string;
|
|
51
|
+
item_fields: string[];
|
|
52
|
+
sub_arrays?: Record<string, PluginSubArraySchema>;
|
|
53
|
+
}
|
|
54
|
+
/** Response shape of the app's `getPluginManifest`, narrowed to what is read. */
|
|
55
|
+
export interface PluginManifest {
|
|
56
|
+
/** Lucide icon name in kebab or snake case, resolved via `resolveIcon`. */
|
|
57
|
+
icon?: string;
|
|
58
|
+
variables?: {
|
|
59
|
+
arrays?: Record<string, PluginArraySchema>;
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Raw plugin display payloads, keyed by plugin id: the `displays[id].data`
|
|
64
|
+
* halves of the app's `getDisplaysRawBatch` response, already unwrapped.
|
|
65
|
+
*
|
|
66
|
+
* This is live plugin output, not a rendered board preview — it is what turns
|
|
67
|
+
* a manifest's `stops` array schema into "Market & 3rd St, Powell Station".
|
|
68
|
+
*/
|
|
69
|
+
export type PluginDisplayData = Record<string, Record<string, unknown>>;
|
|
70
|
+
export interface VariablePickerLabels {
|
|
71
|
+
searchPlaceholder: string;
|
|
72
|
+
noVariablesAvailable: string;
|
|
73
|
+
noVariablesFound: (searchQuery: string) => string;
|
|
74
|
+
itemInfo: string;
|
|
75
|
+
general: string;
|
|
76
|
+
indexLabel: (index: number) => string;
|
|
77
|
+
configureHint: (arrayName: string) => string;
|
|
78
|
+
configureExample: string;
|
|
79
|
+
noMatchingVariables: string;
|
|
80
|
+
/** Shown after an array's name when the plugin has nothing configured yet. */
|
|
81
|
+
noneConfigured: string;
|
|
82
|
+
/** Shown after an array's name when it does have items. */
|
|
83
|
+
itemCount: (count: number) => string;
|
|
84
|
+
/** Fallback name for an array item whose label field is empty. */
|
|
85
|
+
itemFallbackLabel: (index: number) => string;
|
|
86
|
+
}
|
|
87
|
+
export declare const DEFAULT_VARIABLE_PICKER_LABELS: VariablePickerLabels;
|
|
88
|
+
export interface VariablePickerContentProps {
|
|
89
|
+
/** Called with the full template token, e.g. `{{weather.temperature}}`. */
|
|
90
|
+
onInsert: (variable: string) => void;
|
|
91
|
+
/** Categories and their variables, already fetched by the app. */
|
|
92
|
+
templateVariables?: TemplateVariables;
|
|
93
|
+
isLoadingVariables?: boolean;
|
|
94
|
+
/** Plugin id → manifest. Only categories with a manifest can show arrays. */
|
|
95
|
+
pluginManifests?: Record<string, PluginManifest | undefined>;
|
|
96
|
+
isLoadingManifests?: boolean;
|
|
97
|
+
/**
|
|
98
|
+
* Live plugin data used to enumerate array items. The app should refresh it
|
|
99
|
+
* on an interval (the FiestaBoard app polls every 15s) — the picker only
|
|
100
|
+
* reads it, and defers re-filtering on it so typing stays responsive.
|
|
101
|
+
*/
|
|
102
|
+
pluginDisplayData?: PluginDisplayData;
|
|
103
|
+
/**
|
|
104
|
+
* Maps a manifest's icon name to an icon component. Omitted, no icons render.
|
|
105
|
+
* The whole Lucide icon map is deliberately not imported here — this package
|
|
106
|
+
* stays dependency-light, so the app supplies the set it already ships (see
|
|
107
|
+
* `createLucideIconResolver`).
|
|
108
|
+
*/
|
|
109
|
+
resolveIcon?: (iconName: string) => LucideIcon | null | undefined;
|
|
110
|
+
maxHeight?: string;
|
|
111
|
+
autoFocusSearch?: boolean;
|
|
112
|
+
labels?: Partial<VariablePickerLabels>;
|
|
113
|
+
/** Extra classes applied to the root div — use to override min-width in constrained layouts */
|
|
114
|
+
className?: string;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Builds a `resolveIcon` prop from a Lucide icon map (`import { icons } from
|
|
118
|
+
* "lucide-react"`). Kept here because the kebab/snake → PascalCase mapping is
|
|
119
|
+
* the contract plugin manifests are written against; only the icon set itself
|
|
120
|
+
* belongs to the app.
|
|
121
|
+
*/
|
|
122
|
+
export declare function createLucideIconResolver(icons: Record<string, LucideIcon>): (iconName: string) => LucideIcon | null;
|
|
123
|
+
/**
|
|
124
|
+
* The plugin ids whose manifests declare nested arrays — i.e. the only ones
|
|
125
|
+
* whose live display data the picker can use. The app fetches display data for
|
|
126
|
+
* exactly this set; exported so that scoping survives the move out of the
|
|
127
|
+
* component (it used to be the `enabled` guard on the batch query).
|
|
128
|
+
*/
|
|
129
|
+
export declare function getPluginsWithNestedArrays(templateVariables: TemplateVariables | undefined, pluginManifests: Record<string, PluginManifest | undefined> | undefined): string[];
|
|
130
|
+
export declare function VariablePickerContent({ onInsert, templateVariables, isLoadingVariables, pluginManifests, isLoadingManifests, pluginDisplayData, resolveIcon, maxHeight, autoFocusSearch, labels, className, }: VariablePickerContentProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,422 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../../lib/utils.js";
|
|
3
|
+
import { Accordion as t, AccordionContent as n, AccordionItem as r, AccordionTrigger as i } from "../containment/accordion.js";
|
|
4
|
+
import { Badge as a } from "../feedback/badge.js";
|
|
5
|
+
import { Input as o } from "../forms/input.js";
|
|
6
|
+
import { Box as s } from "../layout/box.js";
|
|
7
|
+
import { Flex as c } from "../layout/flex.js";
|
|
8
|
+
import { Code as l } from "../typography/code.js";
|
|
9
|
+
import { ScrollArea as u } from "../containment/scroll-area.js";
|
|
10
|
+
import { Skeleton as d } from "../feedback/skeleton.js";
|
|
11
|
+
import { Text as f } from "../typography/text.js";
|
|
12
|
+
import { Stack as p } from "../layout/stack.js";
|
|
13
|
+
import { Tooltip as m, TooltipContent as h, TooltipProvider as g, TooltipTrigger as _ } from "../overlays/tooltip.js";
|
|
14
|
+
import { Search as v } from "lucide-react";
|
|
15
|
+
import { useDeferredValue as y, useState as b } from "react";
|
|
16
|
+
import { Fragment as x, jsx as S, jsxs as C } from "react/jsx-runtime";
|
|
17
|
+
//#region src/components/editor/variable-picker-content.tsx
|
|
18
|
+
var w = {
|
|
19
|
+
searchPlaceholder: "Search variables...",
|
|
20
|
+
noVariablesAvailable: "No variables available",
|
|
21
|
+
noVariablesFound: (e) => `No variables found matching "${e}"`,
|
|
22
|
+
itemInfo: "Item Info",
|
|
23
|
+
general: "General",
|
|
24
|
+
indexLabel: (e) => `Index: ${e}`,
|
|
25
|
+
configureHint: (e) => `Configure ${e} in Settings to see indexed variables here.`,
|
|
26
|
+
configureExample: "Example:",
|
|
27
|
+
noMatchingVariables: "No matching variables found.",
|
|
28
|
+
noneConfigured: "(None configured)",
|
|
29
|
+
itemCount: (e) => `(${e})`,
|
|
30
|
+
itemFallbackLabel: (e) => `Item ${e}`
|
|
31
|
+
}, T = {}, E = {};
|
|
32
|
+
function D(e) {
|
|
33
|
+
return Array.isArray(e) ? e : void 0;
|
|
34
|
+
}
|
|
35
|
+
function O(e) {
|
|
36
|
+
return e && typeof e == "object" && !Array.isArray(e) ? e : void 0;
|
|
37
|
+
}
|
|
38
|
+
function k(e) {
|
|
39
|
+
return (t) => t ? e[t.split(/[-_]/).map((e) => e.charAt(0).toUpperCase() + e.slice(1)).join("")] ?? null : null;
|
|
40
|
+
}
|
|
41
|
+
function A(e) {
|
|
42
|
+
return e?.variables?.arrays ? Object.keys(e.variables.arrays).length > 0 : !1;
|
|
43
|
+
}
|
|
44
|
+
function j(e) {
|
|
45
|
+
return e?.variables?.arrays ? Object.keys(e.variables.arrays) : [];
|
|
46
|
+
}
|
|
47
|
+
function M(e, t) {
|
|
48
|
+
return e?.variables ? Object.keys(e.variables).filter((e) => A(t?.[e])) : [];
|
|
49
|
+
}
|
|
50
|
+
function N(e, t) {
|
|
51
|
+
return !t.trim() || e.toLowerCase().includes(t.toLowerCase());
|
|
52
|
+
}
|
|
53
|
+
function P(e, t, n) {
|
|
54
|
+
if (!n.trim()) return !0;
|
|
55
|
+
let r = n.toLowerCase(), i = e.toLowerCase(), a = t.toLowerCase();
|
|
56
|
+
return i.includes(r) || a.includes(r) || `${i}.${a}`.includes(r) || i.split(/[._-]/).some((e) => e.includes(r)) || a.split(/[._-]/).some((e) => e.includes(r));
|
|
57
|
+
}
|
|
58
|
+
function F({ label: e, description: t, preview: n, onInsert: r }) {
|
|
59
|
+
let i = /* @__PURE__ */ S(a, {
|
|
60
|
+
variant: "variable",
|
|
61
|
+
asChild: !0,
|
|
62
|
+
className: "px-2.5 py-1 cursor-pointer hover:bg-tag-variable/25",
|
|
63
|
+
children: /* @__PURE__ */ C("button", {
|
|
64
|
+
type: "button",
|
|
65
|
+
onClick: r,
|
|
66
|
+
children: [e, n && /* @__PURE__ */ S(f, {
|
|
67
|
+
as: "span",
|
|
68
|
+
tone: "muted",
|
|
69
|
+
weight: "normal",
|
|
70
|
+
className: "ml-1.5 text-[10px] opacity-70",
|
|
71
|
+
children: n.length > 12 ? n.slice(0, 12) + "…" : n
|
|
72
|
+
})]
|
|
73
|
+
})
|
|
74
|
+
});
|
|
75
|
+
return t ? /* @__PURE__ */ C(m, { children: [/* @__PURE__ */ S(_, {
|
|
76
|
+
asChild: !0,
|
|
77
|
+
children: i
|
|
78
|
+
}), /* @__PURE__ */ S(h, {
|
|
79
|
+
side: "top",
|
|
80
|
+
className: "max-w-[220px] text-xs",
|
|
81
|
+
children: t
|
|
82
|
+
})] }) : i;
|
|
83
|
+
}
|
|
84
|
+
function I(e, o, u, d, m, h, g, _, v, y = !1, b) {
|
|
85
|
+
if (!m || Object.keys(m).length === 0) return null;
|
|
86
|
+
let x = h?.variables?.arrays?.[u]?.sub_arrays?.[d];
|
|
87
|
+
if (!x) return null;
|
|
88
|
+
let w = x.item_fields || [], T = x.key_type || "index", E = x.key_field, D = x.label_field, O = (e) => {
|
|
89
|
+
let t = D && e[D] || E && e[E] || e[w[0]];
|
|
90
|
+
return t == null || t === "" ? "" : String(t);
|
|
91
|
+
}, k = y ? Object.entries(m) : Object.entries(m).filter(([e, t]) => {
|
|
92
|
+
if (!_.trim()) return !0;
|
|
93
|
+
let n = T === "dynamic" && E ? String(t[E] ?? e) : e, r = O(t) || n;
|
|
94
|
+
return N(d, _) || N(n, _) || N(r, _) || w.some((e) => N(e, _));
|
|
95
|
+
});
|
|
96
|
+
return k.length === 0 ? null : /* @__PURE__ */ C(s, { children: [/* @__PURE__ */ C(f, {
|
|
97
|
+
size: "xs",
|
|
98
|
+
tone: "muted",
|
|
99
|
+
className: "mb-1.5 flex items-center gap-1",
|
|
100
|
+
children: [
|
|
101
|
+
b && /* @__PURE__ */ S(b, { className: "h-3 w-3" }),
|
|
102
|
+
d.charAt(0).toUpperCase() + d.slice(1),
|
|
103
|
+
" ",
|
|
104
|
+
v.itemCount(k.length)
|
|
105
|
+
]
|
|
106
|
+
}), /* @__PURE__ */ S(t, {
|
|
107
|
+
type: "single",
|
|
108
|
+
collapsible: !0,
|
|
109
|
+
className: "w-full",
|
|
110
|
+
children: k.map(([t, m]) => {
|
|
111
|
+
let h = T === "dynamic" && E ? String(m[E] ?? t) : t, v = O(m) || h, b = y ? w : w.filter((e) => !_.trim() || N(e, _));
|
|
112
|
+
return b.length === 0 ? null : /* @__PURE__ */ C(r, {
|
|
113
|
+
value: `${u}-${o}-${d}-${t}`,
|
|
114
|
+
className: "border-b-0",
|
|
115
|
+
children: [/* @__PURE__ */ S(i, {
|
|
116
|
+
className: "py-1.5 hover:no-underline text-xs",
|
|
117
|
+
children: /* @__PURE__ */ C(c, {
|
|
118
|
+
align: "center",
|
|
119
|
+
gap: "2",
|
|
120
|
+
children: [T === "dynamic" && /* @__PURE__ */ S(a, {
|
|
121
|
+
variant: "outline",
|
|
122
|
+
className: "text-[10px] font-mono px-1.5",
|
|
123
|
+
children: h
|
|
124
|
+
}), /* @__PURE__ */ S(f, {
|
|
125
|
+
as: "span",
|
|
126
|
+
size: "xs",
|
|
127
|
+
className: "text-left",
|
|
128
|
+
children: v
|
|
129
|
+
})]
|
|
130
|
+
})
|
|
131
|
+
}), /* @__PURE__ */ S(n, { children: /* @__PURE__ */ C(p, {
|
|
132
|
+
gap: "2",
|
|
133
|
+
className: "pt-2 pl-2",
|
|
134
|
+
children: [/* @__PURE__ */ S(c, {
|
|
135
|
+
wrap: !0,
|
|
136
|
+
gap: "1.5",
|
|
137
|
+
children: b.map((n) => {
|
|
138
|
+
let r = `{{${e}.${u}.${o}.${d}.${t}.${n}}}`;
|
|
139
|
+
return /* @__PURE__ */ S(F, {
|
|
140
|
+
label: n,
|
|
141
|
+
onInsert: () => g(r)
|
|
142
|
+
}, n);
|
|
143
|
+
})
|
|
144
|
+
}), /* @__PURE__ */ S(s, {
|
|
145
|
+
className: "text-xs text-muted-foreground bg-muted/50 p-2 rounded-md",
|
|
146
|
+
children: /* @__PURE__ */ C(l, {
|
|
147
|
+
className: "text-xs bg-transparent px-0",
|
|
148
|
+
children: [
|
|
149
|
+
u,
|
|
150
|
+
".",
|
|
151
|
+
o,
|
|
152
|
+
".",
|
|
153
|
+
d,
|
|
154
|
+
".",
|
|
155
|
+
t,
|
|
156
|
+
".*"
|
|
157
|
+
]
|
|
158
|
+
})
|
|
159
|
+
})]
|
|
160
|
+
}) })]
|
|
161
|
+
}, t);
|
|
162
|
+
})
|
|
163
|
+
})] });
|
|
164
|
+
}
|
|
165
|
+
function L(e, a, o, d, m, h, g, _ = !1, v) {
|
|
166
|
+
if (!o || o.length === 0) return /* @__PURE__ */ C(s, {
|
|
167
|
+
className: "p-3 bg-muted/30 rounded-lg text-xs text-muted-foreground",
|
|
168
|
+
children: [/* @__PURE__ */ S(f, {
|
|
169
|
+
size: "xs",
|
|
170
|
+
tone: "muted",
|
|
171
|
+
className: "mb-2",
|
|
172
|
+
children: g.configureHint(a)
|
|
173
|
+
}), /* @__PURE__ */ C(f, {
|
|
174
|
+
tone: "muted",
|
|
175
|
+
className: "font-mono text-[10px]",
|
|
176
|
+
children: [
|
|
177
|
+
g.configureExample,
|
|
178
|
+
" ",
|
|
179
|
+
/* @__PURE__ */ C(l, {
|
|
180
|
+
className: "bg-background px-1 text-[10px]",
|
|
181
|
+
children: [a, ".0.*"]
|
|
182
|
+
})
|
|
183
|
+
]
|
|
184
|
+
})]
|
|
185
|
+
});
|
|
186
|
+
let y = d?.variables?.arrays?.[a];
|
|
187
|
+
if (!y) return null;
|
|
188
|
+
let b = y.label_field || "name", x = y.item_fields || [], w = y.sub_arrays || {}, T = _ ? o.map((e, t) => ({
|
|
189
|
+
item: e,
|
|
190
|
+
index: t
|
|
191
|
+
})) : o.map((e, t) => ({
|
|
192
|
+
item: e,
|
|
193
|
+
index: t
|
|
194
|
+
})).filter(({ item: e, index: t }) => {
|
|
195
|
+
if (!h.trim()) return !0;
|
|
196
|
+
let n = String(e[b] || e.name || g.itemFallbackLabel(t));
|
|
197
|
+
return N(a, h) || N(n, h) || x.some((e) => N(e, h)) || Object.keys(w).some((t) => {
|
|
198
|
+
let n = e[t];
|
|
199
|
+
return n ? N(t, h) || Object.keys(n).some((e) => N(e, h)) : !1;
|
|
200
|
+
});
|
|
201
|
+
});
|
|
202
|
+
return T.length === 0 ? /* @__PURE__ */ S(s, {
|
|
203
|
+
className: "p-3 bg-muted/30 rounded-lg text-xs text-muted-foreground",
|
|
204
|
+
children: /* @__PURE__ */ S(f, {
|
|
205
|
+
size: "xs",
|
|
206
|
+
tone: "muted",
|
|
207
|
+
children: g.noMatchingVariables
|
|
208
|
+
})
|
|
209
|
+
}) : /* @__PURE__ */ S(u, {
|
|
210
|
+
className: "max-h-[400px] pr-1",
|
|
211
|
+
children: /* @__PURE__ */ S(t, {
|
|
212
|
+
type: "single",
|
|
213
|
+
collapsible: !0,
|
|
214
|
+
className: "w-full",
|
|
215
|
+
children: T.map(({ item: t, index: o }) => {
|
|
216
|
+
let l = String(t[b] || t.name || g.itemFallbackLabel(o)), u = _ ? x.filter((e) => !e.includes(".")) : x.filter((e) => !e.includes(".")).filter((e) => !h.trim() || N(e, h)), y = Object.entries(w).filter(([e]) => {
|
|
217
|
+
let n = t[e];
|
|
218
|
+
return n ? _ || !h.trim() ? !0 : N(e, h) || Object.keys(n).some((e) => N(e, h)) : !1;
|
|
219
|
+
});
|
|
220
|
+
return u.length > 0 || y.length > 0 ? /* @__PURE__ */ C(r, {
|
|
221
|
+
value: `${a}-${o}`,
|
|
222
|
+
className: "border-b-0",
|
|
223
|
+
children: [/* @__PURE__ */ S(i, {
|
|
224
|
+
className: "py-2 hover:no-underline",
|
|
225
|
+
children: /* @__PURE__ */ C(c, {
|
|
226
|
+
align: "center",
|
|
227
|
+
gap: "2",
|
|
228
|
+
className: "text-xs",
|
|
229
|
+
children: [v && /* @__PURE__ */ S(v, { className: "h-3 w-3" }), /* @__PURE__ */ C(s, {
|
|
230
|
+
className: "text-left",
|
|
231
|
+
children: [/* @__PURE__ */ S(f, {
|
|
232
|
+
size: "xs",
|
|
233
|
+
weight: "medium",
|
|
234
|
+
children: l
|
|
235
|
+
}), /* @__PURE__ */ S(f, {
|
|
236
|
+
size: "xs",
|
|
237
|
+
tone: "muted",
|
|
238
|
+
children: g.indexLabel(o)
|
|
239
|
+
})]
|
|
240
|
+
})]
|
|
241
|
+
})
|
|
242
|
+
}), /* @__PURE__ */ S(n, { children: /* @__PURE__ */ C(p, {
|
|
243
|
+
gap: "3",
|
|
244
|
+
className: "pt-2 pl-2",
|
|
245
|
+
children: [u.length > 0 && /* @__PURE__ */ C(s, { children: [/* @__PURE__ */ S(f, {
|
|
246
|
+
size: "xs",
|
|
247
|
+
tone: "muted",
|
|
248
|
+
className: "mb-1.5",
|
|
249
|
+
children: g.itemInfo
|
|
250
|
+
}), /* @__PURE__ */ S(c, {
|
|
251
|
+
wrap: !0,
|
|
252
|
+
gap: "1.5",
|
|
253
|
+
children: u.map((t) => {
|
|
254
|
+
let n = `{{${e}.${a}.${o}.${t}}}`;
|
|
255
|
+
return /* @__PURE__ */ S(F, {
|
|
256
|
+
label: t,
|
|
257
|
+
onInsert: () => m(n)
|
|
258
|
+
}, t);
|
|
259
|
+
})
|
|
260
|
+
})] }), y.map(([n]) => {
|
|
261
|
+
let r = O(t[n]);
|
|
262
|
+
return r ? /* @__PURE__ */ S(s, { children: I(e, o, a, n, r, d, m, h, g, _, v) }, n) : null;
|
|
263
|
+
})]
|
|
264
|
+
}) })]
|
|
265
|
+
}, o) : null;
|
|
266
|
+
})
|
|
267
|
+
})
|
|
268
|
+
});
|
|
269
|
+
}
|
|
270
|
+
function R({ onInsert: t, templateVariables: n, isLoadingVariables: r = !1, pluginManifests: i = E, isLoadingManifests: a = !1, pluginDisplayData: l = T, resolveIcon: m, maxHeight: h = "400px", autoFocusSearch: _ = !0, labels: O, className: k }) {
|
|
271
|
+
let A = {
|
|
272
|
+
...w,
|
|
273
|
+
...O
|
|
274
|
+
}, [M, I] = b(""), R = y(l), z = n?.variable_metadata ?? {}, B = n?.variable_groups ?? {};
|
|
275
|
+
if (r || a) return /* @__PURE__ */ C(s, {
|
|
276
|
+
className: "p-3 min-w-[300px]",
|
|
277
|
+
children: [
|
|
278
|
+
/* @__PURE__ */ S(d, { className: "h-4 w-full mb-2" }),
|
|
279
|
+
/* @__PURE__ */ S(d, { className: "h-4 w-3/4 mb-2" }),
|
|
280
|
+
/* @__PURE__ */ S(d, { className: "h-4 w-1/2" })
|
|
281
|
+
]
|
|
282
|
+
});
|
|
283
|
+
if (!n?.variables) return /* @__PURE__ */ S(f, {
|
|
284
|
+
tone: "muted",
|
|
285
|
+
className: "p-3 min-w-[300px]",
|
|
286
|
+
children: A.noVariablesAvailable
|
|
287
|
+
});
|
|
288
|
+
let V = Object.entries(n.variables).filter(([e, t]) => {
|
|
289
|
+
if (!M.trim()) return !0;
|
|
290
|
+
let n = M.toLowerCase(), r = e.toLowerCase();
|
|
291
|
+
if (N(e, M) || r.replace(/_/g, " ").split(/\s+/).some((e) => e.includes(n))) return !0;
|
|
292
|
+
let a = i[e], o = j(a), s = t.filter((e) => !e.includes(".") || !e.includes(".*."));
|
|
293
|
+
if ((o.length > 0 ? s.filter((e) => !o.some((t) => e.startsWith(t + "."))) : s).some((t) => P(e, t, M)) || o.some((e) => N(e, M))) return !0;
|
|
294
|
+
for (let t of o) {
|
|
295
|
+
let n = D(R[e]?.[t]);
|
|
296
|
+
if (n && n.length > 0) {
|
|
297
|
+
let e = a?.variables?.arrays?.[t];
|
|
298
|
+
if (e && n.some((t) => N(String(t[e.label_field || "name"] || ""), M) || e.item_fields.some((e) => N(e, M)))) return !0;
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
return !1;
|
|
302
|
+
});
|
|
303
|
+
return /* @__PURE__ */ S(g, {
|
|
304
|
+
delayDuration: 300,
|
|
305
|
+
children: /* @__PURE__ */ C(c, {
|
|
306
|
+
direction: "col",
|
|
307
|
+
className: e("w-full min-w-[min(340px,calc(100vw-24px))]", k),
|
|
308
|
+
children: [/* @__PURE__ */ S(s, {
|
|
309
|
+
className: "p-2 border-b",
|
|
310
|
+
children: /* @__PURE__ */ C(s, {
|
|
311
|
+
className: "relative",
|
|
312
|
+
children: [/* @__PURE__ */ S(v, { className: "absolute left-2.5 top-1/2 transform -translate-y-1/2 h-4 w-4 text-muted-foreground" }), /* @__PURE__ */ S(o, {
|
|
313
|
+
autoFocus: _,
|
|
314
|
+
type: "text",
|
|
315
|
+
placeholder: A.searchPlaceholder,
|
|
316
|
+
"aria-label": A.searchPlaceholder,
|
|
317
|
+
value: M,
|
|
318
|
+
onChange: (e) => I(e.target.value),
|
|
319
|
+
className: "pl-8 h-9"
|
|
320
|
+
})]
|
|
321
|
+
})
|
|
322
|
+
}), /* @__PURE__ */ S(u, {
|
|
323
|
+
className: "flex-1",
|
|
324
|
+
style: { height: h },
|
|
325
|
+
children: /* @__PURE__ */ S(p, {
|
|
326
|
+
gap: "3",
|
|
327
|
+
className: "p-2",
|
|
328
|
+
children: V.length === 0 ? /* @__PURE__ */ S(f, {
|
|
329
|
+
tone: "muted",
|
|
330
|
+
className: "p-3 text-center",
|
|
331
|
+
children: A.noVariablesFound(M)
|
|
332
|
+
}) : V.map(([e, n]) => {
|
|
333
|
+
let r = i[e], a = j(r), o = z[e] ?? {}, l = B[e] ?? {}, u = Object.keys(l).length > 0, d = (r?.icon ? m?.(r.icon) : null) ?? null, h = n.filter((e) => !e.includes(".*.")), g = a.length > 0 ? h.filter((e) => !a.some((t) => e === t || e.startsWith(t + "."))) : h, _ = M.trim() && (N(e, M) || e.toLowerCase().replace(/_/g, " ").split(/\s+/).some((e) => e.includes(M.toLowerCase()))), v = _ ? g : g.filter((t) => !M.trim() || P(e, t, M)), y = a.length > 0 && a.some((t) => {
|
|
334
|
+
if (!M.trim() || _ || N(t, M)) return !0;
|
|
335
|
+
let n = D(R[e]?.[t]);
|
|
336
|
+
if (!n || n.length === 0) return !1;
|
|
337
|
+
let i = r?.variables?.arrays?.[t];
|
|
338
|
+
return i ? n.some((e) => N(String(e[i.label_field || "name"] || ""), M) || i.item_fields.some((e) => N(e, M))) : !1;
|
|
339
|
+
});
|
|
340
|
+
if (v.length === 0 && !y) return null;
|
|
341
|
+
let b = {};
|
|
342
|
+
if (u) for (let e of v) {
|
|
343
|
+
let t = o[e]?.group || "", n = t && l[t] ? t : "__ungrouped__";
|
|
344
|
+
(b[n] ??= []).push(e);
|
|
345
|
+
}
|
|
346
|
+
let w = (n) => {
|
|
347
|
+
let r = o[n], i = `{{${e}.${n}}}`;
|
|
348
|
+
return /* @__PURE__ */ S(F, {
|
|
349
|
+
label: n,
|
|
350
|
+
description: r?.description,
|
|
351
|
+
preview: r?.preview,
|
|
352
|
+
onInsert: () => t(i)
|
|
353
|
+
}, n);
|
|
354
|
+
};
|
|
355
|
+
return /* @__PURE__ */ C(p, {
|
|
356
|
+
gap: "1.5",
|
|
357
|
+
children: [
|
|
358
|
+
/* @__PURE__ */ C(c, {
|
|
359
|
+
align: "center",
|
|
360
|
+
gap: "2",
|
|
361
|
+
className: "bg-muted/30 rounded-md px-2 py-1.5 -mx-1",
|
|
362
|
+
children: [d && /* @__PURE__ */ S(d, { className: "h-3 w-3 text-muted-foreground" }), /* @__PURE__ */ S(f, {
|
|
363
|
+
as: "span",
|
|
364
|
+
size: "xs",
|
|
365
|
+
weight: "semibold",
|
|
366
|
+
children: e.replace(/_/g, " ").replace(/\b\w/g, (e) => e.toUpperCase())
|
|
367
|
+
})]
|
|
368
|
+
}),
|
|
369
|
+
u ? /* @__PURE__ */ C(x, { children: [Object.entries(l).map(([e, t]) => {
|
|
370
|
+
let n = b[e];
|
|
371
|
+
return !n || n.length === 0 ? null : /* @__PURE__ */ C(s, { children: [/* @__PURE__ */ S(f, {
|
|
372
|
+
className: "text-[9px] uppercase tracking-widest text-muted-foreground/70 mt-1 mb-1 pb-0.5 border-b border-border/30",
|
|
373
|
+
children: t.label
|
|
374
|
+
}), /* @__PURE__ */ S(c, {
|
|
375
|
+
wrap: !0,
|
|
376
|
+
gap: "1.5",
|
|
377
|
+
children: n.map(w)
|
|
378
|
+
})] }, e);
|
|
379
|
+
}), b.__ungrouped__ && b.__ungrouped__.length > 0 && /* @__PURE__ */ C(s, { children: [/* @__PURE__ */ S(f, {
|
|
380
|
+
className: "text-[9px] uppercase tracking-widest text-muted-foreground/70 mt-1 mb-1 pb-0.5 border-b border-border/30",
|
|
381
|
+
children: A.general
|
|
382
|
+
}), /* @__PURE__ */ S(c, {
|
|
383
|
+
wrap: !0,
|
|
384
|
+
gap: "1.5",
|
|
385
|
+
children: b.__ungrouped__.map(w)
|
|
386
|
+
})] })] }) : v.length > 0 && /* @__PURE__ */ C(s, { children: [/* @__PURE__ */ S(f, {
|
|
387
|
+
className: "text-[9px] uppercase tracking-widest text-muted-foreground/70 mt-1 mb-1 pb-0.5 border-b border-border/30",
|
|
388
|
+
children: A.general
|
|
389
|
+
}), /* @__PURE__ */ S(c, {
|
|
390
|
+
wrap: !0,
|
|
391
|
+
gap: "1.5",
|
|
392
|
+
children: v.map(w)
|
|
393
|
+
})] }),
|
|
394
|
+
a.map((n) => {
|
|
395
|
+
let i = D(R[e]?.[n]);
|
|
396
|
+
return !M.trim() || _ || N(n, M) || i && i.length > 0 ? /* @__PURE__ */ C(p, {
|
|
397
|
+
gap: "1.5",
|
|
398
|
+
children: [/* @__PURE__ */ C(f, {
|
|
399
|
+
size: "xs",
|
|
400
|
+
tone: "muted",
|
|
401
|
+
className: "flex items-center gap-1",
|
|
402
|
+
children: [
|
|
403
|
+
d && /* @__PURE__ */ S(d, { className: "h-3 w-3" }),
|
|
404
|
+
n.charAt(0).toUpperCase() + n.slice(1),
|
|
405
|
+
" ",
|
|
406
|
+
i ? A.itemCount(i.length) : A.noneConfigured
|
|
407
|
+
]
|
|
408
|
+
}), L(e, n, i, r, t, M, A, !!_, d)]
|
|
409
|
+
}, n) : null;
|
|
410
|
+
})
|
|
411
|
+
]
|
|
412
|
+
}, e);
|
|
413
|
+
})
|
|
414
|
+
})
|
|
415
|
+
})]
|
|
416
|
+
})
|
|
417
|
+
});
|
|
418
|
+
}
|
|
419
|
+
//#endregion
|
|
420
|
+
export { w as DEFAULT_VARIABLE_PICKER_LABELS, R as VariablePickerContent, k as createLucideIconResolver, M as getPluginsWithNestedArrays };
|
|
421
|
+
|
|
422
|
+
//# sourceMappingURL=variable-picker-content.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"variable-picker-content.js","names":[],"sources":["../../../src/components/editor/variable-picker-content.tsx"],"mappings":";;;;;;;;;;;;;;;;;AA0HA,IAAa,IAAuD;CAClE,mBAAmB;CACnB,sBAAsB;CACtB,mBAAmB,MAAgB,gCAAgC,EAAY;CAC/E,UAAU;CACV,SAAS;CACT,aAAa,MAAU,UAAU;CACjC,gBAAgB,MAAc,aAAa,EAAU;CACrD,kBAAkB;CAClB,qBAAqB;CACrB,gBAAgB;CAChB,YAAY,MAAU,IAAI,EAAM;CAChC,oBAAoB,MAAU,QAAQ;AACxC,GAoCM,IAAwC,CAAC,GACzC,IAA8D,CAAC;AAQrE,SAAS,EAAY,GAAuD;CAC1E,OAAO,MAAM,QAAQ,CAAK,IAAK,IAAsC,KAAA;AACvE;AAGA,SAAS,EAAU,GAAqE;CACtF,OAAO,KAAS,OAAO,KAAU,YAAY,CAAC,MAAM,QAAQ,CAAK,IAC5D,IACD,KAAA;AACN;AAQA,SAAgB,EAAyB,GAA4E;CACnH,QAAQ,MACD,IAKE,EAJY,EAChB,MAAM,MAAM,CAAC,CACb,KAAK,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,YAAY,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,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