@burdenoff/fe-libs 2026.1021.4 → 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/assistant/quota.d.ts +6 -3
- package/dist/shared/assistant/ui/AssistantOverlay.js +8 -8
- package/dist/shared/components/QuotaUpgradeBridge.d.ts +99 -0
- package/dist/shared/components/QuotaUpgradeBridge.js +106 -0
- package/dist/shared/components/UpgradePromptModal.d.ts +7 -3
- package/dist/shared/components/index.d.ts +2 -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-assistant.js +11 -11
- package/dist/shared-components.js +7 -6
- package/dist/shared-utils.js +19 -18
- package/dist/shared.js +135 -133
- 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/dist/shared.js
CHANGED
|
@@ -2,143 +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 {
|
|
72
|
-
import {
|
|
73
|
-
import {
|
|
74
|
-
import {
|
|
75
|
-
import {
|
|
76
|
-
import {
|
|
77
|
-
import {
|
|
78
|
-
import {
|
|
79
|
-
import {
|
|
80
|
-
import {
|
|
81
|
-
import {
|
|
82
|
-
import {
|
|
83
|
-
import {
|
|
84
|
-
import {
|
|
85
|
-
import {
|
|
86
|
-
import {
|
|
87
|
-
import {
|
|
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";
|
|
88
90
|
import "./shared-components.js";
|
|
89
|
-
import { DevtoolsSink as
|
|
90
|
-
import { BroadcastChannelSink as
|
|
91
|
-
import { BackendAuditSink as
|
|
92
|
-
import { AnalyticsConsentBanner as
|
|
93
|
-
import { OtelBrowserSink as
|
|
94
|
-
import { EventBusProvider as
|
|
95
|
-
import { useDebounce as
|
|
96
|
-
import { useThrottle as
|
|
97
|
-
import { BREAKPOINTS as
|
|
98
|
-
import { useOnClickOutside as
|
|
99
|
-
import { useKeyPress as
|
|
100
|
-
import { useExclusiveMenu as
|
|
101
|
-
import { useLocalStorage as
|
|
102
|
-
import { useSessionStorage as
|
|
103
|
-
import { usePrevious as
|
|
104
|
-
import { useConditionalToggle as
|
|
105
|
-
import { usePagination as
|
|
106
|
-
import { useAsync as
|
|
107
|
-
import { MODIFIER_KEYS as
|
|
108
|
-
import { useKeyboardShortcuts as
|
|
109
|
-
import { useHotkeys as
|
|
110
|
-
import { useShortcutHelp as
|
|
111
|
-
import { GLOBAL_SHORTCUT_CATEGORIES as
|
|
112
|
-
import { useLogger as
|
|
113
|
-
import { useHasAnimated as
|
|
114
|
-
import { useReferralAttribution as
|
|
115
|
-
import { useRecordProductVisit as
|
|
116
|
-
import { PUSH_DEVICE_ID_STORAGE_KEY as
|
|
117
|
-
import { usePushDeviceRegistration as
|
|
118
|
-
import { QUOTA_EXHAUSTED_EVENT as
|
|
119
|
-
import { PLAN_USAGE_SNAPSHOT_EVENT as
|
|
120
|
-
import { appendContextToPath as
|
|
121
|
-
import { UNSAVED_CHANGE_LABEL_MAX as
|
|
122
|
-
import { MicrofrontendContext as
|
|
123
|
-
import { withTourProgressStatus as
|
|
124
|
-
import { detectDeviceType as
|
|
125
|
-
import { useTourPlayer as
|
|
126
|
-
import { TourSpotlight as
|
|
127
|
-
import { TourTooltip as
|
|
128
|
-
import { TourPlayerProvider as
|
|
129
|
-
import { TourPlayer as
|
|
130
|
-
import { getTourContextRank as
|
|
131
|
-
import { ToursProvider as
|
|
132
|
-
import { TourInitializer as
|
|
133
|
-
import { AppShellProvider as
|
|
134
|
-
import { MicrofrontendProvider as
|
|
135
|
-
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";
|
|
136
138
|
import "./shared-tours.js";
|
|
137
|
-
import { acknowledgeNativePurchase as
|
|
138
|
-
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";
|
|
139
141
|
import "./shared-native.js";
|
|
140
142
|
import "./shared/actors/index.js";
|
|
141
143
|
//#region src/shared/index.ts
|
|
142
|
-
var
|
|
144
|
+
var rs = "1.0.0";
|
|
143
145
|
//#endregion
|
|
144
|
-
export { ui as ASSISTANT_WIDGET_TOGGLE_EVENT, br as AccessDenied, dr as ActorIdentity, ki as AnalyticsConsentBanner, yt as ApolloClient, bt as ApolloProvider, Ar as AppErrorBoundary, xn as AppInitializer, ho as AppShellProvider, di as AssistantWidget, Ve as BACKEND_ERROR_EVENT, Se as BOTMANOR_PRODUCT_SLUG, Hi as BREAKPOINTS, Oi as BackendAuditSink, Di 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, ke as DEFAULT_SHELL_CONFIG, R as DESKTOP_UPDATE_UNSUPPORTED, z as DESKTOP_WINDOW_STATE_DEFAULT, Ti as DesktopUpdateToast, Ei as DevtoolsSink, mr as ErrorBoundary, Sr as ErrorFallback, Fi as EventBusProvider, Ao as FE_SHARED_VERSION, jr as FeatureFlagProvider, Ir as FeatureGate, Fe as GATEWAYS, fa as GLOBAL_SHORTCUT_CATEGORIES, dt as GatewayProvider, Un as INLINE_ENCODE, xt as InMemoryCache, Zr as KeyboardHelpDialogWrapper, ai as LandingGateView, oi as LandingOrDashboardRedirect, Cr as LoadingFallback, wn as LogLevel, En as LogManager, Tn as Logger, sa as MODIFIER_KEYS, fi as Markdown, Ra as MicrofrontendContext, Er as MicrofrontendErrorBoundary, _o as MicrofrontendProvider, Pi as OtelBrowserSink, Oa as PLAN_USAGE_SNAPSHOT_EVENT, ca 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, ba 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, Ta as QUOTA_EXHAUSTED_EVENT, Qr as QuotaMeter, Fn as RESOURCE_CAP_EXCEEDED_CODE, hr as RequireAuth, gr as RequireGuest, Ai 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, mo as TourInitializer, Za as TourPlayer, Ka as TourPlayerProvider, Wa as TourSpotlight, Ga as TourTooltip, vo as TourTrigger, Qa as TourTriggerButton, co as ToursProvider, Na as UNSAVED_CHANGE_LABEL_MAX, Ln as UPGRADE_ERROR_CODES, $r as UPGRADE_PROMPT_EVENT, ni as UpgradeInlineBanner, ei as UpgradePromptModal, _t as WsLink, yo as acknowledgeNativePurchase, r as alertTokens, ja 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, i as categoryTokens, rn as checkRemoteSLO, an as checkSLO, 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, Ii as createEventBus, pa 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, Va as detectDeviceType, Rr as detectPlatform, Ue as dispatchBackendErrorEvent, Ea 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, ma as getGlobalShortcutsByCategory, Re as getGraphQLEndpoint, re as getLegacyDesktopRuntime, Ht as getNativeBridge, ri as getNativeEntryRoutes, bo as getNativeProducts, xo as getNativePurchases, xa as getOrCreatePushDeviceId, Ut as getPlatform, Ee as getProductUrl, De as getProductsWithUrls, Nn as getProfileScopedKey, s as getProgressTokens, Eo as getPushOptInController, Ha 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, eo as getTourContextRank, to as getTourRouteCatalog, no as getTourRouteModules, ro as getTourRoutePages, u as getTrendTokens, ct as getWorkspaceClient, ze as getWorkspaceTokenPayload, St as gql, rt as graphqlFetch, At as hasAuthGraphQLErrors, si as hasStoredValidSession, lt as initializeAppClients, An as initializeLogger, ie as installDesktopDeepLinkHandler, ae as installDesktopNavigateHandler, de as installGatewayFetchRewrite, So 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, Co as isNativeIAPAvailable, Vn as isQuotaExhaustedError, ye as isSameProductSlug, Lt as isSharedSsoCookieDomain, je as isShellLessRoute, hn as isSsoNavigationPending, Yt as isStandalonePWA, Wr as isTabletDevice, io 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, Pa as listUnsavedChanges, Dn as logManager, Je as markConnectionHealthy, gn as markSsoDepositDone, _n as markSsoDepositPending, Gr as matchesKeyCombo, ha 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, ao as normalizeTourPath, se as onDesktopUpdateState, ce as onDesktopWindowState, en as openUrlInNewTabWithAllowlist, Jr as parseKeyCombo, k as pluralize, vt as prepareWorkspaceRequest, d as progressTokens, ka as publishPlanUsageSnapshot, wo as purchaseNativeProduct, ji as readAnalyticsConsent, Mi as readAnalyticsConsentChoice, rr as readInitialNetworkStatus, zt as readShellSsoCookie, yn as readSsoDepositState, Do as recordPushPermissionPromptDismissed, Nt as redirectToLogin, cn as redirectToSSO, ir as reduceNetworkStatus, le as registerDesktopNavigator, Sa as registerPushDevice, Oo as registerPushOptInController, oo as registerTourRouteCatalog, Fa as registerUnsavedChange, tn as replaceLocationWithAllowlist, ut as resetAppClients, bi as resolveActionSheetOutcome, go as resolveAppShellObservabilityConfig, me as resolveAuthBridgeConfig, fe as resolveGatewayBases, it as resolveGatewayUrl, ue as resolveGatewayUrls, ci as resolveLandingGate, he as resolveShellAuthBridgeConfig, so as resolveTourTargetPath, To as restoreNativePurchases, Gn as selectInlineBase64, Ni as setAnalyticsConsent, Bt as setSSoCookie, Vt as setShellSsoCookies, jn as setUserContext, bn as shouldAttemptSsoDeposit, Yr as shouldEnableKeyboardShortcuts, Xr as shouldIgnoreShortcut, ko as shouldPromptForPushPermission, Me as shouldShowBreadcrumb, ii 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, Ca as unregisterPushDevice, Ia as unsavedChangesBlocking, xi as useActionSheet, pr as useActorProfiles, Ct as useApolloClient, gi as useAppState, aa as useAsync, oa as useAsyncImmediate, lo as useAutoStartTour, Ui as useBreakpoint, ta as useConditionalToggle, e as useCopyToClipboard, Ma as useCurrentContextSearchParams, Bi as useDebounce, Si as useDesktop, Ci as useDesktopUpdateState, wi as useDesktopWindowState, _i as useDeviceInfo, Li as useEvent, Ri as useEventBus, zi as useEventEmitter, Yi as useExclusiveMenu, Nr as useFeatureFlag, Pr as useFeatureFlagDetails, Fr as useFeatureFlagValue, Mr as useFeatureFlags, ft as useGateway, pt as useGatewayClient, vi as useHaptics, _a as useHasAnimated, gt as useHasAuthToken, ua as useHotkeys, qa as useIsTourPlaying, qi as useKeyPress, Ji as useKeyboardShortcut, la as useKeyboardShortcuts, wt as useLazyQuery, Xi as useLocalStorage, ga as useLogger, t as useMediaQuery, za as useMicrofrontendContext, Wi as useMobileBreakpoint, Tt as useMutation, hi as useNativeKeyboard, pi as useNativePlatform, ar as useNetworkStatus, Gi as useOnClickOutside, Ki as useOnClickOutsideWithRef, Or as usePWA, ia as usePagination, $a as usePlayTour, Qi as usePrevious, $i as usePreviousDistinct, ea as usePreviousHistory, lr as usePullToRefresh, wa as usePushDeviceRegistration, Et as useQuery, Da as useQuotaErrorToast, ya as useRecordProductVisit, va as useReferralAttribution, Sn as useRegistryHelpers, ur as useReturnFocus, mi as useSafeArea, mt as useSafeGateway, ht as useSafeGatewayClient, uo as useSafeToursContext, Zi as useSessionStorage, Cn as useShellNavigate, da as useShortcutHelp, Ja as useStartTour, yi as useStatusBar, Ya as useStopTour, Dt as useSubscription, Vi as useThrottle, na as useToggle, ra as useToggleObject, Ua as useTourPlayer, Xa as useTourPlayerContext, fo as useTours, po as useToursContext, La as useUnsavedChanges, Aa as useUpgradePrompt, li as useVoiceInput, Ba 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
|