@dxos/plugin-preview 0.9.1-staging.ee54ba693a → 0.11.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.
Files changed (68) hide show
  1. package/dist/lib/PreviewPlugin.mjs +16 -0
  2. package/dist/lib/PreviewPlugin.mjs.map +1 -0
  3. package/dist/lib/PreviewPlugin.node.mjs +10 -0
  4. package/dist/lib/PreviewPlugin.node.mjs.map +1 -0
  5. package/dist/lib/PreviewPlugin.workerd.mjs +10 -0
  6. package/dist/lib/PreviewPlugin.workerd.mjs.map +1 -0
  7. package/dist/lib/capabilities.mjs +8 -0
  8. package/dist/lib/capabilities.mjs.map +1 -0
  9. package/dist/lib/chunk-meta.mjs +23 -0
  10. package/dist/lib/chunk-meta.mjs.map +1 -0
  11. package/dist/lib/chunk-preview-popover.mjs +82 -0
  12. package/dist/lib/chunk-preview-popover.mjs.map +1 -0
  13. package/dist/lib/chunk-react-surface.mjs +366 -0
  14. package/dist/lib/chunk-react-surface.mjs.map +1 -0
  15. package/dist/lib/index.mjs +2 -0
  16. package/dist/lib/meta.mjs +2 -0
  17. package/dist/lib/plugin.mjs +8 -0
  18. package/dist/lib/plugin.mjs.map +1 -0
  19. package/dist/lib/testing.mjs +2 -0
  20. package/dist/lib/translations.mjs +15 -0
  21. package/dist/lib/translations.mjs.map +1 -0
  22. package/dist/types/src/capabilities/RelatedCards.d.ts +14 -0
  23. package/dist/types/src/capabilities/RelatedCards.d.ts.map +1 -0
  24. package/dist/types/src/capabilities/preview-popover.d.ts +1 -1
  25. package/dist/types/src/capabilities/react-surface.d.ts +1 -1
  26. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  27. package/dist/types/src/cards/PersonCard.d.ts.map +1 -1
  28. package/dist/types/src/stories/Card.stories.d.ts.map +1 -1
  29. package/dist/types/src/stories/fixtures.d.ts +48 -0
  30. package/dist/types/src/stories/fixtures.d.ts.map +1 -0
  31. package/dist/types/src/stories/testing.d.ts +1 -47
  32. package/dist/types/src/stories/testing.d.ts.map +1 -1
  33. package/dist/types/tsconfig.tsbuildinfo +1 -1
  34. package/package.json +37 -36
  35. package/src/capabilities/RelatedCards.tsx +35 -0
  36. package/src/capabilities/preview-popover.ts +2 -2
  37. package/src/capabilities/{react-surface.tsx → react-surface.ts} +43 -61
  38. package/src/cards/PersonCard.tsx +12 -6
  39. package/src/stories/Card.stories.tsx +2 -2
  40. package/src/stories/fixtures.ts +109 -0
  41. package/src/stories/testing.tsx +2 -101
  42. package/dist/lib/neutral/PreviewPlugin.mjs +0 -9
  43. package/dist/lib/neutral/PreviewPlugin.mjs.map +0 -7
  44. package/dist/lib/neutral/PreviewPlugin.node.mjs +0 -17
  45. package/dist/lib/neutral/PreviewPlugin.node.mjs.map +0 -7
  46. package/dist/lib/neutral/PreviewPlugin.workerd.mjs +0 -17
  47. package/dist/lib/neutral/PreviewPlugin.workerd.mjs.map +0 -7
  48. package/dist/lib/neutral/capabilities/index.mjs +0 -9
  49. package/dist/lib/neutral/capabilities/index.mjs.map +0 -7
  50. package/dist/lib/neutral/chunk-3SWUVHXJ.mjs +0 -28
  51. package/dist/lib/neutral/chunk-3SWUVHXJ.mjs.map +0 -7
  52. package/dist/lib/neutral/chunk-SXDHWUBO.mjs +0 -32
  53. package/dist/lib/neutral/chunk-SXDHWUBO.mjs.map +0 -7
  54. package/dist/lib/neutral/index.mjs +0 -7
  55. package/dist/lib/neutral/index.mjs.map +0 -7
  56. package/dist/lib/neutral/meta.json +0 -1
  57. package/dist/lib/neutral/meta.mjs +0 -7
  58. package/dist/lib/neutral/meta.mjs.map +0 -7
  59. package/dist/lib/neutral/plugin.mjs +0 -11
  60. package/dist/lib/neutral/plugin.mjs.map +0 -7
  61. package/dist/lib/neutral/preview-popover-EEQQJAH5.mjs +0 -101
  62. package/dist/lib/neutral/preview-popover-EEQQJAH5.mjs.map +0 -7
  63. package/dist/lib/neutral/react-surface-2CN3DRU6.mjs +0 -432
  64. package/dist/lib/neutral/react-surface-2CN3DRU6.mjs.map +0 -7
  65. package/dist/lib/neutral/testing.mjs +0 -7
  66. package/dist/lib/neutral/testing.mjs.map +0 -7
  67. package/dist/lib/neutral/translations.mjs +0 -21
  68. package/dist/lib/neutral/translations.mjs.map +0 -7
