@dxos/plugin-status-bar 0.6.13 → 0.6.14-main.1366248
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.
- package/dist/lib/browser/chunk-4KDZC7WS.mjs +14 -0
- package/dist/lib/browser/chunk-4KDZC7WS.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +43 -148
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/meta.mjs +1 -1
- package/dist/types/src/components/FeedbackForm.d.ts.map +1 -1
- package/dist/types/src/components/StatusBar.d.ts.map +1 -1
- package/dist/types/src/components/StatusBar.stories.d.ts +6 -47
- package/dist/types/src/components/StatusBar.stories.d.ts.map +1 -1
- package/dist/types/src/components/StatusBarPanel.d.ts +3 -0
- package/dist/types/src/components/StatusBarPanel.d.ts.map +1 -0
- package/dist/types/src/components/index.d.ts +1 -1
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +3 -9
- package/dist/types/src/meta.d.ts.map +1 -1
- package/package.json +20 -22
- package/src/StatusBarPlugin.tsx +2 -2
- package/src/components/FeedbackForm.tsx +15 -16
- package/src/components/StatusBar.stories.tsx +33 -28
- package/src/components/StatusBar.tsx +3 -2
- package/src/components/{StatusBarImpl.tsx → StatusBarPanel.tsx} +5 -7
- package/src/components/index.ts +1 -1
- package/src/meta.ts +14 -0
- package/dist/lib/browser/chunk-PL5XPTPX.mjs +0 -18
- package/dist/lib/browser/chunk-PL5XPTPX.mjs.map +0 -7
- package/dist/types/src/components/StatusBarImpl.d.ts +0 -3
- package/dist/types/src/components/StatusBarImpl.d.ts.map +0 -1
- package/dist/types/src/hooks/index.d.ts +0 -2
- package/dist/types/src/hooks/index.d.ts.map +0 -1
- package/dist/types/src/hooks/useForm.d.ts +0 -36
- package/dist/types/src/hooks/useForm.d.ts.map +0 -1
- package/dist/types/src/util/index.d.ts +0 -2
- package/dist/types/src/util/index.d.ts.map +0 -1
- package/dist/types/src/util/validation.d.ts +0 -7
- package/dist/types/src/util/validation.d.ts.map +0 -1
- package/src/hooks/index.ts +0 -5
- package/src/hooks/useForm.ts +0 -119
- package/src/meta.tsx +0 -18
- package/src/util/index.ts +0 -5
- package/src/util/validation.ts +0 -22
package/src/meta.tsx
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2024 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { Info, type IconProps } from '@phosphor-icons/react';
|
|
6
|
-
import React from 'react';
|
|
7
|
-
|
|
8
|
-
import { pluginMeta } from '@dxos/app-framework';
|
|
9
|
-
|
|
10
|
-
export const STATUS_BAR_PLUGIN = 'dxos.org/plugin/status-bar';
|
|
11
|
-
|
|
12
|
-
export default pluginMeta({
|
|
13
|
-
id: STATUS_BAR_PLUGIN,
|
|
14
|
-
name: 'Status Bar',
|
|
15
|
-
description: 'Display a bar with status and actions.',
|
|
16
|
-
iconComponent: (props: IconProps) => <Info {...props} />,
|
|
17
|
-
iconSymbol: 'ph--info--regular',
|
|
18
|
-
});
|
package/src/util/index.ts
DELETED
package/src/util/validation.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2024 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
import { ArrayFormatter } from '@effect/schema';
|
|
5
|
-
import { Effect } from 'effect';
|
|
6
|
-
|
|
7
|
-
import { S } from '@dxos/echo-schema';
|
|
8
|
-
|
|
9
|
-
export type ValidationError = { path: string; message: string };
|
|
10
|
-
|
|
11
|
-
export const validate = <T>(schema: S.Schema<T>, data: any): ValidationError[] | undefined => {
|
|
12
|
-
const validator = S.decodeUnknownEither(schema, { errors: 'all' });
|
|
13
|
-
const result = validator(data);
|
|
14
|
-
|
|
15
|
-
if (result._tag === 'Left') {
|
|
16
|
-
const errors = Effect.runSync(ArrayFormatter.formatError(result.left));
|
|
17
|
-
// TODO(Zan): Path.join is an assumption...
|
|
18
|
-
return errors.map(({ message, path }) => ({ message, path: path.join('.') }));
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
return undefined;
|
|
22
|
-
};
|