@quillmark/svelte 0.7.1 → 0.7.2

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.
@@ -562,9 +562,9 @@
562
562
  observer to loop and no re-packing to restructure the DOM under a prose leaf.
563
563
 
564
564
  It steps 1 → 2 → 4, skipping 3: each rung is the width at which a track still clears
565
- the comfortable field minimum, and an even capacity is what lets `lone`'s half land
566
- on a track boundary. A field ends on its track's own edge, so a rung is
567
- `n * 220px + gaps`. */
565
+ the comfortable field minimum, and an even capacity is what lets the half a subform
566
+ of one takes (`--cols-half`, `ObjectField`) land on a track boundary. A field ends on
567
+ its track's own edge, so a rung is `n * 220px + gaps`. */
568
568
  .qm-fields {
569
569
  --cols: 1;
570
570
  --cols-half: 1;
@@ -210,7 +210,7 @@
210
210
  const reportFocus = $derived(field.control === 'prose' ? undefined : () => onFocus?.(addr));
211
211
  </script>
212
212
 
213
- <div class="qm-field" class:cell={span === 'cell'} class:lone={span === 'lone'}>
213
+ <div class="qm-field" class:cell={span === 'cell'}>
214
214
  {#if field.control !== 'array'}
215
215
  <FieldLabel
216
216
  label={field.label}
@@ -367,9 +367,9 @@
367
367
  beside them, whose boxes end where their ink does. What a third track buys is the
368
368
  diagnostics of one row starting at one y; the alignment a row is read by is the
369
369
  controls', and the label track holds that. A diagnostic grows its row instead. */
370
- .qm-field.cell,
371
- .qm-field.lone {
370
+ .qm-field.cell {
372
371
  display: grid;
372
+ grid-column: span 1;
373
373
  grid-row: span 2;
374
374
  grid-template-rows: subgrid;
375
375
  row-gap: var(--_qm-space);
@@ -384,9 +384,6 @@
384
384
  gap: var(--_qm-space);
385
385
  min-width: 0;
386
386
  }
387
- .qm-field.cell {
388
- grid-column: span 1;
389
- }
390
387
  /* Positioned for the arrival wash a landing inserts (`core/bloom.ts`), the way
391
388
  `.qm-prose` is: an inset child over the control, since an `<input>` takes none.
392
389
  The radius is the control's own, so the wash's corners are the box's rather than
@@ -396,9 +393,4 @@
396
393
  position: relative;
397
394
  border-radius: var(--_qm-radius-inner);
398
395
  }
399
- /* A run of one takes half the capacity from column 1: `--cols-half` is the section's
400
- capacity halved, so the edge lands on a track boundary at every capacity. */
401
- .qm-field.lone {
402
- grid-column: span var(--cols-half);
403
- }
404
396
  </style>
@@ -279,8 +279,10 @@
279
279
  align-items: start;
280
280
  min-width: 0;
281
281
  }
282
- /* A subform of one takes half the capacity, the way a packable run of one does
283
- (`.qm-field.lone`): at full capacity a single track reads as truncated. */
282
+ /* A subform of one takes half the capacity: at full capacity a single track reads as
283
+ truncated, and there are no sibling properties for it to line up with. A stranded
284
+ field takes the whole row instead (`placeFields`): the width it would leave empty is
285
+ the card's, where this one sits inside a figure the nesting has already narrowed. */
284
286
  .qm-object-prop:only-child {
285
287
  grid-column: span var(--cols-half);
286
288
  }
@@ -216,7 +216,7 @@ export declare function groupSections(fields: FieldModel[], order: string[], lab
216
216
  */
217
217
  export declare function initialExpandedGroup(sections: GroupSection[]): string | null;
218
218
  /** How wide a field sits in its section grid. */
219
- export type FieldSpan = 'cell' | 'lone' | 'full';
219
+ export type FieldSpan = 'cell' | 'full';
220
220
  export interface PlacedField {
221
221
  field: FieldModel;
222
222
  span: FieldSpan;
@@ -225,8 +225,10 @@ export interface PlacedField {
225
225
  * Assign each field its span in the section grid. Consecutive packable fields are
226
226
  * `cell`s the grid auto-places: capacity and wrapping are the container query's
227
227
  * business, so a trailing orphan keeps its column width rather than growing to fill.
228
- * A packable run of one is `lone`: with no row above to align to, one column reads as
229
- * truncated, so it takes half the capacity from column 1. Everything else is `full`.
228
+ * A run of one is stranded — nothing packed beside it, and no row above to align to —
229
+ * so it is `full` like the shapes that declined: a lone narrow track reads as truncated
230
+ * against the width it leaves empty, and sharing was the whole of what asked for it.
231
+ * Everything else is `full`.
230
232
  *
231
233
  * Pure, and stays pure: no width, no measurement, nothing to re-derive on resize.
232
234
  */
@@ -218,7 +218,9 @@ export function initialExpandedGroup(sections) {
218
218
  *
219
219
  * A variant declines for the same reason one step further in: its height is the live
220
220
  * world's cell count, so it is set by a pick rather than only by the document, and a
221
- * packed neighbour would reflow every time the discriminant moves.
221
+ * packed neighbour would reflow every time the discriminant moves. The hint reaches
222
+ * nothing inside one either: a world's cells are the object subform's own grid, which
223
+ * reads no `ui` of its own, so `ui.compact` is inert everywhere a variant carries it.
222
224
  *
223
225
  * An array declines whatever its items are: one-line elements make a one-line step,
224
226
  * but nothing holds two arrays to the same number of them, so the shorter of a packed
@@ -236,8 +238,10 @@ function packable(f) {
236
238
  * Assign each field its span in the section grid. Consecutive packable fields are
237
239
  * `cell`s the grid auto-places: capacity and wrapping are the container query's
238
240
  * business, so a trailing orphan keeps its column width rather than growing to fill.
239
- * A packable run of one is `lone`: with no row above to align to, one column reads as
240
- * truncated, so it takes half the capacity from column 1. Everything else is `full`.
241
+ * A run of one is stranded — nothing packed beside it, and no row above to align to —
242
+ * so it is `full` like the shapes that declined: a lone narrow track reads as truncated
243
+ * against the width it leaves empty, and sharing was the whole of what asked for it.
244
+ * Everything else is `full`.
241
245
  *
242
246
  * Pure, and stays pure: no width, no measurement, nothing to re-derive on resize.
243
247
  */
@@ -248,7 +252,7 @@ export function placeFields(fields) {
248
252
  // field already placed.
249
253
  const flush = () => {
250
254
  if (run === 1)
251
- out[out.length - 1].span = 'lone';
255
+ out[out.length - 1].span = 'full';
252
256
  run = 0;
253
257
  };
254
258
  for (const f of fields) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quillmark/svelte",
3
- "version": "0.7.1",
3
+ "version": "0.7.2",
4
4
  "description": "Editor, live-preview and source surfaces over a Quillmark WASM session.",
5
5
  "repository": {
6
6
  "type": "git",