@dxos/plugin-preview 0.13.0 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/chunk-react-surface.mjs +12 -8
- package/dist/lib/chunk-react-surface.mjs.map +1 -1
- package/dist/types/src/components/UnsupportedType/UnsupportedType.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +23 -23
- package/src/components/UnsupportedType/UnsupportedType.tsx +10 -7
|
@@ -288,14 +288,18 @@ var UnsupportedType = ({ role, typename }) => {
|
|
|
288
288
|
return /* @__PURE__ */ jsx(Panel.Root, {
|
|
289
289
|
role,
|
|
290
290
|
children: /* @__PURE__ */ jsx(Panel.Body, {
|
|
291
|
-
|
|
292
|
-
children: /* @__PURE__ */
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
children:
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
291
|
+
asChild: true,
|
|
292
|
+
children: /* @__PURE__ */ jsx(Layout.Grid, {
|
|
293
|
+
center: true,
|
|
294
|
+
classNames: "p-8",
|
|
295
|
+
children: /* @__PURE__ */ jsxs(Banner.Root, {
|
|
296
|
+
valence: "info",
|
|
297
|
+
icon: "ph--puzzle-piece--regular",
|
|
298
|
+
children: [/* @__PURE__ */ jsx(Banner.Title, { children: t("unsupported-type.title") }), /* @__PURE__ */ jsx(Banner.Body, {
|
|
299
|
+
"data-testid": "previewPlugin.unsupportedType",
|
|
300
|
+
children: t("unsupported-type.message", { typename })
|
|
301
|
+
})]
|
|
302
|
+
})
|
|
299
303
|
})
|
|
300
304
|
})
|
|
301
305
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chunk-react-surface.mjs","names":[],"sources":["../../src/cards/ExpandoCard.tsx","../../src/cards/FormCard.tsx","../../src/cards/JsonCard.tsx","../../src/cards/OrganizationCard.tsx","../../src/cards/PersonCard.tsx","../../src/cards/PersonCardIcon.tsx","../../src/cards/ProjectCard.tsx","../../src/cards/TaskCard.tsx","../../src/components/UnsupportedType/UnsupportedType.tsx","../../src/capabilities/RelatedCards.tsx","../../src/capabilities/react-surface.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\nimport React, { useCallback, useMemo } from 'react';\n\nimport type * as AppSurface from '@dxos/app-toolkit/AppSurface';\nimport { Obj } from '@dxos/echo';\nimport * as SchemaEx from '@dxos/effect/SchemaEx';\nimport { Form } from '@dxos/react-ui-form';\nimport * as Card from '@dxos/react-ui/Card';\n\nconst schemaForValue = (value: unknown): Schema.Codec<any, any> | undefined => {\n switch (typeof value) {\n case 'string':\n return Schema.String;\n case 'number':\n return Schema.Number;\n case 'boolean':\n return Schema.Boolean;\n default:\n return undefined;\n }\n};\n\n/**\n * Reserved keys: `id`, plus any `~`-prefixed key (ECHO uses `~`-prefixed\n * string keys to brand entity instances and schemas — KindId,\n * SchemaKindId, SnapshotKindId, etc. — and the `~` namespace is reserved\n * for that purpose). They show up in `Object.keys` but aren't user data.\n */\nconst isInternalKey = (key: string) => key === 'id' || key.startsWith('~');\n\nexport const ExpandoCard = ({ subject, ignorePaths }: AppSurface.ObjectCardProps) => {\n const schema = useMemo(() => {\n const ignored = new Set(ignorePaths ?? []);\n const fields: Record<string, Schema.Codec<any, any>> = {};\n for (const key of Object.keys(subject)) {\n if (isInternalKey(key) || ignored.has(key)) {\n continue;\n }\n const fieldSchema = schemaForValue((subject as any)[key]);\n if (fieldSchema) {\n fields[key] = fieldSchema;\n }\n }\n return Schema.Struct(fields);\n }, [subject, ignorePaths]);\n\n const handleSave = useCallback(\n (values: any, { changed }: { changed: Record<string, boolean> }) => {\n const paths = Object.keys(changed).filter((path) => changed[path]);\n Obj.update(subject, (subject) => {\n for (const path of paths) {\n const value = values[path];\n const parts = SchemaEx.splitJsonPath(path as SchemaEx.JsonPath);\n Obj.setValue(subject, parts, value);\n }\n });\n },\n [subject],\n );\n\n return (\n <Card.Body>\n <Form.Root schema={schema} values={subject} autoSave onSave={handleSave}>\n <Form.Viewport>\n <Form.Content>\n <Form.Fields />\n </Form.Content>\n </Form.Viewport>\n </Form.Root>\n </Card.Body>\n );\n};\n","//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\nimport React, { useCallback, useMemo } from 'react';\n\nimport type * as AppSurface from '@dxos/app-toolkit/AppSurface';\nimport { Obj, Type } from '@dxos/echo';\nimport { useType } from '@dxos/echo-react';\nimport { type AnyProperties } from '@dxos/echo/internal';\nimport * as SchemaEx from '@dxos/effect/SchemaEx';\nimport { Form, type FormPresentation, type FormUpdateMeta, getFormProperties, omitId } from '@dxos/react-ui-form';\nimport * as Card from '@dxos/react-ui/Card';\nimport * as Hooks from '@dxos/react-ui/Hooks';\nimport { type ProjectionModel } from '@dxos/schema';\n\nimport { meta } from '#meta';\n\nexport type FormCardProps = AppSurface.ObjectCardProps & {\n projection?: ProjectionModel;\n readonly?: boolean;\n layout?: FormPresentation;\n};\n\n/**\n * Default/fallback card for any ECHO object.\n * Renders a `Form` against the object's schema — either the static schema\n * from `Obj.getSchema` or, for runtime/mutable schemas, the reactive\n * schema looked up via `useType`.\n */\nexport const FormCard = ({ subject, projection, readonly = true, layout }: FormCardProps) => {\n const { t } = Hooks.useTranslation(meta.profile.key);\n // Readonly cards default to the `static` presentation — plain DOM, undefined values\n // omitted — which reads as a preview rather than a form. Editable cards keep the\n // `compact` form layout. Callers can override either via the explicit `layout` prop.\n const resolvedLayout: FormPresentation = layout ?? (readonly ? 'static' : 'compact');\n\n // Try the static schema first; fall back to the runtime/database schema for\n // dynamic types whose schema isn't reachable via `Obj.getSchema` (DXN mismatch).\n const staticType = Obj.getType(subject);\n const db = Obj.getDatabase(subject);\n // `Obj.getTypeURI` throws on corrupted objects that are missing a type; swallow that\n // and fall through to the \"unable to create preview\" path rather than crashing the card.\n const fallbackTypeUri = useMemo(() => {\n if (staticType) {\n return undefined;\n }\n try {\n return Obj.getTypeURI(subject);\n } catch {\n return undefined;\n }\n }, [staticType, subject]);\n const runtimeType = useType(db, fallbackTypeUri);\n const schema = useMemo((): Schema.Codec<any, any> | undefined => {\n const resolvedType = runtimeType ?? staticType;\n return resolvedType ? omitId(Type.getSchema(resolvedType)) : undefined;\n }, [runtimeType, staticType]);\n\n // Predict whether the form would render anything visible. Without this guard,\n // readonly + compact mode produces an empty scrollarea when every form-renderable\n // field is unset (e.g., a Table object whose `view`/`sizes` are FormInput-hidden\n // and whose `name` is undefined).\n //\n // - In editable mode (`!readonly`), the form renders empty fields, so we only\n // bail when there are no form-renderable properties at all.\n // - In readonly mode, the form hides fields with null/undefined values, so we\n // bail when no form-renderable property has a non-null value.\n const hasRenderableContent = useMemo(() => {\n if (!schema) {\n return false;\n }\n const properties = getFormProperties(schema.ast);\n if (properties.length === 0) {\n return false;\n }\n if (!readonly) {\n return true;\n }\n return properties.some((prop) => (subject as any)?.[prop.name] != null);\n }, [schema, subject, readonly]);\n\n const handleSave = useCallback(\n (values: AnyProperties, { changed }: FormUpdateMeta<AnyProperties>) => {\n const paths = (Object.keys(changed) as SchemaEx.JsonPath[]).filter((path) => changed[path]);\n Obj.update(subject, (subject) => {\n for (const path of paths) {\n const parts = SchemaEx.splitJsonPath(path);\n const value = Obj.getValue(values as any, parts);\n Obj.setValue(subject, parts, value);\n }\n });\n },\n [subject],\n );\n\n if (!schema || !hasRenderableContent) {\n return (\n <Card.Body>\n <Card.Row>\n <Card.Text variant='muted'>{t('unable-to-create-preview.message')}</Card.Text>\n </Card.Row>\n </Card.Body>\n );\n }\n\n const { icon, hue } = Obj.getIcon(subject) ?? { icon: 'ph--circle-dashed--regular', hue: 'neutral' };\n\n return (\n <Card.Body>\n <Form.Root\n schema={schema}\n projection={projection}\n values={subject}\n readonly={readonly}\n layout={resolvedLayout}\n autoSave\n onSave={handleSave}\n >\n <Form.Viewport>\n <Form.Content>\n <Form.Fields />\n </Form.Content>\n </Form.Viewport>\n </Form.Root>\n </Card.Body>\n );\n};\n","//\n// Copyright 2025 DXOS.org\n//\n\nimport React, { useState } from 'react';\n\nimport { JsonHighlighter } from '@dxos/react-ui-syntax-highlighter';\nimport * as Card from '@dxos/react-ui/Card';\nimport * as Layout from '@dxos/react-ui/Layout';\nimport * as SystemButton from '@dxos/react-ui/SystemButton';\n\nexport const JsonCard = ({ data }: { data: unknown }) => {\n const [open, setOpen] = useState(false);\n // JSON.stringify throws on circular references / unsupported values (e.g. BigInt); keep the card stable.\n let collapsedLength = 0;\n try {\n collapsedLength = JSON.stringify(data)?.length ?? 0;\n } catch {}\n return (\n <Card.Row>\n <Layout.Block classNames='self-start'>\n <SystemButton.Disclosure\n variant='ghost'\n size='sm'\n label='Toggle JSON'\n expanded={open}\n onExpandedChange={setOpen}\n />\n </Layout.Block>\n {(open && <JsonHighlighter data={data} classNames='col-span-full max-h-[20lh] py-1.5 text-xs' />) || (\n <Card.Text variant='muted'>{collapsedLength}</Card.Text>\n )}\n </Card.Row>\n );\n};\n","//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport type * as AppSurface from '@dxos/app-toolkit/AppSurface';\nimport * as Card from '@dxos/react-ui/Card';\nimport { type Organization } from '@dxos/types';\n\nexport const OrganizationCard = ({ subject }: AppSurface.ObjectCardProps<Organization.Organization>) => {\n const { name, image, description, website } = subject;\n\n return (\n <Card.Body>\n {image && <Card.Poster alt={name ?? ''} src={image} />}\n {description && (\n <Card.Row>\n <Card.Text variant='muted'>{description}</Card.Text>\n </Card.Row>\n )}\n {website && <Card.Link label={website} href={website} />}\n </Card.Body>\n );\n};\n","//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport React, { useCallback, useRef } from 'react';\n\nimport * as Hooks from '@dxos/app-framework/Hooks';\nimport type * as AppSurface from '@dxos/app-toolkit/AppSurface';\nimport * as GraphPath from '@dxos/app-toolkit/GraphPath';\nimport * as LayoutOperation from '@dxos/app-toolkit/LayoutOperation';\nimport { Obj } from '@dxos/echo';\nimport * as EffectEx from '@dxos/effect/EffectEx';\nimport { Attention } from '@dxos/react-ui-attention/types';\nimport * as Avatar from '@dxos/react-ui/Avatar';\nimport * as Card from '@dxos/react-ui/Card';\nimport * as Icon from '@dxos/react-ui/Icon';\nimport * as Layout from '@dxos/react-ui/Layout';\nimport { type Person } from '@dxos/types';\n\nexport const PersonCard = ({ subject }: AppSurface.ObjectCardProps<Person.Person>) => {\n const { invoke } = Hooks.useOperationInvoker();\n // Card.Action's onClick carries no event, so resolve the origin plank from the card element itself.\n const cardRef = useRef<HTMLDivElement>(null);\n const { image, organization: { target: organization } = {}, emails = [] } = subject;\n\n const handleOrganizationClick = useCallback(() => {\n if (!organization) {\n return;\n }\n\n const pivotId = cardRef.current ? Attention.getRootAttendableId(cardRef.current) : undefined;\n return Effect.gen(function* () {\n const organizationPath = GraphPath.getObjectPathFromObject(organization);\n const db = Obj.getDatabase(organization);\n yield* invoke(LayoutOperation.UpdatePopover, { state: false, anchorId: '' });\n yield* invoke(LayoutOperation.Open, {\n subject: [organizationPath],\n pivotId,\n disposition: 'add',\n workspace: db ? GraphPath.getSpacePath(db.spaceId) : undefined,\n });\n }).pipe(EffectEx.runAndForwardErrors);\n }, [invoke, organization]);\n\n return (\n <Card.Body ref={cardRef}>\n {image && (\n <Card.Row>\n <Avatar.Root\n src={image}\n icon='ph--user--regular'\n size='xl'\n classNames={[!image && 'opacity-50']}\n hue='neutral'\n variant='square'\n />\n </Card.Row>\n )}\n {organization?.name && (\n <Card.Action icon='ph--buildings--regular' label={organization.name} onClick={handleOrganizationClick} />\n )}\n {emails.length > 0 && (\n <Card.Row>\n <Layout.Block>\n <Icon.Icon icon='ph--at--regular' />\n </Layout.Block>\n <Card.Text truncate classNames='text-sky-text text-sm'>\n {emails.map(({ value }) => (\n <div key={value}>{value}</div>\n ))}\n </Card.Text>\n </Card.Row>\n )}\n </Card.Body>\n );\n};\n","//\n// Copyright 2026 DXOS.org\n//\n\nimport React from 'react';\n\nimport type * as AppSurface from '@dxos/app-toolkit/AppSurface';\nimport { ObjectAvatar } from '@dxos/react-ui-card';\nimport { type Person } from '@dxos/types';\n\n/**\n * A person's depiction in a card header: their photograph, else their initials.\n *\n * Contributed for `Person` alone rather than made the default for every object. A person IS the\n * identity the card is about, so a per-instance depiction carries information — whereas a Task or a\n * Document is better told apart by its type glyph, which is what every other type keeps.\n */\nexport const PersonCardIcon = ({ subject }: AppSurface.CardProps<Person.Person>) => (\n <ObjectAvatar object={subject} fallbackIcon='ph--user--regular' />\n);\n\nPersonCardIcon.displayName = 'PersonCardIcon';\n","//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport type * as AppSurface from '@dxos/app-toolkit/AppSurface';\nimport { Obj } from '@dxos/echo';\nimport * as Card from '@dxos/react-ui/Card';\nimport { type Pipeline } from '@dxos/types';\n\nexport const ProjectCard = ({ subject }: AppSurface.ObjectCardProps<Pipeline.Pipeline>) => {\n const { image, description } = subject;\n\n return (\n <Card.Body>\n {image && <Card.Poster src={image} alt={Obj.getLabel(subject) ?? ''} aspectRatio='auto' />}\n {/* <CardHeader label={name} subject={subject} db={db} /> */}\n {description && (\n <Card.Row>\n <Card.Text variant='muted'>{description}</Card.Text>\n </Card.Row>\n )}\n </Card.Body>\n );\n};\n","//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport type * as AppSurface from '@dxos/app-toolkit/AppSurface';\nimport { Type } from '@dxos/echo';\nimport { getPropertyMetaAnnotation } from '@dxos/echo/internal';\nimport * as SchemaAST from '@dxos/effect/SchemaAST';\nimport * as Card from '@dxos/react-ui/Card';\nimport { Task } from '@dxos/types';\n\nexport const TaskCard = ({ subject }: AppSurface.ObjectCardProps<Task.Task>) => {\n const { status } = subject;\n const statusOption = getActiveStatusOption(status);\n\n return (\n <Card.Body>\n <Card.Row>\n {statusOption && (\n <div>\n <span className='dx-tag dx-tag-inline' data-hue={statusOption.color}>\n {statusOption.title}\n </span>\n </div>\n )}\n </Card.Row>\n </Card.Body>\n );\n};\n\n/** The option the schema's `singleSelect` property meta declares for the status, read off the `status` property. */\nconst getActiveStatusOption = (status?: string): Task.Option<string> | undefined => {\n const statusProperty = SchemaAST.getPropertySignatures(Type.getSchema(Task.Task).ast).find(\n (property) => property.name === 'status',\n );\n const meta =\n statusProperty && getPropertyMetaAnnotation<{ options?: Task.Option<string>[] }>(statusProperty, 'singleSelect');\n return meta?.options?.find(({ id }) => id === status);\n};\n","//\n// Copyright 2026 DXOS.org\n//\n\nimport React from 'react';\n\nimport * as Banner from '@dxos/react-ui/Banner';\nimport * as Hooks from '@dxos/react-ui/Hooks';\nimport * as Panel from '@dxos/react-ui/Panel';\n\nimport { meta } from '#meta';\n\nexport type UnsupportedTypeProps = {\n /** The surface's own role, threaded to `Panel.Root`. */\n role?: string;\n /** Typename of the object no enabled plugin can render. */\n typename: string;\n};\n\n/**\n * Inert, status-only stand-in for an object no enabled plugin can render — offers no remedy; which\n * objects reach it is `capabilities/react-surface.ts`'s call.\n */\nexport const UnsupportedType = ({ role, typename }: UnsupportedTypeProps) => {\n const { t } = Hooks.useTranslation(meta.profile.key);\n\n return (\n <Panel.Root role={role}>\n <Panel.Body classNames='grid place-items-center p-8'>\n <Banner.Root valence='info' icon='ph--puzzle-piece--regular'>\n <Banner.Title>{t('unsupported-type.title')}</Banner.Title>\n <Banner.Body data-testid='previewPlugin.unsupportedType'>\n {t('unsupported-type.message', { typename })}\n </Banner.Body>\n </Banner.Root>\n </Panel.Body>\n </Panel.Root>\n );\n};\n","//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport * as Surface from '@dxos/app-framework/Surface';\nimport * as AppSurface from '@dxos/app-toolkit/AppSurface';\nimport { type Organization, type Person } from '@dxos/types';\n\nimport { OrganizationCard, PersonCard } from '../cards/index.ts';\n\nexport type OrganizationCardContentProps = AppSurface.ObjectCardData<Organization.Organization> & {\n role: string;\n};\n\n/** Organization and Person cards append a nested `Related` surface, so they compose rather than map. */\nexport const OrganizationCardContent = ({ role, ...data }: OrganizationCardContentProps) => (\n <>\n <OrganizationCard role={role} subject={data.subject} />\n <Surface.Surface type={AppSurface.Related} data={data} limit={1} />\n </>\n);\n\nexport type PersonCardContentProps = AppSurface.ObjectCardData<Person.Person> & {\n role: string;\n};\n\n/** Renders a person card with one nested `Related` surface. */\nexport const PersonCardContent = ({ role, ...data }: PersonCardContentProps) => (\n <>\n <PersonCard role={role} subject={data.subject} />\n <Surface.Surface type={AppSurface.Related} data={data} limit={1} />\n </>\n);\n","//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport * as Capabilities from '@dxos/app-framework/Capabilities';\nimport * as Capability from '@dxos/app-framework/Capability';\nimport * as Surface from '@dxos/app-framework/Surface';\nimport * as AppSurface from '@dxos/app-toolkit/AppSurface';\nimport { Obj, Type } from '@dxos/echo';\nimport { Expando } from '@dxos/schema';\nimport { Organization, Person, Pipeline, Task } from '@dxos/types';\nimport * as Position from '@dxos/util/Position';\n\nimport { ExpandoCard, FormCard, JsonCard, PersonCardIcon, ProjectCard, TaskCard } from '../cards/index.ts';\nimport { UnsupportedType } from '../components/index.ts';\nimport { OrganizationCardContent, PersonCardContent } from './RelatedCards.tsx';\n\n/**\n * Checked against the type registry rather than \"no other candidate matched\" — the latter is also\n * true while a real plugin's surface is still loading, which would flash this stand-in on every\n * session's first plank.\n */\nconst isTypeUnavailable = (subject: unknown): subject is Obj.Unknown => {\n if (!Obj.isObject(subject)) {\n return false;\n }\n const typename = Obj.getTypename(subject);\n if (!typename) {\n return false;\n }\n try {\n const db = Obj.getDatabase(subject);\n return (\n !!db &&\n !db.graph.registry\n .list()\n .filter(Type.isType)\n .some((type) => Type.getTypename(type) === typename)\n );\n } catch {\n // Not attached to a database (a story, a detached object) — nothing to conclude, so stay out.\n return false;\n }\n};\n\nexport default Capability.makeModule(() =>\n Effect.succeed(\n Capability.contribute(Capabilities.ReactSurface, [\n //\n // Specific schema types.\n // TODO(burdon): Create helpers and factor out.\n //\n\n Surface.create({\n id: 'organizationContent',\n position: Position.first,\n filter: AppSurface.object(AppSurface.CardContent, Organization.Organization),\n component: OrganizationCardContent,\n props: ({ role, data }) => ({ role, ...data }),\n }),\n Surface.create({\n id: 'contactContent',\n position: Position.first,\n filter: AppSurface.object(AppSurface.CardContent, Person.Person),\n component: PersonCardContent,\n props: ({ role, data }) => ({ role, ...data }),\n }),\n // A person's card leads with their face, not the generic person glyph. Contributed only for\n // `Person`; every other type keeps its host's default depiction.\n Surface.create({\n id: 'contactIcon',\n position: Position.first,\n filter: AppSurface.object(AppSurface.CardIcon, Person.Person),\n component: PersonCardIcon,\n props: ({ data: { subject } }) => ({ subject }),\n }),\n\n Surface.create({\n id: 'schemaPopoverProject',\n position: Position.first,\n filter: AppSurface.object(AppSurface.CardContent, Pipeline.Pipeline),\n component: ProjectCard,\n props: ({ role, data: { subject } }) => ({ role, subject }),\n }),\n Surface.create({\n id: 'schemaPopoverTask',\n position: Position.first,\n filter: AppSurface.object(AppSurface.CardContent, Task.Task),\n component: TaskCard,\n props: ({ role, data: { subject } }) => ({ role, subject }),\n }),\n Surface.create({\n id: 'schemaPopoverExpando',\n filter: AppSurface.object(AppSurface.CardContent, Expando.Expando),\n component: ExpandoCard,\n props: ({ role, data: { subject, ignorePaths } }) => ({ role, subject, ignorePaths }),\n }),\n\n Surface.create({\n id: 'schemaPopoverDynamicType',\n filter: AppSurface.subject(AppSurface.CardContent, (subject): subject is Obj.Unknown => {\n if (!Obj.isObject(subject)) {\n return false;\n }\n const type = Obj.getType(subject);\n if (type) {\n return Type.getDatabase(type) != null;\n }\n // Obj.getType fails for database-registered schemas (DXN mismatch); fall back to typename query.\n try {\n const db = Obj.getDatabase(subject);\n const typename = Obj.getTypename(subject);\n return (\n !!db &&\n !!typename &&\n db.graph.registry\n .list()\n .filter(Type.isType)\n .some((t) => Type.getTypename(t) === typename)\n );\n } catch {\n return false;\n }\n }),\n // Dynamic/mutable schemas render an editable, full-layout form;\n // FormCard handles both static and runtime schema resolution internally.\n component: FormCard,\n props: ({ role, data: { subject } }) => ({ role, subject, readonly: false, layout: 'full' as const }),\n }),\n\n //\n // Fallback for any object.\n //\n\n Surface.create({\n id: 'fallbackPopover',\n position: Position.last,\n filter: AppSurface.subject(AppSurface.CardContent, Obj.isObject),\n component: FormCard,\n props: ({ role, data: { subject, projection } }) => ({ role, subject, projection }),\n }),\n\n Surface.create({\n id: 'fallbackJson',\n filter: Surface.makeFilter(AppSurface.CardContent),\n position: Position.last,\n component: JsonCard,\n props: ({ data }) => ({ data }),\n }),\n\n // Surface.create({\n // id: 'fallbackSection',\n // position: Position.last,\n // filter: AppSurface.subject(AppSurface.Section, Obj.isObject),\n // component: ({ data }) => {\n // return (\n // <div className='flex w-full justify-center'>\n // <div className='py-2 dx-card-min-width dx-card-max-width'>\n // <Card.Root>\n // <Surface.Surface type={AppSurface.CardContent} data={data} limit={1} />\n // </Card.Root>\n // </div>\n // </div>\n // );\n // },\n // }),\n\n // Last-resort candidate (plank `limit={1}`) for an object whose plugin is absent — e.g. one\n // created in a build that shares a backend with a full-catalog build.\n Surface.create({\n id: 'unsupportedTypeArticle',\n position: Position.last,\n filter: AppSurface.subject(AppSurface.Article, isTypeUnavailable),\n component: UnsupportedType,\n props: ({ role, data: { subject } }) => ({ role, typename: Obj.getTypename(subject) ?? '' }),\n }),\n ]),\n ),\n);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAaA,IAAM,kBAAkB,UAAuD;CAC7E,QAAQ,OAAO,OAAf;EACE,KAAK,UACH,OAAO,OAAO;EAChB,KAAK,UACH,OAAO,OAAO;EAChB,KAAK,WACH,OAAO,OAAO;EAChB,SACE;CACJ;AACF;;;;;;;AAQA,IAAM,iBAAiB,QAAgB,QAAQ,QAAQ,IAAI,WAAW,GAAG;AAEzE,IAAa,eAAe,EAAE,SAAS,kBAA8C;CACnF,MAAM,SAAS,cAAc;EAC3B,MAAM,UAAU,IAAI,IAAI,eAAe,CA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AAC,MACF,CAAC,CAAC,YACF,GAAG,MAAM,SACN,KAAK,CAAA,CACL,OAAO,KAAK,MAAM,CAAA,CAClB,MAAM,MAAM,KAAK,YAAY,CAAC,MAAM,QAAQ;GAEnD,QAAQ;IACN,OAAO;GACT;EACF,CAAC;EAGD,WAAW;EACX,QAAQ,EAAE,MAAM,MAAM,EAAE,iBAAiB;GAAE;GAAM;GAAS,UAAU;GAAO,QAAQ;EAAgB;CACrG,CAAC;CAMD,QAAQ,OAAO;EACb,IAAI;EACJ,UAAU,SAAS;EACnB,QAAQ,WAAW,QAAQ,WAAW,aAAa,IAAI,QAAQ;EAC/D,WAAW;EACX,QAAQ,EAAE,MAAM,MAAM,EAAE,SAAS,oBAAoB;GAAE;GAAM;GAAS;EAAW;CACnF,CAAC;CAED,QAAQ,OAAO;EACb,IAAI;EACJ,QAAQ,QAAQ,WAAW,WAAW,WAAW;EACjD,UAAU,SAAS;EACnB,WAAW;EACX,QAAQ,EAAE,YAAY,EAAE,KAAK;CAC/B,CAAC;CAqBD,QAAQ,OAAO;EACb,IAAI;EACJ,UAAU,SAAS;EACnB,QAAQ,WAAW,QAAQ,WAAW,SAAS,iBAAiB;EAChE,WAAW;EACX,QAAQ,EAAE,MAAM,MAAM,EAAE,iBAAiB;GAAE;GAAM,UAAU,IAAI,YAAY,OAAO,KAAK;EAAG;CAC5F,CAAC;AACH,CAAC,CACH,CACF"}
|
|
1
|
+
{"version":3,"file":"chunk-react-surface.mjs","names":[],"sources":["../../src/cards/ExpandoCard.tsx","../../src/cards/FormCard.tsx","../../src/cards/JsonCard.tsx","../../src/cards/OrganizationCard.tsx","../../src/cards/PersonCard.tsx","../../src/cards/PersonCardIcon.tsx","../../src/cards/ProjectCard.tsx","../../src/cards/TaskCard.tsx","../../src/components/UnsupportedType/UnsupportedType.tsx","../../src/capabilities/RelatedCards.tsx","../../src/capabilities/react-surface.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\nimport React, { useCallback, useMemo } from 'react';\n\nimport type * as AppSurface from '@dxos/app-toolkit/AppSurface';\nimport { Obj } from '@dxos/echo';\nimport * as SchemaEx from '@dxos/effect/SchemaEx';\nimport { Form } from '@dxos/react-ui-form';\nimport * as Card from '@dxos/react-ui/Card';\n\nconst schemaForValue = (value: unknown): Schema.Codec<any, any> | undefined => {\n switch (typeof value) {\n case 'string':\n return Schema.String;\n case 'number':\n return Schema.Number;\n case 'boolean':\n return Schema.Boolean;\n default:\n return undefined;\n }\n};\n\n/**\n * Reserved keys: `id`, plus any `~`-prefixed key (ECHO uses `~`-prefixed\n * string keys to brand entity instances and schemas — KindId,\n * SchemaKindId, SnapshotKindId, etc. — and the `~` namespace is reserved\n * for that purpose). They show up in `Object.keys` but aren't user data.\n */\nconst isInternalKey = (key: string) => key === 'id' || key.startsWith('~');\n\nexport const ExpandoCard = ({ subject, ignorePaths }: AppSurface.ObjectCardProps) => {\n const schema = useMemo(() => {\n const ignored = new Set(ignorePaths ?? []);\n const fields: Record<string, Schema.Codec<any, any>> = {};\n for (const key of Object.keys(subject)) {\n if (isInternalKey(key) || ignored.has(key)) {\n continue;\n }\n const fieldSchema = schemaForValue((subject as any)[key]);\n if (fieldSchema) {\n fields[key] = fieldSchema;\n }\n }\n return Schema.Struct(fields);\n }, [subject, ignorePaths]);\n\n const handleSave = useCallback(\n (values: any, { changed }: { changed: Record<string, boolean> }) => {\n const paths = Object.keys(changed).filter((path) => changed[path]);\n Obj.update(subject, (subject) => {\n for (const path of paths) {\n const value = values[path];\n const parts = SchemaEx.splitJsonPath(path as SchemaEx.JsonPath);\n Obj.setValue(subject, parts, value);\n }\n });\n },\n [subject],\n );\n\n return (\n <Card.Body>\n <Form.Root schema={schema} values={subject} autoSave onSave={handleSave}>\n <Form.Viewport>\n <Form.Content>\n <Form.Fields />\n </Form.Content>\n </Form.Viewport>\n </Form.Root>\n </Card.Body>\n );\n};\n","//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\nimport React, { useCallback, useMemo } from 'react';\n\nimport type * as AppSurface from '@dxos/app-toolkit/AppSurface';\nimport { Obj, Type } from '@dxos/echo';\nimport { useType } from '@dxos/echo-react';\nimport { type AnyProperties } from '@dxos/echo/internal';\nimport * as SchemaEx from '@dxos/effect/SchemaEx';\nimport { Form, type FormPresentation, type FormUpdateMeta, getFormProperties, omitId } from '@dxos/react-ui-form';\nimport * as Card from '@dxos/react-ui/Card';\nimport * as Hooks from '@dxos/react-ui/Hooks';\nimport { type ProjectionModel } from '@dxos/schema';\n\nimport { meta } from '#meta';\n\nexport type FormCardProps = AppSurface.ObjectCardProps & {\n projection?: ProjectionModel;\n readonly?: boolean;\n layout?: FormPresentation;\n};\n\n/**\n * Default/fallback card for any ECHO object.\n * Renders a `Form` against the object's schema — either the static schema\n * from `Obj.getSchema` or, for runtime/mutable schemas, the reactive\n * schema looked up via `useType`.\n */\nexport const FormCard = ({ subject, projection, readonly = true, layout }: FormCardProps) => {\n const { t } = Hooks.useTranslation(meta.profile.key);\n // Readonly cards default to the `static` presentation — plain DOM, undefined values\n // omitted — which reads as a preview rather than a form. Editable cards keep the\n // `compact` form layout. Callers can override either via the explicit `layout` prop.\n const resolvedLayout: FormPresentation = layout ?? (readonly ? 'static' : 'compact');\n\n // Try the static schema first; fall back to the runtime/database schema for\n // dynamic types whose schema isn't reachable via `Obj.getSchema` (DXN mismatch).\n const staticType = Obj.getType(subject);\n const db = Obj.getDatabase(subject);\n // `Obj.getTypeURI` throws on corrupted objects that are missing a type; swallow that\n // and fall through to the \"unable to create preview\" path rather than crashing the card.\n const fallbackTypeUri = useMemo(() => {\n if (staticType) {\n return undefined;\n }\n try {\n return Obj.getTypeURI(subject);\n } catch {\n return undefined;\n }\n }, [staticType, subject]);\n const runtimeType = useType(db, fallbackTypeUri);\n const schema = useMemo((): Schema.Codec<any, any> | undefined => {\n const resolvedType = runtimeType ?? staticType;\n return resolvedType ? omitId(Type.getSchema(resolvedType)) : undefined;\n }, [runtimeType, staticType]);\n\n // Predict whether the form would render anything visible. Without this guard,\n // readonly + compact mode produces an empty scrollarea when every form-renderable\n // field is unset (e.g., a Table object whose `view`/`sizes` are FormInput-hidden\n // and whose `name` is undefined).\n //\n // - In editable mode (`!readonly`), the form renders empty fields, so we only\n // bail when there are no form-renderable properties at all.\n // - In readonly mode, the form hides fields with null/undefined values, so we\n // bail when no form-renderable property has a non-null value.\n const hasRenderableContent = useMemo(() => {\n if (!schema) {\n return false;\n }\n const properties = getFormProperties(schema.ast);\n if (properties.length === 0) {\n return false;\n }\n if (!readonly) {\n return true;\n }\n return properties.some((prop) => (subject as any)?.[prop.name] != null);\n }, [schema, subject, readonly]);\n\n const handleSave = useCallback(\n (values: AnyProperties, { changed }: FormUpdateMeta<AnyProperties>) => {\n const paths = (Object.keys(changed) as SchemaEx.JsonPath[]).filter((path) => changed[path]);\n Obj.update(subject, (subject) => {\n for (const path of paths) {\n const parts = SchemaEx.splitJsonPath(path);\n const value = Obj.getValue(values as any, parts);\n Obj.setValue(subject, parts, value);\n }\n });\n },\n [subject],\n );\n\n if (!schema || !hasRenderableContent) {\n return (\n <Card.Body>\n <Card.Row>\n <Card.Text variant='muted'>{t('unable-to-create-preview.message')}</Card.Text>\n </Card.Row>\n </Card.Body>\n );\n }\n\n const { icon, hue } = Obj.getIcon(subject) ?? { icon: 'ph--circle-dashed--regular', hue: 'neutral' };\n\n return (\n <Card.Body>\n <Form.Root\n schema={schema}\n projection={projection}\n values={subject}\n readonly={readonly}\n layout={resolvedLayout}\n autoSave\n onSave={handleSave}\n >\n <Form.Viewport>\n <Form.Content>\n <Form.Fields />\n </Form.Content>\n </Form.Viewport>\n </Form.Root>\n </Card.Body>\n );\n};\n","//\n// Copyright 2025 DXOS.org\n//\n\nimport React, { useState } from 'react';\n\nimport { JsonHighlighter } from '@dxos/react-ui-syntax-highlighter';\nimport * as Card from '@dxos/react-ui/Card';\nimport * as Layout from '@dxos/react-ui/Layout';\nimport * as SystemButton from '@dxos/react-ui/SystemButton';\n\nexport const JsonCard = ({ data }: { data: unknown }) => {\n const [open, setOpen] = useState(false);\n // JSON.stringify throws on circular references / unsupported values (e.g. BigInt); keep the card stable.\n let collapsedLength = 0;\n try {\n collapsedLength = JSON.stringify(data)?.length ?? 0;\n } catch {}\n return (\n <Card.Row>\n <Layout.Block classNames='self-start'>\n <SystemButton.Disclosure\n variant='ghost'\n size='sm'\n label='Toggle JSON'\n expanded={open}\n onExpandedChange={setOpen}\n />\n </Layout.Block>\n {(open && <JsonHighlighter data={data} classNames='col-span-full max-h-[20lh] py-1.5 text-xs' />) || (\n <Card.Text variant='muted'>{collapsedLength}</Card.Text>\n )}\n </Card.Row>\n );\n};\n","//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport type * as AppSurface from '@dxos/app-toolkit/AppSurface';\nimport * as Card from '@dxos/react-ui/Card';\nimport { type Organization } from '@dxos/types';\n\nexport const OrganizationCard = ({ subject }: AppSurface.ObjectCardProps<Organization.Organization>) => {\n const { name, image, description, website } = subject;\n\n return (\n <Card.Body>\n {image && <Card.Poster alt={name ?? ''} src={image} />}\n {description && (\n <Card.Row>\n <Card.Text variant='muted'>{description}</Card.Text>\n </Card.Row>\n )}\n {website && <Card.Link label={website} href={website} />}\n </Card.Body>\n );\n};\n","//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport React, { useCallback, useRef } from 'react';\n\nimport * as Hooks from '@dxos/app-framework/Hooks';\nimport type * as AppSurface from '@dxos/app-toolkit/AppSurface';\nimport * as GraphPath from '@dxos/app-toolkit/GraphPath';\nimport * as LayoutOperation from '@dxos/app-toolkit/LayoutOperation';\nimport { Obj } from '@dxos/echo';\nimport * as EffectEx from '@dxos/effect/EffectEx';\nimport { Attention } from '@dxos/react-ui-attention/types';\nimport * as Avatar from '@dxos/react-ui/Avatar';\nimport * as Card from '@dxos/react-ui/Card';\nimport * as Icon from '@dxos/react-ui/Icon';\nimport * as Layout from '@dxos/react-ui/Layout';\nimport { type Person } from '@dxos/types';\n\nexport const PersonCard = ({ subject }: AppSurface.ObjectCardProps<Person.Person>) => {\n const { invoke } = Hooks.useOperationInvoker();\n // Card.Action's onClick carries no event, so resolve the origin plank from the card element itself.\n const cardRef = useRef<HTMLDivElement>(null);\n const { image, organization: { target: organization } = {}, emails = [] } = subject;\n\n const handleOrganizationClick = useCallback(() => {\n if (!organization) {\n return;\n }\n\n const pivotId = cardRef.current ? Attention.getRootAttendableId(cardRef.current) : undefined;\n return Effect.gen(function* () {\n const organizationPath = GraphPath.getObjectPathFromObject(organization);\n const db = Obj.getDatabase(organization);\n yield* invoke(LayoutOperation.UpdatePopover, { state: false, anchorId: '' });\n yield* invoke(LayoutOperation.Open, {\n subject: [organizationPath],\n pivotId,\n disposition: 'add',\n workspace: db ? GraphPath.getSpacePath(db.spaceId) : undefined,\n });\n }).pipe(EffectEx.runAndForwardErrors);\n }, [invoke, organization]);\n\n return (\n <Card.Body ref={cardRef}>\n {image && (\n <Card.Row>\n <Avatar.Root\n src={image}\n icon='ph--user--regular'\n size='xl'\n classNames={[!image && 'opacity-50']}\n hue='neutral'\n variant='square'\n />\n </Card.Row>\n )}\n {organization?.name && (\n <Card.Action icon='ph--buildings--regular' label={organization.name} onClick={handleOrganizationClick} />\n )}\n {emails.length > 0 && (\n <Card.Row>\n <Layout.Block>\n <Icon.Icon icon='ph--at--regular' />\n </Layout.Block>\n <Card.Text truncate classNames='text-sky-text text-sm'>\n {emails.map(({ value }) => (\n <div key={value}>{value}</div>\n ))}\n </Card.Text>\n </Card.Row>\n )}\n </Card.Body>\n );\n};\n","//\n// Copyright 2026 DXOS.org\n//\n\nimport React from 'react';\n\nimport type * as AppSurface from '@dxos/app-toolkit/AppSurface';\nimport { ObjectAvatar } from '@dxos/react-ui-card';\nimport { type Person } from '@dxos/types';\n\n/**\n * A person's depiction in a card header: their photograph, else their initials.\n *\n * Contributed for `Person` alone rather than made the default for every object. A person IS the\n * identity the card is about, so a per-instance depiction carries information — whereas a Task or a\n * Document is better told apart by its type glyph, which is what every other type keeps.\n */\nexport const PersonCardIcon = ({ subject }: AppSurface.CardProps<Person.Person>) => (\n <ObjectAvatar object={subject} fallbackIcon='ph--user--regular' />\n);\n\nPersonCardIcon.displayName = 'PersonCardIcon';\n","//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport type * as AppSurface from '@dxos/app-toolkit/AppSurface';\nimport { Obj } from '@dxos/echo';\nimport * as Card from '@dxos/react-ui/Card';\nimport { type Pipeline } from '@dxos/types';\n\nexport const ProjectCard = ({ subject }: AppSurface.ObjectCardProps<Pipeline.Pipeline>) => {\n const { image, description } = subject;\n\n return (\n <Card.Body>\n {image && <Card.Poster src={image} alt={Obj.getLabel(subject) ?? ''} aspectRatio='auto' />}\n {/* <CardHeader label={name} subject={subject} db={db} /> */}\n {description && (\n <Card.Row>\n <Card.Text variant='muted'>{description}</Card.Text>\n </Card.Row>\n )}\n </Card.Body>\n );\n};\n","//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport type * as AppSurface from '@dxos/app-toolkit/AppSurface';\nimport { Type } from '@dxos/echo';\nimport { getPropertyMetaAnnotation } from '@dxos/echo/internal';\nimport * as SchemaAST from '@dxos/effect/SchemaAST';\nimport * as Card from '@dxos/react-ui/Card';\nimport { Task } from '@dxos/types';\n\nexport const TaskCard = ({ subject }: AppSurface.ObjectCardProps<Task.Task>) => {\n const { status } = subject;\n const statusOption = getActiveStatusOption(status);\n\n return (\n <Card.Body>\n <Card.Row>\n {statusOption && (\n <div>\n <span className='dx-tag dx-tag-inline' data-hue={statusOption.color}>\n {statusOption.title}\n </span>\n </div>\n )}\n </Card.Row>\n </Card.Body>\n );\n};\n\n/** The option the schema's `singleSelect` property meta declares for the status, read off the `status` property. */\nconst getActiveStatusOption = (status?: string): Task.Option<string> | undefined => {\n const statusProperty = SchemaAST.getPropertySignatures(Type.getSchema(Task.Task).ast).find(\n (property) => property.name === 'status',\n );\n const meta =\n statusProperty && getPropertyMetaAnnotation<{ options?: Task.Option<string>[] }>(statusProperty, 'singleSelect');\n return meta?.options?.find(({ id }) => id === status);\n};\n","//\n// Copyright 2026 DXOS.org\n//\n\nimport React from 'react';\n\nimport * as Banner from '@dxos/react-ui/Banner';\nimport * as Hooks from '@dxos/react-ui/Hooks';\nimport * as Layout from '@dxos/react-ui/Layout';\nimport * as Panel from '@dxos/react-ui/Panel';\n\nimport { meta } from '#meta';\n\nexport type UnsupportedTypeProps = {\n /** The surface's own role, threaded to `Panel.Root`. */\n role?: string;\n /** Typename of the object no enabled plugin can render. */\n typename: string;\n};\n\n/**\n * Inert, status-only stand-in for an object no enabled plugin can render — offers no remedy; which\n * objects reach it is `capabilities/react-surface.ts`'s call.\n */\nexport const UnsupportedType = ({ role, typename }: UnsupportedTypeProps) => {\n const { t } = Hooks.useTranslation(meta.profile.key);\n\n return (\n <Panel.Root role={role}>\n <Panel.Body asChild>\n <Layout.Grid center classNames='p-8'>\n <Banner.Root valence='info' icon='ph--puzzle-piece--regular'>\n <Banner.Title>{t('unsupported-type.title')}</Banner.Title>\n <Banner.Body data-testid='previewPlugin.unsupportedType'>\n {t('unsupported-type.message', { typename })}\n </Banner.Body>\n </Banner.Root>\n </Layout.Grid>\n </Panel.Body>\n </Panel.Root>\n );\n};\n","//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport * as Surface from '@dxos/app-framework/Surface';\nimport * as AppSurface from '@dxos/app-toolkit/AppSurface';\nimport { type Organization, type Person } from '@dxos/types';\n\nimport { OrganizationCard, PersonCard } from '../cards/index.ts';\n\nexport type OrganizationCardContentProps = AppSurface.ObjectCardData<Organization.Organization> & {\n role: string;\n};\n\n/** Organization and Person cards append a nested `Related` surface, so they compose rather than map. */\nexport const OrganizationCardContent = ({ role, ...data }: OrganizationCardContentProps) => (\n <>\n <OrganizationCard role={role} subject={data.subject} />\n <Surface.Surface type={AppSurface.Related} data={data} limit={1} />\n </>\n);\n\nexport type PersonCardContentProps = AppSurface.ObjectCardData<Person.Person> & {\n role: string;\n};\n\n/** Renders a person card with one nested `Related` surface. */\nexport const PersonCardContent = ({ role, ...data }: PersonCardContentProps) => (\n <>\n <PersonCard role={role} subject={data.subject} />\n <Surface.Surface type={AppSurface.Related} data={data} limit={1} />\n </>\n);\n","//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport * as Capabilities from '@dxos/app-framework/Capabilities';\nimport * as Capability from '@dxos/app-framework/Capability';\nimport * as Surface from '@dxos/app-framework/Surface';\nimport * as AppSurface from '@dxos/app-toolkit/AppSurface';\nimport { Obj, Type } from '@dxos/echo';\nimport { Expando } from '@dxos/schema';\nimport { Organization, Person, Pipeline, Task } from '@dxos/types';\nimport * as Position from '@dxos/util/Position';\n\nimport { ExpandoCard, FormCard, JsonCard, PersonCardIcon, ProjectCard, TaskCard } from '../cards/index.ts';\nimport { UnsupportedType } from '../components/index.ts';\nimport { OrganizationCardContent, PersonCardContent } from './RelatedCards.tsx';\n\n/**\n * Checked against the type registry rather than \"no other candidate matched\" — the latter is also\n * true while a real plugin's surface is still loading, which would flash this stand-in on every\n * session's first plank.\n */\nconst isTypeUnavailable = (subject: unknown): subject is Obj.Unknown => {\n if (!Obj.isObject(subject)) {\n return false;\n }\n const typename = Obj.getTypename(subject);\n if (!typename) {\n return false;\n }\n try {\n const db = Obj.getDatabase(subject);\n return (\n !!db &&\n !db.graph.registry\n .list()\n .filter(Type.isType)\n .some((type) => Type.getTypename(type) === typename)\n );\n } catch {\n // Not attached to a database (a story, a detached object) — nothing to conclude, so stay out.\n return false;\n }\n};\n\nexport default Capability.makeModule(() =>\n Effect.succeed(\n Capability.contribute(Capabilities.ReactSurface, [\n //\n // Specific schema types.\n // TODO(burdon): Create helpers and factor out.\n //\n\n Surface.create({\n id: 'organizationContent',\n position: Position.first,\n filter: AppSurface.object(AppSurface.CardContent, Organization.Organization),\n component: OrganizationCardContent,\n props: ({ role, data }) => ({ role, ...data }),\n }),\n Surface.create({\n id: 'contactContent',\n position: Position.first,\n filter: AppSurface.object(AppSurface.CardContent, Person.Person),\n component: PersonCardContent,\n props: ({ role, data }) => ({ role, ...data }),\n }),\n // A person's card leads with their face, not the generic person glyph. Contributed only for\n // `Person`; every other type keeps its host's default depiction.\n Surface.create({\n id: 'contactIcon',\n position: Position.first,\n filter: AppSurface.object(AppSurface.CardIcon, Person.Person),\n component: PersonCardIcon,\n props: ({ data: { subject } }) => ({ subject }),\n }),\n\n Surface.create({\n id: 'schemaPopoverProject',\n position: Position.first,\n filter: AppSurface.object(AppSurface.CardContent, Pipeline.Pipeline),\n component: ProjectCard,\n props: ({ role, data: { subject } }) => ({ role, subject }),\n }),\n Surface.create({\n id: 'schemaPopoverTask',\n position: Position.first,\n filter: AppSurface.object(AppSurface.CardContent, Task.Task),\n component: TaskCard,\n props: ({ role, data: { subject } }) => ({ role, subject }),\n }),\n Surface.create({\n id: 'schemaPopoverExpando',\n filter: AppSurface.object(AppSurface.CardContent, Expando.Expando),\n component: ExpandoCard,\n props: ({ role, data: { subject, ignorePaths } }) => ({ role, subject, ignorePaths }),\n }),\n\n Surface.create({\n id: 'schemaPopoverDynamicType',\n filter: AppSurface.subject(AppSurface.CardContent, (subject): subject is Obj.Unknown => {\n if (!Obj.isObject(subject)) {\n return false;\n }\n const type = Obj.getType(subject);\n if (type) {\n return Type.getDatabase(type) != null;\n }\n // Obj.getType fails for database-registered schemas (DXN mismatch); fall back to typename query.\n try {\n const db = Obj.getDatabase(subject);\n const typename = Obj.getTypename(subject);\n return (\n !!db &&\n !!typename &&\n db.graph.registry\n .list()\n .filter(Type.isType)\n .some((t) => Type.getTypename(t) === typename)\n );\n } catch {\n return false;\n }\n }),\n // Dynamic/mutable schemas render an editable, full-layout form;\n // FormCard handles both static and runtime schema resolution internally.\n component: FormCard,\n props: ({ role, data: { subject } }) => ({ role, subject, readonly: false, layout: 'full' as const }),\n }),\n\n //\n // Fallback for any object.\n //\n\n Surface.create({\n id: 'fallbackPopover',\n position: Position.last,\n filter: AppSurface.subject(AppSurface.CardContent, Obj.isObject),\n component: FormCard,\n props: ({ role, data: { subject, projection } }) => ({ role, subject, projection }),\n }),\n\n Surface.create({\n id: 'fallbackJson',\n filter: Surface.makeFilter(AppSurface.CardContent),\n position: Position.last,\n component: JsonCard,\n props: ({ data }) => ({ data }),\n }),\n\n // Surface.create({\n // id: 'fallbackSection',\n // position: Position.last,\n // filter: AppSurface.subject(AppSurface.Section, Obj.isObject),\n // component: ({ data }) => {\n // return (\n // <div className='flex w-full justify-center'>\n // <div className='py-2 dx-card-min-width dx-card-max-width'>\n // <Card.Root>\n // <Surface.Surface type={AppSurface.CardContent} data={data} limit={1} />\n // </Card.Root>\n // </div>\n // </div>\n // );\n // },\n // }),\n\n // Last-resort candidate (plank `limit={1}`) for an object whose plugin is absent — e.g. one\n // created in a build that shares a backend with a full-catalog build.\n Surface.create({\n id: 'unsupportedTypeArticle',\n position: Position.last,\n filter: AppSurface.subject(AppSurface.Article, isTypeUnavailable),\n component: UnsupportedType,\n props: ({ role, data: { subject } }) => ({ role, typename: Obj.getTypename(subject) ?? '' }),\n }),\n ]),\n ),\n);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAaA,IAAM,kBAAkB,UAAuD;CAC7E,QAAQ,OAAO,OAAf;EACE,KAAK,UACH,OAAO,OAAO;EAChB,KAAK,UACH,OAAO,OAAO;EAChB,KAAK,WACH,OAAO,OAAO;EAChB,SACE;CACJ;AACF;;;;;;;AAQA,IAAM,iBAAiB,QAAgB,QAAQ,QAAQ,IAAI,WAAW,GAAG;AAEzE,IAAa,eAAe,EAAE,SAAS,kBAA8C;CACnF,MAAM,SAAS,cAAc;EAC3B,MAAM,UAAU,IAAI,IAAI,eAAe,CAAC,CAAC;EACzC,MAAM,SAAiD,CAAC;EACxD,KAAK,MAAM,OAAO,OAAO,KAAK,OAAO,GAAG;GACtC,IAAI,cAAc,GAAG,KAAK,QAAQ,IA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L,OAAO,KAAK,MAAM,CAAA,CAClB,MAAM,MAAM,KAAK,YAAY,CAAC,MAAM,QAAQ;GAEnD,QAAQ;IACN,OAAO;GACT;EACF,CAAC;EAGD,WAAW;EACX,QAAQ,EAAE,MAAM,MAAM,EAAE,iBAAiB;GAAE;GAAM;GAAS,UAAU;GAAO,QAAQ;EAAgB;CACrG,CAAC;CAMD,QAAQ,OAAO;EACb,IAAI;EACJ,UAAU,SAAS;EACnB,QAAQ,WAAW,QAAQ,WAAW,aAAa,IAAI,QAAQ;EAC/D,WAAW;EACX,QAAQ,EAAE,MAAM,MAAM,EAAE,SAAS,oBAAoB;GAAE;GAAM;GAAS;EAAW;CACnF,CAAC;CAED,QAAQ,OAAO;EACb,IAAI;EACJ,QAAQ,QAAQ,WAAW,WAAW,WAAW;EACjD,UAAU,SAAS;EACnB,WAAW;EACX,QAAQ,EAAE,YAAY,EAAE,KAAK;CAC/B,CAAC;CAqBD,QAAQ,OAAO;EACb,IAAI;EACJ,UAAU,SAAS;EACnB,QAAQ,WAAW,QAAQ,WAAW,SAAS,iBAAiB;EAChE,WAAW;EACX,QAAQ,EAAE,MAAM,MAAM,EAAE,iBAAiB;GAAE;GAAM,UAAU,IAAI,YAAY,OAAO,KAAK;EAAG;CAC5F,CAAC;AACH,CAAC,CACH,CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UnsupportedType.d.ts","sourceRoot":"","sources":["../../../../../src/components/UnsupportedType/UnsupportedType.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"UnsupportedType.d.ts","sourceRoot":"","sources":["../../../../../src/components/UnsupportedType/UnsupportedType.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAS1B,MAAM,MAAM,oBAAoB,GAAG;IACjC,wDAAwD;IACxD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,2DAA2D;IAC3D,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,eAAe,uBAAwB,oBAAoB,sBAiBvE,CAAC"}
|