@dxos/plugin-stack 0.7.5-main.499c70c → 0.7.5-main.5ae2ba8

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 (61) hide show
  1. package/dist/lib/browser/{StackMain-HSYQ5B3Y.mjs → StackMain-YP2Z5NZ2.mjs} +31 -30
  2. package/dist/lib/browser/StackMain-YP2Z5NZ2.mjs.map +7 -0
  3. package/dist/lib/browser/{chunk-DS5KGEJG.mjs → chunk-WTGFKPPQ.mjs} +3 -3
  4. package/dist/lib/browser/chunk-WTGFKPPQ.mjs.map +7 -0
  5. package/dist/lib/browser/index.mjs +78 -100
  6. package/dist/lib/browser/index.mjs.map +4 -4
  7. package/dist/lib/browser/meta.json +1 -1
  8. package/dist/lib/node/{StackMain-AWN5MFZK.cjs → StackMain-YQ2JF6QE.cjs} +36 -35
  9. package/dist/lib/node/StackMain-YQ2JF6QE.cjs.map +7 -0
  10. package/dist/lib/node/{chunk-PA5PRDM6.cjs → chunk-CZCFFT2J.cjs} +7 -7
  11. package/dist/lib/node/chunk-CZCFFT2J.cjs.map +7 -0
  12. package/dist/lib/node/index.cjs +79 -97
  13. package/dist/lib/node/index.cjs.map +4 -4
  14. package/dist/lib/node/meta.json +1 -1
  15. package/dist/lib/node-esm/{StackMain-EFCZCMIJ.mjs → StackMain-43BFBESK.mjs} +31 -30
  16. package/dist/lib/node-esm/StackMain-43BFBESK.mjs.map +7 -0
  17. package/dist/lib/node-esm/{chunk-JEQMG2E2.mjs → chunk-SJU6TPRI.mjs} +3 -3
  18. package/dist/lib/node-esm/chunk-SJU6TPRI.mjs.map +7 -0
  19. package/dist/lib/node-esm/index.mjs +78 -100
  20. package/dist/lib/node-esm/index.mjs.map +4 -4
  21. package/dist/lib/node-esm/meta.json +1 -1
  22. package/dist/types/src/StackPlugin.d.ts +1 -3
  23. package/dist/types/src/StackPlugin.d.ts.map +1 -1
  24. package/dist/types/src/components/CaretDownUp.d.ts +2 -2
  25. package/dist/types/src/components/CaretDownUp.d.ts.map +1 -1
  26. package/dist/types/src/components/StackMain.d.ts +1 -2
  27. package/dist/types/src/components/StackMain.d.ts.map +1 -1
  28. package/dist/types/src/components/StackSection.d.ts +1 -2
  29. package/dist/types/src/components/StackSection.d.ts.map +1 -1
  30. package/dist/types/src/components/StackSettings.d.ts +1 -2
  31. package/dist/types/src/components/StackSettings.d.ts.map +1 -1
  32. package/dist/types/src/components/index.d.ts +2 -2
  33. package/dist/types/src/components/index.d.ts.map +1 -1
  34. package/dist/types/src/index.d.ts +1 -3
  35. package/dist/types/src/index.d.ts.map +1 -1
  36. package/dist/types/src/meta.d.ts +1 -2
  37. package/dist/types/src/meta.d.ts.map +1 -1
  38. package/dist/types/src/types/stack.d.ts +2 -2
  39. package/dist/types/src/types/types.d.ts +0 -3
  40. package/dist/types/src/types/types.d.ts.map +1 -1
  41. package/dist/types/tsconfig.tsbuildinfo +1 -1
  42. package/package.json +24 -33
  43. package/src/StackPlugin.tsx +39 -38
  44. package/src/components/StackMain.tsx +24 -19
  45. package/src/components/StackSection.tsx +1 -1
  46. package/src/components/StackSettings.tsx +3 -3
  47. package/src/index.ts +1 -6
  48. package/src/meta.ts +1 -1
  49. package/src/types/types.ts +0 -13
  50. package/dist/lib/browser/StackMain-HSYQ5B3Y.mjs.map +0 -7
  51. package/dist/lib/browser/chunk-DS5KGEJG.mjs.map +0 -7
  52. package/dist/lib/browser/meta.mjs +0 -11
  53. package/dist/lib/browser/meta.mjs.map +0 -7
  54. package/dist/lib/node/StackMain-AWN5MFZK.cjs.map +0 -7
  55. package/dist/lib/node/chunk-PA5PRDM6.cjs.map +0 -7
  56. package/dist/lib/node/meta.cjs +0 -32
  57. package/dist/lib/node/meta.cjs.map +0 -7
  58. package/dist/lib/node-esm/StackMain-EFCZCMIJ.mjs.map +0 -7
  59. package/dist/lib/node-esm/chunk-JEQMG2E2.mjs.map +0 -7
  60. package/dist/lib/node-esm/meta.mjs +0 -12
  61. package/dist/lib/node-esm/meta.mjs.map +0 -7
