@burdenoff/fe-libs 2026.1021.5 → 2026.1021.6
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/README.md +35 -0
- package/dist/shared/utils/canvasTokens.d.ts +65 -0
- package/dist/shared/utils/canvasTokens.js +159 -0
- package/dist/shared/utils/index.d.ts +2 -0
- package/dist/shared-utils.js +19 -18
- package/dist/shared.js +135 -134
- package/dist/utils/index.js +1 -0
- package/package.json +6 -2
- package/shared/config/eslint.config.d.mts +21 -0
- package/shared/config/eslint.config.mjs +80 -18
- package/src/shared/styles/app-shell.css +3 -0
- package/src/shared/styles/canvas-theme.css +82 -0
- package/src/shared/tokens/build/semantic.css +83 -0
- package/src/shared/tokens/build/tailwind.preset.js +65 -0
package/README.md
CHANGED
|
@@ -122,6 +122,41 @@ plain browser (persisted in `sessionStorage`, cleared with `off`). It is
|
|
|
122
122
|
`public/manifest.json` and `public/sw.js` from its `native.config.json`
|
|
123
123
|
(`NativeConfig`).
|
|
124
124
|
|
|
125
|
+
## Raw colours, canvas tokens and the shared ESLint guard
|
|
126
|
+
|
|
127
|
+
UI code uses semantic tokens only. `createEslintConfig()` from
|
|
128
|
+
`@burdenoff/fe-libs/shared/config/eslint.config.mjs` reports, as an **error**,
|
|
129
|
+
hex / `rgb()` / `hsl()` / `oklch()` literals and Tailwind palette classes
|
|
130
|
+
(`bg-red-500`, `text-white`, `border-t-gray-200`, …) in string literals and
|
|
131
|
+
template strings. Comments and test files are not checked.
|
|
132
|
+
|
|
133
|
+
- A repo that still carries raw-colour debt can pass `rawColors: 'warn'` while
|
|
134
|
+
it sweeps; treat that as a tracked, temporary opt-out.
|
|
135
|
+
- A repo with a standalone ESLint config applies the same guard with
|
|
136
|
+
`'no-restricted-syntax': ['error', ...rawColorRestrictedSyntax()]`.
|
|
137
|
+
|
|
138
|
+
Workflow builders, graphs and mappers use the canvas tokens in `tokens.css`.
|
|
139
|
+
Each one aliases an existing `chart-*` / `status-*` / surface token, so it
|
|
140
|
+
follows light/dark mode, the brand and the expressive themes:
|
|
141
|
+
|
|
142
|
+
| Group | Tokens |
|
|
143
|
+
|---|---|
|
|
144
|
+
| Canvas | `--color-canvas-{bg,grid,selection,minimap-bg,minimap-node,minimap-mask,control-bg}` |
|
|
145
|
+
| Node surface | `--color-node-{bg,bg-hover,border,border-hover,border-selected,text,text-muted,handle,handle-connected}` |
|
|
146
|
+
| Node category | `--color-node-{trigger,action,logic,loop,data,integration,ai,human,utility,end,default}` plus `-subtle` |
|
|
147
|
+
| Node state | `--color-node-state-{idle,queued,running,success,warning,error,skipped}` |
|
|
148
|
+
| Edge | `--color-edge-{default,hover,selected,active,success,error,compatible,incompatible,label-bg,label-text}` |
|
|
149
|
+
| Data type | `--color-datatype-{string,number,boolean,object,array,date,binary,any}` |
|
|
150
|
+
|
|
151
|
+
`app-shell.css` maps them to Tailwind utilities (`bg-node-trigger`,
|
|
152
|
+
`stroke-edge-default`, `ring-node-state-running`, …). A shell with its own
|
|
153
|
+
`@theme` imports `@burdenoff/fe-libs/shared/styles/canvas-theme.css` instead.
|
|
154
|
+
For React Flow props, SVG attributes and inline styles, use the helpers in
|
|
155
|
+
`@burdenoff/fe-libs/shared/utils` (`nodeCategoryColor`, `edgeColor`,
|
|
156
|
+
`nodeStateColor`, `dataTypeColor`, `chartSeriesColor(chartSeriesIndex(key))`)
|
|
157
|
+
and the literal class records (`nodeCategoryClasses`, `nodeStateRingClasses`,
|
|
158
|
+
`dataTypeTextClasses`).
|
|
159
|
+
|
|
125
160
|
## Tech Stack
|
|
126
161
|
|
|
127
162
|
- React 19
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Canvas / node / edge / data-type design tokens (G19).
|
|
3
|
+
*
|
|
4
|
+
* TypeScript handles for the builder tokens in fe-libs/shared/tokens
|
|
5
|
+
* (`--color-node-*`, `--color-edge-*`, `--color-canvas-*`,
|
|
6
|
+
* `--color-datatype-*`). Every token aliases an existing chart-* / status-* /
|
|
7
|
+
* surface token, so values follow light/dark mode, the brand and the
|
|
8
|
+
* expressive / high-contrast themes.
|
|
9
|
+
*
|
|
10
|
+
* Use the `var(--…)` helpers where a value goes outside Tailwind (React Flow
|
|
11
|
+
* props, SVG attributes, inline styles), and the class records for className
|
|
12
|
+
* strings. The class records are written out literally on purpose: Tailwind
|
|
13
|
+
* only generates utilities for class names it can find verbatim in source.
|
|
14
|
+
*/
|
|
15
|
+
/** What a workflow node does, for colouring its accent / header / icon well. */
|
|
16
|
+
export declare const NODE_CATEGORIES: readonly ["trigger", "action", "logic", "loop", "data", "integration", "ai", "human", "utility", "end", "default"];
|
|
17
|
+
export type NodeCategory = (typeof NODE_CATEGORIES)[number];
|
|
18
|
+
/** Execution state of a node in a run (ring / badge / status dot). */
|
|
19
|
+
export declare const NODE_STATES: readonly ["idle", "queued", "running", "success", "warning", "error", "skipped"];
|
|
20
|
+
export type NodeState = (typeof NODE_STATES)[number];
|
|
21
|
+
export declare const EDGE_KINDS: readonly ["default", "hover", "selected", "active", "success", "error", "compatible", "incompatible"];
|
|
22
|
+
export type EdgeKind = (typeof EDGE_KINDS)[number];
|
|
23
|
+
/** Data types carried by ports and shown in mappers. */
|
|
24
|
+
export declare const DATA_TYPES: readonly ["string", "number", "boolean", "object", "array", "date", "binary", "any"];
|
|
25
|
+
export type DataType = (typeof DATA_TYPES)[number];
|
|
26
|
+
/** Number of categorical chart-* series in the token set. */
|
|
27
|
+
export declare const CHART_SERIES_COUNT = 12;
|
|
28
|
+
/** Narrows any string to a known category, falling back to `'default'`. */
|
|
29
|
+
export declare function toNodeCategory(value: string | null | undefined): NodeCategory;
|
|
30
|
+
/** Narrows any string to a known data type, falling back to `'any'`. */
|
|
31
|
+
export declare function toDataType(value: string | null | undefined): DataType;
|
|
32
|
+
/** `var(--color-node-<category>)` — the solid category accent. */
|
|
33
|
+
export declare function nodeCategoryColor(category: NodeCategory): string;
|
|
34
|
+
/** `var(--color-node-<category>-subtle)` — a translucent tint of the accent. */
|
|
35
|
+
export declare function nodeCategorySubtleColor(category: NodeCategory): string;
|
|
36
|
+
/** `var(--color-node-state-<state>)`. */
|
|
37
|
+
export declare function nodeStateColor(state: NodeState): string;
|
|
38
|
+
/** `var(--color-edge-<kind>)`. */
|
|
39
|
+
export declare function edgeColor(kind: EdgeKind): string;
|
|
40
|
+
/** `var(--color-datatype-<type>)`. */
|
|
41
|
+
export declare function dataTypeColor(type: DataType): string;
|
|
42
|
+
/**
|
|
43
|
+
* `var(--color-chart-N)` for a stable categorical series — e.g. to give each
|
|
44
|
+
* integration a distinct accent from a hash of its key. Any integer works;
|
|
45
|
+
* it wraps onto chart-1 … chart-12.
|
|
46
|
+
*/
|
|
47
|
+
export declare function chartSeriesColor(index: number): string;
|
|
48
|
+
/** A stable chart series index for a string key (FNV-1a), for `chartSeriesColor`. */
|
|
49
|
+
export declare function chartSeriesIndex(key: string): number;
|
|
50
|
+
export interface NodeCategoryClasses {
|
|
51
|
+
/** Solid accent fill, e.g. an icon well or a header stripe. */
|
|
52
|
+
accent: string;
|
|
53
|
+
/** Translucent tint, e.g. a header background. */
|
|
54
|
+
subtle: string;
|
|
55
|
+
/** Accent-coloured text or icon. */
|
|
56
|
+
text: string;
|
|
57
|
+
/** Accent-coloured border. */
|
|
58
|
+
border: string;
|
|
59
|
+
}
|
|
60
|
+
/** Tailwind classes per node category (needs canvas-theme.css or app-shell.css). */
|
|
61
|
+
export declare const nodeCategoryClasses: Record<NodeCategory, NodeCategoryClasses>;
|
|
62
|
+
/** Ring classes per execution state (needs canvas-theme.css or app-shell.css). */
|
|
63
|
+
export declare const nodeStateRingClasses: Record<NodeState, string>;
|
|
64
|
+
/** Text classes per data type (needs canvas-theme.css or app-shell.css). */
|
|
65
|
+
export declare const dataTypeTextClasses: Record<DataType, string>;
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
//#region src/shared/utils/canvasTokens.ts
|
|
2
|
+
var e = [
|
|
3
|
+
"trigger",
|
|
4
|
+
"action",
|
|
5
|
+
"logic",
|
|
6
|
+
"loop",
|
|
7
|
+
"data",
|
|
8
|
+
"integration",
|
|
9
|
+
"ai",
|
|
10
|
+
"human",
|
|
11
|
+
"utility",
|
|
12
|
+
"end",
|
|
13
|
+
"default"
|
|
14
|
+
], t = [
|
|
15
|
+
"idle",
|
|
16
|
+
"queued",
|
|
17
|
+
"running",
|
|
18
|
+
"success",
|
|
19
|
+
"warning",
|
|
20
|
+
"error",
|
|
21
|
+
"skipped"
|
|
22
|
+
], n = [
|
|
23
|
+
"default",
|
|
24
|
+
"hover",
|
|
25
|
+
"selected",
|
|
26
|
+
"active",
|
|
27
|
+
"success",
|
|
28
|
+
"error",
|
|
29
|
+
"compatible",
|
|
30
|
+
"incompatible"
|
|
31
|
+
], r = [
|
|
32
|
+
"string",
|
|
33
|
+
"number",
|
|
34
|
+
"boolean",
|
|
35
|
+
"object",
|
|
36
|
+
"array",
|
|
37
|
+
"date",
|
|
38
|
+
"binary",
|
|
39
|
+
"any"
|
|
40
|
+
], i = 12;
|
|
41
|
+
function a(e, t) {
|
|
42
|
+
return e.includes(t);
|
|
43
|
+
}
|
|
44
|
+
function o(t) {
|
|
45
|
+
return t && a(e, t) ? t : "default";
|
|
46
|
+
}
|
|
47
|
+
function s(e) {
|
|
48
|
+
return e && a(r, e) ? e : "any";
|
|
49
|
+
}
|
|
50
|
+
function c(e) {
|
|
51
|
+
return `var(--color-node-${e})`;
|
|
52
|
+
}
|
|
53
|
+
function l(e) {
|
|
54
|
+
return `var(--color-node-${e}-subtle)`;
|
|
55
|
+
}
|
|
56
|
+
function u(e) {
|
|
57
|
+
return `var(--color-node-state-${e})`;
|
|
58
|
+
}
|
|
59
|
+
function d(e) {
|
|
60
|
+
return `var(--color-edge-${e})`;
|
|
61
|
+
}
|
|
62
|
+
function f(e) {
|
|
63
|
+
return `var(--color-datatype-${e})`;
|
|
64
|
+
}
|
|
65
|
+
function p(e) {
|
|
66
|
+
return `var(--color-chart-${(Number.isFinite(e) ? Math.trunc(Math.abs(e)) : 0) % 12 + 1})`;
|
|
67
|
+
}
|
|
68
|
+
function m(e) {
|
|
69
|
+
let t = 2166136261;
|
|
70
|
+
for (let n = 0; n < e.length; n += 1) t ^= e.charCodeAt(n), t = Math.imul(t, 16777619);
|
|
71
|
+
return (t >>> 0) % 12;
|
|
72
|
+
}
|
|
73
|
+
var h = {
|
|
74
|
+
trigger: {
|
|
75
|
+
accent: "bg-node-trigger",
|
|
76
|
+
subtle: "bg-node-trigger-subtle",
|
|
77
|
+
text: "text-node-trigger",
|
|
78
|
+
border: "border-node-trigger"
|
|
79
|
+
},
|
|
80
|
+
action: {
|
|
81
|
+
accent: "bg-node-action",
|
|
82
|
+
subtle: "bg-node-action-subtle",
|
|
83
|
+
text: "text-node-action",
|
|
84
|
+
border: "border-node-action"
|
|
85
|
+
},
|
|
86
|
+
logic: {
|
|
87
|
+
accent: "bg-node-logic",
|
|
88
|
+
subtle: "bg-node-logic-subtle",
|
|
89
|
+
text: "text-node-logic",
|
|
90
|
+
border: "border-node-logic"
|
|
91
|
+
},
|
|
92
|
+
loop: {
|
|
93
|
+
accent: "bg-node-loop",
|
|
94
|
+
subtle: "bg-node-loop-subtle",
|
|
95
|
+
text: "text-node-loop",
|
|
96
|
+
border: "border-node-loop"
|
|
97
|
+
},
|
|
98
|
+
data: {
|
|
99
|
+
accent: "bg-node-data",
|
|
100
|
+
subtle: "bg-node-data-subtle",
|
|
101
|
+
text: "text-node-data",
|
|
102
|
+
border: "border-node-data"
|
|
103
|
+
},
|
|
104
|
+
integration: {
|
|
105
|
+
accent: "bg-node-integration",
|
|
106
|
+
subtle: "bg-node-integration-subtle",
|
|
107
|
+
text: "text-node-integration",
|
|
108
|
+
border: "border-node-integration"
|
|
109
|
+
},
|
|
110
|
+
ai: {
|
|
111
|
+
accent: "bg-node-ai",
|
|
112
|
+
subtle: "bg-node-ai-subtle",
|
|
113
|
+
text: "text-node-ai",
|
|
114
|
+
border: "border-node-ai"
|
|
115
|
+
},
|
|
116
|
+
human: {
|
|
117
|
+
accent: "bg-node-human",
|
|
118
|
+
subtle: "bg-node-human-subtle",
|
|
119
|
+
text: "text-node-human",
|
|
120
|
+
border: "border-node-human"
|
|
121
|
+
},
|
|
122
|
+
utility: {
|
|
123
|
+
accent: "bg-node-utility",
|
|
124
|
+
subtle: "bg-node-utility-subtle",
|
|
125
|
+
text: "text-node-utility",
|
|
126
|
+
border: "border-node-utility"
|
|
127
|
+
},
|
|
128
|
+
end: {
|
|
129
|
+
accent: "bg-node-end",
|
|
130
|
+
subtle: "bg-node-end-subtle",
|
|
131
|
+
text: "text-node-end",
|
|
132
|
+
border: "border-node-end"
|
|
133
|
+
},
|
|
134
|
+
default: {
|
|
135
|
+
accent: "bg-node-default",
|
|
136
|
+
subtle: "bg-node-default-subtle",
|
|
137
|
+
text: "text-node-default",
|
|
138
|
+
border: "border-node-default"
|
|
139
|
+
}
|
|
140
|
+
}, g = {
|
|
141
|
+
idle: "ring-node-state-idle",
|
|
142
|
+
queued: "ring-node-state-queued",
|
|
143
|
+
running: "ring-node-state-running",
|
|
144
|
+
success: "ring-node-state-success",
|
|
145
|
+
warning: "ring-node-state-warning",
|
|
146
|
+
error: "ring-node-state-error",
|
|
147
|
+
skipped: "ring-node-state-skipped"
|
|
148
|
+
}, _ = {
|
|
149
|
+
string: "text-datatype-string",
|
|
150
|
+
number: "text-datatype-number",
|
|
151
|
+
boolean: "text-datatype-boolean",
|
|
152
|
+
object: "text-datatype-object",
|
|
153
|
+
array: "text-datatype-array",
|
|
154
|
+
date: "text-datatype-date",
|
|
155
|
+
binary: "text-datatype-binary",
|
|
156
|
+
any: "text-datatype-any"
|
|
157
|
+
};
|
|
158
|
+
//#endregion
|
|
159
|
+
export { i as CHART_SERIES_COUNT, r as DATA_TYPES, n as EDGE_KINDS, e as NODE_CATEGORIES, t as NODE_STATES, p as chartSeriesColor, m as chartSeriesIndex, f as dataTypeColor, _ as dataTypeTextClasses, d as edgeColor, h as nodeCategoryClasses, c as nodeCategoryColor, l as nodeCategorySubtleColor, u as nodeStateColor, g as nodeStateRingClasses, s as toDataType, o as toNodeCategory };
|
|
@@ -8,6 +8,8 @@ export { createApolloClient } from './apollo';
|
|
|
8
8
|
export type { CreateApolloClientOptions } from './apollo';
|
|
9
9
|
export { statusTokens, trendTokens, progressTokens, categoryTokens, alertTokens, getStatusTokens, getStatusBadgeTokens, getTrendTokens, getProgressTokens, getCategoryTokens, getAlertTokens, } from './tokens';
|
|
10
10
|
export type { SemanticStatus } from './tokens';
|
|
11
|
+
export { NODE_CATEGORIES, NODE_STATES, EDGE_KINDS, DATA_TYPES, CHART_SERIES_COUNT, toNodeCategory, toDataType, nodeCategoryColor, nodeCategorySubtleColor, nodeStateColor, edgeColor, dataTypeColor, chartSeriesColor, chartSeriesIndex, nodeCategoryClasses, nodeStateRingClasses, dataTypeTextClasses, } from './canvasTokens';
|
|
12
|
+
export type { NodeCategory, NodeState, EdgeKind, DataType, NodeCategoryClasses, } from './canvasTokens';
|
|
11
13
|
export { formatCurrency, formatCurrencyCompact, formatDate, formatDateTime, formatRelativeTime, formatDuration, formatTime, formatNumber, formatPercentage, formatBytes, formatCompactNumber, formatOrdinal, truncateText, capitalizeFirst, capitalizeWords, slugify, toCamelCase, toPascalCase, pluralize, formatList, } from './format';
|
|
12
14
|
export { lazyWithRetry, isChunkLoadError } from './lazyWithRetry';
|
|
13
15
|
export { resolveGatewayBases, installGatewayFetchRewrite, suppressConsole, } from './gatewayFetchRewrite';
|
package/dist/shared-utils.js
CHANGED
|
@@ -1,23 +1,24 @@
|
|
|
1
1
|
import { createApolloClient as e } from "./shared/utils/apollo.js";
|
|
2
2
|
import { alertTokens as t, categoryTokens as n, getAlertTokens as r, getCategoryTokens as i, getProgressTokens as a, getStatusBadgeTokens as o, getStatusTokens as s, getTrendTokens as c, progressTokens as l, statusTokens as u, trendTokens as d } from "./shared/utils/tokens.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
3
|
+
import { CHART_SERIES_COUNT as f, DATA_TYPES as p, EDGE_KINDS as m, NODE_CATEGORIES as h, NODE_STATES as g, chartSeriesColor as _, chartSeriesIndex as v, dataTypeColor as y, dataTypeTextClasses as b, edgeColor as x, nodeCategoryClasses as S, nodeCategoryColor as C, nodeCategorySubtleColor as w, nodeStateColor as T, nodeStateRingClasses as E, toDataType as D, toNodeCategory as O } from "./shared/utils/canvasTokens.js";
|
|
4
|
+
import { capitalizeFirst as k, capitalizeWords as A, formatBytes as j, formatCompactNumber as M, formatCurrency as N, formatCurrencyCompact as P, formatDate as F, formatDateTime as I, formatDuration as L, formatList as R, formatNumber as z, formatOrdinal as B, formatPercentage as V, formatRelativeTime as H, formatTime as U, pluralize as W, slugify as G, toCamelCase as K, toPascalCase as q, truncateText as J } from "./shared/utils/format.js";
|
|
5
|
+
import { isChunkLoadError as Y, lazyWithRetry as X } from "./shared/utils/lazyWithRetry.js";
|
|
6
|
+
import { installGatewayFetchRewrite as Z, resolveGatewayBases as Q, suppressConsole as $ } from "./shared/utils/gatewayFetchRewrite.js";
|
|
7
|
+
import { BACKEND_ERROR_EVENT as ee, CONNECTION_STATUS_EVENT as te, dispatchBackendErrorEvent as ne, extractBackendError as re, isAbortError as ie, isBackendErrorDisplay as ae, isTransportError as oe, markConnectionHealthy as se, shouldToastBackendError as ce } from "./shared/utils/backendErrors.js";
|
|
8
|
+
import { attemptTokenRefresh as le, clearAuthSessionStorage as ue, hasAuthGraphQLErrors as de, isAuthGraphQLError as fe, isAuthNetworkError as pe, redirectToLogin as me } from "./shared/utils/authErrorHandling.js";
|
|
9
|
+
import { clearSSoCookie as he, clearShellSsoCookies as ge, getSSoCookie as _e, isSharedSsoCookieDomain as ve, isTrustedSsoOrigin as ye, readShellSsoCookie as be, setSSoCookie as xe, setShellSsoCookies as Se } from "./shared/utils/authCookie.js";
|
|
10
|
+
import { assignLocationWithAllowlist as Ce, isAllowedRedirectUrl as we, openUrlInNewTabWithAllowlist as Te, replaceLocationWithAllowlist as Ee } from "./shared/utils/redirectAllowlist.js";
|
|
11
|
+
import { SSO_DEPOSITED_PARAM as De, beginSsoNavigation as Oe, buildSsoDepositUrl as ke, clearSsoDepositState as Ae, clearSsoNavigation as je, consumeSsoDepositMarker as Me, isSsoNavigationPending as Ne, markSsoDepositDone as Pe, markSsoDepositPending as Fe, mintSsoSessionTokens as Ie, readSsoDepositState as Le, shouldAttemptSsoDeposit as Re } from "./shared/utils/ssoDeposit.js";
|
|
12
|
+
import { AppInitializer as ze, useRegistryHelpers as Be, useShellNavigate as Ve } from "./shared/utils/appHelpers.js";
|
|
13
|
+
import { clearUserContext as He, initializeLogger as Ue, setUserContext as We } from "./shared/utils/loggerInit.js";
|
|
14
|
+
import { createProfileScopedStorage as Ge, getProfileScopedKey as Ke } from "./shared/utils/profileScopedStorage.js";
|
|
15
|
+
import { QUOTA_EXHAUSTED_CODE as qe, RESOURCE_CAP_EXCEEDED_CODE as Je, STORAGE_QUOTA_EXCEEDED_CODE as Ye, UPGRADE_ERROR_CODES as Xe, buildQuotaExhaustedMessage as Ze, extractQuotaExhaustedExtensions as Qe, extractUpgradeErrorExtensions as $e, isQuotaExhaustedError as et, isUpgradeError as tt } from "./shared/utils/quotaErrors.js";
|
|
16
|
+
import { INLINE_ENCODE as nt, downscaleImage as rt, selectInlineBase64 as it } from "./shared/utils/imageDownscale.js";
|
|
17
|
+
import { clsx as at } from "clsx";
|
|
18
|
+
import { twMerge as ot } from "tailwind-merge";
|
|
18
19
|
//#region src/shared/utils/index.ts
|
|
19
|
-
function
|
|
20
|
-
return
|
|
20
|
+
function st(...e) {
|
|
21
|
+
return ot(at(e));
|
|
21
22
|
}
|
|
22
23
|
//#endregion
|
|
23
|
-
export {
|
|
24
|
+
export { ze as AppInitializer, ee as BACKEND_ERROR_EVENT, f as CHART_SERIES_COUNT, te as CONNECTION_STATUS_EVENT, p as DATA_TYPES, m as EDGE_KINDS, nt as INLINE_ENCODE, h as NODE_CATEGORIES, g as NODE_STATES, qe as QUOTA_EXHAUSTED_CODE, Je as RESOURCE_CAP_EXCEEDED_CODE, De as SSO_DEPOSITED_PARAM, Ye as STORAGE_QUOTA_EXCEEDED_CODE, Xe as UPGRADE_ERROR_CODES, t as alertTokens, Ce as assignLocationWithAllowlist, le as attemptTokenRefresh, Oe as beginSsoNavigation, Ze as buildQuotaExhaustedMessage, ke as buildSsoDepositUrl, k as capitalizeFirst, A as capitalizeWords, n as categoryTokens, _ as chartSeriesColor, v as chartSeriesIndex, ue as clearAuthSessionStorage, he as clearSSoCookie, ge as clearShellSsoCookies, Ae as clearSsoDepositState, je as clearSsoNavigation, He as clearUserContext, st as cn, Me as consumeSsoDepositMarker, e as createApolloClient, Ge as createProfileScopedStorage, y as dataTypeColor, b as dataTypeTextClasses, ne as dispatchBackendErrorEvent, rt as downscaleImage, x as edgeColor, re as extractBackendError, Qe as extractQuotaExhaustedExtensions, $e as extractUpgradeErrorExtensions, j as formatBytes, M as formatCompactNumber, N as formatCurrency, P as formatCurrencyCompact, F as formatDate, I as formatDateTime, L as formatDuration, R as formatList, z as formatNumber, B as formatOrdinal, V as formatPercentage, H as formatRelativeTime, U as formatTime, r as getAlertTokens, i as getCategoryTokens, Ke as getProfileScopedKey, a as getProgressTokens, _e as getSSoCookie, o as getStatusBadgeTokens, s as getStatusTokens, c as getTrendTokens, de as hasAuthGraphQLErrors, Ue as initializeLogger, Z as installGatewayFetchRewrite, ie as isAbortError, we as isAllowedRedirectUrl, fe as isAuthGraphQLError, pe as isAuthNetworkError, ae as isBackendErrorDisplay, Y as isChunkLoadError, et as isQuotaExhaustedError, ve as isSharedSsoCookieDomain, Ne as isSsoNavigationPending, oe as isTransportError, ye as isTrustedSsoOrigin, tt as isUpgradeError, X as lazyWithRetry, se as markConnectionHealthy, Pe as markSsoDepositDone, Fe as markSsoDepositPending, Ie as mintSsoSessionTokens, S as nodeCategoryClasses, C as nodeCategoryColor, w as nodeCategorySubtleColor, T as nodeStateColor, E as nodeStateRingClasses, Te as openUrlInNewTabWithAllowlist, W as pluralize, l as progressTokens, be as readShellSsoCookie, Le as readSsoDepositState, me as redirectToLogin, Ee as replaceLocationWithAllowlist, Q as resolveGatewayBases, it as selectInlineBase64, xe as setSSoCookie, Se as setShellSsoCookies, We as setUserContext, Re as shouldAttemptSsoDeposit, ce as shouldToastBackendError, G as slugify, u as statusTokens, $ as suppressConsole, K as toCamelCase, D as toDataType, O as toNodeCategory, q as toPascalCase, d as trendTokens, J as truncateText, Be as useRegistryHelpers, Ve as useShellNavigate };
|
package/dist/shared.js
CHANGED
|
@@ -2,144 +2,145 @@ import { useCopyToClipboard as e } from "./shared/hooks/useCopyToClipboard.js";
|
|
|
2
2
|
import { useMediaQuery as t } from "./shared/hooks/useMediaQuery.js";
|
|
3
3
|
import { createApolloClient as n } from "./shared/utils/apollo.js";
|
|
4
4
|
import { alertTokens as r, categoryTokens as i, getAlertTokens as a, getCategoryTokens as o, getProgressTokens as s, getStatusBadgeTokens as c, getStatusTokens as l, getTrendTokens as u, progressTokens as d, statusTokens as f, trendTokens as p } from "./shared/utils/tokens.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
58
|
-
import {
|
|
59
|
-
import {
|
|
60
|
-
import {
|
|
61
|
-
import {
|
|
62
|
-
import {
|
|
63
|
-
import {
|
|
5
|
+
import { CHART_SERIES_COUNT as m, DATA_TYPES as h, EDGE_KINDS as g, NODE_CATEGORIES as _, NODE_STATES as v, chartSeriesColor as y, chartSeriesIndex as b, dataTypeColor as x, dataTypeTextClasses as S, edgeColor as C, nodeCategoryClasses as w, nodeCategoryColor as T, nodeCategorySubtleColor as E, nodeStateColor as D, nodeStateRingClasses as O, toDataType as k, toNodeCategory as A } from "./shared/utils/canvasTokens.js";
|
|
6
|
+
import { capitalizeFirst as j, capitalizeWords as M, formatBytes as N, formatCompactNumber as P, formatCurrency as F, formatCurrencyCompact as I, formatDate as L, formatDateTime as R, formatDuration as z, formatList as B, formatNumber as V, formatOrdinal as H, formatPercentage as U, formatRelativeTime as W, formatTime as G, pluralize as K, slugify as q, toCamelCase as J, toPascalCase as Y, truncateText as X } from "./shared/utils/format.js";
|
|
7
|
+
import { isChunkLoadError as Z, lazyWithRetry as Q } from "./shared/utils/lazyWithRetry.js";
|
|
8
|
+
import { getCapacitorPlatform as $, isCapacitorNative as ee } from "./shared/native/capacitor.js";
|
|
9
|
+
import { DESKTOP_UPDATE_UNSUPPORTED as te, DESKTOP_WINDOW_STATE_DEFAULT as ne, bootDesktopShell as re, desktopCheckForUpdates as ie, desktopDeepLinkToPath as ae, desktopInstallUpdate as oe, desktopNotify as se, desktopOpenExternal as ce, desktopSetBadgeCount as le, desktopSetLocale as ue, desktopSetTheme as de, desktopSetTrayQuickActions as fe, getDesktopAuthBridgeConfig as pe, getDesktopBridge as me, getDesktopGatewayBases as he, getDesktopGatewayUrls as ge, getDesktopRuntimeConfig as _e, getDesktopUpdateState as ve, getDesktopWindowState as ye, getLegacyDesktopRuntime as be, installDesktopDeepLinkHandler as xe, installDesktopNavigateHandler as Se, isDesktop as Ce, onDesktopUpdateState as we, onDesktopWindowState as Te, registerDesktopNavigator as Ee } from "./shared/native/desktop.js";
|
|
10
|
+
import { resolveGatewayUrls as De } from "./shared/config/gatewayUrls.js";
|
|
11
|
+
import { installGatewayFetchRewrite as Oe, resolveGatewayBases as ke, suppressConsole as Ae } from "./shared/utils/gatewayFetchRewrite.js";
|
|
12
|
+
import { resolveAuthBridgeConfig as je, resolveShellAuthBridgeConfig as Me } from "./shared/config/authBridgeUrls.js";
|
|
13
|
+
import { PRODUCT_SLUG_EMIT as Ne, PRODUCT_SLUG_RENAMES as Pe, emitProductSlug as Fe, isSameProductSlug as Ie, legacyProductSlug as Le, normalizeProductSlug as Re } from "./shared/config/productSlug.js";
|
|
14
|
+
import { BOTMANOR_PRODUCT_SLUG as ze, PRODUCTS as Be, PRODUCT_URLS as Ve, findProductConfig as He, getProductUrl as Ue, getProductsWithUrls as We } from "./shared/config/products.js";
|
|
15
|
+
import { COMMON_SHELL_LESS_ROUTES as Ge, DEFAULT_SHELL_CONFIG as Ke, getShellConfig as qe, isShellLessRoute as Je, shouldShowBreadcrumb as Ye, shouldShowSidebar as Xe } from "./shared/config/shellRoutes.js";
|
|
16
|
+
import { DEFAULT_PAGE_SIZE as Ze, GATEWAYS as Qe, getGatewayConfig as $e, getGatewayUrl as et, getGraphQLEndpoint as tt } from "./shared-config.js";
|
|
17
|
+
import { getWorkspaceTokenPayload as nt, isWorkspaceTokenValidForContext as rt } from "./shared/graphql/workspaceToken.js";
|
|
18
|
+
import { BACKEND_ERROR_EVENT as it, CONNECTION_STATUS_EVENT as at, dispatchBackendErrorEvent as ot, extractBackendError as st, isAbortError as ct, isBackendErrorDisplay as lt, isTransportError as ut, markConnectionHealthy as dt, shouldToastBackendError as ft } from "./shared/utils/backendErrors.js";
|
|
19
|
+
import { clearGraphqlFetchResponseCache as pt, getStoredAuthToken as mt, getStoredLocale as ht, getStoredOrganizationId as gt, getStoredProjectId as _t, getStoredWorkspaceId as vt, getStoredWorkspaceToken as yt, graphqlFetch as bt, resolveGatewayUrl as xt } from "./shared/graphql/fetch.js";
|
|
20
|
+
import { SSELink as St } from "./shared/graphql/links/sse-link.js";
|
|
21
|
+
import { createGraphQLClient as Ct, getGlobalClient as wt, getWorkspaceClient as Tt, initializeAppClients as Et, resetAppClients as Dt } from "./shared/graphql/client.js";
|
|
22
|
+
import { GatewayProvider as Ot, useGateway as kt, useGatewayClient as At, useSafeGateway as jt, useSafeGatewayClient as Mt } from "./shared/graphql/GatewayContext.js";
|
|
23
|
+
import { useHasAuthToken as Nt } from "./shared/graphql/useHasAuthToken.js";
|
|
24
|
+
import { WsLink as Pt } from "./shared/graphql/links/ws-link.js";
|
|
25
|
+
import { prepareWorkspaceRequest as Ft } from "./shared/graphql/prepareWorkspaceRequest.js";
|
|
26
|
+
import { ApolloClient as It, ApolloProvider as Lt, InMemoryCache as Rt, gql as zt, useApolloClient as Bt, useLazyQuery as Vt, useMutation as Ht, useQuery as Ut, useSubscription as Wt } from "./shared-graphql.js";
|
|
27
|
+
import { attemptTokenRefresh as Gt, clearAuthSessionStorage as Kt, hasAuthGraphQLErrors as qt, isAuthGraphQLError as Jt, isAuthNetworkError as Yt, redirectToLogin as Xt } from "./shared/utils/authErrorHandling.js";
|
|
28
|
+
import { clearSSoCookie as Zt, clearShellSsoCookies as Qt, getSSoCookie as $t, isSharedSsoCookieDomain as en, isTrustedSsoOrigin as tn, readShellSsoCookie as nn, setSSoCookie as rn, setShellSsoCookies as an } from "./shared/utils/authCookie.js";
|
|
29
|
+
import { getNativeBridge as on } from "./shared/native/bridge.js";
|
|
30
|
+
import { getPlatform as sn, isAndroid as cn, isElectron as ln, isIOS as un, isInstalledApp as dn, isNative as fn, isStandalonePWA as pn, isWeb as mn, isWebBrowser as hn } from "./shared/native/platform.js";
|
|
31
|
+
import { assignLocationWithAllowlist as gn, isAllowedRedirectUrl as _n, openUrlInNewTabWithAllowlist as vn, replaceLocationWithAllowlist as yn } from "./shared/utils/redirectAllowlist.js";
|
|
32
|
+
import { SSORedirectSpinner as bn, checkRemoteSLO as xn, checkSLO as Sn, clearLocalAuthState as Cn, getSSORedirectUrl as wn, redirectToSSO as Tn } from "./shared/components/SSORedirectGuard.js";
|
|
33
|
+
import { SSO_DEPOSITED_PARAM as En, beginSsoNavigation as Dn, buildSsoDepositUrl as On, clearSsoDepositState as kn, clearSsoNavigation as An, consumeSsoDepositMarker as jn, isSsoNavigationPending as Mn, markSsoDepositDone as Nn, markSsoDepositPending as Pn, mintSsoSessionTokens as Fn, readSsoDepositState as In, shouldAttemptSsoDeposit as Ln } from "./shared/utils/ssoDeposit.js";
|
|
34
|
+
import { AppInitializer as Rn, useRegistryHelpers as zn, useShellNavigate as Bn } from "./shared/utils/appHelpers.js";
|
|
35
|
+
import { LogLevel as Vn } from "./shared/logger/types.js";
|
|
36
|
+
import { Logger as Hn } from "./shared/logger/Logger.js";
|
|
37
|
+
import { LogManager as Un, logManager as Wn } from "./shared/logger/LogManager.js";
|
|
38
|
+
import { ConsoleTransport as Gn } from "./shared/logger/ConsoleTransport.js";
|
|
39
|
+
import { clearUserContext as Kn, initializeLogger as qn, setUserContext as Jn } from "./shared/utils/loggerInit.js";
|
|
40
|
+
import { createProfileScopedStorage as Yn, getProfileScopedKey as Xn } from "./shared/utils/profileScopedStorage.js";
|
|
41
|
+
import { QUOTA_EXHAUSTED_CODE as Zn, RESOURCE_CAP_EXCEEDED_CODE as Qn, STORAGE_QUOTA_EXCEEDED_CODE as $n, UPGRADE_ERROR_CODES as er, buildQuotaExhaustedMessage as tr, extractQuotaExhaustedExtensions as nr, extractUpgradeErrorExtensions as rr, isQuotaExhaustedError as ir, isUpgradeError as ar } from "./shared/utils/quotaErrors.js";
|
|
42
|
+
import { INLINE_ENCODE as or, downscaleImage as sr, selectInlineBase64 as cr } from "./shared/utils/imageDownscale.js";
|
|
43
|
+
import { cn as lr } from "./shared-utils.js";
|
|
44
|
+
import { nativeActionSheet as ur, nativeConfirm as dr, nativeCopyText as fr, nativeImpact as pr, nativeNotify as mr, nativeOpenUrl as hr, nativeSelection as gr, nativeShare as _r, nativeToast as vr } from "./shared/native/consumers.js";
|
|
45
|
+
import { SafeAreaView as yr } from "./shared/native/SafeAreaView.js";
|
|
46
|
+
import { readInitialNetworkStatus as br, reduceNetworkStatus as xr, useNetworkStatus as Sr } from "./shared/native/hooks/useNetworkStatus.js";
|
|
47
|
+
import { PULL_TO_REFRESH_THRESHOLD as Cr, computePullOffset as wr, computePullProgress as Tr, usePullToRefresh as Er } from "./shared/native/hooks/usePullToRefresh.js";
|
|
48
|
+
import { useReturnFocus as Dr } from "./shared/hooks/useReturnFocus.js";
|
|
49
|
+
import { ActorIdentity as Or } from "./shared/actors/ActorIdentity.js";
|
|
50
|
+
import { buildActorFallback as kr, useActorProfiles as Ar } from "./shared/actors/useActorProfiles.js";
|
|
51
|
+
import { ErrorBoundary as jr } from "./shared/components/ErrorBoundary.js";
|
|
52
|
+
import { RequireAuth as Mr, RequireGuest as Nr } from "./shared/components/RequireAuth.js";
|
|
53
|
+
import { PermissionButton as Pr, PermissionGate as Fr, PermissionLink as Ir } from "./shared/components/PermissionGate.js";
|
|
54
|
+
import { AccessDenied as Lr, PermissionDenied as Rr } from "./shared/components/AccessDenied.js";
|
|
55
|
+
import { ErrorFallback as zr } from "./shared/components/ErrorFallback.js";
|
|
56
|
+
import { LoadingFallback as Br, PageLoadingFallback as Vr, SectionLoadingFallback as Hr } from "./shared/components/LoadingFallback.js";
|
|
57
|
+
import { MicrofrontendErrorBoundary as Ur } from "./shared/components/MicrofrontendErrorBoundary.js";
|
|
58
|
+
import { ConditionalShell as Wr } from "./shared/components/ConditionalShell.js";
|
|
59
|
+
import { usePWA as Gr } from "./shared/hooks/usePWA.js";
|
|
60
|
+
import { PWAInstallBanner as Kr } from "./shared/components/PWAInstallBanner.js";
|
|
61
|
+
import { ErrorBoundary as qr } from "./shared/components/AppErrorBoundary.js";
|
|
62
|
+
import { FeatureFlagProvider as Jr, useFeatureFlags as Yr } from "./shared/feature-flags/FeatureFlagProvider.js";
|
|
63
|
+
import { useFeatureFlag as Xr, useFeatureFlagDetails as Zr, useFeatureFlagValue as Qr } from "./shared/feature-flags/useFeatureFlag.js";
|
|
64
|
+
import { FeatureGate as $r } from "./shared/feature-flags/FeatureGate.js";
|
|
64
65
|
import "./shared-feature-flags.js";
|
|
65
|
-
import { ContextConversationWidget as
|
|
66
|
-
import { detectPlatform as
|
|
67
|
-
import { KeyboardHelpDialogWrapper as
|
|
68
|
-
import { QuotaMeter as
|
|
69
|
-
import { UPGRADE_PROMPT_EVENT as
|
|
70
|
-
import { UpgradeInlineBanner as
|
|
71
|
-
import { DEFAULT_QUOTA_UPGRADE_COPY as
|
|
72
|
-
import { getNativeEntryRoutes as
|
|
73
|
-
import { LandingGateView as
|
|
74
|
-
import { useVoiceInput as
|
|
75
|
-
import { ASSISTANT_WIDGET_TOGGLE_EVENT as
|
|
76
|
-
import { Markdown as
|
|
77
|
-
import { useNativePlatform as
|
|
78
|
-
import { useSafeArea as
|
|
79
|
-
import { useNativeKeyboard as
|
|
80
|
-
import { useAppState as
|
|
81
|
-
import { useDeviceInfo as
|
|
82
|
-
import { useHaptics as
|
|
83
|
-
import { useStatusBar as
|
|
84
|
-
import { resolveActionSheetOutcome as
|
|
85
|
-
import { useDesktop as
|
|
86
|
-
import { useDesktopUpdateState as
|
|
87
|
-
import { useDesktopWindowState as
|
|
88
|
-
import { DesktopUpdateToast as
|
|
66
|
+
import { ContextConversationWidget as ei } from "./shared/components/ContextConversationWidget.js";
|
|
67
|
+
import { detectPlatform as ti, formatKeyCombo as ni, getDisplayKeysForPlatform as ri, getShortcutLabel as ii, isMac as ai, isMobileDevice as oi, isTabletDevice as si, matchesKeyCombo as ci, normalizeKey as li, normalizePlatformCombo as ui, parseKeyCombo as di, shouldEnableKeyboardShortcuts as fi, shouldIgnoreShortcut as pi } from "./shared/keyboard/utils.js";
|
|
68
|
+
import { KeyboardHelpDialogWrapper as mi } from "./shared/components/KeyboardHelpDialogWrapper.js";
|
|
69
|
+
import { QuotaMeter as hi } from "./shared/components/QuotaMeter.js";
|
|
70
|
+
import { UPGRADE_PROMPT_EVENT as gi, UpgradePromptModal as _i, dispatchUpgradePrompt as vi } from "./shared/components/UpgradePromptModal.js";
|
|
71
|
+
import { UpgradeInlineBanner as yi } from "./shared/components/UpgradeInlineBanner.js";
|
|
72
|
+
import { DEFAULT_QUOTA_UPGRADE_COPY as bi, QuotaUpgradeBridge as xi, captureQuotaDialogOwners as Si, claimQuotaDialog as Ci, dispatchProductQuotaExhausted as wi, quotaEventKind as Ti, resolveQuotaUpgradeCopy as Ei, useQuotaDialogOwnership as Di, useQuotaUpgradeBridge as Oi, withQuotaDialogOwnership as ki } from "./shared/components/QuotaUpgradeBridge.js";
|
|
73
|
+
import { getNativeEntryRoutes as Ai, shouldShowNativeWelcome as ji } from "./shared/native/entry.js";
|
|
74
|
+
import { LandingGateView as Mi, LandingOrDashboardRedirect as Ni, hasStoredValidSession as Pi, resolveLandingGate as Fi } from "./shared/components/LandingOrDashboardRedirect.js";
|
|
75
|
+
import { useVoiceInput as Ii } from "./shared/components/assistantWidget/useVoiceInput.js";
|
|
76
|
+
import { ASSISTANT_WIDGET_TOGGLE_EVENT as Li, AssistantWidget as Ri } from "./shared/components/assistantWidget/AssistantWidget.js";
|
|
77
|
+
import { Markdown as zi } from "./shared/components/Markdown.js";
|
|
78
|
+
import { useNativePlatform as Bi } from "./shared/native/hooks/useNativePlatform.js";
|
|
79
|
+
import { useSafeArea as Vi } from "./shared/native/hooks/useSafeArea.js";
|
|
80
|
+
import { useNativeKeyboard as Hi } from "./shared/native/hooks/useNativeKeyboard.js";
|
|
81
|
+
import { useAppState as Ui } from "./shared/native/hooks/useAppState.js";
|
|
82
|
+
import { useDeviceInfo as Wi } from "./shared/native/hooks/useDeviceInfo.js";
|
|
83
|
+
import { useHaptics as Gi } from "./shared/native/hooks/useHaptics.js";
|
|
84
|
+
import { useStatusBar as Ki } from "./shared/native/hooks/useStatusBar.js";
|
|
85
|
+
import { resolveActionSheetOutcome as qi, useActionSheet as Ji } from "./shared/native/hooks/useActionSheet.js";
|
|
86
|
+
import { useDesktop as Yi } from "./shared/native/hooks/useDesktop.js";
|
|
87
|
+
import { useDesktopUpdateState as Xi } from "./shared/native/hooks/useDesktopUpdateState.js";
|
|
88
|
+
import { useDesktopWindowState as Zi } from "./shared/native/hooks/useDesktopWindowState.js";
|
|
89
|
+
import { DesktopUpdateToast as Qi } from "./shared/components/DesktopUpdateToast.js";
|
|
89
90
|
import "./shared-components.js";
|
|
90
|
-
import { DevtoolsSink as
|
|
91
|
-
import { BroadcastChannelSink as
|
|
92
|
-
import { BackendAuditSink as
|
|
93
|
-
import { AnalyticsConsentBanner as
|
|
94
|
-
import { OtelBrowserSink as
|
|
95
|
-
import { EventBusProvider as
|
|
96
|
-
import { useDebounce as
|
|
97
|
-
import { useThrottle as
|
|
98
|
-
import { BREAKPOINTS as
|
|
99
|
-
import { useOnClickOutside as
|
|
100
|
-
import { useKeyPress as
|
|
101
|
-
import { useExclusiveMenu as
|
|
102
|
-
import { useLocalStorage as
|
|
103
|
-
import { useSessionStorage as
|
|
104
|
-
import { usePrevious as
|
|
105
|
-
import { useConditionalToggle as
|
|
106
|
-
import { usePagination as
|
|
107
|
-
import { useAsync as
|
|
108
|
-
import { MODIFIER_KEYS as
|
|
109
|
-
import { useKeyboardShortcuts as
|
|
110
|
-
import { useHotkeys as
|
|
111
|
-
import { useShortcutHelp as
|
|
112
|
-
import { GLOBAL_SHORTCUT_CATEGORIES as
|
|
113
|
-
import { useLogger as
|
|
114
|
-
import { useHasAnimated as
|
|
115
|
-
import { useReferralAttribution as
|
|
116
|
-
import { useRecordProductVisit as
|
|
117
|
-
import { PUSH_DEVICE_ID_STORAGE_KEY as
|
|
118
|
-
import { usePushDeviceRegistration as
|
|
119
|
-
import { QUOTA_EXHAUSTED_EVENT as
|
|
120
|
-
import { PLAN_USAGE_SNAPSHOT_EVENT as
|
|
121
|
-
import { appendContextToPath as
|
|
122
|
-
import { UNSAVED_CHANGE_LABEL_MAX as
|
|
123
|
-
import { MicrofrontendContext as
|
|
124
|
-
import { withTourProgressStatus as
|
|
125
|
-
import { detectDeviceType as
|
|
126
|
-
import { useTourPlayer as
|
|
127
|
-
import { TourSpotlight as
|
|
128
|
-
import { TourTooltip as
|
|
129
|
-
import { TourPlayerProvider as
|
|
130
|
-
import { TourPlayer as
|
|
131
|
-
import { getTourContextRank as
|
|
132
|
-
import { ToursProvider as
|
|
133
|
-
import { TourInitializer as
|
|
134
|
-
import { AppShellProvider as
|
|
135
|
-
import { MicrofrontendProvider as
|
|
136
|
-
import { TourTrigger as
|
|
91
|
+
import { DevtoolsSink as $i } from "./shared/events/sinks/DevtoolsSink.js";
|
|
92
|
+
import { BroadcastChannelSink as ea } from "./shared/events/sinks/BroadcastChannelSink.js";
|
|
93
|
+
import { BackendAuditSink as ta } from "./shared/events/sinks/BackendAuditSink.js";
|
|
94
|
+
import { AnalyticsConsentBanner as na, RybbitSink as ra, readAnalyticsConsent as ia, readAnalyticsConsentChoice as aa, setAnalyticsConsent as oa } from "./shared/events/sinks/RybbitSink.js";
|
|
95
|
+
import { OtelBrowserSink as sa } from "./shared/events/sinks/OtelBrowserSink.js";
|
|
96
|
+
import { EventBusProvider as ca, createEventBus as la, useEvent as ua, useEventBus as da, useEventEmitter as fa } from "./shared-events.js";
|
|
97
|
+
import { useDebounce as pa } from "./shared/hooks/useDebounce.js";
|
|
98
|
+
import { useThrottle as ma } from "./shared/hooks/useThrottle.js";
|
|
99
|
+
import { BREAKPOINTS as ha, useBreakpoint as ga, useMobileBreakpoint as _a } from "./shared/hooks/useBreakpoint.js";
|
|
100
|
+
import { useOnClickOutside as va, useOnClickOutsideWithRef as ya } from "./shared/hooks/useOnClickOutside.js";
|
|
101
|
+
import { useKeyPress as ba, useKeyboardShortcut as xa } from "./shared/hooks/useKeyPress.js";
|
|
102
|
+
import { useExclusiveMenu as Sa } from "./shared/hooks/useExclusiveMenu.js";
|
|
103
|
+
import { useLocalStorage as Ca } from "./shared/hooks/useLocalStorage.js";
|
|
104
|
+
import { useSessionStorage as wa } from "./shared/hooks/useSessionStorage.js";
|
|
105
|
+
import { usePrevious as Ta, usePreviousDistinct as Ea, usePreviousHistory as Da } from "./shared/hooks/usePrevious.js";
|
|
106
|
+
import { useConditionalToggle as Oa, useToggle as ka, useToggleObject as Aa } from "./shared/hooks/useToggle.js";
|
|
107
|
+
import { usePagination as ja } from "./shared/hooks/usePagination.js";
|
|
108
|
+
import { useAsync as Ma, useAsyncImmediate as Na } from "./shared/hooks/useAsync.js";
|
|
109
|
+
import { MODIFIER_KEYS as Pa, PLATFORM_TYPES as Fa } from "./shared/keyboard/types.js";
|
|
110
|
+
import { useKeyboardShortcuts as Ia } from "./shared/keyboard/useKeyboardShortcuts.js";
|
|
111
|
+
import { useHotkeys as La } from "./shared/keyboard/useHotkeys.js";
|
|
112
|
+
import { useShortcutHelp as Ra } from "./shared/keyboard/useShortcutHelp.js";
|
|
113
|
+
import { GLOBAL_SHORTCUT_CATEGORIES as za, createGlobalShortcuts as Ba, getGlobalShortcutsByCategory as Va, mergeShortcuts as Ha } from "./shared/keyboard/globalShortcuts.js";
|
|
114
|
+
import { useLogger as Ua } from "./shared/logger/useLogger.js";
|
|
115
|
+
import { useHasAnimated as Wa } from "./shared/hooks/useHasAnimated.js";
|
|
116
|
+
import { useReferralAttribution as Ga } from "./shared/hooks/useReferralAttribution.js";
|
|
117
|
+
import { useRecordProductVisit as Ka } from "./shared/hooks/useRecordProductVisit.js";
|
|
118
|
+
import { PUSH_DEVICE_ID_STORAGE_KEY as qa, getOrCreatePushDeviceId as Ja, registerPushDevice as Ya, unregisterPushDevice as Xa } from "./shared/native/push-registration.js";
|
|
119
|
+
import { usePushDeviceRegistration as Za } from "./shared/hooks/usePushDeviceRegistration.js";
|
|
120
|
+
import { QUOTA_EXHAUSTED_EVENT as Qa, dispatchQuotaExhausted as $a, useQuotaErrorToast as eo } from "./shared/hooks/useQuotaErrorToast.js";
|
|
121
|
+
import { PLAN_USAGE_SNAPSHOT_EVENT as to, publishPlanUsageSnapshot as no, useUpgradePrompt as ro } from "./shared/hooks/useUpgradePrompt.js";
|
|
122
|
+
import { appendContextToPath as io, useCurrentContextSearchParams as ao } from "./shared/hooks/useCurrentContextSearchParams.js";
|
|
123
|
+
import { UNSAVED_CHANGE_LABEL_MAX as oo, listUnsavedChanges as so, registerUnsavedChange as co, unsavedChangesBlocking as lo, useUnsavedChanges as uo } from "./shared/navigation/unsavedChanges.js";
|
|
124
|
+
import { MicrofrontendContext as fo, useMicrofrontendContext as po } from "./shared-hooks.js";
|
|
125
|
+
import { withTourProgressStatus as mo } from "./shared/tours/progress.js";
|
|
126
|
+
import { detectDeviceType as ho, getResponsiveSelector as go } from "./shared/tours/types.js";
|
|
127
|
+
import { useTourPlayer as _o } from "./shared/tours/useTourPlayer.js";
|
|
128
|
+
import { TourSpotlight as vo } from "./shared/tours/TourSpotlight.js";
|
|
129
|
+
import { TourTooltip as yo } from "./shared/tours/TourTooltip.js";
|
|
130
|
+
import { TourPlayerProvider as bo, useIsTourPlaying as xo, useStartTour as So, useStopTour as Co, useTourPlayerContext as wo } from "./shared/tours/TourPlayerProvider.js";
|
|
131
|
+
import { TourPlayer as To, TourTriggerButton as Eo, usePlayTour as Do } from "./shared/tours/TourPlayer.js";
|
|
132
|
+
import { getTourContextRank as Oo, getTourRouteCatalog as ko, getTourRouteModules as Ao, getTourRoutePages as jo, isTourVisibleForContext as Mo, normalizeTourPath as No, registerTourRouteCatalog as Po, resolveTourTargetPath as Fo } from "./shared/tours/routeCatalog.js";
|
|
133
|
+
import { ToursProvider as Io, useAutoStartTour as Lo, useSafeToursContext as Ro, useTours as zo, useToursContext as Bo } from "./shared/tours/ToursContext.js";
|
|
134
|
+
import { TourInitializer as Vo } from "./shared/tours/TourInitializer.js";
|
|
135
|
+
import { AppShellProvider as Ho, resolveAppShellObservabilityConfig as Uo } from "./shared/providers/AppShellProvider.js";
|
|
136
|
+
import { MicrofrontendProvider as Wo } from "./shared-providers.js";
|
|
137
|
+
import { TourTrigger as Go } from "./shared/tours/TourTrigger.js";
|
|
137
138
|
import "./shared-tours.js";
|
|
138
|
-
import { acknowledgeNativePurchase as
|
|
139
|
-
import { getPushOptInController as
|
|
139
|
+
import { acknowledgeNativePurchase as Ko, getNativeProducts as qo, getNativePurchases as Jo, installNativeIAP as Yo, isNativeIAPAvailable as Xo, purchaseNativeProduct as Zo, restoreNativePurchases as Qo } from "./shared/native/purchases.js";
|
|
140
|
+
import { getPushOptInController as $o, recordPushPermissionPromptDismissed as es, registerPushOptInController as ts, shouldPromptForPushPermission as ns } from "./shared/native/push-optin.js";
|
|
140
141
|
import "./shared-native.js";
|
|
141
142
|
import "./shared/actors/index.js";
|
|
142
143
|
//#region src/shared/index.ts
|
|
143
|
-
var
|
|
144
|
+
var rs = "1.0.0";
|
|
144
145
|
//#endregion
|
|
145
|
-
export { bi as ASSISTANT_WIDGET_TOGGLE_EVENT, br as AccessDenied, dr as ActorIdentity, zi as AnalyticsConsentBanner, yt as ApolloClient, bt as ApolloProvider, Ar as AppErrorBoundary, xn as AppInitializer, To as AppShellProvider, xi as AssistantWidget, Ve as BACKEND_ERROR_EVENT, Se as BOTMANOR_PRODUCT_SLUG, Qi as BREAKPOINTS, Ri as BackendAuditSink, Li as BroadcastChannelSink, Oe as COMMON_SHELL_LESS_ROUTES, He as CONNECTION_STATUS_EVENT, Dr as ConditionalShell, On as ConsoleTransport, Lr as ContextConversationWidget, Pe as DEFAULT_PAGE_SIZE, ri as DEFAULT_QUOTA_UPGRADE_COPY, ke as DEFAULT_SHELL_CONFIG, R as DESKTOP_UPDATE_UNSUPPORTED, z as DESKTOP_WINDOW_STATE_DEFAULT, Fi as DesktopUpdateToast, Ii as DevtoolsSink, mr as ErrorBoundary, Sr as ErrorFallback, Gi as EventBusProvider, Bo as FE_SHARED_VERSION, jr as FeatureFlagProvider, Ir as FeatureGate, Fe as GATEWAYS, Sa as GLOBAL_SHORTCUT_CATEGORIES, dt as GatewayProvider, Un as INLINE_ENCODE, xt as InMemoryCache, Zr as KeyboardHelpDialogWrapper, hi as LandingGateView, gi as LandingOrDashboardRedirect, Cr as LoadingFallback, wn as LogLevel, En as LogManager, Tn as Logger, _a as MODIFIER_KEYS, Si as Markdown, Ja as MicrofrontendContext, Er as MicrofrontendErrorBoundary, Do as MicrofrontendProvider, Wi as OtelBrowserSink, Ra as PLAN_USAGE_SNAPSHOT_EVENT, va as PLATFORM_TYPES, Ce as PRODUCTS, ge as PRODUCT_SLUG_EMIT, _e as PRODUCT_SLUG_RENAMES, we as PRODUCT_URLS, or as PULL_TO_REFRESH_THRESHOLD, Aa as PUSH_DEVICE_ID_STORAGE_KEY, kr as PWAInstallBanner, wr as PageLoadingFallback, _r as PermissionButton, xr as PermissionDenied, vr as PermissionGate, yr as PermissionLink, Pn as QUOTA_EXHAUSTED_CODE, Fa as QUOTA_EXHAUSTED_EVENT, Qr as QuotaMeter, ii as QuotaUpgradeBridge, Fn as RESOURCE_CAP_EXCEEDED_CODE, hr as RequireAuth, gr as RequireGuest, Bi as RybbitSink, at as SSELink, nn as SSORedirectSpinner, ln as SSO_DEPOSITED_PARAM, In as STORAGE_QUOTA_EXCEEDED_CODE, nr as SafeAreaView, Tr as SectionLoadingFallback, wo as TourInitializer, so as TourPlayer, no as TourPlayerProvider, eo as TourSpotlight, to as TourTooltip, Oo as TourTrigger, co as TourTriggerButton, yo as ToursProvider, Ua as UNSAVED_CHANGE_LABEL_MAX, Ln as UPGRADE_ERROR_CODES, $r as UPGRADE_PROMPT_EVENT, ni as UpgradeInlineBanner, ei as UpgradePromptModal, _t as WsLink, ko as acknowledgeNativePurchase, r as alertTokens, Va as appendContextToPath, Qt as assignLocationWithAllowlist, Ot as attemptTokenRefresh, un as beginSsoNavigation, B as bootDesktopShell, fr as buildActorFallback, Rn as buildQuotaExhaustedMessage, dn as buildSsoDepositUrl, m as capitalizeFirst, h as capitalizeWords, ai as captureQuotaDialogOwners, i as categoryTokens, rn as checkRemoteSLO, an as checkSLO, oi as claimQuotaDialog, kt as clearAuthSessionStorage, Xe as clearGraphqlFetchResponseCache, on as clearLocalAuthState, Pt as clearSSoCookie, Ft as clearShellSsoCookies, fn as clearSsoDepositState, pn as clearSsoNavigation, kn as clearUserContext, Kn as cn, sr as computePullOffset, cr as computePullProgress, mn as consumeSsoDepositMarker, n as createApolloClient, Ki as createEventBus, Ca as createGlobalShortcuts, ot as createGraphQLClient, Mn as createProfileScopedStorage, V as desktopCheckForUpdates, H as desktopDeepLinkToPath, U as desktopInstallUpdate, W as desktopNotify, G as desktopOpenExternal, K as desktopSetBadgeCount, q as desktopSetLocale, J as desktopSetTheme, Y as desktopSetTrayQuickActions, Za as detectDeviceType, Rr as detectPlatform, Ue as dispatchBackendErrorEvent, si as dispatchProductQuotaExhausted, Ia as dispatchQuotaExhausted, ti as dispatchUpgradePrompt, Wn as downscaleImage, ve as emitProductSlug, We as extractBackendError, zn as extractQuotaExhaustedExtensions, Bn as extractUpgradeErrorExtensions, Te as findProductConfig, g as formatBytes, _ as formatCompactNumber, v as formatCurrency, y as formatCurrencyCompact, b as formatDate, x as formatDateTime, S as formatDuration, zr as formatKeyCombo, C as formatList, w as formatNumber, T as formatOrdinal, E as formatPercentage, D as formatRelativeTime, O as formatTime, a as getAlertTokens, I as getCapacitorPlatform, o as getCategoryTokens, X as getDesktopAuthBridgeConfig, Z as getDesktopBridge, Q as getDesktopGatewayBases, $ as getDesktopGatewayUrls, ee as getDesktopRuntimeConfig, te as getDesktopUpdateState, ne as getDesktopWindowState, Br as getDisplayKeysForPlatform, Ie as getGatewayConfig, Le as getGatewayUrl, st as getGlobalClient, wa as getGlobalShortcutsByCategory, Re as getGraphQLEndpoint, re as getLegacyDesktopRuntime, Ht as getNativeBridge, pi as getNativeEntryRoutes, Ao as getNativeProducts, jo as getNativePurchases, ja as getOrCreatePushDeviceId, Ut as getPlatform, Ee as getProductUrl, De as getProductsWithUrls, Nn as getProfileScopedKey, s as getProgressTokens, Io as getPushOptInController, Qa as getResponsiveSelector, sn as getSSORedirectUrl, It as getSSoCookie, Ae as getShellConfig, Vr as getShortcutLabel, c as getStatusBadgeTokens, l as getStatusTokens, Ze as getStoredAuthToken, Qe as getStoredLocale, $e as getStoredOrganizationId, et as getStoredProjectId, tt as getStoredWorkspaceId, nt as getStoredWorkspaceToken, uo as getTourContextRank, fo as getTourRouteCatalog, po as getTourRouteModules, mo as getTourRoutePages, u as getTrendTokens, ct as getWorkspaceClient, ze as getWorkspaceTokenPayload, St as gql, rt as graphqlFetch, At as hasAuthGraphQLErrors, _i as hasStoredValidSession, lt as initializeAppClients, An as initializeLogger, ie as installDesktopDeepLinkHandler, ae as installDesktopNavigateHandler, de as installGatewayFetchRewrite, Mo as installNativeIAP, Ge as isAbortError, $t as isAllowedRedirectUrl, Wt as isAndroid, jt as isAuthGraphQLError, Mt as isAuthNetworkError, Ke as isBackendErrorDisplay, L as isCapacitorNative, P as isChunkLoadError, oe as isDesktop, Gt as isElectron, Kt as isIOS, qt as isInstalledApp, Hr as isMac, Ur as isMobileDevice, Jt as isNative, No as isNativeIAPAvailable, Vn as isQuotaExhaustedError, ye as isSameProductSlug, Lt as isSharedSsoCookieDomain, je as isShellLessRoute, hn as isSsoNavigationPending, Yt as isStandalonePWA, Wr as isTabletDevice, ho as isTourVisibleForContext, qe as isTransportError, Rt as isTrustedSsoOrigin, Hn as isUpgradeError, Xt as isWeb, Zt as isWebBrowser, Be as isWorkspaceTokenValidForContext, F as lazyWithRetry, be as legacyProductSlug, Wa as listUnsavedChanges, Dn as logManager, Je as markConnectionHealthy, gn as markSsoDepositDone, _n as markSsoDepositPending, Gr as matchesKeyCombo, Ta as mergeShortcuts, vn as mintSsoSessionTokens, qn as nativeActionSheet, Jn as nativeConfirm, Yn as nativeCopyText, Xn as nativeImpact, Zn as nativeNotify, Qn as nativeOpenUrl, $n as nativeSelection, er as nativeShare, tr as nativeToast, Kr as normalizeKey, qr as normalizePlatformCombo, xe as normalizeProductSlug, go as normalizeTourPath, se as onDesktopUpdateState, ce as onDesktopWindowState, en as openUrlInNewTabWithAllowlist, Jr as parseKeyCombo, k as pluralize, vt as prepareWorkspaceRequest, d as progressTokens, za as publishPlanUsageSnapshot, Po as purchaseNativeProduct, ci as quotaEventKind, Vi as readAnalyticsConsent, Hi as readAnalyticsConsentChoice, rr as readInitialNetworkStatus, zt as readShellSsoCookie, yn as readSsoDepositState, Lo as recordPushPermissionPromptDismissed, Nt as redirectToLogin, cn as redirectToSSO, ir as reduceNetworkStatus, le as registerDesktopNavigator, Ma as registerPushDevice, Ro as registerPushOptInController, _o as registerTourRouteCatalog, Ga as registerUnsavedChange, tn as replaceLocationWithAllowlist, ut as resetAppClients, Ai as resolveActionSheetOutcome, Eo as resolveAppShellObservabilityConfig, me as resolveAuthBridgeConfig, fe as resolveGatewayBases, it as resolveGatewayUrl, ue as resolveGatewayUrls, vi as resolveLandingGate, li as resolveQuotaUpgradeCopy, he as resolveShellAuthBridgeConfig, vo as resolveTourTargetPath, Fo as restoreNativePurchases, Gn as selectInlineBase64, Ui as setAnalyticsConsent, Bt as setSSoCookie, Vt as setShellSsoCookies, jn as setUserContext, bn as shouldAttemptSsoDeposit, Yr as shouldEnableKeyboardShortcuts, Xr as shouldIgnoreShortcut, zo as shouldPromptForPushPermission, Me as shouldShowBreadcrumb, mi as shouldShowNativeWelcome, Ne as shouldShowSidebar, Ye as shouldToastBackendError, A as slugify, f as statusTokens, pe as suppressConsole, j as toCamelCase, M as toPascalCase, p as trendTokens, N as truncateText, Na as unregisterPushDevice, Ka as unsavedChangesBlocking, ji as useActionSheet, pr as useActorProfiles, Ct as useApolloClient, Ei as useAppState, ha as useAsync, ga as useAsyncImmediate, bo as useAutoStartTour, $i as useBreakpoint, da as useConditionalToggle, e as useCopyToClipboard, Ha as useCurrentContextSearchParams, Xi as useDebounce, Mi as useDesktop, Ni as useDesktopUpdateState, Pi as useDesktopWindowState, Di as useDeviceInfo, qi as useEvent, Ji as useEventBus, Yi as useEventEmitter, aa as useExclusiveMenu, Nr as useFeatureFlag, Pr as useFeatureFlagDetails, Fr as useFeatureFlagValue, Mr as useFeatureFlags, ft as useGateway, pt as useGatewayClient, Oi as useHaptics, Da as useHasAnimated, gt as useHasAuthToken, ba as useHotkeys, ro as useIsTourPlaying, ra as useKeyPress, ia as useKeyboardShortcut, ya as useKeyboardShortcuts, wt as useLazyQuery, oa as useLocalStorage, Ea as useLogger, t as useMediaQuery, Ya as useMicrofrontendContext, ea as useMobileBreakpoint, Tt as useMutation, Ti as useNativeKeyboard, Ci as useNativePlatform, ar as useNetworkStatus, ta as useOnClickOutside, na as useOnClickOutsideWithRef, Or as usePWA, ma as usePagination, lo as usePlayTour, ca as usePrevious, la as usePreviousDistinct, ua as usePreviousHistory, lr as usePullToRefresh, Pa as usePushDeviceRegistration, Et as useQuery, ui as useQuotaDialogOwnership, La as useQuotaErrorToast, di as useQuotaUpgradeBridge, ka as useRecordProductVisit, Oa as useReferralAttribution, Sn as useRegistryHelpers, ur as useReturnFocus, wi as useSafeArea, mt as useSafeGateway, ht as useSafeGatewayClient, xo as useSafeToursContext, sa as useSessionStorage, Cn as useShellNavigate, xa as useShortcutHelp, io as useStartTour, ki as useStatusBar, ao as useStopTour, Dt as useSubscription, Zi as useThrottle, fa as useToggle, pa as useToggleObject, $a as useTourPlayer, oo as useTourPlayerContext, So as useTours, Co as useToursContext, qa as useUnsavedChanges, Ba as useUpgradePrompt, yi as useVoiceInput, fi as withQuotaDialogOwnership, Xa as withTourProgressStatus };
|
|
146
|
+
export { Li as ASSISTANT_WIDGET_TOGGLE_EVENT, Lr as AccessDenied, Or as ActorIdentity, na as AnalyticsConsentBanner, It as ApolloClient, Lt as ApolloProvider, qr as AppErrorBoundary, Rn as AppInitializer, Ho as AppShellProvider, Ri as AssistantWidget, it as BACKEND_ERROR_EVENT, ze as BOTMANOR_PRODUCT_SLUG, ha as BREAKPOINTS, ta as BackendAuditSink, ea as BroadcastChannelSink, m as CHART_SERIES_COUNT, Ge as COMMON_SHELL_LESS_ROUTES, at as CONNECTION_STATUS_EVENT, Wr as ConditionalShell, Gn as ConsoleTransport, ei as ContextConversationWidget, h as DATA_TYPES, Ze as DEFAULT_PAGE_SIZE, bi as DEFAULT_QUOTA_UPGRADE_COPY, Ke as DEFAULT_SHELL_CONFIG, te as DESKTOP_UPDATE_UNSUPPORTED, ne as DESKTOP_WINDOW_STATE_DEFAULT, Qi as DesktopUpdateToast, $i as DevtoolsSink, g as EDGE_KINDS, jr as ErrorBoundary, zr as ErrorFallback, ca as EventBusProvider, rs as FE_SHARED_VERSION, Jr as FeatureFlagProvider, $r as FeatureGate, Qe as GATEWAYS, za as GLOBAL_SHORTCUT_CATEGORIES, Ot as GatewayProvider, or as INLINE_ENCODE, Rt as InMemoryCache, mi as KeyboardHelpDialogWrapper, Mi as LandingGateView, Ni as LandingOrDashboardRedirect, Br as LoadingFallback, Vn as LogLevel, Un as LogManager, Hn as Logger, Pa as MODIFIER_KEYS, zi as Markdown, fo as MicrofrontendContext, Ur as MicrofrontendErrorBoundary, Wo as MicrofrontendProvider, _ as NODE_CATEGORIES, v as NODE_STATES, sa as OtelBrowserSink, to as PLAN_USAGE_SNAPSHOT_EVENT, Fa as PLATFORM_TYPES, Be as PRODUCTS, Ne as PRODUCT_SLUG_EMIT, Pe as PRODUCT_SLUG_RENAMES, Ve as PRODUCT_URLS, Cr as PULL_TO_REFRESH_THRESHOLD, qa as PUSH_DEVICE_ID_STORAGE_KEY, Kr as PWAInstallBanner, Vr as PageLoadingFallback, Pr as PermissionButton, Rr as PermissionDenied, Fr as PermissionGate, Ir as PermissionLink, Zn as QUOTA_EXHAUSTED_CODE, Qa as QUOTA_EXHAUSTED_EVENT, hi as QuotaMeter, xi as QuotaUpgradeBridge, Qn as RESOURCE_CAP_EXCEEDED_CODE, Mr as RequireAuth, Nr as RequireGuest, ra as RybbitSink, St as SSELink, bn as SSORedirectSpinner, En as SSO_DEPOSITED_PARAM, $n as STORAGE_QUOTA_EXCEEDED_CODE, yr as SafeAreaView, Hr as SectionLoadingFallback, Vo as TourInitializer, To as TourPlayer, bo as TourPlayerProvider, vo as TourSpotlight, yo as TourTooltip, Go as TourTrigger, Eo as TourTriggerButton, Io as ToursProvider, oo as UNSAVED_CHANGE_LABEL_MAX, er as UPGRADE_ERROR_CODES, gi as UPGRADE_PROMPT_EVENT, yi as UpgradeInlineBanner, _i as UpgradePromptModal, Pt as WsLink, Ko as acknowledgeNativePurchase, r as alertTokens, io as appendContextToPath, gn as assignLocationWithAllowlist, Gt as attemptTokenRefresh, Dn as beginSsoNavigation, re as bootDesktopShell, kr as buildActorFallback, tr as buildQuotaExhaustedMessage, On as buildSsoDepositUrl, j as capitalizeFirst, M as capitalizeWords, Si as captureQuotaDialogOwners, i as categoryTokens, y as chartSeriesColor, b as chartSeriesIndex, xn as checkRemoteSLO, Sn as checkSLO, Ci as claimQuotaDialog, Kt as clearAuthSessionStorage, pt as clearGraphqlFetchResponseCache, Cn as clearLocalAuthState, Zt as clearSSoCookie, Qt as clearShellSsoCookies, kn as clearSsoDepositState, An as clearSsoNavigation, Kn as clearUserContext, lr as cn, wr as computePullOffset, Tr as computePullProgress, jn as consumeSsoDepositMarker, n as createApolloClient, la as createEventBus, Ba as createGlobalShortcuts, Ct as createGraphQLClient, Yn as createProfileScopedStorage, x as dataTypeColor, S as dataTypeTextClasses, ie as desktopCheckForUpdates, ae as desktopDeepLinkToPath, oe as desktopInstallUpdate, se as desktopNotify, ce as desktopOpenExternal, le as desktopSetBadgeCount, ue as desktopSetLocale, de as desktopSetTheme, fe as desktopSetTrayQuickActions, ho as detectDeviceType, ti as detectPlatform, ot as dispatchBackendErrorEvent, wi as dispatchProductQuotaExhausted, $a as dispatchQuotaExhausted, vi as dispatchUpgradePrompt, sr as downscaleImage, C as edgeColor, Fe as emitProductSlug, st as extractBackendError, nr as extractQuotaExhaustedExtensions, rr as extractUpgradeErrorExtensions, He as findProductConfig, N as formatBytes, P as formatCompactNumber, F as formatCurrency, I as formatCurrencyCompact, L as formatDate, R as formatDateTime, z as formatDuration, ni as formatKeyCombo, B as formatList, V as formatNumber, H as formatOrdinal, U as formatPercentage, W as formatRelativeTime, G as formatTime, a as getAlertTokens, $ as getCapacitorPlatform, o as getCategoryTokens, pe as getDesktopAuthBridgeConfig, me as getDesktopBridge, he as getDesktopGatewayBases, ge as getDesktopGatewayUrls, _e as getDesktopRuntimeConfig, ve as getDesktopUpdateState, ye as getDesktopWindowState, ri as getDisplayKeysForPlatform, $e as getGatewayConfig, et as getGatewayUrl, wt as getGlobalClient, Va as getGlobalShortcutsByCategory, tt as getGraphQLEndpoint, be as getLegacyDesktopRuntime, on as getNativeBridge, Ai as getNativeEntryRoutes, qo as getNativeProducts, Jo as getNativePurchases, Ja as getOrCreatePushDeviceId, sn as getPlatform, Ue as getProductUrl, We as getProductsWithUrls, Xn as getProfileScopedKey, s as getProgressTokens, $o as getPushOptInController, go as getResponsiveSelector, wn as getSSORedirectUrl, $t as getSSoCookie, qe as getShellConfig, ii as getShortcutLabel, c as getStatusBadgeTokens, l as getStatusTokens, mt as getStoredAuthToken, ht as getStoredLocale, gt as getStoredOrganizationId, _t as getStoredProjectId, vt as getStoredWorkspaceId, yt as getStoredWorkspaceToken, Oo as getTourContextRank, ko as getTourRouteCatalog, Ao as getTourRouteModules, jo as getTourRoutePages, u as getTrendTokens, Tt as getWorkspaceClient, nt as getWorkspaceTokenPayload, zt as gql, bt as graphqlFetch, qt as hasAuthGraphQLErrors, Pi as hasStoredValidSession, Et as initializeAppClients, qn as initializeLogger, xe as installDesktopDeepLinkHandler, Se as installDesktopNavigateHandler, Oe as installGatewayFetchRewrite, Yo as installNativeIAP, ct as isAbortError, _n as isAllowedRedirectUrl, cn as isAndroid, Jt as isAuthGraphQLError, Yt as isAuthNetworkError, lt as isBackendErrorDisplay, ee as isCapacitorNative, Z as isChunkLoadError, Ce as isDesktop, ln as isElectron, un as isIOS, dn as isInstalledApp, ai as isMac, oi as isMobileDevice, fn as isNative, Xo as isNativeIAPAvailable, ir as isQuotaExhaustedError, Ie as isSameProductSlug, en as isSharedSsoCookieDomain, Je as isShellLessRoute, Mn as isSsoNavigationPending, pn as isStandalonePWA, si as isTabletDevice, Mo as isTourVisibleForContext, ut as isTransportError, tn as isTrustedSsoOrigin, ar as isUpgradeError, mn as isWeb, hn as isWebBrowser, rt as isWorkspaceTokenValidForContext, Q as lazyWithRetry, Le as legacyProductSlug, so as listUnsavedChanges, Wn as logManager, dt as markConnectionHealthy, Nn as markSsoDepositDone, Pn as markSsoDepositPending, ci as matchesKeyCombo, Ha as mergeShortcuts, Fn as mintSsoSessionTokens, ur as nativeActionSheet, dr as nativeConfirm, fr as nativeCopyText, pr as nativeImpact, mr as nativeNotify, hr as nativeOpenUrl, gr as nativeSelection, _r as nativeShare, vr as nativeToast, w as nodeCategoryClasses, T as nodeCategoryColor, E as nodeCategorySubtleColor, D as nodeStateColor, O as nodeStateRingClasses, li as normalizeKey, ui as normalizePlatformCombo, Re as normalizeProductSlug, No as normalizeTourPath, we as onDesktopUpdateState, Te as onDesktopWindowState, vn as openUrlInNewTabWithAllowlist, di as parseKeyCombo, K as pluralize, Ft as prepareWorkspaceRequest, d as progressTokens, no as publishPlanUsageSnapshot, Zo as purchaseNativeProduct, Ti as quotaEventKind, ia as readAnalyticsConsent, aa as readAnalyticsConsentChoice, br as readInitialNetworkStatus, nn as readShellSsoCookie, In as readSsoDepositState, es as recordPushPermissionPromptDismissed, Xt as redirectToLogin, Tn as redirectToSSO, xr as reduceNetworkStatus, Ee as registerDesktopNavigator, Ya as registerPushDevice, ts as registerPushOptInController, Po as registerTourRouteCatalog, co as registerUnsavedChange, yn as replaceLocationWithAllowlist, Dt as resetAppClients, qi as resolveActionSheetOutcome, Uo as resolveAppShellObservabilityConfig, je as resolveAuthBridgeConfig, ke as resolveGatewayBases, xt as resolveGatewayUrl, De as resolveGatewayUrls, Fi as resolveLandingGate, Ei as resolveQuotaUpgradeCopy, Me as resolveShellAuthBridgeConfig, Fo as resolveTourTargetPath, Qo as restoreNativePurchases, cr as selectInlineBase64, oa as setAnalyticsConsent, rn as setSSoCookie, an as setShellSsoCookies, Jn as setUserContext, Ln as shouldAttemptSsoDeposit, fi as shouldEnableKeyboardShortcuts, pi as shouldIgnoreShortcut, ns as shouldPromptForPushPermission, Ye as shouldShowBreadcrumb, ji as shouldShowNativeWelcome, Xe as shouldShowSidebar, ft as shouldToastBackendError, q as slugify, f as statusTokens, Ae as suppressConsole, J as toCamelCase, k as toDataType, A as toNodeCategory, Y as toPascalCase, p as trendTokens, X as truncateText, Xa as unregisterPushDevice, lo as unsavedChangesBlocking, Ji as useActionSheet, Ar as useActorProfiles, Bt as useApolloClient, Ui as useAppState, Ma as useAsync, Na as useAsyncImmediate, Lo as useAutoStartTour, ga as useBreakpoint, Oa as useConditionalToggle, e as useCopyToClipboard, ao as useCurrentContextSearchParams, pa as useDebounce, Yi as useDesktop, Xi as useDesktopUpdateState, Zi as useDesktopWindowState, Wi as useDeviceInfo, ua as useEvent, da as useEventBus, fa as useEventEmitter, Sa as useExclusiveMenu, Xr as useFeatureFlag, Zr as useFeatureFlagDetails, Qr as useFeatureFlagValue, Yr as useFeatureFlags, kt as useGateway, At as useGatewayClient, Gi as useHaptics, Wa as useHasAnimated, Nt as useHasAuthToken, La as useHotkeys, xo as useIsTourPlaying, ba as useKeyPress, xa as useKeyboardShortcut, Ia as useKeyboardShortcuts, Vt as useLazyQuery, Ca as useLocalStorage, Ua as useLogger, t as useMediaQuery, po as useMicrofrontendContext, _a as useMobileBreakpoint, Ht as useMutation, Hi as useNativeKeyboard, Bi as useNativePlatform, Sr as useNetworkStatus, va as useOnClickOutside, ya as useOnClickOutsideWithRef, Gr as usePWA, ja as usePagination, Do as usePlayTour, Ta as usePrevious, Ea as usePreviousDistinct, Da as usePreviousHistory, Er as usePullToRefresh, Za as usePushDeviceRegistration, Ut as useQuery, Di as useQuotaDialogOwnership, eo as useQuotaErrorToast, Oi as useQuotaUpgradeBridge, Ka as useRecordProductVisit, Ga as useReferralAttribution, zn as useRegistryHelpers, Dr as useReturnFocus, Vi as useSafeArea, jt as useSafeGateway, Mt as useSafeGatewayClient, Ro as useSafeToursContext, wa as useSessionStorage, Bn as useShellNavigate, Ra as useShortcutHelp, So as useStartTour, Ki as useStatusBar, Co as useStopTour, Wt as useSubscription, ma as useThrottle, ka as useToggle, Aa as useToggleObject, _o as useTourPlayer, wo as useTourPlayerContext, zo as useTours, Bo as useToursContext, uo as useUnsavedChanges, ro as useUpgradePrompt, Ii as useVoiceInput, ki as withQuotaDialogOwnership, mo as withTourProgressStatus };
|
package/dist/utils/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@burdenoff/fe-libs",
|
|
3
|
-
"version": "2026.1021.
|
|
3
|
+
"version": "2026.1021.6",
|
|
4
4
|
"description": "Burdenoff frontend primitives and domain libraries",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -232,6 +232,10 @@
|
|
|
232
232
|
"style": "./src/shared/styles/native.css",
|
|
233
233
|
"default": "./src/shared/styles/native.css"
|
|
234
234
|
},
|
|
235
|
+
"./shared/styles/canvas-theme.css": {
|
|
236
|
+
"style": "./src/shared/styles/canvas-theme.css",
|
|
237
|
+
"default": "./src/shared/styles/canvas-theme.css"
|
|
238
|
+
},
|
|
235
239
|
"./shared/utils/lazyWithRetry": {
|
|
236
240
|
"types": "./dist/shared/utils/lazyWithRetry.d.ts",
|
|
237
241
|
"import": "./dist/shared/utils/lazyWithRetry.js"
|
|
@@ -311,7 +315,7 @@
|
|
|
311
315
|
"test:package-livekit-optional": "node scripts/validate-livekit-optional.mjs",
|
|
312
316
|
"verify:package": "node scripts/verify-package-contents.mjs",
|
|
313
317
|
"test:handsfree-browser": "node scripts/handsfree-browser-run.mjs",
|
|
314
|
-
"test": "bun test scripts/graphql-schema-drift/__tests__ scripts/a11y-audit/__tests__ src/credentials src/connections src/storage src/shared/assistant src/shared/components src/shared/graphql/links/sse-link.test.ts src/shared/graphql/fetch.test.ts src/shared/graphql/prepareWorkspaceRequest.test.ts src/shared/graphql/client.test.ts src/shared/utils/apollo.test.ts src/shared/graphql/tourWorkspaceAuth.test.ts src/shared/config/gatewayUrls.test.ts src/shared/config/authBridgeUrls.test.ts src/shared/config/shellRoutes.test.ts src/shared/config/gatewayFallback.test.ts scripts/__tests__ src/shared/config/products.test.ts src/shared/config/productSlug.test.ts src/shared/hooks/shell/useProducts.test.ts src/shared/providers/shell/brandAttribute.test.ts src/chrome/ProductSwitcher.test.ts src/shared/utils/gatewayFetchRewrite.test.ts src/shared/utils/authCookie.test.ts src/shared/utils/redirectAllowlist.test.ts src/shared/providers/shell/ProfileStorageManager.test.ts src/shared/providers/AppShellProvider.test.ts src/shared/providers/shell/interpolate.test.ts src/shared/providers/shell/resolveTranslation.test.ts src/shared/providers/shell/I18nProvider.render.test.tsx src/shared/providers/shell/I18nProvider.client.test.tsx src/shared/providers/shell/translationStore.test.ts src/shared/providers/shell/translationLayers.test.ts src/shared/providers/shell/directionMode.test.ts src/shared/providers/shell/authProvider/ssoRelay.test.ts src/shared/providers/shell/authProvider/useAuthActions.signOut.test.tsx src/shared/providers/shell/personaSurfaceRemote.test.ts src/shared/providers/shell/workspaceSwitch.client.test.tsx src/shared/events/sinks/RybbitSink.test.ts src/shell-native src/shared/native src/shared/navigation src/shared/tours src/chrome/__tests__ src/ui/__tests__",
|
|
318
|
+
"test": "bun test scripts/graphql-schema-drift/__tests__ scripts/a11y-audit/__tests__ src/credentials src/connections src/storage src/shared/assistant src/shared/components src/shared/graphql/links/sse-link.test.ts src/shared/graphql/fetch.test.ts src/shared/graphql/prepareWorkspaceRequest.test.ts src/shared/graphql/client.test.ts src/shared/utils/apollo.test.ts src/shared/utils/canvasTokens.test.ts src/shared/graphql/tourWorkspaceAuth.test.ts src/shared/config/gatewayUrls.test.ts src/shared/config/authBridgeUrls.test.ts src/shared/config/shellRoutes.test.ts src/shared/config/gatewayFallback.test.ts scripts/__tests__ src/shared/config/products.test.ts src/shared/config/productSlug.test.ts src/shared/hooks/shell/useProducts.test.ts src/shared/providers/shell/brandAttribute.test.ts src/chrome/ProductSwitcher.test.ts src/shared/utils/gatewayFetchRewrite.test.ts src/shared/utils/authCookie.test.ts src/shared/utils/redirectAllowlist.test.ts src/shared/providers/shell/ProfileStorageManager.test.ts src/shared/providers/AppShellProvider.test.ts src/shared/providers/shell/interpolate.test.ts src/shared/providers/shell/resolveTranslation.test.ts src/shared/providers/shell/I18nProvider.render.test.tsx src/shared/providers/shell/I18nProvider.client.test.tsx src/shared/providers/shell/translationStore.test.ts src/shared/providers/shell/translationLayers.test.ts src/shared/providers/shell/directionMode.test.ts src/shared/providers/shell/authProvider/ssoRelay.test.ts src/shared/providers/shell/authProvider/useAuthActions.signOut.test.tsx src/shared/providers/shell/personaSurfaceRemote.test.ts src/shared/providers/shell/workspaceSwitch.client.test.tsx src/shared/events/sinks/RybbitSink.test.ts src/shell-native src/shared/native src/shared/navigation src/shared/tours src/chrome/__tests__ src/ui/__tests__",
|
|
315
319
|
"sanity": "bash scripts/build-limits.sh --gate bash -c 'bun run lint:sanity && bun run format && bun run type:check && bun run test && bun run build && bun run verify:package'",
|
|
316
320
|
"switch:status": "bun scripts/deps-mode.ts status",
|
|
317
321
|
"switch:remote": "bun scripts/deps-mode.ts remote",
|
|
@@ -3,8 +3,29 @@ import type { Linter } from 'eslint';
|
|
|
3
3
|
export interface EslintConfigOptions {
|
|
4
4
|
ignores?: string[];
|
|
5
5
|
additionalRules?: Record<string, unknown>;
|
|
6
|
+
/**
|
|
7
|
+
* Severity of the raw-colour / palette-class guard (hex, rgb()/hsl()/oklch()
|
|
8
|
+
* literals and Tailwind palette classes such as `bg-red-500` or `text-white`
|
|
9
|
+
* in string literals and template strings). Defaults to `'error'`. `'warn'`
|
|
10
|
+
* is a visible, temporary opt-out for a repo that has not swept its
|
|
11
|
+
* raw-colour debt yet.
|
|
12
|
+
*/
|
|
13
|
+
rawColors?: 'error' | 'warn' | 'off';
|
|
6
14
|
}
|
|
7
15
|
|
|
16
|
+
/** esquery regex source matching a hex colour or a CSS colour function with literal channels. */
|
|
17
|
+
export const RAW_COLOR_PATTERN: string;
|
|
18
|
+
|
|
19
|
+
/** esquery regex source matching a Tailwind palette class or a black/white colour class. */
|
|
20
|
+
export const PALETTE_CLASS_PATTERN: string;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* The `no-restricted-syntax` entries behind the raw-colour guard, for repos
|
|
24
|
+
* with a standalone ESLint config:
|
|
25
|
+
* `'no-restricted-syntax': ['error', ...rawColorRestrictedSyntax()]`.
|
|
26
|
+
*/
|
|
27
|
+
export function rawColorRestrictedSyntax(): { selector: string; message: string }[];
|
|
28
|
+
|
|
8
29
|
export function createEslintConfig(options?: EslintConfigOptions): Linter.FlatConfig[];
|
|
9
30
|
|
|
10
31
|
export default createEslintConfig;
|
|
@@ -4,15 +4,83 @@ import reactHooks from 'eslint-plugin-react-hooks';
|
|
|
4
4
|
import react from 'eslint-plugin-react';
|
|
5
5
|
import tseslint from 'typescript-eslint';
|
|
6
6
|
|
|
7
|
+
/*
|
|
8
|
+
* ── Raw-colour guard ────────────────────────────────────────────────────────
|
|
9
|
+
* UI code uses the semantic tokens in fe-libs/shared/tokens (bg-*, text-*,
|
|
10
|
+
* border-*, action-*, status-*, chart-*, node-*, edge-*, canvas-*), never a raw
|
|
11
|
+
* colour. The guard reads string literals and template-string parts only, so
|
|
12
|
+
* a comment that quotes a PR number ("#268") or a bad class is never flagged.
|
|
13
|
+
*
|
|
14
|
+
* The patterns are esquery regexes: they must not contain "/" and use no flags.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* A hex colour (#rgb, #rgba, #rrggbb, #rrggbbaa) not glued to a word on the
|
|
19
|
+
* left (so `{` and `page#abc` pass) or the right (so `#1234567` passes),
|
|
20
|
+
* or a CSS colour function with literal channels. `rgb(var(--x))` builds on a
|
|
21
|
+
* token and is allowed.
|
|
22
|
+
*/
|
|
23
|
+
export const RAW_COLOR_PATTERN =
|
|
24
|
+
'(?:^|[^&\\w])#(?:[0-9a-fA-F]{8}|[0-9a-fA-F]{6}|[0-9a-fA-F]{3,4})(?![\\w-])|\\b(?:rgba?|hsla?|hwb|lab|lch|oklab|oklch)\\((?!\\s*var\\()';
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* A Tailwind palette class (`bg-red-500`, `hover:text-slate-50`,
|
|
28
|
+
* `border-t-gray-200`, `bg-blue-500/20`) or a named black/white one
|
|
29
|
+
* (`text-white`, `bg-black/50`) on any colour utility. Token classes such as
|
|
30
|
+
* `text-text-primary`, `bg-status-error-bg` or `stroke-edge-default` do not match.
|
|
31
|
+
*/
|
|
32
|
+
export const PALETTE_CLASS_PATTERN =
|
|
33
|
+
'(?:^|[\\s:!])-?(?:bg|text|border(?:-[trblxyse])?|ring(?:-offset)?|inset-ring|outline|fill|stroke|divide|from|via|to|decoration|caret|accent|shadow|inset-shadow|drop-shadow|placeholder)-(?:(?:slate|gray|zinc|neutral|stone|red|orange|amber|yellow|lime|green|emerald|teal|cyan|sky|blue|indigo|violet|purple|fuchsia|pink|rose)-(?:50|[1-9]00|950)|black|white)(?![\\w-])';
|
|
34
|
+
|
|
35
|
+
const RAW_COLOR_MESSAGE =
|
|
36
|
+
'Use semantic tokens from @burdenoff/fe-libs/shared/tokens/tokens.css (bg-*, text-*, border-*, action-*, status-*, chart-*, node-*, edge-*, canvas-*) — not raw colours.';
|
|
37
|
+
const PALETTE_CLASS_MESSAGE =
|
|
38
|
+
'Use semantic token classes (bg-bg-surface, text-text-primary, bg-status-error-bg, text-chart-3, bg-node-trigger, stroke-edge-default; scrims bg-bg-overlay; text on an accent fill text-action-primary-text) — not Tailwind palette classes.';
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* The `no-restricted-syntax` entries that ban raw colours and palette classes
|
|
42
|
+
* in string literals and template strings. Exported so a repo with its own
|
|
43
|
+
* standalone ESLint config can apply the same guard:
|
|
44
|
+
*
|
|
45
|
+
* 'no-restricted-syntax': ['error', ...rawColorRestrictedSyntax()]
|
|
46
|
+
*
|
|
47
|
+
* @returns {{ selector: string, message: string }[]}
|
|
48
|
+
*/
|
|
49
|
+
export function rawColorRestrictedSyntax() {
|
|
50
|
+
return [
|
|
51
|
+
{ selector: `Literal[value=/${RAW_COLOR_PATTERN}/]`, message: RAW_COLOR_MESSAGE },
|
|
52
|
+
{ selector: `TemplateElement[value.raw=/${RAW_COLOR_PATTERN}/]`, message: RAW_COLOR_MESSAGE },
|
|
53
|
+
{ selector: `Literal[value=/${PALETTE_CLASS_PATTERN}/]`, message: PALETTE_CLASS_MESSAGE },
|
|
54
|
+
{
|
|
55
|
+
selector: `TemplateElement[value.raw=/${PALETTE_CLASS_PATTERN}/]`,
|
|
56
|
+
message: PALETTE_CLASS_MESSAGE,
|
|
57
|
+
},
|
|
58
|
+
];
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/** Test files may assert on literal colours; the guard is for shipped UI. */
|
|
62
|
+
const TEST_FILES = ['**/*.{test,spec}.{ts,tsx}', '**/__tests__/**/*.{ts,tsx}'];
|
|
63
|
+
|
|
64
|
+
const RAW_COLOR_SEVERITIES = ['error', 'warn', 'off'];
|
|
65
|
+
|
|
7
66
|
/**
|
|
8
67
|
* Creates a shared ESLint configuration for Burdenoff frontend projects.
|
|
9
68
|
* @param {Object} options - Configuration options
|
|
10
|
-
* @param {string[]} options.ignores - Additional ignore patterns
|
|
11
|
-
* @param {Record<string, unknown>} options.additionalRules - Additional ESLint rules
|
|
69
|
+
* @param {string[]} [options.ignores] - Additional ignore patterns
|
|
70
|
+
* @param {Record<string, unknown>} [options.additionalRules] - Additional ESLint rules
|
|
71
|
+
* @param {'error' | 'warn' | 'off'} [options.rawColors] - Severity of the raw-colour /
|
|
72
|
+
* palette-class guard. Defaults to 'error'. 'warn' is for a repo that still carries
|
|
73
|
+
* raw-colour debt it has not swept yet; it is a visible, temporary opt-out.
|
|
12
74
|
* @returns {import('eslint').Linter.FlatConfig[]} ESLint flat config array
|
|
13
75
|
*/
|
|
14
76
|
export function createEslintConfig(options = {}) {
|
|
15
|
-
const { ignores = [], additionalRules = {} } = options;
|
|
77
|
+
const { ignores = [], additionalRules = {}, rawColors = 'error' } = options;
|
|
78
|
+
if (!RAW_COLOR_SEVERITIES.includes(rawColors)) {
|
|
79
|
+
throw new Error(
|
|
80
|
+
`createEslintConfig: rawColors must be one of ${RAW_COLOR_SEVERITIES.join(', ')}, got ${String(rawColors)}`
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
const colourRule = rawColors === 'off' ? 'off' : [rawColors, ...rawColorRestrictedSyntax()];
|
|
16
84
|
|
|
17
85
|
return tseslint.config(
|
|
18
86
|
{ ignores: ['**/dist', '**/node_modules', '**/*.stories.tsx', ...ignores] },
|
|
@@ -63,21 +131,8 @@ export function createEslintConfig(options = {}) {
|
|
|
63
131
|
],
|
|
64
132
|
},
|
|
65
133
|
],
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
{
|
|
69
|
-
selector:
|
|
70
|
-
"Literal[value=/(?:#[0-9a-fA-F]{3,8}\\b)|(?:rgb[a]?\\()|(?:hsl[a]?\\()/]",
|
|
71
|
-
message:
|
|
72
|
-
'Use semantic tokens from fe-libs/shared/tokens/tokens.css (bg-*, text-*, action-*, status-*) — not raw colours.',
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
selector:
|
|
76
|
-
"TemplateElement[value.raw=/(?:#[0-9a-fA-F]{3,8}\\b)|(?:rgb[a]?\\()|(?:hsl[a]?\\()/]",
|
|
77
|
-
message:
|
|
78
|
-
'Use semantic tokens from fe-libs/shared/tokens/tokens.css — not raw colours in template strings.',
|
|
79
|
-
},
|
|
80
|
-
],
|
|
134
|
+
// Semantic tokens only — no hex/rgb/hsl and no Tailwind palette class.
|
|
135
|
+
'no-restricted-syntax': colourRule,
|
|
81
136
|
...additionalRules,
|
|
82
137
|
},
|
|
83
138
|
settings: {
|
|
@@ -85,6 +140,13 @@ export function createEslintConfig(options = {}) {
|
|
|
85
140
|
version: 'detect',
|
|
86
141
|
},
|
|
87
142
|
},
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
// Tests keep any no-restricted-syntax the repo set itself, minus the colour guard.
|
|
146
|
+
files: TEST_FILES,
|
|
147
|
+
rules: {
|
|
148
|
+
'no-restricted-syntax': additionalRules['no-restricted-syntax'] ?? 'off',
|
|
149
|
+
},
|
|
88
150
|
}
|
|
89
151
|
);
|
|
90
152
|
}
|
|
@@ -13,6 +13,9 @@
|
|
|
13
13
|
/* Installed-app (Capacitor / PWA / Electron) look & feel rules. */
|
|
14
14
|
@import './native.css';
|
|
15
15
|
|
|
16
|
+
/* Canvas / node / edge / data-type utilities (bg-node-*, stroke-edge-*, …). */
|
|
17
|
+
@import './canvas-theme.css';
|
|
18
|
+
|
|
16
19
|
/* ============================================
|
|
17
20
|
* @theme — Tailwind v4 theme configuration
|
|
18
21
|
* Maps fe-libs design tokens to Tailwind utilities
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Canvas / node / edge / data-type token utilities (Tailwind v4).
|
|
3
|
+
*
|
|
4
|
+
* Maps the G19 builder tokens from tokens.css to utilities such as
|
|
5
|
+
* `bg-node-trigger`, `bg-node-logic-subtle`, `border-node-border-selected`,
|
|
6
|
+
* `ring-node-state-running`, `stroke-edge-default`, `fill-canvas-grid` and
|
|
7
|
+
* `text-datatype-string`. Imported by app-shell.css; a shell with its own
|
|
8
|
+
* @theme imports it directly:
|
|
9
|
+
*
|
|
10
|
+
* @import "tailwindcss";
|
|
11
|
+
* @import '@burdenoff/fe-libs/shared/tokens/tokens.css';
|
|
12
|
+
* @import '@burdenoff/fe-libs/shared/styles/canvas-theme.css';
|
|
13
|
+
*
|
|
14
|
+
* For values outside Tailwind (React Flow props, SVG attributes, inline
|
|
15
|
+
* styles) use `var(--color-…)` directly, or the helpers in
|
|
16
|
+
* @burdenoff/fe-libs/shared/utils (nodeCategoryColor, edgeColor, …).
|
|
17
|
+
*/
|
|
18
|
+
@theme {
|
|
19
|
+
--color-canvas-bg: var(--color-canvas-bg);
|
|
20
|
+
--color-canvas-grid: var(--color-canvas-grid);
|
|
21
|
+
--color-canvas-selection: var(--color-canvas-selection);
|
|
22
|
+
--color-canvas-minimap-bg: var(--color-canvas-minimap-bg);
|
|
23
|
+
--color-canvas-minimap-node: var(--color-canvas-minimap-node);
|
|
24
|
+
--color-canvas-minimap-mask: var(--color-canvas-minimap-mask);
|
|
25
|
+
--color-canvas-control-bg: var(--color-canvas-control-bg);
|
|
26
|
+
--color-node-bg: var(--color-node-bg);
|
|
27
|
+
--color-node-bg-hover: var(--color-node-bg-hover);
|
|
28
|
+
--color-node-border: var(--color-node-border);
|
|
29
|
+
--color-node-border-hover: var(--color-node-border-hover);
|
|
30
|
+
--color-node-border-selected: var(--color-node-border-selected);
|
|
31
|
+
--color-node-text: var(--color-node-text);
|
|
32
|
+
--color-node-text-muted: var(--color-node-text-muted);
|
|
33
|
+
--color-node-handle: var(--color-node-handle);
|
|
34
|
+
--color-node-handle-connected: var(--color-node-handle-connected);
|
|
35
|
+
--color-node-trigger: var(--color-node-trigger);
|
|
36
|
+
--color-node-trigger-subtle: var(--color-node-trigger-subtle);
|
|
37
|
+
--color-node-action: var(--color-node-action);
|
|
38
|
+
--color-node-action-subtle: var(--color-node-action-subtle);
|
|
39
|
+
--color-node-logic: var(--color-node-logic);
|
|
40
|
+
--color-node-logic-subtle: var(--color-node-logic-subtle);
|
|
41
|
+
--color-node-loop: var(--color-node-loop);
|
|
42
|
+
--color-node-loop-subtle: var(--color-node-loop-subtle);
|
|
43
|
+
--color-node-data: var(--color-node-data);
|
|
44
|
+
--color-node-data-subtle: var(--color-node-data-subtle);
|
|
45
|
+
--color-node-integration: var(--color-node-integration);
|
|
46
|
+
--color-node-integration-subtle: var(--color-node-integration-subtle);
|
|
47
|
+
--color-node-ai: var(--color-node-ai);
|
|
48
|
+
--color-node-ai-subtle: var(--color-node-ai-subtle);
|
|
49
|
+
--color-node-human: var(--color-node-human);
|
|
50
|
+
--color-node-human-subtle: var(--color-node-human-subtle);
|
|
51
|
+
--color-node-utility: var(--color-node-utility);
|
|
52
|
+
--color-node-utility-subtle: var(--color-node-utility-subtle);
|
|
53
|
+
--color-node-end: var(--color-node-end);
|
|
54
|
+
--color-node-end-subtle: var(--color-node-end-subtle);
|
|
55
|
+
--color-node-default: var(--color-node-default);
|
|
56
|
+
--color-node-default-subtle: var(--color-node-default-subtle);
|
|
57
|
+
--color-node-state-idle: var(--color-node-state-idle);
|
|
58
|
+
--color-node-state-queued: var(--color-node-state-queued);
|
|
59
|
+
--color-node-state-running: var(--color-node-state-running);
|
|
60
|
+
--color-node-state-success: var(--color-node-state-success);
|
|
61
|
+
--color-node-state-warning: var(--color-node-state-warning);
|
|
62
|
+
--color-node-state-error: var(--color-node-state-error);
|
|
63
|
+
--color-node-state-skipped: var(--color-node-state-skipped);
|
|
64
|
+
--color-edge-default: var(--color-edge-default);
|
|
65
|
+
--color-edge-hover: var(--color-edge-hover);
|
|
66
|
+
--color-edge-selected: var(--color-edge-selected);
|
|
67
|
+
--color-edge-active: var(--color-edge-active);
|
|
68
|
+
--color-edge-success: var(--color-edge-success);
|
|
69
|
+
--color-edge-error: var(--color-edge-error);
|
|
70
|
+
--color-edge-compatible: var(--color-edge-compatible);
|
|
71
|
+
--color-edge-incompatible: var(--color-edge-incompatible);
|
|
72
|
+
--color-edge-label-bg: var(--color-edge-label-bg);
|
|
73
|
+
--color-edge-label-text: var(--color-edge-label-text);
|
|
74
|
+
--color-datatype-string: var(--color-datatype-string);
|
|
75
|
+
--color-datatype-number: var(--color-datatype-number);
|
|
76
|
+
--color-datatype-boolean: var(--color-datatype-boolean);
|
|
77
|
+
--color-datatype-object: var(--color-datatype-object);
|
|
78
|
+
--color-datatype-array: var(--color-datatype-array);
|
|
79
|
+
--color-datatype-date: var(--color-datatype-date);
|
|
80
|
+
--color-datatype-binary: var(--color-datatype-binary);
|
|
81
|
+
--color-datatype-any: var(--color-datatype-any);
|
|
82
|
+
}
|
|
@@ -506,6 +506,89 @@
|
|
|
506
506
|
--color-focus-ring: var(--color-action-primary-bg);
|
|
507
507
|
}
|
|
508
508
|
|
|
509
|
+
/* G19: canvas, node-category, edge and data-type tokens (workflow builders,
|
|
510
|
+
* graphs, mappers). Every value ALIASES an existing chart-* / status-* /
|
|
511
|
+
* surface token — no new palette — so light, dark, every brand and the
|
|
512
|
+
* expressive / high-contrast themes come for free.
|
|
513
|
+
*
|
|
514
|
+
* Declared on each element that can carry a theme (not only :root) so a
|
|
515
|
+
* `.dark` subtree re-resolves the aliases against ITS chart/status values;
|
|
516
|
+
* a var() alias declared only on :root would inherit the light value. */
|
|
517
|
+
:root,
|
|
518
|
+
[data-theme],
|
|
519
|
+
[data-brand],
|
|
520
|
+
.dark {
|
|
521
|
+
/* Canvas */
|
|
522
|
+
--color-canvas-bg: var(--color-bg-canvas);
|
|
523
|
+
--color-canvas-grid: var(--color-chart-grid);
|
|
524
|
+
--color-canvas-selection: var(--color-bg-accentSubtle);
|
|
525
|
+
--color-canvas-minimap-bg: var(--color-bg-surface);
|
|
526
|
+
--color-canvas-minimap-node: var(--color-chart-axis);
|
|
527
|
+
--color-canvas-minimap-mask: var(--color-bg-overlay);
|
|
528
|
+
--color-canvas-control-bg: var(--color-bg-elevated);
|
|
529
|
+
/* Node surface */
|
|
530
|
+
--color-node-bg: var(--color-bg-surface);
|
|
531
|
+
--color-node-bg-hover: var(--color-bg-elevated);
|
|
532
|
+
--color-node-border: var(--color-border-default);
|
|
533
|
+
--color-node-border-hover: var(--color-border-strong);
|
|
534
|
+
--color-node-border-selected: var(--color-action-primary-bg);
|
|
535
|
+
--color-node-text: var(--color-text-primary);
|
|
536
|
+
--color-node-text-muted: var(--color-text-muted);
|
|
537
|
+
--color-node-handle: var(--color-border-strong);
|
|
538
|
+
--color-node-handle-connected: var(--color-action-primary-bg);
|
|
539
|
+
/* Node categories (solid accent + subtle tint for headers / icon wells) */
|
|
540
|
+
--color-node-trigger: var(--color-chart-7); /* starts a run: webhook, schedule, API, event */
|
|
541
|
+
--color-node-trigger-subtle: color-mix(in oklab, var(--color-node-trigger) 14%, transparent);
|
|
542
|
+
--color-node-action: var(--color-chart-1); /* does work: an app or service step */
|
|
543
|
+
--color-node-action-subtle: color-mix(in oklab, var(--color-node-action) 14%, transparent);
|
|
544
|
+
--color-node-logic: var(--color-chart-3); /* branches: if, switch, router */
|
|
545
|
+
--color-node-logic-subtle: color-mix(in oklab, var(--color-node-logic) 14%, transparent);
|
|
546
|
+
--color-node-loop: var(--color-chart-4); /* iterates: loop, batch, map */
|
|
547
|
+
--color-node-loop-subtle: color-mix(in oklab, var(--color-node-loop) 14%, transparent);
|
|
548
|
+
--color-node-data: var(--color-chart-2); /* shapes data: set, filter, aggregate, transform, code */
|
|
549
|
+
--color-node-data-subtle: color-mix(in oklab, var(--color-node-data) 14%, transparent);
|
|
550
|
+
--color-node-integration: var(--color-chart-12); /* talks to the outside: HTTP, database, connector */
|
|
551
|
+
--color-node-integration-subtle: color-mix(in oklab, var(--color-node-integration) 14%, transparent);
|
|
552
|
+
--color-node-ai: var(--color-chart-8); /* model, agent, embedding, assistant */
|
|
553
|
+
--color-node-ai-subtle: color-mix(in oklab, var(--color-node-ai) 14%, transparent);
|
|
554
|
+
--color-node-human: var(--color-chart-6); /* waits on a person: approval, form, review */
|
|
555
|
+
--color-node-human-subtle: color-mix(in oklab, var(--color-node-human) 14%, transparent);
|
|
556
|
+
--color-node-utility: var(--color-chart-axis); /* wait, no-op, note, merge */
|
|
557
|
+
--color-node-utility-subtle: color-mix(in oklab, var(--color-node-utility) 14%, transparent);
|
|
558
|
+
--color-node-end: var(--color-chart-5); /* stops a run: end, error, return */
|
|
559
|
+
--color-node-end-subtle: color-mix(in oklab, var(--color-node-end) 14%, transparent);
|
|
560
|
+
--color-node-default: var(--color-chart-1); /* a node with no known category */
|
|
561
|
+
--color-node-default-subtle: color-mix(in oklab, var(--color-node-default) 14%, transparent);
|
|
562
|
+
/* Node execution state (ring / badge) */
|
|
563
|
+
--color-node-state-idle: var(--color-border-default);
|
|
564
|
+
--color-node-state-queued: var(--color-chart-axis);
|
|
565
|
+
--color-node-state-running: var(--color-status-info-bg);
|
|
566
|
+
--color-node-state-success: var(--color-status-success-bg);
|
|
567
|
+
--color-node-state-warning: var(--color-status-warning-bg);
|
|
568
|
+
--color-node-state-error: var(--color-status-error-bg);
|
|
569
|
+
--color-node-state-skipped: var(--color-chart-axis);
|
|
570
|
+
/* Edges */
|
|
571
|
+
--color-edge-default: var(--color-chart-axis);
|
|
572
|
+
--color-edge-hover: var(--color-text-secondary);
|
|
573
|
+
--color-edge-selected: var(--color-action-primary-bg);
|
|
574
|
+
--color-edge-active: var(--color-status-info-bg);
|
|
575
|
+
--color-edge-success: var(--color-status-success-bg);
|
|
576
|
+
--color-edge-error: var(--color-status-error-bg);
|
|
577
|
+
--color-edge-compatible: var(--color-status-info-bg);
|
|
578
|
+
--color-edge-incompatible: var(--color-status-error-bg);
|
|
579
|
+
--color-edge-label-bg: var(--color-bg-elevated);
|
|
580
|
+
--color-edge-label-text: var(--color-text-secondary);
|
|
581
|
+
/* Port / mapper data types */
|
|
582
|
+
--color-datatype-string: var(--color-chart-3);
|
|
583
|
+
--color-datatype-number: var(--color-chart-10);
|
|
584
|
+
--color-datatype-boolean: var(--color-chart-2);
|
|
585
|
+
--color-datatype-object: var(--color-chart-12);
|
|
586
|
+
--color-datatype-array: var(--color-chart-4);
|
|
587
|
+
--color-datatype-date: var(--color-chart-6);
|
|
588
|
+
--color-datatype-binary: var(--color-chart-11);
|
|
589
|
+
--color-datatype-any: var(--color-chart-axis);
|
|
590
|
+
}
|
|
591
|
+
|
|
509
592
|
/* Large Typography Scale - Auto-generated */
|
|
510
593
|
[data-typography="large"] {
|
|
511
594
|
--font-size-body-sm: 16px;
|
|
@@ -141,6 +141,71 @@ export default {
|
|
|
141
141
|
'chart-axis': 'var(--color-chart-axis)',
|
|
142
142
|
'chart-positive': 'var(--color-chart-positive)',
|
|
143
143
|
'chart-negative': 'var(--color-chart-negative)',
|
|
144
|
+
|
|
145
|
+
// G19 — canvas / node / edge / data-type tokens
|
|
146
|
+
'canvas-bg': 'var(--color-canvas-bg)',
|
|
147
|
+
'canvas-grid': 'var(--color-canvas-grid)',
|
|
148
|
+
'canvas-selection': 'var(--color-canvas-selection)',
|
|
149
|
+
'canvas-minimap-bg': 'var(--color-canvas-minimap-bg)',
|
|
150
|
+
'canvas-minimap-node': 'var(--color-canvas-minimap-node)',
|
|
151
|
+
'canvas-minimap-mask': 'var(--color-canvas-minimap-mask)',
|
|
152
|
+
'canvas-control-bg': 'var(--color-canvas-control-bg)',
|
|
153
|
+
'node-bg': 'var(--color-node-bg)',
|
|
154
|
+
'node-bg-hover': 'var(--color-node-bg-hover)',
|
|
155
|
+
'node-border': 'var(--color-node-border)',
|
|
156
|
+
'node-border-hover': 'var(--color-node-border-hover)',
|
|
157
|
+
'node-border-selected': 'var(--color-node-border-selected)',
|
|
158
|
+
'node-text': 'var(--color-node-text)',
|
|
159
|
+
'node-text-muted': 'var(--color-node-text-muted)',
|
|
160
|
+
'node-handle': 'var(--color-node-handle)',
|
|
161
|
+
'node-handle-connected': 'var(--color-node-handle-connected)',
|
|
162
|
+
'node-trigger': 'var(--color-node-trigger)',
|
|
163
|
+
'node-trigger-subtle': 'var(--color-node-trigger-subtle)',
|
|
164
|
+
'node-action': 'var(--color-node-action)',
|
|
165
|
+
'node-action-subtle': 'var(--color-node-action-subtle)',
|
|
166
|
+
'node-logic': 'var(--color-node-logic)',
|
|
167
|
+
'node-logic-subtle': 'var(--color-node-logic-subtle)',
|
|
168
|
+
'node-loop': 'var(--color-node-loop)',
|
|
169
|
+
'node-loop-subtle': 'var(--color-node-loop-subtle)',
|
|
170
|
+
'node-data': 'var(--color-node-data)',
|
|
171
|
+
'node-data-subtle': 'var(--color-node-data-subtle)',
|
|
172
|
+
'node-integration': 'var(--color-node-integration)',
|
|
173
|
+
'node-integration-subtle': 'var(--color-node-integration-subtle)',
|
|
174
|
+
'node-ai': 'var(--color-node-ai)',
|
|
175
|
+
'node-ai-subtle': 'var(--color-node-ai-subtle)',
|
|
176
|
+
'node-human': 'var(--color-node-human)',
|
|
177
|
+
'node-human-subtle': 'var(--color-node-human-subtle)',
|
|
178
|
+
'node-utility': 'var(--color-node-utility)',
|
|
179
|
+
'node-utility-subtle': 'var(--color-node-utility-subtle)',
|
|
180
|
+
'node-end': 'var(--color-node-end)',
|
|
181
|
+
'node-end-subtle': 'var(--color-node-end-subtle)',
|
|
182
|
+
'node-default': 'var(--color-node-default)',
|
|
183
|
+
'node-default-subtle': 'var(--color-node-default-subtle)',
|
|
184
|
+
'node-state-idle': 'var(--color-node-state-idle)',
|
|
185
|
+
'node-state-queued': 'var(--color-node-state-queued)',
|
|
186
|
+
'node-state-running': 'var(--color-node-state-running)',
|
|
187
|
+
'node-state-success': 'var(--color-node-state-success)',
|
|
188
|
+
'node-state-warning': 'var(--color-node-state-warning)',
|
|
189
|
+
'node-state-error': 'var(--color-node-state-error)',
|
|
190
|
+
'node-state-skipped': 'var(--color-node-state-skipped)',
|
|
191
|
+
'edge-default': 'var(--color-edge-default)',
|
|
192
|
+
'edge-hover': 'var(--color-edge-hover)',
|
|
193
|
+
'edge-selected': 'var(--color-edge-selected)',
|
|
194
|
+
'edge-active': 'var(--color-edge-active)',
|
|
195
|
+
'edge-success': 'var(--color-edge-success)',
|
|
196
|
+
'edge-error': 'var(--color-edge-error)',
|
|
197
|
+
'edge-compatible': 'var(--color-edge-compatible)',
|
|
198
|
+
'edge-incompatible': 'var(--color-edge-incompatible)',
|
|
199
|
+
'edge-label-bg': 'var(--color-edge-label-bg)',
|
|
200
|
+
'edge-label-text': 'var(--color-edge-label-text)',
|
|
201
|
+
'datatype-string': 'var(--color-datatype-string)',
|
|
202
|
+
'datatype-number': 'var(--color-datatype-number)',
|
|
203
|
+
'datatype-boolean': 'var(--color-datatype-boolean)',
|
|
204
|
+
'datatype-object': 'var(--color-datatype-object)',
|
|
205
|
+
'datatype-array': 'var(--color-datatype-array)',
|
|
206
|
+
'datatype-date': 'var(--color-datatype-date)',
|
|
207
|
+
'datatype-binary': 'var(--color-datatype-binary)',
|
|
208
|
+
'datatype-any': 'var(--color-datatype-any)',
|
|
144
209
|
},
|
|
145
210
|
spacing: {
|
|
146
211
|
'page-padding': 'var(--space-pagePadding)',
|