@dxos/plugin-crx 0.0.0
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/LICENSE +105 -0
- package/PLUGIN.mdl +599 -0
- package/README.md +25 -0
- package/dist/lib/CrxCapabilities.mjs +21 -0
- package/dist/lib/CrxCapabilities.mjs.map +1 -0
- package/dist/lib/CrxEvents.mjs +15 -0
- package/dist/lib/CrxEvents.mjs.map +1 -0
- package/dist/lib/CrxOperation.mjs +50 -0
- package/dist/lib/CrxOperation.mjs.map +1 -0
- package/dist/lib/CrxPlugin.mjs +16 -0
- package/dist/lib/CrxPlugin.mjs.map +1 -0
- package/dist/lib/PageAction.mjs +35 -0
- package/dist/lib/PageAction.mjs.map +1 -0
- package/dist/lib/Settings.mjs +84 -0
- package/dist/lib/Settings.mjs.map +1 -0
- package/dist/lib/capabilities.mjs +41 -0
- package/dist/lib/capabilities.mjs.map +1 -0
- package/dist/lib/capabilities.node.mjs +32 -0
- package/dist/lib/capabilities.node.mjs.map +1 -0
- package/dist/lib/capabilities.workerd.mjs +32 -0
- package/dist/lib/capabilities.workerd.mjs.map +1 -0
- package/dist/lib/chunk-add-note-from-snapshot.mjs +15 -0
- package/dist/lib/chunk-add-note-from-snapshot.mjs.map +1 -0
- package/dist/lib/chunk-add-organization-from-snapshot.mjs +15 -0
- package/dist/lib/chunk-add-organization-from-snapshot.mjs.map +1 -0
- package/dist/lib/chunk-add-person-from-snapshot.mjs +15 -0
- package/dist/lib/chunk-add-person-from-snapshot.mjs.map +1 -0
- package/dist/lib/chunk-install-page-actions.mjs +284 -0
- package/dist/lib/chunk-install-page-actions.mjs.map +1 -0
- package/dist/lib/chunk-mapping.mjs +81 -0
- package/dist/lib/chunk-mapping.mjs.map +1 -0
- package/dist/lib/chunk-operation-handler.mjs +12 -0
- package/dist/lib/chunk-operation-handler.mjs.map +1 -0
- package/dist/lib/chunk-page-action-provider.mjs +41 -0
- package/dist/lib/chunk-page-action-provider.mjs.map +1 -0
- package/dist/lib/chunk-react-surface.mjs +18 -0
- package/dist/lib/chunk-react-surface.mjs.map +1 -0
- package/dist/lib/chunk-rolldown-runtime.mjs +13 -0
- package/dist/lib/chunk-settings.mjs +28 -0
- package/dist/lib/chunk-settings.mjs.map +1 -0
- package/dist/lib/containers.mjs +80 -0
- package/dist/lib/containers.mjs.map +1 -0
- package/dist/lib/index.mjs +4 -0
- package/dist/lib/meta.mjs +34 -0
- package/dist/lib/meta.mjs.map +1 -0
- package/dist/lib/operations.mjs +13 -0
- package/dist/lib/operations.mjs.map +1 -0
- package/dist/lib/plugin.mjs +9 -0
- package/dist/lib/plugin.mjs.map +1 -0
- package/dist/lib/translations.mjs +22 -0
- package/dist/lib/translations.mjs.map +1 -0
- package/dist/lib/types.mjs +6 -0
- package/dist/lib/util.mjs +63 -0
- package/dist/lib/util.mjs.map +1 -0
- package/dist/types/dx.config.d.ts +28 -0
- package/dist/types/dx.config.d.ts.map +1 -0
- package/dist/types/src/CrxPlugin.d.ts +37 -0
- package/dist/types/src/CrxPlugin.d.ts.map +1 -0
- package/dist/types/src/capabilities/gen/node.d.ts +9 -0
- package/dist/types/src/capabilities/gen/node.d.ts.map +1 -0
- package/dist/types/src/capabilities/gen/workerd.d.ts +9 -0
- package/dist/types/src/capabilities/gen/workerd.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +9 -0
- package/dist/types/src/capabilities/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/install-page-actions.d.ts +5 -0
- package/dist/types/src/capabilities/install-page-actions.d.ts.map +1 -0
- package/dist/types/src/capabilities/operation-handler.d.ts +5 -0
- package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
- package/dist/types/src/capabilities/page-action-provider.d.ts +5 -0
- package/dist/types/src/capabilities/page-action-provider.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface.d.ts +5 -0
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
- package/dist/types/src/capabilities/settings.d.ts +10 -0
- package/dist/types/src/capabilities/settings.d.ts.map +1 -0
- package/dist/types/src/containers/CrxSettings/CrxSettings.d.ts +10 -0
- package/dist/types/src/containers/CrxSettings/CrxSettings.d.ts.map +1 -0
- package/dist/types/src/containers/CrxSettings/CrxSettings.stories.d.ts +25 -0
- package/dist/types/src/containers/CrxSettings/CrxSettings.stories.d.ts.map +1 -0
- package/dist/types/src/containers/CrxSettings/index.d.ts +2 -0
- package/dist/types/src/containers/CrxSettings/index.d.ts.map +1 -0
- package/dist/types/src/containers/index.d.ts +2 -0
- package/dist/types/src/containers/index.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +4 -0
- package/dist/types/src/index.d.ts.map +1 -0
- package/dist/types/src/mapping.d.ts +24 -0
- package/dist/types/src/mapping.d.ts.map +1 -0
- package/dist/types/src/mapping.test.d.ts +2 -0
- package/dist/types/src/mapping.test.d.ts.map +1 -0
- package/dist/types/src/meta.d.ts +33 -0
- package/dist/types/src/meta.d.ts.map +1 -0
- package/dist/types/src/operations/add-note-from-snapshot.d.ts +5 -0
- package/dist/types/src/operations/add-note-from-snapshot.d.ts.map +1 -0
- package/dist/types/src/operations/add-organization-from-snapshot.d.ts +5 -0
- package/dist/types/src/operations/add-organization-from-snapshot.d.ts.map +1 -0
- package/dist/types/src/operations/add-person-from-snapshot.d.ts +5 -0
- package/dist/types/src/operations/add-person-from-snapshot.d.ts.map +1 -0
- package/dist/types/src/operations/index.d.ts +3 -0
- package/dist/types/src/operations/index.d.ts.map +1 -0
- package/dist/types/src/page-actions.d.ts +39 -0
- package/dist/types/src/page-actions.d.ts.map +1 -0
- package/dist/types/src/page-actions.test.d.ts +2 -0
- package/dist/types/src/page-actions.test.d.ts.map +1 -0
- package/dist/types/src/plugin.d.ts +4 -0
- package/dist/types/src/plugin.d.ts.map +1 -0
- package/dist/types/src/stories/Testbench.stories.d.ts +8 -0
- package/dist/types/src/stories/Testbench.stories.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts +22 -0
- package/dist/types/src/translations.d.ts.map +1 -0
- package/dist/types/src/types/CrxCapabilities.d.ts +12 -0
- package/dist/types/src/types/CrxCapabilities.d.ts.map +1 -0
- package/dist/types/src/types/CrxEvents.d.ts +8 -0
- package/dist/types/src/types/CrxEvents.d.ts.map +1 -0
- package/dist/types/src/types/CrxOperation.d.ts +108 -0
- package/dist/types/src/types/CrxOperation.d.ts.map +1 -0
- package/dist/types/src/types/PageAction.d.ts +153 -0
- package/dist/types/src/types/PageAction.d.ts.map +1 -0
- package/dist/types/src/types/Settings.d.ts +25 -0
- package/dist/types/src/types/Settings.d.ts.map +1 -0
- package/dist/types/src/types/Settings.test.d.ts +2 -0
- package/dist/types/src/types/Settings.test.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +6 -0
- package/dist/types/src/types/index.d.ts.map +1 -0
- package/dist/types/src/util/index.d.ts +2 -0
- package/dist/types/src/util/index.d.ts.map +1 -0
- package/dist/types/src/util/pingExtension.d.ts +15 -0
- package/dist/types/src/util/pingExtension.d.ts.map +1 -0
- package/dist/types/src/util/pingExtension.test.d.ts +2 -0
- package/dist/types/src/util/pingExtension.test.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -0
- package/dx.config.ts +32 -0
- package/package.json +162 -0
- package/src/CrxPlugin.ts +15 -0
- package/src/capabilities/gen/node.ts +43 -0
- package/src/capabilities/gen/workerd.ts +43 -0
- package/src/capabilities/index.ts +47 -0
- package/src/capabilities/install-page-actions.ts +64 -0
- package/src/capabilities/operation-handler.ts +16 -0
- package/src/capabilities/page-action-provider.ts +47 -0
- package/src/capabilities/react-surface.ts +26 -0
- package/src/capabilities/settings.ts +36 -0
- package/src/containers/CrxSettings/CrxSettings.stories.tsx +99 -0
- package/src/containers/CrxSettings/CrxSettings.tsx +100 -0
- package/src/containers/CrxSettings/index.ts +5 -0
- package/src/containers/index.ts +5 -0
- package/src/index.ts +7 -0
- package/src/mapping.test.ts +87 -0
- package/src/mapping.ts +101 -0
- package/src/meta.ts +9 -0
- package/src/operations/add-note-from-snapshot.ts +24 -0
- package/src/operations/add-organization-from-snapshot.ts +29 -0
- package/src/operations/add-person-from-snapshot.ts +29 -0
- package/src/operations/index.ts +16 -0
- package/src/page-actions.test.ts +164 -0
- package/src/page-actions.ts +171 -0
- package/src/plugin.tsx +29 -0
- package/src/stories/Testbench.stories.tsx +45 -0
- package/src/translations.ts +31 -0
- package/src/types/CrxCapabilities.ts +26 -0
- package/src/types/CrxEvents.ts +16 -0
- package/src/types/CrxOperation.ts +54 -0
- package/src/types/PageAction.ts +57 -0
- package/src/types/Settings.test.ts +30 -0
- package/src/types/Settings.ts +101 -0
- package/src/types/index.ts +9 -0
- package/src/util/index.ts +5 -0
- package/src/util/pingExtension.test.ts +69 -0
- package/src/util/pingExtension.ts +83 -0
- package/src/vite-env.d.ts +10 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page-actions.test.d.ts","sourceRoot":"","sources":["../../../src/page-actions.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../src/plugin.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,4BAA4B,CAAC;AAarD,eAAO,MAAM,SAAS,4BASrB,CAAC;eAEa,SAAS"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
declare const DefaultStory: () => React.JSX.Element;
|
|
4
|
+
declare const meta: Meta<typeof DefaultStory>;
|
|
5
|
+
export default meta;
|
|
6
|
+
type Story = StoryObj<typeof meta>;
|
|
7
|
+
export declare const Default: Story;
|
|
8
|
+
//# sourceMappingURL=Testbench.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Testbench.stories.d.ts","sourceRoot":"","sources":["../../../../src/stories/Testbench.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,IAAI,EAAE,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAkB,MAAM,OAAO,CAAC;AAMvC,QAAA,MAAM,YAAY,yBAqBjB,CAAC;AAEF,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,YAAY,CAInC,CAAC;eAEa,IAAI;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { meta } from '#meta';
|
|
2
|
+
export declare const translations: [{
|
|
3
|
+
readonly 'en-US': {
|
|
4
|
+
readonly [meta.profile.key]: {
|
|
5
|
+
readonly 'plugin.name': 'Browser Extension';
|
|
6
|
+
readonly 'settings.description': 'Install the browser extension from the [Chrome Web Store](https://chromewebstore.google.com/detail/composer/ahkmmpagcinoehpnmdhoiohmmbikhnmj?pli=1).';
|
|
7
|
+
readonly 'test.title': 'Connection';
|
|
8
|
+
readonly 'test.button.label': 'Test connection';
|
|
9
|
+
readonly 'test.pending.message': 'Contacting extension…';
|
|
10
|
+
readonly 'test.connected.message': 'Connected to {{name}} v{{version}}.';
|
|
11
|
+
readonly 'toast.error.invalidPayload.message': 'Unrecognized payload.';
|
|
12
|
+
readonly 'toast.error.unsupportedVersion.message': 'Unsupported version — update Composer.';
|
|
13
|
+
readonly 'toast.error.disabled.message': 'Extension actions are disabled in settings.';
|
|
14
|
+
readonly 'toast.error.noSpace.message': 'Open a space first.';
|
|
15
|
+
readonly 'toast.page-action.success.title': 'Action complete';
|
|
16
|
+
readonly 'toast.page-action.error.title': 'Action failed';
|
|
17
|
+
readonly 'toast.error.unknownAction.message': 'Unknown action — update Composer or the extension.';
|
|
18
|
+
readonly 'toast.error.operationFailed.message': 'The action failed to run.';
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
}];
|
|
22
|
+
//# sourceMappingURL=translations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/translations.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAE7B,eAAO,MAAM,YAAY;;QAGnB,SAAA,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC;oCACD,mBAAmB;6CAEhC,sJAAsJ;mCAC1I,YAAY;0CACL,iBAAiB;6CACd,uBAAuB;+CACrB,qCAAqC;2DACzB,uBAAuB;+DACnB,wCAAwC;qDAClD,6CAA6C;oDAC9C,qBAAqB;wDACjB,iBAAiB;sDACnB,eAAe;0DACX,oDAAoD;4DAClD,2BAA2B;UACnE;;EAGwB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type * as Atom from 'effect/unstable/reactivity/Atom';
|
|
2
|
+
import * as Capability from '@dxos/app-framework/Capability';
|
|
3
|
+
/**
|
|
4
|
+
* Writable atom holding the plugin's Settings.
|
|
5
|
+
*/
|
|
6
|
+
export declare const Settings: Capability.Tag<Atom.Writable<import("./Settings.ts").Settings, import("./Settings.ts").Settings>, `${string}.capability.settings`>;
|
|
7
|
+
/**
|
|
8
|
+
* Page actions contributed by plugins for the browser extension to surface.
|
|
9
|
+
* Multi: each contributor provides one array (e.g. plugin-bookmarks); consumers flatten via `getAll`.
|
|
10
|
+
*/
|
|
11
|
+
export declare const PageAction: Capability.MultiTag<import("./PageAction.ts").PageAction[], `${string}.capability.pageAction`>;
|
|
12
|
+
//# sourceMappingURL=CrxCapabilities.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CrxCapabilities.d.ts","sourceRoot":"","sources":["../../../../src/types/CrxCapabilities.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,KAAK,IAAI,MAAM,iCAAiC,CAAC;AAE7D,OAAO,KAAK,UAAU,MAAM,gCAAgC,CAAC;AAI7D;;GAEG;AACH,eAAO,MAAM,QAAQ,oIAEpB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,UAAU,gGAEtB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as ActivationEvent from '@dxos/app-framework/ActivationEvent';
|
|
2
|
+
/**
|
|
3
|
+
* The feature's start event: the plugin's start-gated modules (and cross-plugin
|
|
4
|
+
* contributions consumed by this feature) activate here. Fired on demand and by the
|
|
5
|
+
* host's idle trickle.
|
|
6
|
+
*/
|
|
7
|
+
export declare const Start: ActivationEvent.ActivationEvent;
|
|
8
|
+
//# sourceMappingURL=CrxEvents.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CrxEvents.d.ts","sourceRoot":"","sources":["../../../../src/types/CrxEvents.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,eAAe,MAAM,qCAAqC,CAAC;AAIvE;;;;GAIG;AACH,eAAO,MAAM,KAAK,iCAAgD,CAAC"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import * as Operation from '@dxos/compute/Operation';
|
|
2
|
+
import { Database } from '@dxos/echo';
|
|
3
|
+
export declare const AddPersonFromSnapshot: Operation.Definition<{
|
|
4
|
+
readonly snapshot: {
|
|
5
|
+
readonly source: {
|
|
6
|
+
readonly url: string;
|
|
7
|
+
readonly title: string;
|
|
8
|
+
readonly favicon?: string | undefined;
|
|
9
|
+
readonly clippedAt: string;
|
|
10
|
+
};
|
|
11
|
+
readonly selection?: {
|
|
12
|
+
readonly text: string;
|
|
13
|
+
readonly html?: string | undefined;
|
|
14
|
+
readonly htmlTruncated?: boolean | undefined;
|
|
15
|
+
readonly rect?: {
|
|
16
|
+
readonly x: number;
|
|
17
|
+
readonly y: number;
|
|
18
|
+
readonly width: number;
|
|
19
|
+
readonly height: number;
|
|
20
|
+
} | undefined;
|
|
21
|
+
} | undefined;
|
|
22
|
+
readonly hints?: {
|
|
23
|
+
readonly ogTitle?: string | undefined;
|
|
24
|
+
readonly ogDescription?: string | undefined;
|
|
25
|
+
readonly ogImage?: string | undefined;
|
|
26
|
+
readonly jsonLd?: readonly unknown[] | undefined;
|
|
27
|
+
readonly h1?: string | undefined;
|
|
28
|
+
readonly firstImage?: string | undefined;
|
|
29
|
+
} | undefined;
|
|
30
|
+
readonly imageData?: string | undefined;
|
|
31
|
+
readonly html?: string | undefined;
|
|
32
|
+
readonly htmlTruncated?: boolean | undefined;
|
|
33
|
+
};
|
|
34
|
+
readonly target: Database.Database;
|
|
35
|
+
}, {
|
|
36
|
+
readonly id: string;
|
|
37
|
+
}, never>;
|
|
38
|
+
export declare const AddOrganizationFromSnapshot: Operation.Definition<{
|
|
39
|
+
readonly snapshot: {
|
|
40
|
+
readonly source: {
|
|
41
|
+
readonly url: string;
|
|
42
|
+
readonly title: string;
|
|
43
|
+
readonly favicon?: string | undefined;
|
|
44
|
+
readonly clippedAt: string;
|
|
45
|
+
};
|
|
46
|
+
readonly selection?: {
|
|
47
|
+
readonly text: string;
|
|
48
|
+
readonly html?: string | undefined;
|
|
49
|
+
readonly htmlTruncated?: boolean | undefined;
|
|
50
|
+
readonly rect?: {
|
|
51
|
+
readonly x: number;
|
|
52
|
+
readonly y: number;
|
|
53
|
+
readonly width: number;
|
|
54
|
+
readonly height: number;
|
|
55
|
+
} | undefined;
|
|
56
|
+
} | undefined;
|
|
57
|
+
readonly hints?: {
|
|
58
|
+
readonly ogTitle?: string | undefined;
|
|
59
|
+
readonly ogDescription?: string | undefined;
|
|
60
|
+
readonly ogImage?: string | undefined;
|
|
61
|
+
readonly jsonLd?: readonly unknown[] | undefined;
|
|
62
|
+
readonly h1?: string | undefined;
|
|
63
|
+
readonly firstImage?: string | undefined;
|
|
64
|
+
} | undefined;
|
|
65
|
+
readonly imageData?: string | undefined;
|
|
66
|
+
readonly html?: string | undefined;
|
|
67
|
+
readonly htmlTruncated?: boolean | undefined;
|
|
68
|
+
};
|
|
69
|
+
readonly target: Database.Database;
|
|
70
|
+
}, {
|
|
71
|
+
readonly id: string;
|
|
72
|
+
}, never>;
|
|
73
|
+
export declare const AddNoteFromSnapshot: Operation.Definition<{
|
|
74
|
+
readonly snapshot: {
|
|
75
|
+
readonly source: {
|
|
76
|
+
readonly url: string;
|
|
77
|
+
readonly title: string;
|
|
78
|
+
readonly favicon?: string | undefined;
|
|
79
|
+
readonly clippedAt: string;
|
|
80
|
+
};
|
|
81
|
+
readonly selection?: {
|
|
82
|
+
readonly text: string;
|
|
83
|
+
readonly html?: string | undefined;
|
|
84
|
+
readonly htmlTruncated?: boolean | undefined;
|
|
85
|
+
readonly rect?: {
|
|
86
|
+
readonly x: number;
|
|
87
|
+
readonly y: number;
|
|
88
|
+
readonly width: number;
|
|
89
|
+
readonly height: number;
|
|
90
|
+
} | undefined;
|
|
91
|
+
} | undefined;
|
|
92
|
+
readonly hints?: {
|
|
93
|
+
readonly ogTitle?: string | undefined;
|
|
94
|
+
readonly ogDescription?: string | undefined;
|
|
95
|
+
readonly ogImage?: string | undefined;
|
|
96
|
+
readonly jsonLd?: readonly unknown[] | undefined;
|
|
97
|
+
readonly h1?: string | undefined;
|
|
98
|
+
readonly firstImage?: string | undefined;
|
|
99
|
+
} | undefined;
|
|
100
|
+
readonly imageData?: string | undefined;
|
|
101
|
+
readonly html?: string | undefined;
|
|
102
|
+
readonly htmlTruncated?: boolean | undefined;
|
|
103
|
+
};
|
|
104
|
+
readonly target: Database.Database;
|
|
105
|
+
}, {
|
|
106
|
+
readonly id: string;
|
|
107
|
+
}, never>;
|
|
108
|
+
//# sourceMappingURL=CrxOperation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CrxOperation.d.ts","sourceRoot":"","sources":["../../../../src/types/CrxOperation.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,SAAS,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAO,MAAM,YAAY,CAAC;AAa3C,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAShC,CAAC;AAEH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAStC,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAS9B,CAAC"}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import type * as Operation from '@dxos/compute/Operation';
|
|
2
|
+
import { PageAction as Protocol } from '@dxos/crx-protocol';
|
|
3
|
+
export declare const Rect: import("effect/Schema").Struct<{
|
|
4
|
+
readonly x: import("effect/Schema").Number;
|
|
5
|
+
readonly y: import("effect/Schema").Number;
|
|
6
|
+
readonly width: import("effect/Schema").Number;
|
|
7
|
+
readonly height: import("effect/Schema").Number;
|
|
8
|
+
}>, Source: import("effect/Schema").Struct<{
|
|
9
|
+
readonly url: import("effect/Schema").String;
|
|
10
|
+
readonly title: import("effect/Schema").String;
|
|
11
|
+
readonly favicon: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
12
|
+
readonly clippedAt: import("effect/Schema").String;
|
|
13
|
+
}>, Selection: import("effect/Schema").Struct<{
|
|
14
|
+
readonly text: import("effect/Schema").String;
|
|
15
|
+
readonly html: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
16
|
+
readonly htmlTruncated: import("effect/Schema").optional<import("effect/Schema").Boolean>;
|
|
17
|
+
readonly rect: import("effect/Schema").optional<import("effect/Schema").Struct<{
|
|
18
|
+
readonly x: import("effect/Schema").Number;
|
|
19
|
+
readonly y: import("effect/Schema").Number;
|
|
20
|
+
readonly width: import("effect/Schema").Number;
|
|
21
|
+
readonly height: import("effect/Schema").Number;
|
|
22
|
+
}>>;
|
|
23
|
+
}>, Hints: import("effect/Schema").Struct<{
|
|
24
|
+
readonly ogTitle: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
25
|
+
readonly ogDescription: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
26
|
+
readonly ogImage: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
27
|
+
readonly jsonLd: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Unknown>>;
|
|
28
|
+
readonly h1: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
29
|
+
readonly firstImage: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
30
|
+
}>, Snapshot: import("effect/Schema").Struct<{
|
|
31
|
+
readonly source: import("effect/Schema").Struct<{
|
|
32
|
+
readonly url: import("effect/Schema").String;
|
|
33
|
+
readonly title: import("effect/Schema").String;
|
|
34
|
+
readonly favicon: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
35
|
+
readonly clippedAt: import("effect/Schema").String;
|
|
36
|
+
}>;
|
|
37
|
+
readonly selection: import("effect/Schema").optional<import("effect/Schema").Struct<{
|
|
38
|
+
readonly text: import("effect/Schema").String;
|
|
39
|
+
readonly html: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
40
|
+
readonly htmlTruncated: import("effect/Schema").optional<import("effect/Schema").Boolean>;
|
|
41
|
+
readonly rect: import("effect/Schema").optional<import("effect/Schema").Struct<{
|
|
42
|
+
readonly x: import("effect/Schema").Number;
|
|
43
|
+
readonly y: import("effect/Schema").Number;
|
|
44
|
+
readonly width: import("effect/Schema").Number;
|
|
45
|
+
readonly height: import("effect/Schema").Number;
|
|
46
|
+
}>>;
|
|
47
|
+
}>>;
|
|
48
|
+
readonly hints: import("effect/Schema").optional<import("effect/Schema").Struct<{
|
|
49
|
+
readonly ogTitle: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
50
|
+
readonly ogDescription: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
51
|
+
readonly ogImage: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
52
|
+
readonly jsonLd: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Unknown>>;
|
|
53
|
+
readonly h1: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
54
|
+
readonly firstImage: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
55
|
+
}>>;
|
|
56
|
+
readonly imageData: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
57
|
+
readonly html: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
58
|
+
readonly htmlTruncated: import("effect/Schema").optional<import("effect/Schema").Boolean>;
|
|
59
|
+
}>, Predicate: import("effect/Schema").Struct<{
|
|
60
|
+
readonly exists: import("effect/Schema").String;
|
|
61
|
+
}>, ExtractorRef: import("effect/Schema").Struct<{
|
|
62
|
+
readonly name: import("effect/Schema").String;
|
|
63
|
+
readonly params: import("effect/Schema").optional<import("effect/Schema").Unknown>;
|
|
64
|
+
}>, Context: import("effect/Schema").Literals<readonly ["popup", "page", "selection", "link", "picker"]>, Descriptor: import("effect/Schema").Struct<{
|
|
65
|
+
readonly id: import("effect/Schema").String;
|
|
66
|
+
readonly label: import("effect/Schema").String;
|
|
67
|
+
readonly icon: import("effect/Schema").String;
|
|
68
|
+
readonly urlPatterns: import("effect/Schema").$Array<import("effect/Schema").String>;
|
|
69
|
+
readonly predicate: import("effect/Schema").optional<import("effect/Schema").Struct<{
|
|
70
|
+
readonly exists: import("effect/Schema").String;
|
|
71
|
+
}>>;
|
|
72
|
+
readonly extractor: import("effect/Schema").Struct<{
|
|
73
|
+
readonly name: import("effect/Schema").String;
|
|
74
|
+
readonly params: import("effect/Schema").optional<import("effect/Schema").Unknown>;
|
|
75
|
+
}>;
|
|
76
|
+
readonly contexts: import("effect/Schema").$Array<import("effect/Schema").Literals<readonly ["popup", "page", "selection", "link", "picker"]>>;
|
|
77
|
+
readonly operation: import("effect/Schema").String;
|
|
78
|
+
}>, PageInfo: import("effect/Schema").Struct<{
|
|
79
|
+
readonly url: import("effect/Schema").String;
|
|
80
|
+
readonly title: import("effect/Schema").String;
|
|
81
|
+
readonly favicon: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
82
|
+
}>, Envelope: import("effect/Schema").Struct<{
|
|
83
|
+
readonly version: import("effect/Schema").Number;
|
|
84
|
+
readonly id: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
85
|
+
}>, ListRequest: import("effect/Schema").Struct<{
|
|
86
|
+
readonly version: import("effect/Schema").Literal<1>;
|
|
87
|
+
readonly id: import("effect/Schema").String;
|
|
88
|
+
}>, ListAck: import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
|
|
89
|
+
readonly version: import("effect/Schema").Literal<1>;
|
|
90
|
+
readonly id: import("effect/Schema").String;
|
|
91
|
+
readonly ok: import("effect/Schema").Literal<true>;
|
|
92
|
+
readonly actions: import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
93
|
+
readonly id: import("effect/Schema").String;
|
|
94
|
+
readonly label: import("effect/Schema").String;
|
|
95
|
+
readonly icon: import("effect/Schema").String;
|
|
96
|
+
readonly urlPatterns: import("effect/Schema").$Array<import("effect/Schema").String>;
|
|
97
|
+
readonly predicate: import("effect/Schema").optional<import("effect/Schema").Struct<{
|
|
98
|
+
readonly exists: import("effect/Schema").String;
|
|
99
|
+
}>>;
|
|
100
|
+
readonly extractor: import("effect/Schema").Struct<{
|
|
101
|
+
readonly name: import("effect/Schema").String;
|
|
102
|
+
readonly params: import("effect/Schema").optional<import("effect/Schema").Unknown>;
|
|
103
|
+
}>;
|
|
104
|
+
readonly contexts: import("effect/Schema").$Array<import("effect/Schema").Literals<readonly ["popup", "page", "selection", "link", "picker"]>>;
|
|
105
|
+
readonly operation: import("effect/Schema").String;
|
|
106
|
+
}>>;
|
|
107
|
+
}>, import("effect/Schema").Struct<{
|
|
108
|
+
readonly version: import("effect/Schema").Literal<1>;
|
|
109
|
+
readonly id: import("effect/Schema").String;
|
|
110
|
+
readonly ok: import("effect/Schema").Literal<false>;
|
|
111
|
+
readonly error: import("effect/Schema").String;
|
|
112
|
+
}>]>, InvokeRequest: import("effect/Schema").Struct<{
|
|
113
|
+
readonly version: import("effect/Schema").Literal<1>;
|
|
114
|
+
readonly id: import("effect/Schema").String;
|
|
115
|
+
readonly actionId: import("effect/Schema").String;
|
|
116
|
+
readonly page: import("effect/Schema").Struct<{
|
|
117
|
+
readonly url: import("effect/Schema").String;
|
|
118
|
+
readonly title: import("effect/Schema").String;
|
|
119
|
+
readonly favicon: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
120
|
+
}>;
|
|
121
|
+
readonly inputs: import("effect/Schema").Unknown;
|
|
122
|
+
readonly invokedFrom: import("effect/Schema").Literals<readonly ["popup", "contextMenu", "picker"]>;
|
|
123
|
+
}>, InvokeAck: import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
|
|
124
|
+
readonly version: import("effect/Schema").Literal<1>;
|
|
125
|
+
readonly id: import("effect/Schema").String;
|
|
126
|
+
readonly ok: import("effect/Schema").Literal<true>;
|
|
127
|
+
readonly objectId: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
128
|
+
}>, import("effect/Schema").Struct<{
|
|
129
|
+
readonly version: import("effect/Schema").Literal<1>;
|
|
130
|
+
readonly id: import("effect/Schema").String;
|
|
131
|
+
readonly ok: import("effect/Schema").Literal<false>;
|
|
132
|
+
readonly error: import("effect/Schema").String;
|
|
133
|
+
}>]>, READY_EVENT: string, LIST_EVENT: string, LIST_ACK_EVENT: string, INVOKE_EVENT: string, INVOKE_ACK_EVENT: string;
|
|
134
|
+
export type Source = Protocol.Source;
|
|
135
|
+
export type Selection = Protocol.Selection;
|
|
136
|
+
export type Hints = Protocol.Hints;
|
|
137
|
+
export type Snapshot = Protocol.Snapshot;
|
|
138
|
+
export type Predicate = Protocol.Predicate;
|
|
139
|
+
export type ExtractorRef = Protocol.ExtractorRef;
|
|
140
|
+
export type Context = Protocol.Context;
|
|
141
|
+
export type Descriptor = Protocol.Descriptor;
|
|
142
|
+
export type PageInfo = Protocol.PageInfo;
|
|
143
|
+
export type Envelope = Protocol.Envelope;
|
|
144
|
+
export type ListRequest = Protocol.ListRequest;
|
|
145
|
+
export type ListAck = Protocol.ListAck;
|
|
146
|
+
export type InvokeRequest = Protocol.InvokeRequest;
|
|
147
|
+
export type InvokeAck = Protocol.InvokeAck;
|
|
148
|
+
/** A live page-action contribution: the target operation accepts `{ snapshot, target }` and returns `{ id }`. */
|
|
149
|
+
export type PageAction = Omit<Descriptor, 'operation'> & {
|
|
150
|
+
operation: Operation.Definition.Any;
|
|
151
|
+
};
|
|
152
|
+
export declare const toDescriptor: (action: PageAction) => Descriptor;
|
|
153
|
+
//# sourceMappingURL=PageAction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PageAction.d.ts","sourceRoot":"","sources":["../../../../src/types/PageAction.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,KAAK,SAAS,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,UAAU,IAAI,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAG5D,eAAO,MACL,IAAI;;;;;IACJ,MAAM;;;;;IACN,SAAS;;;;;;;;;;IACT,KAAK;;;;;;;IACL,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IACR,SAAS;;IACT,YAAY;;;IACZ,OAAO,+FACP,UAAU;;;;;;;;;;;;;;IACV,QAAQ;;;;IACR,QAAQ;;;IACR,WAAW;;;IACX,OAAO;;;;;;;;;;;;;;;;;;;;;;;;MACP,aAAa;;;;;;;;;;;IACb,SAAS;;;;;;;;;;MACT,WAAW,UACX,UAAU,UACV,cAAc,UACd,YAAY,UACZ,gBAAgB,QACN,CAAC;AAEb,MAAM,MAAM,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC;AACrC,MAAM,MAAM,SAAS,GAAG,QAAQ,CAAC,SAAS,CAAC;AAC3C,MAAM,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC;AACnC,MAAM,MAAM,QAAQ,GAAG,QAAQ,CAAC,QAAQ,CAAC;AACzC,MAAM,MAAM,SAAS,GAAG,QAAQ,CAAC,SAAS,CAAC;AAC3C,MAAM,MAAM,YAAY,GAAG,QAAQ,CAAC,YAAY,CAAC;AACjD,MAAM,MAAM,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC;AACvC,MAAM,MAAM,UAAU,GAAG,QAAQ,CAAC,UAAU,CAAC;AAC7C,MAAM,MAAM,QAAQ,GAAG,QAAQ,CAAC,QAAQ,CAAC;AACzC,MAAM,MAAM,QAAQ,GAAG,QAAQ,CAAC,QAAQ,CAAC;AACzC,MAAM,MAAM,WAAW,GAAG,QAAQ,CAAC,WAAW,CAAC;AAC/C,MAAM,MAAM,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC;AACvC,MAAM,MAAM,aAAa,GAAG,QAAQ,CAAC,aAAa,CAAC;AACnD,MAAM,MAAM,SAAS,GAAG,QAAQ,CAAC,SAAS,CAAC;AAE3C,iHAAiH;AACjH,MAAM,MAAM,UAAU,GAAG,IAAI,CAAC,UAAU,EAAE,WAAW,CAAC,GAAG;IACvD,SAAS,EAAE,SAAS,CAAC,UAAU,CAAC,GAAG,CAAC;CACrC,CAAC;AAEF,eAAO,MAAM,YAAY,WAAY,UAAU,KAAG,UAGhD,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as Schema from 'effect/Schema';
|
|
2
|
+
/**
|
|
3
|
+
* User preferences that govern how Composer coordinates with the composer-crx
|
|
4
|
+
* browser extension — both the page-actions bridge and the render-proxy. All fields
|
|
5
|
+
* are optional; defaults are applied by consumers when reading the atom.
|
|
6
|
+
*/
|
|
7
|
+
export declare const Settings: Schema.Struct<{
|
|
8
|
+
readonly enabled: Schema.mutableKey<Schema.optional<Schema.Boolean>>;
|
|
9
|
+
readonly autoOpenAfterClip: Schema.mutableKey<Schema.optional<Schema.Boolean>>;
|
|
10
|
+
readonly renderProxyEnabled: Schema.mutableKey<Schema.optional<Schema.Boolean>>;
|
|
11
|
+
readonly renderTimeout: Schema.mutableKey<Schema.optional<Schema.Number>>;
|
|
12
|
+
readonly renderActiveTab: Schema.mutableKey<Schema.optional<Schema.Boolean>>;
|
|
13
|
+
readonly developerMode: Schema.mutableKey<Schema.optional<Schema.Boolean>>;
|
|
14
|
+
}>;
|
|
15
|
+
export interface Settings extends Schema.Schema.Type<typeof Settings> {
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Default values applied when a field is absent. Kept separate from the
|
|
19
|
+
* schema so `createKvsStore` can store only user-set values while consumers
|
|
20
|
+
* (this plugin's components, and any downstream reader) see sensible
|
|
21
|
+
* defaults.
|
|
22
|
+
*/
|
|
23
|
+
export declare const defaults: Required<Settings>;
|
|
24
|
+
export declare const withDefaults: (settings: Settings) => Required<Settings>;
|
|
25
|
+
//# sourceMappingURL=Settings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Settings.d.ts","sourceRoot":"","sources":["../../../../src/types/Settings.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAGxC;;;;GAIG;AACH,eAAO,MAAM,QAAQ;;;;;;;EAgEsB,CAAC;AAE5C,MAAM,WAAW,QAAS,SAAQ,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,QAAQ,CAAC;CAAG;AAExE;;;;;GAKG;AACH,eAAO,MAAM,QAAQ,EAAE,QAAQ,CAAC,QAAQ,CAOvC,CAAC;AAEF,eAAO,MAAM,YAAY,aAAc,QAAQ,KAAG,QAAQ,CAAC,QAAQ,CAGjE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Settings.test.d.ts","sourceRoot":"","sources":["../../../../src/types/Settings.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export * as CrxCapabilities from './CrxCapabilities.ts';
|
|
2
|
+
export * as CrxEvents from './CrxEvents.ts';
|
|
3
|
+
export * as CrxOperation from './CrxOperation.ts';
|
|
4
|
+
export * as PageAction from './PageAction.ts';
|
|
5
|
+
export * as Settings from './Settings.ts';
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/types/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,eAAe,MAAM,sBAAsB,CAAC;AACxD,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAC;AAC5C,OAAO,KAAK,YAAY,MAAM,mBAAmB,CAAC;AAClD,OAAO,KAAK,UAAU,MAAM,iBAAiB,CAAC;AAC9C,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/util/index.ts"],"names":[],"mappings":"AAIA,cAAc,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type ExtensionInfo = {
|
|
2
|
+
extensionVersion: string;
|
|
3
|
+
extensionName: string;
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* Whether the composer-crx extension's relay is installed on this page (set via a `documentElement`
|
|
7
|
+
* dataset marker once the relay is listening).
|
|
8
|
+
*/
|
|
9
|
+
export declare const isExtensionAvailable: () => boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Ping the composer-crx extension and resolve with its identity. Rejects if the extension is not
|
|
12
|
+
* detected, rejects the request, or does not ack within the timeout.
|
|
13
|
+
*/
|
|
14
|
+
export declare const pingExtension: (timeoutMs?: number) => Promise<ExtensionInfo>;
|
|
15
|
+
//# sourceMappingURL=pingExtension.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pingExtension.d.ts","sourceRoot":"","sources":["../../../../src/util/pingExtension.ts"],"names":[],"mappings":"AAgBA,MAAM,MAAM,aAAa,GAAG;IAC1B,gBAAgB,EAAE,MAAM,CAAC;IACzB,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC;AAOF;;;GAGG;AACH,eAAO,MAAM,oBAAoB,QAAO,OACsE,CAAC;AAE/G;;;GAGG;AACH,eAAO,MAAM,aAAa,eAAe,MAAM,KAA6B,OAAO,CAAC,aAAa,CA6C7F,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pingExtension.test.d.ts","sourceRoot":"","sources":["../../../../src/util/pingExtension.test.ts"],"names":[],"mappings":""}
|