@dxos/plugin-preview 0.8.4-main.d05673bc65 → 0.8.4-main.d9fc60f731

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.
Files changed (121) hide show
  1. package/LICENSE +102 -5
  2. package/dist/lib/neutral/PreviewPlugin.mjs +9 -0
  3. package/dist/lib/neutral/PreviewPlugin.mjs.map +7 -0
  4. package/dist/lib/neutral/PreviewPlugin.node.mjs +17 -0
  5. package/dist/lib/neutral/PreviewPlugin.node.mjs.map +7 -0
  6. package/dist/lib/neutral/PreviewPlugin.workerd.mjs +17 -0
  7. package/dist/lib/neutral/PreviewPlugin.workerd.mjs.map +7 -0
  8. package/dist/lib/neutral/capabilities/index.mjs +9 -0
  9. package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
  10. package/dist/lib/neutral/chunk-3SWUVHXJ.mjs +28 -0
  11. package/dist/lib/neutral/chunk-3SWUVHXJ.mjs.map +7 -0
  12. package/dist/lib/{browser/chunk-KLQDOIFV.mjs → neutral/chunk-QOM5APM7.mjs} +11 -5
  13. package/dist/lib/neutral/chunk-QOM5APM7.mjs.map +7 -0
  14. package/dist/lib/neutral/index.mjs +7 -0
  15. package/dist/lib/neutral/index.mjs.map +7 -0
  16. package/dist/lib/neutral/meta.json +1 -0
  17. package/dist/lib/neutral/meta.mjs +7 -0
  18. package/dist/lib/neutral/meta.mjs.map +7 -0
  19. package/dist/lib/neutral/plugin.mjs +11 -0
  20. package/dist/lib/neutral/plugin.mjs.map +7 -0
  21. package/dist/lib/{browser/preview-popover-X2ZJM5MK.mjs → neutral/preview-popover-FLMYMFCH.mjs} +30 -17
  22. package/dist/lib/neutral/preview-popover-FLMYMFCH.mjs.map +7 -0
  23. package/dist/lib/neutral/react-surface-HDOPNIQM.mjs +406 -0
  24. package/dist/lib/neutral/react-surface-HDOPNIQM.mjs.map +7 -0
  25. package/dist/lib/neutral/testing.mjs +7 -0
  26. package/dist/lib/neutral/testing.mjs.map +7 -0
  27. package/dist/lib/neutral/translations.mjs +21 -0
  28. package/dist/lib/neutral/translations.mjs.map +7 -0
  29. package/dist/types/src/PreviewPlugin.d.ts +1 -0
  30. package/dist/types/src/PreviewPlugin.d.ts.map +1 -1
  31. package/dist/types/src/PreviewPlugin.node.d.ts +4 -0
  32. package/dist/types/src/PreviewPlugin.node.d.ts.map +1 -0
  33. package/dist/types/src/PreviewPlugin.test.d.ts +2 -0
  34. package/dist/types/src/PreviewPlugin.test.d.ts.map +1 -0
  35. package/dist/types/src/PreviewPlugin.workerd.d.ts +4 -0
  36. package/dist/types/src/PreviewPlugin.workerd.d.ts.map +1 -0
  37. package/dist/types/src/capabilities/index.d.ts +3 -2
  38. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  39. package/dist/types/src/capabilities/preview-popover.d.ts.map +1 -0
  40. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
  41. package/dist/types/src/cards/ExpandoCard.d.ts +4 -0
  42. package/dist/types/src/cards/ExpandoCard.d.ts.map +1 -0
  43. package/dist/types/src/cards/FormCard.d.ts +13 -3
  44. package/dist/types/src/cards/FormCard.d.ts.map +1 -1
  45. package/dist/types/src/cards/JsonCard.d.ts +5 -0
  46. package/dist/types/src/cards/JsonCard.d.ts.map +1 -0
  47. package/dist/types/src/cards/OrganizationCard.d.ts +2 -2
  48. package/dist/types/src/cards/OrganizationCard.d.ts.map +1 -1
  49. package/dist/types/src/cards/PersonCard.d.ts +2 -2
  50. package/dist/types/src/cards/PersonCard.d.ts.map +1 -1
  51. package/dist/types/src/cards/ProjectCard.d.ts +2 -2
  52. package/dist/types/src/cards/ProjectCard.d.ts.map +1 -1
  53. package/dist/types/src/cards/TaskCard.d.ts +2 -2
  54. package/dist/types/src/cards/TaskCard.d.ts.map +1 -1
  55. package/dist/types/src/cards/index.d.ts +2 -0
  56. package/dist/types/src/cards/index.d.ts.map +1 -1
  57. package/dist/types/src/index.d.ts +0 -1
  58. package/dist/types/src/index.d.ts.map +1 -1
  59. package/dist/types/src/meta.d.ts +1 -1
  60. package/dist/types/src/meta.d.ts.map +1 -1
  61. package/dist/types/src/plugin.d.ts +3 -0
  62. package/dist/types/src/plugin.d.ts.map +1 -0
  63. package/dist/types/src/stories/Card.stories.d.ts +35 -9
  64. package/dist/types/src/stories/Card.stories.d.ts.map +1 -1
  65. package/dist/types/src/stories/testing.d.ts +44 -5
  66. package/dist/types/src/stories/testing.d.ts.map +1 -1
  67. package/dist/types/src/testing.d.ts +2 -0
  68. package/dist/types/src/testing.d.ts.map +1 -0
  69. package/dist/types/src/translations.d.ts +8 -9
  70. package/dist/types/src/translations.d.ts.map +1 -1
  71. package/dist/types/tsconfig.tsbuildinfo +1 -1
  72. package/package.json +72 -42
  73. package/src/PreviewPlugin.node.ts +16 -0
  74. package/src/PreviewPlugin.test.ts +25 -0
  75. package/src/PreviewPlugin.tsx +6 -4
  76. package/src/PreviewPlugin.workerd.ts +16 -0
  77. package/src/capabilities/index.ts +4 -2
  78. package/src/capabilities/{preview-popover/preview-popover.ts → preview-popover.ts} +38 -7
  79. package/src/capabilities/react-surface.tsx +152 -0
  80. package/src/cards/ExpandoCard.tsx +76 -0
  81. package/src/cards/FormCard.tsx +92 -25
  82. package/src/cards/JsonCard.tsx +19 -0
  83. package/src/cards/OrganizationCard.tsx +5 -5
  84. package/src/cards/PersonCard.tsx +29 -11
  85. package/src/cards/ProjectCard.tsx +4 -4
  86. package/src/cards/TaskCard.tsx +19 -14
  87. package/src/cards/index.ts +2 -0
  88. package/src/index.ts +0 -2
  89. package/src/meta.ts +7 -4
  90. package/src/plugin.ts +9 -0
  91. package/src/stories/Card.stories.tsx +106 -5
  92. package/src/stories/testing.tsx +83 -21
  93. package/src/testing.ts +7 -0
  94. package/src/translations.ts +8 -8
  95. package/dist/lib/browser/chunk-KLQDOIFV.mjs.map +0 -7
  96. package/dist/lib/browser/index.mjs +0 -55
  97. package/dist/lib/browser/index.mjs.map +0 -7
  98. package/dist/lib/browser/meta.json +0 -1
  99. package/dist/lib/browser/preview-popover-X2ZJM5MK.mjs.map +0 -7
  100. package/dist/lib/browser/react-surface-XGUZ4J2A.mjs +0 -236
  101. package/dist/lib/browser/react-surface-XGUZ4J2A.mjs.map +0 -7
  102. package/dist/lib/node-esm/chunk-GFWHEHC5.mjs +0 -19
  103. package/dist/lib/node-esm/chunk-GFWHEHC5.mjs.map +0 -7
  104. package/dist/lib/node-esm/index.mjs +0 -56
  105. package/dist/lib/node-esm/index.mjs.map +0 -7
  106. package/dist/lib/node-esm/meta.json +0 -1
  107. package/dist/lib/node-esm/preview-popover-6FLDJHHB.mjs +0 -83
  108. package/dist/lib/node-esm/preview-popover-6FLDJHHB.mjs.map +0 -7
  109. package/dist/lib/node-esm/react-surface-DGHIAODG.mjs +0 -237
  110. package/dist/lib/node-esm/react-surface-DGHIAODG.mjs.map +0 -7
  111. package/dist/types/src/capabilities/preview-popover/index.d.ts +0 -3
  112. package/dist/types/src/capabilities/preview-popover/index.d.ts.map +0 -1
  113. package/dist/types/src/capabilities/preview-popover/preview-popover.d.ts.map +0 -1
  114. package/dist/types/src/capabilities/react-surface/index.d.ts +0 -3
  115. package/dist/types/src/capabilities/react-surface/index.d.ts.map +0 -1
  116. package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +0 -1
  117. package/src/capabilities/preview-popover/index.ts +0 -7
  118. package/src/capabilities/react-surface/index.ts +0 -7
  119. package/src/capabilities/react-surface/react-surface.tsx +0 -97
  120. /package/dist/types/src/capabilities/{preview-popover/preview-popover.d.ts → preview-popover.d.ts} +0 -0
  121. /package/dist/types/src/capabilities/{react-surface/react-surface.d.ts → react-surface.d.ts} +0 -0
