@dxos/plugin-preview 0.8.4-main.fcfe5033a5 → 0.8.4-staging.60fe92afc8

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 (91) 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/neutral/chunk-QOM5APM7.mjs +23 -0
  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/neutral/preview-popover-FLMYMFCH.mjs +94 -0
  22. package/dist/lib/neutral/preview-popover-FLMYMFCH.mjs.map +7 -0
  23. package/dist/lib/neutral/react-surface-FE7E2JP7.mjs +418 -0
  24. package/dist/lib/neutral/react-surface-FE7E2JP7.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/preview-popover.d.ts.map +1 -1
  38. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  39. package/dist/types/src/cards/ExpandoCard.d.ts +4 -0
  40. package/dist/types/src/cards/ExpandoCard.d.ts.map +1 -0
  41. package/dist/types/src/cards/FormCard.d.ts +12 -2
  42. package/dist/types/src/cards/FormCard.d.ts.map +1 -1
  43. package/dist/types/src/cards/JsonCard.d.ts.map +1 -1
  44. package/dist/types/src/cards/OrganizationCard.d.ts.map +1 -1
  45. package/dist/types/src/cards/PersonCard.d.ts.map +1 -1
  46. package/dist/types/src/cards/ProjectCard.d.ts.map +1 -1
  47. package/dist/types/src/cards/TaskCard.d.ts.map +1 -1
  48. package/dist/types/src/cards/index.d.ts +1 -0
  49. package/dist/types/src/cards/index.d.ts.map +1 -1
  50. package/dist/types/src/index.d.ts +0 -1
  51. package/dist/types/src/index.d.ts.map +1 -1
  52. package/dist/types/src/meta.d.ts +1 -1
  53. package/dist/types/src/meta.d.ts.map +1 -1
  54. package/dist/types/src/plugin.d.ts +3 -0
  55. package/dist/types/src/plugin.d.ts.map +1 -0
  56. package/dist/types/src/stories/Card.stories.d.ts +31 -9
  57. package/dist/types/src/stories/Card.stories.d.ts.map +1 -1
  58. package/dist/types/src/stories/testing.d.ts +43 -4
  59. package/dist/types/src/stories/testing.d.ts.map +1 -1
  60. package/dist/types/src/testing.d.ts +2 -0
  61. package/dist/types/src/testing.d.ts.map +1 -0
  62. package/dist/types/src/translations.d.ts +8 -9
  63. package/dist/types/src/translations.d.ts.map +1 -1
  64. package/dist/types/tsconfig.tsbuildinfo +1 -1
  65. package/package.json +70 -44
  66. package/src/PreviewPlugin.node.ts +16 -0
  67. package/src/PreviewPlugin.test.ts +25 -0
  68. package/src/PreviewPlugin.tsx +4 -3
  69. package/src/PreviewPlugin.workerd.ts +16 -0
  70. package/src/capabilities/preview-popover.ts +34 -6
  71. package/src/capabilities/react-surface.tsx +59 -18
  72. package/src/cards/ExpandoCard.tsx +76 -0
  73. package/src/cards/FormCard.tsx +102 -25
  74. package/src/cards/JsonCard.tsx +7 -4
  75. package/src/cards/OrganizationCard.tsx +2 -2
  76. package/src/cards/PersonCard.tsx +4 -4
  77. package/src/cards/ProjectCard.tsx +2 -2
  78. package/src/cards/TaskCard.tsx +4 -3
  79. package/src/cards/index.ts +1 -0
  80. package/src/index.ts +0 -2
  81. package/src/meta.ts +7 -4
  82. package/src/plugin.ts +9 -0
  83. package/src/stories/Card.stories.tsx +76 -6
  84. package/src/stories/testing.tsx +69 -7
  85. package/src/testing.ts +7 -0
  86. package/dist/lib/browser/index.mjs +0 -59
  87. package/dist/lib/browser/index.mjs.map +0 -7
  88. package/dist/lib/browser/meta.json +0 -1
  89. package/dist/lib/node-esm/index.mjs +0 -61
  90. package/dist/lib/node-esm/index.mjs.map +0 -7
  91. package/dist/lib/node-esm/meta.json +0 -1
