@quillmark/svelte 0.7.3 → 0.9.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.
@@ -1,8 +1,8 @@
1
1
  /* The control recipes more than one component draws: the focus ring, the box a
2
- typed value sits in, and the square icon button. They live here rather than per
3
- component because Svelte scopes a `<style>` block to the component that owns the
4
- markup: a component that carries a shared class without also carrying its rule
5
- ships unstyled, and nothing raises it.
2
+ typed value sits in, the unboxed glyph, the add strip, and the chip. They live here
3
+ rather than per component because Svelte scopes a `<style>` block to the component
4
+ that owns the markup: a component that carries a shared class without also carrying
5
+ its rule ships unstyled, and nothing raises it.
6
6
 
7
7
  Not in `core/theme.css`: that file is the derivation (public dials in, the
8
8
  private `--_qm-*` scale out) and it mints values. This file mints none; every
@@ -12,7 +12,7 @@
12
12
  Every selector here is `:where()`-wrapped, so a recipe computes at specificity zero.
13
13
  That is the point twice over: a consumer's stylesheet beats the chrome without
14
14
  `!important`, and a component's own scoped block overrides its shared base —
15
- `.qm-card-delete` recolours a `.qm-icon-btn`, `.qm-json` adds the monospace face over
15
+ `.qm-card-delete` recolours a `.qm-chip` under the pointer, `.qm-json` adds the monospace face over
16
16
  `.qm-input` — with no specificity fight. Unlayered with it, so a host's own layered
17
17
  reset never reaches these rules whatever order the sheets load in (`core/theme.css`). */
18
18
 
@@ -116,12 +116,11 @@
116
116
  }
117
117
 
118
118
  /* The second recipe, and it is not the box above: a field is a box because you
119
- type into it, a button is not a box because you press it. No resting border and
120
- no resting fill; the
121
- surface arrives on hover, off the rung the enum listbox already highlights with.
122
- Deliberately no `color`: the callers disagree on purpose (the card delete is
123
- `--_qm-danger`, the array remove inherits its row's ink), and a base colour here
124
- would flatten that distinction rather than share a recipe.
119
+ type into it. A button rests with no fill; the surface arrives on hover, off the
120
+ rung the enum listbox already highlights with. Deliberately no `color`: the
121
+ callers disagree on purpose (the array remove takes danger under the pointer, the
122
+ tips foot inherits, a chip takes the label tone), and a base colour here would flatten
123
+ that distinction rather than share a recipe.
125
124
 
126
125
  `--_qm-tap-min` is WCAG 2.5.8's floor, read rather than re-expressed per
127
126
  control: `min-*` is outside every `check:style` axis, so a second expression of
@@ -132,9 +131,9 @@
132
131
  the floor means the same height whatever element carries it; and a caller that
133
132
  stretches one of these to its row gets a width the padding sits inside.
134
133
 
135
- Both button families are named here rather than opting in through a marker: a
136
- glyph button and an add affordance are not sometimes flat, so a class they could
137
- be built without is a class one of them will eventually miss.
134
+ Every button family is named here rather than opting in through a marker: a
135
+ glyph, an add strip and a chip are not sometimes flat, so a class they could be
136
+ built without is a class one of them will eventually miss.
138
137
 
139
138
  The type half is the shared rule above, which both families are named in; what
140
139
  diverges is the leading. Where the box's height is a line box, a button's is
@@ -147,7 +146,8 @@
147
146
  own block: the tips foot takes the label rung, which is that surface's decision,
148
147
  not the family's. */
149
148
  :where(.qm-icon-btn),
