@dxos/plugin-status-bar 0.7.4-staging.f7e8224 → 0.7.5-feature-compute.4d9d99a

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 (34) hide show
  1. package/dist/lib/browser/index.mjs +41 -54
  2. package/dist/lib/browser/index.mjs.map +4 -4
  3. package/dist/lib/browser/meta.json +1 -1
  4. package/dist/lib/node/index.cjs +90 -95
  5. package/dist/lib/node/index.cjs.map +4 -4
  6. package/dist/lib/node/meta.json +1 -1
  7. package/dist/lib/node-esm/index.mjs +41 -53
  8. package/dist/lib/node-esm/index.mjs.map +4 -4
  9. package/dist/lib/node-esm/meta.json +1 -1
  10. package/dist/types/src/StatusBarPlugin.d.ts +1 -3
  11. package/dist/types/src/StatusBarPlugin.d.ts.map +1 -1
  12. package/dist/types/src/components/FeedbackForm.d.ts.map +1 -1
  13. package/dist/types/src/index.d.ts +2 -3
  14. package/dist/types/src/index.d.ts.map +1 -1
  15. package/dist/types/src/meta.d.ts +1 -2
  16. package/dist/types/src/meta.d.ts.map +1 -1
  17. package/dist/types/tsconfig.tsbuildinfo +1 -0
  18. package/package.json +14 -22
  19. package/src/StatusBarPlugin.tsx +27 -23
  20. package/src/components/FeedbackForm.tsx +8 -27
  21. package/src/index.ts +2 -5
  22. package/src/meta.ts +1 -1
  23. package/dist/lib/browser/chunk-4KDZC7WS.mjs +0 -14
  24. package/dist/lib/browser/chunk-4KDZC7WS.mjs.map +0 -7
  25. package/dist/lib/browser/meta.mjs +0 -9
  26. package/dist/lib/browser/meta.mjs.map +0 -7
  27. package/dist/lib/node/chunk-OGG3PMIV.cjs +0 -37
  28. package/dist/lib/node/chunk-OGG3PMIV.cjs.map +0 -7
  29. package/dist/lib/node/meta.cjs +0 -30
  30. package/dist/lib/node/meta.cjs.map +0 -7
  31. package/dist/lib/node-esm/chunk-UVUSU6KS.mjs +0 -16
  32. package/dist/lib/node-esm/chunk-UVUSU6KS.mjs.map +0 -7
  33. package/dist/lib/node-esm/meta.mjs +0 -10
  34. package/dist/lib/node-esm/meta.mjs.map +0 -7
@@ -28,56 +28,57 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
29
  var node_exports = {};
30
30
  __export(node_exports, {
31
+ STATUS_BAR_PLUGIN: () => STATUS_BAR_PLUGIN,
31
32
  StatusBar: () => StatusBar,
32
33
  StatusBarPanel: () => StatusBarPanel,
33
34
  StatusBarPlugin: () => StatusBarPlugin,
34
- default: () => src_default
35
+ meta: () => meta
35
36
  });
36
37
  module.exports = __toCommonJS(node_exports);
37
- var import_chunk_OGG3PMIV = require("./chunk-OGG3PMIV.cjs");
38
- var import_react = __toESM(require("react"));
39
38
  var import_react_tabster = require("@fluentui/react-tabster");
40
39
  var import_react_slot = require("@radix-ui/react-slot");
41
- var import_react2 = __toESM(require("react"));
40
+ var import_react = __toESM(require("react"));
42
41
  var import_react_ui_theme = require("@dxos/react-ui-theme");
43
- var import_react3 = __toESM(require("react"));
42
+ var import_react2 = __toESM(require("react"));
44
43
  var import_app_framework = require("@dxos/app-framework");
45
44
  var import_react_ui = require("@dxos/react-ui");
46
- var import_schema = require("@effect/schema");
47
- var import_react4 = require("@phosphor-icons/react");
48
- var import_react5 = __toESM(require("react"));
45
+ var import_react3 = require("@phosphor-icons/react");
46
+ var import_react4 = __toESM(require("react"));
49
47
  var import_app_framework2 = require("@dxos/app-framework");
48
+ var import_types = require("@dxos/plugin-observability/types");
50
49
  var import_react_ui2 = require("@dxos/react-ui");
51
50
  var import_react_ui_form = require("@dxos/react-ui-form");
52
51
  var import_react_ui_theme2 = require("@dxos/react-ui-theme");
