@quillmark/svelte 0.29.0 → 0.29.1

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.
@@ -352,6 +352,11 @@
352
352
  `check:style`'s rhythm axis sees each of them read a rung, never that they read
353
353
  the same one — the case `--_qm-inset-control` above is cut for. */
354
354
  --_qm-nest: var(--_qm-space-3);
355
+ /* A card's inline inset: its edge to the line its section strokes stand on, and the
356
+ text column's base at both ends. A step tighter than the nest, since the edge
357
+ closes a block rather than nesting one. A rung because the card and the tip
358
+ tucked under `main` are two components holding it. */
359
+ --_qm-card-inset: var(--_qm-space-2);
355
360
  /* The numerals a list marker is given room for: two digits, so a tenth item's number
356
361
  stands inside the leaf as the first's does. In `ch`, so it tracks the face the
357
362
  numbers are set in. */
@@ -437,12 +437,13 @@
437
437
  than the nesting rung the verticals inside keep: this edge closes the block rather
438
438
  than nesting one, and the rules it holds run that much further for it.
439
439
 
440
- Inside that inset is the card's one text column (`--_qm-column`): the title, a
441
- top-level field, the body's lines, the recovery note and the delete glyph's far edge
442
- all stand on it, so the card reads as one measure at both ends. */
440
+ Inside that inset is the card's one text column (`--_qm-column`), at both ends: the
441
+ title, a field, a heading, the body's lines and the recovery note start on it, and a
442
+ field's well, a line of the body and the delete glyph end on it, so the card reads
443
+ as one measure centred in its own edge. A section's nesting indents the start alone. */
443
444
  .qm-card {
444
445
  border-radius: var(--_qm-radius);
445
- padding: var(--_qm-space-3) var(--_qm-space-2);
446
+ padding: var(--_qm-space-3) var(--_qm-card-inset);
446
447
  background: var(--_qm-surface);
447
448
  display: flex;
448
449
  flex-direction: column;
@@ -454,13 +455,13 @@
454
455
  opens on its body keeps the full inset — prose is neither a heading nor a
455
456
  field row. */
456
457
  .qm-card.qm-main:has(> .qm-card-body > .qm-card-meta:first-child) {
457
- padding-top: var(--_qm-space);
458
+ padding-top: calc(var(--_qm-card-inset) - var(--_qm-space));
458
459
  }
459
460
  /* A section heading leading it: the vertical starts at the content's
460
461
  top-left, so the top inset is the inline one and the tip is a square
461
462
  corner of the card. */
462
463
  .qm-card.qm-main:has(> .qm-card-body > .qm-card-meta:first-child > .qm-groups:first-child) {
463
- padding-top: var(--_qm-space-2);
464
+ padding-top: var(--_qm-card-inset);
464
465
  }
465
466
  .qm-card-header {
466
467
  display: flex;
@@ -587,11 +588,12 @@
587
588
  accordion spends the same rung from its header and its panel, where it also caps the
588
589
  vertical those two edges hold.
589
590
 
590
- No stroke: a vertical would mark a section a reader has no name for. The start
591
- inset is the column, so a top-level field and a section heading share it. */
591
+ No stroke: a vertical would mark a section a reader has no name for. The inset is
592
+ the column at both ends, so a top-level field and a section heading share its start
593
+ and every well in the card shares its end. */
592
594
  .qm-section {
593
595
  padding-block: var(--_qm-space);
594
- padding-inline-start: var(--_qm-column);
596
+ padding-inline: var(--_qm-column);
595
597
  }
596
598
  /* Where it faces a rule, the rung a heading already stands off one. The fields
597
599
  sit on the heading column, not the card's edge. */
@@ -616,8 +618,9 @@
616
618
  --row-gap: var(--_qm-space-3);
617
619
  row-gap: var(--row-gap);
618
620
  }
619
- /* The nesting vertical, one `--_qm-nest` in from the card's edge with the panel's
620
- fields the same rung off it (ARCHITECTURE §"A plane is a tone"). `--_qm-border` and
621
+ /* The nesting vertical, on the card's inset with the panel's fields one `--_qm-nest`
622
+ off it (ARCHITECTURE §"A plane is a tone"). The end inset is the column's, so the
623
+ panel's wells end where a top-level field's do. `--_qm-border` and
621
624
  not `--_qm-accent`: the verticals and the rules beside them are one stroke at every
622
625
  depth, and a tone that changed as it went in would read as unrelated lines rather
623
626
  than one figure. A named section is what earns it, which is why the ungrouped block
@@ -637,6 +640,7 @@
637
640
  display: flex;
638
641
  flex-direction: column;
639
642
  border-left: var(--_qm-vertical-width) solid transparent;
643
+ padding-inline-end: var(--_qm-column);
640
644
  padding-bottom: var(--_qm-space);
641
645
  margin-bottom: calc(-1 * var(--_qm-space));
642
646
  transition:
@@ -117,7 +117,7 @@
117
117
  margin-top: calc(var(--_qm-radius) * -1);
118
118
  border-radius: 0 0 var(--_qm-radius) var(--_qm-radius);
119
119
  padding: calc(var(--_qm-space-3) + var(--_qm-radius))
120
- calc(var(--_qm-space-2) + var(--_qm-column)) var(--_qm-space-3);
120
+ calc(var(--_qm-card-inset) + var(--_qm-column)) var(--_qm-space-3);
121
121
  background: var(--_qm-tips-surface);
122
122
  display: flex;
123
123
  flex-direction: column;
@@ -85,7 +85,6 @@
85
85
  import { raiseGuidance } from './guidance.js';
86
86
  import { familiesOf, registerFaces } from './fonts.js';
87
87
  import Card from './Card.svelte';
88
- import Icon from './icons/Icon.svelte';
89
88
  import TipsCard from './TipsCard.svelte';
90
89
  import FormatPopover from './FormatPopover.svelte';
91
90
  // The add trigger and the kind menu draw shared recipes; a component carrying a
@@ -1025,21 +1024,20 @@
1025
1024
  {#if kinds.length}
1026
1025
  <!-- The strip past the last card is the append point, the one a reader looks for
1027
1026
  rather than finds by position, so it alone states itself in words at rest. A gap
1028
- between cards carries a plus where the words would be: the strip is the gap, the
1029
- pill it fills on hover is the space the new card takes, and the plus says what a
1030
- press there does. -->
1027
+ between cards draws nothing inside it: the strip is the gap, and the pill it fills
1028
+ on hover is the space the new card takes. -->
1031
1029
  {@const marked = atIndex === model.cards.length}
1032
1030
  <div class={['qm-add-card', { 'qm-add-card-marked': marked }]}>
1033
1031
  <!-- Marked, the words are the accessible name and no `aria-label` doubles
1034
1032
  them; bare, the same words land as the label, the strip having no
1035
- geometry to carry them. -->
1033
+ content to carry them. -->
1036
1034
  {#if kinds.length === 1}
1037
1035
  <button
1038
1036
  type="button"
1039
1037
  class="qm-add-btn qm-add-affordance qm-tap-floor qm-focus-ring"
1040
1038
  aria-label={marked ? undefined : merged.addCard}
1041
1039
  onclick={() => addCard(atIndex, kinds[0], true)}
1042
- >{#if marked}{merged.addCard}{:else}<Icon name="plus" class="qm-add-glyph" />{/if}</button
1040
+ >{#if marked}{`+ ${merged.addCard}`}{/if}</button
1043
1041
  >
1044
1042
  {:else}
1045
1043
  <!-- Multi-kind add: pick the kind, then seed + insert. A menu rather than a
@@ -1051,10 +1049,7 @@
1051
1049
  <DropdownMenu.Trigger
1052
1050
  class="qm-add-btn qm-add-affordance qm-tap-floor qm-focus-ring"
1053
1051
  aria-label={marked ? undefined : merged.addCard}
1054
- >{#if marked}{merged.addCard}{:else}<Icon
1055
- name="plus"
1056
- class="qm-add-glyph"
1057
- />{/if}</DropdownMenu.Trigger
1052
+ >{#if marked}{`+ ${merged.addCard}`}{/if}</DropdownMenu.Trigger
1058
1053
  >
1059
1054
  <DropdownMenu.Portal to={rootEl}>
1060
1055
  <DropdownMenu.Content
@@ -1191,8 +1186,8 @@
1191
1186
  /* Unboxed, like every button, and not dashed: a dashed edge is the placeholder idiom
1192
1187
  ("nothing is here yet"), which on a button reads as disabled or as a drop target. It
1193
1188
  stays honest in one place, the un-schemable card (`Card.svelte`), which is a state
1194
- rather than a control. A gap's trigger rests invisible, so the fill and the plus are
1195
- the whole of what it shows: the pill fills the strip because the strip is what was
1189
+ rather than a control. A gap's trigger rests invisible, so the fill is the whole of
1190
+ what it shows: the pill fills the strip because the strip is what was
1196
1191
  pressed, and the strip is the gap, so the fill is the card-to-be drawn where it will
1197
1192
  land.
1198
1193
 
@@ -1220,13 +1215,6 @@
1220
1215
  opacity var(--_qm-duration-fast) var(--_qm-ease-reverse),
1221
1216
  background-color var(--_qm-duration-fast) var(--_qm-ease-reverse);
1222
1217
  }
1223
- /* The pill's own height, so a turned-down `--qm-space` shrinks the glyph with the
1224
- strip rather than spilling it past the pill. */
1225
- .qm-add-card :global(.qm-add-glyph) {
1226
- height: 100%;
1227
- width: auto;
1228
- aspect-ratio: 1;
1229
- }
1230
1218
  /* The strip that holds words at rest takes the height that centres them, and rests dim
1231
1219
  rather than absent, having something to be seen. */
1232
1220
  .qm-add-card-marked :global(.qm-add-btn) {
@@ -14,8 +14,8 @@ export interface VisualStrings extends TableChromeStrings, SlashStrings {
14
14
  cardDelete: string;
15
15
  /** The card-title input's accessible name. */
16
16
  cardTitle: string;
17
- /** The trailing strip's visible words, which are also every strip's accessible
18
- * name. One string over
17
+ /** The trailing strip's visible words, drawn after a `+`, and every
18
+ * strip's accessible name. One string over
19
19
  * one kind and many: the trigger seeds a card, and which kind is the menu's word
20
20
  * to say or the schema's to have already settled. */
21
21
  addCard: string;
@@ -39,7 +39,7 @@ export const DEFAULT_VISUAL_STRINGS = {
39
39
  cardMoveDown: 'Move down',
40
40
  cardDelete: 'Delete card',
41
41
  cardTitle: 'Card title',
42
- addCard: 'Add card',
42
+ addCard: 'Add Card',
43
43
  arrayAdd: '+ Add',
44
44
  arrayRemove: 'Remove',
45
45
  arrayDrag: 'Drag to move',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quillmark/svelte",
3
- "version": "0.29.0",
3
+ "version": "0.29.1",
4
4
  "description": "Editor, live-preview and source surfaces over a Quillmark WASM session.",
5
5
  "repository": {
6
6
  "type": "git",