@elevasis/ui 2.79.0 → 2.80.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/{CoreAuthKitInner-PSTKG4B3.js → CoreAuthKitInner-5J7P7ZDL.js} +1 -1
- package/dist/api/index.js +6 -6
- package/dist/app/index.js +18 -18
- package/dist/auth/index.js +10 -10
- package/dist/charts/index.d.ts +4 -4
- package/dist/charts/index.js +10 -10
- package/dist/{chunk-NCPNKI3V.js → chunk-2HXDI4RY.js} +1 -1
- package/dist/{chunk-7ICEQPBU.js → chunk-2KXSFLU2.js} +1 -1
- package/dist/{chunk-TVTSASST.js → chunk-34B3ACOZ.js} +9 -1
- package/dist/{chunk-KXNRTJAE.js → chunk-3HMRK3RC.js} +1 -1
- package/dist/{chunk-6AJUWYKS.js → chunk-3UO2CJTR.js} +1 -1
- package/dist/{chunk-SJRIO26Q.js → chunk-52G4B33T.js} +2 -2
- package/dist/{chunk-G3WOMHVI.js → chunk-6IWH757Q.js} +4 -3
- package/dist/{chunk-3ONNZ4SO.js → chunk-6MWTTBBT.js} +6 -6
- package/dist/{chunk-4VGPEDQF.js → chunk-7A25EJ4A.js} +121 -68
- package/dist/{chunk-SVZR4GYA.js → chunk-A32PJ2DO.js} +1 -1
- package/dist/{chunk-R42OYAQ2.js → chunk-BG7VCCFB.js} +1 -1
- package/dist/{chunk-QMOBXKW3.js → chunk-BXFZ676L.js} +222 -191
- package/dist/{chunk-5ZK7K7YP.js → chunk-CIGWHY7C.js} +23 -21
- package/dist/{chunk-M77G2MGW.js → chunk-CSEADI37.js} +3 -3
- package/dist/{chunk-3RK2NNJX.js → chunk-DFGQG32T.js} +1 -1
- package/dist/{chunk-VM2OWOXL.js → chunk-GY7FXTC4.js} +2 -3
- package/dist/{chunk-P6HHXMLJ.js → chunk-HVNDBY42.js} +10 -9
- package/dist/{chunk-G4IEH7NX.js → chunk-I5SYS6DT.js} +5 -5
- package/dist/{chunk-2GIJBHZT.js → chunk-IIMC4TRH.js} +3 -3
- package/dist/{chunk-QMAIUPXK.js → chunk-JDPPV2XI.js} +15 -13
- package/dist/{chunk-QLEY6Q7K.js → chunk-JZBMZLD3.js} +1 -1
- package/dist/{chunk-JZQNUQE4.js → chunk-KGUBFIMQ.js} +1 -1
- package/dist/{chunk-GFSOQH3N.js → chunk-MJIDC25O.js} +8 -11
- package/dist/{chunk-WJO6QEI7.js → chunk-MMOR2HQZ.js} +33 -78
- package/dist/{chunk-GWCLI2RX.js → chunk-NGRRAYMO.js} +22 -39
- package/dist/{chunk-A37T4NIZ.js → chunk-NKMBW7WE.js} +10 -10
- package/dist/{chunk-ODXLZZFR.js → chunk-Q6HRTWA6.js} +1 -1
- package/dist/{chunk-3KCLWJDC.js → chunk-QQKYBGBX.js} +22 -11
- package/dist/{chunk-ASI3FDPC.js → chunk-QSN7BWI3.js} +1 -1
- package/dist/{chunk-AZCDL2SS.js → chunk-SPH5WW44.js} +5 -5
- package/dist/{chunk-4IYWLUXA.js → chunk-T6AOVZAI.js} +14 -10
- package/dist/{chunk-SXZMHLH6.js → chunk-U3GB5PDF.js} +4 -4
- package/dist/{chunk-22TWX4XG.js → chunk-VHK5J55Q.js} +8 -8
- package/dist/{chunk-RMLWK3IR.js → chunk-VKA4LQ7N.js} +1 -1
- package/dist/{chunk-2IU6BP6F.js → chunk-W6QOWA3L.js} +11 -10
- package/dist/{chunk-N6K2Q5BM.js → chunk-WDABHUIL.js} +9 -21
- package/dist/{chunk-4ZHX5KOT.js → chunk-WOYW24U7.js} +1 -1
- package/dist/{chunk-MGCXAAX4.js → chunk-XEO2UG4J.js} +15 -9
- package/dist/{chunk-UD657ICS.js → chunk-YJ437RDY.js} +29 -16
- package/dist/{chunk-INCEZAM3.js → chunk-YSFLFD4U.js} +1 -1
- package/dist/{chunk-LDQSTEFW.js → chunk-ZU676PFP.js} +38 -14
- package/dist/components/index.d.ts +18 -6
- package/dist/components/index.js +48 -48
- package/dist/components/navigation/index.js +11 -11
- package/dist/execution/index.js +2 -2
- package/dist/features/auth/index.js +12 -12
- package/dist/features/clients/index.js +14 -15
- package/dist/features/content/index.js +13 -13
- package/dist/features/crm/index.js +16 -16
- package/dist/features/dashboard/index.d.ts +8 -8
- package/dist/features/dashboard/index.js +13 -13
- package/dist/features/delivery/index.js +25 -25
- package/dist/features/knowledge/index.js +10 -10
- package/dist/features/lead-gen/index.d.ts +49 -32
- package/dist/features/lead-gen/index.js +17 -17
- package/dist/features/monitoring/index.d.ts +10 -10
- package/dist/features/monitoring/index.js +15 -15
- package/dist/features/monitoring/requests/index.js +12 -12
- package/dist/features/notes/index.js +1 -1
- package/dist/features/operations/index.d.ts +12 -12
- package/dist/features/operations/index.js +18 -18
- package/dist/features/public-agent-chat/index.js +4 -4
- package/dist/features/seo/index.js +13 -13
- package/dist/features/settings/index.js +13 -13
- package/dist/hooks/access/index.d.ts +60 -1
- package/dist/hooks/access/index.js +10 -10
- package/dist/hooks/delivery/index.js +6 -6
- package/dist/hooks/published.d.ts +286 -93
- package/dist/hooks/published.js +23 -23
- package/dist/hooks/user-notes/index.js +1 -1
- package/dist/initialization/index.d.ts +12 -0
- package/dist/initialization/index.js +1 -1
- package/dist/knowledge/index.js +22 -20
- package/dist/{knowledge-search-index-6GQK55IQ.js → knowledge-search-index-YU6V3FTK.js} +4 -4
- package/dist/layout/index.js +14 -14
- package/dist/organization/index.d.ts +17 -1
- package/dist/organization/index.js +2 -2
- package/dist/profile/index.js +1 -1
- package/dist/provider/ElevasisServiceContext.js +1 -1
- package/dist/provider/index.js +10 -10
- package/dist/provider/published.js +10 -10
- package/dist/sse/index.js +14 -0
- package/dist/test-utils/index.js +6 -6
- package/dist/types/index.d.ts +12 -0
- package/dist/utils/index.d.ts +20 -2
- package/dist/utils/index.js +4 -4
- package/package.json +24 -14
- /package/dist/{chunk-Y6I3IC45.js → chunk-6XBZPKMI.js} +0 -0
- /package/dist/{chunk-5F3QGBEI.js → chunk-7ZUXA2NW.js} +0 -0
|
@@ -1,5 +1,51 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* Branded organization identifiers.
|
|
5
|
+
*
|
|
6
|
+
* Every organization carries TWO distinct ID values that are both plain
|
|
7
|
+
* strings at runtime but mean different things:
|
|
8
|
+
*
|
|
9
|
+
* - WorkOS organization id (`org_...`) -- the auth/JWT identity. Used for API
|
|
10
|
+
* requests, SSE headers, and org-scoped query keys.
|
|
11
|
+
* - Supabase organization id (UUID) -- the database key. Used for
|
|
12
|
+
* `.eq('organization_id', ...)` queries and RLS scoping.
|
|
13
|
+
*
|
|
14
|
+
* They are not interchangeable, yet both are `string` -- so a swap compiles
|
|
15
|
+
* cleanly and fails silently (zero rows on the Supabase side, cross-pollinated
|
|
16
|
+
* cache keys on the API side). These brands make the two non-assignable to one
|
|
17
|
+
* another, turning that silent footgun into a compile error at the sink.
|
|
18
|
+
*
|
|
19
|
+
* Mint a brand only through the `as*` factories below: they are the single
|
|
20
|
+
* validate-and-tag boundary (compile-time brand + runtime format check). The
|
|
21
|
+
* type predicates double as the cast, so no raw `as` cast is needed anywhere.
|
|
22
|
+
*
|
|
23
|
+
* Lives on the published `@repo/core` / `@repo/core/auth` surface so the UI,
|
|
24
|
+
* the API, and the dogfooding `@repo/elevasis-*` packages can all use it.
|
|
25
|
+
*/
|
|
26
|
+
/**
|
|
27
|
+
* The brands are keyed on a string literal, NOT on a `declare const ...: unique symbol`.
|
|
28
|
+
*
|
|
29
|
+
* A `unique symbol` is nominal per declaration site. `@repo/ui`'s rollup-dts pipeline
|
|
30
|
+
* inlines `@repo/core` types into every published subpath bundle (that inlining is what
|
|
31
|
+
* `/sdk release-ui` Step 4a enforces), so a symbol-keyed brand is re-declared once per
|
|
32
|
+
* bundle and TypeScript treats each copy as a different type. In the monorepo every
|
|
33
|
+
* import resolves to this one file and it all works; for an external consumer, a value
|
|
34
|
+
* from `@elevasis/ui/organization` passed into a component from
|
|
35
|
+
* `@elevasis/ui/features/settings` fails with TS2719 "Two different types with this name
|
|
36
|
+
* exist, but they are unrelated." Measured 2026-08-27 against `@elevasis/ui@2.76.0`,
|
|
37
|
+
* where seven separate `supabaseOrgIdBrand` symbols shipped across six ui subpaths and
|
|
38
|
+
* `@elevasis/core/auth`.
|
|
39
|
+
*
|
|
40
|
+
* A literal-keyed brand is structural, so every inlined copy is the same type. It still
|
|
41
|
+
* refuses a bare `string` and still keeps the two ids mutually non-assignable, which is
|
|
42
|
+
* the entire job. Do not "restore" the symbol form.
|
|
43
|
+
*/
|
|
44
|
+
/** A Supabase organization id (UUID) -- the database key for RLS-scoped rows. */
|
|
45
|
+
type SupabaseOrgId = string & {
|
|
46
|
+
readonly __orgIdBrand: 'supabase';
|
|
47
|
+
};
|
|
48
|
+
|
|
3
49
|
declare const AccessKeyInputSchema: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
4
50
|
systemPath: z.ZodString;
|
|
5
51
|
action: z.ZodDefault<z.ZodEnum<{
|
|
@@ -101,5 +147,18 @@ interface UseAccessResult extends AccessAnswer {
|
|
|
101
147
|
*/
|
|
102
148
|
declare function useAccess(key: AccessKeyInput): UseAccessResult;
|
|
103
149
|
|
|
104
|
-
|
|
150
|
+
/**
|
|
151
|
+
* Query keys for the effective-permissions fetch behind `useAccess`.
|
|
152
|
+
*
|
|
153
|
+
* Note the org id here is the SUPABASE org id, not the WorkOS one every other hook
|
|
154
|
+
* domain keys on -- `useAccess` reads it from `OrganizationContextValue`, and the
|
|
155
|
+
* `/memberships/my-permissions/:id` route it calls expects that form. Keying on the
|
|
156
|
+
* WorkOS id would produce a key that looks right and caches the wrong tenant's answer.
|
|
157
|
+
*/
|
|
158
|
+
declare const accessKeys: {
|
|
159
|
+
all: readonly ["access-permissions"];
|
|
160
|
+
permissions: (organizationId: SupabaseOrgId | null) => readonly ["access-permissions", SupabaseOrgId | null];
|
|
161
|
+
};
|
|
162
|
+
|
|
163
|
+
export { AccessKeys, accessKeys, useAccess };
|
|
105
164
|
export type { AccessKeyInput, UseAccessResult };
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
export { AccessKeys, useAccess } from '../../chunk-
|
|
1
|
+
export { AccessKeys, accessKeys, useAccess } from '../../chunk-7A25EJ4A.js';
|
|
2
2
|
import '../../chunk-4WLAVUPS.js';
|
|
3
3
|
import '../../chunk-RXZ3XDBM.js';
|
|
4
|
-
import '../../chunk-
|
|
4
|
+
import '../../chunk-KGUBFIMQ.js';
|
|
5
5
|
import '../../chunk-L7BZZ4SI.js';
|
|
6
|
-
import '../../chunk-
|
|
6
|
+
import '../../chunk-3HMRK3RC.js';
|
|
7
7
|
import '../../chunk-62GVNH5U.js';
|
|
8
8
|
import '../../chunk-P45GQ3ZW.js';
|
|
9
|
-
import '../../chunk-
|
|
9
|
+
import '../../chunk-IIMC4TRH.js';
|
|
10
10
|
import '../../chunk-3KMDHCAR.js';
|
|
11
11
|
import '../../chunk-2IFYDILW.js';
|
|
12
|
-
import '../../chunk-
|
|
13
|
-
import '../../chunk-
|
|
12
|
+
import '../../chunk-2HXDI4RY.js';
|
|
13
|
+
import '../../chunk-YJ437RDY.js';
|
|
14
14
|
import '../../chunk-DD3CCMCZ.js';
|
|
15
15
|
import '../../chunk-RNP5R5I3.js';
|
|
16
16
|
import '../../chunk-RT4KRGZT.js';
|
|
17
|
-
import '../../chunk-
|
|
18
|
-
import '../../chunk-
|
|
19
|
-
import '../../chunk-
|
|
17
|
+
import '../../chunk-CIGWHY7C.js';
|
|
18
|
+
import '../../chunk-6XBZPKMI.js';
|
|
19
|
+
import '../../chunk-7ZUXA2NW.js';
|
|
20
20
|
import '../../chunk-BI5VDO2K.js';
|
|
21
21
|
import '../../chunk-MQZE7SUI.js';
|
|
22
|
-
import '../../chunk-
|
|
22
|
+
import '../../chunk-34B3ACOZ.js';
|
|
23
23
|
import '../../chunk-BRJ3QZ4E.js';
|
|
24
24
|
import '../../chunk-Q7DJKLEN.js';
|
|
25
25
|
import '../../chunk-I2KLQ2HA.js';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export { milestoneKeys, noteKeys, projectKeys, taskKeys, useCreateMilestone, useCreateNote, useCreateProject, useCreateTask, useDeleteMilestone, useDeleteProject, useDeleteTask, useMilestones, useProject, useProjectMilestones, useProjectNotes, useProjectTasks, useProjects, useTasks, useUpdateMilestone, useUpdateProject, useUpdateTask } from '../../chunk-
|
|
2
|
-
import '../../chunk-
|
|
3
|
-
import '../../chunk-
|
|
4
|
-
import '../../chunk-
|
|
5
|
-
import '../../chunk-
|
|
1
|
+
export { milestoneKeys, noteKeys, projectKeys, taskKeys, useCreateMilestone, useCreateNote, useCreateProject, useCreateTask, useDeleteMilestone, useDeleteProject, useDeleteTask, useMilestones, useProject, useProjectMilestones, useProjectNotes, useProjectTasks, useProjects, useTasks, useUpdateMilestone, useUpdateProject, useUpdateTask } from '../../chunk-MJIDC25O.js';
|
|
2
|
+
import '../../chunk-3HMRK3RC.js';
|
|
3
|
+
import '../../chunk-CIGWHY7C.js';
|
|
4
|
+
import '../../chunk-6XBZPKMI.js';
|
|
5
|
+
import '../../chunk-7ZUXA2NW.js';
|
|
6
6
|
import '../../chunk-BI5VDO2K.js';
|
|
7
7
|
import '../../chunk-MQZE7SUI.js';
|
|
8
|
-
import '../../chunk-
|
|
8
|
+
import '../../chunk-34B3ACOZ.js';
|
|
9
9
|
import '../../chunk-I2KLQ2HA.js';
|