@threadlabs/looma 0.10.10 → 0.10.11

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.
@@ -4304,7 +4304,7 @@ to {
4304
4304
  display: none;
4305
4305
  }
4306
4306
 
4307
- [data-component~="ui-tree-item"][data-v-a950b4d2] {
4307
+ [data-component~="ui-tree-item"][data-v-3778b642] {
4308
4308
  --_tree-row-min-height: 32px;
4309
4309
  --_tree-disclosure-size: 16px;
4310
4310
 
@@ -4313,7 +4313,7 @@ to {
4313
4313
  min-inline-size: 0;
4314
4314
  margin-inline-start: calc(var(--ui-tree-item-depth, 0) * var(--ui-tree-indent, 16px));
4315
4315
  }
4316
- .row[data-v-a950b4d2] {
4316
+ .row[data-v-3778b642] {
4317
4317
  position: relative;
4318
4318
  display: grid;
4319
4319
  grid-template-columns: var(--_tree-disclosure-size) auto minmax(0, 1fr);
@@ -4330,38 +4330,38 @@ to {
4330
4330
  box-shadow var(--ui-motion-fast) var(--ui-motion-ease),
4331
4331
  min-block-size var(--ui-motion-base) var(--ui-motion-ease);
4332
4332
  }
4333
- .row[data-v-a950b4d2]:hover,
4334
- [data-component~="ui-tree-item"][data-ui-tree-item-state~="selected"] .row[data-v-a950b4d2],
4335
- .row[data-v-a950b4d2]:focus-within {
4333
+ .row[data-v-3778b642]:hover,
4334
+ [data-component~="ui-tree-item"][data-ui-tree-item-state~="selected"] .row[data-v-3778b642],
4335
+ .row[data-v-3778b642]:focus-within {
4336
4336
  color: var(--ui-text-primary);
4337
4337
  background: var(--ui-surface-muted);
4338
4338
  }
4339
- [data-component~="ui-tree-item"][data-ui-tree-item-state~="disabled"] .row[data-v-a950b4d2] {
4339
+ [data-component~="ui-tree-item"][data-ui-tree-item-state~="disabled"] .row[data-v-3778b642] {
4340
4340
  opacity: 0.55;
4341
4341
  }
4342
- [data-component~="ui-tree-item"][data-dragging] .row[data-v-a950b4d2] {
4342
+ [data-component~="ui-tree-item"][data-dragging] .row[data-v-3778b642] {
4343
4343
  opacity: 0.42;
4344
4344
  }
4345
- [data-component~="ui-tree-item"][data-v-a950b4d2]:focus {
4345
+ [data-component~="ui-tree-item"][data-v-3778b642]:focus {
4346
4346
  outline: none;
4347
4347
  }
4348
- [data-component~="ui-tree-item"]:focus-visible .row[data-v-a950b4d2] {
4348
+ [data-component~="ui-tree-item"]:focus-visible .row[data-v-3778b642] {
4349
4349
  box-shadow: 0 0 0 2px var(--ui-focus-ring);
4350
4350
  }
4351
4351
 
4352
4352
  /* Child combinators: drop feedback belongs to this item's own row, not the rows nested in it. */
4353
- [data-component~="ui-tree-item"][data-drop-position="inside"] > .row[data-v-a950b4d2] {
4353
+ [data-component~="ui-tree-item"][data-drop-position="inside"] > .row[data-v-3778b642] {
4354
4354
  background: var(--ui-accent-subtle);
4355
4355
  box-shadow: inset 0 0 0 1px var(--ui-tree-drop-color, var(--ui-accent-solid));
4356
4356
  }
4357
- .disclosure[data-v-a950b4d2],
4358
- .disclosure-spacer[data-v-a950b4d2] {
4357
+ .disclosure[data-v-3778b642],
4358
+ .disclosure-spacer[data-v-3778b642] {
4359
4359
  grid-column: 1;
4360
4360
  grid-row: 1;
4361
4361
  inline-size: var(--_tree-disclosure-size);
4362
4362
  block-size: 28px;
4363
4363
  }
4364
- .disclosure[data-v-a950b4d2] {
4364
+ .disclosure[data-v-3778b642] {
4365
4365
  display: grid;
4366
4366
  /* Start-aligned: the chevron's ink, not its hit area, aligns with the content above it. */
4367
4367
  place-items: center start;
@@ -4372,14 +4372,14 @@ to {
4372
4372
  border-radius: var(--ui-radius-sm);
4373
4373
  cursor: pointer;
4374
4374
  }
4375
- .disclosure[hidden][data-v-a950b4d2] {
4375
+ .disclosure[hidden][data-v-3778b642] {
4376
4376
  display: none;
4377
4377
  }
4378
- .disclosure[data-v-a950b4d2]:hover {
4378
+ .disclosure[data-v-3778b642]:hover {
4379
4379
  color: var(--ui-text-primary);
4380
4380
  background: var(--ui-surface-elevated);
4381
4381
  }
4382
- .disclosure-icon[data-v-a950b4d2] {
4382
+ .disclosure-icon[data-v-3778b642] {
4383
4383
  display: grid;
4384
4384
  place-items: center;
4385
4385
  inline-size: 12px;
@@ -4387,7 +4387,7 @@ to {
4387
4387
  transform: rotate(-90deg);
4388
4388
  transition: transform var(--ui-motion-fast) var(--ui-motion-ease);
4389
4389
  }
4390
- .disclosure-icon[data-v-a950b4d2]::before {
4390
+ .disclosure-icon[data-v-3778b642]::before {
4391
4391
  display: block;
4392
4392
  inline-size: 0.375rem;
4393
4393
  block-size: 0.375rem;
@@ -4397,19 +4397,19 @@ to {
4397
4397
  /* A chevron's ink sits below its box centre; lift it so it centres optically (in either rotation). */
4398
4398
  transform: translateY(-20%) rotate(45deg);
4399
4399
  }
4400
- [data-component~="ui-tree-item"][aria-expanded="true"] .disclosure-icon[data-v-a950b4d2] {
4400
+ [data-component~="ui-tree-item"][aria-expanded="true"] .disclosure-icon[data-v-3778b642] {
4401
4401
  transform: rotate(0deg);
4402
4402
  }
4403
4403
 
4404
4404
  /* Lucide grip-vertical, filling the handle as in Looma 0.2. */
4405
- .drag-handle svg[data-v-a950b4d2] {
4405
+ .drag-handle svg[data-v-3778b642] {
4406
4406
  display: block;
4407
4407
  inline-size: 100%;
4408
4408
  block-size: 100%;
4409
4409
  }
4410
4410
 
4411
4411
  /* Slotted content is outside this scope, so :has() cannot see it; hide only a truly empty slot. */
4412
- .leading[data-v-a950b4d2] {
4412
+ .leading[data-v-3778b642] {
4413
4413
  display: inline-grid;
4414
4414
  place-items: center;
4415
4415
  grid-column: 2;
@@ -4418,13 +4418,16 @@ to {
4418
4418
  block-size: 1em;
4419
4419
  margin-inline-start: var(--ui-space-1);
4420
4420
  color: var(--ui-text-muted);
4421
+ /* Above the label, so a sliding name passes under the icon. */
4422
+ position: relative;
4423
+ z-index: 1;
4421
4424
  }
4422
- .leading[data-v-a950b4d2]:empty {
4425
+ .leading[data-v-3778b642]:empty {
4423
4426
  display: none;
4424
4427
  }
4425
4428
 
4426
4429
  /* Icons match the label's size (as in Knit's tree): an unsized SVG would otherwise render 300×150. */
4427
- svg[data-v-a950b4d2-s],img[data-v-a950b4d2-s] {
4430
+ svg[data-v-3778b642-s],img[data-v-3778b642-s] {
4428
4431
  display: block;
4429
4432
  inline-size: 1em;
4430
4433
  block-size: 1em;
@@ -4433,7 +4436,7 @@ svg[data-v-a950b4d2-s],img[data-v-a950b4d2-s] {
4433
4436
 
4434
4437
  /* The label spans the row's height and centres its content, so slotted content (a link) can
4435
4438
  stretch to fill the row as its own hit area; the padding tokens remove the inset. */
4436
- .label[data-v-a950b4d2] {
4439
+ .label[data-v-3778b642] {
4437
4440
  grid-column: 3;
4438
4441
  grid-row: 1;
4439
4442
  align-self: stretch;
@@ -4444,11 +4447,14 @@ svg[data-v-a950b4d2-s],img[data-v-a950b4d2-s] {
4444
4447
  overflow: hidden;
4445
4448
  padding: var(--ui-tree-item-label-padding-block, var(--ui-space-1))
4446
4449
  var(--ui-tree-item-label-padding-inline, var(--ui-space-2));
4450
+ /* The length of the fade before the controls. The label's one flex child lays out no gap; this
4451
+ is where the controller reads the length in pixels to stop a sliding name before the fade. */
4452
+ column-gap: var(--ui-space-3);
4447
4453
  }
4448
4454
 
4449
4455
  /* Slotted label content fills the cell, so a link is the row's hit area rather than sizing to
4450
4456
  its own text and reading as overflow. */
4451
- .label-text[data-v-a950b4d2] {
4457
+ .label-text[data-v-3778b642] {
4452
4458
  display: flex;
4453
4459
  align-items: center;
4454
4460
  /* Stretches, so slotted content can still be the row's full-height hit area. */
@@ -4458,43 +4464,73 @@ svg[data-v-a950b4d2-s],img[data-v-a950b4d2-s] {
4458
4464
  inline-size: 100%;
4459
4465
  white-space: nowrap;
4460
4466
  }
4461
- .label-text > [data-v-a950b4d2-s] {
4467
+ .label-text > [data-v-3778b642-s] {
4462
4468
  flex: 1 1 auto;
4463
4469
  min-inline-size: 0;
4464
4470
  }
4465
4471
 
4472
+ /* The controls sit over the label's end, so the text fades out where they begin. The fade is
4473
+ the truncation mark while it shows: an ellipsis under it would read as a second one. */
4474
+ .row:hover > .label[data-v-3778b642],
4475
+ .row:focus-within > .label[data-v-3778b642] {
4476
+ text-overflow: clip;
4477
+ mask-image: linear-gradient(
4478
+ to right,
4479
+ #000 calc(100% - var(--_tree-actions-width, 1.75rem) - var(--ui-space-3)),
4480
+ transparent calc(100% - var(--_tree-actions-width, 1.75rem))
4481
+ );
4482
+ }
4483
+ .row:hover > .label[data-v-3778b642]:dir(rtl),
4484
+ .row:focus-within > .label[data-v-3778b642]:dir(rtl) {
4485
+ mask-image: linear-gradient(
4486
+ to left,
4487
+ #000 calc(100% - var(--_tree-actions-width, 1.75rem) - var(--ui-space-3)),
4488
+ transparent calc(100% - var(--_tree-actions-width, 1.75rem))
4489
+ );
4490
+ }
4491
+
4466
4492
  /* A hovered row reads its whole name: the label slides far enough to show the end, waits
4467
4493
  there, and comes back. Only when it actually overflows — the controller measures by how
4468
4494
  much — after the controls have taken their place over its end — and hands over the distance
4469
4495
  and a duration from it, so a longer name travels no faster. */
4470
- .row[data-ui-marquee] > .label > .label-text[data-v-a950b4d2] {
4496
+ .row[data-ui-marquee] > .label > .label-text[data-v-3778b642] {
4471
4497
  /* Once, and it stays at the end while the pointer is there: a name that keeps sliding back
4472
4498
  and forth under the pointer is harder to read than one that arrives and holds. */
4473
- animation: ui-tree-item-marquee-a950b4d2 var(--_marquee-duration) linear 0.5s 1 normal forwards;
4499
+ animation: ui-tree-item-marquee-3778b642 var(--_marquee-duration) linear 0.5s 1 normal forwards;
4474
4500
  will-change: transform;
4475
4501
  }
4476
4502
 
4477
- /* While it slides, the start fades too: the name is leaving the cell at both ends, and a hard
4478
- edge beside the icon reads as a collision rather than as more text. */
4479
- .row[data-ui-marquee] > .label[data-v-a950b4d2] {
4503
+ /* This comes after the hover fade, which it replaces at the same specificity. While the name
4504
+ slides, the label reaches back under the icon (the controller measures how far) with its text
4505
+ where it was, and fades out across that stretch, gone by the icon's middle: the name slips
4506
+ under the icon rather than stopping at a hard edge beside it. */
4507
+ .row[data-ui-marquee] > .label[data-v-3778b642] {
4508
+ margin-inline-start: calc(-1 * var(--_marquee-lead, 0px));
4509
+ padding-inline-start: calc(
4510
+ var(--_marquee-lead, 0px) + var(--ui-tree-item-label-padding-inline, var(--ui-space-2))
4511
+ );
4480
4512
  mask-image: linear-gradient(
4481
4513
  to right,
4482
- transparent 0,
4483
- #000 var(--ui-space-2),
4514
+ transparent calc(var(--_marquee-lead, 0px) / 2),
4515
+ #000 calc(
4516
+ var(--_marquee-lead, 0px) + var(--ui-tree-item-label-padding-inline, var(--ui-space-2))
4517
+ ),
4484
4518
  #000 calc(100% - var(--_tree-actions-width, 1.75rem) - var(--ui-space-3)),
4485
4519
  transparent calc(100% - var(--_tree-actions-width, 1.75rem))
4486
4520
  );
4487
4521
  }
4488
- .row[data-ui-marquee] > .label[data-v-a950b4d2]:dir(rtl) {
4522
+ .row[data-ui-marquee] > .label[data-v-3778b642]:dir(rtl) {
4489
4523
  mask-image: linear-gradient(
4490
4524
  to left,
4491
- transparent 0,
4492
- #000 var(--ui-space-2),
4525
+ transparent calc(var(--_marquee-lead, 0px) / 2),
4526
+ #000 calc(
4527
+ var(--_marquee-lead, 0px) + var(--ui-tree-item-label-padding-inline, var(--ui-space-2))
4528
+ ),
4493
4529
  #000 calc(100% - var(--_tree-actions-width, 1.75rem) - var(--ui-space-3)),
4494
4530
  transparent calc(100% - var(--_tree-actions-width, 1.75rem))
4495
4531
  );
4496
4532
  }
4497
- @keyframes ui-tree-item-marquee-a950b4d2 {
4533
+ @keyframes ui-tree-item-marquee-3778b642 {
4498
4534
  from {
4499
4535
  transform: translateX(0);
4500
4536
  }
@@ -4505,35 +4541,15 @@ to {
4505
4541
 
4506
4542
  /* Reduced motion keeps the fade, which already says the name continues. */
4507
4543
  @media (prefers-reduced-motion: reduce) {
4508
- .row[data-ui-marquee] > .label > .label-text[data-v-a950b4d2] {
4544
+ .row[data-ui-marquee] > .label > .label-text[data-v-3778b642] {
4509
4545
  animation: none;
4510
4546
  }
4511
4547
  }
4512
-
4513
- /* The controls sit over the label's end, so the text fades out where they begin. The fade is
4514
- the truncation mark while it shows: an ellipsis under it would read as a second one. */
4515
- .row:hover > .label[data-v-a950b4d2],
4516
- .row:focus-within > .label[data-v-a950b4d2] {
4517
- text-overflow: clip;
4518
- mask-image: linear-gradient(
4519
- to right,
4520
- #000 calc(100% - var(--_tree-actions-width, 1.75rem) - var(--ui-space-3)),
4521
- transparent calc(100% - var(--_tree-actions-width, 1.75rem))
4522
- );
4523
- }
4524
- .row:hover > .label[data-v-a950b4d2]:dir(rtl),
4525
- .row:focus-within > .label[data-v-a950b4d2]:dir(rtl) {
4526
- mask-image: linear-gradient(
4527
- to left,
4528
- #000 calc(100% - var(--_tree-actions-width, 1.75rem) - var(--ui-space-3)),
4529
- transparent calc(100% - var(--_tree-actions-width, 1.75rem))
4530
- );
4531
- }
4532
- .row:hover > .label > [data-v-a950b4d2-s],
4533
- .row:focus-within > .label > [data-v-a950b4d2-s] {
4548
+ .row:hover > .label > [data-v-3778b642-s],
4549
+ .row:focus-within > .label > [data-v-3778b642-s] {
4534
4550
  text-overflow: clip;
4535
4551
  }
4536
- .actions[data-v-a950b4d2] {
4552
+ .actions[data-v-3778b642] {
4537
4553
  position: absolute;
4538
4554
  z-index: 1;
4539
4555
  inset-block: 0;
@@ -4545,18 +4561,18 @@ to {
4545
4561
  pointer-events: none;
4546
4562
  transition: opacity var(--ui-motion-fast) var(--ui-motion-ease);
4547
4563
  }
4548
- .row:hover > .actions[data-v-a950b4d2],
4549
- .row:focus-within > .actions[data-v-a950b4d2] {
4564
+ .row:hover > .actions[data-v-3778b642],
4565
+ .row:focus-within > .actions[data-v-3778b642] {
4550
4566
  opacity: 1;
4551
4567
  pointer-events: auto;
4552
4568
  }
4553
4569
 
4554
4570
  /* Without hover there is no reveal, so the controls keep their own column. */
4555
4571
  @media (hover: none) {
4556
- .row[data-v-a950b4d2] {
4572
+ .row[data-v-3778b642] {
4557
4573
  grid-template-columns: var(--_tree-disclosure-size) auto minmax(0, 1fr) auto;
4558
4574
  }
4559
- .actions[data-v-a950b4d2] {
4575
+ .actions[data-v-3778b642] {
4560
4576
  position: static;
4561
4577
  grid-column: 4;
4562
4578
  grid-row: 1;
@@ -4571,7 +4587,7 @@ to {
4571
4587
  empty column, right before the icon; a branch's disclosure is there, so its handle sits just
4572
4588
  outside the row. It is bare until pointed at: a resting surface behind it read as a faint
4573
4589
  patch rather than as a control. */
4574
- .drag-handle[data-v-a950b4d2] {
4590
+ .drag-handle[data-v-3778b642] {
4575
4591
  position: absolute;
4576
4592
  z-index: 2;
4577
4593
  inset-block-start: 50%;
@@ -4592,24 +4608,24 @@ to {
4592
4608
  transform: translateY(-50%);
4593
4609
  transition: opacity var(--ui-motion-fast) var(--ui-motion-ease);
4594
4610
  }
4595
- .row:hover .drag-handle[data-v-a950b4d2],
4596
- .drag-handle[data-v-a950b4d2]:hover,
4597
- .drag-handle[data-v-a950b4d2]:focus-visible,
4598
- [data-component~="ui-tree-item"][data-dragging] > .row > .drag-handle[data-v-a950b4d2] {
4611
+ .row:hover .drag-handle[data-v-3778b642],
4612
+ .drag-handle[data-v-3778b642]:hover,
4613
+ .drag-handle[data-v-3778b642]:focus-visible,
4614
+ [data-component~="ui-tree-item"][data-dragging] > .row > .drag-handle[data-v-3778b642] {
4599
4615
  opacity: 1;
4600
4616
  }
4601
- [data-component~="ui-tree-item"][data-ui-tree-item-state~="isContainer"] > .row > .drag-handle[data-v-a950b4d2] {
4617
+ [data-component~="ui-tree-item"][data-ui-tree-item-state~="isContainer"] > .row > .drag-handle[data-v-3778b642] {
4602
4618
  inset-inline-start: calc(-1 * var(--_tree-disclosure-size) - 2px);
4603
4619
  }
4604
- .drag-handle[data-v-a950b4d2]:hover,
4605
- .drag-handle[data-v-a950b4d2]:focus-visible {
4620
+ .drag-handle[data-v-3778b642]:hover,
4621
+ .drag-handle[data-v-3778b642]:focus-visible {
4606
4622
  color: var(--ui-text-primary);
4607
4623
  background: var(--ui-surface-hover);
4608
4624
  }
4609
- .drag-handle[data-v-a950b4d2]:active {
4625
+ .drag-handle[data-v-3778b642]:active {
4610
4626
  cursor: grabbing;
4611
4627
  }
4612
- .drop-indicator[data-v-a950b4d2] {
4628
+ .drop-indicator[data-v-3778b642] {
4613
4629
  position: absolute;
4614
4630
  z-index: 3;
4615
4631
  inset-inline: 1px;
@@ -4619,8 +4635,8 @@ to {
4619
4635
  background: var(--ui-tree-drop-color, var(--ui-accent-solid));
4620
4636
  pointer-events: none;
4621
4637
  }
4622
- .drop-indicator[data-v-a950b4d2]::before,
4623
- .drop-indicator[data-v-a950b4d2]::after {
4638
+ .drop-indicator[data-v-3778b642]::before,
4639
+ .drop-indicator[data-v-3778b642]::after {
4624
4640
  content: "";
4625
4641
  position: absolute;
4626
4642
  inset-block-start: 50%;
@@ -4631,39 +4647,39 @@ to {
4631
4647
  background: var(--ui-surface-elevated);
4632
4648
  transform: translateY(-50%);
4633
4649
  }
4634
- .drop-indicator[data-v-a950b4d2]::before {
4650
+ .drop-indicator[data-v-3778b642]::before {
4635
4651
  inset-inline-start: -1px;
4636
4652
  }
4637
- .drop-indicator[data-v-a950b4d2]::after {
4653
+ .drop-indicator[data-v-3778b642]::after {
4638
4654
  inset-inline-end: -1px;
4639
4655
  }
4640
- [data-component~="ui-tree-item"][data-drop-position="before"] > .row > .row-drop-indicator[data-v-a950b4d2] {
4656
+ [data-component~="ui-tree-item"][data-drop-position="before"] > .row > .row-drop-indicator[data-v-3778b642] {
4641
4657
  display: block;
4642
4658
  inset-block-start: -1px;
4643
4659
  }
4644
- [data-component~="ui-tree-item"][data-drop-position="after"] > .subtree-drop-indicator[data-v-a950b4d2] {
4660
+ [data-component~="ui-tree-item"][data-drop-position="after"] > .subtree-drop-indicator[data-v-3778b642] {
4645
4661
  display: block;
4646
4662
  inset-block-end: -1px;
4647
4663
  }
4648
- .children[hidden][data-v-a950b4d2] {
4664
+ .children[hidden][data-v-3778b642] {
4649
4665
  display: none;
4650
4666
  }
4651
- html[data-ui-input-modality="touch"] [data-component~="ui-tree-item"][data-v-a950b4d2] {
4667
+ html[data-ui-input-modality="touch"] [data-component~="ui-tree-item"][data-v-3778b642] {
4652
4668
  --_tree-row-min-height: 44px;
4653
4669
  }
4654
- html[data-ui-input-modality="touch"] [data-component~="ui-tree-item"] .drag-handle[data-v-a950b4d2] {
4670
+ html[data-ui-input-modality="touch"] [data-component~="ui-tree-item"] .drag-handle[data-v-3778b642] {
4655
4671
  display: none;
4656
4672
  }
4657
4673
  @media (prefers-reduced-motion: reduce) {
4658
- .row[data-v-a950b4d2],
4659
- .disclosure-icon[data-v-a950b4d2],
4660
- .drag-handle[data-v-a950b4d2] {
4674
+ .row[data-v-3778b642],
4675
+ .disclosure-icon[data-v-3778b642],
4676
+ .drag-handle[data-v-3778b642] {
4661
4677
  transition: none;
4662
4678
  }
4663
4679
  }
4664
4680
 
4665
4681
  /* A component that sets its display still honours the hidden attribute on its root. */
4666
- [data-component~="ui-tree-item"][hidden][data-v-a950b4d2] {
4682
+ [data-component~="ui-tree-item"][hidden][data-v-3778b642] {
4667
4683
  display: none;
4668
4684
  }
4669
4685
  /**