@paged-media/plugin-api 0.2.1-canary.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/package.json ADDED
@@ -0,0 +1,39 @@
1
+ {
2
+ "name": "@paged-media/plugin-api",
3
+ "version": "0.2.1-canary.0",
4
+ "description": "The Paged plugin contract: manifest, bundle lifecycle, the BundleHost surface, and the contribution + engine wire types. Type-only.",
5
+ "license": "UNLICENSED",
6
+ "type": "module",
7
+ "main": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/index.d.ts",
12
+ "default": "./dist/index.js"
13
+ },
14
+ "./manifest.schema.json": "./src/manifest.schema.json"
15
+ },
16
+ "files": [
17
+ "dist",
18
+ "src/manifest.schema.json"
19
+ ],
20
+ "repository": {
21
+ "type": "git",
22
+ "url": "git+https://github.com/paged-media/plugin-sdk.git",
23
+ "directory": "packages/plugin-api"
24
+ },
25
+ "publishConfig": {
26
+ "access": "public",
27
+ "tag": "canary"
28
+ },
29
+ "dependencies": {
30
+ "@types/react": "^18.3.12"
31
+ },
32
+ "devDependencies": {
33
+ "typescript": "^5.6.3"
34
+ },
35
+ "scripts": {
36
+ "typecheck": "tsc --noEmit -p tsconfig.json",
37
+ "build": "rm -rf dist && tsc -p tsconfig.build.json && cp src/wire.d.ts dist/wire.d.ts && printf 'export {};\\n' > dist/index.js"
38
+ }
39
+ }
@@ -0,0 +1,157 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://paged.media/schemas/plugin-manifest.schema.json",
4
+ "title": "Paged plugin manifest",
5
+ "type": "object",
6
+ "required": [
7
+ "id",
8
+ "name",
9
+ "version",
10
+ "apiVersion"
11
+ ],
12
+ "additionalProperties": false,
13
+ "properties": {
14
+ "id": {
15
+ "type": "string",
16
+ "pattern": "^[a-z][a-z0-9]*(\\.[a-z][a-z0-9-]*)+$",
17
+ "description": "Reverse-DNS plugin identity; namespace prefix for all contribution ids."
18
+ },
19
+ "name": {
20
+ "type": "string",
21
+ "minLength": 1
22
+ },
23
+ "version": {
24
+ "type": "string",
25
+ "pattern": "^\\d+\\.\\d+\\.\\d+(-[0-9A-Za-z.-]+)?$"
26
+ },
27
+ "apiVersion": {
28
+ "type": "string",
29
+ "minLength": 1
30
+ },
31
+ "publisher": {
32
+ "type": "string"
33
+ },
34
+ "capabilities": {
35
+ "type": "object",
36
+ "additionalProperties": false,
37
+ "properties": {
38
+ "document": {
39
+ "type": "object",
40
+ "additionalProperties": false,
41
+ "properties": {
42
+ "read": {
43
+ "enum": [
44
+ "broad",
45
+ "scoped"
46
+ ]
47
+ },
48
+ "write": {
49
+ "enum": [
50
+ "broad",
51
+ "scoped"
52
+ ]
53
+ }
54
+ }
55
+ },
56
+ "rendering": {
57
+ "type": "array",
58
+ "items": {
59
+ "enum": [
60
+ "sceneLayer",
61
+ "overlay",
62
+ "hitTest"
63
+ ]
64
+ }
65
+ },
66
+ "editContext": {
67
+ "type": "array",
68
+ "items": {
69
+ "type": "string"
70
+ }
71
+ },
72
+ "network": {
73
+ "type": "boolean"
74
+ },
75
+ "clipboard": {
76
+ "enum": [
77
+ "none",
78
+ "vector",
79
+ "full"
80
+ ]
81
+ }
82
+ }
83
+ },
84
+ "contributes": {
85
+ "type": "object",
86
+ "additionalProperties": false,
87
+ "properties": {
88
+ "tools": {
89
+ "type": "array",
90
+ "items": {
91
+ "type": "string"
92
+ }
93
+ },
94
+ "panels": {
95
+ "type": "array",
96
+ "items": {
97
+ "type": "string"
98
+ }
99
+ },
100
+ "commands": {
101
+ "type": "array",
102
+ "items": {
103
+ "type": "string"
104
+ }
105
+ },
106
+ "editContexts": {
107
+ "type": "array",
108
+ "items": {
109
+ "type": "object",
110
+ "required": [
111
+ "type",
112
+ "entry"
113
+ ],
114
+ "additionalProperties": false,
115
+ "properties": {
116
+ "type": {
117
+ "type": "string"
118
+ },
119
+ "entry": {
120
+ "enum": [
121
+ "doubleClick",
122
+ "command"
123
+ ]
124
+ },
125
+ "priority": {
126
+ "type": "integer"
127
+ }
128
+ }
129
+ }
130
+ },
131
+ "objectTypes": {
132
+ "type": "array",
133
+ "items": {
134
+ "type": "object",
135
+ "required": [
136
+ "type",
137
+ "bakedFallback"
138
+ ],
139
+ "additionalProperties": false,
140
+ "properties": {
141
+ "type": {
142
+ "type": "string"
143
+ },
144
+ "bakedFallback": {
145
+ "enum": [
146
+ "group",
147
+ "rectangle",
148
+ "raster"
149
+ ]
150
+ }
151
+ }
152
+ }
153
+ }
154
+ }
155
+ }
156
+ }
157
+ }