@scrawl-board/board 0.1.0-beta.7 → 0.1.0-beta.9
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/README.md +11 -7
- package/dist/browser.d.ts +340 -21
- package/dist/browser.js +1543 -35810
- package/dist/core.d.ts +115 -30
- package/dist/core.js +260 -124
- package/dist/index.d.ts +460 -52
- package/dist/index.js +1731 -35807
- package/dist/local.d.ts +469 -0
- package/dist/local.js +234 -0
- package/dist/react.d.ts +375 -38
- package/dist/react.js +1597 -35849
- package/dist/styles.css +47 -47
- package/package.json +17 -3
package/dist/styles.css
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
--scrawl-color-text-muted: #62625c;
|
|
8
8
|
--scrawl-color-edge: #d4d4cc;
|
|
9
9
|
--scrawl-color-focus: #1856a3;
|
|
10
|
+
--scrawl-color-primary: #1856a3;
|
|
10
11
|
--scrawl-color-selection: #d9e8f7;
|
|
11
12
|
--scrawl-color-danger: #a3302b;
|
|
12
13
|
--scrawl-color-warning: #805400;
|
|
@@ -102,9 +103,10 @@
|
|
|
102
103
|
[data-scrawl-root] .scrawl-board__actions,
|
|
103
104
|
[data-scrawl-root] .scrawl-board__tools,
|
|
104
105
|
[data-scrawl-root] .scrawl-board__view,
|
|
106
|
+
[data-scrawl-root] .scrawl-board__more-tools,
|
|
105
107
|
[data-scrawl-root] .scrawl-board__style-shelf {
|
|
106
108
|
align-items: center;
|
|
107
|
-
background: var(--scrawl-color-surface
|
|
109
|
+
background: var(--scrawl-color-surface);
|
|
108
110
|
border: 1px solid color-mix(in srgb, var(--scrawl-color-surface-raised), var(--scrawl-color-text) 12%);
|
|
109
111
|
border-radius: var(--scrawl-radius-panel);
|
|
110
112
|
display: flex;
|
|
@@ -115,25 +117,45 @@
|
|
|
115
117
|
}
|
|
116
118
|
|
|
117
119
|
[data-scrawl-root] .scrawl-board__actions { inset-block-start: 12px; inset-inline-end: 12px; }
|
|
118
|
-
[data-scrawl-root] .scrawl-board__tools {
|
|
120
|
+
[data-scrawl-root] .scrawl-board__tools {
|
|
121
|
+
inset-block-start: 50%;
|
|
122
|
+
inset-inline-start: 12px;
|
|
123
|
+
inline-size: 54px;
|
|
124
|
+
max-block-size: calc(100% - 144px);
|
|
125
|
+
overflow-y: auto;
|
|
126
|
+
flex-direction: column;
|
|
127
|
+
transform: translateY(-50%);
|
|
128
|
+
box-shadow: var(--scrawl-elevation-low);
|
|
129
|
+
}
|
|
130
|
+
[data-scrawl-root] .scrawl-board__tools > button { flex: 0 0 44px; inline-size: 44px; }
|
|
131
|
+
[data-scrawl-root] .scrawl-board__tools button,
|
|
132
|
+
[data-scrawl-root] .scrawl-board__more-tools button { display: flex; align-items: center; justify-content: center; }
|
|
133
|
+
[data-scrawl-root] .scrawl-board__tools svg,
|
|
134
|
+
[data-scrawl-root] .scrawl-board__more-tools svg { display: block; inline-size: 22px; block-size: 22px; }
|
|
135
|
+
[data-scrawl-root] .scrawl-board__tools .scrawl-board__ink-sample { margin: 0; }
|
|
136
|
+
[data-scrawl-root] .scrawl-board__tools :focus-visible,
|
|
137
|
+
[data-scrawl-root] .scrawl-board__more-tools :focus-visible,
|
|
138
|
+
[data-scrawl-root] .scrawl-board__style-shelf :focus-visible { outline-offset: -3px; }
|
|
119
139
|
[data-scrawl-root] .scrawl-board__view { inset-block-end: 12px; inset-inline-end: 12px; }
|
|
140
|
+
[data-scrawl-root] .scrawl-board__more-tools,
|
|
120
141
|
[data-scrawl-root] .scrawl-board__style-shelf {
|
|
121
|
-
|
|
122
|
-
inset-block-
|
|
123
|
-
|
|
124
|
-
max-
|
|
125
|
-
overflow-
|
|
126
|
-
|
|
142
|
+
inset-inline-start: 78px;
|
|
143
|
+
inset-block-start: 72px;
|
|
144
|
+
inline-size: 106px;
|
|
145
|
+
max-block-size: calc(100% - 84px);
|
|
146
|
+
overflow-y: auto;
|
|
147
|
+
box-shadow: var(--scrawl-elevation-low);
|
|
127
148
|
}
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
transform: translate(-50%, calc(-100% - 12px));
|
|
149
|
+
[data-scrawl-root] .scrawl-board__more-tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
|
|
150
|
+
[data-scrawl-root] .scrawl-board__style-shelf .scrawl-board__style-group {
|
|
151
|
+
display: grid;
|
|
152
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
153
|
+
gap: 4px;
|
|
154
|
+
inline-size: 100%;
|
|
155
|
+
white-space: normal;
|
|
136
156
|
}
|
|
157
|
+
[data-scrawl-root] .scrawl-board__style-shelf .scrawl-board__style-group > span { grid-column: 1 / -1; text-align: center; }
|
|
158
|
+
[data-scrawl-root] .scrawl-board__style-shelf .scrawl-board__style-group button { padding: 4px; font-size: 12px; }
|
|
137
159
|
[data-scrawl-root] .scrawl-board__style-group { align-items: center; display: flex; gap: 6px; white-space: nowrap; }
|
|
138
160
|
[data-scrawl-root] .scrawl-board__style-group > span:first-child { color: var(--scrawl-color-text-muted); font-size: 0.75rem; font-weight: var(--scrawl-font-weight-strong); text-transform: uppercase; }
|
|
139
161
|
[data-scrawl-root] .scrawl-board__style-group button { align-items: center; display: flex; justify-content: center; padding: 6px 10px; }
|
|
@@ -221,30 +243,6 @@
|
|
|
221
243
|
[data-scrawl-root] [data-scrawl-default-ui] button:disabled,
|
|
222
244
|
[data-scrawl-root] [data-scrawl-default-ui] select:disabled { color: var(--scrawl-color-text-muted); cursor: not-allowed; }
|
|
223
245
|
|
|
224
|
-
[data-scrawl-root] .scrawl-board__tool-select {
|
|
225
|
-
align-items: center;
|
|
226
|
-
display: flex;
|
|
227
|
-
min-block-size: 44px;
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
[data-scrawl-root] .scrawl-board__tool-select > span { block-size: 1px; clip: rect(0, 0, 0, 0); inline-size: 1px; overflow: hidden; position: absolute; }
|
|
231
|
-
[data-scrawl-root] .scrawl-board__tool-select select {
|
|
232
|
-
-webkit-appearance: none;
|
|
233
|
-
appearance: none;
|
|
234
|
-
/* Chevron drawn from two gradient triangles rather than an embedded asset
|
|
235
|
-
reference (disallowed by this stylesheet's policy, see styles.test.ts),
|
|
236
|
-
and currentColor keeps it Theme-aware where a bitmap/SVG asset would
|
|
237
|
-
need its own colour. */
|
|
238
|
-
background-image:
|
|
239
|
-
linear-gradient(45deg, transparent 50%, currentColor 50%),
|
|
240
|
-
linear-gradient(135deg, currentColor 50%, transparent 50%);
|
|
241
|
-
background-position: right 14px center, right 9px center;
|
|
242
|
-
background-repeat: no-repeat;
|
|
243
|
-
background-size: 5px 5px, 5px 5px;
|
|
244
|
-
min-block-size: 44px;
|
|
245
|
-
padding-inline: 8px 24px;
|
|
246
|
-
}
|
|
247
|
-
|
|
248
246
|
[data-scrawl-root] .scrawl-board__ink-sample,
|
|
249
247
|
[data-scrawl-portal] .scrawl-board__ink-options span {
|
|
250
248
|
border: 1px solid color-mix(in srgb, currentColor, transparent 72%);
|
|
@@ -334,14 +332,16 @@
|
|
|
334
332
|
}
|
|
335
333
|
[data-scrawl-portal] .scrawl-board__inline-editor-actions button { min-block-size: auto; min-inline-size: auto; padding: 2px 6px; }
|
|
336
334
|
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
335
|
+
[data-scrawl-portal] .scrawl-board__panel[aria-label="Ink style"] {
|
|
336
|
+
inset-inline-start: 78px;
|
|
337
|
+
inset-block-start: 72px;
|
|
338
|
+
inset-block-end: auto;
|
|
339
|
+
inline-size: 156px;
|
|
340
|
+
max-block-size: calc(100% - 84px);
|
|
341
|
+
transform: none;
|
|
344
342
|
}
|
|
343
|
+
[data-scrawl-portal] .scrawl-board__panel[aria-label="Ink style"] .scrawl-board__panel-heading { flex-direction: column; align-items: stretch; }
|
|
344
|
+
[data-scrawl-portal] .scrawl-board__ink-options { grid-template-columns: 1fr; }
|
|
345
345
|
|
|
346
346
|
[data-scrawl-root] .scrawl-board__status, [data-scrawl-portal] .scrawl-board__status {
|
|
347
347
|
block-size: 1px;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scrawl-board/board",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.9",
|
|
4
4
|
"description": "The Scrawl Board SDK: an embeddable, collaborative infinite-canvas whiteboard for React and vanilla JS/TS apps.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -41,6 +41,10 @@
|
|
|
41
41
|
"types": "./dist/react.d.ts",
|
|
42
42
|
"import": "./dist/react.js"
|
|
43
43
|
},
|
|
44
|
+
"./local": {
|
|
45
|
+
"types": "./dist/local.d.ts",
|
|
46
|
+
"import": "./dist/local.js"
|
|
47
|
+
},
|
|
44
48
|
"./styles.css": "./dist/styles.css"
|
|
45
49
|
},
|
|
46
50
|
"scripts": {
|
|
@@ -51,11 +55,21 @@
|
|
|
51
55
|
"sbom": "node ./scripts/generate-sbom.mjs",
|
|
52
56
|
"size": "size-limit",
|
|
53
57
|
"lint:pack": "publint . && attw --pack . --exclude-entrypoints ./styles.css --profile esm-only",
|
|
54
|
-
"api-report": "node ./scripts/generate-api-docs.mjs"
|
|
58
|
+
"api-report": "node ./scripts/generate-api-docs.mjs",
|
|
59
|
+
"bench": "vitest bench run src/performance.bench.ts"
|
|
60
|
+
},
|
|
61
|
+
"dependencies": {
|
|
62
|
+
"troika-three-text": "^0.52.4"
|
|
55
63
|
},
|
|
56
64
|
"peerDependencies": {
|
|
57
65
|
"react": ">=18 <20",
|
|
58
|
-
"react-dom": ">=18 <20"
|
|
66
|
+
"react-dom": ">=18 <20",
|
|
67
|
+
"three": ">=0.170.0"
|
|
68
|
+
},
|
|
69
|
+
"peerDependenciesMeta": {
|
|
70
|
+
"react": { "optional": true },
|
|
71
|
+
"react-dom": { "optional": true },
|
|
72
|
+
"three": { "optional": true }
|
|
59
73
|
},
|
|
60
74
|
"devDependencies": {
|
|
61
75
|
"@arethetypeswrong/cli": "^0.18.5",
|