@@ -2,39 +2,52 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
+ import * as Schema from 'effect/Schema';
5
6
  import React, { type FC, useMemo } from 'react';
6
7
 
7
- import { type SurfaceComponentProps } from '@dxos/app-toolkit/ui';
8
- import { Obj, Ref } from '@dxos/echo';
9
- import { faker } from '@dxos/random';
8
+ import { type AppSurface } from '@dxos/app-toolkit/ui';
9
+ import { DXN, Obj, Ref, Type } from '@dxos/echo';
10
+ import { Annotation } from '@dxos/echo';
11
+ import { random } from '@dxos/random';
10
12
  import { Card } from '@dxos/react-ui';
11
13
  import { CardContainer, type CardContainerProps } from '@dxos/react-ui-mosaic/testing';
14
+ import { Expando } from '@dxos/schema';
12
15
  import { Organization, Person, Pipeline, Task } from '@dxos/types';
13
16
 
14
- export type DefaultStoryProps<T extends Obj.Any> = {
15
- Component: FC<SurfaceComponentProps<T>>;
17
+ export type DefaultStoryProps<T extends Obj.Any, P extends {} = {}> = {
18
+ Component: FC<AppSurface.ObjectCardProps<T> & P>;
16
19
  createObject: () => T;
17
20
  image?: boolean;
21
+ componentProps?: P;
18
22
  };
19
23
 
20
- export const DefaultStory = <T extends Obj.Any>({ Component, createObject, image }: DefaultStoryProps<T>) => {
24
+ export const DefaultStory = <T extends Obj.Any, P extends {} = {}>({
25
+ Component,
26
+ createObject,
27
+ image,
28
+ componentProps,
29
+ }: DefaultStoryProps<T, P>) => {
21
30
  const object = useMemo(() => createObject(), [createObject]);
22
31
  const roles: CardContainerProps['role'][] = ['intrinsic', 'popover'];
23
32
 
24
33
  return (
25
- <div className='w-full h-full grid grid-cols-2 py-16 gap-8'>
34
+ <div className='h-full w-full grid grid-cols-2 py-16 gap-8'>
26
35
  {roles.map((role, i) => (
27
36
  <div key={i} className='flex h-full justify-center overflow-hidden'>
28
37
  <div className='flex flex-col gap-4 w-full items-center'>
29
38
  <span className='text-sm text-description'>{role}</span>
30
39
  <CardContainer role={role}>
31
40
  <Card.Root border={false}>
32
- <Card.Toolbar>
41
+ <Card.Header>
33
42
  <Card.DragHandle />
34
43
  <Card.Title>{Obj.getLabel(object)}</Card.Title>
35
44
  <Card.Menu />
36
- </Card.Toolbar>
37
- <Component role={role} subject={image ? object : omitImage(object)} />
45
+ </Card.Header>
46
+ <Component
47
+ role={role ?? 'card--content'}
48
+ subject={image ? object : omitImage(object)}
49
+ {...(componentProps ?? ({} as P))}
50
+ />
38
51
  </Card.Root>
39
52
  </CardContainer>
40
53
  </div>
@@ -51,41 +64,90 @@ export const omitImage = ({ image: _, ...rest }: any) => rest;
51
64
  */
52
65
  export const createOrganization = (): Organization.Organization => {
53
66
  return Obj.make(Organization.Organization, {
54
- name: faker.company.name(),
67
+ name: random.company.name(),
55
68
  image:
56
69
  'https://plus.unsplash.com/premium_photo-1672116452571-896980a801c8?q=80&w=2671&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
57
- website: faker.internet.url(),
58
- description: faker.lorem.paragraph(),
70
+ website: random.internet.url(),
71
+ description: random.lorem.paragraph(),
59
72
  });
60
73
  };
61
74
 
62
75
  export const createPerson = (): Person.Person => {
63
76
  const organization = createOrganization();
64
77
  return Obj.make(Person.Person, {
65
- fullName: faker.person.fullName(),
78
+ fullName: random.person.fullName(),
66
79
  image:
67
80
  'https://plus.unsplash.com/premium_photo-1664536392779-049ba8fde933?q=80&w=2574&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
68
81
  organization: Ref.make(organization),
69
82
  emails: [
70
- { label: 'Work', value: faker.internet.email() },
71
- { label: 'Work', value: faker.internet.email() },
72
- { label: 'Work', value: faker.internet.email() },
83
+ { label: 'Work', value: random.internet.email() },
84
+ { label: 'Work', value: random.internet.email() },
85
+ { label: 'Work', value: random.internet.email() },
73
86
  ],
74
87
  });
75
88
  };
76
89
 
77
90
  export const createProject = (): Pipeline.Pipeline => {
78
91
  return Obj.make(Pipeline.Pipeline, {
79
- name: faker.person.fullName(),
92
+ name: random.person.fullName(),
80
93
  image: 'https://dxos.network/dxos-logotype-blue.png',
81
- description: faker.lorem.paragraph(),
94
+ description: random.lorem.paragraph(),
82
95
  columns: [],
83
96
  });
84
97
  };
85
98
 
86
99
  export const createTask = (): Task.Task => {
87
100
  return Obj.make(Task.Task, {
88
- title: faker.lorem.sentence(),
89
- status: faker.helpers.arrayElement(['todo', 'in-progress', 'done'] as const),
101
+ title: random.lorem.sentence(),
102
+ status: random.helpers.arrayElement(['todo', 'in-progress', 'done'] as const),
103
+ });
104
+ };
105
+
106
+ /**
107
+ * Plain object cast as `Obj.Any` — has no schema, typename, or database, so cards
108
+ * like `FormCard` fall through to their empty/unsupported state. Use to story-pin
109
+ * fallback rendering.
110
+ */
111
+ export const createUnknown = (): Obj.Any => ({}) as unknown as Obj.Any;
112
+
113
+ /**
114
+ * Typed object with no user-facing values (only `id`). All Person fields are
115
+ * optional, so `Obj.make(Person, {})` is valid and triggers the FormCard
116
+ * "no values" branch in readonly mode.
117
+ */
118
+ export const createPersonEmpty = (): Person.Person => Obj.make(Person.Person, {});
119
+
120
+ /**
121
+ * Mock of the `Table` schema (org.dxos.type.table): an optional `name` plus
122
+ * `view` and `sizes` fields annotated with `FormInputAnnotation.set(false)`.
123
+ * When constructed without a `name`, no form-renderable field has a value so
124
+ * FormCard should fall through to its empty state — even though
125
+ * `Object.keys(subject)` includes `view`/`sizes`.
126
+ */
127
+ const TableLike = Schema.Struct({
128
+ name: Schema.String.pipe(Schema.optional),
129
+ view: Schema.String.pipe(Annotation.FormInputAnnotation.set(false)),
130
+ sizes: Schema.Record({ key: Schema.String, value: Schema.Number }).pipe(
131
+ Schema.mutable,
132
+ Annotation.FormInputAnnotation.set(false),
133
+ ),
134
+ }).pipe(Type.makeObject(DXN.make('org.dxos.test.tableLike', '0.1.0')));
135
+ type TableLike = Type.InstanceType<typeof TableLike>;
136
+
137
+ /**
138
+ * Table-like object with values only in form-hidden fields (`view`, `sizes`).
139
+ * `Object.keys` includes them, but a naive `hasValues` check would
140
+ * misclassify this as having data. FormCard must consult the schema's
141
+ * form-input annotations to correctly fall through to the empty state.
142
+ */
143
+ export const createTableEmpty = (): TableLike =>
144
+ Obj.make(TableLike, { view: 'view-dxn:placeholder', sizes: {} } as Obj.MakeProps<typeof TableLike>);
145
+
146
+ export const createExpando = (): Expando.Expando => {
147
+ return Expando.make({
148
+ name: random.person.fullName(),
149
+ email: random.internet.email(),
150
+ age: random.number.int({ min: 18, max: 80 }),
151
+ active: random.datatype.boolean(),
90
152
  });
91
153
  };
package/src/testing.ts ADDED
@@ -0,0 +1,7 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ // Eager re-export of `PreviewPlugin`. See `@dxos/plugin-testing/src/core.ts`
6
+ // for the rationale.
7
+ export * from './PreviewPlugin';
@@ -4,19 +4,19 @@
4
4
 
5
5
  import { type Resource } from '@dxos/react-ui';
6
6
 
7
- import { meta } from './meta';
7
+ import { meta } from '#meta';
8
8
 
9
9
  export const translations = [
10
10
  {
11
11
  'en-US': {
12
12
  [meta.id]: {
13
- 'unable to create preview message': 'No preview',
14
- 'todo label': 'To do',
15
- 'in-progress label': 'In progress',
16
- 'done label': 'Done',
17
- 'open object label': 'Open',
18
- 'add object to space label': 'Add to space',
19
- 'more options label': 'More options',
13
+ 'unable-to-create-preview.message': 'No preview',
14
+ 'todo.label': 'To do',
15
+ 'in-progress.label': 'In progress',
16
+ 'done.label': 'Done',
17
+ 'open-object.label': 'Open',
18
+ 'add-object-to-space.label': 'Add to space',
19
+ 'more-options.label': 'More options',
20
20
  },
21
21
  },
22
22
  },
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/meta.ts"],
4
- "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Plugin } from '@dxos/app-framework';\nimport { trim } from '@dxos/util';\n\nexport const meta: Plugin.Meta = {\n id: 'org.dxos.plugin.preview',\n name: 'Preview',\n description: trim`\n Rich preview panel for viewing object content without opening full editors.\n Quick peek at documents, images, and data with inline rendering.\n `,\n icon: 'ph--eye--regular',\n source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-preview',\n};\n"],
5
- "mappings": ";AAKA,SAASA,YAAY;AAEd,IAAMC,OAAoB;EAC/BC,IAAI;EACJC,MAAM;EACNC,aAAaC;;;;EAIbC,MAAM;EACNC,QAAQ;AACV;",
6
- "names": ["trim", "meta", "id", "name", "description", "trim", "icon", "source"]
7
- }
@@ -1,55 +0,0 @@
1
- import {
2
- meta
3
- } from "./chunk-KLQDOIFV.mjs";
4
-
5
- // src/PreviewPlugin.tsx
6
- import { ActivationEvents, Plugin } from "@dxos/app-framework";
7
- import { AppPlugin } from "@dxos/app-toolkit";
8
- import { Organization, Person } from "@dxos/types";
9
-
10
- // src/capabilities/preview-popover/index.ts
11
- import { Capability } from "@dxos/app-framework";
12
- var PreviewPopover = Capability.lazy("PreviewPopover", () => import("./preview-popover-X2ZJM5MK.mjs"));
13
-
14
- // src/capabilities/react-surface/index.ts
15
- import { Capability as Capability2 } from "@dxos/app-framework";
16
- var ReactSurface = Capability2.lazy("ReactSurface", () => import("./react-surface-XGUZ4J2A.mjs"));
17
-
18
- // src/translations.ts
19
- var translations = [
20
- {
21
- "en-US": {
22
- [meta.id]: {
23
- "unable to create preview message": "No preview",
24
- "todo label": "To do",
25
- "in-progress label": "In progress",
26
- "done label": "Done",
27
- "open object label": "Open",
28
- "add object to space label": "Add to space",
29
- "more options label": "More options"
30
- }
31
- }
32
- }
33
- ];
34
-
35
- // src/PreviewPlugin.tsx
36
- var PreviewPlugin = Plugin.define(meta).pipe(AppPlugin.addSchemaModule({
37
- schema: [
38
- Person.Person,
39
- Organization.Organization
40
- ],
41
- id: "schema"
42
- }), AppPlugin.addSurfaceModule({
43
- activate: ReactSurface
44
- }), AppPlugin.addTranslationsModule({
45
- translations
46
- }), Plugin.addModule({
47
- id: "preview-popover",
48
- activatesOn: ActivationEvents.Startup,
49
- activate: PreviewPopover
50
- }), Plugin.make);
51
- export {
52
- PreviewPlugin,
53
- meta
54
- };
55
- //# sourceMappingURL=index.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/PreviewPlugin.tsx", "../../../src/capabilities/preview-popover/index.ts", "../../../src/capabilities/react-surface/index.ts", "../../../src/translations.ts"],
4
- "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { ActivationEvents, Plugin } from '@dxos/app-framework';\nimport { AppPlugin } from '@dxos/app-toolkit';\nimport { Organization, Person } from '@dxos/types';\n\nimport { PreviewPopover, ReactSurface } from './capabilities';\nimport { meta } from './meta';\nimport { translations } from './translations';\n\nexport const PreviewPlugin = Plugin.define(meta).pipe(\n AppPlugin.addSchemaModule({ schema: [Person.Person, Organization.Organization], id: 'schema' }),\n AppPlugin.addSurfaceModule({ activate: ReactSurface }),\n AppPlugin.addTranslationsModule({ translations }),\n Plugin.addModule({\n id: 'preview-popover',\n activatesOn: ActivationEvents.Startup,\n activate: PreviewPopover,\n }),\n Plugin.make,\n);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capability } from '@dxos/app-framework';\n\nexport const PreviewPopover = Capability.lazy('PreviewPopover', () => import('./preview-popover'));\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capability } from '@dxos/app-framework';\n\nexport const ReactSurface = Capability.lazy('ReactSurface', () => import('./react-surface'));\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Resource } from '@dxos/react-ui';\n\nimport { meta } from './meta';\n\nexport const translations = [\n {\n 'en-US': {\n [meta.id]: {\n 'unable to create preview message': 'No preview',\n 'todo label': 'To do',\n 'in-progress label': 'In progress',\n 'done label': 'Done',\n 'open object label': 'Open',\n 'add object to space label': 'Add to space',\n 'more options label': 'More options',\n },\n },\n },\n] as const satisfies Resource[];\n"],
5
- "mappings": ";;;;;AAIA,SAASA,kBAAkBC,cAAc;AACzC,SAASC,iBAAiB;AAC1B,SAASC,cAAcC,cAAc;;;ACFrC,SAASC,kBAAkB;AAEpB,IAAMC,iBAAiBC,WAAWC,KAAK,kBAAkB,MAAM,OAAO,gCAAA,CAAA;;;ACF7E,SAASC,cAAAA,mBAAkB;AAEpB,IAAMC,eAAeC,YAAWC,KAAK,gBAAgB,MAAM,OAAO,8BAAA,CAAA;;;ACElE,IAAMC,eAAe;EAC1B;IACE,SAAS;MACP,CAACC,KAAKC,EAAE,GAAG;QACT,oCAAoC;QACpC,cAAc;QACd,qBAAqB;QACrB,cAAc;QACd,qBAAqB;QACrB,6BAA6B;QAC7B,sBAAsB;MACxB;IACF;EACF;;;;AHTK,IAAMC,gBAAgBC,OAAOC,OAAOC,IAAAA,EAAMC,KAC/CC,UAAUC,gBAAgB;EAAEC,QAAQ;IAACC,OAAOA;IAAQC,aAAaA;;EAAeC,IAAI;AAAS,CAAA,GAC7FL,UAAUM,iBAAiB;EAAEC,UAAUC;AAAa,CAAA,GACpDR,UAAUS,sBAAsB;EAAEC;AAAa,CAAA,GAC/Cd,OAAOe,UAAU;EACfN,IAAI;EACJO,aAAaC,iBAAiBC;EAC9BP,UAAUQ;AACZ,CAAA,GACAnB,OAAOoB,IAAI;",
6
- "names": ["ActivationEvents", "Plugin", "AppPlugin", "Organization", "Person", "Capability", "PreviewPopover", "Capability", "lazy", "Capability", "ReactSurface", "Capability", "lazy", "translations", "meta", "id", "PreviewPlugin", "Plugin", "define", "meta", "pipe", "AppPlugin", "addSchemaModule", "schema", "Person", "Organization", "id", "addSurfaceModule", "activate", "ReactSurface", "addTranslationsModule", "translations", "addModule", "activatesOn", "ActivationEvents", "Startup", "PreviewPopover", "make"]
7
- }
@@ -1 +0,0 @@
1
- {"inputs":{"src/meta.ts":{"bytes":1673,"imports":[{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/capabilities/preview-popover/preview-popover.ts":{"bytes":10664,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/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},{"path":"@dxos/react-ui","kind":"import-statement","external":true}],"format":"esm"},"src/capabilities/preview-popover/index.ts":{"bytes":935,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/capabilities/preview-popover/preview-popover.ts","kind":"dynamic-import","original":"./preview-popover"}],"format":"esm"},"src/cards/FormCard.tsx":{"bytes":6024,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/effect","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/ui-theme","kind":"import-statement","external":true},{"path":"src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"src/cards/OrganizationCard.tsx":{"bytes":3036,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true}],"format":"esm"},"src/cards/PersonCard.tsx":{"bytes":4475,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true}],"format":"esm"},"src/cards/ProjectCard.tsx":{"bytes":2431,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true}],"format":"esm"},"src/cards/TaskCard.tsx":{"bytes":5334,"imports":[{"path":"effect/SchemaAST","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo/internal","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/types","kind":"import-statement","external":true}],"format":"esm"},"src/cards/index.ts":{"bytes":853,"imports":[{"path":"src/cards/FormCard.tsx","kind":"import-statement","original":"./FormCard"},{"path":"src/cards/OrganizationCard.tsx","kind":"import-statement","original":"./OrganizationCard"},{"path":"src/cards/PersonCard.tsx","kind":"import-statement","original":"./PersonCard"},{"path":"src/cards/ProjectCard.tsx","kind":"import-statement","original":"./ProjectCard"},{"path":"src/cards/TaskCard.tsx","kind":"import-statement","original":"./TaskCard"}],"format":"esm"},"src/capabilities/react-surface/react-surface.tsx":{"bytes":12487,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-framework/ui","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/types","kind":"import-statement","external":true},{"path":"src/cards/index.ts","kind":"import-statement","original":"../../cards"},{"path":"src/meta.ts","kind":"import-statement","original":"../../meta"}],"format":"esm"},"src/capabilities/react-surface/index.ts":{"bytes":911,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/capabilities/react-surface/react-surface.tsx","kind":"dynamic-import","original":"./react-surface"}],"format":"esm"},"src/capabilities/index.ts":{"bytes":595,"imports":[{"path":"src/capabilities/preview-popover/index.ts","kind":"import-statement","original":"./preview-popover"},{"path":"src/capabilities/react-surface/index.ts","kind":"import-statement","original":"./react-surface"}],"format":"esm"},"src/translations.ts":{"bytes":1903,"imports":[{"path":"src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"src/PreviewPlugin.tsx":{"bytes":3183,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/types","kind":"import-statement","external":true},{"path":"src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"src/translations.ts","kind":"import-statement","original":"./translations"}],"format":"esm"},"src/index.ts":{"bytes":555,"imports":[{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"src/PreviewPlugin.tsx","kind":"import-statement","original":"./PreviewPlugin"}],"format":"esm"}},"outputs":{"dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3180},"dist/lib/browser/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-KLQDOIFV.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/types","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"dist/lib/browser/preview-popover-X2ZJM5MK.mjs","kind":"dynamic-import"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"dist/lib/browser/react-surface-XGUZ4J2A.mjs","kind":"dynamic-import"}],"exports":["PreviewPlugin","meta"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":0},"src/PreviewPlugin.tsx":{"bytesInOutput":562},"src/capabilities/preview-popover/index.ts":{"bytesInOutput":154},"src/capabilities/index.ts":{"bytesInOutput":0},"src/capabilities/react-surface/index.ts":{"bytesInOutput":164},"src/translations.ts":{"bytesInOutput":378}},"bytes":1542},"dist/lib/browser/preview-popover-X2ZJM5MK.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":5544},"dist/lib/browser/preview-popover-X2ZJM5MK.mjs":{"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/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},{"path":"@dxos/react-ui","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/capabilities/preview-popover/preview-popover.ts","inputs":{"src/capabilities/preview-popover/preview-popover.ts":{"bytesInOutput":2555}},"bytes":2713},"dist/lib/browser/react-surface-XGUZ4J2A.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":17308},"dist/lib/browser/react-surface-XGUZ4J2A.mjs":{"imports":[{"path":"dist/lib/browser/chunk-KLQDOIFV.mjs","kind":"import-statement"},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-framework/ui","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/types","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/effect","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/ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","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","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"effect/SchemaAST","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo/internal","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/types","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/capabilities/react-surface/react-surface.tsx","inputs":{"src/capabilities/react-surface/react-surface.tsx":{"bytesInOutput":3062},"src/cards/FormCard.tsx":{"bytesInOutput":1416},"src/cards/index.ts":{"bytesInOutput":0},"src/cards/OrganizationCard.tsx":{"bytesInOutput":721},"src/cards/PersonCard.tsx":{"bytesInOutput":1054},"src/cards/ProjectCard.tsx":{"bytesInOutput":517},"src/cards/TaskCard.tsx":{"bytesInOutput":1174}},"bytes":8344},"dist/lib/browser/chunk-KLQDOIFV.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":800},"dist/lib/browser/chunk-KLQDOIFV.mjs":{"imports":[{"path":"@dxos/util","kind":"import-statement","external":true}],"exports":["meta"],"inputs":{"src/meta.ts":{"bytesInOutput":389}},"bytes":468}}}
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/capabilities/preview-popover/preview-popover.ts"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Capabilities, Capability } from '@dxos/app-framework';\nimport { AppCapabilities, LayoutOperation, getSpaceIdFromPath } from '@dxos/app-toolkit';\nimport { addEventListener } from '@dxos/async';\nimport { type Client } from '@dxos/client';\nimport { type Space } from '@dxos/client/echo';\nimport { Obj } from '@dxos/echo';\nimport { DXN } from '@dxos/keys';\nimport { log } from '@dxos/log';\nimport { ClientCapabilities } from '@dxos/plugin-client';\nimport { DX_ANCHOR_ACTIVATE, type DxAnchorActivate } from '@dxos/react-ui';\nimport { type PreviewLinkRef, type PreviewLinkTarget } from '@dxos/ui-editor';\n\nconst customEventOptions = { capture: true, passive: false };\n\nconst handlePreviewLookup = async (\n client: Client,\n defaultSpace: Space,\n { dxn, label }: PreviewLinkRef,\n): Promise<PreviewLinkTarget | null> => {\n try {\n const object = await defaultSpace.db.makeRef(DXN.parse(dxn)).load();\n return { label, object };\n } catch {\n return null;\n }\n};\n\nexport default Capability.makeModule(\n Effect.fnUntraced(function* () {\n // Get context for lazy capability access in callbacks.\n const capabilities = yield* Capability.Service;\n\n // TODO(wittjosiah): Factor out lookup handlers to other plugins to make not ECHO-specific.\n const handleAnchorActivate = async ({\n dxn,\n label,\n trigger,\n kind = 'card',\n title: titleProp,\n side,\n props,\n }: DxAnchorActivate) => {\n const { invokePromise } = capabilities.get(Capabilities.OperationInvoker);\n const client = capabilities.get(ClientCapabilities.Client);\n const registry = capabilities.get(Capabilities.AtomRegistry);\n const [layoutAtom] = capabilities.getAll(AppCapabilities.Layout);\n const layout = registry.get(layoutAtom);\n const spaceId = getSpaceIdFromPath(layout.workspace);\n const space = (spaceId && client.spaces.get(spaceId)) ?? client.spaces.default;\n const result = await handlePreviewLookup(client, space, { dxn, label });\n if (!result) {\n return;\n }\n\n const title = titleProp ?? Obj.getLabel(result.object);\n\n await invokePromise(LayoutOperation.UpdatePopover, {\n subjectRef: dxn,\n subject: result.object,\n state: true,\n variant: 'virtual',\n anchor: trigger,\n ...(kind && { kind }),\n ...(title && { title }),\n ...(side && { side }),\n ...(props && { props }),\n });\n };\n\n let cleanup: () => void;\n if (document.defaultView) {\n cleanup = addEventListener(\n document.defaultView,\n DX_ANCHOR_ACTIVATE as any,\n handleAnchorActivate,\n customEventOptions,\n );\n } else {\n log.warn('no default view found');\n }\n\n return Capability.contributes(Capabilities.Null, null, () => Effect.sync(() => cleanup?.()));\n }),\n);\n"],
5
- "mappings": ";AAIA,YAAYA,YAAY;AAExB,SAASC,cAAcC,kBAAkB;AACzC,SAASC,iBAAiBC,iBAAiBC,0BAA0B;AACrE,SAASC,wBAAwB;AAGjC,SAASC,WAAW;AACpB,SAASC,WAAW;AACpB,SAASC,WAAW;AACpB,SAASC,0BAA0B;AACnC,SAASC,0BAAiD;;AAG1D,IAAMC,qBAAqB;EAAEC,SAAS;EAAMC,SAAS;AAAM;AAE3D,IAAMC,sBAAsB,OAC1BC,QACAC,cACA,EAAEC,KAAKC,MAAK,MAAkB;AAE9B,MAAI;AACF,UAAMC,SAAS,MAAMH,aAAaI,GAAGC,QAAQd,IAAIe,MAAML,GAAAA,CAAAA,EAAMM,KAAI;AACjE,WAAO;MAAEL;MAAOC;IAAO;EACzB,QAAQ;AACN,WAAO;EACT;AACF;AAEA,IAAA,0BAAelB,WAAWuB,WACjBC,kBAAW,aAAA;AAEhB,QAAMC,eAAe,OAAOzB,WAAW0B;AAGvC,QAAMC,uBAAuB,OAAO,EAClCX,KACAC,OACAW,SACAC,OAAO,QACPC,OAAOC,WACPC,MACAC,MAAK,MACY;AACjB,UAAM,EAAEC,cAAa,IAAKT,aAAaU,IAAIpC,aAAaqC,gBAAgB;AACxE,UAAMtB,SAASW,aAAaU,IAAI3B,mBAAmB6B,MAAM;AACzD,UAAMC,WAAWb,aAAaU,IAAIpC,aAAawC,YAAY;AAC3D,UAAM,CAACC,UAAAA,IAAcf,aAAagB,OAAOxC,gBAAgByC,MAAM;AAC/D,UAAMC,SAASL,SAASH,IAAIK,UAAAA;AAC5B,UAAMI,UAAUzC,mBAAmBwC,OAAOE,SAAS;AACnD,UAAMC,SAASF,WAAW9B,OAAOiC,OAAOZ,IAAIS,OAAAA,MAAa9B,OAAOiC,OAAOC;AACvE,UAAMC,SAAS,MAAMpC,oBAAoBC,QAAQgC,OAAO;MAAE9B;MAAKC;IAAM,CAAA;AACrE,QAAI,CAACgC,QAAQ;AACX;IACF;AAEA,UAAMnB,QAAQC,aAAa1B,IAAI6C,SAASD,OAAO/B,MAAM;AAErD,UAAMgB,cAAchC,gBAAgBiD,eAAe;MACjDC,YAAYpC;MACZqC,SAASJ,OAAO/B;MAChBoC,OAAO;MACPC,SAAS;MACTC,QAAQ5B;MACR,GAAIC,QAAQ;QAAEA;MAAK;MACnB,GAAIC,SAAS;QAAEA;MAAM;MACrB,GAAIE,QAAQ;QAAEA;MAAK;MACnB,GAAIC,SAAS;QAAEA;MAAM;IACvB,CAAA;EACF;AAEA,MAAIwB;AACJ,MAAIC,SAASC,aAAa;AACxBF,cAAUrD,iBACRsD,SAASC,aACTlD,oBACAkB,sBACAjB,kBAAAA;EAEJ,OAAO;AACLH,QAAIqD,KAAK,yBAAA,QAAA;;;;;;EACX;AAEA,SAAO5D,WAAW6D,YAAY9D,aAAa+D,MAAM,MAAM,MAAaC,YAAK,MAAMN,UAAAA,CAAAA,CAAAA;AACjF,CAAA,CAAA;",
6
- "names": ["Effect", "Capabilities", "Capability", "AppCapabilities", "LayoutOperation", "getSpaceIdFromPath", "addEventListener", "Obj", "DXN", "log", "ClientCapabilities", "DX_ANCHOR_ACTIVATE", "customEventOptions", "capture", "passive", "handlePreviewLookup", "client", "defaultSpace", "dxn", "label", "object", "db", "makeRef", "parse", "load", "makeModule", "fnUntraced", "capabilities", "Service", "handleAnchorActivate", "trigger", "kind", "title", "titleProp", "side", "props", "invokePromise", "get", "OperationInvoker", "Client", "registry", "AtomRegistry", "layoutAtom", "getAll", "Layout", "layout", "spaceId", "workspace", "space", "spaces", "default", "result", "getLabel", "UpdatePopover", "subjectRef", "subject", "state", "variant", "anchor", "cleanup", "document", "defaultView", "warn", "contributes", "Null", "sync"]
7
- }
@@ -1,236 +0,0 @@
1
- import {
2
- meta
3
- } from "./chunk-KLQDOIFV.mjs";
4
-
5
- // src/capabilities/react-surface/react-surface.tsx
6
- import * as Effect from "effect/Effect";
7
- import React6 from "react";
8
- import { Capabilities, Capability } from "@dxos/app-framework";
9
- import { Surface } from "@dxos/app-framework/ui";
10
- import { Obj as Obj3 } from "@dxos/echo";
11
- import { Card as Card6 } from "@dxos/react-ui";
12
- import { Organization, Person, Pipeline, Task as Task2 } from "@dxos/types";
13
-
14
- // src/cards/FormCard.tsx
15
- import React, { useCallback, useMemo } from "react";
16
- import { Obj } from "@dxos/echo";
17
- import { splitJsonPath } from "@dxos/effect";
18
- import { Card, useTranslation } from "@dxos/react-ui";
19
- import { Form, omitId } from "@dxos/react-ui-form";
20
- import { descriptionMessage, mx } from "@dxos/ui-theme";
21
- var FormCard = ({ subject, projection }) => {
22
- const { t } = useTranslation(meta.id);
23
- const echoSchema = Obj.getSchema(subject);
24
- const schema = useMemo(() => echoSchema && omitId(echoSchema), [
25
- echoSchema
26
- ]);
27
- const handleSave = useCallback((values, { changed }) => {
28
- const paths = Object.keys(changed).filter((path) => changed[path]);
29
- Obj.change(subject, () => {
30
- for (const path of paths) {
31
- const value = values[path];
32
- const parts = splitJsonPath(path);
33
- Obj.setValue(subject, parts, value);
34
- }
35
- });
36
- }, []);
37
- if (!schema) {
38
- return /* @__PURE__ */ React.createElement("p", {
39
- className: mx(descriptionMessage)
40
- }, t("unable to create preview message"));
41
- }
42
- return /* @__PURE__ */ React.createElement(Card.Content, null, /* @__PURE__ */ React.createElement(Form.Root, {
43
- schema,
44
- projection,
45
- values: subject,
46
- autoSave: true,
47
- onSave: handleSave
48
- }, /* @__PURE__ */ React.createElement(Form.Viewport, null, /* @__PURE__ */ React.createElement(Form.Content, null, /* @__PURE__ */ React.createElement(Form.FieldSet, null)))));
49
- };
50
-
51
- // src/cards/OrganizationCard.tsx
52
- import React2 from "react";
53
- import { Card as Card2 } from "@dxos/react-ui";
54
- var OrganizationCard = ({ subject }) => {
55
- const { image, description, website } = subject;
56
- return /* @__PURE__ */ React2.createElement(Card2.Content, null, /* @__PURE__ */ React2.createElement(Card2.Poster, {
57
- alt: name ?? "",
58
- ...image ? {
59
- image
60
- } : {
61
- icon: "ph--building-office--regular"
62
- },
63
- classNames: !image && "opacity-50"
64
- }), description && /* @__PURE__ */ React2.createElement(Card2.Row, null, /* @__PURE__ */ React2.createElement(Card2.Text, {
65
- variant: "description"
66
- }, description)), website && /* @__PURE__ */ React2.createElement(Card2.Link, {
67
- label: website,
68
- href: website
69
- }));
70
- };
71
-
72
- // src/cards/PersonCard.tsx
73
- import React3 from "react";
74
- import { Avatar } from "@dxos/react-ui";
75
- import { Card as Card3 } from "@dxos/react-ui";
76
- var PersonCard = ({ subject }) => {
77
- const { image, organization: { target: organization } = {}, emails = [] } = subject;
78
- return /* @__PURE__ */ React3.createElement(Card3.Content, null, /* @__PURE__ */ React3.createElement(Avatar.Root, null, image && /* @__PURE__ */ React3.createElement(Card3.Row, {
79
- className: "py-1"
80
- }, /* @__PURE__ */ React3.createElement(Avatar.Content, {
81
- imgSrc: image,
82
- icon: "ph--user--regular",
83
- size: 16,
84
- classNames: !image && "opacity-50",
85
- hue: "neutral",
86
- variant: "square"
87
- })), organization?.name && /* @__PURE__ */ React3.createElement(Card3.Action, {
88
- icon: "ph--buildings--regular",
89
- label: organization.name
90
- }), emails.map(({ value }) => /* @__PURE__ */ React3.createElement(Card3.Row, {
91
- key: value,
92
- icon: "ph--at--regular"
93
- }, /* @__PURE__ */ React3.createElement(Card3.Text, {
94
- truncate: true,
95
- className: "text-primary-text"
96
- }, value)))));
97
- };
98
-
99
- // src/cards/ProjectCard.tsx
100
- import React4 from "react";
101
- import { Obj as Obj2 } from "@dxos/echo";
102
- import { Card as Card4 } from "@dxos/react-ui";
103
- var ProjectCard = ({ subject }) => {
104
- const { image, description } = subject;
105
- return /* @__PURE__ */ React4.createElement(Card4.Content, null, image && /* @__PURE__ */ React4.createElement(Card4.Poster, {
106
- image,
107
- alt: Obj2.getLabel(subject) ?? "",
108
- aspect: "auto"
109
- }), description && /* @__PURE__ */ React4.createElement(Card4.Text, {
110
- variant: "description"
111
- }, description));
112
- };
113
-
114
- // src/cards/TaskCard.tsx
115
- import * as SchemaAST from "effect/SchemaAST";
116
- import React5 from "react";
117
- import { PropertyMetaAnnotationId } from "@dxos/echo/internal";
118
- import { Card as Card5 } from "@dxos/react-ui";
119
- import { Task } from "@dxos/types";
120
- var TaskCard = ({ subject }) => {
121
- const { title, status } = subject;
122
- const statusOption = getActiveStatusOption(status);
123
- return /* @__PURE__ */ React5.createElement(Card5.Content, null, /* @__PURE__ */ React5.createElement(Card5.Heading, {
124
- classNames: "min-w-0 flex-1 truncate"
125
- }, title), statusOption && /* @__PURE__ */ React5.createElement("span", {
126
- className: "dx-tag",
127
- "data-hue": statusOption.color
128
- }, statusOption.title));
129
- };
130
- var getActiveStatusOption = (status) => {
131
- const properties = SchemaAST.getPropertySignatures(Task.Task.ast);
132
- const statusProperty = properties.find((p) => p.name === "status");
133
- const statusMeta = SchemaAST.getAnnotation(PropertyMetaAnnotationId)(
134
- // TODO(thure): Typescript asserts `.type` doesn’t have `.types`, but in runtime it does.
135
- statusProperty.type.types[0]
136
- );
137
- const options = statusMeta.value.singleSelect.options;
138
- return options.find(({ id }) => id === status);
139
- };
140
-
141
- // src/capabilities/react-surface/react-surface.tsx
142
- var react_surface_default = Capability.makeModule(() => Effect.succeed(Capability.contributes(Capabilities.ReactSurface, [
143
- //
144
- // Specific schema types.
145
- // TODO(burdon): Create helpers and factor out.
146
- //
147
- Surface.create({
148
- id: `${meta.id}.schema-popover--contact`,
149
- role: "card--content",
150
- position: "hoist",
151
- filter: (data) => Obj3.instanceOf(Person.Person, data.subject),
152
- component: ({ data, role }) => {
153
- return /* @__PURE__ */ React6.createElement(PersonCard, {
154
- role,
155
- subject: data.subject
156
- });
157
- }
158
- }),
159
- Surface.create({
160
- id: `${meta.id}.schema-popover--organization`,
161
- role: "card--content",
162
- position: "hoist",
163
- filter: (data) => Obj3.instanceOf(Organization.Organization, data.subject),
164
- component: ({ data, role }) => {
165
- return /* @__PURE__ */ React6.createElement(OrganizationCard, {
166
- role,
167
- subject: data.subject
168
- });
169
- }
170
- }),
171
- Surface.create({
172
- id: `${meta.id}.schema-popover--project`,
173
- role: "card--content",
174
- position: "hoist",
175
- filter: (data) => Obj3.instanceOf(Pipeline.Pipeline, data.subject),
176
- component: ({ data, role }) => {
177
- return /* @__PURE__ */ React6.createElement(ProjectCard, {
178
- role,
179
- subject: data.subject
180
- });
181
- }
182
- }),
183
- Surface.create({
184
- id: `${meta.id}.schema-popover--task`,
185
- role: "card--content",
186
- position: "hoist",
187
- filter: (data) => Obj3.instanceOf(Task2.Task, data.subject),
188
- component: ({ data, role }) => {
189
- return /* @__PURE__ */ React6.createElement(TaskCard, {
190
- role,
191
- subject: data.subject
192
- });
193
- }
194
- }),
195
- //
196
- // Fallback for any object.
197
- //
198
- Surface.create({
199
- id: `${meta.id}.fallback-popover`,
200
- role: "card--content",
201
- position: "fallback",
202
- filter: (data) => Obj3.isObject(data.subject),
203
- component: ({ data, role }) => {
204
- return /* @__PURE__ */ React6.createElement(FormCard, {
205
- role,
206
- subject: data.subject,
207
- projection: data.projection
208
- });
209
- }
210
- }),
211
- Surface.create({
212
- id: `${meta.id}.section`,
213
- role: [
214
- "section"
215
- ],
216
- position: "fallback",
217
- filter: (data) => Obj3.isObject(data.subject),
218
- component: ({ data }) => {
219
- return /* @__PURE__ */ React6.createElement("div", {
220
- role: "none",
221
- className: "flex w-full justify-center"
222
- }, /* @__PURE__ */ React6.createElement("div", {
223
- role: "none",
224
- className: "pt-2 pb-2 dx-card-min-width dx-card-max-width"
225
- }, /* @__PURE__ */ React6.createElement(Card6.Root, null, /* @__PURE__ */ React6.createElement(Surface.Surface, {
226
- role: "card--content",
227
- data,
228
- limit: 1
229
- }))));
230
- }
231
- })
232
- ])));
233
- export {
234
- react_surface_default as default
235
- };
236
- //# sourceMappingURL=react-surface-XGUZ4J2A.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/capabilities/react-surface/react-surface.tsx", "../../../src/cards/FormCard.tsx", "../../../src/cards/OrganizationCard.tsx", "../../../src/cards/PersonCard.tsx", "../../../src/cards/ProjectCard.tsx", "../../../src/cards/TaskCard.tsx"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport React from 'react';\n\nimport { Capabilities, Capability } from '@dxos/app-framework';\nimport { Surface } from '@dxos/app-framework/ui';\nimport { Obj } from '@dxos/echo';\nimport { Card } from '@dxos/react-ui';\nimport { type ProjectionModel } from '@dxos/schema';\nimport { Organization, Person, Pipeline, Task } from '@dxos/types';\n\nimport { FormCard, OrganizationCard, PersonCard, ProjectCard, TaskCard } from '../../cards';\nimport { meta } from '../../meta';\n\nexport default Capability.makeModule(() =>\n Effect.succeed(\n Capability.contributes(Capabilities.ReactSurface, [\n //\n // Specific schema types.\n // TODO(burdon): Create helpers and factor out.\n //\n\n Surface.create<{ subject: Person.Person }>({\n id: `${meta.id}.schema-popover--contact`,\n role: 'card--content',\n position: 'hoist',\n filter: (data): data is { subject: Person.Person } => Obj.instanceOf(Person.Person, data.subject),\n component: ({ data, role }) => {\n return <PersonCard role={role} subject={data.subject} />;\n },\n }),\n Surface.create({\n id: `${meta.id}.schema-popover--organization`,\n role: 'card--content',\n position: 'hoist',\n filter: (data): data is { subject: Organization.Organization } =>\n Obj.instanceOf(Organization.Organization, data.subject),\n component: ({ data, role }) => {\n return <OrganizationCard role={role} subject={data.subject} />;\n },\n }),\n Surface.create({\n id: `${meta.id}.schema-popover--project`,\n role: 'card--content',\n position: 'hoist',\n filter: (data): data is { subject: Pipeline.Pipeline } => Obj.instanceOf(Pipeline.Pipeline, data.subject),\n component: ({ data, role }) => {\n return <ProjectCard role={role} subject={data.subject} />;\n },\n }),\n Surface.create({\n id: `${meta.id}.schema-popover--task`,\n role: 'card--content',\n position: 'hoist',\n filter: (data): data is { subject: Task.Task } => Obj.instanceOf(Task.Task, data.subject),\n component: ({ data, role }) => {\n return <TaskCard role={role} subject={data.subject} />;\n },\n }),\n\n //\n // Fallback for any object.\n //\n\n Surface.create({\n id: `${meta.id}.fallback-popover`,\n role: 'card--content',\n position: 'fallback',\n filter: (data): data is { subject: Obj.Unknown; projection?: ProjectionModel } => Obj.isObject(data.subject),\n component: ({ data, role }) => {\n return <FormCard role={role} subject={data.subject} projection={data.projection} />;\n },\n }),\n\n Surface.create({\n id: `${meta.id}.section`,\n role: ['section'],\n position: 'fallback',\n filter: (data): data is { subject: Obj.Unknown } => Obj.isObject(data.subject),\n component: ({ data }) => {\n return (\n <div role='none' className='flex w-full justify-center'>\n <div role='none' className='pt-2 pb-2 dx-card-min-width dx-card-max-width'>\n <Card.Root>\n <Surface.Surface role='card--content' data={data} limit={1} />\n </Card.Root>\n </div>\n </div>\n );\n },\n }),\n ]),\n ),\n);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport React, { useCallback, useMemo } from 'react';\n\nimport { type SurfaceComponentProps } from '@dxos/app-toolkit/ui';\nimport { Obj } from '@dxos/echo';\nimport { type JsonPath, splitJsonPath } from '@dxos/effect';\nimport { Card, useTranslation } from '@dxos/react-ui';\nimport { Form, omitId } from '@dxos/react-ui-form';\nimport { type ProjectionModel } from '@dxos/schema';\nimport { descriptionMessage, mx } from '@dxos/ui-theme';\n\nimport { meta } from '../meta';\n\nexport const FormCard = ({ subject, projection }: SurfaceComponentProps & { projection?: ProjectionModel }) => {\n const { t } = useTranslation(meta.id);\n const echoSchema = Obj.getSchema(subject);\n const schema = useMemo(() => echoSchema && omitId(echoSchema), [echoSchema]);\n\n const handleSave = useCallback((values: any, { changed }: { changed: Record<string, boolean> }) => {\n const paths = Object.keys(changed).filter((path) => changed[path]);\n Obj.change(subject, () => {\n for (const path of paths) {\n const value = values[path];\n const parts = splitJsonPath(path as JsonPath);\n Obj.setValue(subject, parts, value);\n }\n });\n }, []);\n\n if (!schema) {\n return <p className={mx(descriptionMessage)}>{t('unable to create preview message')}</p>;\n }\n\n return (\n <Card.Content>\n <Form.Root schema={schema} projection={projection} values={subject} autoSave onSave={handleSave}>\n <Form.Viewport>\n <Form.Content>\n <Form.FieldSet />\n </Form.Content>\n </Form.Viewport>\n </Form.Root>\n </Card.Content>\n );\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport { type SurfaceComponentProps } from '@dxos/app-toolkit/ui';\nimport { Card } from '@dxos/react-ui';\nimport { type Organization } from '@dxos/types';\n\nexport const OrganizationCard = ({ subject }: SurfaceComponentProps<Organization.Organization>) => {\n const { image, description, website } = subject;\n\n return (\n <Card.Content>\n <Card.Poster\n alt={name ?? ''}\n {...(image ? { image } : { icon: 'ph--building-office--regular' })}\n classNames={!image && 'opacity-50'}\n />\n {description && (\n <Card.Row>\n <Card.Text variant='description'>{description}</Card.Text>\n </Card.Row>\n )}\n {website && <Card.Link label={website} href={website} />}\n </Card.Content>\n );\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport { type SurfaceComponentProps } from '@dxos/app-toolkit/ui';\nimport { Avatar } from '@dxos/react-ui';\nimport { Card } from '@dxos/react-ui';\nimport { type Person } from '@dxos/types';\n\nexport const PersonCard = ({ subject }: SurfaceComponentProps<Person.Person>) => {\n const { image, organization: { target: organization } = {}, emails = [] } = subject;\n\n return (\n <Card.Content>\n <Avatar.Root>\n {image && (\n <Card.Row className='py-1'>\n <Avatar.Content\n imgSrc={image}\n icon='ph--user--regular'\n size={16}\n classNames={!image && 'opacity-50'}\n hue='neutral'\n variant='square'\n />\n </Card.Row>\n )}\n {organization?.name && (\n <Card.Action\n icon='ph--buildings--regular'\n label={organization.name}\n // onClick={onSelect ? () => onSelect(organization) : undefined}\n />\n )}\n {emails.map(({ value }) => (\n <Card.Row key={value} icon='ph--at--regular'>\n <Card.Text truncate className='text-primary-text'>\n {value}\n </Card.Text>\n </Card.Row>\n ))}\n </Avatar.Root>\n </Card.Content>\n );\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport { type SurfaceComponentProps } from '@dxos/app-toolkit/ui';\nimport { Obj } from '@dxos/echo';\nimport { Card } from '@dxos/react-ui';\nimport { type Pipeline } from '@dxos/types';\n\nexport const ProjectCard = ({ subject }: SurfaceComponentProps<Pipeline.Pipeline>) => {\n const { image, description } = subject;\n\n return (\n <Card.Content>\n {image && <Card.Poster image={image} alt={Obj.getLabel(subject) ?? ''} aspect='auto' />}\n {/* <CardHeader label={name} subject={subject} db={db} /> */}\n {description && <Card.Text variant='description'>{description}</Card.Text>}\n </Card.Content>\n );\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as SchemaAST from 'effect/SchemaAST';\nimport React from 'react';\n\nimport { type SurfaceComponentProps } from '@dxos/app-toolkit/ui';\nimport { type PropertyMetaAnnotation, PropertyMetaAnnotationId } from '@dxos/echo/internal';\nimport { Card } from '@dxos/react-ui';\nimport { Task } from '@dxos/types';\n\nexport const TaskCard = ({ subject }: SurfaceComponentProps<Task.Task>) => {\n const { title, status } = subject;\n const statusOption = getActiveStatusOption(status);\n\n return (\n <Card.Content>\n <Card.Heading classNames='min-w-0 flex-1 truncate'>{title}</Card.Heading>\n {statusOption && (\n <span className='dx-tag' data-hue={statusOption.color}>\n {statusOption.title}\n </span>\n )}\n </Card.Content>\n );\n};\n\n// TODO(thure): Should this move upstream as a helper? Is there an easier way to get options?\nconst getActiveStatusOption = (status?: string) => {\n const properties = SchemaAST.getPropertySignatures(Task.Task.ast);\n const statusProperty = properties.find((p) => p.name === 'status');\n const statusMeta = SchemaAST.getAnnotation<PropertyMetaAnnotation>(PropertyMetaAnnotationId)(\n // TODO(thure): Typescript asserts `.type` doesn’t have `.types`, but in runtime it does.\n (statusProperty!.type as any).types[0],\n );\n const options = // TODO(thure): Typescript asserts `statusMeta` doesn’t have `.value`, but in runtime it does.\n (statusMeta as any).value.singleSelect.options as { id: string; title: string; color: string }[];\n return options.find(({ id }) => id === status);\n};\n"],
5
- "mappings": ";;;;;AAIA,YAAYA,YAAY;AACxB,OAAOC,YAAW;AAElB,SAASC,cAAcC,kBAAkB;AACzC,SAASC,eAAe;AACxB,SAASC,OAAAA,YAAW;AACpB,SAASC,QAAAA,aAAY;AAErB,SAASC,cAAcC,QAAQC,UAAUC,QAAAA,aAAY;;;ACRrD,OAAOC,SAASC,aAAaC,eAAe;AAG5C,SAASC,WAAW;AACpB,SAAwBC,qBAAqB;AAC7C,SAASC,MAAMC,sBAAsB;AACrC,SAASC,MAAMC,cAAc;AAE7B,SAASC,oBAAoBC,UAAU;AAIhC,IAAMC,WAAW,CAAC,EAAEC,SAASC,WAAU,MAA4D;AACxG,QAAM,EAAEC,EAAC,IAAKC,eAAeC,KAAKC,EAAE;AACpC,QAAMC,aAAaC,IAAIC,UAAUR,OAAAA;AACjC,QAAMS,SAASC,QAAQ,MAAMJ,cAAcK,OAAOL,UAAAA,GAAa;IAACA;GAAW;AAE3E,QAAMM,aAAaC,YAAY,CAACC,QAAa,EAAEC,QAAO,MAAwC;AAC5F,UAAMC,QAAQC,OAAOC,KAAKH,OAAAA,EAASI,OAAO,CAACC,SAASL,QAAQK,IAAAA,CAAK;AACjEb,QAAIc,OAAOrB,SAAS,MAAA;AAClB,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,WAAU;SACzB,gBAAAZ,OAAA,cAACa,MAAKC,MAAI,MACR,gBAAAd,OAAA,cAACb,QAAQA,SAAO;QAACI,MAAK;QAAgBG;QAAYqB,OAAO;;IAKnE;EACF,CAAA;CACD,CAAA,CAAA;",
6
- "names": ["Effect", "React", "Capabilities", "Capability", "Surface", "Obj", "Card", "Organization", "Person", "Pipeline", "Task", "React", "useCallback", "useMemo", "Obj", "splitJsonPath", "Card", "useTranslation", "Form", "omitId", "descriptionMessage", "mx", "FormCard", "subject", "projection", "t", "useTranslation", "meta", "id", "echoSchema", "Obj", "getSchema", "schema", "useMemo", "omitId", "handleSave", "useCallback", "values", "changed", "paths", "Object", "keys", "filter", "path", "change", "value", "parts", "splitJsonPath", "setValue", "p", "className", "mx", "descriptionMessage", "Card", "Content", "Form", "Root", "autoSave", "onSave", "Viewport", "FieldSet", "React", "Card", "OrganizationCard", "subject", "image", "description", "website", "React", "Card", "Content", "Poster", "alt", "name", "icon", "classNames", "Row", "Text", "variant", "Link", "label", "href", "React", "Avatar", "Card", "PersonCard", "subject", "image", "organization", "target", "emails", "React", "Card", "Content", "Avatar", "Root", "Row", "className", "imgSrc", "icon", "size", "classNames", "hue", "variant", "name", "Action", "label", "map", "value", "key", "Text", "truncate", "React", "Obj", "Card", "ProjectCard", "subject", "image", "description", "React", "Card", "Content", "Poster", "alt", "Obj", "getLabel", "aspect", "Text", "variant", "SchemaAST", "React", "PropertyMetaAnnotationId", "Card", "Task", "TaskCard", "subject", "title", "status", "statusOption", "getActiveStatusOption", "React", "Card", "Content", "Heading", "classNames", "span", "className", "data-hue", "color", "properties", "getPropertySignatures", "Task", "ast", "statusProperty", "find", "p", "name", "statusMeta", "getAnnotation", "PropertyMetaAnnotationId", "type", "types", "options", "value", "singleSelect", "id", "Capability", "makeModule", "succeed", "contributes", "Capabilities", "ReactSurface", "Surface", "create", "id", "meta", "role", "position", "filter", "data", "Obj", "instanceOf", "Person", "subject", "component", "React", "PersonCard", "Organization", "OrganizationCard", "Pipeline", "ProjectCard", "Task", "TaskCard", "isObject", "FormCard", "projection", "div", "className", "Card", "Root", "limit"]
7
- }