@dxos/plugin-preview 0.8.2 → 0.8.3-main.672df60
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/lib/browser/chunk-LFAK2TMG.mjs +14 -0
- package/dist/lib/browser/chunk-LFAK2TMG.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +5 -17
- package/dist/lib/browser/index.mjs.map +1 -1
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{preview-popover-S3OY3CFZ.mjs → preview-popover-2AWEEK32.mjs} +13 -9
- package/dist/lib/browser/preview-popover-2AWEEK32.mjs.map +7 -0
- package/dist/lib/browser/{react-surface-XDHP6EN7.mjs → react-surface-FGMSZTOE.mjs} +46 -67
- package/dist/lib/browser/react-surface-FGMSZTOE.mjs.map +7 -0
- package/dist/lib/node/{chunk-VFSOM2B4.cjs → chunk-XGHMBEIV.cjs} +6 -24
- package/dist/lib/node/chunk-XGHMBEIV.cjs.map +7 -0
- package/dist/lib/node/index.cjs +12 -24
- package/dist/lib/node/index.cjs.map +1 -1
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/{preview-popover-GPBOHU5E.cjs → preview-popover-K4E7UEQU.cjs} +16 -12
- package/dist/lib/node/preview-popover-K4E7UEQU.cjs.map +7 -0
- package/dist/lib/node/{react-surface-CPAQ7ZYR.cjs → react-surface-FI63RLWN.cjs} +53 -68
- package/dist/lib/node/react-surface-FI63RLWN.cjs.map +7 -0
- package/dist/lib/node-esm/chunk-7BPXNL44.mjs +16 -0
- package/dist/lib/node-esm/chunk-7BPXNL44.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +5 -17
- package/dist/lib/node-esm/index.mjs.map +1 -1
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{preview-popover-EQAEYYDT.mjs → preview-popover-W5FPZQM3.mjs} +13 -9
- package/dist/lib/node-esm/preview-popover-W5FPZQM3.mjs.map +7 -0
- package/dist/lib/node-esm/{react-surface-QJRHN4PN.mjs → react-surface-EHIW3IEA.mjs} +46 -67
- package/dist/lib/node-esm/react-surface-EHIW3IEA.mjs.map +7 -0
- package/dist/types/src/Preview.stories.d.ts +8 -9
- package/dist/types/src/Preview.stories.d.ts.map +1 -1
- package/dist/types/src/capabilities/preview-popover.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/components/ContactCard.d.ts +1 -1
- package/dist/types/src/components/ContactCard.d.ts.map +1 -1
- package/dist/types/src/components/OrganizationCard.d.ts +1 -1
- package/dist/types/src/components/OrganizationCard.d.ts.map +1 -1
- package/dist/types/src/components/ProjectCard.d.ts +1 -1
- package/dist/types/src/components/ProjectCard.d.ts.map +1 -1
- package/dist/types/src/types.d.ts +3 -22
- package/dist/types/src/types.d.ts.map +1 -1
- package/package.json +20 -19
- package/src/Preview.stories.tsx +3 -2
- package/src/capabilities/preview-popover.ts +9 -5
- package/src/capabilities/react-surface.tsx +6 -11
- package/src/components/ContactCard.tsx +11 -11
- package/src/components/OrganizationCard.tsx +9 -16
- package/src/components/ProjectCard.tsx +8 -12
- package/src/types.ts +4 -33
- package/dist/lib/browser/chunk-B2VK6GFP.mjs +0 -28
- package/dist/lib/browser/chunk-B2VK6GFP.mjs.map +0 -7
- package/dist/lib/browser/preview-popover-S3OY3CFZ.mjs.map +0 -7
- package/dist/lib/browser/react-surface-XDHP6EN7.mjs.map +0 -7
- package/dist/lib/node/chunk-VFSOM2B4.cjs.map +0 -7
- package/dist/lib/node/preview-popover-GPBOHU5E.cjs.map +0 -7
- package/dist/lib/node/react-surface-CPAQ7ZYR.cjs.map +0 -7
- package/dist/lib/node-esm/chunk-PYKIS3N7.mjs +0 -30
- package/dist/lib/node-esm/chunk-PYKIS3N7.mjs.map +0 -7
- package/dist/lib/node-esm/preview-popover-EQAEYYDT.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-QJRHN4PN.mjs.map +0 -7
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/PreviewPlugin.tsx", "../../../src/capabilities/index.ts", "../../../src/translations.ts"],
|
|
4
4
|
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Capabilities, Events, contributes, defineModule, definePlugin } from '@dxos/app-framework';\nimport { ClientCapabilities, ClientEvents } from '@dxos/plugin-client';\nimport { DataType } from '@dxos/schema';\n\nimport { PreviewPopover, ReactSurface } from './capabilities';\nimport { meta } from './meta';\nimport translations from './translations';\n\nexport const PreviewPlugin = () =>\n definePlugin(meta, [\n defineModule({\n id: `${meta.id}/module/translations`,\n activatesOn: Events.SetupTranslations,\n activate: () => contributes(Capabilities.Translations, translations),\n }),\n defineModule({\n id: `${meta.id}/module/schema`,\n activatesOn: ClientEvents.SetupSchema,\n activate: () => [contributes(ClientCapabilities.Schema, [DataType.Person, DataType.Organization])],\n }),\n defineModule({\n id: `${meta.id}/module/preview-popover`,\n activatesOn: Events.Startup,\n activate: PreviewPopover,\n }),\n defineModule({\n id: `${meta.id}/module/react-surface`,\n activatesOn: Events.SetupReactSurface,\n activate: ReactSurface,\n }),\n ]);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { lazy } from '@dxos/app-framework';\n\nexport const PreviewPopover = lazy(() => import('./preview-popover'));\nexport const ReactSurface = lazy(() => import('./react-surface'));\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { PREVIEW_PLUGIN } from './meta';\n\nexport default [\n {\n 'en-US': {\n [PREVIEW_PLUGIN]: {\n 'unable to create preview message': 'No preview',\n },\n },\n },\n];\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,2BAA8E;AAC9E,2BAAiD;AACjD,oBAAyB;ACFzB,IAAAA,wBAAqB;AAEd,IAAMC,qBAAiBC,4BAAK,MAAM,OAAO,gCAAA,CAAA;AACzC,IAAMC,mBAAeD,4BAAK,MAAM,OAAO,8BAAA,CAAA;ACD9C,IAAA,uBAAe;EACb;IACE,SAAS;MACP,CAACE,oCAAAA,GAAiB;QAChB,oCAAoC;MACtC;IACF;EACF;;AFDK,IAAMC,gBAAgB,UAC3BC,mCAAaC,4BAAM;MACjBC,mCAAa;IACXC,IAAI,GAAGF,2BAAKE,EAAE;IACdC,aAAaC,4BAAOC;IACpBC,UAAU,UAAMC,kCAAYC,kCAAaC,cAAcC,oBAAAA;EACzD,CAAA;MACAT,mCAAa;IACXC,IAAI,GAAGF,2BAAKE,EAAE;IACdC,aAAaQ,kCAAaC;IAC1BN,UAAU,MAAM;UAACC,kCAAYM,wCAAmBC,QAAQ;QAACC,uBAASC;QAAQD,uBAASE;OAAa;;EAClG,CAAA;MACAhB,mCAAa;IACXC,IAAI,GAAGF,2BAAKE,EAAE;IACdC,aAAaC,4BAAOc;IACpBZ,UAAUZ;EACZ,CAAA;MACAO,mCAAa;IACXC,IAAI,GAAGF,2BAAKE,EAAE;IACdC,aAAaC,4BAAOe;IACpBb,UAAUV;EACZ,CAAA;CACD;",
|
|
6
6
|
"names": ["import_app_framework", "PreviewPopover", "lazy", "ReactSurface", "PREVIEW_PLUGIN", "PreviewPlugin", "definePlugin", "meta", "defineModule", "id", "activatesOn", "Events", "SetupTranslations", "activate", "contributes", "Capabilities", "Translations", "translations", "ClientEvents", "SetupSchema", "ClientCapabilities", "Schema", "DataType", "Person", "Organization", "Startup", "SetupReactSurface"]
|
|
7
7
|
}
|
package/dist/lib/node/meta.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"packages/plugins/plugin-preview/src/meta.ts":{"bytes":1256,"imports":[],"format":"esm"},"packages/plugins/plugin-preview/src/types.ts":{"bytes":3596,"imports":[],"format":"esm"},"packages/plugins/plugin-preview/src/capabilities/preview-popover.ts":{"bytes":8209,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-preview/src/components/ContactCard.tsx":{"bytes":9715,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-preview/src/types.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-preview/src/components/OrganizationCard.tsx":{"bytes":6173,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-preview/src/types.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-preview/src/components/ProjectCard.tsx":{"bytes":3139,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-preview/src/types.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-preview/src/components/index.ts":{"bytes":700,"imports":[{"path":"packages/plugins/plugin-preview/src/components/ContactCard.tsx","kind":"import-statement","original":"./ContactCard"},{"path":"packages/plugins/plugin-preview/src/components/OrganizationCard.tsx","kind":"import-statement","original":"./OrganizationCard"},{"path":"packages/plugins/plugin-preview/src/components/ProjectCard.tsx","kind":"import-statement","original":"./ProjectCard"}],"format":"esm"},"packages/plugins/plugin-preview/src/capabilities/react-surface.tsx":{"bytes":17294,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-form","kind":"import-statement","external":true},{"path":"@dxos/react-ui-table","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-preview/src/components/index.ts","kind":"import-statement","original":"../components"},{"path":"packages/plugins/plugin-preview/src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"packages/plugins/plugin-preview/src/types.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-preview/src/capabilities/index.ts":{"bytes":1050,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-preview/src/capabilities/preview-popover.ts","kind":"dynamic-import","original":"./preview-popover"},{"path":"packages/plugins/plugin-preview/src/capabilities/react-surface.tsx","kind":"dynamic-import","original":"./react-surface"}],"format":"esm"},"packages/plugins/plugin-preview/src/translations.ts":{"bytes":1051,"imports":[{"path":"packages/plugins/plugin-preview/src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/plugins/plugin-preview/src/PreviewPlugin.tsx":{"bytes":4744,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-preview/src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"path":"packages/plugins/plugin-preview/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-preview/src/translations.ts","kind":"import-statement","original":"./translations"}],"format":"esm"},"packages/plugins/plugin-preview/src/index.ts":{"bytes":649,"imports":[{"path":"packages/plugins/plugin-preview/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-preview/src/types.ts","kind":"import-statement","original":"./types"},{"path":"packages/plugins/plugin-preview/src/PreviewPlugin.tsx","kind":"import-statement","original":"./PreviewPlugin"}],"format":"esm"}},"outputs":{"packages/plugins/plugin-preview/dist/lib/node/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3140},"packages/plugins/plugin-preview/dist/lib/node/index.cjs":{"imports":[{"path":"packages/plugins/plugin-preview/dist/lib/node/chunk-VFSOM2B4.cjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-preview/dist/lib/node/preview-popover-GPBOHU5E.cjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-preview/dist/lib/node/react-surface-CPAQ7ZYR.cjs","kind":"dynamic-import"}],"exports":["PREVIEW_PLUGIN","PreviewPlugin","defaultCard","kanbanCardWithoutPoster","meta","popoverCard","previewChrome","previewProse","previewTitle"],"entryPoint":"packages/plugins/plugin-preview/src/index.ts","inputs":{"packages/plugins/plugin-preview/src/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-preview/src/PreviewPlugin.tsx":{"bytesInOutput":960},"packages/plugins/plugin-preview/src/capabilities/index.ts":{"bytesInOutput":190},"packages/plugins/plugin-preview/src/translations.ts":{"bytesInOutput":152}},"bytes":1902},"packages/plugins/plugin-preview/dist/lib/node/preview-popover-GPBOHU5E.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4302},"packages/plugins/plugin-preview/dist/lib/node/preview-popover-GPBOHU5E.cjs":{"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-preview/src/capabilities/preview-popover.ts","inputs":{"packages/plugins/plugin-preview/src/capabilities/preview-popover.ts":{"bytesInOutput":2014}},"bytes":2188},"packages/plugins/plugin-preview/dist/lib/node/react-surface-CPAQ7ZYR.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":17740},"packages/plugins/plugin-preview/dist/lib/node/react-surface-CPAQ7ZYR.cjs":{"imports":[{"path":"packages/plugins/plugin-preview/dist/lib/node/chunk-VFSOM2B4.cjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-form","kind":"import-statement","external":true},{"path":"@dxos/react-ui-table","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-preview/src/capabilities/react-surface.tsx","inputs":{"packages/plugins/plugin-preview/src/capabilities/react-surface.tsx":{"bytesInOutput":4191},"packages/plugins/plugin-preview/src/components/ContactCard.tsx":{"bytesInOutput":2972},"packages/plugins/plugin-preview/src/components/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-preview/src/components/OrganizationCard.tsx":{"bytesInOutput":1881},"packages/plugins/plugin-preview/src/components/ProjectCard.tsx":{"bytesInOutput":855}},"bytes":10509},"packages/plugins/plugin-preview/dist/lib/node/chunk-VFSOM2B4.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2193},"packages/plugins/plugin-preview/dist/lib/node/chunk-VFSOM2B4.cjs":{"imports":[],"exports":["PREVIEW_PLUGIN","defaultCard","kanbanCardWithoutPoster","meta","popoverCard","previewChrome","previewProse","previewTitle"],"inputs":{"packages/plugins/plugin-preview/src/meta.ts":{"bytesInOutput":216},"packages/plugins/plugin-preview/src/types.ts":{"bytesInOutput":342}},"bytes":842}}}
|
|
1
|
+
{"inputs":{"packages/plugins/plugin-preview/src/meta.ts":{"bytes":1256,"imports":[],"format":"esm"},"packages/plugins/plugin-preview/src/types.ts":{"bytes":745,"imports":[],"format":"esm"},"packages/plugins/plugin-preview/src/capabilities/preview-popover.ts":{"bytes":8458,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-preview/src/components/ContactCard.tsx":{"bytes":9249,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-preview/src/components/OrganizationCard.tsx":{"bytes":4743,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-preview/src/components/ProjectCard.tsx":{"bytes":2581,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-preview/src/components/index.ts":{"bytes":700,"imports":[{"path":"packages/plugins/plugin-preview/src/components/ContactCard.tsx","kind":"import-statement","original":"./ContactCard"},{"path":"packages/plugins/plugin-preview/src/components/OrganizationCard.tsx","kind":"import-statement","original":"./OrganizationCard"},{"path":"packages/plugins/plugin-preview/src/components/ProjectCard.tsx","kind":"import-statement","original":"./ProjectCard"}],"format":"esm"},"packages/plugins/plugin-preview/src/capabilities/react-surface.tsx":{"bytes":17075,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-form","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@dxos/react-ui-table","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-preview/src/components/index.ts","kind":"import-statement","original":"../components"},{"path":"packages/plugins/plugin-preview/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-preview/src/capabilities/index.ts":{"bytes":1050,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-preview/src/capabilities/preview-popover.ts","kind":"dynamic-import","original":"./preview-popover"},{"path":"packages/plugins/plugin-preview/src/capabilities/react-surface.tsx","kind":"dynamic-import","original":"./react-surface"}],"format":"esm"},"packages/plugins/plugin-preview/src/translations.ts":{"bytes":1051,"imports":[{"path":"packages/plugins/plugin-preview/src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/plugins/plugin-preview/src/PreviewPlugin.tsx":{"bytes":4744,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-preview/src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"path":"packages/plugins/plugin-preview/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-preview/src/translations.ts","kind":"import-statement","original":"./translations"}],"format":"esm"},"packages/plugins/plugin-preview/src/index.ts":{"bytes":649,"imports":[{"path":"packages/plugins/plugin-preview/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-preview/src/types.ts","kind":"import-statement","original":"./types"},{"path":"packages/plugins/plugin-preview/src/PreviewPlugin.tsx","kind":"import-statement","original":"./PreviewPlugin"}],"format":"esm"}},"outputs":{"packages/plugins/plugin-preview/dist/lib/node/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3134},"packages/plugins/plugin-preview/dist/lib/node/index.cjs":{"imports":[{"path":"packages/plugins/plugin-preview/dist/lib/node/chunk-XGHMBEIV.cjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-preview/dist/lib/node/preview-popover-K4E7UEQU.cjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-preview/dist/lib/node/react-surface-FI63RLWN.cjs","kind":"dynamic-import"}],"exports":["PREVIEW_PLUGIN","PreviewPlugin","meta"],"entryPoint":"packages/plugins/plugin-preview/src/index.ts","inputs":{"packages/plugins/plugin-preview/src/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-preview/src/PreviewPlugin.tsx":{"bytesInOutput":960},"packages/plugins/plugin-preview/src/capabilities/index.ts":{"bytesInOutput":190},"packages/plugins/plugin-preview/src/translations.ts":{"bytesInOutput":152}},"bytes":1690},"packages/plugins/plugin-preview/dist/lib/node/preview-popover-K4E7UEQU.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4413},"packages/plugins/plugin-preview/dist/lib/node/preview-popover-K4E7UEQU.cjs":{"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-preview/src/capabilities/preview-popover.ts","inputs":{"packages/plugins/plugin-preview/src/capabilities/preview-popover.ts":{"bytesInOutput":2079}},"bytes":2253},"packages/plugins/plugin-preview/dist/lib/node/react-surface-FI63RLWN.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":16594},"packages/plugins/plugin-preview/dist/lib/node/react-surface-FI63RLWN.cjs":{"imports":[{"path":"packages/plugins/plugin-preview/dist/lib/node/chunk-XGHMBEIV.cjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-form","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@dxos/react-ui-table","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-preview/src/capabilities/react-surface.tsx","inputs":{"packages/plugins/plugin-preview/src/capabilities/react-surface.tsx":{"bytesInOutput":4227},"packages/plugins/plugin-preview/src/components/ContactCard.tsx":{"bytesInOutput":2882},"packages/plugins/plugin-preview/src/components/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-preview/src/components/OrganizationCard.tsx":{"bytesInOutput":1436},"packages/plugins/plugin-preview/src/components/ProjectCard.tsx":{"bytesInOutput":707}},"bytes":9756},"packages/plugins/plugin-preview/dist/lib/node/chunk-XGHMBEIV.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":613},"packages/plugins/plugin-preview/dist/lib/node/chunk-XGHMBEIV.cjs":{"imports":[],"exports":["PREVIEW_PLUGIN","meta"],"inputs":{"packages/plugins/plugin-preview/src/meta.ts":{"bytesInOutput":216}},"bytes":345}}}
|
|
@@ -16,11 +16,11 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var
|
|
20
|
-
__export(
|
|
19
|
+
var preview_popover_K4E7UEQU_exports = {};
|
|
20
|
+
__export(preview_popover_K4E7UEQU_exports, {
|
|
21
21
|
default: () => preview_popover_default
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
23
|
+
module.exports = __toCommonJS(preview_popover_K4E7UEQU_exports);
|
|
24
24
|
var import_app_framework = require("@dxos/app-framework");
|
|
25
25
|
var import_async = require("@dxos/async");
|
|
26
26
|
var import_client = require("@dxos/client");
|
|
@@ -34,15 +34,19 @@ var customEventOptions = {
|
|
|
34
34
|
passive: false
|
|
35
35
|
};
|
|
36
36
|
var handlePreviewLookup = async (client, defaultSpace, { ref, label }) => {
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
try {
|
|
38
|
+
const dxn = import_keys.DXN.parse(ref);
|
|
39
|
+
if (!dxn) {
|
|
40
|
+
return null;
|
|
41
|
+
}
|
|
42
|
+
const object = await (0, import_client.resolveRef)(client, dxn, defaultSpace);
|
|
43
|
+
return {
|
|
44
|
+
label,
|
|
45
|
+
object
|
|
46
|
+
};
|
|
47
|
+
} catch (err) {
|
|
39
48
|
return null;
|
|
40
49
|
}
|
|
41
|
-
const object = await (0, import_client.resolveRef)(client, dxn, defaultSpace);
|
|
42
|
-
return {
|
|
43
|
-
label,
|
|
44
|
-
object
|
|
45
|
-
};
|
|
46
50
|
};
|
|
47
51
|
var preview_popover_default = (context) => {
|
|
48
52
|
const handleDxRefTagActivate = async ({ refId, label, trigger }) => {
|
|
@@ -74,11 +78,11 @@ var preview_popover_default = (context) => {
|
|
|
74
78
|
} else {
|
|
75
79
|
import_log.log.warn("No default view found", void 0, {
|
|
76
80
|
F: __dxlog_file,
|
|
77
|
-
L:
|
|
81
|
+
L: 65,
|
|
78
82
|
S: void 0,
|
|
79
83
|
C: (f, a) => f(...a)
|
|
80
84
|
});
|
|
81
85
|
}
|
|
82
86
|
return (0, import_app_framework.contributes)(import_app_framework.Capabilities.Null, null, () => cleanup());
|
|
83
87
|
};
|
|
84
|
-
//# sourceMappingURL=preview-popover-
|
|
88
|
+
//# sourceMappingURL=preview-popover-K4E7UEQU.cjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/capabilities/preview-popover.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capabilities, LayoutAction, contributes, createIntent, type PluginContext } from '@dxos/app-framework';\nimport { addEventListener } from '@dxos/async';\nimport { type Client, resolveRef } from '@dxos/client';\nimport { parseId, type Space } from '@dxos/client/echo';\nimport { DXN } from '@dxos/keys';\nimport { type DxRefTagActivate } from '@dxos/lit-ui';\nimport { log } from '@dxos/log';\nimport { ClientCapabilities } from '@dxos/plugin-client';\nimport { type PreviewLinkRef, type PreviewLinkTarget } from '@dxos/react-ui-editor';\n\nconst customEventOptions = { capture: true, passive: false };\n\nconst handlePreviewLookup = async (\n client: Client,\n defaultSpace: Space,\n { ref, label }: PreviewLinkRef,\n): Promise<PreviewLinkTarget | null> => {\n try {\n const dxn = DXN.parse(ref);\n if (!dxn) {\n return null;\n }\n\n const object = await resolveRef(client, dxn, defaultSpace);\n return { label, object };\n } catch (err) {\n return null;\n }\n};\n\nexport default (context: PluginContext) => {\n // TODO(wittjosiah): Factor out lookup handlers to other plugins to make not ECHO-specific.\n const handleDxRefTagActivate = async ({ refId, label, trigger }: DxRefTagActivate) => {\n const { dispatchPromise: dispatch } = context.getCapability(Capabilities.IntentDispatcher);\n const client = context.getCapability(ClientCapabilities.Client);\n const [layout] = context.getCapabilities(Capabilities.Layout);\n const { spaceId } = parseId(layout.workspace);\n const space = (spaceId && client.spaces.get(spaceId)) ?? client.spaces.default;\n const result = await handlePreviewLookup(client, space, { ref: refId, label });\n if (!result) {\n return;\n }\n\n await dispatch(\n createIntent(LayoutAction.UpdatePopover, {\n part: 'popover',\n subject: result.object,\n options: {\n state: true,\n variant: 'virtual',\n anchor: trigger,\n },\n }),\n );\n };\n\n let cleanup: () => void;\n if (document.defaultView) {\n cleanup = addEventListener(document.defaultView, 'dx-ref-tag-activate', handleDxRefTagActivate, customEventOptions);\n } else {\n log.warn('No default view found');\n }\n\n return contributes(Capabilities.Null, null, () => clean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A,MAAI4B;AACJ,MAAIC,SAASC,aAAa;AACxBF,kBAAUG,+BAAiBF,SAASC,aAAa,uBAAuBhC,wBAAwBf,kBAAAA;EAClG,OAAO;AACLiD,mBAAIC,KAAK,yBAAA,QAAA;;;;;;EACX;AAEA,aAAOC,kCAAY9B,kCAAa+B,MAAM,MAAM,MAAMP,QAAAA,CAAAA;AACpD;",
|
|
6
|
+
"names": ["customEventOptions", "capture", "passive", "handlePreviewLookup", "client", "defaultSpace", "ref", "label", "dxn", "DXN", "parse", "object", "resolveRef", "err", "context", "handleDxRefTagActivate", "refId", "trigger", "dispatchPromise", "dispatch", "getCapability", "Capabilities", "IntentDispatcher", "ClientCapabilities", "Client", "layout", "getCapabilities", "Layout", "spaceId", "parseId", "workspace", "space", "spaces", "get", "default", "result", "createIntent", "LayoutAction", "UpdatePopover", "part", "subject", "options", "state", "variant", "anchor", "cleanup", "document", "defaultView", "addEventListener", "log", "warn", "contributes", "Null"]
|
|
7
|
+
}
|
|
@@ -26,42 +26,43 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
__export(
|
|
29
|
+
var react_surface_FI63RLWN_exports = {};
|
|
30
|
+
__export(react_surface_FI63RLWN_exports, {
|
|
31
31
|
default: () => react_surface_default
|
|
32
32
|
});
|
|
33
|
-
module.exports = __toCommonJS(
|
|
34
|
-
var
|
|
33
|
+
module.exports = __toCommonJS(react_surface_FI63RLWN_exports);
|
|
34
|
+
var import_chunk_XGHMBEIV = require("./chunk-XGHMBEIV.cjs");
|
|
35
35
|
var import_react = __toESM(require("react"));
|
|
36
36
|
var import_app_framework = require("@dxos/app-framework");
|
|
37
37
|
var import_echo = require("@dxos/client/echo");
|
|
38
38
|
var import_echo_schema = require("@dxos/echo-schema");
|
|
39
39
|
var import_react_ui = require("@dxos/react-ui");
|
|
40
40
|
var import_react_ui_form = require("@dxos/react-ui-form");
|
|
41
|
+
var import_react_ui_stack = require("@dxos/react-ui-stack");
|
|
41
42
|
var import_react_ui_table = require("@dxos/react-ui-table");
|
|
42
43
|
var import_react_ui_theme = require("@dxos/react-ui-theme");
|
|
43
44
|
var import_schema = require("@dxos/schema");
|
|
44
45
|
var import_tracking = require("@preact-signals/safe-react/tracking");
|
|
45
46
|
var import_react2 = __toESM(require("react"));
|
|
46
47
|
var import_react_ui2 = require("@dxos/react-ui");
|
|
48
|
+
var import_react_ui_stack2 = require("@dxos/react-ui-stack");
|
|
47
49
|
var import_react_ui_theme2 = require("@dxos/react-ui-theme");
|
|
48
50
|
var import_tracking2 = require("@preact-signals/safe-react/tracking");
|
|
49
51
|
var import_react3 = __toESM(require("react"));
|
|
50
52
|
var import_react_ui3 = require("@dxos/react-ui");
|
|
51
|
-
var
|
|
53
|
+
var import_react_ui_stack3 = require("@dxos/react-ui-stack");
|
|
52
54
|
var import_tracking3 = require("@preact-signals/safe-react/tracking");
|
|
53
55
|
var import_react4 = __toESM(require("react"));
|
|
54
|
-
var
|
|
55
|
-
var ContactCard = ({ children,
|
|
56
|
+
var import_react_ui_stack4 = require("@dxos/react-ui-stack");
|
|
57
|
+
var ContactCard = ({ children, subject: { fullName, image, organization, emails }, onOrgClick, role }) => {
|
|
56
58
|
var _effect = (0, import_tracking.useSignals)();
|
|
57
59
|
try {
|
|
58
60
|
const organizationName = organization && typeof organization === "object" ? organization.target?.name : organization;
|
|
59
|
-
return /* @__PURE__ */ import_react2.default.createElement(
|
|
60
|
-
role
|
|
61
|
-
|
|
62
|
-
}, /* @__PURE__ */ import_react2.default.createElement(import_react_ui2.Avatar.Root, null, /* @__PURE__ */ import_react2.default.createElement("div", {
|
|
61
|
+
return /* @__PURE__ */ import_react2.default.createElement(import_react_ui_stack2.Card.Container, {
|
|
62
|
+
role
|
|
63
|
+
}, /* @__PURE__ */ import_react2.default.createElement(import_react_ui2.Avatar.Root, null, /* @__PURE__ */ import_react2.default.createElement(import_react_ui_stack2.Card.Text, {
|
|
63
64
|
role: "group",
|
|
64
|
-
|
|
65
|
+
classNames: "grid gap-3 grid-cols-[min-content_1fr]"
|
|
65
66
|
}, /* @__PURE__ */ import_react2.default.createElement(import_react_ui2.Avatar.Content, {
|
|
66
67
|
imgSrc: image,
|
|
67
68
|
icon: "ph--user--regular",
|
|
@@ -73,11 +74,8 @@ var ContactCard = ({ children, classNames, role, subject: { fullName, image, org
|
|
|
73
74
|
}, /* @__PURE__ */ import_react2.default.createElement(import_react_ui2.Avatar.Label, {
|
|
74
75
|
asChild: true
|
|
75
76
|
}, /* @__PURE__ */ import_react2.default.createElement("h2", {
|
|
76
|
-
className:
|
|
77
|
-
}, fullName))))), organizationName && /* @__PURE__ */ import_react2.default.createElement("
|
|
78
|
-
role: "none",
|
|
79
|
-
className: import_chunk_VFSOM2B4.previewChrome
|
|
80
|
-
}, typeof organization === "object" && onOrgClick ? /* @__PURE__ */ import_react2.default.createElement(import_react_ui2.Button, {
|
|
77
|
+
className: import_react_ui_stack2.cardHeading
|
|
78
|
+
}, fullName))))), organizationName && /* @__PURE__ */ import_react2.default.createElement(import_react_ui_stack2.Card.Chrome, null, typeof organization === "object" && onOrgClick ? /* @__PURE__ */ import_react2.default.createElement(import_react_ui2.Button, {
|
|
81
79
|
variant: "ghost",
|
|
82
80
|
classNames: "gap-2 text-start",
|
|
83
81
|
onClick: () => onOrgClick(organization.target)
|
|
@@ -99,7 +97,7 @@ var ContactCard = ({ children, classNames, role, subject: { fullName, image, org
|
|
|
99
97
|
}), /* @__PURE__ */ import_react2.default.createElement("span", {
|
|
100
98
|
className: "min-is-0 flex-1 truncate"
|
|
101
99
|
}, organizationName))), /* @__PURE__ */ import_react2.default.createElement("dl", {
|
|
102
|
-
className: (0, import_react_ui_theme2.mx)(
|
|
100
|
+
className: (0, import_react_ui_theme2.mx)(import_react_ui_stack2.cardText, "grid gap-2 grid-cols-[min-content_1fr] [&_dt]:text-subdued [&_dt]:pbs-0.5 [&_dd]:min-is-0")
|
|
103
101
|
}, emails?.length && emails.map(({ label, value }) => /* @__PURE__ */ import_react2.default.createElement(import_react2.Fragment, {
|
|
104
102
|
key: value
|
|
105
103
|
}, /* @__PURE__ */ import_react2.default.createElement("dt", null, /* @__PURE__ */ import_react2.default.createElement(import_react_ui2.Icon, {
|
|
@@ -113,30 +111,21 @@ var ContactCard = ({ children, classNames, role, subject: { fullName, image, org
|
|
|
113
111
|
_effect.f();
|
|
114
112
|
}
|
|
115
113
|
};
|
|
116
|
-
var OrganizationCard = ({ children,
|
|
114
|
+
var OrganizationCard = ({ children, subject: { name, image, description, website }, role }) => {
|
|
117
115
|
var _effect = (0, import_tracking2.useSignals)();
|
|
118
116
|
try {
|
|
119
|
-
return /* @__PURE__ */ import_react3.default.createElement(
|
|
120
|
-
role
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
size: 10
|
|
132
|
-
})), /* @__PURE__ */ import_react3.default.createElement("h2", {
|
|
133
|
-
className: (0, import_react_ui_theme3.mx)(import_chunk_VFSOM2B4.previewTitle, import_chunk_VFSOM2B4.previewProse)
|
|
134
|
-
}, name), description && /* @__PURE__ */ import_react3.default.createElement("p", {
|
|
135
|
-
className: (0, import_react_ui_theme3.mx)(import_chunk_VFSOM2B4.previewProse, "line-clamp-2")
|
|
136
|
-
}, description), website && /* @__PURE__ */ import_react3.default.createElement("div", {
|
|
137
|
-
role: "none",
|
|
138
|
-
className: import_chunk_VFSOM2B4.previewChrome
|
|
139
|
-
}, /* @__PURE__ */ import_react3.default.createElement("a", {
|
|
117
|
+
return /* @__PURE__ */ import_react3.default.createElement(import_react_ui_stack3.Card.Container, {
|
|
118
|
+
role
|
|
119
|
+
}, /* @__PURE__ */ import_react3.default.createElement(import_react_ui_stack3.Card.Poster, {
|
|
120
|
+
alt: name,
|
|
121
|
+
...image ? {
|
|
122
|
+
image
|
|
123
|
+
} : {
|
|
124
|
+
icon: "ph--building-office--regular"
|
|
125
|
+
}
|
|
126
|
+
}), /* @__PURE__ */ import_react3.default.createElement(import_react_ui_stack3.Card.Heading, null, name), description && /* @__PURE__ */ import_react3.default.createElement(import_react_ui_stack3.Card.Text, {
|
|
127
|
+
classNames: "line-clamp-2"
|
|
128
|
+
}, description), website && /* @__PURE__ */ import_react3.default.createElement(import_react_ui_stack3.Card.Chrome, null, /* @__PURE__ */ import_react3.default.createElement("a", {
|
|
140
129
|
className: "dx-button dx-focus-ring gap-2",
|
|
141
130
|
"data-variant": "ghost",
|
|
142
131
|
href: website,
|
|
@@ -155,20 +144,17 @@ var OrganizationCard = ({ children, classNames, subject: { name, image, descript
|
|
|
155
144
|
_effect.f();
|
|
156
145
|
}
|
|
157
146
|
};
|
|
158
|
-
var ProjectCard = ({
|
|
147
|
+
var ProjectCard = ({ subject: { name, image, description }, role }) => {
|
|
159
148
|
var _effect = (0, import_tracking3.useSignals)();
|
|
160
149
|
try {
|
|
161
|
-
return /* @__PURE__ */ import_react4.default.createElement(
|
|
162
|
-
role
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
className: (0, import_react_ui_theme4.mx)(import_chunk_VFSOM2B4.previewTitle, "pli-3 mlb-3")
|
|
170
|
-
}, name), description && /* @__PURE__ */ import_react4.default.createElement("p", {
|
|
171
|
-
className: "pli-3 line-clamp-2 mlb-3"
|
|
150
|
+
return /* @__PURE__ */ import_react4.default.createElement(import_react_ui_stack4.Card.Container, {
|
|
151
|
+
role
|
|
152
|
+
}, image && /* @__PURE__ */ import_react4.default.createElement(import_react_ui_stack4.Card.Poster, {
|
|
153
|
+
image,
|
|
154
|
+
alt: name,
|
|
155
|
+
aspect: "auto"
|
|
156
|
+
}), /* @__PURE__ */ import_react4.default.createElement(import_react_ui_stack4.Card.Heading, null, name), description && /* @__PURE__ */ import_react4.default.createElement(import_react_ui_stack4.Card.Text, {
|
|
157
|
+
classNames: "line-clamp-2"
|
|
172
158
|
}, description));
|
|
173
159
|
} finally {
|
|
174
160
|
_effect.f();
|
|
@@ -179,7 +165,7 @@ var react_surface_default = () => (0, import_app_framework.contributes)(import_a
|
|
|
179
165
|
// Specific schema types.
|
|
180
166
|
//
|
|
181
167
|
(0, import_app_framework.createSurface)({
|
|
182
|
-
id: `${
|
|
168
|
+
id: `${import_chunk_XGHMBEIV.PREVIEW_PLUGIN}/schema-popover--contact`,
|
|
183
169
|
role: [
|
|
184
170
|
"popover",
|
|
185
171
|
"card--kanban",
|
|
@@ -216,9 +202,9 @@ var react_surface_default = () => (0, import_app_framework.contributes)(import_a
|
|
|
216
202
|
dispatch
|
|
217
203
|
]);
|
|
218
204
|
return /* @__PURE__ */ import_react.default.createElement(ContactCard, {
|
|
205
|
+
role,
|
|
219
206
|
subject: data.subject,
|
|
220
|
-
onOrgClick: handleOrgClick
|
|
221
|
-
role
|
|
207
|
+
onOrgClick: handleOrgClick
|
|
222
208
|
}, role === "popover" && /* @__PURE__ */ import_react.default.createElement(import_app_framework.Surface, {
|
|
223
209
|
role: "related",
|
|
224
210
|
data
|
|
@@ -226,7 +212,7 @@ var react_surface_default = () => (0, import_app_framework.contributes)(import_a
|
|
|
226
212
|
}
|
|
227
213
|
}),
|
|
228
214
|
(0, import_app_framework.createSurface)({
|
|
229
|
-
id: `${
|
|
215
|
+
id: `${import_chunk_XGHMBEIV.PREVIEW_PLUGIN}/schema-popover--organization`,
|
|
230
216
|
role: [
|
|
231
217
|
"popover",
|
|
232
218
|
"card--kanban",
|
|
@@ -234,15 +220,15 @@ var react_surface_default = () => (0, import_app_framework.contributes)(import_a
|
|
|
234
220
|
],
|
|
235
221
|
filter: (data) => (0, import_echo_schema.isInstanceOf)(import_schema.DataType.Organization, data.subject),
|
|
236
222
|
component: ({ data, role }) => /* @__PURE__ */ import_react.default.createElement(OrganizationCard, {
|
|
237
|
-
|
|
238
|
-
|
|
223
|
+
role,
|
|
224
|
+
subject: data.subject
|
|
239
225
|
}, role === "popover" && /* @__PURE__ */ import_react.default.createElement(import_app_framework.Surface, {
|
|
240
226
|
role: "related",
|
|
241
227
|
data
|
|
242
228
|
}))
|
|
243
229
|
}),
|
|
244
230
|
(0, import_app_framework.createSurface)({
|
|
245
|
-
id: `${
|
|
231
|
+
id: `${import_chunk_XGHMBEIV.PREVIEW_PLUGIN}/schema-popover--project`,
|
|
246
232
|
role: [
|
|
247
233
|
"popover",
|
|
248
234
|
"card--kanban",
|
|
@@ -258,7 +244,7 @@ var react_surface_default = () => (0, import_app_framework.contributes)(import_a
|
|
|
258
244
|
// Fallback for any object.
|
|
259
245
|
//
|
|
260
246
|
(0, import_app_framework.createSurface)({
|
|
261
|
-
id: `${
|
|
247
|
+
id: `${import_chunk_XGHMBEIV.PREVIEW_PLUGIN}/fallback-popover`,
|
|
262
248
|
role: [
|
|
263
249
|
"popover",
|
|
264
250
|
"card--kanban",
|
|
@@ -268,7 +254,7 @@ var react_surface_default = () => (0, import_app_framework.contributes)(import_a
|
|
|
268
254
|
filter: (data) => (0, import_echo.isEchoObject)(data.subject),
|
|
269
255
|
component: ({ data, role }) => {
|
|
270
256
|
const schema = (0, import_echo.getSchema)(data.subject);
|
|
271
|
-
const { t } = (0, import_react_ui.useTranslation)(
|
|
257
|
+
const { t } = (0, import_react_ui.useTranslation)(import_chunk_XGHMBEIV.PREVIEW_PLUGIN);
|
|
272
258
|
if (!schema) {
|
|
273
259
|
return /* @__PURE__ */ import_react.default.createElement("p", {
|
|
274
260
|
className: import_react_ui_theme.descriptionMessage
|
|
@@ -281,17 +267,16 @@ var react_surface_default = () => (0, import_app_framework.contributes)(import_a
|
|
|
281
267
|
(0, import_echo_schema.setValue)(data.subject, path, value);
|
|
282
268
|
}
|
|
283
269
|
}, []);
|
|
284
|
-
return /* @__PURE__ */ import_react.default.createElement(
|
|
270
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react_ui_stack.Card.Container, {
|
|
271
|
+
role
|
|
272
|
+
}, /* @__PURE__ */ import_react.default.createElement(import_react_ui_form.Form, {
|
|
285
273
|
schema,
|
|
286
274
|
values: data.subject,
|
|
287
275
|
readonly: role === "popover",
|
|
288
276
|
onSave: handleSave,
|
|
289
|
-
autoSave: true
|
|
290
|
-
|
|
291
|
-
classNames: import_chunk_VFSOM2B4.kanbanCardWithoutPoster
|
|
292
|
-
}
|
|
293
|
-
});
|
|
277
|
+
autoSave: true
|
|
278
|
+
}));
|
|
294
279
|
}
|
|
295
280
|
})
|
|
296
281
|
]);
|
|
297
|
-
//# sourceMappingURL=react-surface-
|
|
282
|
+
//# sourceMappingURL=react-surface-FI63RLWN.cjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/capabilities/react-surface.tsx", "../../../src/components/ContactCard.tsx", "../../../src/components/OrganizationCard.tsx", "../../../src/components/ProjectCard.tsx"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport React, { useCallback } from 'react';\n\nimport {\n Capabilities,\n LayoutAction,\n Surface,\n contributes,\n createIntent,\n createSurface,\n useIntentDispatcher,\n} from '@dxos/app-framework';\nimport { Filter, fullyQualifiedId, getSchema, getSpace, isEchoObject, type AnyLiveObject } from '@dxos/client/echo';\nimport { isInstanceOf, type JsonPath, setValue } from '@dxos/echo-schema';\nimport { useTranslation } from '@dxos/react-ui';\nimport { Form } from '@dxos/react-ui-form';\nimport { Card } from '@dxos/react-ui-stack';\nimport { TableType } from '@dxos/react-ui-table';\nimport { descriptionMessage } from '@dxos/react-ui-theme';\nimport { DataType } from '@dxos/schema';\n\nimport { ContactCard, OrganizationCard, ProjectCard } from '../components';\nimport { PREVIEW_PLUGIN } from '../meta';\n\nexport default () =>\n contributes(Capabilities.ReactSurface, [\n //\n // Specific schema types.\n //\n createSurface({\n id: `${PREVIEW_PLUGIN}/schema-popover--contact`,\n role: ['popover', 'card--kanban', 'card'],\n filter: (data): data is { subject: DataType.Person } => isInstanceOf(DataType.Person, data.subject),\n component: ({ data, role }) => {\n const { dispatchPromise: dispatch } = useIntentDispatcher();\n const handleOrgClick = useCallback(\n async (org: DataType.Organization) => {\n const space = getSpace(org);\n const tablesQuery = await space?.db.query(Filter.type(TableType)).run();\n const currentSpaceOrgTable = tablesQuery?.objects.find((table) => {\n return table.view?.target?.query?.typename === DataType.Organization.typename;\n });\n await dispatch(\n createIntent(LayoutAction.UpdatePopover, {\n part: 'popover',\n options: {\n state: false,\n anchorId: '',\n },\n }),\n );\n if (currentSpaceOrgTable) {\n return dispatch(\n createIntent(LayoutAction.Open, {\n part: 'main',\n subject: [fullyQualifiedId(currentSpaceOrgTable)],\n options: { workspace: space?.id },\n }),\n );\n }\n },\n [dispatch],\n );\n return (\n <ContactCard role={role} subject={data.subject} onOrgClick={handleOrgClick}>\n {role === 'popover' && <Surface role='related' data={data} />}\n </ContactCard>\n );\n },\n }),\n createSurface({\n id: `${PREVIEW_PLUGIN}/schema-popover--organization`,\n role: ['popover', 'card--kanban', 'card'],\n filter: (data): data is { subject: DataType.Organization } => isInstanceOf(DataType.Organization, data.subject),\n component: ({ data, role }) => (\n <OrganizationCard role={role} subject={data.subject}>\n {role === 'popover' && <Surface role='related' data={data} />}\n </OrganizationCard>\n ),\n }),\n createSurface({\n id: `${PREVIEW_PLUGIN}/schema-popover--project`,\n role: ['popover', 'card--kanban', 'card'],\n filter: (data): data is { subject: DataType.Project } => isInstanceOf(DataType.Project, data.subject),\n component: ({ data, role }) => <ProjectCard subject={data.subject} role={role} />,\n }),\n\n //\n // Fallback for any object.\n //\n createSurface({\n id: `${PREVIEW_PLUGIN}/fallback-popover`,\n role: ['popover', 'card--kanban', 'card'],\n position: 'fallback',\n filter: (data): data is { subject: AnyLiveObject<any> } => isEchoObject(data.subject),\n component: ({ data, role }) => {\n const schema = getSchema(data.subject);\n const { t } = useTranslation(PREVIEW_PLUGIN);\n if (!schema) {\n return <p className={descriptionMessage}>{t('unable to create preview message')}</p>;\n }\n\n const handleSave = useCallback((values: any, { changed }: { changed: Record<string, boolean> }) => {\n const changedPaths = Object.keys(changed).filter((path) => changed[path]);\n for (const path of changedPaths) {\n const value = values[path];\n setValue(data.subject, path as JsonPath, value);\n }\n }, []);\n\n return (\n <Card.Container role={role}>\n <Form schema={schema} values={data.subject} readonly={role === 'popover'} onSave={handleSave} autoSave />\n </Card.Container>\n );\n },\n }),\n ]);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport React, { Fragment } from 'react';\n\nimport { Icon, Avatar, Button } from '@dxos/react-ui';\nimport { Card, cardHeading, cardText } from '@dxos/react-ui-stack';\nimport { mx } from '@dxos/react-ui-theme';\nimport { type DataType } from '@dxos/schema';\n\nimport { type PreviewProps } from '../types';\n\nexport const ContactCard = ({\n children,\n subject: { fullName, image, organization, emails },\n onOrgClick,\n role,\n}: PreviewProps<DataType.Person> & { onOrgClick?: (org: DataType.Organization) => void }) => {\n const organizationName = organization && typeof organization === 'object' ? organization.target?.name : organization;\n return (\n <Card.Container role={role}>\n <Avatar.Root>\n <Card.Text role='group' classNames='grid gap-3 grid-cols-[min-content_1fr]'>\n <Avatar.Content imgSrc={image} icon='ph--user--regular' size={16} hue='neutral' />\n <div role='none' className='bs-min self-center'>\n <Avatar.Label asChild>\n <h2 className={cardHeading}>{fullName}</h2>\n </Avatar.Label>\n </div>\n </Card.Text>\n </Avatar.Root>\n {organizationName && (\n <Card.Chrome>\n {typeof organization === 'object' && onOrgClick ? (\n <Button variant='ghost' classNames='gap-2 text-start' onClick={() => onOrgClick(organization.target!)}>\n <Icon icon='ph--buildings--regular' size={5} classNames='text-subdued' />\n <span className='min-is-0 flex-1 truncate'>{organizationName}</span>\n <Icon icon='ph--arrow-right--regular' />\n </Button>\n ) : (\n <p className='dx-button gap-2' data-variant='ghost'>\n <Icon icon='ph--buildings--regular' size={5} classNames='text-subdued' />\n <span className='min-is-0 flex-1 truncate'>{organizationName}</span>\n </p>\n )}\n </Card.Chrome>\n )}\n <dl\n className={mx(\n cardText,\n 'grid gap-2 grid-cols-[min-content_1fr] [&_dt]:text-subdued [&_dt]:pbs-0.5 [&_dd]:min-is-0',\n )}\n >\n {emails?.length &&\n emails.map(({ label, value }) => (\n <Fragment key={value}>\n <dt>\n <Icon icon='ph--at--regular' size={5} />\n </dt>\n <dd key={value} className='break-words'>\n {value}\n </dd>\n </Fragment>\n ))}\n </dl>\n {children}\n </Card.Container>\n );\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Icon } from '@dxos/react-ui';\nimport { Card } from '@dxos/react-ui-stack';\nimport { type DataType } from '@dxos/schema';\n\nimport { type PreviewProps } from '../types';\n\nexport const OrganizationCard = ({\n children,\n subject: { name, image, description, website },\n role,\n}: PreviewProps<DataType.Organization>) => {\n return (\n <Card.Container role={role}>\n <Card.Poster alt={name!} {...(image ? { image } : { icon: 'ph--building-office--regular' })} />\n <Card.Heading>{name}</Card.Heading>\n {description && <Card.Text classNames='line-clamp-2'>{description}</Card.Text>}\n {website && (\n <Card.Chrome>\n <a\n className='dx-button dx-focus-ring gap-2'\n data-variant='ghost'\n href={website}\n target='_blank'\n rel='noreferrer'\n >\n <Icon icon='ph--link--regular' size={5} classNames='text-subdued' />\n <span className='grow'>{website}</span>\n <Icon icon='ph--arrow-square-out--regular' />\n </a>\n </Card.Chrome>\n )}\n {children}\n </Card.Container>\n );\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Card } from '@dxos/react-ui-stack';\nimport { type DataType } from '@dxos/schema';\n\nimport { type PreviewProps } from '../types';\n\nexport const ProjectCard = ({ subject: { name, image, description }, role }: PreviewProps<DataType.Project>) => {\n return (\n <Card.Container role={role}>\n {image && <Card.Poster image={image} alt={name} aspect='auto' />}\n <Card.Heading>{name}</Card.Heading>\n {description && <Card.Text classNames='line-cl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AgB;;IAClC0D,QAAQ,CAACC,aAAgDC,iCAAaC,uBAASoC,SAAStC,KAAKjE,OAAO;IACpGqE,WAAW,CAAC,EAAEJ,MAAM3D,KAAI,MAAOI,6BAAAA,QAAA,cAAC8C,aAAAA;MAAYxD,SAASiE,KAAKjE;MAASM;;EACrE,CAAA;;;;MAKAuD,oCAAc;IACZC,IAAI,GAAGC,oCAAAA;IACPzD,MAAM;MAAC;MAAW;MAAgB;;IAClCkG,UAAU;IACVxC,QAAQ,CAACC,aAAkDwC,0BAAaxC,KAAKjE,OAAO;IACpFqE,WAAW,CAAC,EAAEJ,MAAM3D,KAAI,MAAE;AACxB,YAAMoG,aAASC,uBAAU1C,KAAKjE,OAAO;AACrC,YAAM,EAAE4G,EAAC,QAAKC,gCAAe9C,oCAAAA;AAC7B,UAAI,CAAC2C,QAAQ;AACX,eAAOhG,6BAAAA,QAAA,cAACwB,KAAAA;UAAEX,WAAWuF;WAAqBF,EAAE,kCAAA,CAAA;MAC9C;AAEA,YAAMG,iBAAarC,0BAAY,CAACsC,QAAa,EAAEC,QAAO,MAAwC;AAC5F,cAAMC,eAAeC,OAAOC,KAAKH,OAAAA,EAASjD,OAAO,CAACqD,SAASJ,QAAQI,IAAAA,CAAK;AACxE,mBAAWA,QAAQH,cAAc;AAC/B,gBAAMxE,QAAQsE,OAAOK,IAAAA;AACrBC,2CAASrD,KAAKjE,SAASqH,MAAkB3E,KAAAA;QAC3C;MACF,GAAG,CAAA,CAAE;AAEL,aACEhC,6BAAAA,QAAA,cAACC,sBAAAA,KAAKC,WAAS;QAACN;SACdI,6BAAAA,QAAA,cAAC6G,2BAAAA;QAAKb;QAAgBM,QAAQ/C,KAAKjE;QAASwH,UAAUlH,SAAS;QAAWmH,QAAQV;QAAYW,UAAAA;;IAGpG;EACF,CAAA;CACD;",
|
|
6
|
+
"names": ["import_react", "import_react_ui", "import_react_ui_stack", "import_react_ui_theme", "ContactCard", "children", "subject", "fullName", "image", "organization", "emails", "onOrgClick", "role", "organizationName", "target", "name", "React", "Card", "Container", "Avatar", "Root", "Text", "classNames", "Content", "imgSrc", "icon", "size", "hue", "div", "className", "Label", "asChild", "h2", "cardHeading", "Chrome", "Button", "variant", "onClick", "Icon", "span", "p", "data-variant", "dl", "mx", "cardText", "length", "map", "label", "value", "Fragment", "key", "dt", "dd", "OrganizationCard", "description", "website", "Poster", "alt", "Heading", "a", "href", "rel", "ProjectCard", "aspect", "contributes", "Capabilities", "ReactSurface", "createSurface", "id", "PREVIEW_PLUGIN", "filter", "data", "isInstanceOf", "DataType", "Person", "component", "dispatchPromise", "dispatch", "useIntentDispatcher", "handleOrgClick", "useCallback", "org", "space", "getSpace", "tablesQuery", "db", "query", "Filter", "type", "TableType", "run", "currentSpaceOrgTable", "objects", "find", "table", "view", "typename", "Organization", "createIntent", "LayoutAction", "UpdatePopover", "part", "options", "state", "anchorId", "Open", "fullyQualifiedId", "workspace", "Surface", "Project", "position", "isEchoObject", "schema", "getSchema", "t", "useTranslation", "descriptionMessage", "handleSave", "values", "changed", "changedPaths", "Object", "keys", "path", "setValue", "Form", "readonly", "onSave", "autoSave"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
+
|
|
3
|
+
// packages/plugins/plugin-preview/src/meta.ts
|
|
4
|
+
var PREVIEW_PLUGIN = "dxos.org/plugin/preview";
|
|
5
|
+
var meta = {
|
|
6
|
+
id: PREVIEW_PLUGIN,
|
|
7
|
+
name: "Preview",
|
|
8
|
+
icon: "ph--eye--regular",
|
|
9
|
+
source: "https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-preview"
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export {
|
|
13
|
+
PREVIEW_PLUGIN,
|
|
14
|
+
meta
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=chunk-7BPXNL44.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/meta.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type PluginMeta } from '@dxos/app-framework';\n\nexport const PREVIEW_PLUGIN = 'dxos.org/plugin/preview';\n\nexport const meta: PluginMeta = {\n id: PREVIEW_PLUGIN,\n name: 'Preview',\n icon: 'ph--eye--regular',\n source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-preview',\n};\n"],
|
|
5
|
+
"mappings": ";;;AAMO,IAAMA,iBAAiB;AAEvB,IAAMC,OAAmB;EAC9BC,IAAIF;EACJG,MAAM;EACNC,MAAM;EACNC,QAAQ;AACV;",
|
|
6
|
+
"names": ["PREVIEW_PLUGIN", "meta", "id", "name", "icon", "source"]
|
|
7
|
+
}
|
|
@@ -1,14 +1,8 @@
|
|
|
1
1
|
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
PREVIEW_PLUGIN,
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
meta,
|
|
7
|
-
popoverCard,
|
|
8
|
-
previewChrome,
|
|
9
|
-
previewProse,
|
|
10
|
-
previewTitle
|
|
11
|
-
} from "./chunk-PYKIS3N7.mjs";
|
|
4
|
+
meta
|
|
5
|
+
} from "./chunk-7BPXNL44.mjs";
|
|
12
6
|
|
|
13
7
|
// packages/plugins/plugin-preview/src/PreviewPlugin.tsx
|
|
14
8
|
import { Capabilities, Events, contributes, defineModule, definePlugin } from "@dxos/app-framework";
|
|
@@ -17,8 +11,8 @@ import { DataType } from "@dxos/schema";
|
|
|
17
11
|
|
|
18
12
|
// packages/plugins/plugin-preview/src/capabilities/index.ts
|
|
19
13
|
import { lazy } from "@dxos/app-framework";
|
|
20
|
-
var PreviewPopover = lazy(() => import("./preview-popover-
|
|
21
|
-
var ReactSurface = lazy(() => import("./react-surface-
|
|
14
|
+
var PreviewPopover = lazy(() => import("./preview-popover-W5FPZQM3.mjs"));
|
|
15
|
+
var ReactSurface = lazy(() => import("./react-surface-EHIW3IEA.mjs"));
|
|
22
16
|
|
|
23
17
|
// packages/plugins/plugin-preview/src/translations.ts
|
|
24
18
|
var translations_default = [
|
|
@@ -62,12 +56,6 @@ var PreviewPlugin = () => definePlugin(meta, [
|
|
|
62
56
|
export {
|
|
63
57
|
PREVIEW_PLUGIN,
|
|
64
58
|
PreviewPlugin,
|
|
65
|
-
|
|
66
|
-
kanbanCardWithoutPoster,
|
|
67
|
-
meta,
|
|
68
|
-
popoverCard,
|
|
69
|
-
previewChrome,
|
|
70
|
-
previewProse,
|
|
71
|
-
previewTitle
|
|
59
|
+
meta
|
|
72
60
|
};
|
|
73
61
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/PreviewPlugin.tsx", "../../../src/capabilities/index.ts", "../../../src/translations.ts"],
|
|
4
4
|
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Capabilities, Events, contributes, defineModule, definePlugin } from '@dxos/app-framework';\nimport { ClientCapabilities, ClientEvents } from '@dxos/plugin-client';\nimport { DataType } from '@dxos/schema';\n\nimport { PreviewPopover, ReactSurface } from './capabilities';\nimport { meta } from './meta';\nimport translations from './translations';\n\nexport const PreviewPlugin = () =>\n definePlugin(meta, [\n defineModule({\n id: `${meta.id}/module/translations`,\n activatesOn: Events.SetupTranslations,\n activate: () => contributes(Capabilities.Translations, translations),\n }),\n defineModule({\n id: `${meta.id}/module/schema`,\n activatesOn: ClientEvents.SetupSchema,\n activate: () => [contributes(ClientCapabilities.Schema, [DataType.Person, DataType.Organization])],\n }),\n defineModule({\n id: `${meta.id}/module/preview-popover`,\n activatesOn: Events.Startup,\n activate: PreviewPopover,\n }),\n defineModule({\n id: `${meta.id}/module/react-surface`,\n activatesOn: Events.SetupReactSurface,\n activate: ReactSurface,\n }),\n ]);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { lazy } from '@dxos/app-framework';\n\nexport const PreviewPopover = lazy(() => import('./preview-popover'));\nexport const ReactSurface = lazy(() => import('./react-surface'));\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { PREVIEW_PLUGIN } from './meta';\n\nexport default [\n {\n 'en-US': {\n [PREVIEW_PLUGIN]: {\n 'unable to create preview message': 'No preview',\n },\n },\n },\n];\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;AAIA,SAASA,cAAcC,QAAQC,aAAaC,cAAcC,oBAAoB;AAC9E,SAASC,oBAAoBC,oBAAoB;AACjD,SAASC,gBAAgB;;;ACFzB,SAASC,YAAY;AAEd,IAAMC,iBAAiBC,KAAK,MAAM,OAAO,gCAAA,CAAA;AACzC,IAAMC,eAAeD,KAAK,MAAM,OAAO,8BAAA,CAAA;;;ACD9C,IAAA,uBAAe;EACb;IACE,SAAS;MACP,CAACE,cAAAA,GAAiB;QAChB,oCAAoC;MACtC;IACF;EACF;;;;AFDK,IAAMC,gBAAgB,MAC3BC,aAAaC,MAAM;EACjBC,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAOC;IACpBC,UAAU,MAAMC,YAAYC,aAAaC,cAAcC,oBAAAA;EACzD,CAAA;EACAT,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaQ,aAAaC;IAC1BN,UAAU,MAAM;MAACC,YAAYM,mBAAmBC,QAAQ;QAACC,SAASC;QAAQD,SAASE;OAAa;;EAClG,CAAA;EACAhB,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAOc;IACpBZ,UAAUa;EACZ,CAAA;EACAlB,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAOgB;IACpBd,UAAUe;EACZ,CAAA;CACD;",
|
|
6
6
|
"names": ["Capabilities", "Events", "contributes", "defineModule", "definePlugin", "ClientCapabilities", "ClientEvents", "DataType", "lazy", "PreviewPopover", "lazy", "ReactSurface", "PREVIEW_PLUGIN", "PreviewPlugin", "definePlugin", "meta", "defineModule", "id", "activatesOn", "Events", "SetupTranslations", "activate", "contributes", "Capabilities", "Translations", "translations", "ClientEvents", "SetupSchema", "ClientCapabilities", "Schema", "DataType", "Person", "Organization", "Startup", "PreviewPopover", "SetupReactSurface", "ReactSurface"]
|
|
7
7
|
}
|