@@ -0,0 +1,2 @@
1
+ import { PreviewPlugin } from "./PreviewPlugin.mjs";
2
+ export { PreviewPlugin };
@@ -0,0 +1,15 @@
1
+ import { meta } from "#meta";
2
+ //#region src/translations.ts
3
+ var translations = [{ "en-US": { [meta.profile.key]: {
4
+ "unable-to-create-preview.message": "No preview",
5
+ "todo.label": "To do",
6
+ "in-progress.label": "In progress",
7
+ "done.label": "Done",
8
+ "open-object.label": "Open",
9
+ "add-object-to-space.label": "Add to space",
10
+ "more-options.label": "More options"
11
+ } } }];
12
+ //#endregion
13
+ export { translations };
14
+
15
+ //# sourceMappingURL=translations.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"translations.mjs","names":[],"sources":["../../src/translations.ts"],"sourcesContent":["//\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.profile.key]: {\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"],"mappings":";;AAQA,IAAa,eAAe,CAC1B,EACE,SAAS,GACN,KAAK,QAAQ,MAAM;CAClB,oCAAoC;CACpC,cAAc;CACd,qBAAqB;CACrB,cAAc;CACd,qBAAqB;CACrB,6BAA6B;CAC7B,sBAAsB;AACxB,EACF,EACF,CACF"}
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ import { AppSurface } from '@dxos/app-toolkit/ui';
3
+ import { type Organization, type Person } from '@dxos/types';
4
+ export type OrganizationCardContentProps = AppSurface.ObjectCardData<Organization.Organization> & {
5
+ role: string;
6
+ };
7
+ /** Organization and Person cards append a nested `Related` surface, so they compose rather than map. */
8
+ export declare const OrganizationCardContent: ({ role, ...data }: OrganizationCardContentProps) => React.JSX.Element;
9
+ export type PersonCardContentProps = AppSurface.ObjectCardData<Person.Person> & {
10
+ role: string;
11
+ };
12
+ /** Renders a person card with one nested `Related` surface. */
13
+ export declare const PersonCardContent: ({ role, ...data }: PersonCardContentProps) => React.JSX.Element;
14
+ //# sourceMappingURL=RelatedCards.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RelatedCards.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/RelatedCards.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,MAAM,EAAE,MAAM,aAAa,CAAC;AAI7D,MAAM,MAAM,4BAA4B,GAAG,UAAU,CAAC,cAAc,CAAC,YAAY,CAAC,YAAY,CAAC,GAAG;IAChG,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,wGAAwG;AACxG,eAAO,MAAM,uBAAuB,sBAAuB,4BAA4B,sBAKtF,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG,UAAU,CAAC,cAAc,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG;IAC9E,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,+DAA+D;AAC/D,eAAO,MAAM,iBAAiB,sBAAuB,sBAAsB,sBAK1E,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import * as Effect from 'effect/Effect';
2
2
  import { Capability } from '@dxos/app-framework';
3
- declare const _default: (props: void) => Effect.Effect<Capability.Any, never, Capability.Service>;
3
+ declare const _default: (props: void) => Effect.Effect<Capability.Any, never, import("effect/Scope").Scope | Capability.Service>;
4
4
  export default _default;
5
5
  //# sourceMappingURL=preview-popover.d.ts.map
@@ -1,5 +1,5 @@
1
1
  import * as Effect from 'effect/Effect';
2
2
  import { Capability } from '@dxos/app-framework';
3
- declare const _default: (props: void) => Effect.Effect<Capability.Any, never, never>;
3
+ declare const _default: (props: void) => Effect.Effect<Capability.Any, never, import("effect/Scope").Scope>;
4
4
  export default _default;
5
5
  //# sourceMappingURL=react-surface.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"react-surface.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/react-surface.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAGxC,OAAO,EAAgB,UAAU,EAAE,MAAM,qBAAqB,CAAC"}
