@inkbar/theme 0.5.0 → 0.6.0

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/theme.css +127 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inkbar/theme",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "description": "Default stylesheet for Inkbar. Zero specificity, so your CSS wins.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://inkbar.dev",
package/theme.css CHANGED
@@ -323,6 +323,17 @@
323
323
  z-index: 1;
324
324
  }
325
325
 
326
+ /* Plugin layers sit over the overlay (after it, at the same level). Presses that miss a
327
+ plugin's marks go through to the annotations and tools underneath. */
328
+ :where(.ink-plugin-layer) {
329
+ z-index: 1;
330
+ pointer-events: none;
331
+ }
332
+
333
+ :where(.ink-plugin-layer > *) {
334
+ pointer-events: auto;
335
+ }
336
+
326
337
  :where(.ink-annotation) {
327
338
  border-radius: 2px;
328
339
  outline: 1px solid transparent;
@@ -589,6 +600,54 @@
589
600
  cursor: default;
590
601
  }
591
602
 
603
+ /*
604
+ * A plugin command button (createCommandButton): the button looks like a toolbar button
605
+ * wherever it sits, and its status text goes beside it.
606
+ */
607
+ :where(.ink-command) {
608
+ display: inline-flex;
609
+ align-items: center;
610
+ gap: 0.5rem;
611
+ }
612
+
613
+ :where(.ink-command button) {
614
+ display: inline-flex;
615
+ align-items: center;
616
+ justify-content: center;
617
+ min-width: var(--ink-control-size, 2.25rem);
618
+ height: var(--ink-control-size, 2.25rem);
619
+ padding: 0 0.5rem;
620
+ border: 1px solid transparent;
621
+ border-radius: calc(var(--ink-radius) - 2px);
622
+ background: transparent;
623
+ color: inherit;
624
+ font: inherit;
625
+ cursor: pointer;
626
+ }
627
+
628
+ :where(.ink-command button:hover) {
629
+ background: color-mix(in srgb, var(--ink-fg) 8%, transparent);
630
+ }
631
+
632
+ :where(.ink-command button:disabled, .ink-command button[aria-disabled='true']) {
633
+ opacity: 0.5;
634
+ cursor: default;
635
+ }
636
+
637
+ :where(.ink-command button[aria-busy='true']) {
638
+ cursor: progress;
639
+ }
640
+
641
+ :where(.ink-command button:focus-visible) {
642
+ outline: 2px solid var(--ink-ring);
643
+ outline-offset: 2px;
644
+ }
645
+
646
+ :where(.ink-command-status) {
647
+ opacity: 0.75;
648
+ font-size: 0.875rem;
649
+ }
650
+
592
651
  :where(.ink-toolbar input) {
593
652
  box-sizing: border-box;
594
653
  height: var(--ink-control-size, 2.25rem);
@@ -1364,6 +1423,72 @@
1364
1423
  color: var(--ink-accent-fg);
1365
1424
  }
1366
1425
 
1426
+ /* Plugin cards: the card a plugin mark opens, a core popover like the thread's. */
1427
+ :where(.ink-card) {
1428
+ z-index: 50;
1429
+ width: 20rem;
1430
+ max-width: calc(100vw - 1rem);
1431
+ padding: 0.75rem;
1432
+ border: 1px solid var(--ink-border);
1433
+ border-radius: var(--ink-radius);
1434
+ background: var(--ink-surface);
1435
+ color: var(--ink-fg);
1436
+ box-shadow: 0 8px 24px rgb(0 0 0 / 0.15);
1437
+ font-size: 0.875rem;
1438
+ }
1439
+
1440
+ :where(.ink-card-title, .ink-card-meta, .ink-card-body) {
1441
+ margin: 0;
1442
+ }
1443
+
1444
+ :where(.ink-card-title) {
1445
+ font-weight: 600;
1446
+ }
1447
+
1448
+ /* The meta line keeps the body colour for contrast; any colour of its own is the swatch. */
1449
+ :where(.ink-card-meta) {
1450
+ display: flex;
1451
+ align-items: center;
1452
+ gap: 0.375rem;
1453
+ margin-top: 0.125rem;
1454
+ font-size: 0.75rem;
1455
+ }
1456
+
1457
+ :where(.ink-card-swatch) {
1458
+ flex: none;
1459
+ width: 0.5rem;
1460
+ height: 0.5rem;
1461
+ border-radius: 50%;
1462
+ }
1463
+
1464
+ :where(.ink-card-body) {
1465
+ margin-top: 0.25rem;
1466
+ color: var(--ink-muted-fg);
1467
+ }
1468
+
1469
+ :where(.ink-card-actions) {
1470
+ display: flex;
1471
+ gap: 0.375rem;
1472
+ margin-top: 0.5rem;
1473
+ }
1474
+
1475
+ :where(.ink-card-actions button) {
1476
+ padding: 0.375rem 0.75rem;
1477
+ border: 1px solid var(--ink-border);
1478
+ border-radius: calc(var(--ink-radius) - 2px);
1479
+ background: var(--ink-surface);
1480
+ color: inherit;
1481
+ font: inherit;
1482
+ cursor: pointer;
1483
+ }
1484
+
1485
+ /* The first action is the primary one. */
1486
+ :where(.ink-card-actions button:first-child) {
1487
+ border-color: var(--ink-accent);
1488
+ background: var(--ink-accent);
1489
+ color: var(--ink-accent-fg);
1490
+ }
1491
+
1367
1492
  :where(.ink-select-item:focus-visible) {
1368
1493
  outline: none;
1369
1494
  }
@@ -1379,7 +1504,8 @@
1379
1504
  .ink-select-trigger:focus-visible,
1380
1505
  .ink-toolbar input:focus-visible,
1381
1506
  .ink-thread-actions button:focus-visible,
1382
- .ink-thread-reply textarea:focus-visible
1507
+ .ink-thread-reply textarea:focus-visible,
1508
+ .ink-card-actions button:focus-visible
1383
1509
  ) {
1384
1510
  outline: 2px solid var(--ink-ring);
1385
1511
  outline-offset: 2px;