@@ -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,GAAI,aAAa,UAAU,CAAC,eAAe,CAAC,MAAM,CAAC,MAAM,CAAC,sBAgDhF,CAAC"}
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,sBAgDhF,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ProjectCard.d.ts","sourceRoot":"","sources":["../../../../src/cards/ProjectCard.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAGvD,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE5C,eAAO,MAAM,WAAW,GAAI,aAAa,UAAU,CAAC,eAAe,CAAC,QAAQ,CAAC,QAAQ,CAAC,sBAUrF,CAAC"}
1
+ {"version":3,"file":"ProjectCard.d.ts","sourceRoot":"","sources":["../../../../src/cards/ProjectCard.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAGvD,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE5C,eAAO,MAAM,WAAW,gBAAiB,UAAU,CAAC,eAAe,CAAC,QAAQ,CAAC,QAAQ,CAAC,sBAUrF,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"TaskCard.d.ts","sourceRoot":"","sources":["../../../../src/cards/TaskCard.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAGvD,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAEnC,eAAO,MAAM,QAAQ,GAAI,aAAa,UAAU,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,sBAiB1E,CAAC"}
1
+ {"version":3,"file":"TaskCard.d.ts","sourceRoot":"","sources":["../../../../src/cards/TaskCard.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAIvD,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAEnC,eAAO,MAAM,QAAQ,gBAAiB,UAAU,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,sBAiB1E,CAAC"}
@@ -1,3 +1,4 @@
1
+ export * from './ExpandoCard';
1
2
  export * from './FormCard';
2
3
  export * from './JsonCard';
3
4
  export * from './OrganizationCard';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/cards/index.ts"],"names":[],"mappings":"AAIA,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/cards/index.ts"],"names":[],"mappings":"AAIA,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC"}
@@ -1,3 +1,2 @@
1
1
  export * from './meta';
2
- export * from './PreviewPlugin';
3
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAIA,cAAc,QAAQ,CAAC;AAEvB,cAAc,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAIA,cAAc,QAAQ,CAAC"}
@@ -1,3 +1,3 @@
1
- import { type Plugin } from '@dxos/app-framework';
1
+ import { Plugin } from '@dxos/app-framework';
2
2
  export declare const meta: Plugin.Meta;
3
3
  //# sourceMappingURL=meta.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/meta.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAGlD,eAAO,MAAM,IAAI,EAAE,MAAM,CAAC,IASzB,CAAC"}
1
+ {"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/meta.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAI7C,eAAO,MAAM,IAAI,aAWf,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Plugin } from '@dxos/app-framework';
2
+ export declare const PreviewPlugin: Plugin.PluginFactory<void>;
3
+ //# sourceMappingURL=plugin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../src/plugin.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAI7C,eAAO,MAAM,aAAa,4BAA6C,CAAC"}
@@ -1,23 +1,24 @@
1
1
  import { type StoryObj } from '@storybook/react-vite';
2
2
  import React from 'react';
3
+ import { type Expando } from '@dxos/schema';
3
4
  import { type Organization, type Person, type Pipeline, type Task } from '@dxos/types';
4
5
  import { DefaultStory } from './testing';
5
6
  declare const meta: {
6
7
  title: string;
7
- render: <T extends import("@dxos/echo/Obj").Any>({ Component, createObject, image }: import("./testing").DefaultStoryProps<T>) => React.JSX.Element;
8
+ render: <T extends import("@dxos/echo/Obj").Any, P extends {} = {}>({ Component, createObject, image, componentProps, }: import("./testing").DefaultStoryProps<T, P>) => React.JSX.Element;
8
9
  decorators: import("@storybook/react").Decorator[];
9
10
  parameters: {
10
11
  layout: string;
11
12
  translations: [{
12
13
  readonly 'en-US': {
13
- readonly [meta.id]: {
14
- readonly 'unable-to-create-preview.message': "No preview";
15
- readonly 'todo.label': "To do";
16
- readonly 'in-progress.label': "In progress";
17
- readonly 'done.label': "Done";
18
- readonly 'open-object.label': "Open";
19
- readonly 'add-object-to-space.label': "Add to space";
20
- readonly 'more-options.label': "More options";
14
+ readonly [x: string]: {
15
+ readonly 'unable-to-create-preview.message': 'No preview';
16
+ readonly 'todo.label': 'To do';
17
+ readonly 'in-progress.label': 'In progress';
18
+ readonly 'done.label': 'Done';
19
+ readonly 'open-object.label': 'Open';
20
+ readonly 'add-object-to-space.label': 'Add to space';
21
+ readonly 'more-options.label': 'More options';
21
22
  };
22
23
  };
23
24
  }];
@@ -26,10 +27,31 @@ declare const meta: {
26
27
  };
27
28
  export default meta;
28
29
  export declare const _Form: StoryObj<typeof DefaultStory<Person.Person>>;
30
+ export declare const _FormEditable: StoryObj<typeof DefaultStory<Person.Person>>;
31
+ /**
32
+ * Empty-state variant: the subject has no resolvable schema so `FormCard` renders
33
+ * `<Card.Body><Card.Row><Card.Text variant='description'>No preview</Card.Text></Card.Row></Card.Body>`.
34
+ * Use this story to verify the empty message lands in the card's center column.
35
+ */
36
+ export declare const _FormEmpty: StoryObj<typeof DefaultStory>;
37
+ /**
38
+ * No-values variant: the subject has a valid schema (Person) but no populated
39
+ * fields, so `FormCard` falls through to the same empty state instead of
40
+ * rendering an empty scrollarea.
41
+ */
42
+ export declare const _FormNoValues: StoryObj<typeof DefaultStory<Person.Person>>;
43
+ /**
44
+ * Table-like variant: the subject has values only in form-hidden fields
45
+ * (`view`, `sizes` annotated `FormInputAnnotation.set(false)`). `FormCard`
46
+ * must consult the schema's form-input annotations — not just `Object.keys` —
47
+ * to recognize this case and fall through to the empty state.
48
+ */
49
+ export declare const _FormTableEmpty: StoryObj<typeof DefaultStory<any>>;
29
50
  export declare const _Person: StoryObj<typeof DefaultStory<Person.Person>>;
30
51
  export declare const _Organization: StoryObj<typeof DefaultStory<Organization.Organization>>;
31
52
  export declare const _Project: StoryObj<typeof DefaultStory<Pipeline.Pipeline>>;
32
53
  export declare const _Task: StoryObj<typeof DefaultStory<Task.Task>>;
54
+ export declare const _Expando: StoryObj<typeof DefaultStory<Expando.Expando>>;
33
55
  export declare const _Json: {
34
56
  render: () => React.JSX.Element;
35
57
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Card.stories.d.ts","sourceRoot":"","sources":["../../../../src/stories/Card.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,MAAM,EAAE,KAAK,QAAQ,EAAE,KAAK,IAAI,EAAE,MAAM,aAAa,CAAC;AAIvF,OAAO,EAAE,YAAY,EAA+D,MAAM,WAAW,CAAC;AAItG,QAAA,MAAM,IAAI;;;;;;;;yBAbwB,CAAQ,IAAI,CAAC,EAAE,CAAC;;;;;;;;;;;;;CA0Bb,CAAC;AAEtC,eAAe,IAAI,CAAC;AAEpB,eAAO,MAAM,KAAK,EAAE,QAAQ,CAAC,OAAO,YAAY,CAAC,MAAM,CAAC,MAAM,CAAC,CAM9D,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,QAAQ,CAAC,OAAO,YAAY,CAAC,MAAM,CAAC,MAAM,CAAC,CAMhE,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,OAAO,YAAY,CAAC,YAAY,CAAC,YAAY,CAAC,CAMlF,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,QAAQ,CAAC,OAAO,YAAY,CAAC,QAAQ,CAAC,QAAQ,CAAC,C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aAAa,EAAE,QAAQ,CAAC,OAAO,YAAY,CAAC,YAAY,CAAC,YAAY,CAAC,CAMlF,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,QAAQ,CAAC,OAAO,YAAY,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAMrE,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;AAEF,eAAO,MAAM,KAAK;IAChB,MAAM;CA4BP,CAAC"}
@@ -1,13 +1,16 @@
1
+ import * as Schema from 'effect/Schema';
1
2
  import React, { type FC } from 'react';
2
3
  import { type AppSurface } from '@dxos/app-toolkit/ui';
3
- import { Obj } from '@dxos/echo';
4
+ import { Obj, Type } from '@dxos/echo';
5
+ import { Expando } from '@dxos/schema';
4
6
  import { Organization, Person, Pipeline, Task } from '@dxos/types';
5
- export type DefaultStoryProps<T extends Obj.Any> = {
6
- Component: FC<AppSurface.ObjectCardProps<T>>;
7
+ export type DefaultStoryProps<T extends Obj.Any, P extends {} = {}> = {
8
+ Component: FC<AppSurface.ObjectCardProps<T> & P>;
7
9
  createObject: () => T;
8
10
  image?: boolean;
11
+ componentProps?: P;
9
12
  };
10
- export declare const DefaultStory: <T extends Obj.Any>({ Component, createObject, image }: DefaultStoryProps<T>) => React.JSX.Element;
13
+ export declare const DefaultStory: <T extends Obj.Any, P extends {} = {}>({ Component, createObject, image, componentProps, }: DefaultStoryProps<T, P>) => React.JSX.Element;
11
14
  export declare const omitImage: ({ image: _, ...rest }: any) => any;
12
15
  /**
13
16
  * Factory functions for creating test objects at render time.
@@ -16,4 +19,40 @@ export declare const createOrganization: () => Organization.Organization;
16
19
  export declare const createPerson: () => Person.Person;
17
20
  export declare const createProject: () => Pipeline.Pipeline;
18
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.Obj<{
42
+ readonly name?: string | undefined;
43
+ readonly view: string;
44
+ readonly sizes: {
45
+ [x: string]: number;
46
+ };
47
+ }, Schema.Struct.Fields>;
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 {};
19
58
  //# sourceMappingURL=testing.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"testing.d.ts","sourceRoot":"","sources":["../../../../src/stories/testing.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EAAE,KAAK,EAAE,EAAW,MAAM,OAAO,CAAC;AAEhD,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,GAAG,EAAO,MAAM,YAAY,CAAC;AAItC,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,E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AE,CAAC,UAAU,CAAC,eAAe,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IACjD,YAAY,EAAE,MAAM,CAAC,CAAC;IACtB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,cAAc,CAAC,EAAE,CAAC,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,CAAC,SAAS,GAAG,CAAC,GAAG,EAAE,CAAC,SAAS,EAAE,GAAG,EAAE,uDAK9D,iBAAiB,CAAC,CAAC,EAAE,CAAC,CAAC,sBA6BzB,CAAC;AAEF,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;;;;;;wBAOuD,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"}
@@ -0,0 +1,2 @@
1
+ export * from './PreviewPlugin';
2
+ //# sourceMappingURL=testing.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"testing.d.ts","sourceRoot":"","sources":["../../../src/testing.ts"],"names":[],"mappings":"AAMA,cAAc,iBAAiB,CAAC"}
@@ -1,14 +1,13 @@
1
- import { meta } from '#meta';
2
1
  export declare const translations: [{
3
2
  readonly 'en-US': {
4
- readonly [meta.id]: {
5
- readonly 'unable-to-create-preview.message': "No preview";
6
- readonly 'todo.label': "To do";
7
- readonly 'in-progress.label': "In progress";
8
- readonly 'done.label': "Done";
9
- readonly 'open-object.label': "Open";
10
- readonly 'add-object-to-space.label': "Add to space";
11
- readonly 'more-options.label': "More options";
3
+ readonly [x: string]: {
4
+ readonly 'unable-to-create-preview.message': 'No preview';
5
+ readonly 'todo.label': 'To do';
6
+ readonly 'in-progress.label': 'In progress';
7
+ readonly 'done.label': 'Done';
8
+ readonly 'open-object.label': 'Open';
9
+ readonly 'add-object-to-space.label': 'Add to space';
10
+ readonly 'more-options.label': 'More options';
12
11
  };
13
12
  };
14
13
  }];
@@ -1 +1 @@
1
- {"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/translations.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAE7B,eAAO,MAAM,YAAY;;QAGnB,SAAA,CAAC,IAAI,CAAC,EAAE,CAAC;;;;;;;;UAQR;;EAGwB,CAAC"}
1
+ {"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/translations.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,YAAY;;;yDAImB,YAAY;mCAClC,OAAO;0CACA,aAAa;mCACpB,MAAM;0CACC,MAAM;kDACE,cAAc;2CACrB,cAAc;;;EAIb,CAAC"}