@dxos/plugin-settings 0.6.14-main.7bd9c89 → 0.8.4-main.1c7ec43d41

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 (94) hide show
  1. package/dist/lib/browser/SettingsPlugin-H7MYSTLT.mjs +9 -0
  2. package/dist/lib/browser/chunk-YMWZWP5N.mjs +20 -0
  3. package/dist/lib/browser/chunk-YMWZWP5N.mjs.map +7 -0
  4. package/dist/lib/browser/index.mjs +34 -247
  5. package/dist/lib/browser/index.mjs.map +4 -4
  6. package/dist/lib/browser/meta.json +1 -1
  7. package/dist/lib/browser/plugin.mjs +7 -0
  8. package/dist/lib/browser/translations.mjs +15 -0
  9. package/dist/lib/browser/translations.mjs.map +7 -0
  10. package/dist/lib/browser/types/index.mjs +9 -0
  11. package/dist/lib/browser/types/index.mjs.map +7 -0
  12. package/dist/lib/node-esm/SettingsPlugin-LSWDBQHF.mjs +10 -0
  13. package/dist/lib/node-esm/SettingsPlugin-LSWDBQHF.mjs.map +7 -0
  14. package/dist/lib/node-esm/chunk-H4MBYZ3E.mjs +22 -0
  15. package/dist/lib/node-esm/chunk-H4MBYZ3E.mjs.map +7 -0
  16. package/dist/lib/node-esm/index.mjs +34 -246
  17. package/dist/lib/node-esm/index.mjs.map +4 -4
  18. package/dist/lib/node-esm/meta.json +1 -1
  19. package/dist/lib/node-esm/plugin.mjs +8 -0
  20. package/dist/lib/node-esm/plugin.mjs.map +7 -0
  21. package/dist/lib/node-esm/translations.mjs +17 -0
  22. package/dist/lib/node-esm/translations.mjs.map +7 -0
  23. package/dist/lib/node-esm/types/index.mjs +11 -0
  24. package/dist/lib/node-esm/types/index.mjs.map +7 -0
  25. package/dist/types/src/SettingsPlugin.d.ts +3 -6
  26. package/dist/types/src/SettingsPlugin.d.ts.map +1 -1
  27. package/dist/types/src/SettingsPlugin.test.d.ts +2 -0
  28. package/dist/types/src/SettingsPlugin.test.d.ts.map +1 -0
  29. package/dist/types/src/actions.d.ts +25 -0
  30. package/dist/types/src/actions.d.ts.map +1 -0
  31. package/dist/types/src/capabilities/app-graph-builder.d.ts +6 -0
  32. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -0
  33. package/dist/types/src/capabilities/index.d.ts +5 -0
  34. package/dist/types/src/capabilities/index.d.ts.map +1 -0
  35. package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
  36. package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
  37. package/dist/types/src/index.d.ts +4 -4
  38. package/dist/types/src/index.d.ts.map +1 -1
  39. package/dist/types/src/meta.d.ts +2 -5
  40. package/dist/types/src/meta.d.ts.map +1 -1
  41. package/dist/types/src/operations/index.d.ts +3 -0
  42. package/dist/types/src/operations/index.d.ts.map +1 -0
  43. package/dist/types/src/operations/open-plugin-registry.d.ts +5 -0
  44. package/dist/types/src/operations/open-plugin-registry.d.ts.map +1 -0
  45. package/dist/types/src/operations/open.d.ts +5 -0
  46. package/dist/types/src/operations/open.d.ts.map +1 -0
  47. package/dist/types/src/plugin.d.ts +2 -0
  48. package/dist/types/src/plugin.d.ts.map +1 -0
  49. package/dist/types/src/translations.d.ts +5 -9
  50. package/dist/types/src/translations.d.ts.map +1 -1
  51. package/dist/types/src/types/index.d.ts +3 -0
  52. package/dist/types/src/types/index.d.ts.map +1 -0
  53. package/dist/types/tsconfig.tsbuildinfo +1 -0
  54. package/package.json +46 -36
  55. package/src/SettingsPlugin.test.ts +33 -0
  56. package/src/SettingsPlugin.ts +19 -0
  57. package/src/actions.ts +24 -0
  58. package/src/capabilities/app-graph-builder.ts +99 -0
  59. package/src/capabilities/index.ts +12 -0
  60. package/src/capabilities/operation-handler.ts +16 -0
  61. package/src/index.ts +7 -7
  62. package/src/meta.ts +7 -7
  63. package/src/operations/index.ts +10 -0
  64. package/src/operations/open-plugin-registry.ts +28 -0
  65. package/src/operations/open.ts +29 -0
  66. package/src/plugin.ts +7 -0
  67. package/src/translations.ts +8 -9
  68. package/src/types/index.ts +8 -0
  69. package/README.md +0 -15
  70. package/dist/lib/browser/chunk-PD3C4TDW.mjs +0 -11
  71. package/dist/lib/browser/chunk-PD3C4TDW.mjs.map +0 -7
  72. package/dist/lib/browser/meta.mjs +0 -9
  73. package/dist/lib/node/chunk-AHM6OLF2.cjs +0 -34
  74. package/dist/lib/node/chunk-AHM6OLF2.cjs.map +0 -7
  75. package/dist/lib/node/index.cjs +0 -278
  76. package/dist/lib/node/index.cjs.map +0 -7
  77. package/dist/lib/node/meta.cjs +0 -30
  78. package/dist/lib/node/meta.cjs.map +0 -7
  79. package/dist/lib/node/meta.json +0 -1
  80. package/dist/lib/node-esm/chunk-PPOEIFFE.mjs +0 -13
  81. package/dist/lib/node-esm/chunk-PPOEIFFE.mjs.map +0 -7
  82. package/dist/lib/node-esm/meta.mjs +0 -10
  83. package/dist/types/src/components/SettingsDialog.d.ts +0 -6
  84. package/dist/types/src/components/SettingsDialog.d.ts.map +0 -1
  85. package/dist/types/src/components/SettingsValue.d.ts +0 -9
  86. package/dist/types/src/components/SettingsValue.d.ts.map +0 -1
  87. package/dist/types/src/components/index.d.ts +0 -3
  88. package/dist/types/src/components/index.d.ts.map +0 -1
  89. package/src/SettingsPlugin.tsx +0 -122
  90. package/src/components/SettingsDialog.tsx +0 -126
  91. package/src/components/SettingsValue.tsx +0 -49
  92. package/src/components/index.ts +0 -6
  93. /package/dist/lib/browser/{meta.mjs.map → SettingsPlugin-H7MYSTLT.mjs.map} +0 -0
  94. /package/dist/lib/{node-esm/meta.mjs.map → browser/plugin.mjs.map} +0 -0
