@tldraw/tldraw 5.7.0-canary.f58edb2cdca7 → 5.7.0-canary.f68e78a406ca

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-cjs/index.js CHANGED
@@ -19,7 +19,7 @@ var import_tldraw = require("tldraw");
19
19
  __reExport(index_exports, require("tldraw"), module.exports);
20
20
  (0, import_tldraw.registerTldrawLibraryVersion)(
21
21
  "@tldraw/tldraw",
22
- "5.7.0-canary.f58edb2cdca7",
22
+ "5.7.0-canary.f68e78a406ca",
23
23
  "cjs"
24
24
  );
25
25
  //# sourceMappingURL=index.js.map
@@ -2,7 +2,7 @@ import { registerTldrawLibraryVersion } from "tldraw";
2
2
  export * from "tldraw";
3
3
  registerTldrawLibraryVersion(
4
4
  "@tldraw/tldraw",
5
- "5.7.0-canary.f58edb2cdca7",
5
+ "5.7.0-canary.f68e78a406ca",
6
6
  "esm"
7
7
  );
8
8
  //# sourceMappingURL=index.mjs.map
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tldraw/tldraw",
3
3
  "description": "A tiny little drawing editor.",
4
- "version": "5.7.0-canary.f58edb2cdca7",
4
+ "version": "5.7.0-canary.f68e78a406ca",
5
5
  "author": {
6
6
  "name": "tldraw Inc.",
7
7
  "email": "hello@tldraw.com"
@@ -39,7 +39,7 @@
39
39
  "src"
40
40
  ],
41
41
  "dependencies": {
42
- "tldraw": "5.7.0-canary.f58edb2cdca7"
42
+ "tldraw": "5.7.0-canary.f68e78a406ca"
43
43
  },
44
44
  "peerDependencies": {
45
45
  "react": "^18.2.0 || ^19.2.1",
package/tldraw.css CHANGED
@@ -2030,8 +2030,9 @@ it from receiving any pointer events or affecting the cursor. */
2030
2030
  border-radius: var(--tl-radius-2);
2031
2031
  }
2032
2032
 
2033
+ /* Leading icons and checks sit 6px from the label; trailing items keep the 8px gap. */
2033
2034
  .tlui-button__menu > .tlui-icon + .tlui-button__label {
2034
- margin-inline-start: 0px;
2035
+ margin-inline-start: -2px;
2035
2036
  }
2036
2037
 
2037
2038
  .tlui-button__menu:nth-child(1) {
@@ -2460,6 +2461,11 @@ it from receiving any pointer events or affecting the cursor. */
2460
2461
  margin-inline-start: var(--tl-space-4);
2461
2462
  }
2462
2463
 
2464
+ .tlui-button__menu .tlui-kbd,
2465
+ .tlui-command-palette__item .tlui-kbd {
2466
+ color: var(--tl-color-text-3);
2467
+ }
2468
+
2463
2469
  .tlui-kbd > span {
2464
2470
  width: 100%;
2465
2471
  text-align: center;
@@ -3437,7 +3443,7 @@ tldraw? probably.
3437
3443
  .tlui-toast__icon {
3438
3444
  padding-top: 11px;
3439
3445
  padding-inline-start: var(--tl-space-4);
3440
- color: var(--tl-color-text-1);
3446
+ color: var(--tl-color-text-3);
3441
3447
  }
3442
3448
 
3443
3449
  .tlui-toast__container {
@@ -3450,22 +3456,6 @@ tldraw? probably.
3450
3456
  font-size: 12px;
3451
3457
  }
3452
3458
 
3453
- .tlui-toast__container[data-severity='success'] .tlui-icon {
3454
- color: var(--tl-color-success);
3455
- }
3456
-
3457
- .tlui-toast__container[data-severity='info'] .tlui-icon {
3458
- color: var(--tl-color-info);
3459
- }
3460
-
3461
- .tlui-toast__container[data-severity='warning'] .tlui-icon {
3462
- color: var(--tl-color-warning);
3463
- }
3464
-
3465
- .tlui-toast__container[data-severity='error'] .tlui-icon {
3466
- color: var(--tl-color-danger);
3467
- }
3468
-
3469
3459
  .tlui-toast__main {
3470
3460
  flex-grow: 2;
3471
3461
  max-width: 280px;
@@ -3673,6 +3663,16 @@ tldraw? probably.
3673
3663
  padding: 0px var(--tl-space-4);
3674
3664
  }
3675
3665
 
3666
+ /* Confirm Open Link Dialog */
3667
+
3668
+ .tlui-confirm-open-link-dialog__url {
3669
+ margin-top: var(--tl-space-4);
3670
+ padding: var(--tl-space-3) var(--tl-space-4);
3671
+ border-radius: var(--tl-radius-2);
3672
+ background-color: var(--tl-color-muted-2);
3673
+ font-family: var(--tl-font-mono);
3674
+ }
3675
+
3676
3676
  /* Embed Dialog */
3677
3677
 
3678
3678
  .tlui-embed__spacer {
@@ -4196,4 +4196,223 @@ tldraw? probably.
4196
4196
  }
4197
4197
  }