1
+ {"version":3,"file":"react-surface.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/react-surface.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAgB,UAAU,EAAE,MAAM,qBAAqB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"PersonCard.d.ts","sourceRoot":"","sources":["../../../../src/cards/PersonCard.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAsB,MAAM,OAAO,CAAC;AAI3C,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAKvD,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,aAAa,CAAC;AAE1C,eAAO,MAAM,UAAU,gBAAiB,UAAU,CAAC,eAAe,CAAC,MAAM,CAAC,MAAM,CAAC,sBAqDhF,CAAC"}
1
+ {"version":3,"file":"PersonCard.d.ts","sourceRoot":"","sources":["../../../../src/cards/PersonCard.tsx"],"names":[],"mappings":"AAKA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAInD,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAMvD,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,aAAa,CAAC;AAE1C,eAAO,MAAM,UAAU,gBAAiB,UAAU,CAAC,eAA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O,YAAY,CAAC,MAAM,CAAC,MAAM,CAAC,CAKtE,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,OAAO,YAAY,CAAC,GAAG,CAAC,CAK9D,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,QAAQ,CAAC,OAAO,YAAY,CAAC,MAAM,CAAC,MAAM,CAAC,CAMhE,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,OAAO,YAAY,CAAC,MAAM,CAAC,MAAM,CAAC,CAKvE,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,OAAO,YAAY,CAAC,YAAY,CAAC,YAAY,CAAC,CAMlF,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,OAAO,YAAY,CAAC,YAAY,CAAC,YAAY,CAAC,CAKzF,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,QAAQ,CAAC,OAAO,YAAY,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAMtE,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,QAAQ,CAAC,OAAO,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAM1D,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,QAAQ,CAAC,OAAO,YAAY,CAAC,OAAO,CAAC,OAAO,CAAC,CAKnE,CAAC"}
@@ -0,0 +1,48 @@
1
+ import { Obj, Type } from '@dxos/echo';
2
+ import { Expando } from '@dxos/schema';
3
+ import { Organization, Person, Pipeline, Task } from '@dxos/types';
4
+ export declare const omitImage: ({ image: _, ...rest }: any) => any;
5
+ /**
6
+ * Factory functions for creating test objects at render time.
7
+ */
8
+ export declare const createOrganization: () => Organization.Organization;
9
+ export declare const createPerson: () => Person.Person;
10
+ export declare const createProject: () => Pipeline.Pipeline;
11
+ export declare const createTask: () => Task.Task;
12
+ /**
13
+ * Plain object cast as `Obj.Any` — has no schema, typename, or database, so cards
14
+ * like `FormCard` fall through to their empty/unsupported state. Use to story-pin
15
+ * fallback rendering.
16
+ */
17
+ export declare const createUnknown: () => Obj.Any;
18
+ /**
19
+ * Typed object with no user-facing values (only `id`). All Person fields are
20
+ * optional, so `Obj.make(Person, {})` is valid and triggers the FormCard
21
+ * "no values" branch in readonly mode.
22
+ */
23
+ export declare const createPersonEmpty: () => Person.Person;
24
+ /**
25
+ * Mock of the `Table` schema (org.dxos.type.table): an optional `name` plus
26
+ * `view` and `sizes` fields annotated with `FormInputAnnotation.set(false)`.
27
+ * When constructed without a `name`, no form-renderable field has a value so
28
+ * FormCard should fall through to its empty state — even though
29
+ * `Object.keys(subject)` includes `view`/`sizes`.
30
+ */
31
+ declare const TableLike: Type.ObjClass<unknown, {
32
+ readonly name?: string | undefined;
33
+ readonly view: string;
34
+ readonly sizes: {
35
+ [x: string]: number;
36
+ };
37
+ }, {}>;
38
+ type TableLike = Type.InstanceType<typeof TableLike>;
39
+ /**
40
+ * Table-like object with values only in form-hidden fields (`view`, `sizes`).
41
+ * `Object.keys` includes them, but a naive `hasValues` check would
42
+ * misclassify this as having data. FormCard must consult the schema's
43
+ * form-input annotations to correctly fall through to the empty state.
44
+ */
45
+ export declare const createTableEmpty: () => TableLike;
46
+ export declare const createExpando: () => Expando.Expando;
47
+ export {};
48
+ //# sourceMappingURL=fixtures.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fixtures.d.ts","sourceRoot":"","sources":["../../../../src/stories/fixtures.ts"],"names":[],"mappings":"AAMA,OAAO,EAAO,GAAG,EAAO,IAAI,EAAE,MAAM,YAAY,CAAC;AAGjD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAKnE,eAAO,MAAM,SAAS,0BAA2B,GAAG,QAAS,CAAC;AAE9D;;GAEG;AACH,eAAO,MAAM,kBAAkB,QAAO,YAAY,CAAC,YAQlD,CAAC;AAEF,eAAO,MAAM,YAAY,QAAO,MAAM,CAAC,MAatC,CAAC;AAEF,eAAO,MAAM,aAAa,QAAO,QAAQ,CAAC,QAOzC,CAAC;AAEF,eAAO,MAAM,UAAU,QAAO,IAAI,CAAC,IAKlC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,aAAa,QAAO,GAAG,CAAC,GAAiC,CAAC;AAEvE;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,QAAO,MAAM,CAAC,MAAqC,CAAC;AAElF;;;;;;GAMG;AACH,QAAA,MAAM,SAAS;;;;;;MAOuD,CAAC;AACvE,KAAK,SAAS,GAAG,IAAI,CAAC,YAAY,CAAC,OAAO,SAAS,CAAC,CAAC;AAErD;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,QAAO,SACiE,CAAC;AAEtG,eAAO,MAAM,aAAa,QAAO,OAAO,CAAC,OAOxC,CAAC"}
@@ -1,8 +1,6 @@
1
1
  import React, { type FC } from 'react';
2
2
  import { type AppSurface } from '@dxos/app-toolkit/ui';
3
- import { Obj, Type } from '@dxos/echo';
4
- import { Expando } from '@dxos/schema';
5
- import { Organization, Person, Pipeline, Task } from '@dxos/types';
3
+ import { Obj } from '@dxos/echo';
6
4
  export type StoryArgs<T extends Obj.Any, P extends {} = {}> = {
7
5
  Component: FC<AppSurface.ObjectCardProps<T> & P>;
8
6
  createObject: () => T;
@@ -11,48 +9,4 @@ export type StoryArgs<T extends Obj.Any, P extends {} = {}> = {
11
9
  componentProps?: P;
12
10
  };
13
11
  export declare const DefaultStory: <T extends Obj.Any, P extends {} = {}>({ Component, createObject, image, json, componentProps, }: StoryArgs<T, P>) => React.JSX.Element;
14
- export declare const omitImage: ({ image: _, ...rest }: any) => any;
15
- /**
16
- * Factory functions for creating test objects at render time.
17
- */
18
- export declare const createOrganization: () => Organization.Organization;
19
- export declare const createPerson: () => Person.Person;
20
- export declare const createProject: () => Pipeline.Pipeline;
21
- export declare const createTask: () => Task.Task;
22
- /**
23
- * Plain object cast as `Obj.Any` — has no schema, typename, or database, so cards
24
- * like `FormCard` fall through to their empty/unsupported state. Use to story-pin
25
- * fallback rendering.
26
- */
27
- export declare const createUnknown: () => Obj.Any;
28
- /**
29
- * Typed object with no user-facing values (only `id`). All Person fields are
30
- * optional, so `Obj.make(Person, {})` is valid and triggers the FormCard
31
- * "no values" branch in readonly mode.
32
- */
33
- export declare const createPersonEmpty: () => Person.Person;
34
- /**
35
- * Mock of the `Table` schema (org.dxos.type.table): an optional `name` plus
36
- * `view` and `sizes` fields annotated with `FormInputAnnotation.set(false)`.
37
- * When constructed without a `name`, no form-renderable field has a value so
38
- * FormCard should fall through to its empty state — even though
39
- * `Object.keys(subject)` includes `view`/`sizes`.
40
- */
41
- declare const TableLike: Type.ObjClass<unknown, {
42
- readonly name?: string | undefined;
43
- readonly view: string;
44
- readonly sizes: {
45
- [x: string]: number;
46
- };
47
- }, {}>;
48
- type TableLike = Type.InstanceType<typeof TableLike>;
49
- /**
50
- * Table-like object with values only in form-hidden fields (`view`, `sizes`).
51
- * `Object.keys` includes them, but a naive `hasValues` check would
52
- * misclassify this as having data. FormCard must consult the schema's
53
- * form-input annotations to correctly fall through to the empty state.
54
- */
55
- export declare const createTableEmpty: () => TableLike;
56
- export declare const createExpando: () => Expando.Expando;
57
- export {};
58
12
  //# sourceMappingURL=testing.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"testing.d.ts","sourceRoot":"","sources":["../../../../src/stories/testing.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,EAAE,KAAK,EAAE,EAAW,MAAM,OAAO,CAAC;AAEhD,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAO,GAAG,EAAO,IAAI,EAAE,MAAM,YAAY,CAAC;AAKjD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,MAA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