@@ -0,0 +1,9 @@
1
+ import {
2
+ SettingsPlugin,
3
+ SettingsPlugin_default
4
+ } from "./chunk-YMWZWP5N.mjs";
5
+ export {
6
+ SettingsPlugin,
7
+ SettingsPlugin_default as default
8
+ };
9
+ //# sourceMappingURL=SettingsPlugin-H7MYSTLT.mjs.map
@@ -0,0 +1,20 @@
1
+ // src/SettingsPlugin.ts
2
+ import { Plugin } from "@dxos/app-framework";
3
+ import { AppPlugin } from "@dxos/app-toolkit";
4
+ import { OperationHandler, SettingsAppGraphBuilder } from "#capabilities";
5
+ import { meta } from "#meta";
6
+ import { translations } from "#translations";
7
+ var SettingsPlugin = Plugin.define(meta).pipe(AppPlugin.addAppGraphModule({
8
+ activate: SettingsAppGraphBuilder
9
+ }), AppPlugin.addOperationHandlerModule({
10
+ activate: OperationHandler
11
+ }), AppPlugin.addTranslationsModule({
12
+ translations
13
+ }), Plugin.make);
14
+ var SettingsPlugin_default = SettingsPlugin;
15
+
16
+ export {
17
+ SettingsPlugin,
18
+ SettingsPlugin_default
19
+ };
20
+ //# sourceMappingURL=chunk-YMWZWP5N.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/SettingsPlugin.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\nimport { AppPlugin } from '@dxos/app-toolkit';\n\nimport { OperationHandler, SettingsAppGraphBuilder } from '#capabilities';\nimport { meta } from '#meta';\nimport { translations } from '#translations';\n\nexport const SettingsPlugin = Plugin.define(meta).pipe(\n AppPlugin.addAppGraphModule({ activate: SettingsAppGraphBuilder }),\n AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),\n AppPlugin.addTranslationsModule({ translations }),\n Plugin.make,\n);\n\nexport default SettingsPlugin;\n"],
5
+ "mappings": ";AAIA,SAASA,cAAc;AACvB,SAASC,iBAAiB;AAE1B,SAASC,kBAAkBC,+BAA+B;AAC1D,SAASC,YAAY;AACrB,SAASC,oBAAoB;AAEtB,IAAMC,iBAAiBN,OAAOO,OAAOH,IAAAA,EAAMI,KAChDP,UAAUQ,kBAAkB;EAAEC,UAAUP;AAAwB,CAAA,GAChEF,UAAUU,0BAA0B;EAAED,UAAUR;AAAiB,CAAA,GACjED,UAAUW,sBAAsB;EAAEP;AAAa,CAAA,GAC/CL,OAAOa,IAAI;AAGb,IAAA,yBAAeP;",
6
+ "names": ["Plugin", "AppPlugin", "OperationHandler", "SettingsAppGraphBuilder", "meta", "translations", "SettingsPlugin", "define", "pipe", "addAppGraphModule", "activate", "addOperationHandlerModule", "addTranslationsModule", "make"]
7
+ }
@@ -1,257 +1,44 @@
1
- import {
2
- SETTINGS_PLUGIN,
3
- meta_default
4
- } from "./chunk-PD3C4TDW.mjs";
1
+ // src/index.ts
2
+ import { Plugin } from "@dxos/app-framework";
5
3
 