4198
4198
 
4199
+ /* ------------------ Command palette ------------------ */
4200
+
4201
+ .tlui-command-palette__overlay {
4202
+ position: absolute;
4203
+ inset: 0;
4204
+ z-index: var(--tl-layer-menus);
4205
+ pointer-events: all;
4206
+ }
4207
+
4208
+ .tlui-command-palette__overlay[data-passthrough] {
4209
+ pointer-events: none;
4210
+ }
4211
+
4212
+ .tlui-command-palette__overlay[data-passthrough] > .tlui-command-palette {
4213
+ pointer-events: all;
4214
+ }
4215
+
4216
+ .tlui-command-palette {
4217
+ --tlui-command-palette-row: 40px;
4218
+ position: absolute;
4219
+ /* The top sits 130px above the anchor and stays put as the list shrinks; short screens raise it
4220
+ to 252px above the bottom, but no higher than 8px. max-height keeps the 260px full palette at
4221
+ most 60% tall and ending at least 8px above the bottom edge. */
4222
+ --tlui-command-palette-anchor: 65%;
4223
+ top: max(8px, min(calc(var(--tlui-command-palette-anchor) - 130px), calc(100% - 252px)));
4224
+ left: 50%;
4225
+ transform: translateX(-50%);
4226
+ /* Room for group headings next to longer labels. */
4227
+ width: min(360px, calc(100% - 16px));
4228
+ /* Fixed, so the palette doesn't resize as results come and go: the search row plus 6 rows. The
4229
+ max-heights below still shrink it on short screens. */
4230
+ height: calc(var(--tlui-command-palette-row) + 6 * (var(--tlui-command-palette-row) - 4px) + 4px);
4231
+ max-height: min(60%, calc(100% - var(--tlui-command-palette-anchor) + 122px));
4232
+ display: flex;
4233
+ flex-direction: column;
4234
+ overflow: hidden;
4235
+ border-radius: var(--tl-radius-3);
4236
+ background-color: var(--tl-color-panel);
4237
+ box-shadow: var(--tl-shadow-3);
4238
+ color: var(--tl-color-text-1);
4239
+ font-size: 12px;
4240
+ }
4241
+
4242
+ /* Centers the full 260px palette; shorter lists keep the same top, so the input never moves. */
4243
+ .tlui-command-palette[data-position='center'] {
4244
+ top: max(8px, calc(50% - 130px));
4245
+ max-height: 60%;
4246
+ }
4247
+
4248
+ /* The same gap to the edge as the toolbar has below it. The on-screen keyboard covers the lower
4249
+ half on touch devices, so every position uses it there. */
4250
+ .tlui-command-palette[data-position='top'],
4251
+ .tl-container[data-coarse='true'] .tlui-command-palette {
4252
+ top: calc(var(--tl-space-3) + env(safe-area-inset-top, 0px));
4253
+ max-height: 60%;
4254
+ }
4255
+
4256
+ /* No focus ring: the palette keeps focus on the input the whole time it's open. */
4257
+ .tlui-command-palette__search {
4258
+ display: flex;
4259
+ align-items: center;
4260
+ gap: 6px;
4261
+ flex-shrink: 0;
4262
+ height: var(--tlui-command-palette-row);
4263
+ padding: 0 var(--tl-space-4) 0 8px;
4264
+ border-bottom: 1px solid var(--tl-color-divider);
4265
+ color: var(--tl-color-text-3);
4266
+ }
4267
+
4268
+ /* Extends .tlui-input; no font-size here, so its iOS 16px rule still applies. */
4269
+ .tlui-command-palette__input {
4270
+ flex: 1;
4271
+ min-width: 0;
4272
+ height: 100%;
4273
+ padding: 0;
4274
+ }
4275
+
4276
+ /* Fills the palette under the search: 8 rows' worth, since rows overlap by 4px like
4277
+ .tlui-button__menu (n rows are n * 36px + 4px). Group titles take rows' space, so about 5
4278
+ commands are in view. */
4279
+ .tlui-command-palette__list {
4280
+ flex: 1 1 auto;
4281
+ min-height: 0;
4282
+ overflow-y: auto;
4283
+ overscroll-behavior: contain;
4284
+ /* Keeps a group's title in view above its first row. */
4285
+ scroll-padding-block-start: calc(var(--tlui-command-palette-row) - 4px);
4286
+ scroll-padding-block-end: var(--tlui-command-palette-row);
4287
+ scrollbar-width: none;
4288
+ }
4289
+
4290
+ .tlui-command-palette__list::-webkit-scrollbar {
4291
+ display: none;
4292
+ }
4293
+
4294
+ .tlui-command-palette__list[data-more] {
4295
+ -webkit-mask-image: linear-gradient(
4296
+ to bottom,
4297
+ black calc(100% - var(--tlui-command-palette-row)),
4298
+ transparent
4299
+ );
4300
+ mask-image: linear-gradient(
4301
+ to bottom,
4302
+ black calc(100% - var(--tlui-command-palette-row)),
4303
+ transparent
4304
+ );
4305
+ }
4306
+
4307
+ /* Divided like .tlui-menu__group. */
4308
+ .tlui-command-palette__group + .tlui-command-palette__group {
4309
+ border-top: 1px solid var(--tl-color-divider);
4310
+ }
4311
+
4312
+ /* A menu row's height and type, muted, so a title reads as a row that can't be picked. */
4313
+ .tlui-command-palette__heading {
4314
+ display: flex;
4315
+ align-items: center;
4316
+ height: var(--tlui-command-palette-row);
4317
+ padding: 0 var(--tl-space-4);
4318
+ color: var(--tl-color-text-3);
4319
+ }
4320
+
4321
+ .tlui-command-palette__heading + .tlui-command-palette__item {
4322
+ margin-top: -4px;
4323
+ }
4324
+
4325
+ .tlui-command-palette__back {
4326
+ flex-shrink: 0;
4327
+ gap: 6px;
4328
+ padding-inline-start: var(--tl-space-3);
4329
+ border-bottom: 1px solid var(--tl-color-divider);
4330
+ color: var(--tl-color-text-1);
4331
+ cursor: pointer;
4332
+ }
4333
+
4334
+ .tlui-command-palette__back-kbd {
4335
+ margin-inline-start: auto;
4336
+ color: var(--tl-color-text-3);
4337
+ }
4338
+
4339
+ .tlui-command-palette__item {
4340
+ position: relative;
4341
+ z-index: 0;
4342
+ padding: 0 var(--tl-space-4);
4343
+ cursor: pointer;
4344
+ }
4345
+
4346
+ /* Pulls the check into the inset, like .tlui-button__checkbox. */
4347
+ .tlui-command-palette__item[aria-checked] {
4348
+ padding-inline-start: var(--tl-space-3);
4349
+ }
4350
+
4351
+ .tlui-command-palette__item + .tlui-command-palette__item {
4352
+ margin-top: -4px;
4353
+ }
4354
+
4355
+ .tlui-command-palette__item::after {
4356
+ content: '';
4357
+ position: absolute;
4358
+ inset: 4px;
4359
+ z-index: -1;
4360
+ border-radius: var(--tl-radius-2);
4361
+ background: var(--tl-color-muted-2);
4362
+ opacity: 0;
4363
+ }
4364
+
4365
+ /* Raised like a hovered .tlui-button, so it keeps the pointer where rows overlap. */
4366
+ .tlui-command-palette__item[data-highlighted] {
4367
+ z-index: 1;
4368
+ }
4369
+
4370
+ .tlui-command-palette__item[data-highlighted]::after {
4371
+ opacity: 1;
4372
+ }
4373
+
4374
+ .tlui-command-palette__item[aria-disabled='true'],
4375
+ .tlui-command-palette__item[aria-disabled='true'] .tlui-kbd {
4376
+ color: var(--tl-color-text-disabled);
4377
+ cursor: default;
4378
+ }
4379
+
4380
+ .tlui-command-palette__row {
4381
+ display: flex;
4382
+ align-items: center;
4383
+ gap: var(--tl-space-3);
4384
+ height: var(--tlui-command-palette-row);
4385
+ }
4386
+
4387
+ .tlui-command-palette__row > .tlui-icon {
4388
+ flex-shrink: 0;
4389
+ }
4390
+
4391
+ /* The same uneven gap as .tlui-button__menu. */
4392
+ .tlui-command-palette__row > .tlui-icon + .tlui-command-palette__label {
4393
+ margin-inline-start: -2px;
4394
+ }
4395
+
4396
+ .tlui-command-palette__label {
4397
+ flex: 1 1 0;
4398
+ min-width: 0;
4399
+ overflow: hidden;
4400
+ text-overflow: ellipsis;
4401
+ white-space: nowrap;
4402
+ }
4403
+
4404
+ .tlui-command-palette__detail {
4405
+ margin-inline-start: var(--tl-space-3);
4406
+ color: var(--tl-color-text-3);
4407
+ }
4408
+
4409
+ .tlui-command-palette__list:empty {
4410
+ display: none;
4411
+ }
4412
+
4413
+ .tlui-command-palette__empty {
4414
+ padding: var(--tl-space-4);
4415
+ color: var(--tl-color-text-3);
4416
+ }
4417
+
4199
4418