@schandlergarcia/sf-web-components 1.8.0 → 1.9.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/library/cards/SemanticTableCard.d.ts +1 -1
- package/dist/components/library/chat/ChatBar.d.ts +14 -11
- package/dist/components/library/chat/ChatBar.js +2 -3
- package/dist/components/library/chat/ChatBar.js.map +1 -1
- package/dist/components/library/chat/ChatInput.d.ts +9 -8
- package/dist/components/library/chat/ChatInput.js.map +1 -1
- package/dist/components/library/chat/ChatMessage.d.ts +17 -4
- package/dist/components/library/chat/ChatMessage.js.map +1 -1
- package/dist/components/library/chat/ChatMessageList.d.ts +11 -8
- package/dist/components/library/chat/ChatMessageList.js.map +1 -1
- package/dist/components/library/chat/ChatPanel.d.ts +16 -12
- package/dist/components/library/chat/ChatPanel.js +8 -9
- package/dist/components/library/chat/ChatPanel.js.map +1 -1
- package/dist/components/library/chat/ChatSuggestions.d.ts +5 -4
- package/dist/components/library/chat/ChatSuggestions.js +2 -3
- package/dist/components/library/chat/ChatSuggestions.js.map +1 -1
- package/dist/components/library/chat/ChatToolCall.d.ts +11 -3
- package/dist/components/library/chat/ChatToolCall.js.map +1 -1
- package/dist/components/library/chat/ChatTypingIndicator.d.ts +4 -3
- package/dist/components/library/chat/ChatTypingIndicator.js +2 -3
- package/dist/components/library/chat/ChatTypingIndicator.js.map +1 -1
- package/dist/components/library/chat/ChatWelcome.d.ts +9 -7
- package/dist/components/library/chat/ChatWelcome.js +6 -7
- package/dist/components/library/chat/ChatWelcome.js.map +1 -1
- package/dist/components/library/chat/index.d.ts +10 -0
- package/dist/components/library/chat/useChatState.d.ts +36 -11
- package/dist/components/library/chat/useChatState.js +63 -46
- package/dist/components/library/chat/useChatState.js.map +1 -1
- package/dist/components/library/data/DataModeProvider.d.ts +15 -11
- package/dist/components/library/data/DataModeProvider.js +1 -1
- package/dist/components/library/data/DataModeProvider.js.map +1 -1
- package/dist/components/library/data/DataModeToggle.d.ts +4 -3
- package/dist/components/library/data/DataModeToggle.js +4 -5
- package/dist/components/library/data/DataModeToggle.js.map +1 -1
- package/dist/components/library/data/chartDataProvider.d.ts +41 -3
- package/dist/components/library/data/filterUtils.d.ts +38 -9
- package/dist/components/library/data/filterUtils.js.map +1 -1
- package/dist/components/library/data/useDataSource.d.ts +6 -4
- package/dist/components/library/data/useDataSource.js.map +1 -1
- package/dist/components/library/data/usePageFilters.d.ts +31 -5
- package/dist/components/library/data/usePageFilters.js +6 -2
- package/dist/components/library/data/usePageFilters.js.map +1 -1
- package/dist/components/library/index.d.ts +92 -73
- package/dist/components/library/index.js +25 -25
- package/dist/components/library/index.js.map +1 -1
- package/dist/components/library/skeletons/CardSkeleton.d.ts +5 -4
- package/dist/components/library/skeletons/CardSkeleton.js +2 -3
- package/dist/components/library/skeletons/CardSkeleton.js.map +1 -1
- package/dist/components/library/theme/AppThemeProvider.d.ts +13 -50
- package/dist/components/library/theme/AppThemeProvider.js.map +1 -1
- package/dist/components/library/theme/tokens.d.ts +45 -44
- package/dist/components/library/theme/tokens.js.map +1 -1
- package/package.json +1 -1
- package/src/components/library/cards/SemanticMetricCard.tsx +1 -1
- package/src/components/library/cards/SemanticTableCard.tsx +3 -3
- package/src/components/library/chat/{ChatBar.jsx → ChatBar.tsx} +19 -8
- package/src/components/library/chat/{ChatInput.jsx → ChatInput.tsx} +13 -11
- package/src/components/library/chat/{ChatMessage.jsx → ChatMessage.tsx} +22 -9
- package/src/components/library/chat/{ChatMessageList.jsx → ChatMessageList.tsx} +13 -11
- package/src/components/library/chat/{ChatPanel.jsx → ChatPanel.tsx} +16 -13
- package/src/components/library/chat/{ChatSuggestions.jsx → ChatSuggestions.tsx} +6 -5
- package/src/components/library/chat/{ChatToolCall.jsx → ChatToolCall.tsx} +14 -4
- package/src/components/library/chat/{ChatTypingIndicator.jsx → ChatTypingIndicator.tsx} +5 -2
- package/src/components/library/chat/{ChatWelcome.jsx → ChatWelcome.tsx} +9 -7
- package/src/components/library/chat/index.tsx +26 -0
- package/src/components/library/chat/useChatState.tsx +181 -0
- package/src/components/library/data/{DataModeProvider.jsx → DataModeProvider.tsx} +25 -8
- package/src/components/library/data/{DataModeToggle.jsx → DataModeToggle.tsx} +5 -2
- package/src/components/library/data/{chartDataProvider.jsx → chartDataProvider.tsx} +49 -5
- package/src/components/library/data/{filterUtils.jsx → filterUtils.tsx} +58 -12
- package/src/components/library/data/{useDataSource.jsx → useDataSource.tsx} +9 -2
- package/src/components/library/data/{usePageFilters.jsx → usePageFilters.tsx} +49 -9
- package/src/components/library/{index.jsx → index.ts} +14 -14
- package/src/components/library/skeletons/{CardSkeleton.jsx → CardSkeleton.tsx} +5 -4
- package/src/components/library/theme/{AppThemeProvider.jsx → AppThemeProvider.tsx} +20 -7
- package/src/components/library/theme/{tokens.jsx → tokens.tsx} +37 -3
- package/src/components/library/chat/index.jsx +0 -10
- package/src/components/library/chat/useChatState.jsx +0 -130
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filterUtils.js","sources":["../../../../src/components/library/data/filterUtils.
|
|
1
|
+
{"version":3,"file":"filterUtils.js","sources":["../../../../src/components/library/data/filterUtils.tsx"],"sourcesContent":["/**\n * Pure data utilities for filtering, sorting, and searching.\n * Stateless — combine with usePageFilters hook for state management.\n */\n\nexport type SortDirection = \"asc\" | \"desc\";\n\nexport interface DateRange {\n start?: Date | string;\n end?: Date | string;\n}\n\nexport type FilterType = \"search\" | \"select\" | \"toggle\" | \"dateRange\";\n\nexport interface BaseFilterDefinition {\n id: string;\n type: FilterType;\n defaultValue?: any;\n}\n\nexport interface SearchFilterDefinition extends BaseFilterDefinition {\n type: \"search\";\n keys: string[];\n}\n\nexport interface SelectFilterDefinition extends BaseFilterDefinition {\n type: \"select\";\n key: string;\n}\n\nexport interface ToggleFilterDefinition extends BaseFilterDefinition {\n type: \"toggle\";\n key: string;\n matchValue?: any;\n}\n\nexport interface DateRangeFilterDefinition extends BaseFilterDefinition {\n type: \"dateRange\";\n key: string;\n}\n\nexport type FilterDefinition =\n | SearchFilterDefinition\n | SelectFilterDefinition\n | ToggleFilterDefinition\n | DateRangeFilterDefinition;\n\nexport interface FilterValues {\n [key: string]: any;\n}\n\n/**\n * Text search across multiple keys.\n * @param {Array} data\n * @param {string} query — search string\n * @param {string[]} keys — object keys to search within\n * @returns {Array} filtered data\n */\nexport function filterBySearch<T>(data: T[], query: string, keys: string[] = []): T[] {\n if (!query || !query.trim()) return data;\n const q = query.trim().toLowerCase();\n return data.filter((row) =>\n keys.some((key) => {\n const val = (row as any)?.[key];\n return val != null && String(val).toLowerCase().includes(q);\n })\n );\n}\n\n/**\n * Filter rows where key matches a specific value.\n * Pass \"all\" or \"\" to skip filtering.\n * @param {Array} data\n * @param {string} key — object key to match\n * @param {*} value — value to match (exact, case-insensitive for strings)\n * @returns {Array}\n */\nexport function filterByValue<T>(data: T[], key: string, value: any): T[] {\n if (value == null || value === \"\" || value === \"all\") return data;\n return data.filter((row) => {\n const v = (row as any)?.[key];\n if (typeof v === \"string\" && typeof value === \"string\") {\n return v.toLowerCase() === value.toLowerCase();\n }\n return v === value;\n });\n}\n\n/**\n * Filter rows where a boolean condition is met.\n * When toggle is off, returns all data (no filtering).\n * @param {Array} data\n * @param {string} key — object key to check\n * @param {boolean} isActive — whether the toggle is on\n * @param {*} matchValue — value that key should equal when active (default: truthy check)\n * @returns {Array}\n */\nexport function filterByToggle<T>(data: T[], key: string, isActive: boolean, matchValue?: any): T[] {\n if (!isActive) return data;\n return data.filter((row) => {\n const v = (row as any)?.[key];\n if (matchValue !== undefined) return v === matchValue;\n return Boolean(v);\n });\n}\n\n/**\n * Filter rows where a date field falls within a range.\n * @param {Array} data\n * @param {string} key — object key containing date (ISO string or Date)\n * @param {{ start?: Date|string, end?: Date|string }} range\n * @returns {Array}\n */\nexport function filterByDateRange<T>(data: T[], key: string, range: DateRange | null): T[] {\n if (!range) return data;\n const start = range.start ? new Date(range.start) : null;\n const end = range.end ? new Date(range.end) : null;\n if (!start && !end) return data;\n\n return data.filter((row) => {\n const raw = (row as any)?.[key];\n if (raw == null) return false;\n const d = raw instanceof Date ? raw : new Date(raw);\n if (Number.isNaN(d.getTime())) return false;\n if (start && d < start) return false;\n if (end && d > end) return false;\n return true;\n });\n}\n\n/**\n * Sort data by a key.\n * @param {Array} data\n * @param {string} key — object key to sort by\n * @param {\"asc\"|\"desc\"} direction\n * @returns {Array} new sorted array\n */\nexport function sortByKey<T>(data: T[], key: string, direction: SortDirection = \"asc\"): T[] {\n if (!key) return data;\n const dir = direction === \"desc\" ? -1 : 1;\n return [...data].sort((a, b) => {\n const av = (a as any)?.[key];\n const bv = (b as any)?.[key];\n if (av == null && bv == null) return 0;\n if (av == null) return -1 * dir;\n if (bv == null) return 1 * dir;\n if (typeof av === \"number\" && typeof bv === \"number\") return (av - bv) * dir;\n return String(av).localeCompare(String(bv)) * dir;\n });\n}\n\n/**\n * Apply a set of filter definitions to data.\n * Each filter in `filters` has { id, type, key/keys } and `values` holds the current state.\n *\n * @param {Array} data\n * @param {Array} filters — filter definitions [{ id, type, key?, keys? }]\n * @param {Object} values — current filter values keyed by filter id\n * @returns {Array} filtered data\n */\nexport function applyFilters<T>(data: T[], filters: FilterDefinition[] = [], values: FilterValues = {}): T[] {\n let result = data;\n\n for (const filter of filters) {\n const val = values[filter.id];\n if (val === undefined || val === null) continue;\n\n switch (filter.type) {\n case \"search\":\n result = filterBySearch(result, val, filter.keys ?? []);\n break;\n case \"select\":\n result = filterByValue(result, filter.key, val);\n break;\n case \"toggle\":\n result = filterByToggle(result, filter.key, val, filter.matchValue);\n break;\n case \"dateRange\":\n result = filterByDateRange(result, filter.key, val);\n break;\n default:\n break;\n }\n }\n\n return result;\n}\n"],"names":["filterBySearch","data","query","keys","q","row","key","val","filterByValue","value","v","filterByToggle","isActive","matchValue","filterByDateRange","range","start","end","raw","d","sortByKey","direction","dir","a","b","av","bv","applyFilters","filters","values","result","filter"],"mappings":"AA0DO,SAASA,EAAkBC,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|
+
export type DataSourceValue<T> = T | (() => T);
|
|
2
|
+
export interface UseDataSourceOptions<T> {
|
|
3
|
+
sample: DataSourceValue<T>;
|
|
4
|
+
live: DataSourceValue<T>;
|
|
5
|
+
}
|
|
1
6
|
/**
|
|
2
7
|
* Select between sample and live data based on the global data mode.
|
|
3
8
|
*
|
|
@@ -20,7 +25,4 @@
|
|
|
20
25
|
* live: () => computeFromAPI(apiData),
|
|
21
26
|
* });
|
|
22
27
|
*/
|
|
23
|
-
export default function useDataSource({ sample, live }:
|
|
24
|
-
sample: any | (() => any);
|
|
25
|
-
live: any | (() => any);
|
|
26
|
-
}): any;
|
|
28
|
+
export default function useDataSource<T>({ sample, live }: UseDataSourceOptions<T>): T;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDataSource.js","sources":["../../../../src/components/library/data/useDataSource.
|
|
1
|
+
{"version":3,"file":"useDataSource.js","sources":["../../../../src/components/library/data/useDataSource.tsx"],"sourcesContent":["import { useMemo } from \"react\";\nimport { useDataMode } from \"./DataModeProvider\";\n\nexport type DataSourceValue<T> = T | (() => T);\n\nexport interface UseDataSourceOptions<T> {\n sample: DataSourceValue<T>;\n live: DataSourceValue<T>;\n}\n\n/**\n * Select between sample and live data based on the global data mode.\n *\n * Values can be plain data or functions (lazy-evaluated only when active).\n *\n * @param {{ sample: any | () => any, live: any | () => any }} sources\n * @returns {any} the resolved value for the active mode\n *\n * @example\n * // Static data\n * const incidents = useDataSource({\n * sample: sampleIncidents,\n * live: fetchedIncidents,\n * });\n *\n * @example\n * // Lazy — factory only runs when that mode is active\n * const metrics = useDataSource({\n * sample: () => generateSampleMetrics(),\n * live: () => computeFromAPI(apiData),\n * });\n */\nexport default function useDataSource<T>({ sample, live }: UseDataSourceOptions<T>): T {\n const { mode } = useDataMode();\n\n return useMemo(() => {\n const source = mode === \"sample\" ? sample : live;\n return typeof source === \"function\" ? (source as () => T)() : source;\n }, [mode, sample, live]);\n}\n"],"names":["useDataSource","sample","live","mode","useDataMode","useMemo","source"],"mappings":";;AAgCA,SAAwBA,EAAiB,EAAE,QAAAC,GAAQ,MAAAC,KAAoC;AACrF,QAAM,EAAE,MAAAC,EAAA,IAASC,EAAA;AAEjB,SAAOC,EAAQ,MAAM;AACnB,UAAMC,IAASH,MAAS,WAAWF,IAASC;AAC5C,WAAO,OAAOI,KAAW,aAAcA,EAAA,IAAuBA;AAAA,EAChE,GAAG,CAACH,GAAMF,GAAQC,CAAI,CAAC;AACzB;"}
|
|
@@ -1,3 +1,33 @@
|
|
|
1
|
+
import { FilterDefinition } from "./filterUtils";
|
|
2
|
+
export type SortDirection = "asc" | "desc";
|
|
3
|
+
export interface SortState {
|
|
4
|
+
key: string;
|
|
5
|
+
direction: SortDirection;
|
|
6
|
+
}
|
|
7
|
+
export interface DateRange {
|
|
8
|
+
start?: Date | string;
|
|
9
|
+
end?: Date | string;
|
|
10
|
+
}
|
|
11
|
+
export type FilterValue = string | boolean | DateRange | null;
|
|
12
|
+
export interface FilterValues {
|
|
13
|
+
[key: string]: FilterValue;
|
|
14
|
+
}
|
|
15
|
+
export interface UsePageFiltersOptions<T> {
|
|
16
|
+
data?: T[];
|
|
17
|
+
filters?: FilterDefinition[];
|
|
18
|
+
defaultSort?: SortState | null;
|
|
19
|
+
}
|
|
20
|
+
export interface UsePageFiltersReturn<T> {
|
|
21
|
+
values: FilterValues;
|
|
22
|
+
setFilter: (id: string, value: FilterValue) => void;
|
|
23
|
+
resetFilters: () => void;
|
|
24
|
+
sort: SortState | null;
|
|
25
|
+
setSort: (key: string | null, direction?: SortDirection) => void;
|
|
26
|
+
toggleSort: (key: string) => void;
|
|
27
|
+
filteredData: T[];
|
|
28
|
+
sortedData: T[];
|
|
29
|
+
activeFilterCount: number;
|
|
30
|
+
}
|
|
1
31
|
/**
|
|
2
32
|
* Hook for managing page-level filter and sort state.
|
|
3
33
|
*
|
|
@@ -18,8 +48,4 @@
|
|
|
18
48
|
* defaultSort: { key: "timestamp", direction: "desc" },
|
|
19
49
|
* });
|
|
20
50
|
*/
|
|
21
|
-
export default function usePageFilters({ data, filters, defaultSort }?:
|
|
22
|
-
data: any[];
|
|
23
|
-
filters: any[];
|
|
24
|
-
defaultSort: Object;
|
|
25
|
-
}): Object;
|
|
51
|
+
export default function usePageFilters<T = any>({ data, filters, defaultSort, }?: UsePageFiltersOptions<T>): UsePageFiltersReturn<T>;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { useMemo as r, useState as p, useCallback as a } from "react";
|
|
2
2
|
import { applyFilters as h, sortByKey as C } from "./filterUtils.js";
|
|
3
|
-
function b({
|
|
3
|
+
function b({
|
|
4
|
+
data: u = [],
|
|
5
|
+
filters: o = [],
|
|
6
|
+
defaultSort: y = null
|
|
7
|
+
} = {}) {
|
|
4
8
|
const c = r(() => {
|
|
5
9
|
const t = {};
|
|
6
10
|
for (const e of o)
|
|
@@ -24,7 +28,7 @@ function b({ data: u = [], filters: o = [], defaultSort: y = null } = {}) {
|
|
|
24
28
|
let t = 0;
|
|
25
29
|
for (const e of o) {
|
|
26
30
|
const s = l[e.id];
|
|
27
|
-
(e.type === "search" && s && s.trim() || e.type === "select" && s && s !== "all" || e.type === "toggle" && s || e.type === "dateRange" && s) && t++;
|
|
31
|
+
(e.type === "search" && s && typeof s == "string" && s.trim() || e.type === "select" && s && s !== "all" || e.type === "toggle" && s || e.type === "dateRange" && s) && t++;
|
|
28
32
|
}
|
|
29
33
|
return t;
|
|
30
34
|
}, [o, l]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePageFilters.js","sources":["../../../../src/components/library/data/usePageFilters.
|
|
1
|
+
{"version":3,"file":"usePageFilters.js","sources":["../../../../src/components/library/data/usePageFilters.tsx"],"sourcesContent":["import { useState, useMemo, useCallback } from \"react\";\nimport { applyFilters, sortByKey, FilterDefinition } from \"./filterUtils\";\n\nexport type SortDirection = \"asc\" | \"desc\";\n\nexport interface SortState {\n key: string;\n direction: SortDirection;\n}\n\nexport interface DateRange {\n start?: Date | string;\n end?: Date | string;\n}\n\nexport type FilterValue = string | boolean | DateRange | null;\n\nexport interface FilterValues {\n [key: string]: FilterValue;\n}\n\nexport interface UsePageFiltersOptions<T> {\n data?: T[];\n filters?: FilterDefinition[];\n defaultSort?: SortState | null;\n}\n\nexport interface UsePageFiltersReturn<T> {\n values: FilterValues;\n setFilter: (id: string, value: FilterValue) => void;\n resetFilters: () => void;\n sort: SortState | null;\n setSort: (key: string | null, direction?: SortDirection) => void;\n toggleSort: (key: string) => void;\n filteredData: T[];\n sortedData: T[];\n activeFilterCount: number;\n}\n\n/**\n * Hook for managing page-level filter and sort state.\n *\n * @param {Object} options\n * @param {Array} options.data — raw data array\n * @param {Array} options.filters — filter definitions [{ id, type, key?, keys?, defaultValue? }]\n * @param {Object} options.defaultSort — { key, direction } or null\n * @returns {Object} { values, setFilter, resetFilters, sort, setSort, filteredData, sortedData, activeFilterCount }\n *\n * @example\n * const { values, setFilter, resetFilters, sortedData } = usePageFilters({\n * data: incidents,\n * filters: [\n * { id: \"search\", type: \"search\", keys: [\"title\", \"description\"] },\n * { id: \"severity\", type: \"select\", key: \"severity\", defaultValue: \"all\" },\n * { id: \"active\", type: \"toggle\", key: \"resolved\", matchValue: false },\n * ],\n * defaultSort: { key: \"timestamp\", direction: \"desc\" },\n * });\n */\nexport default function usePageFilters<T = any>({\n data = [],\n filters = [],\n defaultSort = null,\n}: UsePageFiltersOptions<T> = {}): UsePageFiltersReturn<T> {\n const initialValues = useMemo(() => {\n const v: FilterValues = {};\n for (const f of filters) {\n if (f.defaultValue !== undefined) {\n v[f.id] = f.defaultValue;\n } else if (f.type === \"search\") {\n v[f.id] = \"\";\n } else if (f.type === \"select\") {\n v[f.id] = \"all\";\n } else if (f.type === \"toggle\") {\n v[f.id] = false;\n } else if (f.type === \"dateRange\") {\n v[f.id] = null;\n }\n }\n return v;\n }, [filters]);\n\n const [values, setValues] = useState<FilterValues>(initialValues);\n const [sort, setSortState] = useState<SortState | null>(defaultSort);\n\n const setFilter = useCallback((id: string, value: FilterValue) => {\n setValues((prev) => ({ ...prev, [id]: value }));\n }, []);\n\n const resetFilters = useCallback(() => {\n setValues(initialValues);\n }, [initialValues]);\n\n const setSort = useCallback((key: string | null, direction?: SortDirection) => {\n setSortState(key ? { key, direction: direction ?? \"asc\" } : null);\n }, []);\n\n const toggleSort = useCallback((key: string) => {\n setSortState((prev) => {\n if (prev?.key !== key) return { key, direction: \"asc\" };\n if (prev.direction === \"asc\") return { key, direction: \"desc\" };\n return null;\n });\n }, []);\n\n const filteredData = useMemo(\n () => applyFilters(data, filters, values),\n [data, filters, values]\n );\n\n const sortedData = useMemo(\n () => (sort ? sortByKey(filteredData, sort.key, sort.direction) : filteredData),\n [filteredData, sort]\n );\n\n const activeFilterCount = useMemo(() => {\n let count = 0;\n for (const f of filters) {\n const v = values[f.id];\n if (f.type === \"search\" && v && typeof v === \"string\" && v.trim()) count++;\n else if (f.type === \"select\" && v && v !== \"all\") count++;\n else if (f.type === \"toggle\" && v) count++;\n else if (f.type === \"dateRange\" && v) count++;\n }\n return count;\n }, [filters, values]);\n\n return {\n values,\n setFilter,\n resetFilters,\n sort,\n setSort,\n toggleSort,\n filteredData,\n sortedData,\n activeFilterCount,\n };\n}\n"],"names":["usePageFilters","data","filters","defaultSort","initialValues","useMemo","v","f","values","setValues","useState","sort","setSortState","setFilter","useCallback","id","value","prev","resetFilters","setSort","key","direction","toggleSort","filteredData","applyFilters","sortedData","sortByKey","activeFilterCount","count"],"mappings":";;AA2DA,SAAwBA,EAAwB;AAAA,EAC9C,MAAAC,IAAO,CAAA;AAAA,EACP,SAAAC,IAAU,CAAA;AAAA,EACV,aAAAC,IAAc;AAChB,IAA8B,IAA6B;AACzD,QAAMC,IAAgBC,EAAQ,MAAM;AAClC,UAAMC,IAAkB,CAAA;AACxB,eAAWC,KAAKL;AACd,MAAIK,EAAE,iBAAiB,SACrBD,EAAEC,EAAE,EAAE,IAAIA,EAAE,eACHA,EAAE,SAAS,W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AQ;AACZ,eAAWrB,KAAKL,GAAS;AACvB,YAAMI,IAAIE,EAAOD,EAAE,EAAE;AACrB,OAAIA,EAAE,SAAS,YAAYD,KAAK,OAAOA,KAAM,YAAYA,EAAE,KAAA,KAClDC,EAAE,SAAS,YAAYD,KAAKA,MAAM,SAClCC,EAAE,SAAS,YAAYD,KACvBC,EAAE,SAAS,eAAeD,MAAGsB;AAAA,IACxC;AACA,WAAOA;AAAA,EACT,GAAG,CAAC1B,GAASM,CAAM,CAAC;AAEpB,SAAO;AAAA,IACL,QAAAA;AAAA,IACA,WAAAK;AAAA,IACA,cAAAK;AAAA,IACA,MAAAP;AAAA,IACA,SAAAQ;AAAA,IACA,YAAAG;AAAA,IACA,cAAAC;AAAA,IACA,YAAAE;AAAA,IACA,mBAAAE;AAAA,EAAA;AAEJ;"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export { default as AppThemeProvider, useThemeMode } from "./theme/AppThemeProvider";
|
|
1
3
|
export { default as UIButton } from "./ui/UIButton";
|
|
2
4
|
export { default as UIInput } from "./ui/UIInput";
|
|
3
5
|
export { default as UIText } from "./ui/Text";
|
|
@@ -9,7 +11,14 @@ export { default as Spinner } from "./ui/Spinner";
|
|
|
9
11
|
export { default as Label } from "./ui/Label";
|
|
10
12
|
export { default as Checkbox } from "./ui/Checkbox";
|
|
11
13
|
export { default as FieldGroup } from "./ui/FieldGroup";
|
|
14
|
+
export { default as UICard, Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter } from "./ui/Card";
|
|
15
|
+
export { default as Alert, AlertTitle, AlertDescription, AlertAction } from "./ui/Alert";
|
|
16
|
+
export { default as HeroUIDialog, Dialog, DialogTrigger, DialogPortal, DialogClose, DialogOverlay, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription } from "./heroui/Dialog";
|
|
17
|
+
export { default as HeroUIField, Field, FieldLabel, FieldDescription, FieldError } from "./heroui/Field";
|
|
12
18
|
export { default as HeroUICollapsible } from "./heroui/Collapsible";
|
|
19
|
+
export { Collapsible, CollapsibleTrigger, CollapsibleContent } from "./ui/Collapsible";
|
|
20
|
+
export { default as HeroUIPopover, Popover, PopoverTrigger, PopoverContent } from "./heroui/Popover";
|
|
21
|
+
export { default as HeroUIDatePicker, DatePicker, DatePickerTrigger, DatePickerContent, DatePickerCalendar, DatePickerRangeTrigger } from "./heroui/DatePicker";
|
|
13
22
|
export { default as BaseCard } from "./cards/BaseCard";
|
|
14
23
|
export { default as ChartCard } from "./cards/ChartCard";
|
|
15
24
|
export { default as ListCard } from "./cards/ListCard";
|
|
@@ -28,91 +37,119 @@ export { D3ChartTemplates } from "./charts/D3ChartTemplates";
|
|
|
28
37
|
export { default as GeoMap } from "./charts/GeoMap";
|
|
29
38
|
export { default as PageContainer } from "./layout/PageContainer";
|
|
30
39
|
export { default as CardSkeleton } from "./skeletons/CardSkeleton";
|
|
40
|
+
export { FormModal, FormRenderer, FormSection, FormField, useFormState } from "./forms";
|
|
41
|
+
export { FilterBar, SearchFilter, SelectFilter, ToggleFilter } from "./filters";
|
|
42
|
+
export { default as DataModeProvider, useDataMode } from "./data/DataModeProvider";
|
|
31
43
|
export { default as DataModeToggle } from "./data/DataModeToggle";
|
|
32
44
|
export { default as useDataSource } from "./data/useDataSource";
|
|
33
45
|
export { default as usePageFilters } from "./data/usePageFilters";
|
|
46
|
+
export { filterBySearch, filterByValue, filterByToggle, filterByDateRange, sortByKey, applyFilters, } from "./data/filterUtils";
|
|
47
|
+
export { ChatPanel, ChatBar, ChatMessageList, ChatMessage, ChatInput, ChatTypingIndicator, ChatSuggestions, ChatToolCall, ChatWelcome, useChatState, } from "./chat";
|
|
48
|
+
export { default as HeroUIButton, Button } from "./heroui/Button";
|
|
34
49
|
export { default as HeroUIInput } from "./heroui/Input";
|
|
35
50
|
export { default as HeroUICard } from "./heroui/Card";
|
|
36
51
|
export { default as HeroUIToggle } from "./heroui/Toggle";
|
|
37
52
|
export { default as HeroUITabs } from "./heroui/Tabs";
|
|
38
53
|
export { default as HeroUIAccordion } from "./heroui/Accordion";
|
|
39
|
-
export
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}
|
|
54
|
+
export { default as HeroUIBreadcrumbs, Breadcrumbs } from "./heroui/Breadcrumbs";
|
|
55
|
+
export { default as HeroUISeparator, Separator } from "./heroui/Separator";
|
|
56
|
+
export { default as HeroUIPagination, Pagination } from "./heroui/Pagination";
|
|
57
|
+
export declare const Breadcrumb: ({ children, ...props }: {
|
|
58
|
+
children?: React.ReactNode;
|
|
59
|
+
[key: string]: any;
|
|
60
|
+
}) => React.DetailedReactHTMLElement<{
|
|
43
61
|
'aria-label': string;
|
|
44
62
|
}, HTMLElement>;
|
|
45
|
-
export
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
})
|
|
63
|
+
export declare const BreadcrumbList: ({ children, ...props }: {
|
|
64
|
+
children?: React.ReactNode;
|
|
65
|
+
[key: string]: any;
|
|
66
|
+
}) => React.DetailedReactHTMLElement<{
|
|
49
67
|
className: string;
|
|
50
68
|
}, HTMLElement>;
|
|
51
|
-
export
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
})
|
|
69
|
+
export declare const BreadcrumbItem: ({ children, ...props }: {
|
|
70
|
+
children?: React.ReactNode;
|
|
71
|
+
[key: string]: any;
|
|
72
|
+
}) => React.DetailedReactHTMLElement<{
|
|
55
73
|
className: string;
|
|
56
74
|
}, HTMLElement>;
|
|
57
|
-
export
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
})
|
|
63
|
-
[
|
|
75
|
+
export declare const BreadcrumbLink: ({ href, children, asChild, ...props }: {
|
|
76
|
+
href?: string;
|
|
77
|
+
children?: React.ReactNode;
|
|
78
|
+
asChild?: boolean;
|
|
79
|
+
[key: string]: any;
|
|
80
|
+
}) => React.DetailedReactHTMLElement<{
|
|
81
|
+
[key: string]: any;
|
|
64
82
|
}, HTMLElement> | React.DetailedReactHTMLElement<{
|
|
65
|
-
href:
|
|
83
|
+
href: string | undefined;
|
|
66
84
|
className: string;
|
|
67
85
|
}, HTMLElement>;
|
|
68
|
-
export
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
})
|
|
86
|
+
export declare const BreadcrumbPage: ({ children, ...props }: {
|
|
87
|
+
children?: React.ReactNode;
|
|
88
|
+
[key: string]: any;
|
|
89
|
+
}) => React.DetailedReactHTMLElement<{
|
|
72
90
|
role: "link";
|
|
73
91
|
'aria-disabled': "true";
|
|
74
92
|
'aria-current': "page";
|
|
75
93
|
className: string;
|
|
76
94
|
}, HTMLElement>;
|
|
77
|
-
export
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
})
|
|
95
|
+
export declare const BreadcrumbSeparator: ({ children, ...props }: {
|
|
96
|
+
children?: React.ReactNode;
|
|
97
|
+
[key: string]: any;
|
|
98
|
+
}) => React.DetailedReactHTMLElement<{
|
|
99
|
+
role: "presentation";
|
|
100
|
+
'aria-hidden': "true";
|
|
101
|
+
}, HTMLElement>;
|
|
102
|
+
export declare const BreadcrumbEllipsis: (props: {
|
|
103
|
+
[key: string]: any;
|
|
104
|
+
}) => React.DetailedReactHTMLElement<{
|
|
81
105
|
role: "presentation";
|
|
82
106
|
'aria-hidden': "true";
|
|
83
107
|
}, HTMLElement>;
|
|
84
|
-
export
|
|
85
|
-
|
|
86
|
-
[
|
|
87
|
-
|
|
88
|
-
}): React.DetailedReactHTMLElement<{
|
|
108
|
+
export declare const PaginationContent: ({ children, ...props }: {
|
|
109
|
+
children?: React.ReactNode;
|
|
110
|
+
[key: string]: any;
|
|
111
|
+
}) => React.DetailedReactHTMLElement<{
|
|
89
112
|
className: string;
|
|
90
113
|
}, HTMLElement>;
|
|
91
|
-
export
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
})
|
|
95
|
-
[
|
|
114
|
+
export declare const PaginationItem: ({ children, ...props }: {
|
|
115
|
+
children?: React.ReactNode;
|
|
116
|
+
[key: string]: any;
|
|
117
|
+
}) => React.DetailedReactHTMLElement<{
|
|
118
|
+
[key: string]: any;
|
|
96
119
|
}, HTMLElement>;
|
|
97
|
-
export
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
})
|
|
103
|
-
href:
|
|
120
|
+
export declare const PaginationLink: ({ href, isActive, children, ...props }: {
|
|
121
|
+
href?: string;
|
|
122
|
+
isActive?: boolean;
|
|
123
|
+
children?: React.ReactNode;
|
|
124
|
+
[key: string]: any;
|
|
125
|
+
}) => React.DetailedReactHTMLElement<{
|
|
126
|
+
href: string | undefined;
|
|
104
127
|
'aria-current': "page" | undefined;
|
|
105
128
|
className: string;
|
|
106
129
|
}, HTMLElement>;
|
|
107
|
-
export
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
})
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
130
|
+
export declare const PaginationPrevious: ({ href, ...props }: {
|
|
131
|
+
href?: string;
|
|
132
|
+
[key: string]: any;
|
|
133
|
+
}) => React.FunctionComponentElement<{
|
|
134
|
+
[key: string]: any;
|
|
135
|
+
href?: string;
|
|
136
|
+
isActive?: boolean;
|
|
137
|
+
children?: React.ReactNode;
|
|
138
|
+
}>;
|
|
139
|
+
export declare const PaginationNext: ({ href, ...props }: {
|
|
140
|
+
href?: string;
|
|
141
|
+
[key: string]: any;
|
|
142
|
+
}) => React.FunctionComponentElement<{
|
|
143
|
+
[key: string]: any;
|
|
144
|
+
href?: string;
|
|
145
|
+
isActive?: boolean;
|
|
146
|
+
children?: React.ReactNode;
|
|
147
|
+
}>;
|
|
148
|
+
export declare const PaginationEllipsis: (props: {
|
|
149
|
+
[key: string]: any;
|
|
150
|
+
}) => React.DetailedReactHTMLElement<{
|
|
151
|
+
'aria-hidden': true;
|
|
152
|
+
}, HTMLElement>;
|
|
116
153
|
export { default as HeroUIDrawer } from "./heroui/Drawer";
|
|
117
154
|
export { default as HeroUIModal } from "./heroui/Modal";
|
|
118
155
|
export { default as HeroUIDropdown } from "./heroui/Dropdown";
|
|
@@ -123,26 +160,8 @@ export { default as HeroUIBadge } from "./heroui/Badge";
|
|
|
123
160
|
export { default as HeroUIProgressBar } from "./heroui/ProgressBar";
|
|
124
161
|
export { default as HeroUIProgressCircle } from "./heroui/ProgressCircle";
|
|
125
162
|
export { default as HeroUIMeter } from "./heroui/Meter";
|
|
126
|
-
export { default as HeroUISelect } from "./heroui/Select";
|
|
127
|
-
import React from 'react';
|
|
128
|
-
export { default as AppThemeProvider, useThemeMode } from "./theme/AppThemeProvider";
|
|
129
|
-
export { default as UICard, Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter } from "./ui/Card";
|
|
130
|
-
export { default as Alert, AlertTitle, AlertDescription, AlertAction } from "./ui/Alert";
|
|
131
|
-
export { default as HeroUIDialog, Dialog, DialogTrigger, DialogPortal, DialogClose, DialogOverlay, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription } from "./heroui/Dialog";
|
|
132
|
-
export { default as HeroUIField, Field, FieldLabel, FieldDescription, FieldError } from "./heroui/Field";
|
|
133
|
-
export { Collapsible, CollapsibleTrigger, CollapsibleContent } from "./ui/Collapsible";
|
|
134
|
-
export { default as HeroUIPopover, Popover, PopoverTrigger, PopoverContent } from "./heroui/Popover";
|
|
135
|
-
export { default as HeroUIDatePicker, DatePicker, DatePickerTrigger, DatePickerContent, DatePickerCalendar, DatePickerRangeTrigger } from "./heroui/DatePicker";
|
|
136
|
-
export { FormModal, FormRenderer, FormSection, FormField, useFormState } from "./forms";
|
|
137
|
-
export { FilterBar, SearchFilter, SelectFilter, ToggleFilter } from "./filters";
|
|
138
|
-
export { default as DataModeProvider, useDataMode } from "./data/DataModeProvider";
|
|
139
|
-
export { filterBySearch, filterByValue, filterByToggle, filterByDateRange, sortByKey, applyFilters } from "./data/filterUtils";
|
|
140
|
-
export { ChatPanel, ChatBar, ChatMessageList, ChatMessage, ChatInput, ChatTypingIndicator, ChatSuggestions, ChatToolCall, ChatWelcome, useChatState } from "./chat";
|
|
141
|
-
export { default as HeroUIButton, Button } from "./heroui/Button";
|
|
142
|
-
export { default as HeroUIBreadcrumbs, Breadcrumbs } from "./heroui/Breadcrumbs";
|
|
143
|
-
export { default as HeroUISeparator, Separator } from "./heroui/Separator";
|
|
144
|
-
export { default as HeroUIPagination, Pagination } from "./heroui/Pagination";
|
|
145
163
|
export { default as HeroUISkeleton, Skeleton } from "./heroui/Skeleton";
|
|
164
|
+
export { default as HeroUISelect } from "./heroui/Select";
|
|
146
165
|
export { Select, SelectTrigger, SelectValue, SelectContent, SelectItem } from "./ui/Select";
|
|
147
166
|
export { default as HeroUIKbd, Kbd } from "./heroui/Kbd";
|
|
148
167
|
export { default as HeroUIScrollShadow, ScrollShadow } from "./heroui/ScrollShadow";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import a from "react";
|
|
2
|
-
import { default as
|
|
1
|
+
import * as a from "react";
|
|
2
|
+
import { default as w, useThemeMode as S } from "./theme/AppThemeProvider.js";
|
|
3
3
|
import "react/jsx-runtime";
|
|
4
|
-
import { Dialog as
|
|
4
|
+
import { Dialog as T, DialogClose as y, DialogContent as C, DialogDescription as I, DialogFooter as L, DialogHeader as H, DialogOverlay as j, DialogPortal as F, DialogTitle as G, DialogTrigger as K, default as O } from "./heroui/Dialog.js";
|
|
5
5
|
import { Breadcrumbs as U, Kbd as $, Pagination as q, ScrollShadow as z, Separator as A, Skeleton as J } from "@heroui/react";
|
|
6
6
|
import "framer-motion";
|
|
7
7
|
import "@heroicons/react/24/outline";
|
|
@@ -10,24 +10,24 @@ import { default as V } from "./charts/GeoMap.js";
|
|
|
10
10
|
import "react-dom";
|
|
11
11
|
import { default as X, useDataMode as Y } from "./data/DataModeProvider.js";
|
|
12
12
|
import "@heroicons/react/24/solid";
|
|
13
|
-
const
|
|
13
|
+
const p = ({ children: e, ...t }) => a.createElement("nav", { "aria-label": "breadcrumb", ...t }, e), g = ({ children: e, ...t }) => a.createElement("ol", { className: "flex flex-wrap items-center gap-1.5 break-words text-sm text-slate-500 dark:text-slate-400", ...t }, e), u = ({ children: e, ...t }) => a.createElement("li", { className: "inline-flex items-center gap-1.5", ...t }, e), x = ({ href: e, children: t, asChild: o, ...r }) => o ? a.createElement("span", r, t) : a.createElement("a", { href: e, className: "transition-colors hover:text-slate-900 dark:hover:text-slate-50", ...r }, t), f = ({ children: e, ...t }) => a.createElement("span", { role: "link", "aria-disabled": "true", "aria-current": "page", className: "font-normal text-slate-900 dark:text-slate-50", ...t }, e), b = ({ children: e, ...t }) => a.createElement("li", { role: "presentation", "aria-hidden": "true", ...t }, e ?? "/"), E = (e) => a.createElement("span", { role: "presentation", "aria-hidden": "true", ...e }, "..."), D = ({ children: e, ...t }) => a.createElement("ul", { className: "flex flex-row items-center gap-1", ...t }, e), P = ({ children: e, ...t }) => a.createElement("li", t, e), n = ({ href: e, isActive: t, children: o, ...r }) => a.createElement("a", { href: e, "aria-current": t ? "page" : void 0, className: `inline-flex items-center justify-center rounded-md text-sm font-medium h-9 min-w-9 px-4 py-2 ${t ? "bg-slate-900 text-white dark:bg-slate-50 dark:text-slate-900" : "hover:bg-slate-100 dark:hover:bg-slate-800"}`, ...r }, o), h = ({ href: e, ...t }) => a.createElement(n, { href: e, ...t }, "Previous"), k = ({ href: e, ...t }) => a.createElement(n, { href: e, ...t }, "Next"), v = (e) => a.createElement("span", { "aria-hidden": !0, ...e }, "...");
|
|
14
14
|
export {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
15
|
+
w as AppThemeProvider,
|
|
16
|
+
p as Breadcrumb,
|
|
17
|
+
E as BreadcrumbEllipsis,
|
|
18
|
+
u as BreadcrumbItem,
|
|
19
|
+
x as BreadcrumbLink,
|
|
20
|
+
g as BreadcrumbList,
|
|
21
|
+
f as BreadcrumbPage,
|
|
22
|
+
b as BreadcrumbSeparator,
|
|
23
23
|
U as Breadcrumbs,
|
|
24
24
|
X as DataModeProvider,
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
25
|
+
T as Dialog,
|
|
26
|
+
y as DialogClose,
|
|
27
|
+
C as DialogContent,
|
|
28
|
+
I as DialogDescription,
|
|
29
|
+
L as DialogFooter,
|
|
30
|
+
H as DialogHeader,
|
|
31
31
|
j as DialogOverlay,
|
|
32
32
|
F as DialogPortal,
|
|
33
33
|
G as DialogTitle,
|
|
@@ -36,16 +36,16 @@ export {
|
|
|
36
36
|
O as HeroUIDialog,
|
|
37
37
|
$ as Kbd,
|
|
38
38
|
q as Pagination,
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
39
|
+
D as PaginationContent,
|
|
40
|
+
v as PaginationEllipsis,
|
|
41
|
+
P as PaginationItem,
|
|
42
|
+
n as PaginationLink,
|
|
43
|
+
k as PaginationNext,
|
|
44
|
+
h as PaginationPrevious,
|
|
45
45
|
z as ScrollShadow,
|
|
46
46
|
A as Separator,
|
|
47
47
|
J as Skeleton,
|
|
48
48
|
Y as useDataMode,
|
|
49
|
-
|
|
49
|
+
S as useThemeMode
|
|
50
50
|
};
|
|
51
51
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/library/index.jsx"],"sourcesContent":["import React from 'react';\n\nexport { default as AppThemeProvider, useThemeMode } from \"./theme/AppThemeProvider\";\n\n// UI primitives\nexport { default as UIButton } from \"./ui/UIButton\";\nexport { default as UIInput } from \"./ui/UIInput\";\nexport { default as UIText } from \"./ui/Text\";\nexport { default as UIContainer } from \"./ui/Container\";\nexport { default as UIChip } from \"./ui/Chip\";\nexport { default as Avatar } from \"./ui/Avatar\";\nexport { default as EmptyState } from \"./ui/EmptyState\";\nexport { default as Spinner } from \"./ui/Spinner\";\nexport { default as Label } from \"./ui/Label\";\nexport { default as Checkbox } from \"./ui/Checkbox\";\nexport { default as FieldGroup } from \"./ui/FieldGroup\";\n\n// shadcn-compatible Card with subcomponents\nexport { default as UICard, Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter } from \"./ui/Card\";\n\n// shadcn-compatible Alert with subcomponents\nexport { default as Alert, AlertTitle, AlertDescription, AlertAction } from \"./ui/Alert\";\n\n// shadcn-compatible components from heroui/ (HeroUI-based)\nexport { default as HeroUIDialog, Dialog, DialogTrigger, DialogPortal, DialogClose, DialogOverlay, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription } from \"./heroui/Dialog\";\nexport { default as HeroUIField, Field, FieldLabel, FieldDescription, FieldError } from \"./heroui/Field\";\nexport { default as HeroUICollapsible } from \"./heroui/Collapsible\";\nexport { Collapsible, CollapsibleTrigger, CollapsibleContent } from \"./ui/Collapsible\";\nexport { default as HeroUIPopover, Popover, PopoverTrigger, PopoverContent } from \"./heroui/Popover\";\nexport { default as HeroUIDatePicker, DatePicker, DatePickerTrigger, DatePickerContent, DatePickerCalendar, DatePickerRangeTrigger } from \"./heroui/DatePicker\";\n\n// Cards\nexport { default as BaseCard } from \"./cards/BaseCard\";\nexport { default as ChartCard } from \"./cards/ChartCard\";\nexport { default as ListCard } from \"./cards/ListCard\";\nexport { default as MetricCard } from \"./cards/MetricCard\";\nexport { default as SectionCard } from \"./cards/SectionCard\";\nexport { default as StatusCard } from \"./cards/StatusCard\";\nexport { default as TableCard } from \"./cards/TableCard\";\nexport { default as WidgetCard } from \"./cards/WidgetCard\";\nexport { default as FeedPanel } from \"./cards/FeedPanel\";\nexport { default as ActivityCard } from \"./cards/ActivityCard\";\nexport { default as MetricsStrip } from \"./cards/MetricsStrip\";\nexport { default as CalloutCard } from \"./cards/CalloutCard\";\nexport { default as ActionList } from \"./cards/ActionList\";\n\n// Charts\nexport { default as D3Chart } from \"./charts/D3Chart\";\nexport { D3ChartTemplates } from \"./charts/D3ChartTemplates\";\nexport { default as GeoMap } from \"./charts/GeoMap\";\n\n// Layout\nexport { default as PageContainer } from \"./layout/PageContainer\";\n\n// Skeletons\nexport { default as CardSkeleton } from \"./skeletons/CardSkeleton\";\n\n// Forms\nexport { FormModal, FormRenderer, FormSection, FormField, useFormState } from \"./forms\";\n\n// Filters\nexport { FilterBar, SearchFilter, SelectFilter, ToggleFilter } from \"./filters\";\n\n// Data mode\nexport { default as DataModeProvider, useDataMode } from \"./data/DataModeProvider\";\nexport { default as DataModeToggle } from \"./data/DataModeToggle\";\nexport { default as useDataSource } from \"./data/useDataSource\";\n\n// Data utilities\nexport { default as usePageFilters } from \"./data/usePageFilters\";\nexport {\n filterBySearch,\n filterByValue,\n filterByToggle,\n filterByDateRange,\n sortByKey,\n applyFilters,\n} from \"./data/filterUtils\";\n\n// Chat / AI agent\nexport {\n ChatPanel,\n ChatBar,\n ChatMessageList,\n ChatMessage,\n ChatInput,\n ChatTypingIndicator,\n ChatSuggestions,\n ChatToolCall,\n ChatWelcome,\n useChatState,\n} from \"./chat\";\n\n// HeroUI wrappers — existing\nexport { default as HeroUIButton, Button } from \"./heroui/Button\";\nexport { default as HeroUIInput } from \"./heroui/Input\";\nexport { default as HeroUICard } from \"./heroui/Card\";\nexport { default as HeroUIToggle } from \"./heroui/Toggle\";\n\n// HeroUI wrappers — navigation & layout\nexport { default as HeroUITabs } from \"./heroui/Tabs\";\nexport { default as HeroUIAccordion } from \"./heroui/Accordion\";\nexport { default as HeroUIBreadcrumbs, Breadcrumbs } from \"./heroui/Breadcrumbs\";\nexport { default as HeroUISeparator, Separator } from \"./heroui/Separator\";\nexport { default as HeroUIPagination, Pagination } from \"./heroui/Pagination\";\n\n// Breadcrumb subcomponents for shadcn compatibility\nexport const Breadcrumb = ({ children, ...props }) => React.createElement('nav', { 'aria-label': 'breadcrumb', ...props }, children);\nexport const BreadcrumbList = ({ children, ...props }) => React.createElement('ol', { className: 'flex flex-wrap items-center gap-1.5 break-words text-sm text-slate-500 dark:text-slate-400', ...props }, children);\nexport const BreadcrumbItem = ({ children, ...props }) => React.createElement('li', { className: 'inline-flex items-center gap-1.5', ...props }, children);\nexport const BreadcrumbLink = ({ href, children, asChild, ...props }) => asChild ? React.createElement('span', props, children) : React.createElement('a', { href, className: 'transition-colors hover:text-slate-900 dark:hover:text-slate-50', ...props }, children);\nexport const BreadcrumbPage = ({ children, ...props }) => React.createElement('span', { role: 'link', 'aria-disabled': 'true', 'aria-current': 'page', className: 'font-normal text-slate-900 dark:text-slate-50', ...props }, children);\nexport const BreadcrumbSeparator = ({ children, ...props }) => React.createElement('li', { role: 'presentation', 'aria-hidden': 'true', ...props }, children ?? '/');\nexport const BreadcrumbEllipsis = (props) => React.createElement('span', { role: 'presentation', 'aria-hidden': 'true', ...props }, '...');\n\n// Pagination subcomponents for shadcn compatibility\nexport const PaginationContent = ({ children, ...props }) => React.createElement('ul', { className: 'flex flex-row items-center gap-1', ...props }, children);\nexport const PaginationItem = ({ children, ...props }) => React.createElement('li', props, children);\nexport const PaginationLink = ({ href, isActive, children, ...props }) => React.createElement('a', { href, 'aria-current': isActive ? 'page' : undefined, className: `inline-flex items-center justify-center rounded-md text-sm font-medium h-9 min-w-9 px-4 py-2 ${isActive ? 'bg-slate-900 text-white dark:bg-slate-50 dark:text-slate-900' : 'hover:bg-slate-100 dark:hover:bg-slate-800'}`, ...props }, children);\nexport const PaginationPrevious = ({ href, ...props }) => React.createElement(PaginationLink, { href, ...props }, 'Previous');\nexport const PaginationNext = ({ href, ...props }) => React.createElement(PaginationLink, { href, ...props }, 'Next');\nexport const PaginationEllipsis = (props) => React.createElement('span', { 'aria-hidden': true, ...props }, '...');\n\n// HeroUI wrappers — overlays\nexport { default as HeroUIDrawer } from \"./heroui/Drawer\";\nexport { default as HeroUIModal } from \"./heroui/Modal\";\nexport { default as HeroUIDropdown } from \"./heroui/Dropdown\";\nexport { default as HeroUITooltip } from \"./heroui/Tooltip\";\nexport { default as HeroUIToast } from \"./heroui/Toast\";\n\n// HeroUI wrappers — feedback\nexport { default as HeroUIAlert } from \"./heroui/Alert\";\nexport { default as HeroUIBadge } from \"./heroui/Badge\";\nexport { default as HeroUIProgressBar } from \"./heroui/ProgressBar\";\nexport { default as HeroUIProgressCircle } from \"./heroui/ProgressCircle\";\nexport { default as HeroUIMeter } from \"./heroui/Meter\";\nexport { default as HeroUISkeleton, Skeleton } from \"./heroui/Skeleton\";\n\n// HeroUI wrappers — pickers & forms\nexport { default as HeroUISelect } from \"./heroui/Select\";\n\n// Re-export full Radix Select suite from ui/Select for shadcn compatibility\nexport { Select, SelectTrigger, SelectValue, SelectContent, SelectItem } from \"./ui/Select\";\n\n// HeroUI wrappers — utilities\nexport { default as HeroUIKbd, Kbd } from \"./heroui/Kbd\";\nexport { default as HeroUIScrollShadow, ScrollShadow } from \"./heroui/ScrollShadow\";\n"],"names":["Breadcrumb","children","props","React","BreadcrumbList","BreadcrumbItem","BreadcrumbLink","href","asChild","BreadcrumbPage","BreadcrumbSeparator","BreadcrumbEllipsis","PaginationContent","PaginationItem","PaginationLink","isActive","PaginationPrevious","PaginationNext","PaginationEllipsis"],"mappings":";;;;;;;;;;;;AA2GO,MAAMA,IAAa,CAAC,EAAE,UAAAC,GAAU,GAAGC,QAAYC,EAAM,cAAc,OAAO,EAAE,cAAc,cAAc,GAAGD,EAAA,GAASD,CAAQ,GACtHG,IAAiB,CAAC,EAAE,UAAAH,GAAU,GAAGC,QAAYC,EAAM,cAAc,MAAM,EAAE,WAAW,8FAA8F,GAAGD,EAAA,GAASD,CAAQ,GACtMI,IAAiB,CAAC,EAAE,UAAAJ,GAAU,GAAGC,QAAYC,EAAM,cAAc,MAAM,EAAE,WAAW,oCAAoC,GAAGD,EAAA,GAASD,CAAQ,GAC5IK,IAAiB,CAAC,EAAE,MAAAC,GAAM,UAAAN,GAAU,SAAAO,GAAS,GAAGN,EAAA,MAAYM,IAAUL,EAAM,cAAc,QAAQD,GAAOD,CAAQ,IAAIE,EAAM,cAAc,KAAK,EAAE,MAAAI,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AAGD,EAAA,GAAS,KAAK;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/library/index.ts"],"sourcesContent":["import * as React from 'react';\n\nexport { default as AppThemeProvider, useThemeMode } from \"./theme/AppThemeProvider\";\n\n// UI primitives\nexport { default as UIButton } from \"./ui/UIButton\";\nexport { default as UIInput } from \"./ui/UIInput\";\nexport { default as UIText } from \"./ui/Text\";\nexport { default as UIContainer } from \"./ui/Container\";\nexport { default as UIChip } from \"./ui/Chip\";\nexport { default as Avatar } from \"./ui/Avatar\";\nexport { default as EmptyState } from \"./ui/EmptyState\";\nexport { default as Spinner } from \"./ui/Spinner\";\nexport { default as Label } from \"./ui/Label\";\nexport { default as Checkbox } from \"./ui/Checkbox\";\nexport { default as FieldGroup } from \"./ui/FieldGroup\";\n\n// shadcn-compatible Card with subcomponents\nexport { default as UICard, Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter } from \"./ui/Card\";\n\n// shadcn-compatible Alert with subcomponents\nexport { default as Alert, AlertTitle, AlertDescription, AlertAction } from \"./ui/Alert\";\n\n// shadcn-compatible components from heroui/ (HeroUI-based)\nexport { default as HeroUIDialog, Dialog, DialogTrigger, DialogPortal, DialogClose, DialogOverlay, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription } from \"./heroui/Dialog\";\nexport { default as HeroUIField, Field, FieldLabel, FieldDescription, FieldError } from \"./heroui/Field\";\nexport { default as HeroUICollapsible } from \"./heroui/Collapsible\";\nexport { Collapsible, CollapsibleTrigger, CollapsibleContent } from \"./ui/Collapsible\";\nexport { default as HeroUIPopover, Popover, PopoverTrigger, PopoverContent } from \"./heroui/Popover\";\nexport { default as HeroUIDatePicker, DatePicker, DatePickerTrigger, DatePickerContent, DatePickerCalendar, DatePickerRangeTrigger } from \"./heroui/DatePicker\";\n\n// Cards\nexport { default as BaseCard } from \"./cards/BaseCard\";\nexport { default as ChartCard } from \"./cards/ChartCard\";\nexport { default as ListCard } from \"./cards/ListCard\";\nexport { default as MetricCard } from \"./cards/MetricCard\";\nexport { default as SectionCard } from \"./cards/SectionCard\";\nexport { default as StatusCard } from \"./cards/StatusCard\";\nexport { default as TableCard } from \"./cards/TableCard\";\nexport { default as WidgetCard } from \"./cards/WidgetCard\";\nexport { default as FeedPanel } from \"./cards/FeedPanel\";\nexport { default as ActivityCard } from \"./cards/ActivityCard\";\nexport { default as MetricsStrip } from \"./cards/MetricsStrip\";\nexport { default as CalloutCard } from \"./cards/CalloutCard\";\nexport { default as ActionList } from \"./cards/ActionList\";\n\n// Charts\nexport { default as D3Chart } from \"./charts/D3Chart\";\nexport { D3ChartTemplates } from \"./charts/D3ChartTemplates\";\nexport { default as GeoMap } from \"./charts/GeoMap\";\n\n// Layout\nexport { default as PageContainer } from \"./layout/PageContainer\";\n\n// Skeletons\nexport { default as CardSkeleton } from \"./skeletons/CardSkeleton\";\n\n// Forms\nexport { FormModal, FormRenderer, FormSection, FormField, useFormState } from \"./forms\";\n\n// Filters\nexport { FilterBar, SearchFilter, SelectFilter, ToggleFilter } from \"./filters\";\n\n// Data mode\nexport { default as DataModeProvider, useDataMode } from \"./data/DataModeProvider\";\nexport { default as DataModeToggle } from \"./data/DataModeToggle\";\nexport { default as useDataSource } from \"./data/useDataSource\";\n\n// Data utilities\nexport { default as usePageFilters } from \"./data/usePageFilters\";\nexport {\n filterBySearch,\n filterByValue,\n filterByToggle,\n filterByDateRange,\n sortByKey,\n applyFilters,\n} from \"./data/filterUtils\";\n\n// Chat / AI agent\nexport {\n ChatPanel,\n ChatBar,\n ChatMessageList,\n ChatMessage,\n ChatInput,\n ChatTypingIndicator,\n ChatSuggestions,\n ChatToolCall,\n ChatWelcome,\n useChatState,\n} from \"./chat\";\n\n// HeroUI wrappers — existing\nexport { default as HeroUIButton, Button } from \"./heroui/Button\";\nexport { default as HeroUIInput } from \"./heroui/Input\";\nexport { default as HeroUICard } from \"./heroui/Card\";\nexport { default as HeroUIToggle } from \"./heroui/Toggle\";\n\n// HeroUI wrappers — navigation & layout\nexport { default as HeroUITabs } from \"./heroui/Tabs\";\nexport { default as HeroUIAccordion } from \"./heroui/Accordion\";\nexport { default as HeroUIBreadcrumbs, Breadcrumbs } from \"./heroui/Breadcrumbs\";\nexport { default as HeroUISeparator, Separator } from \"./heroui/Separator\";\nexport { default as HeroUIPagination, Pagination } from \"./heroui/Pagination\";\n\n// Breadcrumb subcomponents for shadcn compatibility\nexport const Breadcrumb = ({ children, ...props }: { children?: React.ReactNode; [key: string]: any }) => React.createElement('nav', { 'aria-label': 'breadcrumb', ...props }, children);\nexport const BreadcrumbList = ({ children, ...props }: { children?: React.ReactNode; [key: string]: any }) => React.createElement('ol', { className: 'flex flex-wrap items-center gap-1.5 break-words text-sm text-slate-500 dark:text-slate-400', ...props }, children);\nexport const BreadcrumbItem = ({ children, ...props }: { children?: React.ReactNode; [key: string]: any }) => React.createElement('li', { className: 'inline-flex items-center gap-1.5', ...props }, children);\nexport const BreadcrumbLink = ({ href, children, asChild, ...props }: { href?: string; children?: React.ReactNode; asChild?: boolean; [key: string]: any }) => asChild ? React.createElement('span', props, children) : React.createElement('a', { href, className: 'transition-colors hover:text-slate-900 dark:hover:text-slate-50', ...props }, children);\nexport const BreadcrumbPage = ({ children, ...props }: { children?: React.ReactNode; [key: string]: any }) => React.createElement('span', { role: 'link', 'aria-disabled': 'true', 'aria-current': 'page', className: 'font-normal text-slate-900 dark:text-slate-50', ...props }, children);\nexport const BreadcrumbSeparator = ({ children, ...props }: { children?: React.ReactNode; [key: string]: any }) => React.createElement('li', { role: 'presentation', 'aria-hidden': 'true', ...props }, children ?? '/');\nexport const BreadcrumbEllipsis = (props: { [key: string]: any }) => React.createElement('span', { role: 'presentation', 'aria-hidden': 'true', ...props }, '...');\n\n// Pagination subcomponents for shadcn compatibility\nexport const PaginationContent = ({ children, ...props }: { children?: React.ReactNode; [key: string]: any }) => React.createElement('ul', { className: 'flex flex-row items-center gap-1', ...props }, children);\nexport const PaginationItem = ({ children, ...props }: { children?: React.ReactNode; [key: string]: any }) => React.createElement('li', props, children);\nexport const PaginationLink = ({ href, isActive, children, ...props }: { href?: string; isActive?: boolean; children?: React.ReactNode; [key: string]: any }) => React.createElement('a', { href, 'aria-current': isActive ? 'page' : undefined, className: `inline-flex items-center justify-center rounded-md text-sm font-medium h-9 min-w-9 px-4 py-2 ${isActive ? 'bg-slate-900 text-white dark:bg-slate-50 dark:text-slate-900' : 'hover:bg-slate-100 dark:hover:bg-slate-800'}`, ...props }, children);\nexport const PaginationPrevious = ({ href, ...props }: { href?: string; [key: string]: any }) => React.createElement(PaginationLink, { href, ...props }, 'Previous');\nexport const PaginationNext = ({ href, ...props }: { href?: string; [key: string]: any }) => React.createElement(PaginationLink, { href, ...props }, 'Next');\nexport const PaginationEllipsis = (props: { [key: string]: any }) => React.createElement('span', { 'aria-hidden': true, ...props }, '...');\n\n// HeroUI wrappers — overlays\nexport { default as HeroUIDrawer } from \"./heroui/Drawer\";\nexport { default as HeroUIModal } from \"./heroui/Modal\";\nexport { default as HeroUIDropdown } from \"./heroui/Dropdown\";\nexport { default as HeroUITooltip } from \"./heroui/Tooltip\";\nexport { default as HeroUIToast } from \"./heroui/Toast\";\n\n// HeroUI wrappers — feedback\nexport { default as HeroUIAlert } from \"./heroui/Alert\";\nexport { default as HeroUIBadge } from \"./heroui/Badge\";\nexport { default as HeroUIProgressBar } from \"./heroui/ProgressBar\";\nexport { default as HeroUIProgressCircle } from \"./heroui/ProgressCircle\";\nexport { default as HeroUIMeter } from \"./heroui/Meter\";\nexport { default as HeroUISkeleton, Skeleton } from \"./heroui/Skeleton\";\n\n// HeroUI wrappers — pickers & forms\nexport { default as HeroUISelect } from \"./heroui/Select\";\n\n// Re-export full Radix Select suite from ui/Select for shadcn compatibility\nexport { Select, SelectTrigger, SelectValue, SelectContent, SelectItem } from \"./ui/Select\";\n\n// HeroUI wrappers — utilities\nexport { default as HeroUIKbd, Kbd } from \"./heroui/Kbd\";\nexport { default as HeroUIScrollShadow, ScrollShadow } from \"./heroui/ScrollShadow\";\n"],"names":["Breadcrumb","children","props","React","BreadcrumbList","BreadcrumbItem","BreadcrumbLink","href","asChild","BreadcrumbPage","BreadcrumbSeparator","BreadcrumbEllipsis","PaginationContent","PaginationItem","PaginationLink","isActive","PaginationPrevious","PaginationNext","PaginationEllipsis"],"mappings":";;;;;;;;;;;;AA2GO,MAAMA,IAAa,CAAC,EAAE,UAAAC,GAAU,GAAGC,QAAgEC,EAAM,cAAc,OAAO,EAAE,cAAc,cAAc,GAAGD,EAAA,GAASD,CAAQ,GAC1KG,IAAiB,CAAC,EAAE,UAAAH,GAAU,GAAGC,QAAgEC,EAAM,cAAc,MAAM,EAAE,WAAW,8FAA8F,GAAGD,EAAA,GAASD,CAAQ,GAC1PI,IAAiB,CAAC,EAAE,UAAAJ,GAAU,GAAGC,QAAgEC,EAAM,cAAc,MAAM,EAAE,WAAW,oCAAoC,GAAGD,EAAA,GAASD,CAAQ,GAChMK,IAAiB,CAAC,EAAE,MAAAC,GAAM,UAAAN,GAAU,SAAAO,GAAS,GAAGN,EAAA,MAAkGM,IAAUL,EAAM,cAAc,QAAQD,GAAOD,CAAQ,IAAIE,EAAM,cAAc,KAAK,EAAE,MAAAI,GAAM,WAAW,mEAAmE,GAAGL,EAAA,GAASD,CAAQ,GAC9UQ,IAAiB,CAAC,EAAE,UAAAR,GAAU,GAAGC,EAAA,MAAgEC,EAAM,cAAc,QAAQ,EAAE,MAAM,QAAQ,iBAAiB,QAAQ,gBAAgB,QAAQ,WAAW,iDAAiD,GAAGD,EAAA,GAASD,CAAQ,GAC9QS,IAAsB,CAAC,EAAE,UAAAT,GAAU,GAAGC,EAAA,MAAgEC,EAAM,cAAc,MAAM,EAAE,MAAM,gBAAgB,eAAe,QAAQ,GAAGD,EAAA,GAASD,KAAY,GAAG,GAC1MU,IAAqB,CAACT,MAAkCC,EAAM,cAAc,QAAQ,EAAE,MAAM,gBAAgB,eAAe,QAAQ,GAAGD,EAAA,GAAS,KAAK,GAGpJU,IAAoB,CAAC,EAAE,UAAAX,GAAU,GAAGC,QAAgEC,EAAM,cAAc,MAAM,EAAE,WAAW,oCAAoC,GAAGD,EAAA,GAASD,CAAQ,GACnMY,IAAiB,CAAC,EAAE,UAAAZ,GAAU,GAAGC,EAAA,MAAgEC,EAAM,cAAc,MAAMD,GAAOD,CAAQ,GAC1Ia,IAAiB,CAAC,EAAE,MAAAP,GAAM,UAAAQ,GAAU,UAAAd,GAAU,GAAGC,EAAA,MAAmGC,EAAM,cAAc,KAAK,EAAE,MAAAI,GAAM,gBAAgBQ,IAAW,SAAS,QAAW,WAAW,gGAAgGA,IAAW,iEAAiE,4CAA4C,IAAI,GAAGb,EAAA,GAASD,CAAQ,GAC/de,IAAqB,CAAC,EAAE,MAAAT,GAAM,GAAGL,EAAA,MAAmDC,EAAM,cAAcW,GAAgB,EAAE,MAAAP,GAAM,GAAGL,EAAA,GAAS,UAAU,GACtJe,IAAiB,CAAC,EAAE,MAAAV,GAAM,GAAGL,EAAA,MAAmDC,EAAM,cAAcW,GAAgB,EAAE,MAAAP,GAAM,GAAGL,EAAA,GAAS,MAAM,GAC9IgB,IAAqB,CAAChB,MAAkCC,EAAM,cAAc,QAAQ,EAAE,eAAe,IAAM,GAAGD,EAAA,GAAS,KAAK;"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export
|
|
2
|
-
lines?: number
|
|
3
|
-
className?: string
|
|
4
|
-
}
|
|
1
|
+
export interface CardSkeletonProps {
|
|
2
|
+
lines?: number;
|
|
3
|
+
className?: string;
|
|
4
|
+
}
|
|
5
|
+
export default function CardSkeleton({ lines, className }: CardSkeletonProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
|
|
3
|
-
function t({ lines: r = 3, className: d = "" }) {
|
|
2
|
+
function o({ lines: r = 3, className: d = "" }) {
|
|
4
3
|
return /* @__PURE__ */ e(
|
|
5
4
|
"div",
|
|
6
5
|
{
|
|
@@ -24,6 +23,6 @@ function t({ lines: r = 3, className: d = "" }) {
|
|
|
24
23
|
);
|
|
25
24
|
}
|
|
26
25
|
export {
|
|
27
|
-
|
|
26
|
+
o as default
|
|
28
27
|
};
|
|
29
28
|
//# sourceMappingURL=CardSkeleton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CardSkeleton.js","sources":["../../../../src/components/library/skeletons/CardSkeleton.
|
|
1
|
+
{"version":3,"file":"CardSkeleton.js","sources":["../../../../src/components/library/skeletons/CardSkeleton.tsx"],"sourcesContent":["export interface CardSkeletonProps {\n lines?: number;\n className?: string;\n}\n\nexport default function CardSkeleton({ lines = 3, className = \"\" }: CardSkeletonProps) {\n return (\n <div\n className={[\n \"rounded-2xl border border-slate-200 bg-white p-5 shadow-sm dark:border-slate-800 dark:bg-slate-900\",\n className\n ]\n .filter(Boolean)\n .join(\" \")}\n aria-busy=\"true\"\n aria-label=\"Loading\"\n >\n <div className=\"space-y-3\">\n {Array.from({ length: lines }).map((_, i) => (\n <div\n key={i}\n className={[\n \"h-4 animate-pulse rounded bg-slate-200 dark:bg-slate-800\",\n i === 0 ? \"w-1/3\" : i === 1 ? \"w-2/3\" : \"w-1/2\"\n ].join(\" \")}\n />\n ))}\n </div>\n </div>\n );\n}\n"],"names":["CardSkeleton","lines","className","jsx","_","i"],"mappings":";AAKA,SAAwBA,EAAa,EAAE,OAAAC,IAAQ,GAAG,WAAAC,IAAY,MAAyB;AACrF,SACE,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAW;AAAA,QACT;AAAA,QACAD;AAAA,MAAA,EAEC,OAAO,OAAO,EACd,KAAK,GAAG;AAAA,MACX,aAAU;AAAA,MACV,cAAW;AAAA,MAEX,UAAA,gBAAAC,EAAC,OAAA,EAAI,WAAU,aACZ,gBAAM,KAAK,EAAE,QAAQF,GAAO,EAAE,IAAI,CAACG,GAAGC,MACrC,gBAAAF;AAAA,QAAC;AAAA,QAAA;AAAA,UAEC,WAAW;AAAA,YACT;AAAA,YACAE,MAAM,IAAI,UAAUA,MAAM,IAAI,UAAU;AAAA,UAAA,EACxC,KAAK,GAAG;AAAA,QAAA;AAAA,QAJLA;AAAA,MAAA,CAMR,EAAA,CACH;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|