150
- :where(.qm-add-affordance) {
149
+ :where(.qm-add-affordance),
150
+ :where(.qm-chip) {
151
151
  line-height: 1;
152
152
  box-sizing: border-box;
153
153
  min-width: var(--_qm-tap-min);
@@ -159,17 +159,19 @@
159
159
  transition: background-color var(--_qm-duration-fast) var(--_qm-ease-reverse);
160
160
  }
161
161
  :where(.qm-icon-btn:hover:not(:disabled)),
162
- :where(.qm-add-affordance:hover:not(:disabled)) {
162
+ :where(.qm-add-affordance:hover:not(:disabled)),
163
+ :where(.qm-chip:hover:not(:disabled)) {
163
164
  background: var(--_qm-surface-hover);
164
165
  }
165
166
  :where(.qm-icon-btn:disabled),
166
- :where(.qm-add-affordance:disabled) {
167
+ :where(.qm-add-affordance:disabled),
168
+ :where(.qm-chip:disabled) {
167
169
  opacity: var(--_qm-opacity-idle);
168
170
  cursor: default;
169
171
  }
170
172
 
171
- /* A glyph button: card reorder/delete, array remove, the field label's guidance
172
- marker, the tips card's foot. */
173
+ /* A glyph riding another plane: the array remove (a slab of the well), the field
174
+ label's guidance marker, the tips card's foot. A named pressable is a chip. */
173
175
  :where(.qm-icon-btn) {
174
176
  display: inline-flex;
175
177
  align-items: center;
@@ -178,21 +180,54 @@
178
180
  padding: var(--_qm-space-half) var(--_qm-space);
179
181
  }
180
182
 
181
- /* An add affordance: the between-card trigger and the array foot's. A pill rather
182
- than the inner radius, because it fills on hover instead of tinting ink: both rest
183
- unfilled on `--_qm-opacity-idle`, so a hover shifting ink alone would have little
184
- to shift. The recede ladder itself stays with each caller: it is driven by their
185
- own hover/focus state. */
183
+ /* An add strip: the between-card trigger. A pill rather than the inner radius,
184
+ because it fills on hover instead of tinting ink: it rests unfilled on
185
+ `--_qm-opacity-idle`, so a hover shifting ink alone would have little to shift.
186
+ The recede ladder itself stays with the caller: it is driven by the strip's own
187
+ hover/focus state. The array's add is a chip. */
186
188
  :where(.qm-add-affordance) {
187
189
  border-radius: var(--_qm-radius-pill);
188
- color: var(--_qm-ink-label);
189
190
  transition:
190
191
  opacity var(--_qm-duration-fast) var(--_qm-ease-reverse),
191
192
  background-color var(--_qm-duration-fast) var(--_qm-ease-reverse);
192
193
  }
193
- :where(.qm-add-affordance:hover) {
194
+
195
+ /* A well spans and sinks. A chip hugs, and like every button it rests unfilled:
196
+ the fill arrives on hover. Named (a label) or unnamed (the glyph is the name) —
197
+ the array's add and the card header's reorder/delete. The card's own radius: a
198
+ chip sits on the card, where a well takes the inner because it is cut into it. A
199
+ glyph riding another plane stays `.qm-icon-btn`; a gap that is the insertion
200
+ stays `.qm-add-affordance`.
201
+
202
+ Ink is the label rung at rest and the body rung under the pointer, the same
203
+ ladder the add strip takes: a chip that sat at `--_qm-ink` read as a written
204
+ value. */
205
+ :where(.qm-chip) {
206
+ font: inherit;
207
+ font-size: var(--_qm-text-label);
208
+ display: inline-flex;
209
+ align-items: center;
210
+ justify-content: center;
211
+ gap: var(--_qm-space);
212
+ padding: var(--_qm-space) var(--_qm-space-2);
213
+ border-radius: var(--_qm-radius);
214
+ transition:
215
+ background-color var(--_qm-duration-fast) var(--_qm-ease-reverse),
216
+ color var(--_qm-duration-fast) var(--_qm-ease-reverse);
217
+ }
218
+ :where(.qm-add-affordance),
219
+ :where(.qm-chip) {
220
+ color: var(--_qm-ink-label);
221
+ }
222
+ :where(.qm-add-affordance:hover),
223
+ :where(.qm-chip:hover) {
194
224
  color: var(--_qm-ink);
195
225
  }
226
+ :where(.qm-chip svg) {
227
+ flex-shrink: 0;
228
+ width: var(--_qm-glyph-control);
229
+ height: var(--_qm-glyph-control);
230
+ }
196
231
 
197
232
  /* The press floor, for a trigger standing in a line of text or a band of gutter
198
233
  rather than in a row of its own, whose drawn box is therefore smaller than the target
@@ -203,8 +238,8 @@
203
238
  construction: a pseudo-element has no node.
204
239
 
205
240
  The family's floor comes off in the same rule, carrying this class being what giving
206
- it up means. It sits after both families for that: same specificity, so source order
207
- decides. */
241
+ it up means. It sits after the unboxed recipes for that: same specificity, so source
242
+ order decides. */
208
243
  :where(.qm-tap-floor) {
209
244
  position: relative;
210
245
  min-width: 0;
@@ -19,9 +19,8 @@ import type { Document, CardAddr } from '@quillmark/wasm';
19
19
  * **A namespace emptied of keys is removed, not stored empty.** That is
20
20
  * `removeExtNamespace`'s one correct use: it takes the whole namespace, and there is
21
21
  * nothing left in this one to lose. `$ext` goes with it when `editor` was the last
22
- * namespace. A stored `{}` survives the model but not the emit, where an empty
23
- * mapping omits its own key and leaves a bare `$ext:` that reads back as null and
24
- * fails the next parse. A patch dropping keys the namespace does not have writes
22
+ * namespace, so a document nothing has renamed or hinted carries no editor slot
23
+ * rather than an empty one. A patch dropping keys the namespace does not have writes
25
24
  * nothing, so dismissing tips on a document that carries none is not a mutation.
26
25
  */
27
26
  export declare function patchEditorExt(doc: Document, addr: CardAddr, patch: Record<string, unknown>): void;
@@ -18,9 +18,8 @@
18
18
  * **A namespace emptied of keys is removed, not stored empty.** That is
19
19
  * `removeExtNamespace`'s one correct use: it takes the whole namespace, and there is
20
20
  * nothing left in this one to lose. `$ext` goes with it when `editor` was the last
21
- * namespace. A stored `{}` survives the model but not the emit, where an empty
22
- * mapping omits its own key and leaves a bare `$ext:` that reads back as null and
23
- * fails the next parse. A patch dropping keys the namespace does not have writes
21
+ * namespace, so a document nothing has renamed or hinted carries no editor slot
22
+ * rather than an empty one. A patch dropping keys the namespace does not have writes
24
23
  * nothing, so dismissing tips on a document that carries none is not a mutation.
25
24
  */
26
25
  export function patchEditorExt(doc, addr, patch) {
@@ -9,9 +9,8 @@
9
9
 
10
10
  interface Props extends Omit<SVGAttributes<SVGSVGElement>, 'name'> {
11
11
  name: IconName;
12
- /** The frame's edge, in px. The card controls pass none and take the default,
13
- * then size the glyph from `--_qm-glyph-control` in CSS, where the header's
14
- * right hang is measured against the same number. */
12
+ /** The frame's edge, in px. A chip sizes the glyph from `--_qm-glyph-control`
13
+ * in CSS, which beats this attribute; callers that are not chips pass a size. */
15
14
  size?: number;
16
15
  }
17
16
  let { name, size = 24, ...rest }: Props = $props();
@@ -2,9 +2,8 @@ import { type IconName } from './nodes.js';
2
2
  import type { SVGAttributes } from 'svelte/elements';
3
3
  interface Props extends Omit<SVGAttributes<SVGSVGElement>, 'name'> {
4
4
  name: IconName;
5
- /** The frame's edge, in px. The card controls pass none and take the default,
6
- * then size the glyph from `--_qm-glyph-control` in CSS, where the header's
7
- * right hang is measured against the same number. */
5
+ /** The frame's edge, in px. A chip sizes the glyph from `--_qm-glyph-control`
6
+ * in CSS, which beats this attribute; callers that are not chips pass a size. */
8
7
  size?: number;
9
8
  }
10
9
  declare const Icon: import("svelte").Component<Props, {}, "">;
@@ -15,7 +15,7 @@ export interface VisualStrings extends TableChromeStrings, SlashStrings {
15
15
  /** The card-title input's accessible name. */
16
16
  cardTitle: string;
17
17
  /** The trailing strip's visible words, which are also every strip's accessible
18
- * name; the glyph rides the wording, as the array foot's does. One string over
18
+ * name; the plus rides the wording. 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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quillmark/svelte",
3
- "version": "0.7.3",
3
+ "version": "0.9.0",
4
4
  "description": "Editor, live-preview and source surfaces over a Quillmark WASM session.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -66,7 +66,7 @@
66
66
  "check": "svelte-check --tsconfig ./tsconfig.json"
67
67
  },
68
68
  "peerDependencies": {
69
- "@quillmark/wasm": ">=0.108.1-0",
69
+ "@quillmark/wasm": ">=0.109.0-0",
70
70
  "svelte": "^5.0.0"
71
71
  },
72
72
  "dependencies": {