@dxos/plugin-testing 0.8.4-main.7996785055 → 0.8.4-main.8baae0fced

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 (184) hide show
  1. package/LICENSE +102 -5
  2. package/dist/lib/neutral/StorybookPlugin.mjs +10 -0
  3. package/dist/lib/neutral/StorybookPlugin.mjs.map +7 -0
  4. package/dist/lib/{browser/add-toast-M6ZVP2PQ.mjs → neutral/add-toast-Z2RXG4RX.mjs} +5 -4
  5. package/dist/lib/{node-esm/add-toast-VMEADC7Y.mjs.map → neutral/add-toast-Z2RXG4RX.mjs.map} +1 -1
  6. package/dist/lib/neutral/capabilities/index.mjs +11 -0
  7. package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
  8. package/dist/lib/neutral/chunk-7PCQ6HGV.mjs +21 -0
  9. package/dist/lib/neutral/chunk-7PCQ6HGV.mjs.map +7 -0
  10. package/dist/lib/{browser/chunk-F2MMDTKN.mjs → neutral/chunk-G6UPW2TF.mjs} +3 -7
  11. package/dist/lib/neutral/chunk-G6UPW2TF.mjs.map +7 -0
  12. package/dist/lib/neutral/chunk-J5LGTIGS.mjs +10 -0
  13. package/dist/lib/neutral/chunk-J5LGTIGS.mjs.map +7 -0
  14. package/dist/lib/neutral/chunk-NZ2VT6N2.mjs +17 -0
  15. package/dist/lib/neutral/chunk-NZ2VT6N2.mjs.map +7 -0
  16. package/dist/lib/neutral/chunk-R7AV233N.mjs +31 -0
  17. package/dist/lib/neutral/chunk-R7AV233N.mjs.map +7 -0
  18. package/dist/lib/neutral/chunk-S4IEYCPX.mjs +8 -0
  19. package/dist/lib/neutral/chunk-S4IEYCPX.mjs.map +7 -0
  20. package/dist/lib/{browser/chunk-M4TYMLOE.mjs → neutral/chunk-ULNF6GTG.mjs} +4 -4
  21. package/dist/lib/neutral/chunk-ULNF6GTG.mjs.map +7 -0
  22. package/dist/lib/{browser/close-M6YHTWUZ.mjs → neutral/close-L3FBJQ3J.mjs} +4 -2
  23. package/dist/lib/neutral/close-L3FBJQ3J.mjs.map +7 -0
  24. package/dist/lib/{browser → neutral/components}/index.mjs +12 -64
  25. package/dist/lib/neutral/components/index.mjs.map +7 -0
  26. package/dist/lib/neutral/core.mjs +8 -0
  27. package/dist/lib/neutral/core.mjs.map +7 -0
  28. package/dist/lib/neutral/harness.mjs +36 -0
  29. package/dist/lib/neutral/harness.mjs.map +7 -0
  30. package/dist/lib/neutral/index.mjs +20 -0
  31. package/dist/lib/neutral/index.mjs.map +7 -0
  32. package/dist/lib/neutral/meta.json +1 -0
  33. package/dist/lib/neutral/meta.mjs +8 -0
  34. package/dist/lib/neutral/meta.mjs.map +7 -0
  35. package/dist/lib/neutral/open-O5FFJF2B.mjs +17 -0
  36. package/dist/lib/neutral/open-O5FFJF2B.mjs.map +7 -0
  37. package/dist/lib/neutral/operation-handler-LQIWHQVY.mjs +13 -0
  38. package/dist/lib/neutral/operation-handler-LQIWHQVY.mjs.map +7 -0
  39. package/dist/lib/neutral/operations/index.mjs +8 -0
  40. package/dist/lib/neutral/operations/index.mjs.map +7 -0
  41. package/dist/lib/neutral/plugin.mjs +16 -0
  42. package/dist/lib/neutral/plugin.mjs.map +7 -0
  43. package/dist/lib/{browser/scroll-into-view-UAINWR6E.mjs → neutral/scroll-into-view-BKOOOECC.mjs} +4 -2
  44. package/dist/lib/neutral/scroll-into-view-BKOOOECC.mjs.map +7 -0
  45. package/dist/lib/{browser/set-layout-mode-E6SJ6ATN.mjs → neutral/set-layout-mode-2KHD2AEY.mjs} +4 -2
  46. package/dist/lib/neutral/set-layout-mode-2KHD2AEY.mjs.map +7 -0
  47. package/dist/lib/{browser/state-MRRN7LZE.mjs → neutral/state-AJ62JEEG.mjs} +5 -6
  48. package/dist/lib/neutral/state-AJ62JEEG.mjs.map +7 -0
  49. package/dist/lib/{browser/switch-workspace-RPYF6M6L.mjs → neutral/switch-workspace-SAT2NGXV.mjs} +5 -4
  50. package/dist/lib/{node-esm/switch-workspace-ZDUCWF6E.mjs.map → neutral/switch-workspace-SAT2NGXV.mjs.map} +1 -1
  51. package/dist/lib/neutral/types/index.mjs +8 -0
  52. package/dist/lib/neutral/types/index.mjs.map +7 -0
  53. package/dist/lib/{browser/update-complementary-HNS4FIWF.mjs → neutral/update-complementary-JP2OL73Z.mjs} +5 -4
  54. package/dist/lib/{node-esm/update-complementary-LAPUAZ5I.mjs.map → neutral/update-complementary-JP2OL73Z.mjs.map} +1 -1
  55. package/dist/lib/{browser/update-dialog-W7QOCQ2N.mjs → neutral/update-dialog-MX6IKKJX.mjs} +5 -4
  56. package/dist/lib/{node-esm/update-dialog-5M7FL4XG.mjs.map → neutral/update-dialog-MX6IKKJX.mjs.map} +1 -1
  57. package/dist/lib/{browser/update-popover-UELZDJW6.mjs → neutral/update-popover-DOORE3TD.mjs} +5 -4
  58. package/dist/lib/neutral/update-popover-DOORE3TD.mjs.map +7 -0
  59. package/dist/lib/{browser/update-sidebar-RJZTREDE.mjs → neutral/update-sidebar-LWQ3IA6S.mjs} +5 -4
  60. package/dist/lib/{node-esm/update-sidebar-CU6TUDK5.mjs.map → neutral/update-sidebar-LWQ3IA6S.mjs.map} +1 -1
  61. package/dist/types/src/StorybookPlugin.d.ts +3 -2
  62. package/dist/types/src/StorybookPlugin.d.ts.map +1 -1
  63. package/dist/types/src/capabilities/index.d.ts +15 -2
  64. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  65. package/dist/types/src/capabilities/{operation-handler/operation-handler.d.ts → operation-handler.d.ts} +1 -1
  66. package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
  67. package/dist/types/src/capabilities/{state/state.d.ts → state.d.ts} +3 -3
  68. package/dist/types/src/capabilities/state.d.ts.map +1 -0
  69. package/dist/types/src/components/Layout/Layout.d.ts.map +1 -1
  70. package/dist/types/src/core.d.ts.map +1 -1
  71. package/dist/types/src/harness.d.ts +20 -0
  72. package/dist/types/src/harness.d.ts.map +1 -0
  73. package/dist/types/src/index.d.ts +1 -0
  74. package/dist/types/src/index.d.ts.map +1 -1
  75. package/dist/types/src/meta.d.ts.map +1 -1
  76. package/dist/types/src/operations/add-toast.d.ts +1 -1
  77. package/dist/types/src/operations/add-toast.d.ts.map +1 -1
  78. package/dist/types/src/operations/close.d.ts +1 -1
  79. package/dist/types/src/operations/close.d.ts.map +1 -1
  80. package/dist/types/src/operations/index.d.ts +1 -1
  81. package/dist/types/src/operations/index.d.ts.map +1 -1
  82. package/dist/types/src/operations/open.d.ts +1 -1
  83. package/dist/types/src/operations/open.d.ts.map +1 -1
  84. package/dist/types/src/operations/scroll-into-view.d.ts +1 -1
  85. package/dist/types/src/operations/scroll-into-view.d.ts.map +1 -1
  86. package/dist/types/src/operations/set-layout-mode.d.ts +1 -1
  87. package/dist/types/src/operations/set-layout-mode.d.ts.map +1 -1
  88. package/dist/types/src/operations/switch-workspace.d.ts +1 -1
  89. package/dist/types/src/operations/switch-workspace.d.ts.map +1 -1
  90. package/dist/types/src/operations/update-complementary.d.ts +1 -1
  91. package/dist/types/src/operations/update-complementary.d.ts.map +1 -1
  92. package/dist/types/src/operations/update-dialog.d.ts +1 -1
  93. package/dist/types/src/operations/update-dialog.d.ts.map +1 -1
  94. package/dist/types/src/operations/update-popover.d.ts +1 -1
  95. package/dist/types/src/operations/update-popover.d.ts.map +1 -1
  96. package/dist/types/src/operations/update-sidebar.d.ts +1 -1
  97. package/dist/types/src/operations/update-sidebar.d.ts.map +1 -1
  98. package/dist/types/src/operations/update-state.d.ts +2 -2
  99. package/dist/types/src/operations/update-state.d.ts.map +1 -1
  100. package/dist/types/src/plugin.d.ts +5 -0
  101. package/dist/types/src/plugin.d.ts.map +1 -0
  102. package/dist/types/src/types/{capabilities.d.ts → StorybookCapabilities.d.ts} +1 -1
  103. package/dist/types/src/types/StorybookCapabilities.d.ts.map +1 -0
  104. package/dist/types/src/types/index.d.ts +1 -1
  105. package/dist/types/src/types/index.d.ts.map +1 -1
  106. package/dist/types/tsconfig.tsbuildinfo +1 -1
  107. package/package.json +60 -17
  108. package/src/StorybookPlugin.ts +8 -6
  109. package/src/capabilities/index.ts +8 -2
  110. package/src/capabilities/{operation-handler/operation-handler.ts → operation-handler.ts} +2 -2
  111. package/src/capabilities/{state/state.tsx → state.tsx} +8 -5
  112. package/src/components/Layout/Layout.tsx +16 -10
  113. package/src/core.ts +19 -7
  114. package/src/harness.ts +51 -0
  115. package/src/index.ts +6 -0
  116. package/src/meta.ts +1 -0
  117. package/src/operations/add-toast.ts +1 -1
  118. package/src/operations/close.ts +1 -1
  119. package/src/operations/index.ts +1 -1
  120. package/src/operations/open.ts +8 -2
  121. package/src/operations/scroll-into-view.ts +1 -1
  122. package/src/operations/set-layout-mode.ts +1 -1
  123. package/src/operations/switch-workspace.ts +1 -1
  124. package/src/operations/update-complementary.ts +1 -1
  125. package/src/operations/update-dialog.ts +1 -1
  126. package/src/operations/update-popover.ts +3 -3
  127. package/src/operations/update-sidebar.ts +1 -1
  128. package/src/operations/update-state.ts +5 -3
  129. package/src/plugin.ts +12 -0
  130. package/src/types/{capabilities.ts → StorybookCapabilities.ts} +3 -1
  131. package/src/types/index.ts +1 -1
  132. package/dist/lib/browser/add-toast-M6ZVP2PQ.mjs.map +0 -7
  133. package/dist/lib/browser/chunk-F2MMDTKN.mjs.map +0 -7
  134. package/dist/lib/browser/chunk-M4TYMLOE.mjs.map +0 -7
  135. package/dist/lib/browser/close-M6YHTWUZ.mjs.map +0 -7
  136. package/dist/lib/browser/index.mjs.map +0 -7
  137. package/dist/lib/browser/meta.json +0 -1
  138. package/dist/lib/browser/open-ND4QPYWD.mjs +0 -10
  139. package/dist/lib/browser/open-ND4QPYWD.mjs.map +0 -7
  140. package/dist/lib/browser/operation-handler-DUWMXELV.mjs +0 -16
  141. package/dist/lib/browser/operation-handler-DUWMXELV.mjs.map +0 -7
  142. package/dist/lib/browser/scroll-into-view-UAINWR6E.mjs.map +0 -7
  143. package/dist/lib/browser/set-layout-mode-E6SJ6ATN.mjs.map +0 -7
  144. package/dist/lib/browser/state-MRRN7LZE.mjs.map +0 -7
  145. package/dist/lib/browser/switch-workspace-RPYF6M6L.mjs.map +0 -7
  146. package/dist/lib/browser/update-complementary-HNS4FIWF.mjs.map +0 -7
  147. package/dist/lib/browser/update-dialog-W7QOCQ2N.mjs.map +0 -7
  148. package/dist/lib/browser/update-popover-UELZDJW6.mjs.map +0 -7
  149. package/dist/lib/browser/update-sidebar-RJZTREDE.mjs.map +0 -7
  150. package/dist/lib/node-esm/add-toast-VMEADC7Y.mjs +0 -23
  151. package/dist/lib/node-esm/chunk-VDX7GMAD.mjs +0 -23
  152. package/dist/lib/node-esm/chunk-VDX7GMAD.mjs.map +0 -7
  153. package/dist/lib/node-esm/chunk-ZLM7QUEK.mjs +0 -22
  154. package/dist/lib/node-esm/chunk-ZLM7QUEK.mjs.map +0 -7
  155. package/dist/lib/node-esm/close-B54TW3OK.mjs +0 -12
  156. package/dist/lib/node-esm/close-B54TW3OK.mjs.map +0 -7
  157. package/dist/lib/node-esm/index.mjs +0 -236
  158. package/dist/lib/node-esm/index.mjs.map +0 -7
  159. package/dist/lib/node-esm/meta.json +0 -1
  160. package/dist/lib/node-esm/open-OLJQ7VR3.mjs +0 -12
  161. package/dist/lib/node-esm/open-OLJQ7VR3.mjs.map +0 -7
  162. package/dist/lib/node-esm/operation-handler-TCIEZXBS.mjs +0 -18
  163. package/dist/lib/node-esm/operation-handler-TCIEZXBS.mjs.map +0 -7
  164. package/dist/lib/node-esm/scroll-into-view-C3XK4YMK.mjs +0 -12
  165. package/dist/lib/node-esm/scroll-into-view-C3XK4YMK.mjs.map +0 -7
  166. package/dist/lib/node-esm/set-layout-mode-AEQI6AVR.mjs +0 -12
  167. package/dist/lib/node-esm/set-layout-mode-AEQI6AVR.mjs.map +0 -7
  168. package/dist/lib/node-esm/state-PVDE6Q6G.mjs +0 -45
  169. package/dist/lib/node-esm/state-PVDE6Q6G.mjs.map +0 -7
  170. package/dist/lib/node-esm/switch-workspace-ZDUCWF6E.mjs +0 -20
  171. package/dist/lib/node-esm/update-complementary-LAPUAZ5I.mjs +0 -26
  172. package/dist/lib/node-esm/update-dialog-5M7FL4XG.mjs +0 -28
  173. package/dist/lib/node-esm/update-popover-2TDGFHL3.mjs +0 -46
  174. package/dist/lib/node-esm/update-popover-2TDGFHL3.mjs.map +0 -7
  175. package/dist/lib/node-esm/update-sidebar-CU6TUDK5.mjs +0 -26
  176. package/dist/types/src/capabilities/operation-handler/index.d.ts +0 -4
  177. package/dist/types/src/capabilities/operation-handler/index.d.ts.map +0 -1
  178. package/dist/types/src/capabilities/operation-handler/operation-handler.d.ts.map +0 -1
  179. package/dist/types/src/capabilities/state/index.d.ts +0 -14
  180. package/dist/types/src/capabilities/state/index.d.ts.map +0 -1
  181. package/dist/types/src/capabilities/state/state.d.ts.map +0 -1
  182. package/dist/types/src/types/capabilities.d.ts.map +0 -1
  183. package/src/capabilities/operation-handler/index.ts +0 -11
  184. package/src/capabilities/state/index.ts +0 -7
