@dxos/app-framework 0.9.0 → 0.9.1-staging.ee54ba693a
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/{capability-BOPAKKWG.mjs → capability-S44TE2H7.mjs} +9 -9
- package/dist/lib/browser/{chunk-66IXTIVK.mjs → chunk-3NQLTQCP.mjs} +6 -7
- package/dist/lib/browser/chunk-3NQLTQCP.mjs.map +7 -0
- package/dist/lib/browser/chunk-53HJHMS5.mjs +7 -0
- package/dist/lib/browser/chunk-53HJHMS5.mjs.map +7 -0
- package/dist/lib/browser/{chunk-Y66ELD4U.mjs → chunk-KRJ4KK2W.mjs} +36 -7
- package/dist/lib/browser/chunk-KRJ4KK2W.mjs.map +7 -0
- package/dist/lib/browser/{chunk-KZUDO43J.mjs → chunk-LUH4Y5F2.mjs} +31 -23
- package/dist/lib/browser/chunk-LUH4Y5F2.mjs.map +7 -0
- package/dist/lib/browser/{chunk-CO3XLNUX.mjs → chunk-NKVRSMFN.mjs} +18 -18
- package/dist/lib/browser/chunk-NKVRSMFN.mjs.map +7 -0
- package/dist/lib/browser/{chunk-DC3WRPBV.mjs → chunk-OO53M5UK.mjs} +45 -12
- package/dist/lib/browser/chunk-OO53M5UK.mjs.map +7 -0
- package/dist/lib/browser/{chunk-IW44C7UL.mjs → chunk-OPTS3ZSN.mjs} +1 -1
- package/dist/lib/browser/chunk-OPTS3ZSN.mjs.map +7 -0
- package/dist/lib/browser/{chunk-HFLKXMT7.mjs → chunk-U5MESPM5.mjs} +61 -45
- package/dist/lib/browser/chunk-U5MESPM5.mjs.map +7 -0
- package/dist/lib/browser/{chunk-XHS5KDNX.mjs → chunk-UGYCLOXE.mjs} +25 -25
- package/dist/lib/browser/chunk-UGYCLOXE.mjs.map +7 -0
- package/dist/lib/browser/{chunk-5GY3YOEL.mjs → chunk-VF37YTXJ.mjs} +5 -5
- package/dist/lib/browser/chunk-VF37YTXJ.mjs.map +7 -0
- package/dist/lib/browser/{chunk-FO3IYSLV.mjs → chunk-YUVQIOTB.mjs} +29 -37
- package/dist/lib/browser/chunk-YUVQIOTB.mjs.map +7 -0
- package/dist/lib/browser/cli/index.mjs +9 -9
- package/dist/lib/browser/cli/index.mjs.map +2 -2
- package/dist/lib/browser/common/activation-events.mjs +7 -7
- package/dist/lib/browser/common/capabilities.mjs +7 -7
- package/dist/lib/browser/config/index.mjs +8 -0
- package/dist/lib/browser/config/index.mjs.map +7 -0
- package/dist/lib/browser/core/activation-event.mjs +1 -1
- package/dist/lib/browser/core/capability.mjs +1 -1
- package/dist/lib/browser/core/plugin-manager.mjs +4 -4
- package/dist/lib/browser/core/plugin.mjs +12 -2
- package/dist/lib/browser/core/url-loader.mjs +3 -3
- package/dist/lib/browser/index.mjs +14 -10
- package/dist/lib/browser/index.mjs.map +1 -1
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{process-manager-capability-GXNUO7AR.mjs → process-manager-capability-QK4BMKMN.mjs} +9 -9
- package/dist/lib/browser/testing/index.mjs +15 -15
- package/dist/lib/browser/testing/index.mjs.map +3 -3
- package/dist/lib/browser/testing/react.mjs +11 -11
- package/dist/lib/browser/testing/react.mjs.map +3 -3
- package/dist/lib/browser/ui/index.mjs +18 -10
- package/dist/lib/node-esm/{capability-KZWRTX7R.mjs → capability-3YRF77LV.mjs} +9 -9
- package/dist/lib/node-esm/chunk-2UPUZXGU.mjs +9 -0
- package/dist/lib/node-esm/chunk-2UPUZXGU.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-XIGPWXCQ.mjs → chunk-4SE7SX7N.mjs} +45 -12
- package/dist/lib/node-esm/chunk-4SE7SX7N.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-XOCUANHO.mjs → chunk-BMW6P6QA.mjs} +6 -7
- package/dist/lib/node-esm/chunk-BMW6P6QA.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-A5CHGAZE.mjs → chunk-DRT75WGD.mjs} +61 -45
- package/dist/lib/node-esm/chunk-DRT75WGD.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-XGBUKRCK.mjs → chunk-FKMVORZN.mjs} +31 -23
- package/dist/lib/node-esm/chunk-FKMVORZN.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-CTKEZHKF.mjs → chunk-GLH4LGHZ.mjs} +1 -1
- package/dist/lib/node-esm/chunk-GLH4LGHZ.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-SX5NVETP.mjs → chunk-IL7O7IRX.mjs} +25 -25
- package/dist/lib/node-esm/chunk-IL7O7IRX.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-FSVGKTF6.mjs → chunk-ND2HETHD.mjs} +36 -7
- package/dist/lib/node-esm/chunk-ND2HETHD.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-KFZEB6BV.mjs → chunk-TLKYZKPW.mjs} +5 -5
- package/dist/lib/node-esm/chunk-TLKYZKPW.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-WK7OIQKI.mjs → chunk-VCPGX7WN.mjs} +29 -37
- package/dist/lib/node-esm/chunk-VCPGX7WN.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-NULBHQYS.mjs → chunk-XSZMX53L.mjs} +18 -18
- package/dist/lib/node-esm/chunk-XSZMX53L.mjs.map +7 -0
- package/dist/lib/node-esm/cli/index.mjs +9 -9
- package/dist/lib/node-esm/cli/index.mjs.map +2 -2
- package/dist/lib/node-esm/common/activation-events.mjs +7 -7
- package/dist/lib/node-esm/common/capabilities.mjs +7 -7
- package/dist/lib/node-esm/config/index.mjs +9 -0
- package/dist/lib/node-esm/config/index.mjs.map +7 -0
- package/dist/lib/node-esm/core/activation-event.mjs +1 -1
- package/dist/lib/node-esm/core/capability.mjs +1 -1
- package/dist/lib/node-esm/core/plugin-manager.mjs +4 -4
- package/dist/lib/node-esm/core/plugin.mjs +12 -2
- package/dist/lib/node-esm/core/url-loader.mjs +3 -3
- package/dist/lib/node-esm/index.mjs +14 -10
- package/dist/lib/node-esm/index.mjs.map +1 -1
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{process-manager-capability-TX5TA6YN.mjs → process-manager-capability-5S7WZ2JR.mjs} +9 -9
- package/dist/lib/node-esm/testing/index.mjs +15 -15
- package/dist/lib/node-esm/testing/index.mjs.map +3 -3
- package/dist/lib/node-esm/testing/react.mjs +11 -11
- package/dist/lib/node-esm/testing/react.mjs.map +3 -3
- package/dist/lib/node-esm/ui/index.mjs +18 -10
- package/dist/plugin/node-esm/index.mjs +414 -81
- package/dist/plugin/node-esm/index.mjs.map +4 -4
- package/dist/plugin/node-esm/meta.json +1 -1
- package/dist/types/src/cli/cli.d.ts +1 -1
- package/dist/types/src/common/activation-events.d.ts.map +1 -1
- package/dist/types/src/common/capabilities.d.ts +2 -2
- package/dist/types/src/common/capabilities.d.ts.map +1 -1
- package/dist/types/src/config/index.d.ts +2 -0
- package/dist/types/src/config/index.d.ts.map +1 -0
- package/dist/types/src/core/activation-event.d.ts +9 -6
- package/dist/types/src/core/activation-event.d.ts.map +1 -1
- package/dist/types/src/core/capability.d.ts +9 -3
- package/dist/types/src/core/capability.d.ts.map +1 -1
- package/dist/types/src/core/edge-registry-plugin-provider.d.ts +6 -11
- package/dist/types/src/core/edge-registry-plugin-provider.d.ts.map +1 -1
- package/dist/types/src/core/plugin-manager.d.ts.map +1 -1
- package/dist/types/src/core/plugin-manifest.d.ts +25 -7
- package/dist/types/src/core/plugin-manifest.d.ts.map +1 -1
- package/dist/types/src/core/plugin.d.ts +89 -91
- package/dist/types/src/core/plugin.d.ts.map +1 -1
- package/dist/types/src/core/registry.d.ts +17 -57
- package/dist/types/src/core/registry.d.ts.map +1 -1
- package/dist/types/src/core/url-loader.d.ts +2 -2
- package/dist/types/src/core/url-loader.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +1 -0
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/plugin-process-manager/history/capability.d.ts +1 -3
- package/dist/types/src/plugin-process-manager/history/capability.d.ts.map +1 -1
- package/dist/types/src/plugin-process-manager/meta.d.ts +32 -2
- package/dist/types/src/plugin-process-manager/meta.d.ts.map +1 -1
- package/dist/types/src/plugin-process-manager/process-manager-capability.d.ts +1 -4
- package/dist/types/src/plugin-process-manager/process-manager-capability.d.ts.map +1 -1
- package/dist/types/src/testing/harness.d.ts +1 -1
- package/dist/types/src/testing/harness.d.ts.map +1 -1
- package/dist/types/src/testing/react.d.ts +6 -5
- package/dist/types/src/testing/react.d.ts.map +1 -1
- package/dist/types/src/testing/withPluginManager.d.ts.map +1 -1
- package/dist/types/src/testing/withPluginManager.stories.d.ts.map +1 -1
- package/dist/types/src/ui/components/App/App.stories.d.ts +2 -2
- package/dist/types/src/ui/components/App/App.stories.d.ts.map +1 -1
- package/dist/types/src/ui/components/PluginManager/PluginManagerProvider.d.ts +6 -0
- package/dist/types/src/ui/components/PluginManager/PluginManagerProvider.d.ts.map +1 -1
- package/dist/types/src/ui/components/Surface/SurfaceComponent.d.ts +6 -10
- package/dist/types/src/ui/components/Surface/SurfaceComponent.d.ts.map +1 -1
- package/dist/types/src/ui/components/Surface/SurfaceComponent.stories.d.ts.map +1 -1
- package/dist/types/src/ui/components/Surface/SurfaceProfilerContext.d.ts +1 -1
- package/dist/types/src/ui/components/Surface/SurfaceProfilerContext.d.ts.map +1 -1
- package/dist/types/src/ui/components/Surface/context.d.ts +6 -2
- package/dist/types/src/ui/components/Surface/context.d.ts.map +1 -1
- package/dist/types/src/ui/components/Surface/index.d.ts +11 -4
- package/dist/types/src/ui/components/Surface/index.d.ts.map +1 -1
- package/dist/types/src/ui/components/Surface/types.d.ts +52 -72
- package/dist/types/src/ui/components/Surface/types.d.ts.map +1 -1
- package/dist/types/src/ui/hooks/useApp.d.ts +1 -1
- package/dist/types/src/ui/hooks/useCapabilities.d.ts +17 -1
- package/dist/types/src/ui/hooks/useCapabilities.d.ts.map +1 -1
- package/dist/types/src/vite-plugin/composer/index.d.ts +11 -4
- package/dist/types/src/vite-plugin/composer/index.d.ts.map +1 -1
- package/dist/types/src/vite-plugin/import-map/index.d.ts.map +1 -1
- package/dist/types/src/vite-plugin/index.d.ts +1 -0
- package/dist/types/src/vite-plugin/index.d.ts.map +1 -1
- package/dist/types/src/vite-plugin/load.d.ts +16 -0
- package/dist/types/src/vite-plugin/load.d.ts.map +1 -0
- package/dist/types/src/vite-plugin/manifest.d.ts +16 -4
- package/dist/types/src/vite-plugin/manifest.d.ts.map +1 -1
- package/dist/types/src/vite-plugin/packages.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/docs/registry-spec.md +331 -0
- package/moon.yml +1 -0
- package/package.json +50 -39
- package/src/cli/cli.ts +2 -2
- package/src/common/activation-events.ts +3 -3
- package/src/common/capabilities.ts +18 -18
- package/src/config/index.ts +5 -0
- package/src/core/activation-event.ts +15 -8
- package/src/core/capability.ts +18 -6
- package/src/core/edge-registry-plugin-provider.ts +41 -42
- package/src/core/plugin-manager.test.ts +133 -137
- package/src/core/plugin-manager.ts +25 -19
- package/src/core/plugin-manifest.test.ts +5 -5
- package/src/core/plugin-manifest.ts +13 -10
- package/src/core/plugin.ts +58 -114
- package/src/core/registry.ts +20 -60
- package/src/core/url-loader.test.ts +2 -2
- package/src/core/url-loader.ts +23 -19
- package/src/index.ts +1 -0
- package/src/testing/harness.ts +5 -3
- package/src/testing/react.test.tsx +4 -2
- package/src/testing/react.tsx +10 -9
- package/src/testing/service.ts +2 -2
- package/src/testing/withPluginManager.stories.tsx +4 -2
- package/src/testing/withPluginManager.tsx +3 -1
- package/src/ui/components/App/App.stories.tsx +2 -2
- package/src/ui/components/PluginManager/PluginManagerProvider.ts +7 -0
- package/src/ui/components/Surface/SurfaceComponent.stories.tsx +22 -22
- package/src/ui/components/Surface/SurfaceComponent.tsx +90 -79
- package/src/ui/components/Surface/SurfaceProfilerContext.tsx +1 -1
- package/src/ui/components/Surface/context.ts +6 -4
- package/src/ui/components/Surface/index.ts +14 -3
- package/src/ui/components/Surface/types.test.ts +43 -51
- package/src/ui/components/Surface/types.ts +99 -64
- package/src/ui/hooks/useApp.test.tsx +1 -1
- package/src/ui/hooks/useApp.tsx +2 -2
- package/src/ui/hooks/useCapabilities.ts +49 -2
- package/src/vite-plugin/boot-loader/BootLoader.solid-stories.tsx +11 -11
- package/src/vite-plugin/boot-loader/loader.ts +3 -3
- package/src/vite-plugin/composer/index.ts +134 -61
- package/src/vite-plugin/import-map/index.ts +23 -7
- package/src/vite-plugin/index.ts +1 -0
- package/src/vite-plugin/load.ts +57 -0
- package/src/vite-plugin/manifest.test.ts +3 -3
- package/src/vite-plugin/manifest.ts +21 -10
- package/src/vite-plugin/packages.ts +0 -2
- package/tsconfig.json +5 -2
- package/dist/lib/browser/chunk-5GY3YOEL.mjs.map +0 -7
- package/dist/lib/browser/chunk-66IXTIVK.mjs.map +0 -7
- package/dist/lib/browser/chunk-CO3XLNUX.mjs.map +0 -7
- package/dist/lib/browser/chunk-DC3WRPBV.mjs.map +0 -7
- package/dist/lib/browser/chunk-FO3IYSLV.mjs.map +0 -7
- package/dist/lib/browser/chunk-HFLKXMT7.mjs.map +0 -7
- package/dist/lib/browser/chunk-IW44C7UL.mjs.map +0 -7
- package/dist/lib/browser/chunk-KZUDO43J.mjs.map +0 -7
- package/dist/lib/browser/chunk-XHS5KDNX.mjs.map +0 -7
- package/dist/lib/browser/chunk-Y66ELD4U.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-A5CHGAZE.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-CTKEZHKF.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-FSVGKTF6.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-KFZEB6BV.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-NULBHQYS.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-SX5NVETP.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-WK7OIQKI.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-XGBUKRCK.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-XIGPWXCQ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-XOCUANHO.mjs.map +0 -7
- /package/dist/lib/browser/{capability-BOPAKKWG.mjs.map → capability-S44TE2H7.mjs.map} +0 -0
- /package/dist/lib/browser/{process-manager-capability-GXNUO7AR.mjs.map → process-manager-capability-QK4BMKMN.mjs.map} +0 -0
- /package/dist/lib/node-esm/{capability-KZWRTX7R.mjs.map → capability-3YRF77LV.mjs.map} +0 -0
- /package/dist/lib/node-esm/{process-manager-capability-TX5TA6YN.mjs.map → process-manager-capability-5S7WZ2JR.mjs.map} +0 -0
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import * as Context from 'effect/Context';
|
|
2
2
|
import * as Effect from 'effect/Effect';
|
|
3
3
|
import * as Pipeable from 'effect/Pipeable';
|
|
4
|
+
import * as Schema from 'effect/Schema';
|
|
4
5
|
import { BaseError } from '@dxos/errors';
|
|
5
6
|
import { DXN } from '@dxos/keys';
|
|
7
|
+
import { Config2 } from '@dxos/protocols';
|
|
6
8
|
import type * as ActivationEvent from './activation-event';
|
|
7
9
|
import * as Capability from './capability';
|
|
8
10
|
import type * as PluginManager from './plugin-manager';
|
|
@@ -94,105 +96,101 @@ export interface PluginModule {
|
|
|
94
96
|
export type PluginModuleOptions = Omit<PluginModule, 'id' | typeof PluginModuleTypeId> & {
|
|
95
97
|
id?: string;
|
|
96
98
|
};
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
99
|
+
/**
|
|
100
|
+
* Runtime plugin metadata, derived from the `@dxos/protocols` registry schemas (protocols owns the
|
|
101
|
+
* config + registry schemas; the runtime projection lives here).
|
|
102
|
+
*
|
|
103
|
+
* - {@link Profile}: version-independent identity + display + provenance — the wire `PluginProfileSchema`
|
|
104
|
+
* (which carries `key`, the display fields, `dependsOn`, `spec`) plus `author` (resolved at runtime
|
|
105
|
+
* from the publisher's handle/DID for registry plugins, or self-declared for bundled).
|
|
106
|
+
* - {@link Release}: a specific hosted release — the wire `PluginReleaseSchema` (version, moduleUrl, dependencies).
|
|
107
|
+
* - {@link Meta}: a resolved single-release view — `{ profile, release? }`, both nested. `release` is
|
|
108
|
+
* unset for bundled plugins (compiled in) and set for registry plugins.
|
|
109
|
+
*/
|
|
110
|
+
export declare const Profile: Schema.Struct<{
|
|
111
|
+
key: Schema.filter<typeof Schema.String>;
|
|
112
|
+
name: Schema.filter<typeof Schema.String>;
|
|
113
|
+
description: Schema.optional<typeof Schema.String>;
|
|
114
|
+
homePage: Schema.optional<typeof Schema.String>;
|
|
115
|
+
source: Schema.optional<typeof Schema.String>;
|
|
116
|
+
tags: Schema.optional<Schema.Array$<typeof Schema.String>>;
|
|
117
|
+
screenshots: Schema.optional<Schema.Array$<Schema.Struct<{
|
|
118
|
+
light: Schema.optional<typeof Schema.String>;
|
|
119
|
+
dark: Schema.optional<typeof Schema.String>;
|
|
120
|
+
}>>>;
|
|
121
|
+
icon: Schema.optional<Schema.Struct<{
|
|
122
|
+
key: Schema.filter<typeof Schema.String>;
|
|
123
|
+
hue: Schema.optional<typeof Schema.String>;
|
|
124
|
+
}>>;
|
|
125
|
+
dependsOn: Schema.optional<Schema.Array$<typeof Schema.String>>;
|
|
126
|
+
spec: Schema.optional<typeof Schema.String>;
|
|
127
|
+
createdAt: Schema.optional<typeof Schema.String>;
|
|
128
|
+
author: Schema.optional<typeof Schema.String>;
|
|
129
|
+
}>;
|
|
130
|
+
export type Profile = Schema.Schema.Type<typeof Profile>;
|
|
131
|
+
export declare const Release: Schema.Struct<{
|
|
132
|
+
version: Schema.filter<typeof Schema.String>;
|
|
133
|
+
moduleUrl: Schema.filter<typeof Schema.String>;
|
|
134
|
+
dependencies: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.String>>;
|
|
135
|
+
pluginKey: Schema.optional<typeof Schema.String>;
|
|
136
|
+
manifestHash: Schema.optional<typeof Schema.String>;
|
|
137
|
+
createdAt: Schema.optional<typeof Schema.String>;
|
|
138
|
+
}>;
|
|
139
|
+
export type Release = Schema.Schema.Type<typeof Release>;
|
|
140
|
+
export declare const Meta: Schema.Struct<{
|
|
141
|
+
profile: Schema.Struct<{
|
|
142
|
+
key: Schema.filter<typeof Schema.String>;
|
|
143
|
+
name: Schema.filter<typeof Schema.String>;
|
|
144
|
+
description: Schema.optional<typeof Schema.String>;
|
|
145
|
+
homePage: Schema.optional<typeof Schema.String>;
|
|
146
|
+
source: Schema.optional<typeof Schema.String>;
|
|
147
|
+
tags: Schema.optional<Schema.Array$<typeof Schema.String>>;
|
|
148
|
+
screenshots: Schema.optional<Schema.Array$<Schema.Struct<{
|
|
149
|
+
light: Schema.optional<typeof Schema.String>;
|
|
150
|
+
dark: Schema.optional<typeof Schema.String>;
|
|
151
|
+
}>>>;
|
|
152
|
+
icon: Schema.optional<Schema.Struct<{
|
|
153
|
+
key: Schema.filter<typeof Schema.String>;
|
|
154
|
+
hue: Schema.optional<typeof Schema.String>;
|
|
155
|
+
}>>;
|
|
156
|
+
dependsOn: Schema.optional<Schema.Array$<typeof Schema.String>>;
|
|
157
|
+
spec: Schema.optional<typeof Schema.String>;
|
|
158
|
+
createdAt: Schema.optional<typeof Schema.String>;
|
|
159
|
+
author: Schema.optional<typeof Schema.String>;
|
|
160
|
+
}>;
|
|
161
|
+
release: Schema.optional<Schema.Struct<{
|
|
162
|
+
version: Schema.filter<typeof Schema.String>;
|
|
163
|
+
moduleUrl: Schema.filter<typeof Schema.String>;
|
|
164
|
+
dependencies: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.String>>;
|
|
165
|
+
pluginKey: Schema.optional<typeof Schema.String>;
|
|
166
|
+
manifestHash: Schema.optional<typeof Schema.String>;
|
|
167
|
+
createdAt: Schema.optional<typeof Schema.String>;
|
|
168
|
+
}>>;
|
|
169
|
+
}>;
|
|
170
|
+
export type Meta = Schema.Schema.Type<typeof Meta>;
|
|
171
|
+
/** Options for {@link makeMeta}: the {@link Profile} content fields plus the canonical DXN `key`. */
|
|
172
|
+
export type MakeMetaOptions = {
|
|
112
173
|
key: DXN.DXN;
|
|
113
|
-
/**
|
|
114
|
-
* Human-readable name.
|
|
115
|
-
*/
|
|
116
174
|
name: string;
|
|
117
|
-
/**
|
|
118
|
-
* Semver version string of the plugin, typically the publishing package's
|
|
119
|
-
* `package.json` version. Derived from the version segment of {@link key} by
|
|
120
|
-
* {@link makeMeta} — do not set directly.
|
|
121
|
-
*/
|
|
122
|
-
version?: string;
|
|
123
|
-
/**
|
|
124
|
-
* Short description of plugin functionality.
|
|
125
|
-
*/
|
|
126
175
|
description?: string;
|
|
127
|
-
/**
|
|
128
|
-
* Name of the author or organization that created the plugin.
|
|
129
|
-
*/
|
|
130
176
|
author?: string;
|
|
131
|
-
/**
|
|
132
|
-
* URL of home page.
|
|
133
|
-
*/
|
|
134
177
|
homePage?: string;
|
|
135
|
-
/**
|
|
136
|
-
* URL of source code.
|
|
137
|
-
*/
|
|
138
178
|
source?: string;
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
* specification file — e.g. `'PLUGIN.mdl'` or `'docs/PLUGIN.mdl'`. The file
|
|
142
|
-
* is shipped via the package's `files` entry and resolved by registry
|
|
143
|
-
* surfaces to render an in-app viewer and/or external link.
|
|
144
|
-
*/
|
|
179
|
+
tags?: readonly string[];
|
|
180
|
+
dependsOn?: readonly string[];
|
|
145
181
|
spec?: string;
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
*/
|
|
149
|
-
screenshots?: string[];
|
|
150
|
-
/**
|
|
151
|
-
* Tags to help categorize the plugin.
|
|
152
|
-
*/
|
|
153
|
-
tags?: string[];
|
|
154
|
-
/**
|
|
155
|
-
* A grep-able symbol string which can be resolved to an icon asset by @ch-ui/icons, via @ch-ui/vite-plugin-icons.
|
|
156
|
-
*/
|
|
157
|
-
icon?: string;
|
|
158
|
-
/**
|
|
159
|
-
* Icon hue (ChromaticPalette).
|
|
160
|
-
*/
|
|
161
|
-
iconHue?: string;
|
|
162
|
-
/**
|
|
163
|
-
* IDs of plugins this plugin functionally depends on.
|
|
164
|
-
*
|
|
165
|
-
* Treated as a convenience by the default `PluginManager` flow:
|
|
166
|
-
* - Enabling this plugin auto-enables the transitive closure of `dependsOn`
|
|
167
|
-
* (installing missing entries from the plugin registry when possible).
|
|
168
|
-
* - Disabling a depended-upon plugin surfaces dependents to the caller; the
|
|
169
|
-
* `PluginManager.disable` API supports an opt-in cascade.
|
|
170
|
-
*
|
|
171
|
-
* Not an invariant: low-level `PluginManager` APIs accept opt-outs
|
|
172
|
-
* (`resolveDependencies: false`, `ignoreDependents: true`) so a caller may
|
|
173
|
-
* substitute an alternative implementation that satisfies the dependent's
|
|
174
|
-
* capability needs in its own way.
|
|
175
|
-
*/
|
|
176
|
-
dependsOn?: string[];
|
|
182
|
+
icon?: Config2.Icon;
|
|
183
|
+
screenshots?: ReadonlyArray<Config2.Screenshot>;
|
|
177
184
|
};
|
|
185
|
+
/** Constructs a bundled-plugin {@link Meta} from a canonical DXN. `profile.key` is the bare NSID derived from `key`. */
|
|
186
|
+
export declare const makeMeta: (options: MakeMetaOptions) => Meta;
|
|
187
|
+
/** Returns the plugin's canonical DXN URI, constructed from `meta.profile.key` and `meta.release?.version`. */
|
|
188
|
+
export declare const getURI: (meta: Meta) => DXN.DXN;
|
|
178
189
|
/**
|
|
179
|
-
*
|
|
180
|
-
*
|
|
181
|
-
* `version` cannot be passed directly.
|
|
182
|
-
*/
|
|
183
|
-
export type MakeMetaOptions = Omit<Meta, 'id' | 'version'>;
|
|
184
|
-
/**
|
|
185
|
-
* Constructs a plugin {@link Meta} from a single canonical DXN. The `key` DXN is
|
|
186
|
-
* the one source of truth; `id` (bare NSID) and `version` (semver) are derived
|
|
187
|
-
* from it so each datum has exactly one home and cannot drift out of sync.
|
|
188
|
-
*
|
|
189
|
-
* @example
|
|
190
|
-
* export const meta = Plugin.makeMeta({
|
|
191
|
-
* key: DXN.make('org.dxos.plugin.example', '0.8.3'),
|
|
192
|
-
* name: 'Example',
|
|
193
|
-
* });
|
|
190
|
+
* Derives a runtime {@link Meta} from a loaded `dx.config.ts` (the `@dxos/protocols` `Config2.Config`).
|
|
191
|
+
* Maps the flat authoring config to the nested profile; bundled plugins have no `release`.
|
|
194
192
|
*/
|
|
195
|
-
export declare const
|
|
193
|
+
export declare const getMetaFromConfig: ({ plugin }: Config2.Config) => Meta;
|
|
196
194
|
/**
|
|
197
195
|
* Identifier denoting a Plugin.
|
|
198
196
|
*/
|
|
@@ -252,7 +250,7 @@ export type LazyLoader<T = void> = () => Promise<{
|
|
|
252
250
|
* Defines a lazy plugin whose body is loaded on first enable.
|
|
253
251
|
*
|
|
254
252
|
* The returned factory produces a stub `Plugin` that exposes `meta`
|
|
255
|
-
* synchronously (so callers can read `Plugin.meta.
|
|
253
|
+
* synchronously (so callers can read `Plugin.meta.profile.key` for free) but defers
|
|
256
254
|
* loading the real plugin's modules until the manager calls
|
|
257
255
|
* `Plugin.resolveLazy`. This lets the plugin's main entry point ship as a
|
|
258
256
|
* tiny meta-only chunk — the heavy capabilities, schema, React surfaces,
|
|
@@ -306,7 +304,7 @@ declare const LazyPluginError_base: {
|
|
|
306
304
|
};
|
|
307
305
|
/**
|
|
308
306
|
* Tagged error for failures during lazy plugin resolution. `context.id` is
|
|
309
|
-
* the lazy plugin's `meta.
|
|
307
|
+
* the lazy plugin's `meta.profile.key`; `context.reason` discriminates the failure
|
|
310
308
|
* mode (`'load-failed' | 'missing-default' | 'invalid-plugin' |
|
|
311
309
|
* 'meta-mismatch'`) so callers can route on it.
|
|
312
310
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../src/core/plugin.ts"],"names":[],"mappings":"AAIA,OAAO,KAA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OAAO,CAAC;IAAE,OAAO,EAAE,aAAa,CAAC,CAAC,CAAC,CAAA;CAAE,CAAC,CAAC;AAKhF;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,IAAI,GAAI,CAAC,GAAG,IAAI,QAAQ,IAAI,UAAU,UAAU,CAAC,CAAC,CAAC,KAAG,aAAa,CAAC,CAAC,CAUjF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,MAAM,WAAY,MAAM,KAAG,OAA4B,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAErE;;;;;GAKG;AACH,qBAAa,eAAgB,SAAQ,oBAAoE;CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAE5G;;;;;;;;;;;;GAYG;AACH,qBAAa,qBAAsB,SAAQ,0BAG1C;CAAG;AAEJ;;;;;GAKG;AACH,eAAO,MAAM,WAAW,WAAY,MAAM,KAAG,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,eAAe,CAwB9E,CAAC"}
|
|
@@ -1,51 +1,12 @@
|
|
|
1
1
|
import { Atom, type Registry as AtomRegistry } from '@effect-atom/atom-react';
|
|
2
2
|
import * as Effect from 'effect/Effect';
|
|
3
|
+
import type * as Plugin from './plugin';
|
|
3
4
|
/**
|
|
4
|
-
* A registry
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* Implementations of {@link PluginProvider} (e.g. {@link EdgeRegistryPluginProvider})
|
|
9
|
-
* are responsible for mapping their wire-format entries to this shape.
|
|
5
|
+
* A registry catalog entry is a {@link Plugin.Meta} (profile + the latest release), the same
|
|
6
|
+
* runtime type bundled plugins use. {@link PluginProvider} implementations (e.g.
|
|
7
|
+
* {@link EdgeRegistryPluginProvider}) map their wire-format entries (`PluginView`) to this shape.
|
|
8
|
+
* A single installable version is a {@link Plugin.Release}.
|
|
10
9
|
*/
|
|
11
|
-
export type Plugin = {
|
|
12
|
-
id: string;
|
|
13
|
-
name: string;
|
|
14
|
-
description?: string;
|
|
15
|
-
homePage?: string;
|
|
16
|
-
source?: string;
|
|
17
|
-
screenshots?: string[];
|
|
18
|
-
tags?: string[];
|
|
19
|
-
icon?: string;
|
|
20
|
-
iconHue?: string;
|
|
21
|
-
/**
|
|
22
|
-
* IDs of plugins this entry declares as runtime dependencies. Mirrors
|
|
23
|
-
* {@link Plugin.Meta.dependsOn}. Surfaced in the catalog so the manager can
|
|
24
|
-
* resolve and auto-install transitive deps before they are first loaded.
|
|
25
|
-
*/
|
|
26
|
-
dependsOn?: string[];
|
|
27
|
-
/** URL to dynamic-import the latest version of this plugin module. */
|
|
28
|
-
moduleUrl: string;
|
|
29
|
-
/** GitHub repository slug, e.g. `owner/name`. Used to fetch version history. */
|
|
30
|
-
repo: string;
|
|
31
|
-
/**
|
|
32
|
-
* Latest known version string, e.g. `v1.2.0`.
|
|
33
|
-
* Corresponds to releaseTag in the wire-format PluginEntry; named `version` here
|
|
34
|
-
* because the plugin manager layer speaks versions, not release tags.
|
|
35
|
-
*/
|
|
36
|
-
version: string;
|
|
37
|
-
};
|
|
38
|
-
/**
|
|
39
|
-
* A single installable version of a registry plugin.
|
|
40
|
-
*/
|
|
41
|
-
export type PluginVersion = {
|
|
42
|
-
/** Version string, e.g. `v1.2.0`. */
|
|
43
|
-
tag: string;
|
|
44
|
-
/** URL to dynamic-import this specific version of the plugin module. */
|
|
45
|
-
moduleUrl: string;
|
|
46
|
-
/** Unix ms of when this version was published (optional; omitted when unknown). */
|
|
47
|
-
releasedAt?: number;
|
|
48
|
-
};
|
|
49
10
|
/**
|
|
50
11
|
* Abstraction over the plugin registry catalog backend.
|
|
51
12
|
* Implementations may call Edge, a local cache, or a stub.
|
|
@@ -57,21 +18,20 @@ export type PluginVersion = {
|
|
|
57
18
|
*/
|
|
58
19
|
export interface PluginProvider {
|
|
59
20
|
/**
|
|
60
|
-
* Returns all
|
|
21
|
+
* Returns all registry plugins (latest version of each).
|
|
61
22
|
*/
|
|
62
|
-
listPlugins(): Effect.Effect<readonly Plugin[], Error>;
|
|
23
|
+
listPlugins(): Effect.Effect<readonly Plugin.Meta[], Error>;
|
|
63
24
|
/**
|
|
64
|
-
* Returns all known versions of a plugin identified by its
|
|
65
|
-
*
|
|
66
|
-
* return at least one entry representing the current/latest release.
|
|
25
|
+
* Returns all known versions of a plugin, identified by its composer plugin id (NSID).
|
|
26
|
+
* Ordered newest-first. Must return at least one entry.
|
|
67
27
|
*/
|
|
68
|
-
listVersions(
|
|
28
|
+
listVersions(id: string): Effect.Effect<readonly Plugin.Release[], Error>;
|
|
69
29
|
/**
|
|
70
|
-
* Returns a single plugin entry for the given
|
|
30
|
+
* Returns a single plugin entry for the given id.
|
|
71
31
|
* If `version` is omitted, returns the latest.
|
|
72
|
-
* Fails if the
|
|
32
|
+
* Fails if the plugin or version is not found.
|
|
73
33
|
*/
|
|
74
|
-
getPlugin(
|
|
34
|
+
getPlugin(id: string, version?: string): Effect.Effect<Plugin.Meta, Error>;
|
|
75
35
|
}
|
|
76
36
|
/**
|
|
77
37
|
* Atomic snapshot of the registry catalog as observed by the host.
|
|
@@ -79,7 +39,7 @@ export interface PluginProvider {
|
|
|
79
39
|
* (loading state, list contents, last error).
|
|
80
40
|
*/
|
|
81
41
|
export type PluginsState = {
|
|
82
|
-
entries: readonly Plugin[];
|
|
42
|
+
entries: readonly Plugin.Meta[];
|
|
83
43
|
loading: boolean;
|
|
84
44
|
error: Error | null;
|
|
85
45
|
};
|
|
@@ -98,10 +58,10 @@ export declare class Manager {
|
|
|
98
58
|
readonly plugins: Atom.Writable<PluginsState>;
|
|
99
59
|
constructor(provider: PluginProvider | undefined, atomRegistry: AtomRegistry.Registry);
|
|
100
60
|
/** Forwards to the underlying provider. */
|
|
101
|
-
listPlugins(): Effect.Effect<readonly Plugin[], Error>;
|
|
61
|
+
listPlugins(): Effect.Effect<readonly Plugin.Meta[], Error>;
|
|
102
62
|
/** Forwards to the underlying provider. */
|
|
103
|
-
listVersions(
|
|
63
|
+
listVersions(id: string): Effect.Effect<readonly Plugin.Release[], Error>;
|
|
104
64
|
/** Forwards to the underlying provider. */
|
|
105
|
-
getPlugin(
|
|
65
|
+
getPlugin(id: string, version?: string): Effect.Effect<Plugin.Meta, Error>;
|
|
106
66
|
}
|
|
107
67
|
//# sourceMappingURL=registry.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../../src/core/registry.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,IAAI,EAAE,KAAK,QAAQ,IAAI,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAC9E,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAKxC
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../../src/core/registry.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,IAAI,EAAE,KAAK,QAAQ,IAAI,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAC9E,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAKxC,OAAO,KAAK,KAAK,MAAM,MAAM,UAAU,CAAC;AAExC;;;;;GAKG;AAEH;;;;;;;;GAQG;AACH,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,WAAW,IAAI,MAAM,CAAC,MAAM,CAAC,SAAS,MAAM,CAAC,IAAI,EAAE,EAAE,KAAK,CAAC,CAAC;IAE5D;;;OAGG;IACH,YAAY,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,SAAS,MAAM,CAAC,OAAO,EAAE,EAAE,KAAK,CAAC,CAAC;IAE1E;;;;OAIG;IACH,SAAS,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;CAC5E;AAED;;;;GAIG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,OAAO,EAAE,SAAS,MAAM,CAAC,IAAI,EAAE,CAAC;IAChC,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;CACrB,CAAC;AAgBF;;;;;;;;;GASG;AACH,qBAAa,OAAO;;IAClB,QAAQ,CAAC,OAAO,EAAE,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC;IAG9C,YAAY,QAAQ,EAAE,cAAc,GAAG,SAAS,EAAE,YAAY,EAAE,YAAY,CAAC,QAAQ,EAmBpF;IAED,2CAA2C;IAC3C,WAAW,IAAI,MAAM,CAAC,MAAM,CAAC,SAAS,MAAM,CAAC,IAAI,EAAE,EAAE,KAAK,CAAC,CAE1D;IAED,2CAA2C;IAC3C,YAAY,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,SAAS,MAAM,CAAC,OAAO,EAAE,EAAE,KAAK,CAAC,CAExE;IAED,2CAA2C;IAC3C,SAAS,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAEzE;CACF"}
|
|
@@ -71,7 +71,7 @@ export type PreloadOptions = Options & {
|
|
|
71
71
|
*
|
|
72
72
|
* `url` is the URL of the plugin manifest (`plugin.json`), not the entry module.
|
|
73
73
|
*/
|
|
74
|
-
export type
|
|
74
|
+
export type RemotePluginView = {
|
|
75
75
|
id: string;
|
|
76
76
|
url: string;
|
|
77
77
|
/** Installed version string, e.g. `v1.0.0`. Populated after install from a community catalog entry. */
|
|
@@ -86,7 +86,7 @@ export declare const isLocalUrl: (locator: string) => boolean;
|
|
|
86
86
|
* Useful for UI code that needs to know which loaded plugins were installed from a URL
|
|
87
87
|
* (e.g. to surface a tag on remote or localhost-hosted plugins).
|
|
88
88
|
*/
|
|
89
|
-
export declare const getRemoteEntries: (options?: Options) => readonly
|
|
89
|
+
export declare const getRemoteEntries: (options?: Options) => readonly RemotePluginView[];
|
|
90
90
|
/**
|
|
91
91
|
* Updates the persisted installed version for an already-stored remote plugin entry.
|
|
92
92
|
* Does nothing if the plugin has not been persisted yet.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"url-loader.d.ts","sourceRoot":"","sources":["../../../../src/core/url-loader.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAGxC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAGzC,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AACnC,OAAO,KAAK,gBAAgB,MAAM,sBAAsB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKzD;;;;;GAKG;AACH,qBAAa,qBAAsB,SAAQ,0BAAyE;CAAG;AAEvH;;GAEG;AACH,MAAM,MAAM,OAAO,GAAG;IACpB,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IAChC,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACvC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,OAAO,GAAG;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,KAAK,CAAC,EAAE,gBAAgB,CAAC,KAAK,CAAC;CAChC,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG;IACrC,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CAC1D,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"url-loader.d.ts","sourceRoot":"","sources":["../../../../src/core/url-loader.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAGxC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC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MAAM,GAAG,SAIhF,CAAC;AA2GF;;;;GAIG;AACH,eAAO,MAAM,OAAO,aAAa,cAAc,KAAQ,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,EAAE,KAAK,CA2CvF,CAAC;AAEL;;;;;;GAMG;AACH,eAAO,MAAM,IAAI,mBAAoB,MAAM,CAAC,MAAM,EAAE,YAAW,OAAO,eAKnD,MAAM,KAAG,MAAM,CAAC,MAAM,CAAC;IAAE,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,OAAO,CAAA;CAAE,EAAE,qBAAqB,CA0BxG,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,SAAS,aAAc,MAAM,YAAW,OAAO,KAAQ,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAczF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAIA,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,0BAA0B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAIA,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,0BAA0B,CAAC"}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import * as Effect from 'effect/Effect';
|
|
2
2
|
import { Capability } from '../../core';
|
|
3
|
-
|
|
4
|
-
import * as UndoRegistry from './undo-registry';
|
|
5
|
-
declare const _default: (props: void) => Effect.Effect<[Capability.Capability<Capability.InterfaceDef<UndoRegistry.UndoRegistry>>, Capability.Capability<Capability.InterfaceDef<HistoryTracker.HistoryTracker>>], Error, Capability.Service>;
|
|
3
|
+
declare const _default: (props: void) => Effect.Effect<[Capability.Any, Capability.Any], Error, Capability.Service>;
|
|
6
4
|
export default _default;
|
|
7
5
|
//# sourceMappingURL=capability.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capability.d.ts","sourceRoot":"","sources":["../../../../../src/plugin-process-manager/history/capability.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAKxC,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC
|
|
1
|
+
{"version":3,"file":"capability.d.ts","sourceRoot":"","sources":["../../../../../src/plugin-process-manager/history/capability.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAKxC,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -1,3 +1,33 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
export declare const meta: {
|
|
2
|
+
readonly profile: {
|
|
3
|
+
readonly key: string;
|
|
4
|
+
readonly name: string;
|
|
5
|
+
readonly description?: string | undefined;
|
|
6
|
+
readonly homePage?: string | undefined;
|
|
7
|
+
readonly source?: string | undefined;
|
|
8
|
+
readonly tags?: readonly string[] | undefined;
|
|
9
|
+
readonly screenshots?: readonly {
|
|
10
|
+
readonly light?: string | undefined;
|
|
11
|
+
readonly dark?: string | undefined;
|
|
12
|
+
}[] | undefined;
|
|
13
|
+
readonly icon?: {
|
|
14
|
+
readonly key: string;
|
|
15
|
+
readonly hue?: string | undefined;
|
|
16
|
+
} | undefined;
|
|
17
|
+
readonly dependsOn?: readonly string[] | undefined;
|
|
18
|
+
readonly spec?: string | undefined;
|
|
19
|
+
readonly createdAt?: string | undefined;
|
|
20
|
+
readonly author?: string | undefined;
|
|
21
|
+
};
|
|
22
|
+
readonly release?: {
|
|
23
|
+
readonly version: string;
|
|
24
|
+
readonly moduleUrl: string;
|
|
25
|
+
readonly dependencies?: {
|
|
26
|
+
readonly [x: string]: string;
|
|
27
|
+
} | undefined;
|
|
28
|
+
readonly pluginKey?: string | undefined;
|
|
29
|
+
readonly manifestHash?: string | undefined;
|
|
30
|
+
readonly createdAt?: string | undefined;
|
|
31
|
+
} | undefined;
|
|
32
|
+
};
|
|
3
33
|
//# sourceMappingURL=meta.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../../src/plugin-process-manager/meta.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../../src/plugin-process-manager/meta.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOf,CAAC"}
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import * as Effect from 'effect/Effect';
|
|
2
|
-
import { Process, ServiceResolver } from '@dxos/compute';
|
|
3
|
-
import { OperationInvoker } from '@dxos/operation';
|
|
4
|
-
import { Capabilities } from '../common';
|
|
5
2
|
import { Capability, Plugin } from '../core';
|
|
6
|
-
declare const _default: (props: void) => Effect.Effect<[Capability.
|
|
3
|
+
declare const _default: (props: void) => Effect.Effect<[Capability.Any, Capability.Any, Capability.Any, Capability.Any], Error, Plugin.Service | Capability.Service>;
|
|
7
4
|
export default _default;
|
|
8
5
|
//# sourceMappingURL=process-manager-capability.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"process-manager-capability.d.ts","sourceRoot":"","sources":["../../../../src/plugin-process-manager/process-manager-capability.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"process-manager-capability.d.ts","sourceRoot":"","sources":["../../../../src/plugin-process-manager/process-manager-capability.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAYxC,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -5,7 +5,7 @@ import { Capabilities } from '../common';
|
|
|
5
5
|
import { ActivationEvent, type Capability, type CapabilityManager, type Plugin, PluginManager } from '../core';
|
|
6
6
|
export type TestAppOptions = {
|
|
7
7
|
/**
|
|
8
|
-
* Plugins to register. Plugins whose `meta.tags` includes `'system'` are treated as core
|
|
8
|
+
* Plugins to register. Plugins whose `meta.profile.tags` includes `'system'` are treated as core
|
|
9
9
|
* (force-enabled). For test convenience, plugins without a `'system'` tag are enabled by
|
|
10
10
|
* default unless `enabled` is provided.
|
|
11
11
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"harness.d.ts","sourceRoot":"","sources":["../../../../src/testing/harness.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAExD,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAIxC,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,eAAe,CAAC;AAI/C,OAAO,EAAoB,YAAY,EAAE,MAAM,WAAW,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,KAAK,UAAU,EAAE,KAAK,iBAAiB,EAAE,KAAK,MAAM,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE/G,MAAM,MAAM,cAAc,GAAG;IAC3B;;;;OAIG;IACH,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC;IACzB,yGAAyG;IACzG,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,sEAAsE;IACtE,WAAW,CAAC,EAAE,eAAe,CAAC,eAAe,EAAE,CAAC;IAChD;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,6BAA6B,CAAC,EAAE,OAAO,CAAC;CACzC,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC,aAAa,CAAC;IAC9C,QAAQ,CAAC,YAAY,EAAE,iB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,EAAE,CAAC,EAAE,EAAE,EAAE,SAAS,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,IAAI,EAAE,IAAI,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;IAE7G;;;OAGG;IACH,UAAU,CAAC,CAAC,EAAE,CAAC,EACb,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,YAAY,CAAC,6BAA6B,CAAC,EACvE,OAAO,CAAC,EAAE;QAAE,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,CAAA;KAAE,GACrE,OAAO,CAAC,CAAC,CAAC,CAAC;IAEd,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACrC,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAEtC,gDAAgD;IAChD,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAEzB,6EAA6E;IAC7E,CAAC,MAAM,CAAC,YAAY,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACxC;AAID;;;;;;;;;GASG;AACH,eAAO,MAAM,aAAa,SAAgB,cAAc,KAAG,OAAO,CAAC,WAAW,CAiD7E,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type RenderOptions, type RenderResult } from '@testing-library/react';
|
|
2
2
|
import { type FC, type PropsWithChildren, type ReactNode } from 'react';
|
|
3
|
+
import { type RoleToken } from '../ui/components/Surface/types';
|
|
3
4
|
import { type TestHarness } from './harness';
|
|
4
5
|
export type HarnessRenderOptions = Omit<RenderOptions, 'wrapper'> & {
|
|
5
6
|
/** Additional providers to wrap around the harness tree (applied innermost first). */
|
|
@@ -10,9 +11,9 @@ export type HarnessRenderOptions = Omit<RenderOptions, 'wrapper'> & {
|
|
|
10
11
|
* `Capabilities.ReactContext`.
|
|
11
12
|
*/
|
|
12
13
|
export declare const render: (harness: TestHarness, ui: ReactNode, options?: HarnessRenderOptions) => RenderResult;
|
|
13
|
-
export type RenderSurfaceProps = {
|
|
14
|
-
|
|
15
|
-
data?:
|
|
14
|
+
export type RenderSurfaceProps<TToken extends RoleToken<any>> = {
|
|
15
|
+
type: TToken;
|
|
16
|
+
data?: TToken extends RoleToken<infer D> ? D : never;
|
|
16
17
|
limit?: number;
|
|
17
18
|
fallback?: FC<{
|
|
18
19
|
error: Error;
|
|
@@ -21,7 +22,7 @@ export type RenderSurfaceProps = {
|
|
|
21
22
|
placeholder?: ReactNode;
|
|
22
23
|
};
|
|
23
24
|
/**
|
|
24
|
-
* Renders a `Surface` with the given role/data inside the harness provider tree.
|
|
25
|
+
* Renders a `Surface` with the given role token/data inside the harness provider tree.
|
|
25
26
|
*/
|
|
26
|
-
export declare const renderSurface: (harness: TestHarness, props: RenderSurfaceProps
|
|
27
|
+
export declare const renderSurface: <TToken extends RoleToken<any>>(harness: TestHarness, props: RenderSurfaceProps<TToken>, options?: HarnessRenderOptions) => RenderResult;
|
|
27
28
|
//# sourceMappingURL=react.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../../../../src/testing/react.tsx"],"names":[],"mappings":"AAKA,OAAO,
|
|
1
|
+
{"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../../../../src/testing/react.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,YAAY,EAAuB,MAAM,wBAAwB,CAAC;AACpG,OAAc,EAAE,KAAK,EAAE,EAAY,KAAK,iBAAiB,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AASzF,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,gCAAgC,CA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AAE,KAAK,aAAa,EAAU,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"withPluginManager.d.ts","sourceRoot":"","sources":["../../../../src/testing/withPluginManager.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAQrE,OAAO,EAAE,KAAK,aAAa,EAAoB,MAAM,YAAY,CAAC;AAGlE,OAAO,EAAE,KAAK,eAAe,EAAE,UAAU,EAAE,KAAK,iBAAiB,EAAyB,MAAM,SAAS,CAAC;AAC1G,OAAO,EAAE,KAAK,aAAa,EAAU,MAAM,OAAO,CAAC;AA0CnD,MAAM,MAAM,wBAAwB,GAAG,aAAa,GAAG;IACrD,kBAAkB;IAClB,YAAY,CAAC,EAAE,aAAa,CAAC,UAAU,CAAC,GAAG,EAAE,EAAE,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;IACpF,kBAAkB;IAClB,UAAU,CAAC,EAAE,CAAC,eAAe,CAAC,eAAe,GAAG,MAAM,CAAC,EAAE,CAAC;CAC3D,CAAC;AAEF,MAAM,MAAM,4BAA4B,CAAC,IAAI,GAAG,IAAI,IAChD,wBAAwB,GACxB,CAAC,CAAC,OAAO,EAAE,YAAY,CAAC,IAAI,CAAC,KAAK,wBAAwB,CAAC,CAAC;AAEhE;;;GAGG;AACH,eAAO,MAAM,iBAAiB,GAAI,IAAI,SAAS,4BAA4B,CAAC,IAAI,CAAC,KAAQ,SAuCxF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withPluginManager.stories.d.ts","sourceRoot":"","sources":["../../../../src/testing/withPluginManager.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"withPluginManager.stories.d.ts","sourceRoot":"","sources":["../../../../src/testing/withPluginManager.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,MAAM,OAAO,CAAC;AAqB1B,QAAA,MAAM,IAAI;;;;CAkB2B,CAAC;eAEvB,IAAI;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { type StoryObj } from '@storybook/react-vite';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { Plugin } from '../../../core';
|
|
4
|
-
type
|
|
4
|
+
type StoryArgs = {
|
|
5
5
|
plugins?: Plugin.Plugin[];
|
|
6
6
|
};
|
|
7
7
|
declare const meta: {
|
|
8
8
|
title: string;
|
|
9
|
-
render: ({ plugins }:
|
|
9
|
+
render: ({ plugins }: StoryArgs) => React.JSX.Element;
|
|
10
10
|
decorators: import("@storybook/react").Decorator[];
|
|
11
11
|
parameters: {
|
|
12
12
|
layout: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"App.stories.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/App/App.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjE,OAAO,KAAoB,MAAM,OAAO,CAAC;AAMzC,OAAO,EAAc,MAAM,EAAE,MAAM,eAAe,CAAC;AAwCnD,KAAK,
|
|
1
|
+
{"version":3,"file":"App.stories.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/App/App.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjE,OAAO,KAAoB,MAAM,OAAO,CAAC;AAMzC,OAAO,EAAc,MAAM,EAAE,MAAM,eAAe,CAAC;AAwCnD,KAAK,SAAS,GAAG;IAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,CAAA;CAAE,CAAC;AAQ/C,QAAA,MAAM,IAAI;;0BANyB,SAAS;;;QAWxC,MAAM;;CAEM,CAAC;eAEF,IAAI;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAIrB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAIvB,CAAC"}
|
|
@@ -3,6 +3,12 @@ import { type PluginManager } from '../../../core';
|
|
|
3
3
|
* Get the plugin manager.
|
|
4
4
|
*/
|
|
5
5
|
export declare const usePluginManager: () => PluginManager.PluginManager;
|
|
6
|
+
/**
|
|
7
|
+
* Get the plugin manager if present, or `undefined` when rendered outside a {@link PluginManagerProvider}
|
|
8
|
+
* (e.g. a standalone component story). Lets components treat plugin capabilities as a progressive
|
|
9
|
+
* enhancement rather than a hard requirement.
|
|
10
|
+
*/
|
|
11
|
+
export declare const useOptionalPluginManager: () => PluginManager.PluginManager | undefined;
|
|
6
12
|
/**
|
|
7
13
|
* Context provider for a plugin manager.
|
|
8
14
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PluginManagerProvider.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/PluginManager/PluginManagerProvider.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,eAAe,CAAC;AAInD;;GAEG;AACH,eAAO,MAAM,gBAAgB,QAAO,aAAa,CAAC,aACoC,CAAC;AAEvF;;GAEG;AACH,eAAO,MAAM,qBAAqB,mEAAgC,CAAC"}
|
|
1
|
+
{"version":3,"file":"PluginManagerProvider.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/PluginManager/PluginManagerProvider.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,eAAe,CAAC;AAInD;;GAEG;AACH,eAAO,MAAM,gBAAgB,QAAO,aAAa,CAAC,aACoC,CAAC;AAEvF;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,QAAO,aAAa,CAAC,aAAa,GAAG,SAA6C,CAAC;AAExH;;GAEG;AACH,eAAO,MAAM,qBAAqB,mEAAgC,CAAC"}
|