@scrawl-board/board 0.1.0-beta.4 → 0.1.0-beta.6
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/browser.d.ts +34 -1
- package/dist/browser.js +301 -46
- package/dist/core.d.ts +12 -0
- package/dist/core.js +18 -2
- package/dist/index.d.ts +93 -4
- package/dist/index.js +715 -60
- package/dist/react.d.ts +81 -4
- package/dist/react.js +715 -60
- package/dist/styles.css +62 -0
- package/package.json +1 -1
package/dist/styles.css
CHANGED
|
@@ -125,11 +125,73 @@
|
|
|
125
125
|
overflow-x: auto;
|
|
126
126
|
transform: translateX(-50%);
|
|
127
127
|
}
|
|
128
|
+
/* `anchor` supplied (DefaultBoardChrome's own toolbar): follow the active
|
|
129
|
+
tool button's own position (set inline as left/top) instead of centring
|
|
130
|
+
over the whole toolbar — inset-block-end must yield explicitly, since an
|
|
131
|
+
inline `top` alongside a stylesheet `bottom` would otherwise stretch the
|
|
132
|
+
box rather than let `top` alone govern its position. */
|
|
133
|
+
[data-scrawl-root] .scrawl-board__style-shelf[data-anchored="true"] {
|
|
134
|
+
inset-block-end: auto;
|
|
135
|
+
transform: translate(-50%, calc(-100% - 12px));
|
|
136
|
+
}
|
|
128
137
|
[data-scrawl-root] .scrawl-board__style-group { align-items: center; display: flex; gap: 6px; white-space: nowrap; }
|
|
129
138
|
[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; }
|
|
130
139
|
[data-scrawl-root] .scrawl-board__style-group button { align-items: center; display: flex; justify-content: center; padding: 6px 10px; }
|
|
131
140
|
[data-scrawl-root] .scrawl-board__style-group button span[aria-hidden] { block-size: 18px; border-radius: 50%; inline-size: 18px; }
|
|
132
141
|
|
|
142
|
+
/*
|
|
143
|
+
* Fixed, not absolute: `screenPosition` (BoardSnapshot.focusedItem) is
|
|
144
|
+
* computed from the canvas's own getBoundingClientRect, i.e. viewport
|
|
145
|
+
* coordinates — matching `position: fixed` is what keeps this toolbar
|
|
146
|
+
* glued to the focused object regardless of where [data-scrawl-root] sits
|
|
147
|
+
* on the page, the same contract every other consumer of `boardToScreen`
|
|
148
|
+
* already relies on.
|
|
149
|
+
*/
|
|
150
|
+
[data-scrawl-root] .scrawl-board__focus-toolbar {
|
|
151
|
+
align-items: center;
|
|
152
|
+
background: var(--scrawl-color-surface-raised);
|
|
153
|
+
border: 1px solid color-mix(in srgb, var(--scrawl-color-surface-raised), var(--scrawl-color-text) 12%);
|
|
154
|
+
border-radius: var(--scrawl-radius-panel);
|
|
155
|
+
box-shadow: var(--scrawl-elevation-low);
|
|
156
|
+
display: flex;
|
|
157
|
+
gap: 12px;
|
|
158
|
+
max-inline-size: calc(100vw - 24px);
|
|
159
|
+
overflow-x: auto;
|
|
160
|
+
padding: 4px;
|
|
161
|
+
pointer-events: auto;
|
|
162
|
+
position: fixed;
|
|
163
|
+
transform: translate(-50%, calc(-100% - 12px));
|
|
164
|
+
z-index: 15;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/* Notes have no gizmo of their own (it's ink-stroke/shape-only) — this is
|
|
168
|
+
that capability's default-ui-owned equivalent, visually matching the
|
|
169
|
+
gizmo's own restyle (spaced outline, circular handles, GAP_PX outset). */
|
|
170
|
+
[data-scrawl-root] .scrawl-board__focus-outline {
|
|
171
|
+
border: 2px solid var(--scrawl-color-focus);
|
|
172
|
+
border-radius: var(--scrawl-radius-control);
|
|
173
|
+
pointer-events: none;
|
|
174
|
+
position: fixed;
|
|
175
|
+
z-index: 12;
|
|
176
|
+
}
|
|
177
|
+
[data-scrawl-root] .scrawl-board__focus-outline[data-locked="true"] { border-color: var(--scrawl-color-warning); }
|
|
178
|
+
|
|
179
|
+
[data-scrawl-root] .scrawl-board__focus-handle {
|
|
180
|
+
background: var(--scrawl-color-focus);
|
|
181
|
+
block-size: 14px;
|
|
182
|
+
border: 2px solid var(--scrawl-color-surface);
|
|
183
|
+
border-radius: 50%;
|
|
184
|
+
box-shadow: var(--scrawl-elevation-low);
|
|
185
|
+
inline-size: 14px;
|
|
186
|
+
pointer-events: auto;
|
|
187
|
+
position: fixed;
|
|
188
|
+
touch-action: none;
|
|
189
|
+
transform: translate(-50%, -50%);
|
|
190
|
+
z-index: 16;
|
|
191
|
+
}
|
|
192
|
+
[data-scrawl-root] .scrawl-board__focus-handle[data-orientation="nwse"] { cursor: nwse-resize; }
|
|
193
|
+
[data-scrawl-root] .scrawl-board__focus-handle[data-orientation="nesw"] { cursor: nesw-resize; }
|
|
194
|
+
|
|
133
195
|
[data-scrawl-root] [data-scrawl-default-ui] button,
|
|
134
196
|
[data-scrawl-root] [data-scrawl-default-ui] select,
|
|
135
197
|
[data-scrawl-portal] .scrawl-board__panel button,
|
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.6",
|
|
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": {
|