53
- var StatusBarText = /* @__PURE__ */ (0, import_react2.forwardRef)(({ classNames, children }, forwardedRef) => /* @__PURE__ */ import_react2.default.createElement("span", {
52
+ var import_react5 = __toESM(require("react"));
53
+ var import_app_framework3 = require("@dxos/app-framework");
54
+ var StatusBarText = /* @__PURE__ */ (0, import_react.forwardRef)(({ classNames, children }, forwardedRef) => /* @__PURE__ */ import_react.default.createElement("span", {
54
55
  className: (0, import_react_ui_theme.mx)(classNames),
55
56
  ref: forwardedRef
56
57
  }, children));
57
- var StatusBarButton = /* @__PURE__ */ (0, import_react2.forwardRef)(({ classNames, children, asChild, ...props }, forwardedRef) => {
58
+ var StatusBarButton = /* @__PURE__ */ (0, import_react.forwardRef)(({ classNames, children, asChild, ...props }, forwardedRef) => {
58
59
  const classes = (0, import_react_ui_theme.mx)("flex items-center gap-2 p-1 px-2 rounded-sm", "select-none cursor-pointer ch-focus-ring", "hover:bg-neutral-75 active:bg-neutral-150 dark:hover:bg-neutral-750 dark:active:bg-neutral-700", classNames);
59
- return asChild ? /* @__PURE__ */ import_react2.default.createElement(import_react_slot.Slot, {
60
+ return asChild ? /* @__PURE__ */ import_react.default.createElement(import_react_slot.Slot, {
60
61
  role: "button",
61
62
  ref: forwardedRef,
62
63
  className: classes,
63
64
  ...props
64
- }, children) : /* @__PURE__ */ import_react2.default.createElement("button", {
65
+ }, children) : /* @__PURE__ */ import_react.default.createElement("button", {
65
66
  className: classes,
66
67
  ref: forwardedRef,
67
68
  ...props
68
69
  }, children);
69
70
  });
70
- var StatusBarItem = /* @__PURE__ */ (0, import_react2.forwardRef)(({ classNames, children, ...props }, forwardedRef) => /* @__PURE__ */ import_react2.default.createElement("div", {
71
+ var StatusBarItem = /* @__PURE__ */ (0, import_react.forwardRef)(({ classNames, children, ...props }, forwardedRef) => /* @__PURE__ */ import_react.default.createElement("div", {
71
72
  role: "menuitem",
72
73
  className: (0, import_react_ui_theme.mx)("flex items-center gap-2 p-1 px-2 rounded-sm select-none", classNames),
73
74
  ref: forwardedRef,
74
75
  ...props
75
76
  }, children));
76
- var StatusBarContainer = /* @__PURE__ */ (0, import_react2.forwardRef)(({ classNames, children }, forwardedRef) => {
77
+ var StatusBarContainer = /* @__PURE__ */ (0, import_react.forwardRef)(({ classNames, children }, forwardedRef) => {
77
78
  const groupAttrs = (0, import_react_tabster.useFocusableGroup)({
78
79
  tabBehavior: "limited"
79
80
  });
80
- return /* @__PURE__ */ import_react2.default.createElement("div", {
81
+ return /* @__PURE__ */ import_react.default.createElement("div", {
81
82
  role: "menubar",
82
83
  tabIndex: 0,
83
84
  ...groupAttrs,
@@ -85,12 +86,12 @@ var StatusBarContainer = /* @__PURE__ */ (0, import_react2.forwardRef)(({ classN
85
86
  ref: forwardedRef
86
87
  }, children);
87
88
  });
88
- var StartContent = /* @__PURE__ */ (0, import_react2.forwardRef)(({ classNames, children }, forwardedRef) => /* @__PURE__ */ import_react2.default.createElement("div", {
89
+ var StartContent = /* @__PURE__ */ (0, import_react.forwardRef)(({ classNames, children }, forwardedRef) => /* @__PURE__ */ import_react.default.createElement("div", {
89
90
  role: "none",
90
91
  className: (0, import_react_ui_theme.mx)("flex-grow flex items-center space-x-2", classNames),
91
92
  ref: forwardedRef
92
93
  }, children));
93
- var EndContent = /* @__PURE__ */ (0, import_react2.forwardRef)(({ classNames, children }, forwardedRef) => /* @__PURE__ */ import_react2.default.createElement("div", {
94
+ var EndContent = /* @__PURE__ */ (0, import_react.forwardRef)(({ classNames, children }, forwardedRef) => /* @__PURE__ */ import_react.default.createElement("div", {
94
95
  role: "none",
95
96
  className: (0, import_react_ui_theme.mx)("flex-grow flex items-center justify-end", classNames),
96
97
  ref: forwardedRef
@@ -103,8 +104,15 @@ var StatusBar = {
103
104
  StartContent,
104
105
  EndContent
105
106
  };
107
+ var STATUS_BAR_PLUGIN = "dxos.org/plugin/status-bar";
108
+ var meta = {
109
+ id: STATUS_BAR_PLUGIN,
110
+ name: "Status Bar",
111
+ description: "Display a bar with status and actions.",
112
+ icon: "ph--info--regular"
113
+ };
106
114
  var entry = (translation) => ({
107
- [import_chunk_OGG3PMIV.STATUS_BAR_PLUGIN]: translation
115
+ [STATUS_BAR_PLUGIN]: translation
108
116
  });
109
117
  var mkTranslation = (t) => (key) => t(key);
110
118
  var translations = {
@@ -122,36 +130,17 @@ var translations = {
122
130
  var translations_default = [
123
131
  translations
124
132
  ];
125
- var Email = import_schema.Schema.String.pipe(import_schema.Schema.nonEmptyString({
126
- message: () => "Email is required."
127
- }), import_schema.Schema.pattern(/^(?!\.)(?!.*\.\.)([A-Z0-9_+-.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9-]*\.)+[A-Z]{2,}$/i, {
128
- message: () => "Invalid email address."
129
- }));
130
- var nonEmpty = (field) => import_schema.Schema.nonEmptyString({
131
- message: () => `${field} is required.`
132
- });
133
- var maxLength = (field, length) => import_schema.Schema.maxLength(length, {
134
- message: () => `${field} is too long.`
135
- });
136
- var FeedbackFormSchema = import_schema.Schema.Struct({
137
- name: import_schema.Schema.String.pipe(nonEmpty("Name"), maxLength("Name", 256)),
138
- email: Email.pipe(maxLength("Email", 256)),
139
- message: import_schema.Schema.String.pipe(nonEmpty("Feedback"), maxLength("Feedback", 32768))
140
- });
141
133
  var initialValues = {
142
134
  name: "",
143
135
  email: "",
144
136
  message: ""
145
137
  };
146
138
  var FeedbackForm = ({ onClose }) => {
147
- const { t } = (0, import_react_ui2.useTranslation)(import_chunk_OGG3PMIV.STATUS_BAR_PLUGIN);
139
+ const { t } = (0, import_react_ui2.useTranslation)(STATUS_BAR_PLUGIN);
148
140
  const translation = mkTranslation(t);
149
- const dispatch = (0, import_app_framework2.useIntentDispatcher)();
150
- const onSave = (0, import_react5.useCallback)((values) => {
151
- void dispatch({
152
- action: "dxos.org/plugin/observability/capture-feedback",
153
- data: values
154
- });
141
+ const { dispatchPromise: dispatch } = (0, import_app_framework2.useIntentDispatcher)();
142
+ const onSave = (0, import_react4.useCallback)((values) => {
143
+ void dispatch((0, import_app_framework2.createIntent)(import_types.ObservabilityAction.CaptureUserFeedback, values));
155
144
  onClose();
156
145
  }, [
157
146
  dispatch,
@@ -159,125 +148,131 @@ var FeedbackForm = ({ onClose }) => {
159
148
  ]);
160
149
  const { handleSave, canSave, getStatus, ...inputProps } = (0, import_react_ui_form.useForm)({
161
150
  initialValues,
162
- schema: FeedbackFormSchema,
151
+ schema: import_types.UserFeedback,
163
152
  onSave
164
153
  });
165
- return /* @__PURE__ */ import_react5.default.createElement("div", {
154
+ return /* @__PURE__ */ import_react4.default.createElement("div", {
166
155
  role: "form",
167
156
  className: "p-3 flex flex-col gap-2"
168
- }, /* @__PURE__ */ import_react5.default.createElement("div", {
157
+ }, /* @__PURE__ */ import_react4.default.createElement("div", {
169
158
  role: "none",
170
159
  className: "space-b-1"
171
- }, /* @__PURE__ */ import_react5.default.createElement(import_react_ui2.Input.Root, {
160
+ }, /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.Input.Root, {
172
161
  validationValence: getStatus("name").status
173
- }, /* @__PURE__ */ import_react5.default.createElement(import_react_ui2.Input.Label, null, translation("name label")), /* @__PURE__ */ import_react5.default.createElement(import_react_ui2.Input.TextInput, {
162
+ }, /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.Input.Label, null, translation("name label")), /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.Input.TextInput, {
174
163
  classNames: "text-sm",
175
164
  placeholder: translation("name placeholder"),
176
165
  autoFocus: true,
177
166
  ...inputProps
178
- }), /* @__PURE__ */ import_react5.default.createElement(import_react_ui2.Input.DescriptionAndValidation, null, /* @__PURE__ */ import_react5.default.createElement(import_react_ui2.Input.Validation, null, getStatus("name").error)))), /* @__PURE__ */ import_react5.default.createElement("div", {
167
+ }), /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.Input.DescriptionAndValidation, null, /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.Input.Validation, null, getStatus("name").error)))), /* @__PURE__ */ import_react4.default.createElement("div", {
179
168
  role: "none",
180
169
  className: "space-b-1"
181
- }, /* @__PURE__ */ import_react5.default.createElement(import_react_ui2.Input.Root, {
170
+ }, /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.Input.Root, {
182
171
  validationValence: getStatus("email").status
183
- }, /* @__PURE__ */ import_react5.default.createElement(import_react_ui2.Input.Label, null, translation("email input label")), /* @__PURE__ */ import_react5.default.createElement(import_react_ui2.Input.TextInput, {
172
+ }, /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.Input.Label, null, translation("email input label")), /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.Input.TextInput, {
184
173
  classNames: "text-sm",
185
174
  placeholder: translation("email input placeholder"),
186
175
  ...inputProps
187
- }), /* @__PURE__ */ import_react5.default.createElement(import_react_ui2.Input.DescriptionAndValidation, null, /* @__PURE__ */ import_react5.default.createElement(import_react_ui2.Input.Validation, null, getStatus("email").error)))), /* @__PURE__ */ import_react5.default.createElement("div", {
176
+ }), /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.Input.DescriptionAndValidation, null, /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.Input.Validation, null, getStatus("email").error)))), /* @__PURE__ */ import_react4.default.createElement("div", {
188
177
  role: "none",
189
178
  className: "space-b-1"
190
- }, /* @__PURE__ */ import_react5.default.createElement(import_react_ui2.Input.Root, {
179
+ }, /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.Input.Root, {
191
180
  validationValence: getStatus("message").status
192
- }, /* @__PURE__ */ import_react5.default.createElement(import_react_ui2.Input.Label, null, translation("feedback text area label")), /* @__PURE__ */ import_react5.default.createElement(import_react_ui2.Input.TextArea, {
181
+ }, /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.Input.Label, null, translation("feedback text area label")), /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.Input.TextArea, {
193
182
  classNames: "text-sm",
194
183
  rows: 5,
195
184
  cols: 30,
196
185
  placeholder: translation("feedback text area placeholder"),
197
186
  ...inputProps
198
- }), /* @__PURE__ */ import_react5.default.createElement(import_react_ui2.Input.DescriptionAndValidation, null, /* @__PURE__ */ import_react5.default.createElement(import_react_ui2.Input.Validation, null, getStatus("message").error)))), /* @__PURE__ */ import_react5.default.createElement("div", {
187
+ }), /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.Input.DescriptionAndValidation, null, /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.Input.Validation, null, getStatus("message").error)))), /* @__PURE__ */ import_react4.default.createElement("div", {
199
188
  role: "none",
200
189
  className: "space-b-2"
201
- }, /* @__PURE__ */ import_react5.default.createElement(import_react_ui2.Button, {
190
+ }, /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.Button, {
202
191
  type: "submit",
203
192
  variant: "primary",
204
193
  classNames: "is-full flex gap-2",
205
194
  disabled: !canSave,
206
195
  onClick: handleSave
207
- }, /* @__PURE__ */ import_react5.default.createElement("span", null, translation("send feedback label")), /* @__PURE__ */ import_react5.default.createElement("div", {
196
+ }, /* @__PURE__ */ import_react4.default.createElement("span", null, translation("send feedback label")), /* @__PURE__ */ import_react4.default.createElement("div", {
208
197
  className: "grow"
209
- }), /* @__PURE__ */ import_react5.default.createElement(import_react4.PaperPlaneTilt, {
198
+ }), /* @__PURE__ */ import_react4.default.createElement(import_react3.PaperPlaneTilt, {
210
199
  className: (0, import_react_ui_theme2.getSize)(5)
211
- })), /* @__PURE__ */ import_react5.default.createElement(import_react_ui2.Popover.Close, {
200
+ })), /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.Popover.Close, {
212
201
  asChild: true
213
- }, /* @__PURE__ */ import_react5.default.createElement(import_react_ui2.Button, {
202
+ }, /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.Button, {
214
203
  classNames: "is-full flex gap-2"
215
- }, /* @__PURE__ */ import_react5.default.createElement("span", null, t("cancel label", {
204
+ }, /* @__PURE__ */ import_react4.default.createElement("span", null, t("cancel label", {
216
205
  ns: "os"
217
- })), /* @__PURE__ */ import_react5.default.createElement("div", {
206
+ })), /* @__PURE__ */ import_react4.default.createElement("div", {
218
207
  className: "grow"
219
- }), /* @__PURE__ */ import_react5.default.createElement(import_react4.X, {
208
+ }), /* @__PURE__ */ import_react4.default.createElement(import_react3.X, {
220
209
  className: (0, import_react_ui_theme2.getSize)(5)
221
210
  })))));
222
211
  };
223
212
  var StatusBarPanel = () => {
224
- const [open, setOpen] = (0, import_react3.useState)(false);
225
- return /* @__PURE__ */ import_react3.default.createElement(import_react_ui.Popover.Root, {
213
+ const [open, setOpen] = (0, import_react2.useState)(false);
214
+ return /* @__PURE__ */ import_react2.default.createElement(import_react_ui.Popover.Root, {
226
215
  open,
227
216
  onOpenChange: setOpen
228
- }, /* @__PURE__ */ import_react3.default.createElement(StatusBar.Container, null, /* @__PURE__ */ import_react3.default.createElement(StatusBar.EndContent, null, /* @__PURE__ */ import_react3.default.createElement(import_app_framework.Surface, {
217
+ }, /* @__PURE__ */ import_react2.default.createElement(StatusBar.Container, null, /* @__PURE__ */ import_react2.default.createElement(StatusBar.EndContent, null, /* @__PURE__ */ import_react2.default.createElement(import_app_framework.Surface, {
229
218
  role: "status"
230
- }), /* @__PURE__ */ import_react3.default.createElement(import_react_ui.Popover.Trigger, {
219
+ }), /* @__PURE__ */ import_react2.default.createElement(import_react_ui.Popover.Trigger, {
231
220
  asChild: true
232
- }, /* @__PURE__ */ import_react3.default.createElement(StatusBar.Button, {
221
+ }, /* @__PURE__ */ import_react2.default.createElement(StatusBar.Button, {
233
222
  "aria-label": "Give feedback about composer",
234
223
  "data-joyride": "welcome/feedback"
235
- }, /* @__PURE__ */ import_react3.default.createElement(import_react_ui.Icon, {
224
+ }, /* @__PURE__ */ import_react2.default.createElement(import_react_ui.Icon, {
236
225
  icon: "ph--paper-plane-tilt--regular",
237
226
  size: 4
238
- }), /* @__PURE__ */ import_react3.default.createElement(StatusBar.Text, {
227
+ }), /* @__PURE__ */ import_react2.default.createElement(StatusBar.Text, {
239
228
  classNames: "hidden sm:block"
240
- }, "Feedback"))), /* @__PURE__ */ import_react3.default.createElement(StatusBar.Button, {
229
+ }, "Feedback"))), /* @__PURE__ */ import_react2.default.createElement(StatusBar.Button, {
241
230
  "aria-label": "Open DXOS Discord",
242
231
  asChild: true
243
- }, /* @__PURE__ */ import_react3.default.createElement("a", {
232
+ }, /* @__PURE__ */ import_react2.default.createElement("a", {
244
233
  href: "https://dxos.org/discord",
245
234
  target: "_blank",
246
235
  rel: "noopener noreferrer"
247
- }, /* @__PURE__ */ import_react3.default.createElement(import_react_ui.Icon, {
236
+ }, /* @__PURE__ */ import_react2.default.createElement(import_react_ui.Icon, {
248
237
  icon: "ph--discord-logo--regular",
249
238
  size: 4
250
- }), /* @__PURE__ */ import_react3.default.createElement(StatusBar.Text, {
239
+ }), /* @__PURE__ */ import_react2.default.createElement(StatusBar.Text, {
251
240
  classNames: "hidden sm:block"
252
- }, "Discord"))))), /* @__PURE__ */ import_react3.default.createElement(import_react_ui.Popover.Content, {
241
+ }, "Discord"))))), /* @__PURE__ */ import_react2.default.createElement(import_react_ui.Popover.Content, {
253
242
  classNames: "shadow-lg"
254
- }, /* @__PURE__ */ import_react3.default.createElement(FeedbackForm, {
243
+ }, /* @__PURE__ */ import_react2.default.createElement(FeedbackForm, {
255
244
  onClose: () => setOpen(false)
256
- }), /* @__PURE__ */ import_react3.default.createElement(import_react_ui.Popover.Arrow, null)));
257
- };
258
- var StatusBarPlugin = () => {
259
- return {
260
- meta: import_chunk_OGG3PMIV.meta_default,
261
- provides: {
262
- translations: translations_default,
263
- surface: {
264
- component: ({ role }) => {
265
- switch (role) {
266
- case "status-bar": {
267
- return /* @__PURE__ */ import_react.default.createElement(StatusBarPanel, null);
268
- }
269
- }
270
- return null;
271
- }
272
- }
273
- }
274
- };
245
+ }), /* @__PURE__ */ import_react2.default.createElement(import_react_ui.Popover.Arrow, null)));
275
246
  };
276
- var src_default = StatusBarPlugin;
247
+ var StatusBarPlugin = () => (0, import_app_framework3.definePlugin)(meta, [
248
+ (0, import_app_framework3.defineModule)({
249
+ id: `${meta.id}/module/translations`,
250
+ activatesOn: import_app_framework3.Events.SetupTranslations,
251
+ activate: () => (0, import_app_framework3.contributes)(import_app_framework3.Capabilities.Translations, translations_default)
252
+ }),
253
+ (0, import_app_framework3.defineModule)({
254
+ id: `${meta.id}/module/react-surface`,
255
+ activatesOn: import_app_framework3.Events.Startup,
256
+ activate: () => (0, import_app_framework3.contributes)(import_app_framework3.Capabilities.ReactSurface, [
257
+ (0, import_app_framework3.createSurface)({
258
+ id: meta.id,
259
+ role: "status-bar",
260
+ component: () => /* @__PURE__ */ import_react5.default.createElement(StatusBarPanel, null)
261
+ }),
262
+ (0, import_app_framework3.createSurface)({
263
+ id: meta.id,
264
+ role: "status-bar--sidebar-footer",
265
+ component: () => /* @__PURE__ */ import_react5.default.createElement(StatusBarPanel, null)
266
+ })
267
+ ])
268
+ })
269
+ ]);
277
270
  // Annotate the CommonJS export names for ESM import in node:
278
271
  0 && (module.exports = {
272
+ STATUS_BAR_PLUGIN,
279
273
  StatusBar,
280
274
  StatusBarPanel,
281
- StatusBarPlugin
275
+ StatusBarPlugin,
276
+ meta
282
277
  });
283
278
  //# sourceMappingURL=index.cjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../src/StatusBarPlugin.tsx", "../../../src/components/StatusBar.tsx", "../../../src/components/StatusBarPanel.tsx", "../../../src/components/FeedbackForm.tsx", "../../../src/translations.ts", "../../../src/index.ts"],
4
- "sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport React from 'react';\n\nimport { type PluginDefinition, type SurfaceProvides, type TranslationsProvides } from '@dxos/app-framework';\n\nimport { StatusBarPanel } from './components';\nimport meta from './meta';\nimport translations from './translations';\n\nexport type StatusBarPluginProvides = SurfaceProvides & TranslationsProvides;\n\nexport const StatusBarPlugin = (): PluginDefinition<StatusBarPluginProvides> => {\n return {\n meta,\n provides: {\n translations,\n surface: {\n component: ({ role }) => {\n switch (role) {\n case 'status-bar': {\n return <StatusBarPanel />;\n }\n }\n\n return null;\n },\n },\n },\n };\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { useFocusableGroup } from '@fluentui/react-tabster';\nimport { Slot } from '@radix-ui/react-slot';\nimport React, { forwardRef, type HTMLAttributes, type ReactNode } from 'react';\n\nimport { type ThemedClassName } from '@dxos/react-ui';\nimport { mx } from '@dxos/react-ui-theme';\n\ntype StatusBarTextProps = ThemedClassName<{ children: ReactNode }>;\n\nconst StatusBarText = forwardRef<HTMLSpanElement, StatusBarTextProps>(({ classNames, children }, forwardedRef) => (\n <span className={mx(classNames)} ref={forwardedRef}>\n {children}\n </span>\n));\n\ntype StatusBarButtonProps = ThemedClassName<{ children: ReactNode; asChild?: boolean }> &\n HTMLAttributes<HTMLButtonElement>;\n\nconst StatusBarButton = forwardRef<HTMLButtonElement, StatusBarButtonProps>(\n ({ classNames, children, asChild, ...props }, forwardedRef) => {\n const classes = mx(\n 'flex items-center gap-2 p-1 px-2 rounded-sm',\n 'select-none cursor-pointer ch-focus-ring',\n 'hover:bg-neutral-75 active:bg-neutral-150 dark:hover:bg-neutral-750 dark:active:bg-neutral-700',\n classNames,\n );\n\n return asChild ? (\n <Slot role='button' ref={forwardedRef} className={classes} {...props}>\n {children}\n </Slot>\n ) : (\n <button className={classes} ref={forwardedRef} {...props}>\n {children}\n </button>\n );\n },\n);\n\nexport default StatusBarButton;\n\ntype StatusBarItemProps = ThemedClassName<{ children: ReactNode }> & HTMLAttributes<HTMLDivElement>;\n\nconst StatusBarItem = forwardRef<HTMLDivElement, StatusBarItemProps>(\n ({ classNames, children, ...props }, forwardedRef) => (\n <div\n role='menuitem'\n className={mx('flex items-center gap-2 p-1 px-2 rounded-sm select-none', classNames)}\n ref={forwardedRef}\n {...props}\n >\n {children}\n </div>\n ),\n);\n\ntype StatusBarContainerProps = ThemedClassName<{ children: ReactNode }>;\n\n// TODO(zan): tabable group with tabster.\nconst StatusBarContainer = forwardRef<HTMLDivElement, StatusBarContainerProps>(\n ({ classNames, children }, forwardedRef) => {\n const groupAttrs = useFocusableGroup({ tabBehavior: 'limited' });\n return (\n <div\n role='menubar'\n tabIndex={0}\n {...groupAttrs}\n className={mx(\n 'bs-[--statusbar-size] flex justify-end items-center gap-2 bg-base text-description text-lg pointer-fine:text-xs ch-focus-ring-inset',\n classNames,\n )}\n ref={forwardedRef}\n >\n {children}\n </div>\n );\n },\n);\n\ntype StartContentProps = ThemedClassName<{ children: ReactNode }>;\n\nconst StartContent = forwardRef<HTMLDivElement, StartContentProps>(({ classNames, children }, forwardedRef) => (\n <div role='none' className={mx('flex-grow flex items-center space-x-2', classNames)} ref={forwardedRef}>\n {children}\n </div>\n));\n\ntype EndContentProps = ThemedClassName<{ children: ReactNode }>;\n\nconst EndContent = forwardRef<HTMLDivElement, EndContentProps>(({ classNames, children }, forwardedRef) => (\n <div role='none' className={mx('flex-grow flex items-center justify-end', classNames)} ref={forwardedRef}>\n {children}\n </div>\n));\n\nexport const StatusBar = {\n Container: StatusBarContainer,\n Text: StatusBarText,\n Item: StatusBarItem,\n Button: StatusBarButton,\n StartContent,\n EndContent,\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { useState } from 'react';\n\nimport { Surface } from '@dxos/app-framework';\nimport { Icon, Popover } from '@dxos/react-ui';\n\nimport { FeedbackForm } from './FeedbackForm';\nimport { StatusBar } from './StatusBar';\n\nexport const StatusBarPanel = () => {\n const [open, setOpen] = useState(false);\n\n // TODO(wittjosiah): Factor out feedback and discord buttons.\n return (\n <Popover.Root open={open} onOpenChange={setOpen}>\n <StatusBar.Container>\n <StatusBar.EndContent>\n <Surface role='status' />\n <Popover.Trigger asChild>\n <StatusBar.Button aria-label='Give feedback about composer' data-joyride='welcome/feedback'>\n <Icon icon='ph--paper-plane-tilt--regular' size={4} />\n <StatusBar.Text classNames='hidden sm:block'>Feedback</StatusBar.Text>\n </StatusBar.Button>\n </Popover.Trigger>\n {/* TODO(zan): Configure this label? */}\n <StatusBar.Button aria-label='Open DXOS Discord' asChild>\n <a href='https://dxos.org/discord' target='_blank' rel='noopener noreferrer'>\n <Icon icon='ph--discord-logo--regular' size={4} />\n <StatusBar.Text classNames='hidden sm:block'>Discord</StatusBar.Text>\n </a>\n </StatusBar.Button>\n </StatusBar.EndContent>\n </StatusBar.Container>\n <Popover.Content classNames='shadow-lg'>\n <FeedbackForm onClose={() => setOpen(false)} />\n <Popover.Arrow />\n </Popover.Content>\n </Popover.Root>\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { Schema as S } from '@effect/schema';\nimport { PaperPlaneTilt, X } from '@phosphor-icons/react';\nimport React, { useCallback } from 'react';\n\nimport { useIntentDispatcher } from '@dxos/app-framework';\nimport { Button, Input, Popover, useTranslation } from '@dxos/react-ui';\nimport { useForm } from '@dxos/react-ui-form';\nimport { getSize } from '@dxos/react-ui-theme';\n\nimport { STATUS_BAR_PLUGIN } from '../meta';\nimport { mkTranslation } from '../translations';\n\nconst Email = S.String.pipe(\n S.nonEmptyString({ message: () => 'Email is required.' }),\n S.pattern(/^(?!\\.)(?!.*\\.\\.)([A-Z0-9_+-.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9-]*\\.)+[A-Z]{2,}$/i, {\n message: () => 'Invalid email address.',\n }),\n);\n\nconst nonEmpty = (field: string) => S.nonEmptyString({ message: () => `${field} is required.` });\nconst maxLength = (field: string, length: number) => S.maxLength(length, { message: () => `${field} is too long.` });\n\n// Types and validation.\nconst FeedbackFormSchema = S.Struct({\n name: S.String.pipe(nonEmpty('Name'), maxLength('Name', 256)),\n email: Email.pipe(maxLength('Email', 256)),\n message: S.String.pipe(nonEmpty('Feedback'), maxLength('Feedback', 32_768)),\n});\n\ntype FeedbackFormType = S.Schema.Type<typeof FeedbackFormSchema>;\n\nconst initialValues: FeedbackFormType = { name: '', email: '', message: '' };\n\nexport const FeedbackForm = ({ onClose }: { onClose: () => void }) => {\n const { t } = useTranslation(STATUS_BAR_PLUGIN);\n const translation = mkTranslation(t);\n const dispatch = useIntentDispatcher();\n\n const onSave = useCallback(\n (values: FeedbackFormType) => {\n void dispatch({ action: 'dxos.org/plugin/observability/capture-feedback', data: values });\n onClose();\n },\n [dispatch, onClose],\n );\n\n const { handleSave, canSave, getStatus, ...inputProps } = useForm<FeedbackFormType>({\n initialValues,\n schema: FeedbackFormSchema,\n onSave,\n });\n\n return (\n <div role='form' className='p-3 flex flex-col gap-2'>\n <div role='none' className='space-b-1'>\n <Input.Root validationValence={getStatus('name').status}>\n <Input.Label>{translation('name label')}</Input.Label>\n <Input.TextInput\n classNames={'text-sm'}\n placeholder={translation('name placeholder')}\n autoFocus\n {...inputProps}\n />\n <Input.DescriptionAndValidation>\n <Input.Validation>{getStatus('name').error}</Input.Validation>\n </Input.DescriptionAndValidation>\n </Input.Root>\n </div>\n\n <div role='none' className='space-b-1'>\n <Input.Root validationValence={getStatus('email').status}>\n <Input.Label>{translation('email input label')}</Input.Label>\n <Input.TextInput\n classNames={'text-sm'}\n placeholder={translation('email input placeholder')}\n {...inputProps}\n />\n <Input.DescriptionAndValidation>\n <Input.Validation>{getStatus('email').error}</Input.Validation>\n </Input.DescriptionAndValidation>\n </Input.Root>\n </div>\n\n <div role='none' className='space-b-1'>\n <Input.Root validationValence={getStatus('message').status}>\n <Input.Label>{translation('feedback text area label')}</Input.Label>\n <Input.TextArea\n classNames={'text-sm'}\n rows={5}\n cols={30}\n placeholder={translation('feedback text area placeholder')}\n {...inputProps}\n />\n <Input.DescriptionAndValidation>\n <Input.Validation>{getStatus('message').error}</Input.Validation>\n </Input.DescriptionAndValidation>\n </Input.Root>\n </div>\n\n <div role='none' className='space-b-2'>\n <Button\n type='submit'\n variant='primary'\n classNames='is-full flex gap-2'\n disabled={!canSave}\n onClick={handleSave}\n >\n <span>{translation('send feedback label')}</span>\n <div className='grow' />\n <PaperPlaneTilt className={getSize(5)} />\n </Button>\n <Popover.Close asChild>\n <Button classNames='is-full flex gap-2'>\n <span>{t('cancel label', { ns: 'os' })}</span>\n <div className='grow' />\n <X className={getSize(5)} />\n </Button>\n </Popover.Close>\n </div>\n </div>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type useTranslation } from '@dxos/react-ui';\n\nimport { STATUS_BAR_PLUGIN } from './meta';\n\ntype StatusBarTranslationKeys =\n | 'plugin name'\n | 'email input label'\n | 'email input placeholder'\n | 'feedback text area label'\n | 'feedback text area placeholder'\n | 'send feedback label'\n | 'name label'\n | 'name placeholder';\n\ntype RequiredTranslation = { [key in StatusBarTranslationKeys]: string };\ntype TranslationEntry = { [STATUS_BAR_PLUGIN]: RequiredTranslation };\ntype Language = string;\n\n// -- helpers.\nconst entry = (translation: RequiredTranslation): TranslationEntry => ({ [STATUS_BAR_PLUGIN]: translation });\nexport const mkTranslation = (t: ReturnType<typeof useTranslation>['t']) => (key: StatusBarTranslationKeys) => t(key);\n\nconst translations: Record<Language, TranslationEntry> = {\n 'en-US': entry({\n 'plugin name': 'Status Bar',\n 'name label': 'Name',\n 'name placeholder': 'Preferred name',\n 'email input label': 'Email',\n 'email input placeholder': 'hello@example.com',\n 'feedback text area label': 'Feedback',\n 'feedback text area placeholder': 'Found a bug? Have a suggestion? Let us know!',\n 'send feedback label': 'Send Feedback',\n }),\n};\n\nexport default [translations];\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { StatusBarPlugin } from './StatusBarPlugin';\n\nexport default StatusBarPlugin;\n\nexport * from './StatusBarPlugin';\nexport * from './components';\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,mBAAkB;ACAlB,2BAAkC;AAClC,wBAAqB;AACrB,IAAAA,gBAAuE;AAGvE,4BAAmB;ACLnB,IAAAA,gBAAgC;AAEhC,2BAAwB;AACxB,sBAA8B;ACH9B,oBAA4B;AAC5B,IAAAA,gBAAkC;AAClC,IAAAA,gBAAmC;AAEnC,IAAAC,wBAAoC;AACpC,IAAAC,mBAAuD;AACvD,2BAAwB;AACxB,IAAAC,yBAAwB;AFExB,IAAMC,gBAAgBC,8CAAgD,CAAC,EAAEC,YAAYC,SAAQ,GAAIC,iBAC/F,8BAAAC,QAAA,cAACC,QAAAA;EAAKC,eAAWC,0BAAGN,UAAAA;EAAaO,KAAKL;GACnCD,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A;AAC7B,SAAO;IACLC,MAAAA;IACAC,UAAU;MACR7E,cAAAA;MACA8E,SAAS;QACPC,WAAW,CAAC,EAAErG,KAAI,MAAE;AAClB,kBAAQA,MAAAA;YACN,KAAK,cAAc;AACjB,qBAAOV,6BAAAA,QAAA,cAACyF,gBAAAA,IAAAA;YACV;UACF;AAEA,iBAAO;QACT;MACF;IACF;EACF;AACF;AK1BA,IAAA,cAAekB;",
6
- "names": ["import_react", "import_app_framework", "import_react_ui", "import_react_ui_theme", "StatusBarText", "forwardRef", "classNames", "children", "forwardedRef", "React", "span", "className", "mx", "ref", "StatusBarButton", "asChild", "props", "classes", "Slot", "role", "button", "StatusBarItem", "div", "StatusBarContainer", "groupAttrs", "useFocusableGroup", "tabBehavior", "tabIndex", "StartContent", "EndContent", "StatusBar", "Container", "Text", "Item", "Button", "entry", "translation", "STATUS_BAR_PLUGIN", "mkTranslation", "t", "key", "translations", "Email", "S", "String", "pipe", "nonEmptyString", "message", "pattern", "nonEmpty", "field", "maxLength", "length", "FeedbackFormSchema", "Struct", "name", "email", "initialValues", "FeedbackForm", "onClose", "useTranslation", "dispatch", "useIntentDispatcher", "onSave", "useCallback", "values", "action", "data", "handleSave", "canSave", "getStatus", "inputProps", "useForm", "schema", "Input", "Root", "validationValence", "status", "Label", "TextInput", "placeholder", "autoFocus", "DescriptionAndValidation", "Validation", "error", "TextArea", "rows", "cols", "type", "variant", "disabled", "onClick", "PaperPlaneTilt", "getSize", "Popover", "Close", "ns", "X", "StatusBarPanel", "open", "setOpen", "useState", "onOpenChange", "Surface", "Trigger", "aria-label", "data-joyride", "Icon", "icon", "size", "a", "href", "target", "rel", "Content", "Arrow", "StatusBarPlugin", "meta", "provides", "surface", "component"]
3
+ "sources": ["../../../src/components/StatusBar.tsx", "../../../src/components/StatusBarPanel.tsx", "../../../src/components/FeedbackForm.tsx", "../../../src/meta.ts", "../../../src/translations.ts", "../../../src/StatusBarPlugin.tsx"],
4
+ "sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { useFocusableGroup } from '@fluentui/react-tabster';\nimport { Slot } from '@radix-ui/react-slot';\nimport React, { forwardRef, type HTMLAttributes, type ReactNode } from 'react';\n\nimport { type ThemedClassName } from '@dxos/react-ui';\nimport { mx } from '@dxos/react-ui-theme';\n\ntype StatusBarTextProps = ThemedClassName<{ children: ReactNode }>;\n\nconst StatusBarText = forwardRef<HTMLSpanElement, StatusBarTextProps>(({ classNames, children }, forwardedRef) => (\n <span className={mx(classNames)} ref={forwardedRef}>\n {children}\n </span>\n));\n\ntype StatusBarButtonProps = ThemedClassName<{ children: ReactNode; asChild?: boolean }> &\n HTMLAttributes<HTMLButtonElement>;\n\nconst StatusBarButton = forwardRef<HTMLButtonElement, StatusBarButtonProps>(\n ({ classNames, children, asChild, ...props }, forwardedRef) => {\n const classes = mx(\n 'flex items-center gap-2 p-1 px-2 rounded-sm',\n 'select-none cursor-pointer ch-focus-ring',\n 'hover:bg-neutral-75 active:bg-neutral-150 dark:hover:bg-neutral-750 dark:active:bg-neutral-700',\n classNames,\n );\n\n return asChild ? (\n <Slot role='button' ref={forwardedRef} className={classes} {...props}>\n {children}\n </Slot>\n ) : (\n <button className={classes} ref={forwardedRef} {...props}>\n {children}\n </button>\n );\n },\n);\n\nexport default StatusBarButton;\n\ntype StatusBarItemProps = ThemedClassName<{ children: ReactNode }> & HTMLAttributes<HTMLDivElement>;\n\nconst StatusBarItem = forwardRef<HTMLDivElement, StatusBarItemProps>(\n ({ classNames, children, ...props }, forwardedRef) => (\n <div\n role='menuitem'\n className={mx('flex items-center gap-2 p-1 px-2 rounded-sm select-none', classNames)}\n ref={forwardedRef}\n {...props}\n >\n {children}\n </div>\n ),\n);\n\ntype StatusBarContainerProps = ThemedClassName<{ children: ReactNode }>;\n\n// TODO(zan): tabable group with tabster.\nconst StatusBarContainer = forwardRef<HTMLDivElement, StatusBarContainerProps>(\n ({ classNames, children }, forwardedRef) => {\n const groupAttrs = useFocusableGroup({ tabBehavior: 'limited' });\n return (\n <div\n role='menubar'\n tabIndex={0}\n {...groupAttrs}\n className={mx(\n 'bs-[--statusbar-size] flex justify-end items-center gap-2 bg-base text-description text-lg pointer-fine:text-xs ch-focus-ring-inset',\n classNames,\n )}\n ref={forwardedRef}\n >\n {children}\n </div>\n );\n },\n);\n\ntype StartContentProps = ThemedClassName<{ children: ReactNode }>;\n\nconst StartContent = forwardRef<HTMLDivElement, StartContentProps>(({ classNames, children }, forwardedRef) => (\n <div role='none' className={mx('flex-grow flex items-center space-x-2', classNames)} ref={forwardedRef}>\n {children}\n </div>\n));\n\ntype EndContentProps = ThemedClassName<{ children: ReactNode }>;\n\nconst EndContent = forwardRef<HTMLDivElement, EndContentProps>(({ classNames, children }, forwardedRef) => (\n <div role='none' className={mx('flex-grow flex items-center justify-end', classNames)} ref={forwardedRef}>\n {children}\n </div>\n));\n\nexport const StatusBar = {\n Container: StatusBarContainer,\n Text: StatusBarText,\n Item: StatusBarItem,\n Button: StatusBarButton,\n StartContent,\n EndContent,\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { useState } from 'react';\n\nimport { Surface } from '@dxos/app-framework';\nimport { Icon, Popover } from '@dxos/react-ui';\n\nimport { FeedbackForm } from './FeedbackForm';\nimport { StatusBar } from './StatusBar';\n\nexport const StatusBarPanel = () => {\n const [open, setOpen] = useState(false);\n\n // TODO(wittjosiah): Factor out feedback and discord buttons.\n return (\n <Popover.Root open={open} onOpenChange={setOpen}>\n <StatusBar.Container>\n <StatusBar.EndContent>\n <Surface role='status' />\n <Popover.Trigger asChild>\n <StatusBar.Button aria-label='Give feedback about composer' data-joyride='welcome/feedback'>\n <Icon icon='ph--paper-plane-tilt--regular' size={4} />\n <StatusBar.Text classNames='hidden sm:block'>Feedback</StatusBar.Text>\n </StatusBar.Button>\n </Popover.Trigger>\n {/* TODO(zan): Configure this label? */}\n <StatusBar.Button aria-label='Open DXOS Discord' asChild>\n <a href='https://dxos.org/discord' target='_blank' rel='noopener noreferrer'>\n <Icon icon='ph--discord-logo--regular' size={4} />\n <StatusBar.Text classNames='hidden sm:block'>Discord</StatusBar.Text>\n </a>\n </StatusBar.Button>\n </StatusBar.EndContent>\n </StatusBar.Container>\n <Popover.Content classNames='shadow-lg'>\n <FeedbackForm onClose={() => setOpen(false)} />\n <Popover.Arrow />\n </Popover.Content>\n </Popover.Root>\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { PaperPlaneTilt, X } from '@phosphor-icons/react';\nimport React, { useCallback } from 'react';\n\nimport { createIntent, useIntentDispatcher } from '@dxos/app-framework';\nimport { ObservabilityAction, UserFeedback } from '@dxos/plugin-observability/types';\nimport { Button, Input, Popover, useTranslation } from '@dxos/react-ui';\nimport { useForm } from '@dxos/react-ui-form';\nimport { getSize } from '@dxos/react-ui-theme';\n\nimport { STATUS_BAR_PLUGIN } from '../meta';\nimport { mkTranslation } from '../translations';\n\nconst initialValues: UserFeedback = { name: '', email: '', message: '' };\n\nexport const FeedbackForm = ({ onClose }: { onClose: () => void }) => {\n const { t } = useTranslation(STATUS_BAR_PLUGIN);\n const translation = mkTranslation(t);\n const { dispatchPromise: dispatch } = useIntentDispatcher();\n\n const onSave = useCallback(\n (values: UserFeedback) => {\n void dispatch(createIntent(ObservabilityAction.CaptureUserFeedback, values));\n onClose();\n },\n [dispatch, onClose],\n );\n\n const { handleSave, canSave, getStatus, ...inputProps } = useForm<UserFeedback>({\n initialValues,\n schema: UserFeedback,\n onSave,\n });\n\n return (\n <div role='form' className='p-3 flex flex-col gap-2'>\n <div role='none' className='space-b-1'>\n <Input.Root validationValence={getStatus('name').status}>\n <Input.Label>{translation('name label')}</Input.Label>\n <Input.TextInput\n classNames={'text-sm'}\n placeholder={translation('name placeholder')}\n autoFocus\n {...inputProps}\n />\n <Input.DescriptionAndValidation>\n <Input.Validation>{getStatus('name').error}</Input.Validation>\n </Input.DescriptionAndValidation>\n </Input.Root>\n </div>\n\n <div role='none' className='space-b-1'>\n <Input.Root validationValence={getStatus('email').status}>\n <Input.Label>{translation('email input label')}</Input.Label>\n <Input.TextInput\n classNames={'text-sm'}\n placeholder={translation('email input placeholder')}\n {...inputProps}\n />\n <Input.DescriptionAndValidation>\n <Input.Validation>{getStatus('email').error}</Input.Validation>\n </Input.DescriptionAndValidation>\n </Input.Root>\n </div>\n\n <div role='none' className='space-b-1'>\n <Input.Root validationValence={getStatus('message').status}>\n <Input.Label>{translation('feedback text area label')}</Input.Label>\n <Input.TextArea\n classNames={'text-sm'}\n rows={5}\n cols={30}\n placeholder={translation('feedback text area placeholder')}\n {...inputProps}\n />\n <Input.DescriptionAndValidation>\n <Input.Validation>{getStatus('message').error}</Input.Validation>\n </Input.DescriptionAndValidation>\n </Input.Root>\n </div>\n\n <div role='none' className='space-b-2'>\n <Button\n type='submit'\n variant='primary'\n classNames='is-full flex gap-2'\n disabled={!canSave}\n onClick={handleSave}\n >\n <span>{translation('send feedback label')}</span>\n <div className='grow' />\n <PaperPlaneTilt className={getSize(5)} />\n </Button>\n <Popover.Close asChild>\n <Button classNames='is-full flex gap-2'>\n <span>{t('cancel label', { ns: 'os' })}</span>\n <div className='grow' />\n <X className={getSize(5)} />\n </Button>\n </Popover.Close>\n </div>\n </div>\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { type PluginMeta } from '@dxos/app-framework';\n\nexport const STATUS_BAR_PLUGIN = 'dxos.org/plugin/status-bar';\n\nexport const meta = {\n id: STATUS_BAR_PLUGIN,\n name: 'Status Bar',\n description: 'Display a bar with status and actions.',\n icon: 'ph--info--regular',\n} satisfies PluginMeta;\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type useTranslation } from '@dxos/react-ui';\n\nimport { STATUS_BAR_PLUGIN } from './meta';\n\ntype StatusBarTranslationKeys =\n | 'plugin name'\n | 'email input label'\n | 'email input placeholder'\n | 'feedback text area label'\n | 'feedback text area placeholder'\n | 'send feedback label'\n | 'name label'\n | 'name placeholder';\n\ntype RequiredTranslation = { [key in StatusBarTranslationKeys]: string };\ntype TranslationEntry = { [STATUS_BAR_PLUGIN]: RequiredTranslation };\ntype Language = string;\n\n// -- helpers.\nconst entry = (translation: RequiredTranslation): TranslationEntry => ({ [STATUS_BAR_PLUGIN]: translation });\nexport const mkTranslation = (t: ReturnType<typeof useTranslation>['t']) => (key: StatusBarTranslationKeys) => t(key);\n\nconst translations: Record<Language, TranslationEntry> = {\n 'en-US': entry({\n 'plugin name': 'Status Bar',\n 'name label': 'Name',\n 'name placeholder': 'Preferred name',\n 'email input label': 'Email',\n 'email input placeholder': 'hello@example.com',\n 'feedback text area label': 'Feedback',\n 'feedback text area placeholder': 'Found a bug? Have a suggestion? Let us know!',\n 'send feedback label': 'Send Feedback',\n }),\n};\n\nexport default [translations];\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Capabilities, contributes, createSurface, defineModule, definePlugin, Events } from '@dxos/app-framework';\n\nimport { StatusBarPanel } from './components';\nimport { meta } from './meta';\nimport translations from './translations';\n\nexport const StatusBarPlugin = () =>\n definePlugin(meta, [\n defineModule({\n id: `${meta.id}/module/translations`,\n activatesOn: Events.SetupTranslations,\n activate: () => contributes(Capabilities.Translations, translations),\n }),\n defineModule({\n id: `${meta.id}/module/react-surface`,\n activatesOn: Events.Startup,\n activate: () =>\n contributes(Capabilities.ReactSurface, [\n createSurface({\n id: meta.id,\n role: 'status-bar',\n component: () => <StatusBarPanel />,\n }),\n createSurface({\n id: meta.id,\n role: 'status-bar--sidebar-footer',\n component: () => <StatusBarPanel />,\n }),\n ]),\n }),\n ]);\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,2BAAkC;AAClC,wBAAqB;AACrB,mBAAuE;AAGvE,4BAAmB;ACLnB,IAAAA,gBAAgC;AAEhC,2BAAwB;AACxB,sBAA8B;ACH9B,IAAAA,gBAAkC;AAClC,IAAAA,gBAAmC;AAEnC,IAAAC,wBAAkD;AAClD,mBAAkD;AAClD,IAA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,IAAID,KAAKC;QACTlB,MAAM;QACNwG,WAAW,MAAMlH,8BAAAA,QAAA,cAACoF,gBAAAA,IAAAA;MACpB,CAAA;UACA6B,qCAAc;QACZrF,IAAID,KAAKC;QACTlB,MAAM;QACNwG,WAAW,MAAMlH,8BAAAA,QAAA,cAACoF,gBAAAA,IAAAA;MACpB,CAAA;KACD;EACL,CAAA;CACD;",
6
+ "names": ["import_react", "import_app_framework", "import_react_ui", "import_react_ui_theme", "StatusBarText", "forwardRef", "classNames", "children", "forwardedRef", "React", "span", "className", "mx", "ref", "StatusBarButton", "asChild", "props", "classes", "Slot", "role", "button", "StatusBarItem", "div", "StatusBarContainer", "groupAttrs", "useFocusableGroup", "tabBehavior", "tabIndex", "StartContent", "EndContent", "StatusBar", "Container", "Text", "Item", "Button", "STATUS_BAR_PLUGIN", "meta", "id", "name", "description", "icon", "entry", "translation", "mkTranslation", "t", "key", "translations", "initialValues", "email", "message", "FeedbackForm", "onClose", "useTranslation", "dispatchPromise", "dispatch", "useIntentDispatcher", "onSave", "useCallback", "values", "createIntent", "ObservabilityAction", "CaptureUserFeedback", "handleSave", "canSave", "getStatus", "inputProps", "useForm", "schema", "UserFeedback", "Input", "Root", "validationValence", "status", "Label", "TextInput", "placeholder", "autoFocus", "DescriptionAndValidation", "Validation", "error", "TextArea", "rows", "cols", "type", "variant", "disabled", "onClick", "PaperPlaneTilt", "getSize", "Popover", "Close", "ns", "X", "StatusBarPanel", "open", "setOpen", "useState", "onOpenChange", "Surface", "Trigger", "aria-label", "data-joyride", "Icon", "size", "a", "href", "target", "rel", "Content", "Arrow", "StatusBarPlugin", "definePlugin", "defineModule", "activatesOn", "Events", "SetupTranslations", "activate", "contributes", "Capabilities", "Translations", "Startup", "ReactSurface", "createSurface", "component"]
7
7
  }
@@ -1 +1 @@
1
- {"inputs":{"packages/plugins/plugin-status-bar/src/components/StatusBar.tsx":{"bytes":9929,"imports":[{"path":"@fluentui/react-tabster","kind":"import-statement","external":true},{"path":"@radix-ui/react-slot","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-status-bar/src/meta.ts":{"bytes":1252,"imports":[],"format":"esm"},"packages/plugins/plugin-status-bar/src/translations.ts":{"bytes":3385,"imports":[{"path":"packages/plugins/plugin-status-bar/src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/plugins/plugin-status-bar/src/components/FeedbackForm.tsx":{"bytes":15976,"imports":[{"path":"@effect/schema","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","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-form","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-status-bar/src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"packages/plugins/plugin-status-bar/src/translations.ts","kind":"import-statement","original":"../translations"}],"format":"esm"},"packages/plugins/plugin-status-bar/src/components/StatusBarPanel.tsx":{"bytes":6010,"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":"packages/plugins/plugin-status-bar/src/components/FeedbackForm.tsx","kind":"import-statement","original":"./FeedbackForm"},{"path":"packages/plugins/plugin-status-bar/src/components/StatusBar.tsx","kind":"import-statement","original":"./StatusBar"}],"format":"esm"},"packages/plugins/plugin-status-bar/src/components/index.ts":{"bytes":624,"imports":[{"path":"packages/plugins/plugin-status-bar/src/components/StatusBar.tsx","kind":"import-statement","original":"./StatusBar"},{"path":"packages/plugins/plugin-status-bar/src/components/StatusBarPanel.tsx","kind":"import-statement","original":"./StatusBarPanel"}],"format":"esm"},"packages/plugins/plugin-status-bar/src/StatusBarPlugin.tsx":{"bytes":2663,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-status-bar/src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"packages/plugins/plugin-status-bar/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-status-bar/src/translations.ts","kind":"import-statement","original":"./translations"}],"format":"esm"},"packages/plugins/plugin-status-bar/src/index.ts":{"bytes":916,"imports":[{"path":"packages/plugins/plugin-status-bar/src/StatusBarPlugin.tsx","kind":"import-statement","original":"./StatusBarPlugin"},{"path":"packages/plugins/plugin-status-bar/src/StatusBarPlugin.tsx","kind":"import-statement","original":"./StatusBarPlugin"},{"path":"packages/plugins/plugin-status-bar/src/components/index.ts","kind":"import-statement","original":"./components"}],"format":"esm"}},"outputs":{"packages/plugins/plugin-status-bar/dist/lib/node/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":20086},"packages/plugins/plugin-status-bar/dist/lib/node/index.cjs":{"imports":[{"path":"packages/plugins/plugin-status-bar/dist/lib/node/chunk-OGG3PMIV.cjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@fluentui/react-tabster","kind":"import-statement","external":true},{"path":"@radix-ui/react-slot","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","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":"@effect/schema","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","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-form","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"exports":["StatusBar","StatusBarPanel","StatusBarPlugin","default"],"entryPoint":"packages/plugins/plugin-status-bar/src/index.ts","inputs":{"packages/plugins/plugin-status-bar/src/StatusBarPlugin.tsx":{"bytesInOutput":424},"packages/plugins/plugin-status-bar/src/components/StatusBar.tsx":{"bytesInOutput":2478},"packages/plugins/plugin-status-bar/src/components/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-status-bar/src/components/StatusBarPanel.tsx":{"bytesInOutput":1692},"packages/plugins/plugin-status-bar/src/components/FeedbackForm.tsx":{"bytesInOutput":4580},"packages/plugins/plugin-status-bar/src/translations.ts":{"bytesInOutput":570},"packages/plugins/plugin-status-bar/src/index.ts":{"bytesInOutput":35}},"bytes":10570},"packages/plugins/plugin-status-bar/dist/lib/node/meta.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-status-bar/dist/lib/node/meta.cjs":{"imports":[{"path":"packages/plugins/plugin-status-bar/dist/lib/node/chunk-OGG3PMIV.cjs","kind":"import-statement"}],"exports":["STATUS_BAR_PLUGIN","default"],"entryPoint":"packages/plugins/plugin-status-bar/src/meta.ts","inputs":{},"bytes":169},"packages/plugins/plugin-status-bar/dist/lib/node/chunk-OGG3PMIV.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":600},"packages/plugins/plugin-status-bar/dist/lib/node/chunk-OGG3PMIV.cjs":{"imports":[],"exports":["STATUS_BAR_PLUGIN","meta_default"],"inputs":{"packages/plugins/plugin-status-bar/src/meta.ts":{"bytesInOutput":210}},"bytes":353}}}
1
+ {"inputs":{"packages/plugins/plugin-status-bar/src/components/StatusBar.tsx":{"bytes":9929,"imports":[{"path":"@fluentui/react-tabster","kind":"import-statement","external":true},{"path":"@radix-ui/react-slot","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-status-bar/src/meta.ts":{"bytes":1289,"imports":[],"format":"esm"},"packages/plugins/plugin-status-bar/src/translations.ts":{"bytes":3385,"imports":[{"path":"packages/plugins/plugin-status-bar/src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/plugins/plugin-status-bar/src/components/FeedbackForm.tsx":{"bytes":13476,"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-observability/types","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-form","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-status-bar/src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"packages/plugins/plugin-status-bar/src/translations.ts","kind":"import-statement","original":"../translations"}],"format":"esm"},"packages/plugins/plugin-status-bar/src/components/StatusBarPanel.tsx":{"bytes":6010,"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":"packages/plugins/plugin-status-bar/src/components/FeedbackForm.tsx","kind":"import-statement","original":"./FeedbackForm"},{"path":"packages/plugins/plugin-status-bar/src/components/StatusBar.tsx","kind":"import-statement","original":"./StatusBar"}],"format":"esm"},"packages/plugins/plugin-status-bar/src/components/index.ts":{"bytes":624,"imports":[{"path":"packages/plugins/plugin-status-bar/src/components/StatusBar.tsx","kind":"import-statement","original":"./StatusBar"},{"path":"packages/plugins/plugin-status-bar/src/components/StatusBarPanel.tsx","kind":"import-statement","original":"./StatusBarPanel"}],"format":"esm"},"packages/plugins/plugin-status-bar/src/StatusBarPlugin.tsx":{"bytes":4367,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-status-bar/src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"packages/plugins/plugin-status-bar/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-status-bar/src/translations.ts","kind":"import-statement","original":"./translations"}],"format":"esm"},"packages/plugins/plugin-status-bar/src/index.ts":{"bytes":699,"imports":[{"path":"packages/plugins/plugin-status-bar/src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"packages/plugins/plugin-status-bar/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-status-bar/src/StatusBarPlugin.tsx","kind":"import-statement","original":"./StatusBarPlugin"}],"format":"esm"}},"outputs":{"packages/plugins/plugin-status-bar/dist/lib/node/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":19924},"packages/plugins/plugin-status-bar/dist/lib/node/index.cjs":{"imports":[{"path":"@fluentui/react-tabster","kind":"import-statement","external":true},{"path":"@radix-ui/react-slot","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","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":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-observability/types","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-form","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true}],"exports":["STATUS_BAR_PLUGIN","StatusBar","StatusBarPanel","StatusBarPlugin","meta"],"entryPoint":"packages/plugins/plugin-status-bar/src/index.ts","inputs":{"packages/plugins/plugin-status-bar/src/components/StatusBar.tsx":{"bytesInOutput":2478},"packages/plugins/plugin-status-bar/src/components/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-status-bar/src/components/StatusBarPanel.tsx":{"bytesInOutput":1692},"packages/plugins/plugin-status-bar/src/components/FeedbackForm.tsx":{"bytesInOutput":3972},"packages/plugins/plugin-status-bar/src/meta.ts":{"bytesInOutput":202},"packages/plugins/plugin-status-bar/src/translations.ts":{"bytesInOutput":570},"packages/plugins/plugin-status-bar/src/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-status-bar/src/StatusBarPlugin.tsx":{"bytesInOutput":897}},"bytes":10464}}}