@datalayer/core 1.2.13 → 1.2.15
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 +1 -1
- 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 +2 -0
- package/lib/hooks/index.js +2 -0
- package/lib/hooks/libraryApp.d.ts +37 -0
- package/lib/hooks/libraryApp.js +59 -0
- package/lib/hooks/useCache.d.ts +2 -0
- package/lib/hooks/useCache.js +6 -1
- 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/state/substates/NavigationState.d.ts +21 -4
- package/lib/state/substates/NavigationState.js +51 -9
- package/lib/views/mcp/McpHome.js +4 -3
- package/package.json +1 -1
- package/scripts/generate-fluent-emoji.py +188 -0
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[](https://datalayer.ai)
|
|
2
2
|
|
|
3
3
|
[](https://github.com/sponsors/datalayer)
|
|
4
4
|
|
|
@@ -1,20 +1,10 @@
|
|
|
1
|
-
import type { DatasetPublication, DatasetPublicationCreate, DatasetPublicationList, DatasetRevision, DatasetRevisionCreate, DatasetRevisionList } from './generated';
|
|
1
|
+
import type { DataServerAttachment, DatasetClone, DatasetPublication, DatasetPublicationCreate, DatasetPublicationList, DatasetRevision, DatasetRevisionCreate, DatasetRevisionList } from './generated';
|
|
2
2
|
export declare const createDatasetRevision: (token: string, sourceUid: string, request: DatasetRevisionCreate, idempotencyKey: string, baseUrl?: string) => Promise<DatasetRevision>;
|
|
3
3
|
export declare const listDatasetRevisions: (token: string, sourceUid: string, baseUrl?: string) => Promise<DatasetRevisionList>;
|
|
4
4
|
export declare const getDatasetRevision: (token: string, sourceUid: string, revisionUid: string, baseUrl?: string) => Promise<DatasetRevision>;
|
|
5
5
|
export declare const createDatasetPublication: (token: string, sourceUid: string, request: DatasetPublicationCreate, idempotencyKey: string, baseUrl?: string) => Promise<DatasetPublication>;
|
|
6
6
|
export declare const listDatasetPublications: (token: string, sourceUid: string, baseUrl?: string) => Promise<DatasetPublicationList>;
|
|
7
7
|
export declare const unpublishDataset: (token: string, sourceUid: string, publicationUid: string, baseUrl?: string) => Promise<DatasetPublication>;
|
|
8
|
-
/** The Dataset a clone produced, and where it came from. */
|
|
9
|
-
export type DatasetClone = {
|
|
10
|
-
uid: string;
|
|
11
|
-
name: string;
|
|
12
|
-
sourceUid: string;
|
|
13
|
-
publicationUid: string;
|
|
14
|
-
revisionUid: string;
|
|
15
|
-
fileCount: number;
|
|
16
|
-
totalSize: number;
|
|
17
|
-
};
|
|
18
8
|
/**
|
|
19
9
|
* Take a published Dataset into your own catalog.
|
|
20
10
|
*
|
|
@@ -32,27 +22,6 @@ export declare const cloneDatasetPublication: (token: string, sourceUid: string,
|
|
|
32
22
|
* Any signed-in caller may read it — published means public.
|
|
33
23
|
*/
|
|
34
24
|
export declare const listPublishedDatasets: (token: string, baseUrl?: string) => Promise<DatasetPublicationList>;
|
|
35
|
-
/** A published Data Server's catalog, as the library shows it. */
|
|
36
|
-
export type DataServerPublication = {
|
|
37
|
-
uid: string;
|
|
38
|
-
sourceUid: string;
|
|
39
|
-
actorUid: string;
|
|
40
|
-
ownerUid: string;
|
|
41
|
-
name: string;
|
|
42
|
-
description?: string | null;
|
|
43
|
-
tags: string[];
|
|
44
|
-
connectors: string[];
|
|
45
|
-
relations: string[];
|
|
46
|
-
status: string;
|
|
47
|
-
createdAt: string;
|
|
48
|
-
};
|
|
49
|
-
/** The Datasource an attach produced, naming the published Data Server. */
|
|
50
|
-
export type DataServerAttachment = {
|
|
51
|
-
uid: string;
|
|
52
|
-
name: string;
|
|
53
|
-
sourceUid: string;
|
|
54
|
-
publicationUid: string;
|
|
55
|
-
};
|
|
56
25
|
/**
|
|
57
26
|
* Attach a published Data Server as a Datasource of your own.
|
|
58
27
|
*
|
|
@@ -278,6 +278,12 @@ export interface CredentialDiagnostics {
|
|
|
278
278
|
export interface CredentialRotation {
|
|
279
279
|
credentialUid: string;
|
|
280
280
|
}
|
|
281
|
+
export interface DataServerAttachment {
|
|
282
|
+
name: string;
|
|
283
|
+
publicationUid: string;
|
|
284
|
+
sourceUid: string;
|
|
285
|
+
uid: string;
|
|
286
|
+
}
|
|
281
287
|
export interface DataServerConfiguration {
|
|
282
288
|
connectors?: Array<DataServerConnector>;
|
|
283
289
|
identityExpiresAt?: string | null;
|
|
@@ -332,6 +338,25 @@ export interface DataServerJobs {
|
|
|
332
338
|
cancel: Array<string>;
|
|
333
339
|
jobs: Array<DataServerJob>;
|
|
334
340
|
}
|
|
341
|
+
export interface DataServerPublication {
|
|
342
|
+
actorUid: string;
|
|
343
|
+
connectors?: Array<string>;
|
|
344
|
+
createdAt: string;
|
|
345
|
+
description?: string | null;
|
|
346
|
+
name: string;
|
|
347
|
+
ownerUid: string;
|
|
348
|
+
relations?: Array<string>;
|
|
349
|
+
sourceUid: string;
|
|
350
|
+
status: string;
|
|
351
|
+
tags?: Array<string>;
|
|
352
|
+
uid: string;
|
|
353
|
+
unpublishedAt?: string | null;
|
|
354
|
+
unpublishedBy?: string | null;
|
|
355
|
+
}
|
|
356
|
+
export interface DataServerPublicationList {
|
|
357
|
+
items: Array<DataServerPublication>;
|
|
358
|
+
nextOffset?: number | null;
|
|
359
|
+
}
|
|
335
360
|
export interface DataServerRegister {
|
|
336
361
|
connectors?: Array<DataServerConnector>;
|
|
337
362
|
registrationIdentity: string;
|
|
@@ -364,6 +389,15 @@ export interface DataServerStatus {
|
|
|
364
389
|
queueDepth: number;
|
|
365
390
|
state: 'registering' | 'ready' | 'degraded' | 'unavailable' | 'draining' | 'revoked';
|
|
366
391
|
}
|
|
392
|
+
export interface DatasetClone {
|
|
393
|
+
fileCount: number;
|
|
394
|
+
name: string;
|
|
395
|
+
publicationUid: string;
|
|
396
|
+
revisionUid: string;
|
|
397
|
+
sourceUid: string;
|
|
398
|
+
totalSize: number;
|
|
399
|
+
uid: string;
|
|
400
|
+
}
|
|
367
401
|
export interface DatasetConfiguration {
|
|
368
402
|
currentRevisionUid?: string | null;
|
|
369
403
|
kind: 'dataset';
|
|
@@ -395,6 +429,7 @@ export interface DatasetPublicationCreate {
|
|
|
395
429
|
}
|
|
396
430
|
export interface DatasetPublicationList {
|
|
397
431
|
items: Array<DatasetPublication>;
|
|
432
|
+
nextOffset?: number | null;
|
|
398
433
|
}
|
|
399
434
|
export interface DatasetRevision {
|
|
400
435
|
actorUid: string;
|
|
@@ -430,6 +465,7 @@ export interface DatasetRevisionFileCreate {
|
|
|
430
465
|
}
|
|
431
466
|
export interface DatasetRevisionList {
|
|
432
467
|
items: Array<DatasetRevision>;
|
|
468
|
+
nextOffset?: number | null;
|
|
433
469
|
}
|
|
434
470
|
export interface DatasourceCapabilities {
|
|
435
471
|
flight: boolean;
|
|
@@ -551,7 +587,7 @@ export interface FlightConnectivity {
|
|
|
551
587
|
}
|
|
552
588
|
export interface Grant {
|
|
553
589
|
accessLevel: 'view' | 'update' | 'execute';
|
|
554
|
-
principalKind: 'user' | 'team' | 'organization';
|
|
590
|
+
principalKind: 'user' | 'team' | 'organization' | 'agent';
|
|
555
591
|
principalUid: string;
|
|
556
592
|
uid?: string | null;
|
|
557
593
|
}
|
|
@@ -730,6 +766,7 @@ export interface McpToolManifest {
|
|
|
730
766
|
tools: Array<McpToolView>;
|
|
731
767
|
}
|
|
732
768
|
export interface McpToolView {
|
|
769
|
+
annotations?: Record<string, unknown>;
|
|
733
770
|
description?: string | null;
|
|
734
771
|
inputSchema?: Record<string, unknown>;
|
|
735
772
|
name: string;
|
|
@@ -777,6 +814,15 @@ export interface PartWritten {
|
|
|
777
814
|
bytesWritten: number;
|
|
778
815
|
part: string;
|
|
779
816
|
}
|
|
817
|
+
export interface PendingRevocation {
|
|
818
|
+
mountPath: string;
|
|
819
|
+
sandboxUid: string;
|
|
820
|
+
sourceUid: string;
|
|
821
|
+
uid: string;
|
|
822
|
+
}
|
|
823
|
+
export interface PendingRevocationList {
|
|
824
|
+
items: Array<PendingRevocation>;
|
|
825
|
+
}
|
|
780
826
|
export interface PingResponse {
|
|
781
827
|
message?: 'Pong.';
|
|
782
828
|
success?: true;
|
|
@@ -806,6 +852,7 @@ export interface PreparedAttachment {
|
|
|
806
852
|
mode: 'ro' | 'rw';
|
|
807
853
|
mountPath?: string | null;
|
|
808
854
|
mountSession?: MountSession | null;
|
|
855
|
+
mountToken?: string | null;
|
|
809
856
|
providerResourceId?: string | null;
|
|
810
857
|
readyAt?: string | null;
|
|
811
858
|
required?: boolean;
|
|
@@ -825,7 +872,7 @@ export interface PresignedAccess {
|
|
|
825
872
|
path: string;
|
|
826
873
|
url: string;
|
|
827
874
|
}
|
|
828
|
-
export type PrincipalKind = 'user' | 'team' | 'organization';
|
|
875
|
+
export type PrincipalKind = 'user' | 'team' | 'organization' | 'agent';
|
|
829
876
|
export interface PublishTableRequest {
|
|
830
877
|
relation: string;
|
|
831
878
|
}
|
|
@@ -1065,6 +1112,7 @@ export interface VolumeConfiguration {
|
|
|
1065
1112
|
concurrentWriters: boolean;
|
|
1066
1113
|
defaultMountPath: string;
|
|
1067
1114
|
kind: 'volume';
|
|
1115
|
+
managed?: boolean;
|
|
1068
1116
|
scope: 'user' | 'space';
|
|
1069
1117
|
storageClass?: string | null;
|
|
1070
1118
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** The plugin ids the organization has turned off; none when it has decided nothing. */
|
|
2
|
+
export declare const getOrganizationPluginsOff: (token: string, orgUid: string, baseUrl?: string) => Promise<string[]>;
|
|
3
|
+
/**
|
|
4
|
+
* Replace the list: the plugins named are off, every other is on. An owner's,
|
|
5
|
+
* or a platform administrator's; IAM answers `422` with the reason for an id
|
|
6
|
+
* that is not one.
|
|
7
|
+
*/
|
|
8
|
+
export declare const setOrganizationPluginsOff: (token: string, orgUid: string, pluginsOff: readonly string[], baseUrl?: string) => Promise<string[]>;
|
|
@@ -0,0 +1,41 @@
|
|
|
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).
|
|
7
|
+
*
|
|
8
|
+
* One list of plugin ids of the catalogue (`agentspecs/ui-plugins`), kept by
|
|
9
|
+
* IAM on the organization. A member reads it; an owner replaces it. IAM checks
|
|
10
|
+
* an id's shape only: what an id means is the reader's — the Studio's Canvas
|
|
11
|
+
* leaves a plugin's blocks off its palette, and the checks of an application
|
|
12
|
+
* say which of its blocks are off.
|
|
13
|
+
*
|
|
14
|
+
* @module api/iam/organizationPlugins
|
|
15
|
+
*/
|
|
16
|
+
import { requestDatalayerAPI } from '../DatalayerApi.js';
|
|
17
|
+
import { API_BASE_PATHS, DEFAULT_SERVICE_URLS } from '../constants.js';
|
|
18
|
+
const pluginsOffUrl = (baseUrl, orgUid) => `${baseUrl}${API_BASE_PATHS.IAM}/organizations/${encodeURIComponent(orgUid)}/plugins-off`;
|
|
19
|
+
/** The plugin ids the organization has turned off; none when it has decided nothing. */
|
|
20
|
+
export const getOrganizationPluginsOff = async (token, orgUid, baseUrl = DEFAULT_SERVICE_URLS.IAM) => {
|
|
21
|
+
const response = await requestDatalayerAPI({
|
|
22
|
+
url: pluginsOffUrl(baseUrl, orgUid),
|
|
23
|
+
method: 'GET',
|
|
24
|
+
token,
|
|
25
|
+
});
|
|
26
|
+
return response.plugins_off;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Replace the list: the plugins named are off, every other is on. An owner's,
|
|
30
|
+
* or a platform administrator's; IAM answers `422` with the reason for an id
|
|
31
|
+
* that is not one.
|
|
32
|
+
*/
|
|
33
|
+
export const setOrganizationPluginsOff = async (token, orgUid, pluginsOff, baseUrl = DEFAULT_SERVICE_URLS.IAM) => {
|
|
34
|
+
const response = await requestDatalayerAPI({
|
|
35
|
+
url: pluginsOffUrl(baseUrl, orgUid),
|
|
36
|
+
method: 'PUT',
|
|
37
|
+
token,
|
|
38
|
+
body: { plugins_off: [...pluginsOff] },
|
|
39
|
+
});
|
|
40
|
+
return response.plugins_off;
|
|
41
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { ServiceAgent } from './serviceAgents';
|
|
2
|
+
export interface ServicePrincipal extends ServiceAgent {
|
|
3
|
+
/** The application it is the principal of. */
|
|
4
|
+
appUid: string;
|
|
5
|
+
/** Whose it is: a person's uid, or an organization's. */
|
|
6
|
+
accountUid: string;
|
|
7
|
+
/** The organization, when an organization owns it; empty for a person's. */
|
|
8
|
+
orgUid: string;
|
|
9
|
+
}
|
|
10
|
+
/** A principal as it comes back from a write, with the key — that once. */
|
|
11
|
+
export interface ServicePrincipalWithKey extends ServicePrincipal {
|
|
12
|
+
key: string;
|
|
13
|
+
}
|
|
14
|
+
/** The caller's service principals — or an organization's, for its owners. */
|
|
15
|
+
export declare const listServicePrincipals: (token: string, options?: {
|
|
16
|
+
appUid?: string;
|
|
17
|
+
orgUid?: string;
|
|
18
|
+
}, baseUrl?: string) => Promise<ServicePrincipal[]>;
|
|
19
|
+
/** Make one. **The key is in this answer and in no other.** */
|
|
20
|
+
export declare const createServicePrincipal: (token: string, principal: {
|
|
21
|
+
appUid: string;
|
|
22
|
+
name: string;
|
|
23
|
+
scopes: string[];
|
|
24
|
+
description?: string;
|
|
25
|
+
orgUid?: string;
|
|
26
|
+
}, baseUrl?: string) => Promise<ServicePrincipalWithKey>;
|
|
27
|
+
/** Replace its key. The old one stops working with this call. */
|
|
28
|
+
export declare const rotateServicePrincipalKey: (token: string, uid: string, orgUid?: string, baseUrl?: string) => Promise<ServicePrincipalWithKey>;
|
|
29
|
+
/** Stop it, keeping it readable for its audit. */
|
|
30
|
+
export declare const revokeServicePrincipal: (token: string, uid: string, orgUid?: string, baseUrl?: string) => Promise<ServicePrincipal>;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2023-2026 Datalayer, Inc.
|
|
3
|
+
* Distributed under the terms of the Modified BSD License.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Service principals: a deployed LOOP application as a principal of its
|
|
7
|
+
* own (plans/LOOP.md, I-02).
|
|
8
|
+
*
|
|
9
|
+
* The service agents' kin — a key that is exchanged for an hour's token, an
|
|
10
|
+
* audit that names it — with two differences: a person may own one, not only
|
|
11
|
+
* an organization, and it is the principal of one application. Its token says
|
|
12
|
+
* whose it is (`account_uid`) and which application (`app_uid`). ai-agents
|
|
13
|
+
* makes one at the application's first deploy; these calls are for reading,
|
|
14
|
+
* rotating and revoking it.
|
|
15
|
+
*
|
|
16
|
+
* @module api/iam/servicePrincipals
|
|
17
|
+
*/
|
|
18
|
+
import { requestDatalayerAPI } from '../DatalayerApi.js';
|
|
19
|
+
import { API_BASE_PATHS, DEFAULT_SERVICE_URLS } from '../constants.js';
|
|
20
|
+
const fromWire = (principal) => ({
|
|
21
|
+
uid: principal.uid,
|
|
22
|
+
name: principal.name ?? '',
|
|
23
|
+
description: principal.description ?? '',
|
|
24
|
+
teamUid: principal.team_uid ?? '',
|
|
25
|
+
scopes: principal.scopes ?? '',
|
|
26
|
+
revoked: Boolean(principal.revoked),
|
|
27
|
+
createdBy: principal.created_by ?? '',
|
|
28
|
+
createdAt: principal.created_at ?? null,
|
|
29
|
+
keyRotatedAt: principal.key_rotated_at ?? null,
|
|
30
|
+
appUid: principal.app_uid ?? '',
|
|
31
|
+
accountUid: principal.account_uid ?? '',
|
|
32
|
+
orgUid: principal.org_uid ?? '',
|
|
33
|
+
});
|
|
34
|
+
const withKey = (principal) => ({
|
|
35
|
+
...fromWire(principal),
|
|
36
|
+
key: principal.key ?? '',
|
|
37
|
+
});
|
|
38
|
+
const principalsUrl = (baseUrl, suffix = '', orgUid) => `${baseUrl}${API_BASE_PATHS.IAM}/service-principals${suffix}` +
|
|
39
|
+
(orgUid ? `?org_uid=${encodeURIComponent(orgUid)}` : '');
|
|
40
|
+
/** The caller's service principals — or an organization's, for its owners. */
|
|
41
|
+
export const listServicePrincipals = async (token, options = {}, baseUrl = DEFAULT_SERVICE_URLS.IAM) => {
|
|
42
|
+
const query = new URLSearchParams();
|
|
43
|
+
if (options.appUid)
|
|
44
|
+
query.set('app_uid', options.appUid);
|
|
45
|
+
if (options.orgUid)
|
|
46
|
+
query.set('org_uid', options.orgUid);
|
|
47
|
+
const suffix = query.toString() ? `?${query.toString()}` : '';
|
|
48
|
+
const response = await requestDatalayerAPI({
|
|
49
|
+
url: `${baseUrl}${API_BASE_PATHS.IAM}/service-principals${suffix}`,
|
|
50
|
+
method: 'GET',
|
|
51
|
+
token,
|
|
52
|
+
});
|
|
53
|
+
return (response.principals ?? []).map(fromWire);
|
|
54
|
+
};
|
|
55
|
+
/** Make one. **The key is in this answer and in no other.** */
|
|
56
|
+
export const createServicePrincipal = async (token, principal, baseUrl = DEFAULT_SERVICE_URLS.IAM) => {
|
|
57
|
+
const response = await requestDatalayerAPI({
|
|
58
|
+
url: principalsUrl(baseUrl, '', principal.orgUid),
|
|
59
|
+
method: 'POST',
|
|
60
|
+
token,
|
|
61
|
+
body: {
|
|
62
|
+
app_uid: principal.appUid,
|
|
63
|
+
name: principal.name,
|
|
64
|
+
scopes: principal.scopes,
|
|
65
|
+
description: principal.description ?? '',
|
|
66
|
+
},
|
|
67
|
+
});
|
|
68
|
+
return withKey(response.principal ?? { uid: '' });
|
|
69
|
+
};
|
|
70
|
+
/** Replace its key. The old one stops working with this call. */
|
|
71
|
+
export const rotateServicePrincipalKey = async (token, uid, orgUid, baseUrl = DEFAULT_SERVICE_URLS.IAM) => {
|
|
72
|
+
const response = await requestDatalayerAPI({
|
|
73
|
+
url: principalsUrl(baseUrl, `/${encodeURIComponent(uid)}/rotate`, orgUid),
|
|
74
|
+
method: 'POST',
|
|
75
|
+
token,
|
|
76
|
+
});
|
|
77
|
+
return withKey(response.principal ?? { uid });
|
|
78
|
+
};
|
|
79
|
+
/** Stop it, keeping it readable for its audit. */
|
|
80
|
+
export const revokeServicePrincipal = async (token, uid, orgUid, baseUrl = DEFAULT_SERVICE_URLS.IAM) => {
|
|
81
|
+
const response = await requestDatalayerAPI({
|
|
82
|
+
url: principalsUrl(baseUrl, `/${encodeURIComponent(uid)}/revoke`, orgUid),
|
|
83
|
+
method: 'POST',
|
|
84
|
+
token,
|
|
85
|
+
});
|
|
86
|
+
return fromWire(response.principal ?? { uid });
|
|
87
|
+
};
|
|
@@ -18,7 +18,8 @@ export type UserAvatarProps = {
|
|
|
18
18
|
/**
|
|
19
19
|
* A literal emoji, checked before `avatarIcon`/`avatarUrl` — an agent's
|
|
20
20
|
* face is its emoji, not a photograph or a chosen icon standing in for
|
|
21
|
-
* one.
|
|
21
|
+
* one. Drawn in Fluent Emoji, the same on every platform (LOOP T-20); the
|
|
22
|
+
* system's, as text, only for one Datalayer ships no drawing of.
|
|
22
23
|
*/
|
|
23
24
|
avatarEmoji?: string;
|
|
24
25
|
/** Avatar edge length in pixels. Defaults to 100. */
|
|
@@ -3,6 +3,7 @@ import { AlienIcon } from '@datalayer/icons-react';
|
|
|
3
3
|
import { Box, useColorPalette } from '@datalayer/primer-addons';
|
|
4
4
|
import { DLAvatar } from './DLAvatar.js';
|
|
5
5
|
import { getPrincipalAvatarIcon } from '../principal/PrincipalAppearance.js';
|
|
6
|
+
import { FluentEmoji } from '../emoji/FluentEmoji.js';
|
|
6
7
|
/**
|
|
7
8
|
* Returns `true` when the given URL points to a real user avatar (i.e. not a
|
|
8
9
|
* Gravatar default placeholder).
|
|
@@ -37,10 +38,8 @@ export const UserAvatar = ({ avatarUrl, avatarIcon, avatarEmoji, size = 100, squ
|
|
|
37
38
|
alignItems: 'center',
|
|
38
39
|
justifyContent: 'center',
|
|
39
40
|
bg: fallbackBackground || 'canvas.default',
|
|
40
|
-
fontSize: Math.round(size * 0.5),
|
|
41
|
-
lineHeight: 1,
|
|
42
41
|
...ringSx,
|
|
43
|
-
}, children: avatarEmoji }));
|
|
42
|
+
}, children: _jsx(FluentEmoji, { emoji: avatarEmoji, size: iconSize ?? Math.round(size * 0.6), label: "" }) }));
|
|
44
43
|
}
|
|
45
44
|
const SelectedIcon = getPrincipalAvatarIcon(avatarIcon);
|
|
46
45
|
if (SelectedIcon) {
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* An emoji, drawn in Fluent Emoji (LOOP T-20): the same drawing on every
|
|
3
|
+
* platform, from Datalayer's own bundle — no request leaves for anyone
|
|
4
|
+
* else's. The drawing is a module of its own, fetched the first time the
|
|
5
|
+
* emoji is drawn, and kept; until it lands, an empty box of its size holds
|
|
6
|
+
* its place, so nothing moves when it does. An emoji Datalayer ships no
|
|
7
|
+
* drawing of (`FACE_EMOJIS` lists the ones it does) is drawn by the system,
|
|
8
|
+
* as text, at the same size.
|
|
9
|
+
*
|
|
10
|
+
* @module components/emoji/FluentEmoji
|
|
11
|
+
*/
|
|
12
|
+
import type { CSSProperties, JSX } from 'react';
|
|
13
|
+
/** Whether Datalayer ships a Fluent drawing of the emoji. */
|
|
14
|
+
export declare function hasFluentEmoji(emoji: string | undefined): boolean;
|
|
15
|
+
/**
|
|
16
|
+
* The emoji's drawing, as a `data:` URL an `<img>` takes, or `undefined` when
|
|
17
|
+
* Datalayer ships none.
|
|
18
|
+
*/
|
|
19
|
+
export declare function loadFluentEmoji(emoji: string): Promise<string | undefined>;
|
|
20
|
+
export type FluentEmojiProps = {
|
|
21
|
+
emoji: string;
|
|
22
|
+
/** Its edge, in pixels. */
|
|
23
|
+
size: number;
|
|
24
|
+
/**
|
|
25
|
+
* What it is called, for a screen reader; the emoji itself by default.
|
|
26
|
+
* Empty, it is decoration: whatever it sits in names it.
|
|
27
|
+
*/
|
|
28
|
+
label?: string;
|
|
29
|
+
className?: string;
|
|
30
|
+
style?: CSSProperties;
|
|
31
|
+
};
|
|
32
|
+
export declare function FluentEmoji({ emoji, size, label, className, style, }: FluentEmojiProps): JSX.Element;
|
|
33
|
+
export default FluentEmoji;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useState } from 'react';
|
|
3
|
+
import { emojiKey } from './faceEmojis.js';
|
|
4
|
+
import { FLUENT_EMOJI_LOADERS } from './fluent/loaders.js';
|
|
5
|
+
/** The drawings fetched so far, by key, as `data:` URLs. */
|
|
6
|
+
const DRAWN = new Map();
|
|
7
|
+
/** Whether Datalayer ships a Fluent drawing of the emoji. */
|
|
8
|
+
export function hasFluentEmoji(emoji) {
|
|
9
|
+
return (!!emoji &&
|
|
10
|
+
Object.prototype.hasOwnProperty.call(FLUENT_EMOJI_LOADERS, emojiKey(emoji)));
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* The emoji's drawing, as a `data:` URL an `<img>` takes, or `undefined` when
|
|
14
|
+
* Datalayer ships none.
|
|
15
|
+
*/
|
|
16
|
+
export async function loadFluentEmoji(emoji) {
|
|
17
|
+
const key = emojiKey(emoji);
|
|
18
|
+
const known = DRAWN.get(key);
|
|
19
|
+
if (known) {
|
|
20
|
+
return known;
|
|
21
|
+
}
|
|
22
|
+
if (!Object.prototype.hasOwnProperty.call(FLUENT_EMOJI_LOADERS, key)) {
|
|
23
|
+
return undefined;
|
|
24
|
+
}
|
|
25
|
+
const svg = (await FLUENT_EMOJI_LOADERS[key]()).default;
|
|
26
|
+
const url = `data:image/svg+xml;charset=utf-8,${encodeURIComponent(svg)}`;
|
|
27
|
+
DRAWN.set(key, url);
|
|
28
|
+
return url;
|
|
29
|
+
}
|
|
30
|
+
export function FluentEmoji({ emoji, size, label, className, style, }) {
|
|
31
|
+
const key = emojiKey(emoji);
|
|
32
|
+
const shipped = hasFluentEmoji(emoji);
|
|
33
|
+
const [url, setUrl] = useState(() => DRAWN.get(key));
|
|
34
|
+
useEffect(() => {
|
|
35
|
+
let live = true;
|
|
36
|
+
setUrl(DRAWN.get(key));
|
|
37
|
+
if (shipped && !DRAWN.has(key)) {
|
|
38
|
+
loadFluentEmoji(emoji).then(drawn => live && setUrl(drawn),
|
|
39
|
+
// A chunk that fails to load leaves the box empty rather than the page
|
|
40
|
+
// broken; the next draw tries again.
|
|
41
|
+
() => undefined);
|
|
42
|
+
}
|
|
43
|
+
return () => {
|
|
44
|
+
live = false;
|
|
45
|
+
};
|
|
46
|
+
}, [key, shipped, emoji]);
|
|
47
|
+
const name = label ?? emoji;
|
|
48
|
+
const box = {
|
|
49
|
+
display: 'inline-flex',
|
|
50
|
+
alignItems: 'center',
|
|
51
|
+
justifyContent: 'center',
|
|
52
|
+
flex: 'none',
|
|
53
|
+
width: size,
|
|
54
|
+
height: size,
|
|
55
|
+
...style,
|
|
56
|
+
};
|
|
57
|
+
if (!shipped) {
|
|
58
|
+
// The system's emoji, the only drawing there is of this one.
|
|
59
|
+
return (_jsx("span", { className: className, role: name ? 'img' : undefined, "aria-label": name || undefined, "aria-hidden": name ? undefined : true, "data-emoji": "system", style: { ...box, fontSize: Math.round(size * 0.85), lineHeight: 1 }, children: emoji }));
|
|
60
|
+
}
|
|
61
|
+
if (!url) {
|
|
62
|
+
return (_jsx("span", { className: className, "aria-hidden": "true", "data-emoji": "loading", style: box }));
|
|
63
|
+
}
|
|
64
|
+
return (_jsx("img", { className: className, src: url, alt: name, "aria-hidden": name ? undefined : true, width: size, height: size, draggable: false, "data-emoji": "fluent", style: { ...box, display: 'inline-block' } }));
|
|
65
|
+
}
|
|
66
|
+
export default FluentEmoji;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The emojis a face is offered in, each drawn in Fluent Emoji (LOOP T-20).
|
|
3
|
+
*
|
|
4
|
+
* A native emoji is a different drawing on every platform, and missing on
|
|
5
|
+
* some: an application's face has to be the same face for its builder and
|
|
6
|
+
* its users. These are the ones Datalayer ships a drawing of, served from its
|
|
7
|
+
* own bundle — the face every new application starts with (the eyes), every
|
|
8
|
+
* example's, the emoji of each avatar of the profile's set that has one, and
|
|
9
|
+
* the ones *Describe it* chooses from. Any other emoji is still accepted, and
|
|
10
|
+
* is drawn by the system, as text.
|
|
11
|
+
*
|
|
12
|
+
* `scripts/generate-fluent-emoji.py` reads this list, between the two
|
|
13
|
+
* markers, and writes a drawing for each: adding an emoji here means running
|
|
14
|
+
* it again. `faceEmojis.unit.test.ts` fails when one has none.
|
|
15
|
+
*
|
|
16
|
+
* @module components/emoji/faceEmojis
|
|
17
|
+
*/
|
|
18
|
+
export declare const FACE_EMOJIS: ReadonlyArray<string>;
|
|
19
|
+
/**
|
|
20
|
+
* The key a drawing is filed under: the emoji's code points, in lower-case
|
|
21
|
+
* hexadecimal, joined by `-` — without the variation selector (U+FE0F), which
|
|
22
|
+
* one keyboard types and another does not, for the same emoji.
|
|
23
|
+
*/
|
|
24
|
+
export declare function emojiKey(emoji: string): string;
|