@ibodr/draw 0.1.10 → 0.1.12
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/index.mjs +1 -1
- package/draw.css +31 -97
- package/package.json +4 -4
package/dist/index.mjs
CHANGED
|
@@ -37230,7 +37230,7 @@ async function extractAssets(editor, snapshot, msg, addToast) {
|
|
|
37230
37230
|
// src/index.ts
|
|
37231
37231
|
registerDrawLibraryVersion(
|
|
37232
37232
|
"@ibodr/draw",
|
|
37233
|
-
"0.1.
|
|
37233
|
+
"0.1.12",
|
|
37234
37234
|
"esm"
|
|
37235
37235
|
);
|
|
37236
37236
|
/*!
|
package/draw.css
CHANGED
|
@@ -163,9 +163,11 @@
|
|
|
163
163
|
/* if you ever update --dr-color-background, update the hardcoded values in theme-init.js and globals.css
|
|
164
164
|
they're there to make sure the background color matches the user's preference before the actual app loads*/
|
|
165
165
|
--dr-color-grid: hsl(0, 0%, 43%);
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
--dr-color-board-bg-
|
|
166
|
+
/* Board background patterns (see `.dr-bg-*` in the Background section below).
|
|
167
|
+
Light theme: subtle blue-gray lines, like ruled/graph paper on white. */
|
|
168
|
+
--dr-color-board-bg-line: hsl(210, 40%, 55%, 38%);
|
|
169
|
+
--dr-color-board-bg-line-secondary: hsl(210, 40%, 55%, 19%);
|
|
170
|
+
--dr-color-board-bg-dot: var(--dr-color-grid);
|
|
169
171
|
/* UI */
|
|
170
172
|
--dr-color-low: hsl(204, 16%, 94%);
|
|
171
173
|
--dr-color-low-border: hsl(204, 16%, 92%);
|
|
@@ -220,9 +222,12 @@
|
|
|
220
222
|
/* if you ever update --dr-color-background, update the hardcoded values in theme-init.js and globals.css
|
|
221
223
|
they're there to make sure the background color matches the user's preference before the actual app loads*/
|
|
222
224
|
--dr-color-grid: hsl(0, 0%, 40%);
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
225
|
+
/* Board background patterns (see `.dr-bg-*` in the Background section below).
|
|
226
|
+
Dark theme: near-white lines at low opacity so they stay visible on the
|
|
227
|
+
near-black canvas without the blue cast used in the light theme. */
|
|
228
|
+
--dr-color-board-bg-line: hsl(0, 0%, 100%, 16%);
|
|
229
|
+
--dr-color-board-bg-line-secondary: hsl(0, 0%, 100%, 8%);
|
|
230
|
+
--dr-color-board-bg-dot: var(--dr-color-grid);
|
|
226
231
|
/* UI */
|
|
227
232
|
--dr-color-low: hsl(260, 4.5%, 10.5%);
|
|
228
233
|
--dr-color-low-border: hsl(207, 10%, 10%);
|
|
@@ -352,103 +357,32 @@ input,
|
|
|
352
357
|
height: 100%;
|
|
353
358
|
}
|
|
354
359
|
|
|
355
|
-
/* Board background patterns (`DrInstance.backgroundType`),
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
linear-gradient(to right, var(--dr-color-board-bg-line) 1px, transparent 1px),
|
|
366
|
-
linear-gradient(to bottom, var(--dr-color-board-bg-line) 1px, transparent 1px);
|
|
367
|
-
background-size: 48px 48px;
|
|
368
|
-
}
|
|
369
|
-
|
|
370
|
-
.dr-background__hex-grid {
|
|
371
|
-
background-image:
|
|
372
|
-
repeating-linear-gradient(
|
|
373
|
-
60deg,
|
|
374
|
-
var(--dr-color-board-bg-line) 0,
|
|
375
|
-
var(--dr-color-board-bg-line) 1px,
|
|
376
|
-
transparent 1px,
|
|
377
|
-
transparent 26px
|
|
378
|
-
),
|
|
379
|
-
repeating-linear-gradient(
|
|
380
|
-
-60deg,
|
|
381
|
-
var(--dr-color-board-bg-line) 0,
|
|
382
|
-
var(--dr-color-board-bg-line) 1px,
|
|
383
|
-
transparent 1px,
|
|
384
|
-
transparent 26px
|
|
385
|
-
),
|
|
386
|
-
repeating-linear-gradient(
|
|
387
|
-
0deg,
|
|
388
|
-
var(--dr-color-board-bg-line) 0,
|
|
389
|
-
var(--dr-color-board-bg-line) 1px,
|
|
390
|
-
transparent 1px,
|
|
391
|
-
transparent 26px
|
|
392
|
-
);
|
|
393
|
-
}
|
|
394
|
-
|
|
395
|
-
.dr-background__lined {
|
|
396
|
-
background-image: repeating-linear-gradient(
|
|
397
|
-
to bottom,
|
|
398
|
-
transparent 0,
|
|
399
|
-
transparent 31px,
|
|
400
|
-
var(--dr-color-board-bg-line) 31px,
|
|
401
|
-
var(--dr-color-board-bg-line) 32px
|
|
402
|
-
);
|
|
403
|
-
}
|
|
404
|
-
|
|
405
|
-
.dr-background__double-line {
|
|
406
|
-
background-image: repeating-linear-gradient(
|
|
407
|
-
to bottom,
|
|
408
|
-
transparent 0,
|
|
409
|
-
transparent 24px,
|
|
410
|
-
var(--dr-color-board-bg-line-secondary) 24px,
|
|
411
|
-
var(--dr-color-board-bg-line-secondary) 25px,
|
|
412
|
-
transparent 25px,
|
|
413
|
-
transparent 39px,
|
|
414
|
-
var(--dr-color-board-bg-line) 39px,
|
|
415
|
-
var(--dr-color-board-bg-line) 40px
|
|
416
|
-
);
|
|
360
|
+
/* Board background patterns (`DrInstance.backgroundType`), rendered as an SVG overlay
|
|
361
|
+
on top of `.dr-background`. Unlike the old CSS `background-image` version, this is
|
|
362
|
+
generated dynamically (see `DefaultBackground`) so the pattern pans and scales with
|
|
363
|
+
the camera exactly like the dot grid rendered by `DefaultGrid`. */
|
|
364
|
+
.dr-background-pattern {
|
|
365
|
+
position: absolute;
|
|
366
|
+
inset: 0px;
|
|
367
|
+
width: 100%;
|
|
368
|
+
height: 100%;
|
|
369
|
+
pointer-events: none;
|
|
417
370
|
}
|
|
418
371
|
|
|
419
|
-
.dr-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
var(--dr-color-board-bg-line-secondary) 0,
|
|
424
|
-
var(--dr-color-board-bg-line-secondary) 1px,
|
|
425
|
-
transparent 1px,
|
|
426
|
-
transparent 22px
|
|
427
|
-
),
|
|
428
|
-
repeating-linear-gradient(
|
|
429
|
-
to bottom,
|
|
430
|
-
transparent 0,
|
|
431
|
-
transparent 24px,
|
|
432
|
-
var(--dr-color-board-bg-line-secondary) 24px,
|
|
433
|
-
var(--dr-color-board-bg-line-secondary) 25px,
|
|
434
|
-
transparent 25px,
|
|
435
|
-
transparent 39px,
|
|
436
|
-
var(--dr-color-board-bg-line) 39px,
|
|
437
|
-
var(--dr-color-board-bg-line) 40px
|
|
438
|
-
);
|
|
372
|
+
.dr-bg-line {
|
|
373
|
+
stroke: var(--dr-color-board-bg-line);
|
|
374
|
+
stroke-width: 1px;
|
|
375
|
+
fill: none;
|
|
439
376
|
}
|
|
440
377
|
|
|
441
|
-
.dr-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
background-size: 20px 20px;
|
|
378
|
+
.dr-bg-line-secondary {
|
|
379
|
+
stroke: var(--dr-color-board-bg-line-secondary);
|
|
380
|
+
stroke-width: 1px;
|
|
381
|
+
fill: none;
|
|
446
382
|
}
|
|
447
383
|
|
|
448
|
-
.dr-
|
|
449
|
-
|
|
450
|
-
background-image: radial-gradient(hsl(0, 0%, 100%, 4%) 1px, transparent 1px);
|
|
451
|
-
background-size: 3px 3px;
|
|
384
|
+
.dr-bg-dot {
|
|
385
|
+
fill: var(--dr-color-board-bg-dot);
|
|
452
386
|
}
|
|
453
387
|
|
|
454
388
|
/* --------------------- Grid Layer --------------------- */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ibodr/draw",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.12",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"publishConfig": {
|
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
"classnames": "^2.5.1",
|
|
32
32
|
"lz-string": "^1.5.0",
|
|
33
33
|
"radix-ui": "^1.4.3",
|
|
34
|
-
"@ibodr/driver": "0.1.
|
|
35
|
-
"@ibodr/
|
|
36
|
-
"@ibodr/
|
|
34
|
+
"@ibodr/driver": "0.1.12",
|
|
35
|
+
"@ibodr/store": "0.1.12",
|
|
36
|
+
"@ibodr/editor": "0.1.12"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
39
|
"react": "^18.2.0 || ^19.2.1",
|