@@ -1 +1 @@
1
- {"version":3,"file":"StackMain.d.ts","sourceRoot":"","sources":["../../../../src/components/StackMain.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAoD,MAAM,OAAO,CAAC;AAazE,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAkB/D,KAAK,cAAc,GAAG;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,cAAc,CAAC;CAC5B,CAAC;AAEF,QAAA,MAAM,SAAS,uBAAwB,cAAc,sBA2GpD,CAAC;AAEF,eAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"StackMain.d.ts","sourceRoot":"","sources":["../../../../src/components/StackMain.tsx"],"names":[],"mappings":"AAiBA,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAkB/D,KAAK,cAAc,GAAG;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,cAAc,CAAC;CAC5B,CAAC;AAEF,QAAA,MAAM,SAAS,uBAAwB,cAAc,4CAiHpD,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import { type StackSectionItem } from '../types';
3
- export declare const StackSection: ({ id, view, object, metadata: { icon }, }: StackSectionItem) => React.JSX.Element;
2
+ export declare const StackSection: ({ id, view, object, metadata: { icon }, }: StackSectionItem) => import("react/jsx-runtime").JSX.Element;
4
3
  //# sourceMappingURL=StackSection.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"StackSection.d.ts","sourceRoot":"","sources":["../../../../src/components/StackSection.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAWxC,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAIjD,eAAO,MAAM,YAAY,8CAKtB,gBAAgB,sBA0FlB,CAAC"}
1
+ {"version":3,"file":"StackSection.d.ts","sourceRoot":"","sources":["../../../../src/components/StackSection.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAIjD,eAAO,MAAM,YAAY,8CAKtB,gBAAgB,4CA0FlB,CAAC"}
@@ -1,6 +1,5 @@
1
- import React from 'react';
2
1
  import { type StackSettingsProps } from '../types';
3
2
  export declare const StackSettings: ({ settings }: {
4
3
  settings: StackSettingsProps;
5
- }) => React.JSX.Element;
4
+ }) => import("react/jsx-runtime").JSX.Element;
6
5
  //# sourceMappingURL=StackSettings.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"StackSettings.d.ts","sourceRoot":"","sources":["../../../../src/components/StackSettings.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAEnD,eAAO,MAAM,aAAa,iBAAkB;IAAE,QAAQ,EAAE,kBAAkB,CAAA;CAAE,sBAU3E,CAAC"}
1
+ {"version":3,"file":"StackSettings.d.ts","sourceRoot":"","sources":["../../../../src/components/StackSettings.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAEnD,eAAO,MAAM,aAAa,iBAAkB;IAAE,QAAQ,EAAE,kBAAkB,CAAA;CAAE,4CAU3E,CAAC"}
@@ -1,6 +1,6 @@
1
1
  export declare const StackMain: import("react").LazyExoticComponent<({ id, collection }: {
2
2
  id: string;
3
- collection: import("packages/plugins/plugin-space/dist/types/src").CollectionType;
4
- }) => import("react").JSX.Element>;
3
+ collection: import("@dxos/plugin-space/types").CollectionType;
4
+ }) => import("react/jsx-runtime").JSX.Element>;
5
5
  export * from './StackSettings';
6
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,SAAS;;;kCAAoC,CAAC;AAE3D,cAAc,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,SAAS;;;8CAAoC,CAAC;AAE3D,cAAc,iBAAiB,CAAC"}
@@ -1,5 +1,3 @@
1
- import { StackPlugin } from './StackPlugin';
2
- export default StackPlugin;
3
- export * from './types';
1
+ export * from './meta';
4
2
  export * from './StackPlugin';
5
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,eAAe,WAAW,CAAC;AAE3B,cAAc,SAAS,CAAC;AAExB,cAAc,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAIA,cAAc,QAAQ,CAAC;AACvB,cAAc,eAAe,CAAC"}
@@ -1,11 +1,10 @@
1
1
  export declare const STACK_PLUGIN = "dxos.org/plugin/stack";
2
2
  export declare const SECTION_IDENTIFIER = "dxos.org/type/StackSection";
