@datalayer/core 1.2.12 → 1.2.14
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 +4 -4
- package/lib/api/contents/datasets.d.ts +1 -32
- package/lib/api/contents/generated.d.ts +50 -2
- package/lib/api/iam/organizationPlugins.d.ts +8 -0
- package/lib/api/iam/organizationPlugins.js +41 -0
- package/lib/api/iam/servicePrincipals.d.ts +30 -0
- package/lib/api/iam/servicePrincipals.js +87 -0
- package/lib/components/avatars/UserAvatar.d.ts +2 -1
- package/lib/components/avatars/UserAvatar.js +2 -3
- package/lib/components/emoji/FluentEmoji.d.ts +33 -0
- package/lib/components/emoji/FluentEmoji.js +66 -0
- package/lib/components/emoji/faceEmojis.d.ts +24 -0
- package/lib/components/emoji/faceEmojis.js +178 -0
- package/lib/components/emoji/fluent/loaders.d.ts +12 -0
- package/lib/components/emoji/fluent/loaders.js +152 -0
- package/lib/components/emoji/fluent/svg/1f304.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f304.js +5 -0
- package/lib/components/emoji/fluent/svg/1f308.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f308.js +5 -0
- package/lib/components/emoji/fluent/svg/1f30d.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f30d.js +5 -0
- package/lib/components/emoji/fluent/svg/1f31f.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f31f.js +5 -0
- package/lib/components/emoji/fluent/svg/1f331.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f331.js +5 -0
- package/lib/components/emoji/fluent/svg/1f340.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f340.js +5 -0
- package/lib/components/emoji/fluent/svg/1f355.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f355.js +5 -0
- package/lib/components/emoji/fluent/svg/1f381.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f381.js +5 -0
- package/lib/components/emoji/fluent/svg/1f385.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f385.js +5 -0
- package/lib/components/emoji/fluent/svg/1f386.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f386.js +5 -0
- package/lib/components/emoji/fluent/svg/1f387.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f387.js +5 -0
- package/lib/components/emoji/fluent/svg/1f389.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f389.js +5 -0
- package/lib/components/emoji/fluent/svg/1f393.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f393.js +5 -0
- package/lib/components/emoji/fluent/svg/1f399.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f399.js +5 -0
- package/lib/components/emoji/fluent/svg/1f3a8.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f3a8.js +5 -0
- package/lib/components/emoji/fluent/svg/1f3ac.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f3ac.js +5 -0
- package/lib/components/emoji/fluent/svg/1f3af.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f3af.js +5 -0
- package/lib/components/emoji/fluent/svg/1f3b5.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f3b5.js +5 -0
- package/lib/components/emoji/fluent/svg/1f3c4.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f3c4.js +5 -0
- package/lib/components/emoji/fluent/svg/1f3c6.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f3c6.js +5 -0
- package/lib/components/emoji/fluent/svg/1f3ca.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f3ca.js +5 -0
- package/lib/components/emoji/fluent/svg/1f3d7.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f3d7.js +5 -0
- package/lib/components/emoji/fluent/svg/1f3db.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f3db.js +5 -0
- package/lib/components/emoji/fluent/svg/1f3e0.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f3e0.js +5 -0
- package/lib/components/emoji/fluent/svg/1f3e2.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f3e2.js +5 -0
- package/lib/components/emoji/fluent/svg/1f3e5.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f3e5.js +5 -0
- package/lib/components/emoji/fluent/svg/1f3e6.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f3e6.js +5 -0
- package/lib/components/emoji/fluent/svg/1f3f7.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f3f7.js +5 -0
- package/lib/components/emoji/fluent/svg/1f409.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f409.js +5 -0
- package/lib/components/emoji/fluent/svg/1f419.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f419.js +5 -0
- package/lib/components/emoji/fluent/svg/1f41d.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f41d.js +5 -0
- package/lib/components/emoji/fluent/svg/1f427.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f427.js +5 -0
- package/lib/components/emoji/fluent/svg/1f431.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f431.js +5 -0
- package/lib/components/emoji/fluent/svg/1f432.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f432.js +5 -0
- package/lib/components/emoji/fluent/svg/1f433.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f433.js +5 -0
- package/lib/components/emoji/fluent/svg/1f436.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f436.js +5 -0
- package/lib/components/emoji/fluent/svg/1f440.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f440.js +5 -0
- package/lib/components/emoji/fluent/svg/1f44b.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f44b.js +5 -0
- package/lib/components/emoji/fluent/svg/1f450.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f450.js +5 -0
- package/lib/components/emoji/fluent/svg/1f477.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f477.js +5 -0
- package/lib/components/emoji/fluent/svg/1f47d.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f47d.js +5 -0
- package/lib/components/emoji/fluent/svg/1f47e.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f47e.js +5 -0
- package/lib/components/emoji/fluent/svg/1f4a1.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f4a1.js +5 -0
- package/lib/components/emoji/fluent/svg/1f4ac.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f4ac.js +5 -0
- package/lib/components/emoji/fluent/svg/1f4b0.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f4b0.js +5 -0
- package/lib/components/emoji/fluent/svg/1f4b3.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f4b3.js +5 -0
- package/lib/components/emoji/fluent/svg/1f4bc.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f4bc.js +5 -0
- package/lib/components/emoji/fluent/svg/1f4c5.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f4c5.js +5 -0
- package/lib/components/emoji/fluent/svg/1f4c8.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f4c8.js +5 -0
- package/lib/components/emoji/fluent/svg/1f4ca.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f4ca.js +5 -0
- package/lib/components/emoji/fluent/svg/1f4cb.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f4cb.js +5 -0
- package/lib/components/emoji/fluent/svg/1f4cc.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f4cc.js +5 -0
- package/lib/components/emoji/fluent/svg/1f4d1.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f4d1.js +5 -0
- package/lib/components/emoji/fluent/svg/1f4da.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f4da.js +5 -0
- package/lib/components/emoji/fluent/svg/1f4dd.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f4dd.js +5 -0
- package/lib/components/emoji/fluent/svg/1f4de.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f4de.js +5 -0
- package/lib/components/emoji/fluent/svg/1f4e3.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f4e3.js +5 -0
- package/lib/components/emoji/fluent/svg/1f4e6.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f4e6.js +5 -0
- package/lib/components/emoji/fluent/svg/1f4ec.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f4ec.js +5 -0
- package/lib/components/emoji/fluent/svg/1f4f0.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f4f0.js +5 -0
- package/lib/components/emoji/fluent/svg/1f4f7.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f4f7.js +5 -0
- package/lib/components/emoji/fluent/svg/1f50d.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f50d.js +5 -0
- package/lib/components/emoji/fluent/svg/1f50e.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f50e.js +5 -0
- package/lib/components/emoji/fluent/svg/1f511.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f511.js +5 -0
- package/lib/components/emoji/fluent/svg/1f512.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f512.js +5 -0
- package/lib/components/emoji/fluent/svg/1f514.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f514.js +5 -0
- package/lib/components/emoji/fluent/svg/1f525.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f525.js +5 -0
- package/lib/components/emoji/fluent/svg/1f527.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f527.js +5 -0
- package/lib/components/emoji/fluent/svg/1f52c.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f52c.js +5 -0
- package/lib/components/emoji/fluent/svg/1f58a.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f58a.js +5 -0
- package/lib/components/emoji/fluent/svg/1f5bc.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f5bc.js +5 -0
- package/lib/components/emoji/fluent/svg/1f5c2.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f5c2.js +5 -0
- package/lib/components/emoji/fluent/svg/1f5d3.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f5d3.js +5 -0
- package/lib/components/emoji/fluent/svg/1f5fa.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f5fa.js +5 -0
- package/lib/components/emoji/fluent/svg/1f600.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f600.js +5 -0
- package/lib/components/emoji/fluent/svg/1f60e.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f60e.js +5 -0
- package/lib/components/emoji/fluent/svg/1f642.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f642.js +5 -0
- package/lib/components/emoji/fluent/svg/1f680.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f680.js +5 -0
- package/lib/components/emoji/fluent/svg/1f69a.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f69a.js +5 -0
- package/lib/components/emoji/fluent/svg/1f6a2.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f6a2.js +5 -0
- package/lib/components/emoji/fluent/svg/1f6a7.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f6a7.js +5 -0
- package/lib/components/emoji/fluent/svg/1f6b2.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f6b2.js +5 -0
- package/lib/components/emoji/fluent/svg/1f6d2.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f6d2.js +5 -0
- package/lib/components/emoji/fluent/svg/1f6df.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f6df.js +5 -0
- package/lib/components/emoji/fluent/svg/1f6e0.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f6e0.js +5 -0
- package/lib/components/emoji/fluent/svg/1f6e1.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f6e1.js +5 -0
- package/lib/components/emoji/fluent/svg/1f6eb.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f6eb.js +5 -0
- package/lib/components/emoji/fluent/svg/1f6f0.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f6f0.js +5 -0
- package/lib/components/emoji/fluent/svg/1f6f8.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f6f8.js +5 -0
- package/lib/components/emoji/fluent/svg/1f913.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f913.js +5 -0
- package/lib/components/emoji/fluent/svg/1f916.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f916.js +5 -0
- package/lib/components/emoji/fluent/svg/1f91d.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f91d.js +5 -0
- package/lib/components/emoji/fluent/svg/1f920.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f920.js +5 -0
- package/lib/components/emoji/fluent/svg/1f977.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f977.js +5 -0
- package/lib/components/emoji/fluent/svg/1f984.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f984.js +5 -0
- package/lib/components/emoji/fluent/svg/1f988.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f988.js +5 -0
- package/lib/components/emoji/fluent/svg/1f989.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f989.js +5 -0
- package/lib/components/emoji/fluent/svg/1f98a.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f98a.js +5 -0
- package/lib/components/emoji/fluent/svg/1f98e.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f98e.js +5 -0
- package/lib/components/emoji/fluent/svg/1f9d0.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f9d0.js +5 -0
- package/lib/components/emoji/fluent/svg/1f9d1-200d-1f33e.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f9d1-200d-1f33e.js +5 -0
- package/lib/components/emoji/fluent/svg/1f9d1-200d-1f373.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f9d1-200d-1f373.js +5 -0
- package/lib/components/emoji/fluent/svg/1f9d1-200d-1f393.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f9d1-200d-1f393.js +5 -0
- package/lib/components/emoji/fluent/svg/1f9d1-200d-1f3eb.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f9d1-200d-1f3eb.js +5 -0
- package/lib/components/emoji/fluent/svg/1f9d1-200d-1f4bb.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f9d1-200d-1f4bb.js +5 -0
- package/lib/components/emoji/fluent/svg/1f9d1-200d-1f4bc.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f9d1-200d-1f4bc.js +5 -0
- package/lib/components/emoji/fluent/svg/1f9d1-200d-1f52c.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f9d1-200d-1f52c.js +5 -0
- package/lib/components/emoji/fluent/svg/1f9d1-200d-1f680.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f9d1-200d-1f680.js +5 -0
- package/lib/components/emoji/fluent/svg/1f9d1-200d-2695.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f9d1-200d-2695.js +5 -0
- package/lib/components/emoji/fluent/svg/1f9dd.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f9dd.js +5 -0
- package/lib/components/emoji/fluent/svg/1f9e0.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f9e0.js +5 -0
- package/lib/components/emoji/fluent/svg/1f9e9.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f9e9.js +5 -0
- package/lib/components/emoji/fluent/svg/1f9ea.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f9ea.js +5 -0
- package/lib/components/emoji/fluent/svg/1f9ec.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f9ec.js +5 -0
- package/lib/components/emoji/fluent/svg/1f9ed.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f9ed.js +5 -0
- package/lib/components/emoji/fluent/svg/1f9ee.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f9ee.js +5 -0
- package/lib/components/emoji/fluent/svg/1f9f0.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f9f0.js +5 -0
- package/lib/components/emoji/fluent/svg/1f9f9.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f9f9.js +5 -0
- package/lib/components/emoji/fluent/svg/1f9fe.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f9fe.js +5 -0
- package/lib/components/emoji/fluent/svg/1fa84.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1fa84.js +5 -0
- package/lib/components/emoji/fluent/svg/1fa90.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1fa90.js +5 -0
- package/lib/components/emoji/fluent/svg/23f0.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/23f0.js +5 -0
- package/lib/components/emoji/fluent/svg/2600.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/2600.js +5 -0
- package/lib/components/emoji/fluent/svg/2601.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/2601.js +5 -0
- package/lib/components/emoji/fluent/svg/2603.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/2603.js +5 -0
- package/lib/components/emoji/fluent/svg/2615.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/2615.js +5 -0
- package/lib/components/emoji/fluent/svg/262f.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/262f.js +5 -0
- package/lib/components/emoji/fluent/svg/2696.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/2696.js +5 -0
- package/lib/components/emoji/fluent/svg/2699.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/2699.js +5 -0
- package/lib/components/emoji/fluent/svg/269b.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/269b.js +5 -0
- package/lib/components/emoji/fluent/svg/26a1.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/26a1.js +5 -0
- package/lib/components/emoji/fluent/svg/2705.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/2705.js +5 -0
- package/lib/components/emoji/fluent/svg/2709.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/2709.js +5 -0
- package/lib/components/emoji/fluent/svg/270d.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/270d.js +5 -0
- package/lib/components/emoji/fluent/svg/2712.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/2712.js +5 -0
- package/lib/components/emoji/fluent/svg/2764.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/2764.js +5 -0
- package/lib/components/emoji/fluent/svg/2b50.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/2b50.js +5 -0
- package/lib/components/emoji/index.d.ts +3 -0
- package/lib/components/emoji/index.js +7 -0
- package/lib/components/principal/PrincipalAppearance.d.ts +7 -1
- package/lib/components/principal/PrincipalAvatar.js +3 -1
- package/lib/components/principal/PrincipalDetailsOverlay.d.ts +2 -1
- package/lib/components/principal/PrincipalDetailsOverlay.js +4 -0
- package/lib/hooks/index.d.ts +1 -0
- package/lib/hooks/index.js +1 -0
- package/lib/hooks/useCache.d.ts +25 -0
- package/lib/hooks/useCache.js +147 -9
- package/lib/hooks/useContents.js +3 -0
- package/lib/hooks/useOrganizationPlugins.d.ts +4 -0
- package/lib/hooks/useOrganizationPlugins.js +37 -0
- package/lib/hooks/usePrincipalCacheStore.d.ts +1 -1
- package/lib/hooks/usePrincipalCacheStore.js +3 -1
- package/lib/models/URN.d.ts +37 -0
- package/lib/models/URN.js +59 -1
- package/lib/state/substates/NavigationState.d.ts +29 -2
- package/lib/state/substates/NavigationState.js +103 -12
- package/lib/utils/Handles.js +1 -1
- package/lib/views/mcp/McpDashboard.js +15 -10
- package/lib/views/mcp/McpHome.js +14 -6
- package/lib/views/mcp/types.d.ts +4 -0
- package/package.json +6 -6
- package/scripts/generate-fluent-emoji.py +188 -0
package/lib/hooks/useCache.js
CHANGED
|
@@ -58,6 +58,19 @@ const DEFAULT_QUERY_OPTIONS = {
|
|
|
58
58
|
// Ensure queries prioritize cache over network when data is fresh
|
|
59
59
|
networkMode: 'online',
|
|
60
60
|
};
|
|
61
|
+
/**
|
|
62
|
+
* A list of what a space holds — all of it, or the items of one type. Every
|
|
63
|
+
* such list takes these options (`spaceListsRefetchOnMount.unit.test.ts`
|
|
64
|
+
* holds them to it). Refetched every time a page mounts it: an item
|
|
65
|
+
* created elsewhere — a cell has no create mutation here to clear this cache —
|
|
66
|
+
* would otherwise stay missing from the list for the five minutes the default
|
|
67
|
+
* options keep it fresh, and coming back to the list is exactly when somebody
|
|
68
|
+
* looks for it.
|
|
69
|
+
*/
|
|
70
|
+
const LIST_QUERY_OPTIONS = {
|
|
71
|
+
...DEFAULT_QUERY_OPTIONS,
|
|
72
|
+
refetchOnMount: 'always',
|
|
73
|
+
};
|
|
61
74
|
/**
|
|
62
75
|
* Refresh what a visitor sees, not just what the editor is looking at.
|
|
63
76
|
*
|
|
@@ -294,6 +307,7 @@ export const queryKeys = {
|
|
|
294
307
|
publicProfileByHandle: (handle) => [...queryKeys.organizations.all(), 'public-profile', handle],
|
|
295
308
|
userOrgs: () => [...queryKeys.organizations.all(), 'user'],
|
|
296
309
|
members: (orgId) => [...queryKeys.organizations.detail(orgId), 'members'],
|
|
310
|
+
pluginsOff: (orgId) => [...queryKeys.organizations.detail(orgId), 'plugins-off'],
|
|
297
311
|
},
|
|
298
312
|
// Teams
|
|
299
313
|
teams: {
|
|
@@ -863,6 +877,32 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
|
|
|
863
877
|
owner: toItemOwner(raw),
|
|
864
878
|
};
|
|
865
879
|
};
|
|
880
|
+
/**
|
|
881
|
+
* A published agentic UI application: what it answers, and its definition
|
|
882
|
+
* as the library hands it over — `model_s`, the string the Studio reads
|
|
883
|
+
* the definition from, left unparsed because the Studio owns its shape.
|
|
884
|
+
*/
|
|
885
|
+
const toApp = (raw) => {
|
|
886
|
+
return {
|
|
887
|
+
id: raw.uid,
|
|
888
|
+
type: 'app',
|
|
889
|
+
name: raw.name_t,
|
|
890
|
+
description: raw.description_t,
|
|
891
|
+
tags: Array.isArray(raw.tags_ss) ? raw.tags_ss : [],
|
|
892
|
+
public: raw.is_public_b ?? false,
|
|
893
|
+
model_s: raw.model_s,
|
|
894
|
+
creationDate: raw.creation_ts_dt
|
|
895
|
+
? new Date(raw.creation_ts_dt)
|
|
896
|
+
: undefined,
|
|
897
|
+
lastUpdateDate: raw.last_update_ts_dt
|
|
898
|
+
? new Date(raw.last_update_ts_dt)
|
|
899
|
+
: undefined,
|
|
900
|
+
lastPublicationDate: raw.published_ts_dt
|
|
901
|
+
? new Date(raw.published_ts_dt)
|
|
902
|
+
: undefined,
|
|
903
|
+
owner: toItemOwner(raw),
|
|
904
|
+
};
|
|
905
|
+
};
|
|
866
906
|
/** An evaluator of the platform's catalogue (B5-01), published as an agent is. */
|
|
867
907
|
const toEvaluator = (raw) => {
|
|
868
908
|
return {
|
|
@@ -1375,6 +1415,10 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
|
|
|
1375
1415
|
return toInvestigation(item);
|
|
1376
1416
|
case 'evaluator':
|
|
1377
1417
|
return toEvaluator(item);
|
|
1418
|
+
// Without this a published app answered `{}`, as a deck once did: a
|
|
1419
|
+
// card with no type and no name.
|
|
1420
|
+
case 'app':
|
|
1421
|
+
return toApp(item);
|
|
1378
1422
|
case 'sitecard':
|
|
1379
1423
|
return toSiteCard(item);
|
|
1380
1424
|
default:
|
|
@@ -2345,7 +2389,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
|
|
|
2345
2389
|
}
|
|
2346
2390
|
return [];
|
|
2347
2391
|
},
|
|
2348
|
-
...
|
|
2392
|
+
...LIST_QUERY_OPTIONS,
|
|
2349
2393
|
enabled: !!spaceId,
|
|
2350
2394
|
});
|
|
2351
2395
|
};
|
|
@@ -2477,7 +2521,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
|
|
|
2477
2521
|
}
|
|
2478
2522
|
return [];
|
|
2479
2523
|
},
|
|
2480
|
-
...
|
|
2524
|
+
...LIST_QUERY_OPTIONS,
|
|
2481
2525
|
enabled: !!spaceId,
|
|
2482
2526
|
});
|
|
2483
2527
|
};
|
|
@@ -2652,7 +2696,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
|
|
|
2652
2696
|
}
|
|
2653
2697
|
return [];
|
|
2654
2698
|
},
|
|
2655
|
-
...
|
|
2699
|
+
...LIST_QUERY_OPTIONS,
|
|
2656
2700
|
enabled: !!spaceId,
|
|
2657
2701
|
});
|
|
2658
2702
|
};
|
|
@@ -4160,7 +4204,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
|
|
|
4160
4204
|
return [];
|
|
4161
4205
|
},
|
|
4162
4206
|
enabled: !!spaceId,
|
|
4163
|
-
...
|
|
4207
|
+
...LIST_QUERY_OPTIONS,
|
|
4164
4208
|
});
|
|
4165
4209
|
};
|
|
4166
4210
|
/**
|
|
@@ -4347,7 +4391,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
|
|
|
4347
4391
|
return [];
|
|
4348
4392
|
},
|
|
4349
4393
|
enabled: !!spaceId,
|
|
4350
|
-
...
|
|
4394
|
+
...LIST_QUERY_OPTIONS,
|
|
4351
4395
|
});
|
|
4352
4396
|
};
|
|
4353
4397
|
/**
|
|
@@ -4438,7 +4482,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
|
|
|
4438
4482
|
return [];
|
|
4439
4483
|
},
|
|
4440
4484
|
enabled: !!spaceId,
|
|
4441
|
-
...
|
|
4485
|
+
...LIST_QUERY_OPTIONS,
|
|
4442
4486
|
});
|
|
4443
4487
|
};
|
|
4444
4488
|
/**
|
|
@@ -4478,7 +4522,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
|
|
|
4478
4522
|
return [];
|
|
4479
4523
|
},
|
|
4480
4524
|
enabled: !!spaceId,
|
|
4481
|
-
...
|
|
4525
|
+
...LIST_QUERY_OPTIONS,
|
|
4482
4526
|
});
|
|
4483
4527
|
};
|
|
4484
4528
|
/**
|
|
@@ -4547,7 +4591,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
|
|
|
4547
4591
|
return [];
|
|
4548
4592
|
},
|
|
4549
4593
|
enabled: !!spaceId,
|
|
4550
|
-
...
|
|
4594
|
+
...LIST_QUERY_OPTIONS,
|
|
4551
4595
|
});
|
|
4552
4596
|
};
|
|
4553
4597
|
/**
|
|
@@ -4641,7 +4685,7 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
|
|
|
4641
4685
|
return [];
|
|
4642
4686
|
},
|
|
4643
4687
|
enabled: !!spaceId,
|
|
4644
|
-
...
|
|
4688
|
+
...LIST_QUERY_OPTIONS,
|
|
4645
4689
|
});
|
|
4646
4690
|
};
|
|
4647
4691
|
/**
|
|
@@ -6332,6 +6376,8 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
|
|
|
6332
6376
|
'evalset',
|
|
6333
6377
|
'dataset',
|
|
6334
6378
|
'agent',
|
|
6379
|
+
// An agentic UI application, published from the Studio.
|
|
6380
|
+
'app',
|
|
6335
6381
|
];
|
|
6336
6382
|
const librarySearchQueryString = ({ q, types, max = 20, offset = 0, sort = 'relevance', featured = false, owner, }) => {
|
|
6337
6383
|
const normalizedTypes = Array.from(new Set((types || [])
|
|
@@ -6906,6 +6952,59 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
|
|
|
6906
6952
|
enabled: Boolean(configuration.libraryUrl) && Boolean(itemId) && enabled,
|
|
6907
6953
|
});
|
|
6908
6954
|
};
|
|
6955
|
+
/**
|
|
6956
|
+
* Post a public artifact to X through the Library's saga: the author's
|
|
6957
|
+
* text, then the artifact's attributed share-card link (X draws the card),
|
|
6958
|
+
* and optionally one picked result as an image.
|
|
6959
|
+
*/
|
|
6960
|
+
const usePublishXShare = () => {
|
|
6961
|
+
return useMutation({
|
|
6962
|
+
mutationFn: async ({ itemId, text, idempotencyKey, imageDataUrl, }) => {
|
|
6963
|
+
const resp = await requestDatalayer({
|
|
6964
|
+
url: `${configuration.libraryUrl}/api/library/v1/items/${encodeURIComponent(itemId)}/shares/x`,
|
|
6965
|
+
method: 'POST',
|
|
6966
|
+
headers: { 'Idempotency-Key': idempotencyKey },
|
|
6967
|
+
body: { text, imageDataUrl },
|
|
6968
|
+
});
|
|
6969
|
+
if (!resp.success) {
|
|
6970
|
+
throw new Error(resp.message || 'Failed to post to X');
|
|
6971
|
+
}
|
|
6972
|
+
return resp.share;
|
|
6973
|
+
},
|
|
6974
|
+
});
|
|
6975
|
+
};
|
|
6976
|
+
const useUnpublishXShare = () => {
|
|
6977
|
+
return useMutation({
|
|
6978
|
+
mutationFn: async (idempotencyKey) => {
|
|
6979
|
+
const resp = await requestDatalayer({
|
|
6980
|
+
url: `${configuration.libraryUrl}/api/library/v1/shares/x/${encodeURIComponent(idempotencyKey)}`,
|
|
6981
|
+
method: 'DELETE',
|
|
6982
|
+
});
|
|
6983
|
+
if (!resp.success) {
|
|
6984
|
+
throw new Error(resp.message || 'Failed to remove the X post');
|
|
6985
|
+
}
|
|
6986
|
+
return resp.share;
|
|
6987
|
+
},
|
|
6988
|
+
});
|
|
6989
|
+
};
|
|
6990
|
+
const useXShares = (itemId, enabled = true) => {
|
|
6991
|
+
return useQuery({
|
|
6992
|
+
queryKey: ['library', 'social-shares', 'x', itemId],
|
|
6993
|
+
queryFn: async () => {
|
|
6994
|
+
const resp = await requestDatalayer({
|
|
6995
|
+
url: `${configuration.libraryUrl}/api/library/v1/items/${encodeURIComponent(itemId)}/shares/x`,
|
|
6996
|
+
method: 'GET',
|
|
6997
|
+
notifyOnError: false,
|
|
6998
|
+
});
|
|
6999
|
+
if (!resp.success) {
|
|
7000
|
+
throw new Error(resp.message || 'Failed to load X posts');
|
|
7001
|
+
}
|
|
7002
|
+
return Array.isArray(resp.shares) ? resp.shares : [];
|
|
7003
|
+
},
|
|
7004
|
+
...DEFAULT_QUERY_OPTIONS,
|
|
7005
|
+
enabled: Boolean(configuration.libraryUrl) && Boolean(itemId) && enabled,
|
|
7006
|
+
});
|
|
7007
|
+
};
|
|
6909
7008
|
/** Publish one selected public result through the durable Bluesky saga. */
|
|
6910
7009
|
const usePublishBlueskyShare = () => {
|
|
6911
7010
|
return useMutation({
|
|
@@ -7241,6 +7340,39 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
|
|
|
7241
7340
|
method: 'DELETE',
|
|
7242
7341
|
}),
|
|
7243
7342
|
});
|
|
7343
|
+
/**
|
|
7344
|
+
* The X connection, as IAM reports it: whether X is configured on this
|
|
7345
|
+
* deployment, whether the caller connected it, and the account (no token).
|
|
7346
|
+
*/
|
|
7347
|
+
const useXConnection = (enabled = true) => useQuery({
|
|
7348
|
+
queryKey: ['iam', 'social', 'x', 'status'],
|
|
7349
|
+
queryFn: async () => requestDatalayer({
|
|
7350
|
+
url: `${configuration.iamUrl}/api/iam/v1/social/x/status`,
|
|
7351
|
+
method: 'GET',
|
|
7352
|
+
notifyOnError: false,
|
|
7353
|
+
}),
|
|
7354
|
+
...DEFAULT_QUERY_OPTIONS,
|
|
7355
|
+
enabled: Boolean(configuration.iamUrl) && enabled,
|
|
7356
|
+
});
|
|
7357
|
+
/**
|
|
7358
|
+
* Begin connecting X. Answers the start link to open at top level;
|
|
7359
|
+
* `returnOrigin` is where to come back to (an origin only: IAM builds the
|
|
7360
|
+
* path, so this cannot ask to be sent anywhere).
|
|
7361
|
+
*/
|
|
7362
|
+
const useConnectX = () => useMutation({
|
|
7363
|
+
mutationFn: async (returnOrigin) => requestDatalayer({
|
|
7364
|
+
url: `${configuration.iamUrl}/api/iam/v1/social/x/connect`,
|
|
7365
|
+
method: 'POST',
|
|
7366
|
+
body: returnOrigin ? { return_origin: returnOrigin } : {},
|
|
7367
|
+
}),
|
|
7368
|
+
});
|
|
7369
|
+
const useDisconnectX = () => useMutation({
|
|
7370
|
+
mutationFn: async () => requestDatalayer({
|
|
7371
|
+
url: `${configuration.iamUrl}/api/iam/v1/social/x/connection`,
|
|
7372
|
+
method: 'DELETE',
|
|
7373
|
+
}),
|
|
7374
|
+
onSuccess: () => queryClient.invalidateQueries({ queryKey: ['iam', 'social', 'x'] }),
|
|
7375
|
+
});
|
|
7244
7376
|
// ============================================================================
|
|
7245
7377
|
// Waiting List & Growth
|
|
7246
7378
|
// ============================================================================
|
|
@@ -8292,6 +8424,12 @@ export const useCache = ({ loginRoute = '/login' } = {}) => {
|
|
|
8292
8424
|
useGetBlueskyConnection,
|
|
8293
8425
|
useConnectBluesky,
|
|
8294
8426
|
useDisconnectBluesky,
|
|
8427
|
+
useXConnection,
|
|
8428
|
+
useConnectX,
|
|
8429
|
+
useDisconnectX,
|
|
8430
|
+
usePublishXShare,
|
|
8431
|
+
useUnpublishXShare,
|
|
8432
|
+
useXShares,
|
|
8295
8433
|
usePublishLinkedInShare,
|
|
8296
8434
|
useUnpublishLinkedInShare,
|
|
8297
8435
|
useLinkedInShares,
|
package/lib/hooks/useContents.js
CHANGED
|
@@ -156,6 +156,9 @@ export const useContentSources = (filters = {}) => {
|
|
|
156
156
|
queryFn: () => listSources(token ?? '', filters, contentsUrl),
|
|
157
157
|
enabled: Boolean(token && contentsUrl),
|
|
158
158
|
staleTime: 30_000,
|
|
159
|
+
// Coming back to a list is when somebody looks for what they just made:
|
|
160
|
+
// it is read again, whatever made it.
|
|
161
|
+
refetchOnMount: 'always',
|
|
159
162
|
refetchOnWindowFocus: true,
|
|
160
163
|
});
|
|
161
164
|
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/** The plugin ids the organization has turned off; no query without an organization. */
|
|
2
|
+
export declare const useOrganizationPluginsOff: (orgUid: string) => import("@tanstack/react-query").UseQueryResult<string[], Error>;
|
|
3
|
+
/** Replace the list: the plugins named are off, every other is on. */
|
|
4
|
+
export declare const useSetOrganizationPluginsOff: (orgUid: string) => import("@tanstack/react-query").UseMutationResult<string[], Error, readonly string[], unknown>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2023-2026 Datalayer, Inc.
|
|
3
|
+
* Distributed under the terms of the Modified BSD License.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* The plugins an organization has turned off (LOOP C-12), read and replaced
|
|
7
|
+
* through IAM with the signed-in person's token.
|
|
8
|
+
*
|
|
9
|
+
* @module hooks/useOrganizationPlugins
|
|
10
|
+
*/
|
|
11
|
+
import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';
|
|
12
|
+
import { getOrganizationPluginsOff, setOrganizationPluginsOff, } from '../api/iam/organizationPlugins.js';
|
|
13
|
+
import { useCoreStore, useIAMStore } from '../state/index.js';
|
|
14
|
+
import { queryKeys } from './useCache.js';
|
|
15
|
+
/** The plugin ids the organization has turned off; no query without an organization. */
|
|
16
|
+
export const useOrganizationPluginsOff = (orgUid) => {
|
|
17
|
+
const token = useIAMStore(state => state.token);
|
|
18
|
+
const iamUrl = useCoreStore(state => state.configuration.iamUrl);
|
|
19
|
+
return useQuery({
|
|
20
|
+
queryKey: queryKeys.organizations.pluginsOff(orgUid),
|
|
21
|
+
queryFn: () => getOrganizationPluginsOff(token ?? '', orgUid, iamUrl),
|
|
22
|
+
enabled: Boolean(token && iamUrl && orgUid),
|
|
23
|
+
staleTime: 30_000,
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
/** Replace the list: the plugins named are off, every other is on. */
|
|
27
|
+
export const useSetOrganizationPluginsOff = (orgUid) => {
|
|
28
|
+
const queryClient = useQueryClient();
|
|
29
|
+
const token = useIAMStore(state => state.token);
|
|
30
|
+
const iamUrl = useCoreStore(state => state.configuration.iamUrl);
|
|
31
|
+
return useMutation({
|
|
32
|
+
mutationFn: pluginsOff => setOrganizationPluginsOff(token ?? '', orgUid, pluginsOff, iamUrl),
|
|
33
|
+
onSuccess: pluginsOff => {
|
|
34
|
+
queryClient.setQueryData(queryKeys.organizations.pluginsOff(orgUid), pluginsOff);
|
|
35
|
+
},
|
|
36
|
+
});
|
|
37
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type PrincipalCacheKind = 'personal' | 'team' | 'organization';
|
|
1
|
+
export type PrincipalCacheKind = 'personal' | 'team' | 'organization' | 'service';
|
|
2
2
|
/**
|
|
3
3
|
* A resolved principal snapshot kept in memory so repeated renders (across
|
|
4
4
|
* views) can paint instantly instead of waiting for a network round trip.
|
|
@@ -96,4 +96,6 @@ export const usePrincipalCacheStore = create((set, get) => ({
|
|
|
96
96
|
}));
|
|
97
97
|
export default usePrincipalCacheStore;
|
|
98
98
|
// What one session resolved is not the next one's to paint.
|
|
99
|
-
registerSessionState({
|
|
99
|
+
registerSessionState({
|
|
100
|
+
forget: () => usePrincipalCacheStore.getState().reset(),
|
|
101
|
+
});
|
package/lib/models/URN.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import type { IIAMProviderName } from './IAMProvidersSpecs';
|
|
2
|
+
/** What an identity provider's account URN starts with, before its name. */
|
|
3
|
+
export declare const IAM_PROVIDER_URN_PREFIX = "urn:dla:iam:ext::";
|
|
1
4
|
export declare class URN implements IURN {
|
|
2
5
|
private _partition;
|
|
3
6
|
private _service;
|
|
@@ -12,7 +15,41 @@ export declare class URN implements IURN {
|
|
|
12
15
|
get account(): string;
|
|
13
16
|
get type(): string;
|
|
14
17
|
get uid(): string;
|
|
18
|
+
/** An identity provider's account (`urn:dla:iam:ext::github:…`). */
|
|
19
|
+
get isIAMProviderAccount(): boolean;
|
|
20
|
+
toString(): string;
|
|
15
21
|
}
|
|
22
|
+
/** A URN, or `undefined` when the value is not one — never a throw. */
|
|
23
|
+
export declare function parseURN(value?: string | null): URN | undefined;
|
|
24
|
+
/**
|
|
25
|
+
* Where an account came from, read from its `origin`.
|
|
26
|
+
*
|
|
27
|
+
* - `datalayer`: made on Datalayer, with a password.
|
|
28
|
+
* - `iam-provider`: made by signing in with an identity provider, which it
|
|
29
|
+
* still signs in through (`urn:dla:iam:ext::<provider>:<account id>`).
|
|
30
|
+
* - `urn`: any other URN — an AWS Marketplace or enterprise origin.
|
|
31
|
+
* - `unknown`: nothing recorded, or a value that is none of the above.
|
|
32
|
+
*/
|
|
33
|
+
export type IAccountOrigin = {
|
|
34
|
+
kind: 'datalayer';
|
|
35
|
+
} | {
|
|
36
|
+
kind: 'iam-provider';
|
|
37
|
+
provider: IIAMProviderName;
|
|
38
|
+
accountId: string;
|
|
39
|
+
urn: URN;
|
|
40
|
+
} | {
|
|
41
|
+
kind: 'urn';
|
|
42
|
+
urn: URN;
|
|
43
|
+
} | {
|
|
44
|
+
kind: 'unknown';
|
|
45
|
+
value: string;
|
|
46
|
+
};
|
|
47
|
+
export declare function accountOriginOf(origin?: string | null): IAccountOrigin;
|
|
48
|
+
/**
|
|
49
|
+
* Whether an account signs in through a provider: disconnecting that
|
|
50
|
+
* provider would leave it nothing to sign in with.
|
|
51
|
+
*/
|
|
52
|
+
export declare function signsInWith(origin: string | null | undefined, provider: IIAMProviderName): boolean;
|
|
16
53
|
/**
|
|
17
54
|
Datalayer Uniform Resource Name (URN)
|
|
18
55
|
|
package/lib/models/URN.js
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
* Copyright (c) 2023-2025 Datalayer, Inc.
|
|
3
3
|
* Distributed under the terms of the Modified BSD License.
|
|
4
4
|
*/
|
|
5
|
+
/** What an identity provider's account URN starts with, before its name. */
|
|
6
|
+
export const IAM_PROVIDER_URN_PREFIX = 'urn:dla:iam:ext::';
|
|
5
7
|
export class URN {
|
|
6
8
|
_partition;
|
|
7
9
|
_service;
|
|
@@ -17,7 +19,8 @@ export class URN {
|
|
|
17
19
|
this._region = parts[3];
|
|
18
20
|
this._account = parts[4];
|
|
19
21
|
this._type = parts[5];
|
|
20
|
-
|
|
22
|
+
// The rest, colons and all: a provider's account id may carry them.
|
|
23
|
+
this._uid = parts.slice(6).join(':');
|
|
21
24
|
}
|
|
22
25
|
get partition() {
|
|
23
26
|
return this._partition;
|
|
@@ -37,4 +40,59 @@ export class URN {
|
|
|
37
40
|
get uid() {
|
|
38
41
|
return this._uid;
|
|
39
42
|
}
|
|
43
|
+
/** An identity provider's account (`urn:dla:iam:ext::github:…`). */
|
|
44
|
+
get isIAMProviderAccount() {
|
|
45
|
+
return this._service === 'iam' && this._region === 'ext' && !!this._type;
|
|
46
|
+
}
|
|
47
|
+
toString() {
|
|
48
|
+
return [
|
|
49
|
+
'urn',
|
|
50
|
+
this._partition,
|
|
51
|
+
this._service,
|
|
52
|
+
this._region,
|
|
53
|
+
this._account,
|
|
54
|
+
this._type,
|
|
55
|
+
this._uid,
|
|
56
|
+
].join(':');
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
/** A URN, or `undefined` when the value is not one — never a throw. */
|
|
60
|
+
export function parseURN(value) {
|
|
61
|
+
const text = (value ?? '').trim();
|
|
62
|
+
if (!text.toLowerCase().startsWith('urn:') || text.split(':').length < 7) {
|
|
63
|
+
return undefined;
|
|
64
|
+
}
|
|
65
|
+
return new URN(text);
|
|
66
|
+
}
|
|
67
|
+
const IAM_PROVIDER_NAMES = [
|
|
68
|
+
'bluesky',
|
|
69
|
+
'discord',
|
|
70
|
+
'github',
|
|
71
|
+
'google',
|
|
72
|
+
'linkedin',
|
|
73
|
+
'okta',
|
|
74
|
+
'x',
|
|
75
|
+
];
|
|
76
|
+
export function accountOriginOf(origin) {
|
|
77
|
+
const value = (origin ?? '').trim();
|
|
78
|
+
if (value === 'datalayer') {
|
|
79
|
+
return { kind: 'datalayer' };
|
|
80
|
+
}
|
|
81
|
+
const urn = parseURN(value);
|
|
82
|
+
if (!urn) {
|
|
83
|
+
return { kind: 'unknown', value };
|
|
84
|
+
}
|
|
85
|
+
const provider = urn.type.toLowerCase();
|
|
86
|
+
if (urn.isIAMProviderAccount && IAM_PROVIDER_NAMES.includes(provider)) {
|
|
87
|
+
return { kind: 'iam-provider', provider, accountId: urn.uid, urn };
|
|
88
|
+
}
|
|
89
|
+
return { kind: 'urn', urn };
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Whether an account signs in through a provider: disconnecting that
|
|
93
|
+
* provider would leave it nothing to sign in with.
|
|
94
|
+
*/
|
|
95
|
+
export function signsInWith(origin, provider) {
|
|
96
|
+
const parsed = accountOriginOf(origin);
|
|
97
|
+
return parsed.kind === 'iam-provider' && parsed.provider === provider;
|
|
40
98
|
}
|
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
/** The signed-in shell: the platform, the business cases, or the admin. */
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* The five shells of the signed-in application.
|
|
4
|
+
*
|
|
5
|
+
* `studio` is where an agentic UI application is composed, validated and
|
|
6
|
+
* shipped — the default for somebody who has not chosen, and what the root
|
|
7
|
+
* shows. `home` is the whole platform, shown as *Power*, at `/power`: the key
|
|
8
|
+
* is kept so a cookie written before the Studio existed still names the
|
|
9
|
+
* shell it meant. `agentify` is the business cases; `admin` is the
|
|
10
|
+
* platform's administration. `loop` is LOOP: AI applications built by spec,
|
|
11
|
+
* by drag and drop or in Python — the Studio's app pages under a sidebar of
|
|
12
|
+
* their own, and the LOOP workspace at `/loop`.
|
|
13
|
+
*/
|
|
14
|
+
export type NavigationView = 'studio' | 'home' | 'agentify' | 'admin' | 'loop';
|
|
3
15
|
/** The shells, and where each one opens when it has not been visited. */
|
|
4
16
|
export declare const NAVIGATION_VIEW_HOMES: Record<NavigationView, string>;
|
|
5
17
|
/** Well-known view identifiers for {@link NavigationState.tabsByView}. */
|
|
@@ -54,6 +66,16 @@ export type NavigationState = {
|
|
|
54
66
|
* through or on a page that belongs to no shell.
|
|
55
67
|
*/
|
|
56
68
|
export declare function isRememberableRoute(route: string): boolean;
|
|
69
|
+
/**
|
|
70
|
+
* Whether a page belongs to no shell: the settings, the documentation and
|
|
71
|
+
* the decks.
|
|
72
|
+
*
|
|
73
|
+
* They are read from whichever shell the reader is in — its sidebar stays
|
|
74
|
+
* beside them and the header's selector does not move — so they are never a
|
|
75
|
+
* shell's own page: opening one does not change the shell, and no shell
|
|
76
|
+
* returns to one.
|
|
77
|
+
*/
|
|
78
|
+
export declare function isShellNeutralRoute(route: string): boolean;
|
|
57
79
|
/**
|
|
58
80
|
* The shell a route belongs to, read off its first segment.
|
|
59
81
|
*
|
|
@@ -62,8 +84,13 @@ export declare function isRememberableRoute(route: string): boolean;
|
|
|
62
84
|
* reached Home through a sidebar link while the toggle still said Agentify
|
|
63
85
|
* had their Home pages filed under Agentify — and the toggle, seeing
|
|
64
86
|
* "Agentify" already chosen, did nothing when they clicked it.
|
|
87
|
+
*
|
|
88
|
+
* A shell-neutral page (the settings, the documentation) has no shell of its
|
|
89
|
+
* own: given the shell the reader is in (`current`), that is the answer, so
|
|
90
|
+
* the sidebar and the header stay where they were. Without it the settings
|
|
91
|
+
* read as the Studio's and the documentation as Power's, as they once were.
|
|
65
92
|
*/
|
|
66
|
-
export declare function viewForRoute(route: string): NavigationView;
|
|
93
|
+
export declare function viewForRoute(route: string, current?: NavigationView): NavigationView;
|
|
67
94
|
export declare const navigationStore: import("zustand").StoreApi<NavigationState>;
|
|
68
95
|
/**
|
|
69
96
|
* The hook, shaped like a `zustand` store created with `create`: callable
|