@elevasis/ui 2.68.0 → 2.69.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/index.js +3 -3
- package/dist/app/index.d.ts +577 -367
- package/dist/app/index.js +12 -21
- package/dist/auth/index.css +149 -149
- package/dist/auth/index.d.ts +5 -0
- package/dist/auth/index.js +7 -7
- package/dist/charts/index.css +208 -208
- package/dist/charts/index.js +7 -7
- package/dist/{chunk-JC5W55J3.js → chunk-26BTE3Z4.js} +1 -1
- package/dist/{chunk-ZFISGKYW.js → chunk-4JHLS234.js} +1 -1
- package/dist/{chunk-76IVMVI3.js → chunk-6PZFOHJK.js} +3 -3
- package/dist/{chunk-WPIASV3H.js → chunk-7WJEPTE7.js} +2 -2
- package/dist/{chunk-UFTM5SZZ.js → chunk-AKANHRQ5.js} +9 -3
- package/dist/{chunk-NDHMZT2G.js → chunk-C75XWBYZ.js} +1 -1
- package/dist/{chunk-R6NMRXNO.js → chunk-FLECOYUS.js} +1 -1
- package/dist/{chunk-2MTP3H3A.js → chunk-IRV6KJPV.js} +1 -1
- package/dist/{chunk-OOACTYRA.js → chunk-IT7GTJCB.js} +1 -1
- package/dist/{chunk-QYI5BZKM.js → chunk-MFLM7BVC.js} +1 -1
- package/dist/{chunk-TGPJNKDU.js → chunk-MRVGQLWN.js} +4 -4
- package/dist/{chunk-L3HFJFYF.js → chunk-NM4A63KJ.js} +30 -48
- package/dist/{chunk-SIVUCZXQ.js → chunk-NU3NBXHP.js} +1 -1
- package/dist/{chunk-HJVPVS57.js → chunk-RW64UJWT.js} +5 -5
- package/dist/{chunk-5NRJ2BLQ.js → chunk-VDX6DL7Z.js} +1 -1
- package/dist/{chunk-ZGCWTWBD.js → chunk-WXHAHKKI.js} +6167 -5883
- package/dist/{chunk-75NOC536.js → chunk-XAZR3T6Y.js} +5 -5
- package/dist/{chunk-GBXTRSAU.js → chunk-XQ3ILKYN.js} +1 -1
- package/dist/{chunk-TYKAKJGW.js → chunk-YCRINA2D.js} +1 -1
- package/dist/{chunk-FK3K2VK2.js → chunk-YGCMMOY4.js} +80 -699
- package/dist/{chunk-ZWS3TCQR.js → chunk-YNRYIXUT.js} +22 -109
- package/dist/{chunk-ZNKZMK2E.js → chunk-ZD6LM53O.js} +5 -5
- package/dist/chunk-ZPTEGGKU.js +631 -0
- package/dist/components/index.css +208 -208
- package/dist/components/index.d.ts +1614 -256
- package/dist/components/index.js +31 -30
- package/dist/components/navigation/index.css +149 -149
- package/dist/components/navigation/index.js +8 -8
- package/dist/features/auth/index.css +149 -149
- package/dist/features/auth/index.d.ts +457 -163
- package/dist/features/auth/index.js +9 -9
- package/dist/features/clients/index.css +208 -208
- package/dist/features/clients/index.d.ts +39 -1
- package/dist/features/clients/index.js +8 -7
- package/dist/features/content/index.css +659 -0
- package/dist/features/content/index.d.ts +1788 -0
- package/dist/features/content/index.js +2180 -0
- package/dist/features/crm/index.d.ts +584 -369
- package/dist/features/crm/index.js +9 -9
- package/dist/features/dashboard/index.d.ts +0 -6
- package/dist/features/dashboard/index.js +11 -10
- package/dist/features/delivery/index.d.ts +457 -163
- package/dist/features/delivery/index.js +8 -8
- package/dist/features/knowledge/index.css +149 -149
- package/dist/features/knowledge/index.js +7 -7
- package/dist/features/lead-gen/index.d.ts +20 -91
- package/dist/features/lead-gen/index.js +9 -9
- package/dist/features/monitoring/index.js +10 -10
- package/dist/features/monitoring/requests/index.js +9 -14
- package/dist/features/operations/index.d.ts +0 -84
- package/dist/features/operations/index.js +14 -13
- package/dist/features/settings/index.d.ts +457 -163
- package/dist/features/settings/index.js +10 -10
- package/dist/hooks/access/index.css +149 -149
- package/dist/hooks/access/index.d.ts +5 -0
- package/dist/hooks/access/index.js +7 -7
- package/dist/hooks/delivery/index.d.ts +457 -163
- package/dist/hooks/delivery/index.js +2 -2
- package/dist/hooks/index.d.ts +2190 -237
- package/dist/hooks/index.js +7 -7
- package/dist/hooks/operations/command-view/utils/transformCommandViewData.d.ts +0 -6
- package/dist/hooks/published.d.ts +2190 -237
- package/dist/hooks/published.js +7 -7
- package/dist/initialization/index.d.ts +464 -164
- package/dist/knowledge/index.css +149 -149
- package/dist/knowledge/index.d.ts +4 -88
- package/dist/knowledge/index.js +3213 -3203
- package/dist/{knowledge-search-index-6EZNBNSR.js → knowledge-search-index-LP2WVSQX.js} +689 -695
- package/dist/layout/index.css +149 -149
- package/dist/layout/index.js +10 -10
- package/dist/organization/index.d.ts +7 -1
- package/dist/profile/index.d.ts +457 -163
- package/dist/provider/index.d.ts +577 -368
- package/dist/provider/index.js +7 -7
- package/dist/provider/published.css +149 -149
- package/dist/provider/published.d.ts +577 -368
- package/dist/provider/published.js +7 -7
- package/dist/supabase/index.d.ts +906 -339
- package/dist/test-utils/index.d.ts +10 -2
- package/dist/test-utils/index.js +39 -10
- package/dist/theme/index.js +3 -3
- package/dist/theme/presets/index.js +1 -1
- package/dist/types/index.d.ts +464 -170
- package/dist/utils/index.d.ts +0 -6
- package/dist/utils/index.js +1 -1
- package/dist/vite/index.js +2 -2
- package/dist/vite-plugin-knowledge/index.js +1 -1
- package/package.json +9 -5
- package/src/features/README.md +28 -28
- /package/dist/{chunk-RBGVNPA6.js → chunk-XQBURFKM.js} +0 -0
|
@@ -154,7 +154,6 @@ interface OrgOsRouteContractSystem {
|
|
|
154
154
|
path?: string | null;
|
|
155
155
|
} | null;
|
|
156
156
|
enabled?: boolean;
|
|
157
|
-
devOnly?: boolean;
|
|
158
157
|
}
|
|
159
158
|
type OrgOsRouteContractSystemsDomain = Record<string, OrgOsRouteContractSystem> | {
|
|
160
159
|
systems: readonly OrgOsRouteContractSystem[];
|
|
@@ -175,8 +174,17 @@ interface OrgOsUiRouteContractOptions {
|
|
|
175
174
|
routeTreeSource?: string;
|
|
176
175
|
routePaths?: Iterable<string>;
|
|
177
176
|
mode?: OrgOsUiRouteContractMode;
|
|
177
|
+
/**
|
|
178
|
+
* Route paths whose route file — or an ancestor layout route — wraps the page
|
|
179
|
+
* in an `AccessGuard`. Supply this to enable the `unguarded-beta-route` check.
|
|
180
|
+
*
|
|
181
|
+
* Omitted means the beta-guard check does not run. Hiding a System from
|
|
182
|
+
* navigation (`lifecycle: 'beta'`) does not make its route unreachable, so a
|
|
183
|
+
* caller that can resolve route files should always pass this.
|
|
184
|
+
*/
|
|
185
|
+
guardedRoutePaths?: Iterable<string>;
|
|
178
186
|
}
|
|
179
|
-
type OrgOsUiRouteContractIssueKind = 'missing-system' | 'missing-route';
|
|
187
|
+
type OrgOsUiRouteContractIssueKind = 'missing-system' | 'missing-route' | 'unguarded-beta-route';
|
|
180
188
|
interface OrgOsUiRouteContractIssue {
|
|
181
189
|
target: OrgOsUiRouteContractTarget;
|
|
182
190
|
kind: OrgOsUiRouteContractIssueKind;
|
package/dist/test-utils/index.js
CHANGED
|
@@ -2,10 +2,10 @@ import { server, handlers } from '../chunk-7XKCG5CT.js';
|
|
|
2
2
|
export { handlers, server } from '../chunk-7XKCG5CT.js';
|
|
3
3
|
import { mockWorkOSUser, mockUseAuth, mockUnauthenticatedUser, mockAuthenticatedUser, mockAuthLoading, createMockUseAuth } from '../chunk-N7U24M2J.js';
|
|
4
4
|
export { createMockUseAuth, mockAuthLoading, mockAuthenticatedUser, mockUnauthenticatedUser, mockUseAuth, mockWorkOSUser } from '../chunk-N7U24M2J.js';
|
|
5
|
-
import '../chunk-
|
|
6
|
-
import { ApiClientProvider } from '../chunk-
|
|
5
|
+
import '../chunk-26BTE3Z4.js';
|
|
6
|
+
import { ApiClientProvider } from '../chunk-VDX6DL7Z.js';
|
|
7
7
|
import '../chunk-DD3CCMCZ.js';
|
|
8
|
-
import '../chunk-
|
|
8
|
+
import '../chunk-NM4A63KJ.js';
|
|
9
9
|
import '../chunk-Y6I3IC45.js';
|
|
10
10
|
import '../chunk-6SSQGWK7.js';
|
|
11
11
|
import { ElevasisServiceProvider } from '../chunk-BI5VDO2K.js';
|
|
@@ -178,26 +178,33 @@ function ownsOrgOsSystem(ownerSystemId, systemId) {
|
|
|
178
178
|
function getOrgOsRouteContractSystems(organizationModel) {
|
|
179
179
|
const { systems } = organizationModel;
|
|
180
180
|
const arraySystems = systems.systems;
|
|
181
|
-
if (Array.isArray(arraySystems))
|
|
181
|
+
if (Array.isArray(arraySystems)) {
|
|
182
|
+
return arraySystems.map((system) => ({
|
|
183
|
+
...system,
|
|
184
|
+
betaByAncestry: system.lifecycle === "beta"
|
|
185
|
+
}));
|
|
186
|
+
}
|
|
182
187
|
const result = [];
|
|
183
|
-
const visit = (entries, prefix = "") => {
|
|
188
|
+
const visit = (entries, prefix = "", ancestorBeta = false) => {
|
|
184
189
|
for (const [key, system] of Object.entries(entries)) {
|
|
185
190
|
const id = prefix ? `${prefix}.${key}` : system.id || key;
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
if (system.
|
|
191
|
+
const betaByAncestry = ancestorBeta || system.lifecycle === "beta";
|
|
192
|
+
result.push({ ...system, id, betaByAncestry });
|
|
193
|
+
if (system.systems) visit(system.systems, id, betaByAncestry);
|
|
194
|
+
if (system.subsystems) visit(system.subsystems, id, betaByAncestry);
|
|
189
195
|
}
|
|
190
196
|
};
|
|
191
197
|
visit(systems);
|
|
192
198
|
return result;
|
|
193
199
|
}
|
|
194
200
|
function collectOrgOsUiRouteContractIssues(options) {
|
|
195
|
-
const { target, organizationModel
|
|
201
|
+
const { target, organizationModel } = options;
|
|
196
202
|
const routePaths = options.routePaths ?? (options.routeTreeSource ? extractOrgOsRouteTreeFullPaths(options.routeTreeSource) : void 0);
|
|
197
203
|
if (!routePaths) {
|
|
198
204
|
throw new Error("Org OS UI route contract requires either routeTreeSource or routePaths.");
|
|
199
205
|
}
|
|
200
206
|
const normalizedRoutePaths = new Set([...routePaths].map(normalizeOrgOsRoutePath));
|
|
207
|
+
const normalizedGuardedPaths = options.guardedRoutePaths ? new Set([...options.guardedRoutePaths].map(normalizeOrgOsRoutePath)) : void 0;
|
|
201
208
|
const systems = getOrgOsRouteContractSystems(organizationModel);
|
|
202
209
|
const modelSystemIds = new Set(systems.map((system) => system.id));
|
|
203
210
|
const issues = [];
|
|
@@ -215,7 +222,6 @@ function collectOrgOsUiRouteContractIssues(options) {
|
|
|
215
222
|
const path = system.ui?.path ?? system.path;
|
|
216
223
|
if (!path || system.enabled === false) continue;
|
|
217
224
|
if (system.lifecycle === "archived" || system.lifecycle === "deprecated") continue;
|
|
218
|
-
if (system.devOnly && mode === "production") continue;
|
|
219
225
|
const ownerSystemId = target.systemIds.find((candidate) => ownsOrgOsSystem(candidate, system.id));
|
|
220
226
|
if (!ownerSystemId) continue;
|
|
221
227
|
checkedPathCount += 1;
|
|
@@ -228,6 +234,16 @@ function collectOrgOsUiRouteContractIssues(options) {
|
|
|
228
234
|
ownerSystemId,
|
|
229
235
|
path: normalizedPath
|
|
230
236
|
});
|
|
237
|
+
continue;
|
|
238
|
+
}
|
|
239
|
+
if (normalizedGuardedPaths && system.betaByAncestry && !normalizedGuardedPaths.has(normalizedPath)) {
|
|
240
|
+
issues.push({
|
|
241
|
+
target,
|
|
242
|
+
kind: "unguarded-beta-route",
|
|
243
|
+
systemId: system.id,
|
|
244
|
+
ownerSystemId,
|
|
245
|
+
path: normalizedPath
|
|
246
|
+
});
|
|
231
247
|
}
|
|
232
248
|
}
|
|
233
249
|
return { issues, checkedPathCount };
|
|
@@ -241,6 +257,19 @@ function formatOrgOsUiRouteContractIssue(issue) {
|
|
|
241
257
|
`- If it should not ship, remove that SystemModule from ${issue.target.shellSource}.`
|
|
242
258
|
].join("\n");
|
|
243
259
|
}
|
|
260
|
+
if (issue.kind === "unguarded-beta-route") {
|
|
261
|
+
return [
|
|
262
|
+
`[unguarded-beta-route] System "${issue.systemId}" is lifecycle "beta" (directly or via an ancestor) and routes to "${issue.path}", but neither that route file nor an ancestor layout route wraps it in an AccessGuard.`,
|
|
263
|
+
`Owner SystemModule: ${issue.ownerSystemId}`,
|
|
264
|
+
"A beta System is hidden from navigation, which is not the same as unreachable \u2014 the route still answers a direct URL.",
|
|
265
|
+
"Fix one of:",
|
|
266
|
+
// Phrased in prose rather than as a guard JSX tag on purpose. The
|
|
267
|
+
// access-key drift scanner in @repo/core matches that tag shape anywhere
|
|
268
|
+
// in a file and would read this message as a real runtime access key.
|
|
269
|
+
`- Wrap the route (or its layout route) in an AccessGuard whose access key is "${issue.systemId}".`,
|
|
270
|
+
`- Or change the System's lifecycle in ${issue.target.orgModelSource} if it is actually meant to be publicly reachable.`
|
|
271
|
+
].join("\n");
|
|
272
|
+
}
|
|
244
273
|
return [
|
|
245
274
|
`[missing-route] System "${issue.systemId}" points to "${issue.path}", but ${issue.target.routeTreePath} does not contain that path.`,
|
|
246
275
|
`Owner SystemModule: ${issue.ownerSystemId}`,
|
package/dist/theme/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { useAvailablePresets } from '../chunk-
|
|
2
|
-
export { PresetsProvider, TOKEN_VAR_MAP, componentThemes, createCssVariablesResolver, mantineThemeOverride, usePresetsContext } from '../chunk-
|
|
3
|
-
export { generateShades, getPreset, PRESETS as presets } from '../chunk-
|
|
1
|
+
export { useAvailablePresets } from '../chunk-4JHLS234.js';
|
|
2
|
+
export { PresetsProvider, TOKEN_VAR_MAP, componentThemes, createCssVariablesResolver, mantineThemeOverride, usePresetsContext } from '../chunk-FLECOYUS.js';
|
|
3
|
+
export { generateShades, getPreset, PRESETS as presets } from '../chunk-XQBURFKM.js';
|
|
4
4
|
import '../chunk-I2KLQ2HA.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { THEME_PRESETS, ThemePresetEnum, generateShades, getPreset, PRESETS as presets } from '../../chunk-
|
|
1
|
+
export { THEME_PRESETS, ThemePresetEnum, generateShades, getPreset, PRESETS as presets } from '../../chunk-XQBURFKM.js';
|
|
2
2
|
import '../../chunk-I2KLQ2HA.js';
|