3
- declare const _default: {
3
+ export declare const meta: {
4
4
  id: string;
5
5
  name: string;
6
6
  description: string;
7
7
  icon: string;
8
8
  source: string;
9
9
  };
10
- export default _default;
11
10
  //# sourceMappingURL=meta.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/meta.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,YAAY,0BAA0B,CAAC;AACpD,eAAO,MAAM,kBAAkB,+BAA+B,CAAC;;;;;;;;AAE/D,wBAQuB"}
1
+ {"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/meta.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,YAAY,0BAA0B,CAAC;AACpD,eAAO,MAAM,kBAAkB,+BAA+B,CAAC;AAE/D,eAAO,MAAM,IAAI;;;;;;CAQK,CAAC"}
@@ -3,12 +3,12 @@ export declare const SectionSchema: S.Struct<{
3
3
  height: S.optional<typeof S.Number>;
4
4
  custom: S.optional<S.Record$<typeof S.String, typeof S.Any>>;
5
5
  }>;
6
- declare const StackViewType_base: import("@dxos/echo-schema").TypedObjectPrototype<import("packages/core/echo/echo-schema/dist/types/src/object/common").TypedObjectFields<{
6
+ declare const StackViewType_base: import("@dxos/echo-schema").TypedObjectPrototype<import("@dxos/echo-schema").TypedObjectFields<{
7
7
  sections: S.mutable<S.Record$<typeof S.String, S.Struct<{
8
8
  height: S.optional<typeof S.Number>;
9
9
  custom: S.optional<S.Record$<typeof S.String, typeof S.Any>>;
10
10
  }>>>;
11
- }, import("packages/core/echo/echo-schema/dist/types/src/object/common").TypedObjectOptions>, S.Struct.Encoded<{
11
+ }, import("@dxos/echo-schema").TypedObjectOptions>, S.Struct.Encoded<{
12
12
  sections: S.mutable<S.Record$<typeof S.String, S.Struct<{
13
13
  height: S.optional<typeof S.Number>;
14
14
  custom: S.optional<S.Record$<typeof S.String, typeof S.Any>>;
@@ -1,7 +1,5 @@
1
1
  import { type IconProps } from '@phosphor-icons/react';
2
2
  import { type FC } from 'react';
3
- import type { MetadataRecordsProvides, SettingsProvides, SurfaceProvides, TranslationsProvides } from '@dxos/app-framework';
4
- import { type SchemaProvides } from '@dxos/plugin-space';
5
3
  import { type CollectionType } from '@dxos/plugin-space/types';
6
4
  import { type ReactiveEchoObject } from '@dxos/react-client/echo';
7
5
  import { type Label } from '@dxos/react-ui';
@@ -41,6 +39,5 @@ export type StackSectionItem = {
41
39
  export type StackSettingsProps = {
42
40
  separation: boolean;
43
41
  };
44
- export type StackPluginProvides = SurfaceProvides & MetadataRecordsProvides & SettingsProvides<StackSettingsProps> & TranslationsProvides & SchemaProvides;
45
42
  export {};
46
43
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../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GED
@@ -1,23 +1,19 @@
1
1
  {
2
2
  "name": "@dxos/plugin-stack",
3
- "version": "0.7.5-main.499c70c",
3
+ "version": "0.7.5-main.5ae2ba8",
4
4
  "description": "DXOS Surface plugin for Stack entities",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
7
7
  "license": "MIT",
8
8
  "author": "DXOS.org",
9
9
  "sideEffects": true,
10
+ "type": "module",
10
11
  "exports": {
11
12
  ".": {
12
13
  "types": "./dist/types/src/index.d.ts",
13
14
  "browser": "./dist/lib/browser/index.mjs",
14
15
  "node": "./dist/lib/node-esm/index.mjs"
15
16
  },
16
- "./meta": {
17
- "types": "./dist/types/src/meta.d.ts",
18
- "browser": "./dist/lib/browser/meta.mjs",
19
- "node": "./dist/lib/node-esm/meta.mjs"
20
- },
21
17
  "./types": {
22
18
  "types": "./dist/types/src/types/index.d.ts",
23
19
  "browser": "./dist/lib/browser/types/index.mjs",
@@ -27,9 +23,6 @@
27
23
  "types": "dist/types/src/index.d.ts",
28
24
  "typesVersions": {
29
25
  "*": {
30
- "meta": [
31
- "dist/types/src/meta.d.ts"
32
- ],
33
26
  "types": [
34
27
  "dist/types/src/types/index.d.ts"
35
28
  ]
@@ -41,28 +34,26 @@
41
34
  ],
42
35
  "dependencies": {
43
36
  "@effect/schema": "^0.75.5",
44
- "@fluentui/react-tabster": "^9.19.0",
37
+ "@fluentui/react-tabster": "9.23.3",
45
38
  "@preact/signals-core": "^1.6.0",
46
- "@radix-ui/react-collapsible": "^1.0.2",
39
+ "@radix-ui/react-collapsible": "1.1.3",
47
40
  "node-fetch": "^2.6.0",
48
41
  "react-is": "~18.2.0",
49
- "@dxos/app-framework": "0.7.5-main.499c70c",
50
- "@dxos/async": "0.7.5-main.499c70c",
51
- "@dxos/invariant": "0.7.5-main.499c70c",
52
- "@dxos/local-storage": "0.7.5-main.499c70c",
53
- "@dxos/echo-schema": "0.7.5-main.499c70c",
54
- "@dxos/client": "0.7.5-main.499c70c",
55
- "@dxos/plugin-client": "0.7.5-main.499c70c",
56
- "@dxos/plugin-graph": "0.7.5-main.499c70c",
57
- "@dxos/plugin-space": "0.7.5-main.499c70c",
58
- "@dxos/plugin-ipfs": "0.7.5-main.499c70c",
59
- "@dxos/react-ui-attention": "0.7.5-main.499c70c",
60
- "@dxos/react-client": "0.7.5-main.499c70c",
61
- "@dxos/react-ui-form": "0.7.5-main.499c70c",
62
- "@dxos/react-ui-mosaic": "0.7.5-main.499c70c",
63
- "@dxos/react-ui-searchlist": "0.7.5-main.499c70c",
64
- "@dxos/util": "0.7.5-main.499c70c",
65
- "@dxos/react-ui-stack": "0.7.5-main.499c70c"
42
+ "@dxos/app-framework": "0.7.5-main.5ae2ba8",
43
+ "@dxos/async": "0.7.5-main.5ae2ba8",
44
+ "@dxos/invariant": "0.7.5-main.5ae2ba8",
45
+ "@dxos/echo-schema": "0.7.5-main.5ae2ba8",
46
+ "@dxos/client": "0.7.5-main.5ae2ba8",
47
+ "@dxos/local-storage": "0.7.5-main.5ae2ba8",
48
+ "@dxos/plugin-graph": "0.7.5-main.5ae2ba8",
49
+ "@dxos/plugin-space": "0.7.5-main.5ae2ba8",
50
+ "@dxos/plugin-client": "0.7.5-main.5ae2ba8",
51
+ "@dxos/react-client": "0.7.5-main.5ae2ba8",
52
+ "@dxos/react-ui-attention": "0.7.5-main.5ae2ba8",
53
+ "@dxos/react-ui-form": "0.7.5-main.5ae2ba8",
54
+ "@dxos/react-ui-searchlist": "0.7.5-main.5ae2ba8",
55
+ "@dxos/react-ui-stack": "0.7.5-main.5ae2ba8",
56
+ "@dxos/util": "0.7.5-main.5ae2ba8"
66
57
  },
67
58
  "devDependencies": {
68
59
  "@babel/core": "^7.18.13",
@@ -72,16 +63,16 @@
72
63
  "react": "~18.2.0",
73
64
  "react-dom": "~18.2.0",
74
65
  "vite": "5.4.7",
75
- "@dxos/react-ui": "0.7.5-main.499c70c",
76
- "@dxos/react-ui-theme": "0.7.5-main.499c70c",
77
- "@dxos/storybook-utils": "0.7.5-main.499c70c"
66
+ "@dxos/react-ui-theme": "0.7.5-main.5ae2ba8",
67
+ "@dxos/storybook-utils": "0.7.5-main.5ae2ba8",
68
+ "@dxos/react-ui": "0.7.5-main.5ae2ba8"
78
69
  },
79
70
  "peerDependencies": {
80
71
  "@phosphor-icons/react": "^2.1.5",
81
72
  "react": "~18.2.0",
82
73
  "react-dom": "~18.2.0",
83
- "@dxos/react-ui": "0.7.5-main.499c70c",
84
- "@dxos/react-ui-theme": "0.7.5-main.499c70c"
74
+ "@dxos/react-ui": "0.7.5-main.5ae2ba8",
75
+ "@dxos/react-ui-theme": "0.7.5-main.5ae2ba8"
85
76
  },
86
77
  "publishConfig": {
87
78
  "access": "public"
@@ -4,34 +4,37 @@
4
4
 
5
5
  import React from 'react';
6
6
 
7
- import { createSurface, type PluginDefinition } from '@dxos/app-framework';
7
+ import { Capabilities, contributes, createSurface, defineModule, definePlugin, Events } from '@dxos/app-framework';
8
8
  import { type ReactiveEchoObject, fullyQualifiedId } from '@dxos/client/echo';
9
- import { LocalStorageStore } from '@dxos/local-storage';
9
+ import { ClientCapabilities, ClientEvents } from '@dxos/plugin-client';
10
10
  import { CollectionType } from '@dxos/plugin-space/types';
11
11
 
12
- import { StackMain, StackSettings } from './components';
13
- import meta, { SECTION_IDENTIFIER, STACK_PLUGIN } from './meta';
12
+ import { StackMain } from './components';
13
+ import { meta, SECTION_IDENTIFIER, STACK_PLUGIN } from './meta';
14
14
  import translations from './translations';
15
15
  import { StackViewType } from './types';
16
- import { type StackPluginProvides, type StackSettingsProps } from './types';
17
16
 
18
- export const StackPlugin = (): PluginDefinition<StackPluginProvides> => {
19
- const settings = new LocalStorageStore<StackSettingsProps>(STACK_PLUGIN, { separation: true });
20
-
21
- return {
22
- meta,
23
- ready: async () => {
24
- settings.prop({ key: 'separation', type: LocalStorageStore.bool() });
25
- },
26
- provides: {
27
- settings: settings.values,
28
- metadata: {
29
- records: {
30
- [StackViewType.typename]: {
17
+ export const StackPlugin = () =>
18
+ definePlugin(meta, [
19
+ defineModule({
20
+ id: `${meta.id}/module/translations`,
21
+ activatesOn: Events.SetupTranslations,
22
+ activate: () => contributes(Capabilities.Translations, translations),
23
+ }),
24
+ defineModule({
25
+ id: `${meta.id}/module/metadata`,
26
+ activatesOn: Events.SetupMetadata,
27
+ activate: () => [
28
+ contributes(Capabilities.Metadata, {
29
+ id: StackViewType.typename,
30
+ metadata: {
31
31
  placeholder: ['stack title placeholder', { ns: STACK_PLUGIN }],
32
32
  icon: 'ph--stack-simple--regular',
33
33
  },
34
- [SECTION_IDENTIFIER]: {
34
+ }),
35
+ contributes(Capabilities.Metadata, {
36
+ id: SECTION_IDENTIFIER,
37
+ metadata: {
35
38
  parse: (section: { object: ReactiveEchoObject<any> }, type: string) => {
36
39
  switch (type) {
37
40
  case 'node':
@@ -44,14 +47,20 @@ export const StackPlugin = (): PluginDefinition<StackPluginProvides> => {
44
47
  }
45
48
  },
46
49
  },
47
- },
48
- },
49
- translations,
50
- echo: {
51
- system: [StackViewType],
52
- },
53
- surface: {
54
- definitions: () => [
50
+ }),
51
+ ],
52
+ }),
53
+ defineModule({
54
+ id: `${meta.id}/module/schema`,
55
+ activatesOn: ClientEvents.SetupSchema,
56
+ activate: () => contributes(ClientCapabilities.Schema, [StackViewType]),
57
+ }),
58
+ defineModule({
59
+ id: `${meta.id}/module/react-surface`,
60
+ activatesOn: Events.SetupReactSurface,
61
+ activate: () =>
62
+ contributes(
63
+ Capabilities.ReactSurface,
55
64
  createSurface({
56
65
  id: `${STACK_PLUGIN}/article`,
57
66
  role: 'article',
@@ -67,14 +76,6 @@ export const StackPlugin = (): PluginDefinition<StackPluginProvides> => {
67
76
  );
68
77
  },
69
78
  }),
70
- createSurface({
71
- id: `${STACK_PLUGIN}/settings`,
72
- role: 'settings',
73
- filter: (data): data is any => data.plugin === meta.id,
74
- component: () => <StackSettings settings={settings.values} />,
75
- }),
76
- ],
77
- },
78
- },
79
- };
80
- };
79
+ ),
80
+ }),
81
+ ]);
@@ -6,21 +6,20 @@ import { Plus } from '@phosphor-icons/react';
6
6
  import React, { useCallback, useEffect, useMemo, useState } from 'react';
7
7
 
8
8
  import {
9
+ Capabilities,
9
10
  createIntent,
10
11
  LayoutAction,
11
- NavigationAction,
12
- parseMetadataResolverPlugin,
12
+ useAppGraph,
13
+ useCapabilities,
13
14
  useIntentDispatcher,
14
- useResolvePlugin,
15
15
  } from '@dxos/app-framework';
16
16
  import { create, getType, fullyQualifiedId, isReactiveObject, makeRef } from '@dxos/client/echo';
17
- import { useGraph } from '@dxos/plugin-graph';
18
- import { SpaceAction } from '@dxos/plugin-space';
17
+ import { SpaceAction } from '@dxos/plugin-space/types';
19
18
  import { type CollectionType } from '@dxos/plugin-space/types';
20
19
  import { Button, toLocalizedString, useTranslation } from '@dxos/react-ui';
21
20
  import { AttentionProvider } from '@dxos/react-ui-attention';
22
21
  import { Stack } from '@dxos/react-ui-stack';
23
- import { nonNullable } from '@dxos/util';
22
+ import { isNonNullable } from '@dxos/util';
24
23
 
25
24
  import { StackContext } from './StackContext';
26
25
  import { StackSection } from './StackSection';
@@ -41,9 +40,9 @@ type StackMainProps = {
41
40
 
42
41
  const StackMain = ({ id, collection }: StackMainProps) => {
43
42
  const { dispatchPromise: dispatch } = useIntentDispatcher();
44
- const { graph } = useGraph();
43
+ const { graph } = useAppGraph();
45
44
  const { t } = useTranslation(STACK_PLUGIN);
46
- const metadataPlugin = useResolvePlugin(parseMetadataResolverPlugin);
45
+ const allMetadata = useCapabilities(Capabilities.Metadata);
47
46
  const defaultStack = useMemo(() => create(StackViewType, { sections: {} }), [collection]);
48
47
  const stack = (collection.views[StackViewType.typename]?.target as StackViewType | undefined) ?? defaultStack;
49
48
  const [collapsedSections, setCollapsedSections] = useState<CollapsedSections>({});
@@ -59,11 +58,10 @@ const StackMain = ({ id, collection }: StackMainProps) => {
59
58
  // TODO(wittjosiah): Should the database handle this differently?
60
59
  // TODO(wittjosiah): Render placeholders for missing objects so they can be removed from the stack?
61
60
  .map((object) => object.target)
62
- .filter(nonNullable)
61
+ .filter(isNonNullable)
63
62
  .map((object) => {
64
- const metadata = metadataPlugin?.provides.metadata.resolver(
65
- getType(object)?.objectId ?? 'never',
66
- ) as StackSectionMetadata;
63
+ const metadata = allMetadata.find((m) => m.id === (getType(object)?.objectId ?? 'never'))
64
+ ?.metadata as StackSectionMetadata;
67
65
  const view = {
68
66
  ...stack.sections[object.id],
69
67
  collapsed: collapsedSections[fullyQualifiedId(object)],
@@ -77,7 +75,7 @@ const StackMain = ({ id, collection }: StackMainProps) => {
77
75
  async (id: string) => {
78
76
  const index = collection.objects
79
77
  .map((object) => object.target)
80
- .filter(nonNullable)
78
+ .filter(isNonNullable)
81
79
  .findIndex((section) => fullyQualifiedId(section) === id);
82
80
  const object = collection.objects[index].target;
83
81
  if (isReactiveObject(object)) {
@@ -93,10 +91,18 @@ const StackMain = ({ id, collection }: StackMainProps) => {
93
91
  const handleAdd = useCallback(
94
92
  async (id: string, position: AddSectionPosition) => {
95
93
  await dispatch?.(
96
- createIntent(LayoutAction.SetLayout, {
97
- element: 'dialog',
98
- component: `${STACK_PLUGIN}/AddSectionDialog`,
99
- subject: { path: id, position, collection },
94
+ // TODO(wittjosiah): Use object creation dialog.
95
+ createIntent(LayoutAction.UpdateDialog, {
96
+ part: 'dialog',
97
+ subject: `${STACK_PLUGIN}/AddSectionDialog`,
98
+ options: {
99
+ blockAlign: 'start',
100
+ props: {
101
+ path: id,
102
+ position,
103
+ collection,
104
+ },
105
+ },
100
106
  }),
101
107
  );
102
108
  },
@@ -105,8 +111,7 @@ const StackMain = ({ id, collection }: StackMainProps) => {
105
111
 
106
112
  const handleNavigate = useCallback(
107
113
  async (id: string) => {
108
- await dispatch(createIntent(NavigationAction.Open, { activeParts: { main: [id] } }));
109
- await dispatch(createIntent(LayoutAction.ScrollIntoView, { id }));
114
+ await dispatch(createIntent(LayoutAction.Open, { part: 'main', subject: [id] }));
110
115
  },
111
116
  [dispatch],
112
117
  );
@@ -107,7 +107,7 @@ export const StackSection = ({
107
107
  </CollapsiblePrimitive.Content>
108
108
  {view.collapsed && (
109
109
  <StackItem.Content toolbar={false} classNames='attention-surface'>
110
- <h2 className={mx('flex items-center p-4 font-medium is-full', textBlockWidth)}>{view.title}</h2>
110
+ <h2 className={mx('flex items-center p-4 font-medium', textBlockWidth)}>{view.title}</h2>
111
111
  </StackItem.Content>
112
112
  )}
113
113
  </StackItem.Root>
@@ -5,7 +5,7 @@
5
5
  import React from 'react';
6
6
 
7
7
  import { Input, useTranslation } from '@dxos/react-ui';
8
- import { DeprecatedFormInput } from '@dxos/react-ui-form';
8
+ import { DeprecatedFormContainer, DeprecatedFormInput } from '@dxos/react-ui-form';
9
9
 
10
10
  import { STACK_PLUGIN } from '../meta';
11
11
  import { type StackSettingsProps } from '../types';
@@ -14,10 +14,10 @@ export const StackSettings = ({ settings }: { settings: StackSettingsProps }) =>
14
14
  const { t } = useTranslation(STACK_PLUGIN);
15
15
 
16
16
  return (
17
- <>
17
+ <DeprecatedFormContainer>
18
18
  <DeprecatedFormInput label={t('settings separation label')}>
19
19
  <Input.Switch checked={settings.separation} onCheckedChange={(checked) => (settings.separation = !!checked)} />
20
20
  </DeprecatedFormInput>
21
- </>
21
+ </DeprecatedFormContainer>
22
22
  );
23
23
  };
package/src/index.ts CHANGED
@@ -2,10 +2,5 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- import { StackPlugin } from './StackPlugin';
6
-
7
- export default StackPlugin;
8
-
9
- export * from './types';
10
-
5
+ export * from './meta';
11
6
  export * from './StackPlugin';
package/src/meta.ts CHANGED
@@ -7,7 +7,7 @@ import { type PluginMeta } from '@dxos/app-framework';
7
7
  export const STACK_PLUGIN = 'dxos.org/plugin/stack';
8
8
  export const SECTION_IDENTIFIER = 'dxos.org/type/StackSection';
9
9
 
10
- export default {
10
+ export const meta = {
11
11
  id: STACK_PLUGIN,
12
12
  // TODO(wittjosiah): Prevents "stacks" language from being exposed to users in settings panel.
13
13
  // Conside renaming this to the collection plugin and trying to factor more collections logic from the space plugin.
@@ -5,13 +5,6 @@
5
5
  import { type IconProps } from '@phosphor-icons/react';
6
6
  import { type FC } from 'react';
7
7
 
8
- import type {
9
- MetadataRecordsProvides,
10
- SettingsProvides,
11
- SurfaceProvides,
12
- TranslationsProvides,
13
- } from '@dxos/app-framework';
14
- import { type SchemaProvides } from '@dxos/plugin-space';
15
8
  import { type CollectionType } from '@dxos/plugin-space/types';
16
9
  import { type ReactiveEchoObject } from '@dxos/react-client/echo';
17
10
  import { type Label } from '@dxos/react-ui';
@@ -53,9 +46,3 @@ export type StackSectionItem = {
53
46
  };
54
47
 
55
48
  export type StackSettingsProps = { separation: boolean };
56
-
57
- export type StackPluginProvides = SurfaceProvides &
58
- MetadataRecordsProvides &
59
- SettingsProvides<StackSettingsProps> &
60
- TranslationsProvides &
61
- SchemaProvides;
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/components/StackMain.tsx", "../../../src/components/StackContext.tsx", "../../../src/components/StackSection.tsx", "../../../src/components/CaretDownUp.tsx"],
4
- "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Plus } from '@phosphor-icons/react';\nimport React, { useCallback, useEffect, useMemo, useState } from 'react';\n\nimport {\n createIntent,\n LayoutAction,\n NavigationAction,\n parseMetadataResolverPlugin,\n useIntentDispatcher,\n useResolvePlugin,\n} from '@dxos/app-framework';\nimport { create, getType, fullyQualifiedId, isReactiveObject, makeRef } from '@dxos/client/echo';\nimport { useGraph } from '@dxos/plugin-graph';\nimport { SpaceAction } from '@dxos/plugin-space';\nimport { type CollectionType } from '@dxos/plugin-space/types';\nimport { Button, toLocalizedString, useTranslation } from '@dxos/react-ui';\nimport { AttentionProvider } from '@dxos/react-ui-attention';\nimport { Stack } from '@dxos/react-ui-stack';\nimport { nonNullable } from '@dxos/util';\n\nimport { StackContext } from './StackContext';\nimport { StackSection } from './StackSection';\nimport { STACK_PLUGIN } from '../meta';\nimport {\n StackViewType,\n type CollapsedSections,\n type StackSectionMetadata,\n type StackSectionView,\n type StackSectionItem,\n type AddSectionPosition,\n} from '../types';\n\ntype StackMainProps = {\n id: string;\n collection: CollectionType;\n};\n\nconst StackMain = ({ id, collection }: StackMainProps) => {\n const { dispatchPromise: dispatch } = useIntentDispatcher();\n const { graph } = useGraph();\n const { t } = useTranslation(STACK_PLUGIN);\n const metadataPlugin = useResolvePlugin(parseMetadataResolverPlugin);\n const defaultStack = useMemo(() => create(StackViewType, { sections: {} }), [collection]);\n const stack = (collection.views[StackViewType.typename]?.target as StackViewType | undefined) ?? defaultStack;\n const [collapsedSections, setCollapsedSections] = useState<CollapsedSections>({});\n\n useEffect(() => {\n if (!collection.views[StackViewType.typename]) {\n collection.views[StackViewType.typename] = makeRef(stack);\n }\n }, [collection, stack]);\n\n const items =\n collection.objects\n // TODO(wittjosiah): Should the database handle this differently?\n // TODO(wittjosiah): Render placeholders for missing objects so they can be removed from the stack?\n .map((object) => object.target)\n .filter(nonNullable)\n .map((object) => {\n const metadata = metadataPlugin?.provides.metadata.resolver(\n getType(object)?.objectId ?? 'never',\n ) as StackSectionMetadata;\n const view = {\n ...stack.sections[object.id],\n collapsed: collapsedSections[fullyQualifiedId(object)],\n title:\n (object as any)?.title ?? toLocalizedString(graph.findNode(fullyQualifiedId(object))?.properties.label, t),\n } as StackSectionView;\n return { id: fullyQualifiedId(object), object, metadata, view } satisfies StackSectionItem;\n }) ?? [];\n\n const handleDelete = useCallback(\n async (id: string) => {\n const index = collection.objects\n .map((object) => object.target)\n .filter(nonNullable)\n .findIndex((section) => fullyQualifiedId(section) === id);\n const object = collection.objects[index].target;\n if (isReactiveObject(object)) {\n await dispatch(createIntent(SpaceAction.RemoveObjects, { objects: [object], target: collection }));\n\n // TODO(wittjosiah): The section should also be removed, but needs to be restored if the action is undone.\n // delete stack.sections[Path.last(path)];\n }\n },\n [collection, dispatch],\n );\n\n const handleAdd = useCallback(\n async (id: string, position: AddSectionPosition) => {\n await dispatch?.(\n createIntent(LayoutAction.SetLayout, {\n element: 'dialog',\n component: `${STACK_PLUGIN}/AddSectionDialog`,\n subject: { path: id, position, collection },\n }),\n );\n },\n [collection, dispatch],\n );\n\n const handleNavigate = useCallback(\n async (id: string) => {\n await dispatch(createIntent(NavigationAction.Open, { activeParts: { main: [id] } }));\n await dispatch(createIntent(LayoutAction.ScrollIntoView, { id }));\n },\n [dispatch],\n );\n\n const handleCollapse = useCallback(\n (id: string, collapsed: boolean) => setCollapsedSections((prev) => ({ ...prev, [id]: collapsed })),\n [],\n );\n\n const handleAddSection = useCallback(\n () => dispatch?.(createIntent(SpaceAction.OpenCreateObject, { target: collection, navigable: false })),\n [collection, dispatch],\n );\n\n return (\n <AttentionProvider id={id}>\n <StackContext.Provider\n value={{\n onCollapse: handleCollapse,\n onNavigate: handleNavigate,\n onDelete: handleDelete,\n onAdd: handleAdd,\n }}\n >\n <Stack orientation='vertical' size='intrinsic' id={id} data-testid='main.stack'>\n {items.map((item) => (\n <StackSection key={item.id} {...item} />\n ))}\n </Stack>\n\n <div role='none' className='flex mlb-2 pli-2 justify-center'>\n <Button data-testid='stack.createSection' classNames='gap-2' onClick={handleAddSection}>\n <Plus />\n <span className='sr-only'>{t('add section label')}</span>\n </Button>\n </div>\n </StackContext.Provider>\n </AttentionProvider>\n );\n};\n\nexport default StackMain;\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { createContext, useContext } from 'react';\n\nimport { type AddSectionPosition } from '../types';\n\nexport type StackContextValue = {\n onCollapse: (id: string, collapsed: boolean) => void;\n onNavigate: (id: string) => Promise<void>;\n onDelete: (id: string) => Promise<void>;\n onAdd: (id: string, position: AddSectionPosition) => void;\n};\n\nexport const StackContext = createContext<StackContextValue>({\n onCollapse: () => {},\n onNavigate: async () => {},\n onDelete: async () => {},\n onAdd: () => {},\n});\n\nexport const useStack = () => useContext(StackContext);\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport * as CollapsiblePrimitive from '@radix-ui/react-collapsible';\nimport React, { useState } from 'react';\n\nimport { Surface } from '@dxos/app-framework';\nimport { DropdownMenu, Icon, useTranslation, IconButton } from '@dxos/react-ui';\nimport { useAttendableAttributes } from '@dxos/react-ui-attention';\nimport { StackItem } from '@dxos/react-ui-stack';\nimport { mx, getSize, textBlockWidth } from '@dxos/react-ui-theme';\n\nimport { CaretDownUp } from './CaretDownUp';\nimport { useStack } from './StackContext';\nimport { STACK_PLUGIN } from '../meta';\nimport { type StackSectionItem } from '../types';\n\nconst sectionActionDimensions = 'm-1 p-1 shrink-0 min-bs-0 is-[--rail-action] bs-min';\n\nexport const StackSection = ({\n id,\n view,\n object,\n metadata: { icon = 'ph--placeholder--regular' },\n}: StackSectionItem) => {\n const { t } = useTranslation(STACK_PLUGIN);\n const { onNavigate, onAdd, onCollapse, onDelete } = useStack();\n const [optionsMenuOpen, setOptionsMenuOpen] = useState(false);\n const attendableAttrs = useAttendableAttributes(id);\n\n return (\n <CollapsiblePrimitive.Root asChild open={!view.collapsed} onOpenChange={(nextOpen) => onCollapse?.(id, !nextOpen)}>\n <StackItem.Root item={{ id }} role='section' {...attendableAttrs} classNames='border-be border-separator'>\n <StackItem.Heading classNames='attention-surface border-ie !border-separator'>\n <span className='sr-only'>{view.title}</span>\n <div role='none' className='sticky -block-start-px bg-[--sticky-bg]'>\n <DropdownMenu.Root\n {...{\n open: optionsMenuOpen,\n onOpenChange: setOptionsMenuOpen,\n }}\n >\n <DropdownMenu.Trigger asChild>\n <StackItem.SigilButton>\n <Icon icon={icon} size={5} classNames='transition-opacity' />\n </StackItem.SigilButton>\n </DropdownMenu.Trigger>\n <DropdownMenu.Portal>\n <DropdownMenu.Content>\n <DropdownMenu.Viewport>\n {view.collapsed ? (\n <DropdownMenu.Item onClick={() => onNavigate(id)} data-testid='section.navigate-to'>\n <Icon icon='ph--arrow-square-out--regular' size={5} />\n <span className='mis-2 grow'>{t('navigate to section label')}</span>\n </DropdownMenu.Item>\n ) : (\n <CollapsiblePrimitive.Trigger asChild>\n <DropdownMenu.Item>\n <CaretDownUp className={getSize(5)} />\n <span className='mis-2 grow'>{t('collapse label')}</span>\n </DropdownMenu.Item>\n </CollapsiblePrimitive.Trigger>\n )}\n <DropdownMenu.Item onClick={() => onAdd(id, 'before')} data-testid='section.add-before'>\n <Icon icon='ph--arrow-line-up--regular' size={5} />\n <span className='mis-2 grow'>{t('add section before label')}</span>\n </DropdownMenu.Item>\n <DropdownMenu.Item onClick={() => onAdd(id, 'after')} data-testid='section.add-after'>\n <Icon icon='ph--arrow-line-down--regular' size={5} />\n <span className='mis-2 grow'>{t('add section after label')}</span>\n </DropdownMenu.Item>\n <DropdownMenu.Item onClick={() => onDelete(id)} data-testid='section.remove'>\n <Icon icon='ph--trash--regular' size={5} />\n <span className='mis-2 grow'>{t('remove section label')}</span>\n </DropdownMenu.Item>\n </DropdownMenu.Viewport>\n <DropdownMenu.Arrow />\n </DropdownMenu.Content>\n </DropdownMenu.Portal>\n </DropdownMenu.Root>\n {view.collapsed ? (\n <CollapsiblePrimitive.Trigger asChild>\n <IconButton\n iconOnly\n variant='ghost'\n label={t('expand label')}\n icon='ph--caret-up-down--regular'\n classNames={sectionActionDimensions}\n />\n </CollapsiblePrimitive.Trigger>\n ) : (\n <IconButton\n iconOnly\n variant='ghost'\n onClick={() => onNavigate(id)}\n label={t('navigate to section label')}\n icon='ph--arrow-square-out--regular'\n data-testid='section.navigate-to'\n classNames={sectionActionDimensions}\n />\n )}\n </div>\n </StackItem.Heading>\n <CollapsiblePrimitive.Content>\n <Surface role='section' data={{ subject: object }} limit={1} placeholder={<></>} />\n </CollapsiblePrimitive.Content>\n {view.collapsed && (\n <StackItem.Content toolbar={false} classNames='attention-surface'>\n <h2 className={mx('flex items-center p-4 font-medium is-full', textBlockWidth)}>{view.title}</h2>\n </StackItem.Content>\n )}\n </StackItem.Root>\n </CollapsiblePrimitive.Root>\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { type ComponentPropsWithoutRef } from 'react';\n\nexport const CaretDownUp = ({ children, ...props }: ComponentPropsWithoutRef<'svg'>) => {\n return (\n <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256' {...props}>\n <rect width='256' height='256' fill='none' />\n <polyline\n points='80 224 128 176 176 224'\n fill='none'\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='16'\n />\n <polyline\n points='80 32 128 80 176 32'\n fill='none'\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='16'\n />\n {children}\n </svg>\n );\n};\n"],
5
- "mappings": ";;;;;;;;AAIA,SAASA,YAAY;AACrB,OAAOC,UAASC,aAAaC,WAAWC,SAASC,YAAAA,iBAAgB;AAEjE,SACEC,cACAC,cACAC,kBACAC,6BACAC,qBACAC,wBACK;AACP,SAASC,QAAQC,SAASC,kBAAkBC,kBAAkBC,eAAe;AAC7E,SAASC,gBAAgB;AACzB,SAASC,mBAAmB;AAE5B,SAASC,QAAQC,mBAAmBC,kBAAAA,uBAAsB;AAC1D,SAASC,yBAAyB;AAClC,SAASC,aAAa;AACtB,SAASC,mBAAmB;;;AClB5B,SAASC,eAAeC,kBAAkB;AAWnC,IAAMC,eAAeC,8BAAiC;EAC3DC,YAAY,MAAA;EAAO;EACnBC,YAAY,YAAA;EAAa;EACzBC,UAAU,YAAA;EAAa;EACvBC,OAAO,MAAA;EAAO;AAChB,CAAA;AAEO,IAAMC,WAAW,MAAMC,WAAWP,YAAAA;;;AClBzC,YAAYQ,0BAA0B;AACtC,OAAOC,UAASC,gBAAgB;AAEhC,SAASC,eAAe;AACxB,SAASC,cAAcC,MAAMC,gBAAgBC,kBAAkB;AAC/D,SAASC,+BAA+B;AACxC,SAASC,iBAAiB;AAC1B,SAASC,IAAIC,SAASC,sBAAsB;;;ACP5C,OAAOC,WAA8C;AAE9C,IAAMC,cAAc,CAAC,EAAEC,UAAU,GAAGC,MAAAA,MAAwC;AACjF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AK;IAAYrF;IAAQsF,eAAY;KAChE3D,MAAME,IAAI,CAAC0D,SACV,gBAAAb,OAAA,cAACc,cAAAA;IAAaC,KAAKF,KAAKvF;IAAK,GAAGuF;QAIpC,gBAAAb,OAAA,cAACgB,OAAAA;IAAIC,MAAK;IAAOC,WAAU;KACzB,gBAAAlB,OAAA,cAACmB,QAAAA;IAAOP,eAAY;IAAsBQ,YAAW;IAAQC,SAASxB;KACpE,gBAAAG,OAAA,cAACsB,MAAAA,IAAAA,GACD,gBAAAtB,OAAA,cAACuB,QAAAA;IAAKL,WAAU;KAAWrF,EAAE,mBAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAMzC;AAEA,IAAA,oBAAeR;",
6
- "names": ["Plus", "React", "useCallback", "useEffect", "useMemo", "useState", "createIntent", "LayoutAction", "NavigationAction", "parseMetadataResolverPlugin", "useIntentDispatcher", "useResolvePlugin", "create", "getType", "fullyQualifiedId", "isReactiveObject", "makeRef", "useGraph", "SpaceAction", "Button", "toLocalizedString", "useTranslation", "AttentionProvider", "Stack", "nonNullable", "createContext", "useContext", "StackContext", "createContext", "onCollapse", "onNavigate", "onDelete", "onAdd", "useStack", "useContext", "CollapsiblePrimitive", "React", "useState", "Surface", "DropdownMenu", "Icon", "useTranslation", "IconButton", "useAttendableAttributes", "StackItem", "mx", "getSize", "textBlockWidth", "React", "CaretDownUp", "children", "props", "svg", "xmlns", "viewBox", "rect", "width", "height", "fill", "polyline", "points", "stroke", "strokeLinecap", "strokeLinejoin", "strokeWidth", "sectionActionDimensions", "StackSection", "id", "view", "object", "metadata", "icon", "t", "useTranslation", "STACK_PLUGIN", "onNavigate", "onAdd", "onCollapse", "onDelete", "useStack", "optionsMenuOpen", "setOptionsMenuOpen", "useState", "attendableAttrs", "useAttendableAttributes", "React", "Root", "asChild", "open", "collapsed", "onOpenChange", "nextOpen", "StackItem", "item", "role", "classNames", "Heading", "span", "className", "title", "div", "DropdownMenu", "Trigger", "SigilButton", "Icon", "size", "Portal", "Content", "Viewport", "Item", "onClick", "data-testid", "CaretDownUp", "getSize", "Arrow", "IconButton", "iconOnly", "variant", "label", "Surface", "data", "subject", "limit", "placeholder", "toolbar", "h2", "mx", "textBlockWidth", "StackMain", "id", "collection", "dispatchPromise", "dispatch", "useIntentDispatcher", "graph", "useGraph", "t", "useTranslation", "STACK_PLUGIN", "metadataPlugin", "useResolvePlugin", "parseMetadataResolverPlugin", "defaultStack", "useMemo", "create", "StackViewType", "sections", "stack", "views", "typename", "target", "collapsedSections", "setCollapsedSections", "useState", "useEffect", "makeRef", "items", "objects", "map", "object", "filter", "nonNullable", "metadata", "provides", "resolver", "getType", "objectId", "view", "collapsed", "fullyQualifiedId", "title", "toLocalizedString", "findNode", "properties", "label", "handleDelete", "useCallback", "index", "findIndex", "section", "isReactiveObject", "createIntent", "SpaceAction", "RemoveObjects", "handleAdd", "position", "LayoutAction", "SetLayout", "element", "component", "subject", "path", "handleNavigate", "NavigationAction", "Open", "activeParts", "main", "ScrollIntoView", "handleCollapse", "prev", "handleAddSection", "OpenCreateObject", "navigable", "React", "AttentionProvider", "StackContext", "Provider", "value", "onCollapse", "onNavigate", "onDelete", "onAdd", "Stack", "orientation", "size", "data-testid", "item", "StackSection", "key", "div", "role", "className", "Button", "classNames", "onClick", "Plus", "span"]
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/meta.ts"],
4
- "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type PluginMeta } from '@dxos/app-framework';\n\nexport const STACK_PLUGIN = 'dxos.org/plugin/stack';\nexport const SECTION_IDENTIFIER = 'dxos.org/type/StackSection';\n\nexport default {\n id: STACK_PLUGIN,\n // TODO(wittjosiah): Prevents \"stacks\" language from being exposed to users in settings panel.\n // Conside renaming this to the collection plugin and trying to factor more collections logic from the space plugin.\n name: 'Collections',\n description: 'View collections of objects within the deck.',\n icon: 'ph--stack-simple--regular',\n source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-stack',\n} satisfies PluginMeta;\n"],
5
- "mappings": ";AAMO,IAAMA,eAAe;AACrB,IAAMC,qBAAqB;AAElC,IAAA,eAAe;EACbC,IAAIF;;;EAGJG,MAAM;EACNC,aAAa;EACbC,MAAM;EACNC,QAAQ;AACV;",
6
- "names": ["STACK_PLUGIN", "SECTION_IDENTIFIER", "id", "name", "description", "icon", "source"]
7
- }
@@ -1,11 +0,0 @@
1
- import {
2
- SECTION_IDENTIFIER,
3
- STACK_PLUGIN,
4
- meta_default
5
- } from "./chunk-DS5KGEJG.mjs";
6
- export {
7
- SECTION_IDENTIFIER,
8
- STACK_PLUGIN,
9
- meta_default as default
10
- };
11
- //# sourceMappingURL=meta.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": [],
4
- "sourcesContent": [],
5
- "mappings": "",
6
- "names": []
7
- }