6
- // packages/plugins/plugin-settings/src/SettingsPlugin.tsx
7
- import React3 from "react";
8
- import { parseIntentPlugin, resolvePlugin, LayoutAction, SettingsAction } from "@dxos/app-framework";
9
- import { LocalStorageStore } from "@dxos/local-storage";
10
- import { createExtension } from "@dxos/plugin-graph";
11
-
12
- // packages/plugins/plugin-settings/src/components/SettingsDialog.tsx
13
- import React, { useState } from "react";
14
- import { Surface, usePlugins } from "@dxos/app-framework";
15
- import { Button, Dialog, Icon, useTranslation } from "@dxos/react-ui";
16
- import { Tabs } from "@dxos/react-ui-tabs";
17
- import { getSize } from "@dxos/react-ui-theme";
18
- import { nonNullable } from "@dxos/util";
19
- var SettingsDialog = ({ selected, onSelected }) => {
20
- const { t } = useTranslation(SETTINGS_PLUGIN);
21
- const { plugins, enabled } = usePlugins();
22
- const core = [
23
- "dxos.org/plugin/layout",
24
- "dxos.org/plugin/deck",
25
- "dxos.org/plugin/files",
26
- "dxos.org/plugin/space",
27
- "dxos.org/plugin/stack",
28
- "dxos.org/plugin/observability",
29
- "dxos.org/plugin/registry"
30
- ];
31
- const sortPlugin = ({ name: a }, { name: b }) => a?.localeCompare(b ?? "") ?? 0;
32
- const corePlugins = core.map((id) => plugins.find((plugin) => plugin.meta.id === id)?.meta).filter(nonNullable).sort(sortPlugin);
33
- const filteredPlugins = enabled.filter((id) => !core.includes(id)).map((id) => plugins.find((plugin) => plugin.meta.id === id)).filter((plugin) => plugin?.provides?.settings).map((plugin) => plugin.meta).sort(sortPlugin);
34
- const [tabsActivePart, setTabsActivePart] = useState("list");
35
- return /* @__PURE__ */ React.createElement(Dialog.Content, {
36
- classNames: "p-0 bs-content max-bs-full md:max-is-[40rem] overflow-hidden"
37
- }, /* @__PURE__ */ React.createElement("div", {
38
- role: "none",
39
- className: "flex justify-between mbe-1 pbs-3 pis-2 pie-3 @md:pbs-4 @md:pis-4 @md:pie-5"
40
- }, /* @__PURE__ */ React.createElement(Dialog.Title, {
41
- onClick: () => setTabsActivePart("list"),
42
- "aria-description": t("click to return to tablist description"),
43
- classNames: "flex cursor-pointer items-center group/title"
44
- }, /* @__PURE__ */ React.createElement(Icon, {
45
- icon: "ph--caret-left--regular",
46
- classNames: [
47
- "@md:hidden",
48
- getSize(4),
49
- tabsActivePart === "list" && "invisible"
50
- ]
51
- }), /* @__PURE__ */ React.createElement("span", {
52
- className: tabsActivePart !== "list" ? "group-hover/title:underline @md:group-hover/title:no-underline underline-offset-4 decoration-1" : ""
53
- }, t("settings dialog title"))), /* @__PURE__ */ React.createElement(Dialog.Close, {
54
- asChild: true
55
- }, /* @__PURE__ */ React.createElement(Button, {
56
- density: "fine",
57
- variant: "ghost",
58
- autoFocus: true
59
- }, /* @__PURE__ */ React.createElement(Icon, {
60
- icon: "ph--x--regular",
61
- size: 3
62
- })))), /* @__PURE__ */ React.createElement(Tabs.Root, {
63
- orientation: "vertical",
64
- value: selected,
65
- onValueChange: (nextSelected) => onSelected(nextSelected),
66
- activePart: tabsActivePart,
67
- onActivePartChange: setTabsActivePart,
68
- classNames: "flex flex-col flex-1 mbs-2"
69
- }, /* @__PURE__ */ React.createElement(Tabs.Viewport, {
70
- classNames: "flex-1 min-bs-0"
71
- }, /* @__PURE__ */ React.createElement("div", {
72
- role: "none",
73
- className: "overflow-y-auto pli-3 @md:pis-2 @md:pie-0 mbe-4 border-r border-separator"
74
- }, /* @__PURE__ */ React.createElement(Tabs.Tablist, {
75
- classNames: "flex flex-col gap-4 max-bs-none overflow-y-visible"
76
- }, /* @__PURE__ */ React.createElement(PluginList, {
77
- title: "Options",
78
- plugins: corePlugins
79
- }), filteredPlugins.length > 0 && /* @__PURE__ */ React.createElement(PluginList, {
80
- title: "Plugins",
81
- plugins: filteredPlugins
82
- }))), corePlugins.map((plugin) => /* @__PURE__ */ React.createElement(Tabs.Tabpanel, {
83
- key: plugin.id,
84
- value: plugin.id,
85
- classNames: "pli-3 @md:pli-5 max-bs-dvh overflow-y-auto"
86
- }, /* @__PURE__ */ React.createElement(Surface, {
87
- role: "settings",
88
- data: {
89
- plugin: plugin.id
90
- }
91
- }))), filteredPlugins.map((plugin) => /* @__PURE__ */ React.createElement(Tabs.Tabpanel, {
92
- key: plugin.id,
93
- value: plugin.id,
94
- classNames: "pli-3 @md:pli-5 max-bs-dvh overflow-y-auto"
95
- }, /* @__PURE__ */ React.createElement(Surface, {
96
- role: "settings",
97
- data: {
98
- plugin: plugin.id
99
- }
100
- }))))));
101
- };
102
- var PluginList = ({ title, plugins }) => {
103
- return /* @__PURE__ */ React.createElement("div", {
104
- role: "none"
105
- }, /* @__PURE__ */ React.createElement(Tabs.TabGroupHeading, {
106
- classNames: "pli-1 mlb-2 mbs-4 @md:mbs-2"
107
- }, title), /* @__PURE__ */ React.createElement("div", {
108
- className: "flex flex-col ml-1"
109
- }, plugins.map((plugin) => /* @__PURE__ */ React.createElement(Tabs.Tab, {
110
- key: plugin.id,
111
- value: plugin.id
112
- }, plugin.name))));
4
+ // src/meta.ts
5
+ var meta = {
6
+ id: "org.dxos.plugin.settings",
7
+ name: "Settings",
8
+ tags: [
9
+ "system"
10
+ ]
113
11
  };
114
12
 
115
- // packages/plugins/plugin-settings/src/components/SettingsValue.tsx
116
- import React2 from "react";
117
- import { Input } from "@dxos/react-ui";
118
- var SettingsValue = ({ label, description, secondary, children }) => {
119
- const primary = /* @__PURE__ */ React2.createElement("div", {
120
- role: "none",
121
- className: "flex w-full gap-4 py-1"
122
- }, /* @__PURE__ */ React2.createElement(Input.Root, null, /* @__PURE__ */ React2.createElement("div", {
123
- role: "none",
124
- className: "flex flex-col w-full"
125
- }, /* @__PURE__ */ React2.createElement(Input.Label, {
126
- classNames: "flex min-h-[40px] items-center"
127
- }, label), description && /* @__PURE__ */ React2.createElement(Input.DescriptionAndValidation, {
128
- classNames: "mbs-0.5"
129
- }, /* @__PURE__ */ React2.createElement(Input.Description, null, description))), /* @__PURE__ */ React2.createElement("div", {
130
- role: "none"
131
- }, /* @__PURE__ */ React2.createElement("div", {
132
- role: "none",
133
- className: "flex min-h-[40px] items-center"
134
- }, children))));
135
- if (secondary) {
136
- return /* @__PURE__ */ React2.createElement("div", {
137
- role: "none",
138
- className: "flex flex-col w-full"
139
- }, primary, secondary);
13
+ // src/actions.ts
14
+ import * as Schema from "effect/Schema";
15
+ import { meta as meta2 } from "#meta";
16
+ import { SETTINGS_ID, SETTINGS_KEY } from "#types";
17
+ (function(SettingsAction2) {
18
+ class Open extends Schema.TaggedClass()(`${meta2.id}.open`, {
19
+ input: Schema.Struct({
20
+ plugin: Schema.optional(Schema.String)
21
+ }),
22
+ output: Schema.Void
23
+ }) {
140
24
  }
141
- return primary;
142
- };
143
-
144
- // packages/plugins/plugin-settings/src/translations.ts
145
- var translations_default = [
146
- {
147
- "en-US": {
148
- [SETTINGS_PLUGIN]: {
149
- "open settings label": "Show settings",
150
- "settings dialog title": "Settings",
151
- "back label": "Back",
152
- "click to return to tablist description": "Click the title to return to the settings menu"
153
- }
154
- }
25
+ SettingsAction2.Open = Open;
26
+ class OpenPluginRegistry extends Schema.TaggedClass()(`${meta2.id}.open-plugin-registry`, {
27
+ input: Schema.Void,
28
+ output: Schema.Void
29
+ }) {
155
30
  }
156
- ];
157
-
158
- // packages/plugins/plugin-settings/src/SettingsPlugin.tsx
159
- var DEFAULT_PLUGIN = "dxos.org/plugin/registry";
160
- var SettingsPlugin = () => {
161
- const settings = new LocalStorageStore(SETTINGS_PLUGIN, {
162
- selected: DEFAULT_PLUGIN
163
- });
164
- return {
165
- meta: meta_default,
166
- ready: async () => {
167
- settings.prop({
168
- key: "selected",
169
- type: LocalStorageStore.string()
170
- });
171
- },
172
- provides: {
173
- surface: {
174
- component: ({ data }) => {
175
- switch (data.component) {
176
- case `${SETTINGS_PLUGIN}/Settings`:
177
- return /* @__PURE__ */ React3.createElement(SettingsDialog, {
178
- selected: settings.values.selected,
179
- onSelected: (selected) => settings.values.selected = selected
180
- });
181
- default:
182
- return null;
183
- }
184
- }
185
- },
186
- intent: {
187
- resolver: (intent) => {
188
- switch (intent.action) {
189
- case SettingsAction.OPEN: {
190
- if (intent.data?.plugin) {
191
- settings.values.selected = intent.data?.plugin;
192
- }
193
- return {
194
- intents: [
195
- [
196
- {
197
- action: LayoutAction.SET_LAYOUT,
198
- data: {
199
- element: "dialog",
200
- component: `${SETTINGS_PLUGIN}/Settings`,
201
- dialogBlockAlign: "start"
202
- }
203
- }
204
- ]
205
- ]
206
- };
207
- }
208
- }
209
- }
210
- },
211
- graph: {
212
- builder: (plugins) => {
213
- const intentPlugin = resolvePlugin(plugins, parseIntentPlugin);
214
- return createExtension({
215
- id: SETTINGS_PLUGIN,
216
- filter: (node) => node.id === "root",
217
- actions: () => [
218
- {
219
- id: SETTINGS_PLUGIN,
220
- data: async () => {
221
- await intentPlugin?.provides.intent.dispatch({
222
- plugin: SETTINGS_PLUGIN,
223
- action: SettingsAction.OPEN
224
- });
225
- },
226
- properties: {
227
- label: [
228
- "open settings label",
229
- {
230
- ns: SETTINGS_PLUGIN
231
- }
232
- ],
233
- icon: "ph--gear--regular",
234
- keyBinding: {
235
- macos: "meta+,",
236
- windows: "alt+,"
237
- }
238
- }
239
- }
240
- ]
241
- });
242
- }
243
- },
244
- translations: translations_default
245
- }
246
- };
247
- };
31
+ SettingsAction2.OpenPluginRegistry = OpenPluginRegistry;
32
+ })(SettingsAction || (SettingsAction = {}));
33
+ var SettingsAction;
248
34
 
249
- // packages/plugins/plugin-settings/src/index.ts
250
- var src_default = SettingsPlugin;
35
+ // src/index.ts
36
+ var SettingsPlugin = Plugin.lazy(meta, () => import("./SettingsPlugin-H7MYSTLT.mjs"));
251
37
  export {
252
- SettingsDialog,
38
+ SETTINGS_ID,
39
+ SETTINGS_KEY,
40
+ SettingsAction,
253
41
  SettingsPlugin,
254
- SettingsValue,
255
- src_default as default
42
+ meta
256
43
  };
257
44
  //# sourceMappingURL=index.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../src/SettingsPlugin.tsx", "../../../src/components/SettingsDialog.tsx", "../../../src/components/SettingsValue.tsx", "../../../src/translations.ts", "../../../src/index.ts"],
4
- "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport {\n type IntentResolverProvides,\n type PluginDefinition,\n type SurfaceProvides,\n parseIntentPlugin,\n resolvePlugin,\n LayoutAction,\n SettingsAction,\n type GraphBuilderProvides,\n type TranslationsProvides,\n} from '@dxos/app-framework';\nimport { LocalStorageStore } from '@dxos/local-storage';\nimport { createExtension, type Node } from '@dxos/plugin-graph';\n\nimport { SettingsDialog } from './components';\nimport meta, { SETTINGS_PLUGIN } from './meta';\nimport translations from './translations';\n\nconst DEFAULT_PLUGIN = 'dxos.org/plugin/registry';\n\nexport type SettingsPluginProvides = SurfaceProvides &\n IntentResolverProvides &\n GraphBuilderProvides &\n TranslationsProvides;\n\ntype SettingsSettingsProps = {\n selected: string;\n};\n\n/**\n * Plugin for aggregating and rendering plugin settings.\n */\nexport const SettingsPlugin = (): PluginDefinition<SettingsPluginProvides> => {\n const settings = new LocalStorageStore<SettingsSettingsProps>(SETTINGS_PLUGIN, { selected: DEFAULT_PLUGIN });\n\n return {\n meta,\n ready: async () => {\n settings.prop({ key: 'selected', type: LocalStorageStore.string() });\n },\n provides: {\n surface: {\n component: ({ data }) => {\n switch (data.component) {\n case `${SETTINGS_PLUGIN}/Settings`:\n return (\n <SettingsDialog\n selected={settings.values.selected}\n onSelected={(selected) => (settings.values.selected = selected)}\n />\n );\n\n default:\n return null;\n }\n },\n },\n intent: {\n resolver: (intent) => {\n switch (intent.action) {\n case SettingsAction.OPEN: {\n if (intent.data?.plugin) {\n settings.values.selected = intent.data?.plugin;\n }\n\n return {\n intents: [\n [\n {\n action: LayoutAction.SET_LAYOUT,\n data: {\n element: 'dialog',\n component: `${SETTINGS_PLUGIN}/Settings`,\n dialogBlockAlign: 'start',\n },\n },\n ],\n ],\n };\n }\n }\n },\n },\n graph: {\n builder: (plugins) => {\n const intentPlugin = resolvePlugin(plugins, parseIntentPlugin);\n\n return createExtension({\n id: SETTINGS_PLUGIN,\n filter: (node): node is Node<null> => node.id === 'root',\n actions: () => [\n {\n id: SETTINGS_PLUGIN,\n data: async () => {\n await intentPlugin?.provides.intent.dispatch({\n plugin: SETTINGS_PLUGIN,\n action: SettingsAction.OPEN,\n });\n },\n properties: {\n label: ['open settings label', { ns: SETTINGS_PLUGIN }],\n icon: 'ph--gear--regular',\n keyBinding: {\n macos: 'meta+,',\n windows: 'alt+,',\n },\n },\n },\n ],\n });\n },\n },\n translations,\n },\n };\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React, { useState } from 'react';\n\nimport { type PluginMeta, Surface, usePlugins } from '@dxos/app-framework';\nimport { Button, Dialog, Icon, useTranslation } from '@dxos/react-ui';\nimport { Tabs, type TabsActivePart } from '@dxos/react-ui-tabs';\nimport { getSize } from '@dxos/react-ui-theme';\nimport { nonNullable } from '@dxos/util';\n\nimport { SETTINGS_PLUGIN } from '../meta';\n\nexport const SettingsDialog = ({\n selected,\n onSelected,\n}: {\n selected: string;\n onSelected: (plugin: string) => void;\n}) => {\n const { t } = useTranslation(SETTINGS_PLUGIN);\n const { plugins, enabled } = usePlugins();\n\n // TODO(burdon): Factor out common defs?\n const core = [\n 'dxos.org/plugin/layout',\n 'dxos.org/plugin/deck',\n 'dxos.org/plugin/files',\n 'dxos.org/plugin/space',\n 'dxos.org/plugin/stack',\n 'dxos.org/plugin/observability',\n 'dxos.org/plugin/registry',\n ];\n\n const sortPlugin = ({ name: a }: PluginMeta, { name: b }: PluginMeta) => a?.localeCompare(b ?? '') ?? 0;\n\n const corePlugins = core\n .map((id) => plugins.find((plugin) => plugin.meta.id === id)?.meta)\n .filter(nonNullable)\n .sort(sortPlugin);\n\n const filteredPlugins = enabled\n .filter((id) => !core.includes(id))\n .map((id) => plugins.find((plugin) => plugin.meta.id === id))\n .filter((plugin) => (plugin?.provides as any)?.settings)\n .map((plugin) => plugin!.meta)\n .sort(sortPlugin);\n\n const [tabsActivePart, setTabsActivePart] = useState<TabsActivePart>('list');\n\n return (\n <Dialog.Content classNames='p-0 bs-content max-bs-full md:max-is-[40rem] overflow-hidden'>\n <div role='none' className='flex justify-between mbe-1 pbs-3 pis-2 pie-3 @md:pbs-4 @md:pis-4 @md:pie-5'>\n <Dialog.Title\n onClick={() => setTabsActivePart('list')}\n aria-description={t('click to return to tablist description')}\n classNames='flex cursor-pointer items-center group/title'\n >\n <Icon\n icon='ph--caret-left--regular'\n classNames={['@md:hidden', getSize(4), tabsActivePart === 'list' && 'invisible']}\n />\n <span\n className={\n tabsActivePart !== 'list'\n ? 'group-hover/title:underline @md:group-hover/title:no-underline underline-offset-4 decoration-1'\n : ''\n }\n >\n {t('settings dialog title')}\n </span>\n </Dialog.Title>\n <Dialog.Close asChild>\n <Button density='fine' variant='ghost' autoFocus>\n <Icon icon='ph--x--regular' size={3} />\n </Button>\n </Dialog.Close>\n </div>\n\n <Tabs.Root\n orientation='vertical'\n value={selected}\n onValueChange={(nextSelected) => onSelected(nextSelected)}\n activePart={tabsActivePart}\n onActivePartChange={setTabsActivePart}\n classNames='flex flex-col flex-1 mbs-2'\n >\n <Tabs.Viewport classNames='flex-1 min-bs-0'>\n <div role='none' className='overflow-y-auto pli-3 @md:pis-2 @md:pie-0 mbe-4 border-r border-separator'>\n <Tabs.Tablist classNames='flex flex-col gap-4 max-bs-none overflow-y-visible'>\n <PluginList title='Options' plugins={corePlugins} />\n {filteredPlugins.length > 0 && <PluginList title='Plugins' plugins={filteredPlugins} />}\n </Tabs.Tablist>\n </div>\n\n {corePlugins.map((plugin) => (\n <Tabs.Tabpanel key={plugin.id} value={plugin.id} classNames='pli-3 @md:pli-5 max-bs-dvh overflow-y-auto'>\n <Surface role='settings' data={{ plugin: plugin.id }} />\n </Tabs.Tabpanel>\n ))}\n {filteredPlugins.map((plugin) => (\n <Tabs.Tabpanel key={plugin.id} value={plugin.id} classNames='pli-3 @md:pli-5 max-bs-dvh overflow-y-auto'>\n <Surface role='settings' data={{ plugin: plugin.id }} />\n </Tabs.Tabpanel>\n ))}\n </Tabs.Viewport>\n </Tabs.Root>\n </Dialog.Content>\n );\n};\n\nconst PluginList = ({ title, plugins }: { title: string; plugins: PluginMeta[] }) => {\n return (\n <div role='none'>\n <Tabs.TabGroupHeading classNames={'pli-1 mlb-2 mbs-4 @md:mbs-2'}>{title}</Tabs.TabGroupHeading>\n <div className='flex flex-col ml-1'>\n {plugins.map((plugin) => (\n <Tabs.Tab key={plugin.id} value={plugin.id}>\n {plugin.name}\n </Tabs.Tab>\n ))}\n </div>\n </div>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React, { type JSX, type PropsWithChildren } from 'react';\n\nimport { Input } from '@dxos/react-ui';\n\ntype SettingValueProps = {\n label: string;\n description?: JSX.Element;\n secondary?: JSX.Element;\n};\n\nexport const SettingsValue = ({ label, description, secondary, children }: PropsWithChildren<SettingValueProps>) => {\n const primary = (\n <div role='none' className='flex w-full gap-4 py-1'>\n <Input.Root>\n <div role='none' className='flex flex-col w-full'>\n {/* TODO(burdon): Consistent height for controls (e.g., Select, Textbox, and Checkbox are all different). */}\n <Input.Label classNames='flex min-h-[40px] items-center'>{label}</Input.Label>\n {description && (\n <Input.DescriptionAndValidation classNames='mbs-0.5'>\n <Input.Description>{description}</Input.Description>\n </Input.DescriptionAndValidation>\n )}\n </div>\n\n <div role='none'>\n <div role='none' className='flex min-h-[40px] items-center'>\n {children}\n </div>\n </div>\n </Input.Root>\n </div>\n );\n\n if (secondary) {\n // console.log(secondary);\n return (\n <div role='none' className='flex flex-col w-full'>\n {primary}\n {secondary}\n </div>\n );\n }\n\n return primary;\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { SETTINGS_PLUGIN } from './meta';\n\nexport default [\n {\n 'en-US': {\n [SETTINGS_PLUGIN]: {\n 'open settings label': 'Show settings',\n 'settings dialog title': 'Settings',\n 'back label': 'Back',\n 'click to return to tablist description': 'Click the title to return to the settings menu',\n },\n },\n },\n];\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { SettingsPlugin } from './SettingsPlugin';\n\nexport default SettingsPlugin;\n\nexport * from './SettingsPlugin';\n\n// TODO(wittjosiah): Remove.\n// Settings should be exposed from plugins as state and intents rather than components.\nexport * from './components';\n"],
5
- "mappings": ";;;;;;AAIA,OAAOA,YAAW;AAElB,SAIEC,mBACAC,eACAC,cACAC,sBAGK;AACP,SAASC,yBAAyB;AAClC,SAASC,uBAAkC;;;ACd3C,OAAOC,SAASC,gBAAgB;AAEhC,SAA0BC,SAASC,kBAAkB;AACrD,SAASC,QAAQC,QAAQC,MAAMC,sBAAsB;AACrD,SAASC,YAAiC;AAC1C,SAASC,eAAe;AACxB,SAASC,mBAAmB;AAIrB,IAAMC,iBAAiB,CAAC,EAC7BC,UACAC,WAAU,MAIX;AACC,QAAM,EAAEC,EAAC,IAAKC,eAAeC,eAAAA;AAC7B,QAAM,EAAEC,SAASC,QAAO,IAAKC,WAAAA;AAG7B,QAAMC,OAAO;IACX;IACA;IACA;IACA;IACA;IACA;IACA;;AAGF,QAAMC,aAAa,CAAC,EAAEC,MAAMC,EAAC,GAAgB,EAAED,MAAME,EAAC,MAAmBD,GAAGE,cAAcD,KAAK,EAAA,KAAO;AAEtG,QAAME,cAAcN,KACjBO,IAAI,CAACC,OAAOX,QAAQY,KAAK,CAACC,WAAWA,OAAOC,KAAKH,OAAOA,EAAAA,GAAKG,IAAAA,EAC7DC,OAAOC,WAAAA,EACPC,KAAKb,UAAAA;AAER,QAAMc,kBAAkBjB,QACrB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e,OAAOL,MAAMU;cAC1C;AAEA,qBAAO;gBACLC,SAAS;kBACP;oBACE;sBACEJ,QAAQK,aAAaC;sBACrBb,MAAM;wBACJc,SAAS;wBACTf,WAAW,GAAGV,eAAAA;wBACd0B,kBAAkB;sBACpB;oBACF;;;cAGN;YACF;UACF;QACF;MACF;MACAC,OAAO;QACLC,SAAS,CAACC,YAAAA;AACR,gBAAMC,eAAeC,cAAcF,SAASG,iBAAAA;AAE5C,iBAAOC,gBAAgB;YACrBC,IAAIlC;YACJmC,QAAQ,CAACC,SAA6BA,KAAKF,OAAO;YAClDG,SAAS,MAAM;cACb;gBACEH,IAAIlC;gBACJW,MAAM,YAAA;AACJ,wBAAMmB,cAActB,SAASQ,OAAOsB,SAAS;oBAC3CjB,QAAQrB;oBACRkB,QAAQC,eAAeC;kBACzB,CAAA;gBACF;gBACAmB,YAAY;kBACVC,OAAO;oBAAC;oBAAuB;sBAAEC,IAAIzC;oBAAgB;;kBACrD0C,MAAM;kBACNC,YAAY;oBACVC,OAAO;oBACPC,SAAS;kBACX;gBACF;cACF;;UAEJ,CAAA;QACF;MACF;MACAC;IACF;EACF;AACF;;;AInHA,IAAA,cAAeC;",
6
- "names": ["React", "parseIntentPlugin", "resolvePlugin", "LayoutAction", "SettingsAction", "LocalStorageStore", "createExtension", "React", "useState", "Surface", "usePlugins", "Button", "Dialog", "Icon", "useTranslation", "Tabs", "getSize", "nonNullable", "SettingsDialog", "selected", "onSelected", "t", "useTranslation", "SETTINGS_PLUGIN", "plugins", "enabled", "usePlugins", "core", "sortPlugin", "name", "a", "b", "localeCompare", "corePlugins", "map", "id", "find", "plugin", "meta", "filter", "nonNullable", "sort", "filteredPlugins", "includes", "provides", "settings", "tabsActivePart", "setTabsActivePart", "useState", "Dialog", "Content", "classNames", "div", "role", "className", "Title", "onClick", "aria-description", "Icon", "icon", "getSize", "span", "Close", "asChild", "Button", "density", "variant", "autoFocus", "size", "Tabs", "Root", "orientation", "value", "onValueChange", "nextSelected", "activePart", "onActivePartChange", "Viewport", "Tablist", "PluginList", "title", "length", "Tabpanel", "key", "Surface", "data", "TabGroupHeading", "Tab", "React", "Input", "SettingsValue", "label", "description", "secondary", "children", "primary", "React", "div", "role", "className", "Input", "Root", "Label", "classNames", "DescriptionAndValidation", "Description", "SETTINGS_PLUGIN", "DEFAULT_PLUGIN", "SettingsPlugin", "settings", "LocalStorageStore", "SETTINGS_PLUGIN", "selected", "meta", "ready", "prop", "key", "type", "string", "provides", "surface", "component", "data", "React", "SettingsDialog", "values", "onSelected", "intent", "resolver", "action", "SettingsAction", "OPEN", "plugin", "intents", "LayoutAction", "SET_LAYOUT", "element", "dialogBlockAlign", "graph", "builder", "plugins", "intentPlugin", "resolvePlugin", "parseIntentPlugin", "createExtension", "id", "filter", "node", "actions", "dispatch", "properties", "label", "ns", "icon", "keyBinding", "macos", "windows", "translations", "SettingsPlugin"]
3
+ "sources": ["../../../src/index.ts", "../../../src/meta.ts", "../../../src/actions.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\n\nimport { meta } from './meta';\n\nexport const SettingsPlugin = Plugin.lazy(meta, () => import('./SettingsPlugin'));\n\nexport * from './meta';\n\nexport * from './actions';\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { type Plugin } from '@dxos/app-framework';\n\nexport const meta: Plugin.Meta = {\n id: 'org.dxos.plugin.settings',\n name: 'Settings',\n tags: ['system'],\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\nimport { meta } from '#meta';\nimport { SETTINGS_ID, SETTINGS_KEY } from '#types';\n\nexport { SETTINGS_ID, SETTINGS_KEY };\n\nexport namespace SettingsAction {\n export class Open extends Schema.TaggedClass<Open>()(`${meta.id}.open`, {\n input: Schema.Struct({\n plugin: Schema.optional(Schema.String),\n }),\n output: Schema.Void,\n }) {}\n\n export class OpenPluginRegistry extends Schema.TaggedClass<OpenPluginRegistry>()(`${meta.id}.open-plugin-registry`, {\n input: Schema.Void,\n output: Schema.Void,\n }) {}\n}\n"],
5
+ "mappings": ";AAIA,SAASA,cAAc;;;ACEhB,IAAMC,OAAoB;EAC/BC,IAAI;EACJC,MAAM;EACNC,MAAM;IAAC;;AACT;;;ACNA,YAAYC,YAAY;AAExB,SAASC,QAAAA,aAAY;AACrB,SAASC,aAAaC,oBAAoB;UAIzBC,iBAAAA;EACR,MAAMC,aAAoBC,mBAAW,EAAS,GAAGC,MAAKC,EAAE,SAAS;IACtEC,OAAcC,cAAO;MACnBC,QAAeC,gBAAgBC,aAAM;IACvC,CAAA;IACAC,QAAeC;EACjB,CAAA,EAAA;EAAI;kBALSV,OAAAA;EAON,MAAMW,2BAAkCV,mBAAW,EAAuB,GAAGC,MAAKC,EAAE,yBAAyB;IAClHC,OAAcM;IACdD,QAAeC;EACjB,CAAA,EAAA;EAAI;kBAHSC,qBAAAA;AAIf,GAZiBZ,mBAAAA,iBAAAA,CAAAA,EAAAA;;;;AFHV,IAAMa,iBAAiBC,OAAOC,KAAKC,MAAM,MAAM,OAAO,+BAAA,CAAA;",
6
+ "names": ["Plugin", "meta", "id", "name", "tags", "Schema", "meta", "SETTINGS_ID", "SETTINGS_KEY", "SettingsAction", "Open", "TaggedClass", "meta", "id", "input", "Struct", "plugin", "optional", "String", "output", "Void", "OpenPluginRegistry", "SettingsPlugin", "Plugin", "lazy", "meta"]
7
7
  }
@@ -1 +1 @@
1
- {"inputs":{"packages/plugins/plugin-settings/src/meta.ts":{"bytes":886,"imports":[],"format":"esm"},"packages/plugins/plugin-settings/src/components/SettingsDialog.tsx":{"bytes":15774,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-tabs","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-settings/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-settings/src/components/SettingsValue.tsx":{"bytes":4471,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-settings/src/components/index.ts":{"bytes":634,"imports":[{"path":"packages/plugins/plugin-settings/src/components/SettingsDialog.tsx","kind":"import-statement","original":"./SettingsDialog"},{"path":"packages/plugins/plugin-settings/src/components/SettingsValue.tsx","kind":"import-statement","original":"./SettingsValue"}],"format":"esm"},"packages/plugins/plugin-settings/src/translations.ts":{"bytes":1571,"imports":[{"path":"packages/plugins/plugin-settings/src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/plugins/plugin-settings/src/SettingsPlugin.tsx":{"bytes":12272,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/local-storage","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-settings/src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"packages/plugins/plugin-settings/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-settings/src/translations.ts","kind":"import-statement","original":"./translations"}],"format":"esm"},"packages/plugins/plugin-settings/src/index.ts":{"bytes":1216,"imports":[{"path":"packages/plugins/plugin-settings/src/SettingsPlugin.tsx","kind":"import-statement","original":"./SettingsPlugin"},{"path":"packages/plugins/plugin-settings/src/SettingsPlugin.tsx","kind":"import-statement","original":"./SettingsPlugin"},{"path":"packages/plugins/plugin-settings/src/components/index.ts","kind":"import-statement","original":"./components"}],"format":"esm"}},"outputs":{"packages/plugins/plugin-settings/dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":16969},"packages/plugins/plugin-settings/dist/lib/browser/index.mjs":{"imports":[{"path":"packages/plugins/plugin-settings/dist/lib/browser/chunk-PD3C4TDW.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/local-storage","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-tabs","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true}],"exports":["SettingsDialog","SettingsPlugin","SettingsValue","default"],"entryPoint":"packages/plugins/plugin-settings/src/index.ts","inputs":{"packages/plugins/plugin-settings/src/SettingsPlugin.tsx":{"bytesInOutput":2830},"packages/plugins/plugin-settings/src/components/SettingsDialog.tsx":{"bytesInOutput":4430},"packages/plugins/plugin-settings/src/components/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-settings/src/components/SettingsValue.tsx":{"bytesInOutput":1125},"packages/plugins/plugin-settings/src/translations.ts":{"bytesInOutput":318},"packages/plugins/plugin-settings/src/index.ts":{"bytesInOutput":34}},"bytes":9304},"packages/plugins/plugin-settings/dist/lib/browser/meta.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-settings/dist/lib/browser/meta.mjs":{"imports":[{"path":"packages/plugins/plugin-settings/dist/lib/browser/chunk-PD3C4TDW.mjs","kind":"import-statement"}],"exports":["SETTINGS_PLUGIN","default"],"entryPoint":"packages/plugins/plugin-settings/src/meta.ts","inputs":{},"bytes":165},"packages/plugins/plugin-settings/dist/lib/browser/chunk-PD3C4TDW.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":417},"packages/plugins/plugin-settings/dist/lib/browser/chunk-PD3C4TDW.mjs":{"imports":[],"exports":["SETTINGS_PLUGIN","meta_default"],"inputs":{"packages/plugins/plugin-settings/src/meta.ts":{"bytesInOutput":96}},"bytes":235}}}
1
+ {"inputs":{"src/meta.ts":{"bytes":770,"imports":[],"format":"esm"},"src/actions.ts":{"bytes":2673,"imports":[{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"#types","kind":"import-statement","external":true}],"format":"esm"},"src/SettingsPlugin.ts":{"bytes":2368,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"#capabilities","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"#translations","kind":"import-statement","external":true}],"format":"esm"},"src/index.ts":{"bytes":1057,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"src/actions.ts","kind":"import-statement","original":"./actions"},{"path":"src/SettingsPlugin.ts","kind":"dynamic-import","original":"./SettingsPlugin"}],"format":"esm"},"src/plugin.ts":{"bytes":667,"imports":[{"path":"src/SettingsPlugin.ts","kind":"import-statement","original":"./SettingsPlugin"}],"format":"esm"},"src/translations.ts":{"bytes":1078,"imports":[{"path":"#meta","kind":"import-statement","external":true}],"format":"esm"},"src/types/index.ts":{"bytes":854,"imports":[{"path":"@dxos/app-toolkit","kind":"import-statement","external":true}],"format":"esm"}},"outputs":{"dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2078},"dist/lib/browser/index.mjs":{"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"#types","kind":"import-statement","external":true},{"path":"dist/lib/browser/SettingsPlugin-H7MYSTLT.mjs","kind":"dynamic-import"}],"exports":["SETTINGS_ID","SETTINGS_KEY","SettingsAction","SettingsPlugin","meta"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":133},"src/meta.ts":{"bytesInOutput":97},"src/actions.ts":{"bytesInOutput":648}},"bytes":1067},"dist/lib/browser/plugin.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/browser/plugin.mjs":{"imports":[{"path":"dist/lib/browser/chunk-YMWZWP5N.mjs","kind":"import-statement"}],"exports":["SettingsPlugin"],"entryPoint":"src/plugin.ts","inputs":{"src/plugin.ts":{"bytesInOutput":0}},"bytes":122},"dist/lib/browser/translations.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":566},"dist/lib/browser/translations.mjs":{"imports":[{"path":"#meta","kind":"import-statement","external":true}],"exports":["translations"],"entryPoint":"src/translations.ts","inputs":{"src/translations.ts":{"bytesInOutput":161}},"bytes":253},"dist/lib/browser/types/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":444},"dist/lib/browser/types/index.mjs":{"imports":[{"path":"@dxos/app-toolkit","kind":"import-statement","external":true}],"exports":["SETTINGS_ID","SETTINGS_KEY"],"entryPoint":"src/types/index.ts","inputs":{"src/types/index.ts":{"bytesInOutput":140}},"bytes":239},"dist/lib/browser/SettingsPlugin-H7MYSTLT.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/browser/SettingsPlugin-H7MYSTLT.mjs":{"imports":[{"path":"dist/lib/browser/chunk-YMWZWP5N.mjs","kind":"import-statement"}],"exports":["SettingsPlugin","default"],"entryPoint":"src/SettingsPlugin.ts","inputs":{},"bytes":202},"dist/lib/browser/chunk-YMWZWP5N.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1249},"dist/lib/browser/chunk-YMWZWP5N.mjs":{"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"#capabilities","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"#translations","kind":"import-statement","external":true}],"exports":["SettingsPlugin","SettingsPlugin_default"],"inputs":{"src/SettingsPlugin.ts":{"bytesInOutput":543}},"bytes":668}}}
@@ -0,0 +1,7 @@
1
+ import {
2
+ SettingsPlugin
3
+ } from "./chunk-YMWZWP5N.mjs";
4
+ export {
5
+ SettingsPlugin
6
+ };
7
+ //# sourceMappingURL=plugin.mjs.map
@@ -0,0 +1,15 @@
1
+ // src/translations.ts
2
+ import { meta } from "#meta";
3
+ var translations = [
4
+ {
5
+ "en-US": {
6
+ [meta.id]: {
7
+ "plugin-settings.label": "Plugin Settings"
8
+ }
9
+ }
10
+ }
11
+ ];
12
+ export {
13
+ translations
14
+ };
15
+ //# sourceMappingURL=translations.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/translations.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { type Resource } from '@dxos/app-toolkit';\n\nimport { meta } from '#meta';\n\nexport const translations = [\n {\n 'en-US': {\n [meta.id]: {\n 'plugin-settings.label': 'Plugin Settings',\n },\n },\n },\n] as const satisfies Resource[];\n"],
5
+ "mappings": ";AAMA,SAASA,YAAY;AAEd,IAAMC,eAAe;EAC1B;IACE,SAAS;MACP,CAACD,KAAKE,EAAE,GAAG;QACT,yBAAyB;MAC3B;IACF;EACF;;",
6
+ "names": ["meta", "translations", "id"]
7
+ }
@@ -0,0 +1,9 @@
1
+ // src/types/index.ts
2
+ import { pinnedWorkspaceId } from "@dxos/app-toolkit";
3
+ var SETTINGS_ID = pinnedWorkspaceId("dxos:settings");
4
+ var SETTINGS_KEY = "settings";
5
+ export {
6
+ SETTINGS_ID,
7
+ SETTINGS_KEY
8
+ };
9
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/types/index.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { pinnedWorkspaceId } from '@dxos/app-toolkit';\n\nexport const SETTINGS_ID = pinnedWorkspaceId('dxos:settings');\nexport const SETTINGS_KEY = 'settings';\n"],
5
+ "mappings": ";AAIA,SAASA,yBAAyB;AAE3B,IAAMC,cAAcD,kBAAkB,eAAA;AACtC,IAAME,eAAe;",
6
+ "names": ["pinnedWorkspaceId", "SETTINGS_ID", "SETTINGS_KEY"]
7
+ }
@@ -0,0 +1,10 @@
1
+ import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
+ import {
3
+ SettingsPlugin,
4
+ SettingsPlugin_default
5
+ } from "./chunk-H4MBYZ3E.mjs";
6
+ export {
7
+ SettingsPlugin,
8
+ SettingsPlugin_default as default
9
+ };
10
+ //# sourceMappingURL=SettingsPlugin-LSWDBQHF.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "sourcesContent": [],
5
+ "mappings": "",
6
+ "names": []
7
+ }
@@ -0,0 +1,22 @@
1
+ import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
+
3
+ // src/SettingsPlugin.ts
4
+ import { Plugin } from "@dxos/app-framework";
5
+ import { AppPlugin } from "@dxos/app-toolkit";
6
+ import { OperationHandler, SettingsAppGraphBuilder } from "#capabilities";
7
+ import { meta } from "#meta";
8
+ import { translations } from "#translations";
9
+ var SettingsPlugin = Plugin.define(meta).pipe(AppPlugin.addAppGraphModule({
10
+ activate: SettingsAppGraphBuilder
11
+ }), AppPlugin.addOperationHandlerModule({
12
+ activate: OperationHandler
13
+ }), AppPlugin.addTranslationsModule({
14
+ translations
15
+ }), Plugin.make);
16
+ var SettingsPlugin_default = SettingsPlugin;
17
+
18
+ export {
19
+ SettingsPlugin,
20
+ SettingsPlugin_default
21
+ };
22
+ //# sourceMappingURL=chunk-H4MBYZ3E.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/SettingsPlugin.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\nimport { AppPlugin } from '@dxos/app-toolkit';\n\nimport { OperationHandler, SettingsAppGraphBuilder } from '#capabilities';\nimport { meta } from '#meta';\nimport { translations } from '#translations';\n\nexport const SettingsPlugin = Plugin.define(meta).pipe(\n AppPlugin.addAppGraphModule({ activate: SettingsAppGraphBuilder }),\n AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),\n AppPlugin.addTranslationsModule({ translations }),\n Plugin.make,\n);\n\nexport default SettingsPlugin;\n"],
5
+ "mappings": ";;;AAIA,SAASA,cAAc;AACvB,SAASC,iBAAiB;AAE1B,SAASC,kBAAkBC,+BAA+B;AAC1D,SAASC,YAAY;AACrB,SAASC,oBAAoB;AAEtB,IAAMC,iBAAiBN,OAAOO,OAAOH,IAAAA,EAAMI,KAChDP,UAAUQ,kBAAkB;EAAEC,UAAUP;AAAwB,CAAA,GAChEF,UAAUU,0BAA0B;EAAED,UAAUR;AAAiB,CAAA,GACjED,UAAUW,sBAAsB;EAAEP;AAAa,CAAA,GAC/CL,OAAOa,IAAI;AAGb,IAAA,yBAAeP;",
6
+ "names": ["Plugin", "AppPlugin", "OperationHandler", "SettingsAppGraphBuilder", "meta", "translations", "SettingsPlugin", "define", "pipe", "addAppGraphModule", "activate", "addOperationHandlerModule", "addTranslationsModule", "make"]
7
+ }