@@ -1,236 +0,0 @@
1
- import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
- import {
3
- LayoutState,
4
- meta
5
- } from "./chunk-VDX7GMAD.mjs";
6
-
7
- // src/core.ts
8
- import { OperationPlugin, RuntimePlugin } from "@dxos/app-framework";
9
- import { AttentionPlugin } from "@dxos/plugin-attention";
10
- import { GraphPlugin } from "@dxos/plugin-graph";
11
- import { SettingsPlugin } from "@dxos/plugin-settings";
12
- import { ThemePlugin } from "@dxos/plugin-theme";
13
- import { defaultTx } from "@dxos/ui-theme";
14
- var corePlugins = () => [
15
- AttentionPlugin(),
16
- GraphPlugin(),
17
- OperationPlugin(),
18
- RuntimePlugin(),
19
- SettingsPlugin(),
20
- ThemePlugin({
21
- tx: defaultTx
22
- })
23
- ];
24
-
25
- // src/StorybookPlugin.ts
26
- import * as Effect from "effect/Effect";
27
- import { ActivationEvents, Capabilities, Capability as Capability3, Plugin } from "@dxos/app-framework";
28
- import { AppActivationEvents, AppPlugin } from "@dxos/app-toolkit";
29
-
30
- // src/capabilities/operation-handler/index.ts
31
- import { Capability } from "@dxos/app-framework";
32
- var OperationHandler = Capability.lazy("OperationHandler", () => import("./operation-handler-TCIEZXBS.mjs"));
33
-
34
- // src/capabilities/state/index.ts
35
- import { Capability as Capability2 } from "@dxos/app-framework";
36
- var State = Capability2.lazy("State", () => import("./state-PVDE6Q6G.mjs"));
37
-
38
- // src/components/Layout/Layout.tsx
39
- import { RegistryContext, useAtomValue } from "@effect-atom/atom-react";
40
- import React, { useCallback, useContext, useEffect, useRef, useState } from "react";
41
- import { Surface, useCapability } from "@dxos/app-framework/ui";
42
- import { AlertDialog, Button, Dialog, Icon, Main, Popover, Toast, toLocalizedString, useTranslation } from "@dxos/react-ui";
43
- import { Card } from "@dxos/react-ui";
44
- import { Mosaic } from "@dxos/react-ui-mosaic";
45
- import { descriptionMessage, mx } from "@dxos/ui-theme";
46
- var debounce_delay = 100;
47
- var StoryToast = ({ toast, onDismiss }) => {
48
- const { t } = useTranslation(meta.id);
49
- return /* @__PURE__ */ React.createElement(Toast.Root, {
50
- "data-testid": toast.id,
51
- defaultOpen: true,
52
- duration: toast.duration,
53
- onOpenChange: (open) => {
54
- if (!open) {
55
- onDismiss(toast.id);
56
- }
57
- }
58
- }, /* @__PURE__ */ React.createElement(Toast.Body, null, /* @__PURE__ */ React.createElement(Toast.Title, {
59
- classNames: "items-center"
60
- }, toast.icon && /* @__PURE__ */ React.createElement(Icon, {
61
- icon: toast.icon,
62
- classNames: "inline mr-1"
63
- }), toast.title && /* @__PURE__ */ React.createElement("span", null, toLocalizedString(toast.title, t))), toast.description && /* @__PURE__ */ React.createElement(Toast.Description, null, toLocalizedString(toast.description, t))), /* @__PURE__ */ React.createElement(Toast.Actions, null, toast.onAction && toast.actionAlt && toast.actionLabel && /* @__PURE__ */ React.createElement(Toast.Action, {
64
- altText: toLocalizedString(toast.actionAlt, t),
65
- asChild: true
66
- }, /* @__PURE__ */ React.createElement(Button, {
67
- variant: "primary",
68
- onClick: () => toast.onAction?.()
69
- }, toLocalizedString(toast.actionLabel, t))), toast.closeLabel && /* @__PURE__ */ React.createElement(Toast.Close, {
70
- asChild: true
71
- }, /* @__PURE__ */ React.createElement(Button, null, toLocalizedString(toast.closeLabel, t)))));
72
- };
73
- var Layout = ({ children }) => {
74
- const { t } = useTranslation(meta.id);
75
- const trigger = useRef(null);
76
- const registry = useContext(RegistryContext);
77
- const stateAtom = useCapability(LayoutState);
78
- const layout = useAtomValue(stateAtom);
79
- const [iter, setIter] = useState(0);
80
- const [open, setOpen] = useState(false);
81
- const debounceRef = useRef(null);
82
- const updateState = useCallback((updates) => {
83
- const current = registry.get(stateAtom);
84
- registry.set(stateAtom, {
85
- ...current,
86
- ...updates
87
- });
88
- }, [
89
- registry,
90
- stateAtom
91
- ]);
92
- useEffect(() => {
93
- setOpen(false);
94
- if (debounceRef.current) {
95
- clearTimeout(debounceRef.current);
96
- debounceRef.current = null;
97
- }
98
- trigger.current = layout.popoverAnchor ?? null;
99
- setIter((iter2) => iter2 + 1);
100
- if (layout.popoverOpen) {
101
- debounceRef.current = setTimeout(() => setOpen(true), debounce_delay);
102
- }
103
- }, [
104
- layout.popoverAnchor,
105
- layout.popoverContent,
106
- layout.popoverOpen
107
- ]);
108
- const handleClose = useCallback(() => {
109
- setOpen(false);
110
- updateState({
111
- popoverOpen: false,
112
- popoverAnchor: void 0,
113
- popoverAnchorId: void 0,
114
- popoverSide: void 0
115
- });
116
- }, [
117
- updateState
118
- ]);
119
- const handleInteractOutside = useCallback((event) => {
120
- if (
121
- // TODO(thure): CodeMirror should not focus itself when it updates.
122
- event.type === "dismissableLayer.focusOutside" && event.currentTarget?.classList.contains("cm-content")
123
- ) {
124
- event.preventDefault();
125
- } else {
126
- handleClose();
127
- }
128
- }, [
129
- handleClose
130
- ]);
131
- const handleDismissToast = useCallback((id) => {
132
- updateState({
133
- toasts: layout.toasts.filter((toast) => toast.id !== id)
134
- });
135
- }, [
136
- updateState,
137
- layout.toasts
138
- ]);
139
- const DialogRoot = layout.dialogType === "alert" ? AlertDialog.Root : Dialog.Root;
140
- const DialogOverlay = layout.dialogType === "alert" ? AlertDialog.Overlay : Dialog.Overlay;
141
- return /* @__PURE__ */ React.createElement(Toast.Provider, null, /* @__PURE__ */ React.createElement("div", {
142
- role: "none",
143
- className: "fixed inset-0 flex overflow-hidden"
144
- }, /* @__PURE__ */ React.createElement(Mosaic.Root, null, /* @__PURE__ */ React.createElement(Popover.Root, {
145
- open
146
- }, /* @__PURE__ */ React.createElement(Main.Root, {
147
- navigationSidebarState: layout.sidebarState,
148
- complementarySidebarState: layout.complementarySidebarState,
149
- onNavigationSidebarStateChange: (next) => updateState({
150
- sidebarState: next
151
- }),
152
- onComplementarySidebarStateChange: (next) => updateState({
153
- complementarySidebarState: next
154
- })
155
- }, children), /* @__PURE__ */ React.createElement(DialogRoot, {
156
- modal: layout.dialogBlockAlign !== "end",
157
- open: layout.dialogOpen,
158
- onOpenChange: (nextOpen) => updateState({
159
- dialogOpen: nextOpen
160
- })
161
- }, layout.dialogBlockAlign === "end" ? /* @__PURE__ */ React.createElement(Surface.Surface, {
162
- role: "dialog",
163
- data: layout.dialogContent,
164
- limit: 1,
165
- fallback: ErrorFallback,
166
- placeholder: /* @__PURE__ */ React.createElement("div", null)
167
- }) : /* @__PURE__ */ React.createElement(DialogOverlay, {
168
- blockAlign: layout.dialogBlockAlign,
169
- classNames: layout.dialogOverlayClasses,
170
- style: layout.dialogOverlayStyle
171
- }, /* @__PURE__ */ React.createElement(Surface.Surface, {
172
- role: "dialog",
173
- data: layout.dialogContent,
174
- limit: 1,
175
- fallback: ErrorFallback
176
- }))), /* @__PURE__ */ React.createElement(Popover.VirtualTrigger, {
177
- key: iter,
178
- virtualRef: trigger
179
- }), /* @__PURE__ */ React.createElement(Popover.Portal, null, /* @__PURE__ */ React.createElement(Popover.Content, {
180
- side: layout.popoverSide,
181
- onInteractOutside: handleInteractOutside,
182
- onEscapeKeyDown: handleInteractOutside,
183
- sticky: "always",
184
- hideWhenDetached: true
185
- }, /* @__PURE__ */ React.createElement(Popover.Viewport, null, layout.popoverKind === "card" && /* @__PURE__ */ React.createElement(Card.Root, null, /* @__PURE__ */ React.createElement(Card.Toolbar, null, /* @__PURE__ */ React.createElement("span", null), layout.popoverTitle ? /* @__PURE__ */ React.createElement(Card.Title, null, toLocalizedString(layout.popoverTitle, t)) : /* @__PURE__ */ React.createElement("span", null), /* @__PURE__ */ React.createElement(Card.CloseIconButton, {
186
- onClick: handleClose
187
- })), /* @__PURE__ */ React.createElement(Surface.Surface, {
188
- role: "card--content",
189
- data: layout.popoverContent,
190
- limit: 1
191
- })), layout.popoverKind === "base" && /* @__PURE__ */ React.createElement(Surface.Surface, {
192
- role: "popover",
193
- data: layout.popoverContent,
194
- limit: 1
195
- })), /* @__PURE__ */ React.createElement(Popover.Arrow, null))))), layout.toasts.map((toast) => /* @__PURE__ */ React.createElement(StoryToast, {
196
- key: toast.id,
197
- toast,
198
- onDismiss: handleDismissToast
199
- })), /* @__PURE__ */ React.createElement(Toast.Viewport, null)));
200
- };
201
- var ErrorFallback = ({ error }) => {
202
- const { t } = useTranslation(meta.id);
203
- const errorString = error?.toString() ?? "";
204
- return /* @__PURE__ */ React.createElement("div", {
205
- role: "alert",
206
- "data-testid": "error-boundary-fallback",
207
- className: mx("overflow-auto p-8 dx-attention-surface grid place-items-center")
208
- }, /* @__PURE__ */ React.createElement("p", {
209
- className: mx(descriptionMessage, "break-words rounded-md p-8", errorString.length < 256 && "text-lg")
210
- }, error ? errorString : t("error fallback message")));
211
- };
212
-
213
- // src/StorybookPlugin.ts
214
- var StorybookPlugin = Plugin.define(meta).pipe(AppPlugin.addOperationHandlerModule({
215
- activate: OperationHandler
216
- }), AppPlugin.addReactContextModule({
217
- activate: () => Effect.succeed(Capability3.contributes(Capabilities.ReactContext, {
218
- id: "storybook-layout",
219
- context: Layout
220
- }))
221
- }), Plugin.addModule(({ initialState }) => ({
222
- id: Capability3.getModuleTag(State),
223
- activatesOn: ActivationEvents.Startup,
224
- activatesAfter: [
225
- AppActivationEvents.LayoutReady
226
- ],
227
- activate: () => State({
228
- initialState
229
- })
230
- })), Plugin.make);
231
- export {
232
- StorybookPlugin,
233
- corePlugins,
234
- meta
235
- };
236
- //# sourceMappingURL=index.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/core.ts", "../../../src/StorybookPlugin.ts", "../../../src/capabilities/operation-handler/index.ts", "../../../src/capabilities/state/index.ts", "../../../src/components/Layout/Layout.tsx"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { OperationPlugin, type Plugin, RuntimePlugin } from '@dxos/app-framework';\nimport { AttentionPlugin } from '@dxos/plugin-attention';\nimport { GraphPlugin } from '@dxos/plugin-graph';\nimport { SettingsPlugin } from '@dxos/plugin-settings';\nimport { ThemePlugin } from '@dxos/plugin-theme';\nimport { defaultTx } from '@dxos/ui-theme';\n\n/**\n * Core plugins for testing/storybook environments.\n * NOTE: Does not include SpacePlugin to avoid circular dependencies.\n * Import SpacePlugin directly in your stories if needed.\n */\nexport const corePlugins = (): Plugin.Plugin[] => [\n AttentionPlugin(),\n GraphPlugin(),\n OperationPlugin(),\n RuntimePlugin(),\n SettingsPlugin(),\n ThemePlugin({ tx: defaultTx }),\n];\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { ActivationEvents, Capabilities, Capability, Plugin } from '@dxos/app-framework';\nimport { AppActivationEvents, AppPlugin } from '@dxos/app-toolkit';\n\nimport { OperationHandler, State } from './capabilities';\nimport { Layout } from './components';\nimport { meta } from './meta';\nimport { type LayoutStateProps } from './types';\n\nexport type StorybookPluginOptions = {\n initialState?: Partial<LayoutStateProps>;\n};\n\nexport const StorybookPlugin = Plugin.define<StorybookPluginOptions>(meta).pipe(\n AppPlugin.addOperationHandlerModule({\n activate: OperationHandler,\n }),\n AppPlugin.addReactContextModule({\n activate: () =>\n Effect.succeed(\n Capability.contributes(Capabilities.ReactContext, {\n id: 'storybook-layout',\n context: Layout,\n }),\n ),\n }),\n Plugin.addModule(({ initialState }) => ({\n id: Capability.getModuleTag(State),\n activatesOn: ActivationEvents.Startup,\n activatesAfter: [AppActivationEvents.LayoutReady],\n activate: () => State({ initialState }),\n })),\n Plugin.make,\n);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capability } from '@dxos/app-framework';\nimport { OperationHandlerSet } from '@dxos/operation';\n\nexport const OperationHandler = Capability.lazy<OperationHandlerSet.OperationHandlerSet>(\n 'OperationHandler',\n () => import('./operation-handler'),\n);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capability } from '@dxos/app-framework';\n\nexport const State = Capability.lazy('State', () => import('./state'));\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { RegistryContext, useAtomValue } from '@effect-atom/atom-react';\nimport React, { type PropsWithChildren, useCallback, useContext, useEffect, useRef, useState } from 'react';\n\nimport { Surface, useCapability } from '@dxos/app-framework/ui';\nimport { type LayoutOperation } from '@dxos/app-toolkit';\nimport {\n AlertDialog,\n Button,\n Dialog,\n Icon,\n Main,\n Popover,\n type PopoverContentInteractOutsideEvent,\n Toast,\n toLocalizedString,\n useTranslation,\n} from '@dxos/react-ui';\nimport { Card } from '@dxos/react-ui';\nimport { Mosaic } from '@dxos/react-ui-mosaic';\nimport { descriptionMessage, mx } from '@dxos/ui-theme';\n\nimport { meta } from '../../meta';\nimport { LayoutState, type LayoutStateProps } from '../../types';\n\nconst debounce_delay = 100;\n\nconst StoryToast = ({ toast, onDismiss }: { toast: LayoutOperation.Toast; onDismiss: (id: string) => void }) => {\n const { t } = useTranslation(meta.id);\n return (\n <Toast.Root\n data-testid={toast.id}\n defaultOpen\n duration={toast.duration}\n onOpenChange={(open) => {\n if (!open) {\n onDismiss(toast.id);\n }\n }}\n >\n <Toast.Body>\n <Toast.Title classNames='items-center'>\n {toast.icon && <Icon icon={toast.icon} classNames='inline mr-1' />}\n {toast.title && <span>{toLocalizedString(toast.title, t)}</span>}\n </Toast.Title>\n {toast.description && <Toast.Description>{toLocalizedString(toast.description, t)}</Toast.Description>}\n </Toast.Body>\n <Toast.Actions>\n {toast.onAction && toast.actionAlt && toast.actionLabel && (\n <Toast.Action altText={toLocalizedString(toast.actionAlt, t)} asChild>\n <Button variant='primary' onClick={() => toast.onAction?.()}>\n {toLocalizedString(toast.actionLabel, t)}\n </Button>\n </Toast.Action>\n )}\n {toast.closeLabel && (\n <Toast.Close asChild>\n <Button>{toLocalizedString(toast.closeLabel, t)}</Button>\n </Toast.Close>\n )}\n </Toast.Actions>\n </Toast.Root>\n );\n};\n\nexport const Layout = ({ children }: PropsWithChildren<{}>) => {\n const { t } = useTranslation(meta.id);\n const trigger = useRef<HTMLButtonElement | null>(null);\n const registry = useContext(RegistryContext);\n const stateAtom = useCapability(LayoutState);\n const layout = useAtomValue(stateAtom);\n const [iter, setIter] = useState(0);\n const [open, setOpen] = useState(false);\n const debounceRef = useRef<NodeJS.Timeout | null>(null);\n\n const updateState = useCallback(\n (updates: Partial<LayoutStateProps>) => {\n const current = registry.get(stateAtom);\n registry.set(stateAtom, { ...current, ...updates });\n },\n [registry, stateAtom],\n );\n\n useEffect(() => {\n setOpen(false);\n if (debounceRef.current) {\n clearTimeout(debounceRef.current);\n debounceRef.current = null;\n }\n trigger.current = layout.popoverAnchor ?? null;\n setIter((iter) => iter + 1);\n if (layout.popoverOpen) {\n debounceRef.current = setTimeout(() => setOpen(true), debounce_delay);\n }\n }, [layout.popoverAnchor, layout.popoverContent, layout.popoverOpen]);\n\n const handleClose = useCallback(() => {\n setOpen(false);\n updateState({\n popoverOpen: false,\n popoverAnchor: undefined,\n popoverAnchorId: undefined,\n popoverSide: undefined,\n });\n }, [updateState]);\n\n const handleInteractOutside = useCallback(\n (event: KeyboardEvent | PopoverContentInteractOutsideEvent) => {\n if (\n // TODO(thure): CodeMirror should not focus itself when it updates.\n event.type === 'dismissableLayer.focusOutside' &&\n (event.currentTarget as HTMLElement | undefined)?.classList.contains('cm-content')\n ) {\n event.preventDefault();\n } else {\n handleClose();\n }\n },\n [handleClose],\n );\n\n const handleDismissToast = useCallback(\n (id: string) => {\n updateState({ toasts: layout.toasts.filter((toast) => toast.id !== id) });\n },\n [updateState, layout.toasts],\n );\n\n const DialogRoot = layout.dialogType === 'alert' ? AlertDialog.Root : Dialog.Root;\n const DialogOverlay = layout.dialogType === 'alert' ? AlertDialog.Overlay : Dialog.Overlay;\n\n return (\n <Toast.Provider>\n <div role='none' className='fixed inset-0 flex overflow-hidden'>\n <Mosaic.Root>\n <Popover.Root open={open}>\n <Main.Root\n navigationSidebarState={layout.sidebarState}\n complementarySidebarState={layout.complementarySidebarState}\n onNavigationSidebarStateChange={(next) => updateState({ sidebarState: next })}\n onComplementarySidebarStateChange={(next) => updateState({ complementarySidebarState: next })}\n >\n {children}\n </Main.Root>\n\n <DialogRoot\n modal={layout.dialogBlockAlign !== 'end'}\n open={layout.dialogOpen}\n onOpenChange={(nextOpen) => updateState({ dialogOpen: nextOpen })}\n >\n {layout.dialogBlockAlign === 'end' ? (\n <Surface.Surface\n role='dialog'\n data={layout.dialogContent}\n limit={1}\n fallback={ErrorFallback}\n placeholder={<div />}\n />\n ) : (\n <DialogOverlay\n blockAlign={layout.dialogBlockAlign}\n classNames={layout.dialogOverlayClasses}\n style={layout.dialogOverlayStyle}\n >\n <Surface.Surface role='dialog' data={layout.dialogContent} limit={1} fallback={ErrorFallback} />\n </DialogOverlay>\n )}\n </DialogRoot>\n\n <Popover.VirtualTrigger key={iter} virtualRef={trigger} />\n <Popover.Portal>\n <Popover.Content\n side={layout.popoverSide}\n onInteractOutside={handleInteractOutside}\n onEscapeKeyDown={handleInteractOutside}\n sticky='always'\n hideWhenDetached\n >\n <Popover.Viewport>\n {layout.popoverKind === 'card' && (\n <Card.Root>\n <Card.Toolbar>\n {/* TODO(wittjosiah): Cleaner way to handle no drag handle in toolbar? */}\n <span />\n {layout.popoverTitle ? (\n <Card.Title>{toLocalizedString(layout.popoverTitle, t)}</Card.Title>\n ) : (\n <span />\n )}\n <Card.CloseIconButton onClick={handleClose} />\n </Card.Toolbar>\n <Surface.Surface role='card--content' data={layout.popoverContent} limit={1} />\n </Card.Root>\n )}\n {layout.popoverKind === 'base' && (\n <Surface.Surface role='popover' data={layout.popoverContent} limit={1} />\n )}\n </Popover.Viewport>\n <Popover.Arrow />\n </Popover.Content>\n </Popover.Portal>\n </Popover.Root>\n </Mosaic.Root>\n {layout.toasts.map((toast) => (\n <StoryToast key={toast.id} toast={toast} onDismiss={handleDismissToast} />\n ))}\n <Toast.Viewport />\n </div>\n </Toast.Provider>\n );\n};\n\nexport const ErrorFallback = ({ error }: { error?: Error }) => {\n const { t } = useTranslation(meta.id);\n const errorString = error?.toString() ?? '';\n return (\n <div\n role='alert'\n data-testid='error-boundary-fallback'\n className={mx('overflow-auto p-8 dx-attention-surface grid place-items-center')}\n >\n <p className={mx(descriptionMessage, 'break-words rounded-md p-8', errorString.length < 256 && 'text-lg')}>\n {error ? errorString : t('error fallback message')}\n </p>\n </div>\n );\n};\n"],
5
- "mappings": ";;;;;;;AAIA,SAASA,iBAA8BC,qBAAqB;AAC5D,SAASC,uBAAuB;AAChC,SAASC,mBAAmB;AAC5B,SAASC,sBAAsB;AAC/B,SAASC,mBAAmB;AAC5B,SAASC,iBAAiB;AAOnB,IAAMC,cAAc,MAAuB;EAChDC,gBAAAA;EACAC,YAAAA;EACAC,gBAAAA;EACAC,cAAAA;EACAC,eAAAA;EACAC,YAAY;IAAEC,IAAIC;EAAU,CAAA;;;;AClB9B,YAAYC,YAAY;AAExB,SAASC,kBAAkBC,cAAcC,cAAAA,aAAYC,cAAc;AACnE,SAASC,qBAAqBC,iBAAiB;;;ACH/C,SAASC,kBAAkB;AAGpB,IAAMC,mBAAmBC,WAAWC,KACzC,oBACA,MAAM,OAAO,kCAAA,CAAA;;;ACLf,SAASC,cAAAA,mBAAkB;AAEpB,IAAMC,QAAQC,YAAWC,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EtD,sBAAA,cAACrE,MAAMoH,UAAQ,IAAA,CAAA,CAAA;AAIvB;AAEO,IAAMhB,gBAAgB,CAAC,EAAEwB,MAAK,MAAqB;AACxD,QAAM,EAAEhI,EAAC,IAAKC,eAAeC,KAAKC,EAAE;AACpC,QAAM8H,cAAcD,OAAOE,SAAAA,KAAc;AACzC,SACE,sBAAA,cAAC/C,OAAAA;IACCC,MAAK;IACL9E,eAAY;IACZ+E,WAAW8C,GAAG,gEAAA;KAEd,sBAAA,cAACC,KAAAA;IAAE/C,WAAW8C,GAAGE,oBAAoB,8BAA8BJ,YAAYK,SAAS,OAAO,SAAA;KAC5FN,QAAQC,cAAcjI,EAAE,wBAAA,CAAA,CAAA;AAIjC;;;AHnNO,IAAMuI,kBAAkBC,OAAOC,OAA+BC,IAAAA,EAAMC,KACzEC,UAAUC,0BAA0B;EAClCC,UAAUC;AACZ,CAAA,GACAH,UAAUI,sBAAsB;EAC9BF,UAAU,MACDG,eACLC,YAAWC,YAAYC,aAAaC,cAAc;IAChDC,IAAI;IACJC,SAASC;EACX,CAAA,CAAA;AAEN,CAAA,GACAhB,OAAOiB,UAAU,CAAC,EAAEC,aAAY,OAAQ;EACtCJ,IAAIJ,YAAWS,aAAaC,KAAAA;EAC5BC,aAAaC,iBAAiBC;EAC9BC,gBAAgB;IAACC,oBAAoBC;;EACrCpB,UAAU,MAAMc,MAAM;IAAEF;EAAa,CAAA;AACvC,EAAA,GACAlB,OAAO2B,IAAI;",
6
- "names": ["OperationPlugin", "RuntimePlugin", "AttentionPlugin", "GraphPlugin", "SettingsPlugin", "ThemePlugin", "defaultTx", "corePlugins", "AttentionPlugin", "GraphPlugin", "OperationPlugin", "RuntimePlugin", "SettingsPlugin", "ThemePlugin", "tx", "defaultTx", "Effect", "ActivationEvents", "Capabilities", "Capability", "Plugin", "AppActivationEvents", "AppPlugin", "Capability", "OperationHandler", "Capability", "lazy", "Capability", "State", "Capability", "lazy", "RegistryContext", "useAtomValue", "React", "useCallback", "useContext", "useEffect", "useRef", "useState", "Surface", "useCapability", "AlertDialog", "Button", "Dialog", "Icon", "Main", "Popover", "Toast", "toLocalizedString", "useTranslation", "Card", "Mosaic", "descriptionMessage", "mx", "debounce_delay", "StoryToast", "toast", "onDismiss", "t", "useTranslation", "meta", "id", "Toast", "Root", "data-testid", "defaultOpen", "duration", "onOpenChange", "open", "Body", "Title", "classNames", "icon", "Icon", "title", "span", "toLocalizedString", "description", "Description", "Actions", "onAction", "actionAlt", "actionLabel", "Action", "altText", "asChild", "Button", "variant", "onClick", "closeLabel", "Close", "Layout", "children", "trigger", "useRef", "registry", "useContext", "RegistryContext", "stateAtom", "useCapability", "LayoutState", "layout", "useAtomValue", "iter", "setIter", "useState", "setOpen", "debounceRef", "updateState", "useCallback", "updates", "current", "get", "set", "useEffect", "clearTimeout", "popoverAnchor", "popoverOpen", "setTimeout", "popoverContent", "handleClose", "undefined", "popoverAnchorId", "popoverSide", "handleInteractOutside", "event", "type", "currentTarget", "classList", "contains", "preventDefault", "handleDismissToast", "toasts", "filter", "DialogRoot", "dialogType", "AlertDialog", "Dialog", "DialogOverlay", "Overlay", "Provider", "div", "role", "className", "Mosaic", "Popover", "Main", "navigationSidebarState", "sidebarState", "complementarySidebarState", "onNavigationSidebarStateChange", "next", "onComplementarySidebarStateChange", "modal", "dialogBlockAlign", "dialogOpen", "nextOpen", "Surface", "data", "dialogContent", "limit", "fallback", "ErrorFallback", "placeholder", "blockAlign", "dialogOverlayClasses", "style", "dialogOverlayStyle", "VirtualTrigger", "key", "virtualRef", "Portal", "Content", "side", "onInteractOutside", "onEscapeKeyDown", "sticky", "hideWhenDetached", "Viewport", "popoverKind", "Card", "Toolbar", "popoverTitle", "CloseIconButton", "Arrow", "map", "error", "errorString", "toString", "mx", "p", "descriptionMessage", "length", "StorybookPlugin", "Plugin", "define", "meta", "pipe", "AppPlugin", "addOperationHandlerModule", "activate", "OperationHandler", "addReactContextModule", "succeed", "Capability", "contributes", "Capabilities", "ReactContext", "id", "context", "Layout", "addModule", "initialState", "getModuleTag", "State", "activatesOn", "ActivationEvents", "Startup", "activatesAfter", "AppActivationEvents", "LayoutReady", "make"]
7
- }
@@ -1 +0,0 @@
1
- {"inputs":{"src/core.ts":{"bytes":2660,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-attention","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"@dxos/plugin-settings","kind":"import-statement","external":true},{"path":"@dxos/plugin-theme","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true}],"format":"esm"},"src/meta.ts":{"bytes":1661,"imports":[{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/types/capabilities.ts":{"bytes":2261,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"src/types/index.ts":{"bytes":476,"imports":[{"path":"src/types/capabilities.ts","kind":"import-statement","original":"./capabilities"}],"format":"esm"},"src/operations/update-state.ts":{"bytes":2266,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"src/operations/add-toast.ts":{"bytes":2156,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/operation","kind":"import-statement","external":true},{"path":"src/operations/update-state.ts","kind":"import-statement","original":"./update-state"}],"format":"esm"},"src/operations/close.ts":{"bytes":1412,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/operation","kind":"import-statement","external":true}],"format":"esm"},"src/operations/open.ts":{"bytes":1402,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/operation","kind":"import-statement","external":true}],"format":"esm"},"src/operations/scroll-into-view.ts":{"bytes":1480,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/operation","kind":"import-statement","external":true}],"format":"esm"},"src/operations/set-layout-mode.ts":{"bytes":1474,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/operation","kind":"import-statement","external":true}],"format":"esm"},"src/operations/switch-workspace.ts":{"bytes":2035,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/operation","kind":"import-statement","external":true},{"path":"src/operations/update-state.ts","kind":"import-statement","original":"./update-state"}],"format":"esm"},"src/operations/update-complementary.ts":{"bytes":2748,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/operation","kind":"import-statement","external":true},{"path":"src/operations/update-state.ts","kind":"import-statement","original":"./update-state"}],"format":"esm"},"src/operations/update-dialog.ts":{"bytes":3378,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/operation","kind":"import-statement","external":true},{"path":"src/operations/update-state.ts","kind":"import-statement","original":"./update-state"}],"format":"esm"},"src/operations/update-popover.ts":{"bytes":4904,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/operation","kind":"import-statement","external":true},{"path":"src/operations/update-state.ts","kind":"import-statement","original":"./update-state"}],"format":"esm"},"src/operations/update-sidebar.ts":{"bytes":2549,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/operation","kind":"import-statement","external":true},{"path":"src/operations/update-state.ts","kind":"import-statement","original":"./update-state"}],"format":"esm"},"src/operations/index.ts":{"bytes":1914,"imports":[{"path":"@dxos/operation","kind":"import-statement","external":true},{"path":"src/operations/add-toast.ts","kind":"dynamic-import","original":"./add-toast"},{"path":"src/operations/close.ts","kind":"dynamic-import","original":"./close"},{"path":"src/operations/open.ts","kind":"dynamic-import","original":"./open"},{"path":"src/operations/scroll-into-view.ts","kind":"dynamic-import","original":"./scroll-into-view"},{"path":"src/operations/set-layout-mode.ts","kind":"dynamic-import","original":"./set-layout-mode"},{"path":"src/operations/switch-workspace.ts","kind":"dynamic-import","original":"./switch-workspace"},{"path":"src/operations/update-complementary.ts","kind":"dynamic-import","original":"./update-complementary"},{"path":"src/operations/update-dialog.ts","kind":"dynamic-import","original":"./update-dialog"},{"path":"src/operations/update-popover.ts","kind":"dynamic-import","original":"./update-popover"},{"path":"src/operations/update-sidebar.ts","kind":"dynamic-import","original":"./update-sidebar"}],"format":"esm"},"src/capabilities/operation-handler/operation-handler.ts":{"bytes":1813,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/operations/index.ts","kind":"import-statement","original":"../../operations"}],"format":"esm"},"src/capabilities/operation-handler/index.ts":{"bytes":1095,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/capabilities/operation-handler/operation-handler.ts","kind":"dynamic-import","original":"./operation-handler"}],"format":"esm"},"src/capabilities/state/state.tsx":{"bytes":4850,"imports":[{"path":"@effect-atom/atom-react","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"src/types/index.ts","kind":"import-statement","original":"../../types"}],"format":"esm"},"src/capabilities/state/index.ts":{"bytes":837,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/capabilities/state/state.tsx","kind":"dynamic-import","original":"./state"}],"format":"esm"},"src/capabilities/index.ts":{"bytes":577,"imports":[{"path":"src/capabilities/operation-handler/index.ts","kind":"import-statement","original":"./operation-handler"},{"path":"src/capabilities/state/index.ts","kind":"import-statement","original":"./state"}],"format":"esm"},"src/components/Layout/Layout.tsx":{"bytes":27830,"imports":[{"path":"@effect-atom/atom-react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework/ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-mosaic","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"src/meta.ts","kind":"import-statement","original":"../../meta"},{"path":"src/types/index.ts","kind":"import-statement","original":"../../types"}],"format":"esm"},"src/components/Layout/index.ts":{"bytes":474,"imports":[{"path":"src/components/Layout/Layout.tsx","kind":"import-statement","original":"./Layout"}],"format":"esm"},"src/components/index.ts":{"bytes":467,"imports":[{"path":"src/components/Layout/index.ts","kind":"import-statement","original":"./Layout"}],"format":"esm"},"src/StorybookPlugin.ts":{"bytes":4308,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"path":"src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"src/index.ts":{"bytes":637,"imports":[{"path":"src/core.ts","kind":"import-statement","original":"./core"},{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"src/StorybookPlugin.ts","kind":"import-statement","original":"./StorybookPlugin"}],"format":"esm"}},"outputs":{"dist/lib/node-esm/update-dialog-5M7FL4XG.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1777},"dist/lib/node-esm/update-dialog-5M7FL4XG.mjs":{"imports":[{"path":"dist/lib/node-esm/chunk-ZLM7QUEK.mjs","kind":"import-statement"},{"path":"dist/lib/node-esm/chunk-VDX7GMAD.mjs","kind":"import-statement"},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/operation","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/operations/update-dialog.ts","inputs":{"src/operations/update-dialog.ts":{"bytesInOutput":681}},"bytes":993},"dist/lib/node-esm/update-popover-2TDGFHL3.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2542},"dist/lib/node-esm/update-popover-2TDGFHL3.mjs":{"imports":[{"path":"dist/lib/node-esm/chunk-ZLM7QUEK.mjs","kind":"import-statement"},{"path":"dist/lib/node-esm/chunk-VDX7GMAD.mjs","kind":"import-statement"},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/operation","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/operations/update-popover.ts","inputs":{"src/operations/update-popover.ts":{"bytesInOutput":1073}},"bytes":1388},"dist/lib/node-esm/update-sidebar-CU6TUDK5.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1344},"dist/lib/node-esm/update-sidebar-CU6TUDK5.mjs":{"imports":[{"path":"dist/lib/node-esm/chunk-ZLM7QUEK.mjs","kind":"import-statement"},{"path":"dist/lib/node-esm/chunk-VDX7GMAD.mjs","kind":"import-statement"},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/operation","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/operations/update-sidebar.ts","inputs":{"src/operations/update-sidebar.ts":{"bytesInOutput":496}},"bytes":811},"dist/lib/node-esm/operation-handler-TCIEZXBS.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1882},"dist/lib/node-esm/operation-handler-TCIEZXBS.mjs":{"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/operation","kind":"import-statement","external":true},{"path":"dist/lib/node-esm/add-toast-VMEADC7Y.mjs","kind":"dynamic-import"},{"path":"dist/lib/node-esm/close-B54TW3OK.mjs","kind":"dynamic-import"},{"path":"dist/lib/node-esm/open-OLJQ7VR3.mjs","kind":"dynamic-import"},{"path":"dist/lib/node-esm/scroll-into-view-C3XK4YMK.mjs","kind":"dynamic-import"},{"path":"dist/lib/node-esm/set-layout-mode-AEQI6AVR.mjs","kind":"dynamic-import"},{"path":"dist/lib/node-esm/switch-workspace-ZDUCWF6E.mjs","kind":"dynamic-import"},{"path":"dist/lib/node-esm/update-complementary-LAPUAZ5I.mjs","kind":"dynamic-import"},{"path":"dist/lib/node-esm/update-dialog-5M7FL4XG.mjs","kind":"dynamic-import"},{"path":"dist/lib/node-esm/update-popover-2TDGFHL3.mjs","kind":"dynamic-import"},{"path":"dist/lib/node-esm/update-sidebar-CU6TUDK5.mjs","kind":"dynamic-import"}],"exports":["default"],"entryPoint":"src/capabilities/operation-handler/operation-handler.ts","inputs":{"src/capabilities/operation-handler/operation-handler.ts":{"bytesInOutput":289},"src/operations/index.ts":{"bytesInOutput":570}},"bytes":1206},"dist/lib/node-esm/state-PVDE6Q6G.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2578},"dist/lib/node-esm/state-PVDE6Q6G.mjs":{"imports":[{"path":"dist/lib/node-esm/chunk-VDX7GMAD.mjs","kind":"import-statement"},{"path":"@effect-atom/atom-react","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/capabilities/state/state.tsx","inputs":{"src/capabilities/state/state.tsx":{"bytesInOutput":1072}},"bytes":1338},"dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":19532},"dist/lib/node-esm/index.mjs":{"imports":[{"path":"dist/lib/node-esm/chunk-VDX7GMAD.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-attention","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"@dxos/plugin-settings","kind":"import-statement","external":true},{"path":"@dxos/plugin-theme","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"dist/lib/node-esm/operation-handler-TCIEZXBS.mjs","kind":"dynamic-import"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"dist/lib/node-esm/state-PVDE6Q6G.mjs","kind":"dynamic-import"},{"path":"@effect-atom/atom-react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework/ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-mosaic","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true}],"exports":["StorybookPlugin","corePlugins","meta"],"entryPoint":"src/index.ts","inputs":{"src/core.ts":{"bytesInOutput":494},"src/index.ts":{"bytesInOutput":0},"src/StorybookPlugin.ts":{"bytesInOutput":760},"src/capabilities/operation-handler/index.ts":{"bytesInOutput":160},"src/capabilities/index.ts":{"bytesInOutput":0},"src/capabilities/state/index.ts":{"bytesInOutput":142},"src/components/Layout/Layout.tsx":{"bytesInOutput":7402},"src/components/Layout/index.ts":{"bytesInOutput":0},"src/components/index.ts":{"bytesInOutput":0}},"bytes":9391},"dist/lib/node-esm/add-toast-VMEADC7Y.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1117},"dist/lib/node-esm/add-toast-VMEADC7Y.mjs":{"imports":[{"path":"dist/lib/node-esm/chunk-ZLM7QUEK.mjs","kind":"import-statement"},{"path":"dist/lib/node-esm/chunk-VDX7GMAD.mjs","kind":"import-statement"},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/operation","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/operations/add-toast.ts","inputs":{"src/operations/add-toast.ts":{"bytesInOutput":379}},"bytes":679},"dist/lib/node-esm/close-B54TW3OK.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":752},"dist/lib/node-esm/close-B54TW3OK.mjs":{"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/operation","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/operations/close.ts","inputs":{"src/operations/close.ts":{"bytesInOutput":252}},"bytes":455},"dist/lib/node-esm/open-OLJQ7VR3.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":747},"dist/lib/node-esm/open-OLJQ7VR3.mjs":{"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/operation","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/operations/open.ts","inputs":{"src/operations/open.ts":{"bytesInOutput":250}},"bytes":450},"dist/lib/node-esm/scroll-into-view-C3XK4YMK.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":790},"dist/lib/node-esm/scroll-into-view-C3XK4YMK.mjs":{"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/operation","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/operations/scroll-into-view.ts","inputs":{"src/operations/scroll-into-view.ts":{"bytesInOutput":272}},"bytes":508},"dist/lib/node-esm/set-layout-mode-AEQI6AVR.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":786},"dist/lib/node-esm/set-layout-mode-AEQI6AVR.mjs":{"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/operation","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/operations/set-layout-mode.ts","inputs":{"src/operations/set-layout-mode.ts":{"bytesInOutput":270}},"bytes":503},"dist/lib/node-esm/switch-workspace-ZDUCWF6E.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1073},"dist/lib/node-esm/switch-workspace-ZDUCWF6E.mjs":{"imports":[{"path":"dist/lib/node-esm/chunk-ZLM7QUEK.mjs","kind":"import-statement"},{"path":"dist/lib/node-esm/chunk-VDX7GMAD.mjs","kind":"import-statement"},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/operation","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/operations/switch-workspace.ts","inputs":{"src/operations/switch-workspace.ts":{"bytesInOutput":362}},"bytes":683},"dist/lib/node-esm/update-complementary-LAPUAZ5I.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1452},"dist/lib/node-esm/update-complementary-LAPUAZ5I.mjs":{"imports":[{"path":"dist/lib/node-esm/chunk-ZLM7QUEK.mjs","kind":"import-statement"},{"path":"dist/lib/node-esm/chunk-VDX7GMAD.mjs","kind":"import-statement"},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/operation","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/operations/update-complementary.ts","inputs":{"src/operations/update-complementary.ts":{"bytesInOutput":547}},"bytes":880},"dist/lib/node-esm/chunk-ZLM7QUEK.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1183},"dist/lib/node-esm/chunk-ZLM7QUEK.mjs":{"imports":[{"path":"dist/lib/node-esm/chunk-VDX7GMAD.mjs","kind":"import-statement"},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true}],"exports":["updateState"],"inputs":{"src/operations/update-state.ts":{"bytesInOutput":398}},"bytes":650},"dist/lib/node-esm/chunk-VDX7GMAD.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2119},"dist/lib/node-esm/chunk-VDX7GMAD.mjs":{"imports":[{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true}],"exports":["LayoutState","meta"],"inputs":{"src/meta.ts":{"bytesInOutput":395},"src/types/capabilities.ts":{"bytesInOutput":105},"src/types/index.ts":{"bytesInOutput":0}},"bytes":717}}}
@@ -1,12 +0,0 @@
1
- import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
-
3
- // src/operations/open.ts
4
- import * as Effect from "effect/Effect";
5
- import { LayoutOperation } from "@dxos/app-toolkit";
6
- import { Operation } from "@dxos/operation";
7
- var handler = LayoutOperation.Open.pipe(Operation.withHandler(() => Effect.void));
8
- var open_default = handler;
9
- export {
10
- open_default as default
11
- };
12
- //# sourceMappingURL=open-OLJQ7VR3.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/operations/open.ts"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { LayoutOperation } from '@dxos/app-toolkit';\nimport { Operation } from '@dxos/operation';\n\nconst handler: Operation.WithHandler<typeof LayoutOperation.Open> = LayoutOperation.Open.pipe(\n Operation.withHandler(() => Effect.void),\n);\n\nexport default handler;\n"],
5
- "mappings": ";;;AAIA,YAAYA,YAAY;AAExB,SAASC,uBAAuB;AAChC,SAASC,iBAAiB;AAE1B,IAAMC,UAA8DC,gBAAgBC,KAAKC,KACvFC,UAAUC,YAAY,MAAaC,WAAI,CAAA;AAGzC,IAAA,eAAeN;",
6
- "names": ["Effect", "LayoutOperation", "Operation", "handler", "LayoutOperation", "Open", "pipe", "Operation", "withHandler", "void"]
7
- }
@@ -1,18 +0,0 @@
1
- import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
-
3
- // src/capabilities/operation-handler/operation-handler.ts
4
- import * as Effect from "effect/Effect";
5
- import { Capabilities, Capability } from "@dxos/app-framework";
6
-
7
- // src/operations/index.ts
8
- import { OperationHandlerSet } from "@dxos/operation";
9
- var TestingOperationHandlerSet = OperationHandlerSet.lazy(() => import("./add-toast-VMEADC7Y.mjs"), () => import("./close-B54TW3OK.mjs"), () => import("./open-OLJQ7VR3.mjs"), () => import("./scroll-into-view-C3XK4YMK.mjs"), () => import("./set-layout-mode-AEQI6AVR.mjs"), () => import("./switch-workspace-ZDUCWF6E.mjs"), () => import("./update-complementary-LAPUAZ5I.mjs"), () => import("./update-dialog-5M7FL4XG.mjs"), () => import("./update-popover-2TDGFHL3.mjs"), () => import("./update-sidebar-CU6TUDK5.mjs"));
10
-
11
- // src/capabilities/operation-handler/operation-handler.ts
12
- var operation_handler_default = Capability.makeModule(Effect.fnUntraced(function* () {
13
- return Capability.contributes(Capabilities.OperationHandler, TestingOperationHandlerSet);
14
- }));
15
- export {
16
- operation_handler_default as default
17
- };
18
- //# sourceMappingURL=operation-handler-TCIEZXBS.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/capabilities/operation-handler/operation-handler.ts", "../../../src/operations/index.ts"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Capabilities, Capability } from '@dxos/app-framework';\nimport type { OperationHandlerSet } from '@dxos/operation';\n\nimport { TestingOperationHandlerSet } from '../../operations';\n\nexport default Capability.makeModule<OperationHandlerSet.OperationHandlerSet>(\n Effect.fnUntraced(function* () {\n return Capability.contributes(Capabilities.OperationHandler, TestingOperationHandlerSet);\n }),\n);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { OperationHandlerSet } from '@dxos/operation';\n\nexport const TestingOperationHandlerSet = OperationHandlerSet.lazy(\n () => import('./add-toast'),\n () => import('./close'),\n () => import('./open'),\n () => import('./scroll-into-view'),\n () => import('./set-layout-mode'),\n () => import('./switch-workspace'),\n () => import('./update-complementary'),\n () => import('./update-dialog'),\n () => import('./update-popover'),\n () => import('./update-sidebar'),\n);\n"],
5
- "mappings": ";;;AAIA,YAAYA,YAAY;AAExB,SAASC,cAAcC,kBAAkB;;;ACFzC,SAASC,2BAA2B;AAE7B,IAAMC,6BAA6BC,oBAAoBC,KAC5D,MAAM,OAAO,0BAAA,GACb,MAAM,OAAO,sBAAA,GACb,MAAM,OAAO,qBAAA,GACb,MAAM,OAAO,iCAAA,GACb,MAAM,OAAO,gCAAA,GACb,MAAM,OAAO,iCAAA,GACb,MAAM,OAAO,qCAAA,GACb,MAAM,OAAO,8BAAA,GACb,MAAM,OAAO,+BAAA,GACb,MAAM,OAAO,+BAAA,CAAA;;;ADLf,IAAA,4BAAeC,WAAWC,WACjBC,kBAAW,aAAA;AAChB,SAAOF,WAAWG,YAAYC,aAAaC,kBAAkBC,0BAAAA;AAC/D,CAAA,CAAA;",
6
- "names": ["Effect", "Capabilities", "Capability", "OperationHandlerSet", "TestingOperationHandlerSet", "OperationHandlerSet", "lazy", "Capability", "makeModule", "fnUntraced", "contributes", "Capabilities", "OperationHandler", "TestingOperationHandlerSet"]
7
- }
@@ -1,12 +0,0 @@
1
- import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
-
3
- // src/operations/scroll-into-view.ts
4
- import * as Effect from "effect/Effect";
5
- import { LayoutOperation } from "@dxos/app-toolkit";
6
- import { Operation } from "@dxos/operation";
7
- var handler = LayoutOperation.ScrollIntoView.pipe(Operation.withHandler(() => Effect.void));
8
- var scroll_into_view_default = handler;
9
- export {
10
- scroll_into_view_default as default
11
- };
12
- //# sourceMappingURL=scroll-into-view-C3XK4YMK.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/operations/scroll-into-view.ts"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { LayoutOperation } from '@dxos/app-toolkit';\nimport { Operation } from '@dxos/operation';\n\nconst handler: Operation.WithHandler<typeof LayoutOperation.ScrollIntoView> = LayoutOperation.ScrollIntoView.pipe(\n Operation.withHandler(() => Effect.void),\n);\n\nexport default handler;\n"],
5
- "mappings": ";;;AAIA,YAAYA,YAAY;AAExB,SAASC,uBAAuB;AAChC,SAASC,iBAAiB;AAE1B,IAAMC,UAAwEC,gBAAgBC,eAAeC,KAC3GC,UAAUC,YAAY,MAAaC,WAAI,CAAA;AAGzC,IAAA,2BAAeN;",
6
- "names": ["Effect", "LayoutOperation", "Operation", "handler", "LayoutOperation", "ScrollIntoView", "pipe", "Operation", "withHandler", "void"]
7
- }
@@ -1,12 +0,0 @@
1
- import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
-
3
- // src/operations/set-layout-mode.ts
4
- import * as Effect from "effect/Effect";
5
- import { LayoutOperation } from "@dxos/app-toolkit";
6
- import { Operation } from "@dxos/operation";
7
- var handler = LayoutOperation.SetLayoutMode.pipe(Operation.withHandler(() => Effect.void));
8
- var set_layout_mode_default = handler;
9
- export {
10
- set_layout_mode_default as default
11
- };
12
- //# sourceMappingURL=set-layout-mode-AEQI6AVR.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/operations/set-layout-mode.ts"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { LayoutOperation } from '@dxos/app-toolkit';\nimport { Operation } from '@dxos/operation';\n\nconst handler: Operation.WithHandler<typeof LayoutOperation.SetLayoutMode> = LayoutOperation.SetLayoutMode.pipe(\n Operation.withHandler(() => Effect.void),\n);\n\nexport default handler;\n"],
5
- "mappings": ";;;AAIA,YAAYA,YAAY;AAExB,SAASC,uBAAuB;AAChC,SAASC,iBAAiB;AAE1B,IAAMC,UAAuEC,gBAAgBC,cAAcC,KACzGC,UAAUC,YAAY,MAAaC,WAAI,CAAA;AAGzC,IAAA,0BAAeN;",
6
- "names": ["Effect", "LayoutOperation", "Operation", "handler", "LayoutOperation", "SetLayoutMode", "pipe", "Operation", "withHandler", "void"]
7
- }
@@ -1,45 +0,0 @@
1
- import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
- import {
3
- LayoutState
4
- } from "./chunk-VDX7GMAD.mjs";
5
-
6
- // src/capabilities/state/state.tsx
7
- import { Atom } from "@effect-atom/atom-react";
8
- import * as Effect from "effect/Effect";
9
- import { Capability } from "@dxos/app-framework";
10
- import { AppCapabilities } from "@dxos/app-toolkit";
11
- var defaultState = {
12
- sidebarState: "closed",
13
- complementarySidebarState: "closed",
14
- dialogOpen: false,
15
- toasts: [],
16
- workspace: "default"
17
- };
18
- var state_default = Capability.makeModule(Effect.fnUntraced(function* (props) {
19
- const { initialState } = props ?? {};
20
- const stateAtom = Atom.make({
21
- ...defaultState,
22
- ...initialState
23
- });
24
- const layoutAtom = Atom.make((get) => {
25
- const state = get(stateAtom);
26
- return {
27
- mode: "storybook",
28
- dialogOpen: state.dialogOpen,
29
- sidebarOpen: state.sidebarState === "expanded",
30
- complementarySidebarOpen: state.complementarySidebarState === "expanded",
31
- workspace: state.workspace,
32
- active: [],
33
- inactive: [],
34
- scrollIntoView: void 0
35
- };
36
- });
37
- return [
38
- Capability.contributes(LayoutState, stateAtom),
39
- Capability.contributes(AppCapabilities.Layout, layoutAtom)
40
- ];
41
- }));
42
- export {
43
- state_default as default
44
- };
45
- //# sourceMappingURL=state-PVDE6Q6G.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/capabilities/state/state.tsx"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Atom } from '@effect-atom/atom-react';\nimport * as Effect from 'effect/Effect';\n\nimport { Capability } from '@dxos/app-framework';\nimport { AppCapabilities } from '@dxos/app-toolkit';\n\nimport { LayoutState, type LayoutStateProps } from '../../types';\n\nconst defaultState: LayoutStateProps = {\n sidebarState: 'closed',\n complementarySidebarState: 'closed',\n dialogOpen: false,\n toasts: [],\n workspace: 'default',\n};\n\nexport default Capability.makeModule(\n Effect.fnUntraced(function* (props?: { initialState?: Partial<LayoutStateProps> }) {\n const { initialState } = props ?? {};\n const stateAtom = Atom.make<LayoutStateProps>({ ...defaultState, ...initialState });\n\n const layoutAtom = Atom.make((get): AppCapabilities.Layout => {\n const state = get(stateAtom);\n return {\n mode: 'storybook',\n dialogOpen: state.dialogOpen,\n sidebarOpen: state.sidebarState === 'expanded',\n complementarySidebarOpen: state.complementarySidebarState === 'expanded',\n workspace: state.workspace,\n active: [],\n inactive: [],\n scrollIntoView: undefined,\n };\n });\n\n return [Capability.contributes(LayoutState, stateAtom), Capability.contributes(AppCapabilities.Layout, layoutAtom)];\n }),\n);\n"],
5
- "mappings": ";;;;;;AAIA,SAASA,YAAY;AACrB,YAAYC,YAAY;AAExB,SAASC,kBAAkB;AAC3B,SAASC,uBAAuB;AAIhC,IAAMC,eAAiC;EACrCC,cAAc;EACdC,2BAA2B;EAC3BC,YAAY;EACZC,QAAQ,CAAA;EACRC,WAAW;AACb;AAEA,IAAA,gBAAeC,WAAWC,WACjBC,kBAAW,WAAWC,OAAoD;AAC/E,QAAM,EAAEC,aAAY,IAAKD,SAAS,CAAC;AACnC,QAAME,YAAYC,KAAKC,KAAuB;IAAE,GAAGb;IAAc,GAAGU;EAAa,CAAA;AAEjF,QAAMI,aAAaF,KAAKC,KAAK,CAACE,QAAAA;AAC5B,UAAMC,QAAQD,IAAIJ,SAAAA;AAClB,WAAO;MACLM,MAAM;MACNd,YAAYa,MAAMb;MAClBe,aAAaF,MAAMf,iBAAiB;MACpCkB,0BAA0BH,MAAMd,8BAA8B;MAC9DG,WAAWW,MAAMX;MACjBe,QAAQ,CAAA;MACRC,UAAU,CAAA;MACVC,gBAAgBC;IAClB;EACF,CAAA;AAEA,SAAO;IAACjB,WAAWkB,YAAYC,aAAad,SAAAA;IAAYL,WAAWkB,YAAYE,gBAAgBC,QAAQb,UAAAA;;AACzG,CAAA,CAAA;",
6
- "names": ["Atom", "Effect", "Capability", "AppCapabilities", "defaultState", "sidebarState", "complementarySidebarState", "dialogOpen", "toasts", "workspace", "Capability", "makeModule", "fnUntraced", "props", "initialState", "stateAtom", "Atom", "make", "layoutAtom", "get", "state", "mode", "sidebarOpen", "complementarySidebarOpen", "active", "inactive", "scrollIntoView", "undefined", "contributes", "LayoutState", "AppCapabilities", "Layout"]
7
- }
@@ -1,20 +0,0 @@
1
- import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
- import {
3
- updateState
4
- } from "./chunk-ZLM7QUEK.mjs";
5
- import "./chunk-VDX7GMAD.mjs";
6
-
7
- // src/operations/switch-workspace.ts
8
- import * as Effect from "effect/Effect";
9
- import { LayoutOperation } from "@dxos/app-toolkit";
10
- import { Operation } from "@dxos/operation";
11
- var handler = LayoutOperation.SwitchWorkspace.pipe(Operation.withHandler(Effect.fnUntraced(function* ({ subject }) {
12
- yield* updateState(() => ({
13
- workspace: subject
14
- }));
15
- })));
16
- var switch_workspace_default = handler;
17
- export {
18
- switch_workspace_default as default
19
- };
20
- //# sourceMappingURL=switch-workspace-ZDUCWF6E.mjs.map
@@ -1,26 +0,0 @@
1
- import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
- import {
3
- updateState
4
- } from "./chunk-ZLM7QUEK.mjs";
5
- import "./chunk-VDX7GMAD.mjs";
6
-
7
- // src/operations/update-complementary.ts
8
- import * as Effect from "effect/Effect";
9
- import { LayoutOperation } from "@dxos/app-toolkit";
10
- import { Operation } from "@dxos/operation";
11
- var handler = LayoutOperation.UpdateComplementary.pipe(Operation.withHandler(Effect.fnUntraced(function* ({ state }) {
12
- yield* updateState((layout) => {
13
- const next = state ?? layout.complementarySidebarState;
14
- if (next !== layout.complementarySidebarState) {
15
- return {
16
- complementarySidebarState: next
17
- };
18
- }
19
- return {};
20
- });
21
- })));
22
- var update_complementary_default = handler;
23
- export {
24
- update_complementary_default as default
25
- };
26
- //# sourceMappingURL=update-complementary-LAPUAZ5I.mjs.map
@@ -1,28 +0,0 @@
1
- import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
- import {
3
- updateState
4
- } from "./chunk-ZLM7QUEK.mjs";
5
- import "./chunk-VDX7GMAD.mjs";
6
-
7
- // src/operations/update-dialog.ts
8
- import * as Effect from "effect/Effect";
9
- import { LayoutOperation } from "@dxos/app-toolkit";
10
- import { Operation } from "@dxos/operation";
11
- var handler = LayoutOperation.UpdateDialog.pipe(Operation.withHandler(Effect.fnUntraced(function* ({ subject, state, type, blockAlign, overlayClasses, overlayStyle, props }) {
12
- yield* updateState(() => ({
13
- dialogOpen: state ?? Boolean(subject),
14
- dialogType: type ?? "default",
15
- dialogBlockAlign: blockAlign ?? "center",
16
- dialogOverlayClasses: overlayClasses,
17
- dialogOverlayStyle: overlayStyle,
18
- dialogContent: subject ? {
19
- component: subject,
20
- props
21
- } : null
22
- }));
23
- })));
24
- var update_dialog_default = handler;
25
- export {
26
- update_dialog_default as default
27
- };
28
- //# sourceMappingURL=update-dialog-5M7FL4XG.mjs.map