@formicoidea/labre-core 0.59.0 → 0.61.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 (72) hide show
  1. package/architecture/code.c4 +111 -104
  2. package/architecture/domain.c4 +4 -4
  3. package/dist/_pkgs/affine-block-attachment/asset-picker.d.ts +8 -0
  4. package/dist/_pkgs/affine-block-attachment/asset-picker.js +25 -1
  5. package/dist/_pkgs/affine-block-attachment/attachment-block.js +9 -7
  6. package/dist/_pkgs/affine-block-database/database-block.js +4 -5
  7. package/dist/_pkgs/affine-block-database/service/index.d.ts +1 -0
  8. package/dist/_pkgs/affine-block-database/service/index.js +1 -0
  9. package/dist/_pkgs/affine-block-database/service/initial-view.d.ts +33 -0
  10. package/dist/_pkgs/affine-block-database/service/initial-view.js +20 -0
  11. package/dist/_pkgs/affine-block-database/utils/current-view.d.ts +7 -0
  12. package/dist/_pkgs/affine-block-database/utils/current-view.js +14 -0
  13. package/dist/_pkgs/affine-block-embed/common/render-linked-doc.js +2 -0
  14. package/dist/_pkgs/affine-block-embed-doc/common/child-card.d.ts +25 -0
  15. package/dist/_pkgs/affine-block-embed-doc/common/child-card.js +27 -0
  16. package/dist/_pkgs/affine-block-embed-doc/embed-linked-doc-block/commands/insert-embed-linked-doc.js +6 -1
  17. package/dist/_pkgs/affine-block-embed-doc/embed-linked-doc-block/configs/new-doc.js +2 -2
  18. package/dist/_pkgs/affine-block-embed-doc/embed-linked-doc-block/embed-linked-doc-block.js +2 -6
  19. package/dist/_pkgs/affine-block-embed-doc/embed-synced-doc-block/embed-synced-doc-block.js +2 -3
  20. package/dist/_pkgs/affine-block-embed-doc/page-drop/page-drop.js +3 -3
  21. package/dist/_pkgs/affine-block-surface/extensions/index.d.ts +1 -0
  22. package/dist/_pkgs/affine-block-surface/extensions/index.js +1 -0
  23. package/dist/_pkgs/affine-block-surface/extensions/legend-label.d.ts +11 -0
  24. package/dist/_pkgs/affine-block-surface/extensions/legend-label.js +16 -0
  25. package/dist/_pkgs/affine-block-surface/extensions/legend.d.ts +1 -11
  26. package/dist/_pkgs/affine-block-surface/extensions/legend.js +2 -11
  27. package/dist/_pkgs/affine-block-surface/extensions/toolbox.d.ts +62 -0
  28. package/dist/_pkgs/affine-block-surface/extensions/toolbox.js +1 -0
  29. package/dist/_pkgs/affine-block-surface/interchange-headless.d.ts +2 -0
  30. package/dist/_pkgs/affine-block-surface/interchange-headless.js +2 -0
  31. package/dist/_pkgs/affine-components/icons/loading.d.ts +6 -0
  32. package/dist/_pkgs/affine-components/icons/loading.js +16 -12
  33. package/dist/_pkgs/affine-fragment-doc-title/title-band/show-here.js +2 -2
  34. package/dist/_pkgs/affine-fragment-doc-title/title-band/title-band.d.ts +8 -0
  35. package/dist/_pkgs/affine-fragment-doc-title/title-band/title-band.js +35 -13
  36. package/dist/_pkgs/affine-fragment-doc-title/translations.d.ts +1 -1
  37. package/dist/_pkgs/affine-fragment-doc-title/translations.js +1 -1
  38. package/dist/_pkgs/affine-gfx-mindmap/toolbar/basket-elements.d.ts +12 -0
  39. package/dist/_pkgs/affine-gfx-mindmap/toolbar/basket-elements.js +44 -5
  40. package/dist/_pkgs/affine-gfx-mindmap/toolbar/senior-tool.d.ts +3 -2
  41. package/dist/_pkgs/affine-gfx-mindmap/toolbar/senior-tool.js +3 -2
  42. package/dist/_pkgs/affine-gfx-template/builtin/slides/build.js +10 -10
  43. package/dist/_pkgs/affine-gfx-template/builtin/slides/consts.d.ts +48 -64
  44. package/dist/_pkgs/affine-gfx-template/builtin/slides/consts.js +24 -21
  45. package/dist/_pkgs/affine-gfx-template/builtin/slides/masks.d.ts +1 -2
  46. package/dist/_pkgs/affine-gfx-template/builtin/slides/masks.js +0 -34
  47. package/dist/_pkgs/affine-inline-reference/reference-node/configs/toolbar.js +2 -1
  48. package/dist/_pkgs/affine-model/elements/c4/board.d.ts +0 -22
  49. package/dist/_pkgs/affine-model/elements/c4/board.js +1 -22
  50. package/dist/_pkgs/affine-model/elements/c4/consts.d.ts +29 -0
  51. package/dist/_pkgs/affine-model/elements/c4/consts.js +29 -0
  52. package/dist/_pkgs/affine-model/elements/c4/index.d.ts +1 -0
  53. package/dist/_pkgs/affine-model/elements/c4/index.js +1 -0
  54. package/dist/_pkgs/affine-model/headless.d.ts +1 -0
  55. package/dist/_pkgs/affine-model/headless.js +1 -0
  56. package/dist/_pkgs/affine-shared/consts/index.d.ts +9 -0
  57. package/dist/_pkgs/affine-shared/consts/index.js +9 -0
  58. package/dist/_pkgs/affine-shared/services/asset-picker-service.d.ts +7 -6
  59. package/dist/_pkgs/affine-shared/services/asset-picker-service.js +5 -5
  60. package/dist/_pkgs/affine-shared/services/title-band-service.d.ts +19 -0
  61. package/dist/_pkgs/data-view/core/component/cell-status/cell-status-css.d.ts +1 -1
  62. package/dist/_pkgs/data-view/core/component/cell-status/cell-status-css.js +10 -10
  63. package/dist/_pkgs/data-view/core/component/cell-status/cell-status.d.ts +1 -1
  64. package/dist/_pkgs/data-view/core/component/cell-status/cell-status.js +7 -5
  65. package/dist/_pkgs/data-view/property-presets/number/cell-renderer.d.ts +18 -0
  66. package/dist/_pkgs/data-view/property-presets/number/cell-renderer.js +51 -10
  67. package/dist/_pkgs/data-view/property-presets/text/cell-renderer.d.ts +23 -1
  68. package/dist/_pkgs/data-view/property-presets/text/cell-renderer.js +56 -15
  69. package/dist/_pkgs/data-view/property-presets/typing-commit.d.ts +16 -0
  70. package/dist/_pkgs/data-view/property-presets/typing-commit.js +27 -0
  71. package/dist/_pkgs/data-view/view-presets/list/list-view.js +1 -1
  72. package/package.json +1 -1
@@ -53,7 +53,6 @@ const cover = {
53
53
  id: 'cover',
54
54
  name: SLIDE_NAME_COVER,
55
55
  keywords: ['cover', 'title', 'opening', 'first slide', 'pitch'],
56
- variant: 'paper',
57
56
  zones: [
58
57
  text('caption', SLIDE_SEED_EYEBROW, M, 330, CONTENT, {
59
58
  ...centred,
@@ -67,7 +66,6 @@ const coverImage = {
67
66
  id: 'cover-image',
68
67
  name: SLIDE_NAME_COVER_IMAGE,
69
68
  keywords: ['cover', 'title', 'tagline', 'picture', 'photo', 'hero'],
70
- variant: 'paper',
71
69
  zones: [
72
70
  text('display', SLIDE_SEED_COVER_TITLE, M, 330, 620, { lines: 2 }),
73
71
  text('body', SLIDE_SEED_SUBTITLE, M, 500, 620, { lines: 2, ...muted }),
@@ -78,7 +76,6 @@ const section = {
78
76
  id: 'section',
79
77
  name: SLIDE_NAME_SECTION,
80
78
  keywords: ['section', 'divider', 'chapter', 'break', 'part'],
81
- variant: 'inverse',
82
79
  zones: [
83
80
  text('display', SLIDE_SEED_SECTION_TITLE, M, 600, CONTENT),
84
81
  text('body', SLIDE_SEED_SECTION_SUBTITLE, M, 690, CONTENT, muted),
@@ -88,7 +85,6 @@ const statement = {
88
85
  id: 'statement',
89
86
  name: SLIDE_NAME_STATEMENT,
90
87
  keywords: ['statement', 'big idea', 'headline', 'message', 'claim'],
91
- variant: 'inverse',
92
88
  zones: [
93
89
  text('caption', SLIDE_SEED_SUBTITLE, M, 300, CONTENT, muted),
94
90
  text('display', SLIDE_SEED_STATEMENT, M, 340, 1100, { lines: 3 }),
@@ -98,7 +94,6 @@ const agenda = {
98
94
  id: 'agenda',
99
95
  name: SLIDE_NAME_AGENDA,
100
96
  keywords: ['agenda', 'contents', 'outline', 'summary', 'plan'],
101
- variant: 'paper',
102
97
  zones: [
103
98
  title(SLIDE_SEED_AGENDA_TITLE),
104
99
  ...[0, 1, 2, 3, 4].flatMap(i => {
@@ -115,7 +110,6 @@ const textImage = {
115
110
  id: 'text-image',
116
111
  name: SLIDE_NAME_TEXT_IMAGE,
117
112
  keywords: ['text', 'picture', 'photo', 'split', 'describe', 'half'],
118
- variant: 'paper',
119
113
  zones: [
120
114
  title(SLIDE_SEED_TITLE, { w: 720 }),
121
115
  text('heading', SLIDE_SEED_HEADING, M, 240, 720, muted),
@@ -129,7 +123,6 @@ const fullImage = {
129
123
  id: 'full-image',
130
124
  name: SLIDE_NAME_FULL_IMAGE,
131
125
  keywords: ['picture', 'photo', 'screenshot', 'visual', 'caption'],
132
- variant: 'paper',
133
126
  zones: [
134
127
  title(),
135
128
  image(M, 160, CONTENT, 600),
@@ -143,7 +136,6 @@ const twoColumns = {
143
136
  id: 'two-columns',
144
137
  name: SLIDE_NAME_TWO_COLUMNS,
145
138
  keywords: ['columns', 'compare', 'versus', 'before after', 'pros cons'],
146
- variant: 'paper',
147
139
  zones: [
148
140
  title(),
149
141
  ...columns(2).flatMap(({ x, w }) => [
@@ -156,7 +148,6 @@ const threeColumns = {
156
148
  id: 'three-columns',
157
149
  name: SLIDE_NAME_THREE_COLUMNS,
158
150
  keywords: ['columns', 'three points', 'pillars', 'ideas', 'list'],
159
- variant: 'paper',
160
151
  zones: [
161
152
  title(),
162
153
  ...columns(3).flatMap(({ x, w }, i) => [
@@ -170,7 +161,6 @@ const sixPoints = {
170
161
  id: 'six-points',
171
162
  name: SLIDE_NAME_SIX_POINTS,
172
163
  keywords: ['grid', 'points', 'features', 'benefits', 'list'],
173
- variant: 'paper',
174
164
  zones: [
175
165
  title(),
176
166
  ...[240, 530].flatMap(y => columns(3).flatMap(({ x, w }) => [
@@ -183,7 +173,6 @@ const imageCards = {
183
173
  id: 'image-cards',
184
174
  name: SLIDE_NAME_IMAGE_CARDS,
185
175
  keywords: ['cards', 'pictures', 'gallery', 'products', 'features'],
186
- variant: 'paper',
187
176
  zones: [
188
177
  title(),
189
178
  ...columns(3).flatMap(({ x, w }) => [
@@ -197,7 +186,6 @@ const keyFigures = {
197
186
  id: 'key-figures',
198
187
  name: SLIDE_NAME_KEY_FIGURES,
199
188
  keywords: ['metrics', 'kpi', 'numbers', 'statistics', 'data', 'results'],
200
- variant: 'paper',
201
189
  zones: [
202
190
  title(),
203
191
  ...columns(3).flatMap(({ x, w }) => [
@@ -211,7 +199,6 @@ const timeline = {
211
199
  id: 'timeline',
212
200
  name: SLIDE_NAME_TIMELINE,
213
201
  keywords: ['timeline', 'milestones', 'history', 'schedule', 'dates'],
214
- variant: 'paper',
215
202
  zones: [
216
203
  title(),
217
204
  line([M, 470], [M + CONTENT, 470]),
@@ -235,7 +222,6 @@ const roadmap = {
235
222
  id: 'roadmap',
236
223
  name: SLIDE_NAME_ROADMAP,
237
224
  keywords: ['roadmap', 'plan', 'quarters', 'gantt', 'milestones'],
238
- variant: 'paper',
239
225
  zones: [
240
226
  title(),
241
227
  ...columns(4, 0).flatMap(({ x, w }, i) => [
@@ -258,7 +244,6 @@ const process = {
258
244
  id: 'process',
259
245
  name: SLIDE_NAME_PROCESS,
260
246
  keywords: ['process', 'steps', 'flow', 'workflow', 'how it works'],
261
- variant: 'paper',
262
247
  zones: [
263
248
  title(),
264
249
  ...columns(5, 57).flatMap(({ x, w }, i, all) => [
@@ -289,7 +274,6 @@ const matrix = {
289
274
  'prioritization',
290
275
  'value effort',
291
276
  ],
292
- variant: 'paper',
293
277
  zones: [
294
278
  title(),
295
279
  line([260, 780], [260, 210], true),
@@ -310,7 +294,6 @@ const venn = {
310
294
  id: 'venn',
311
295
  name: SLIDE_NAME_VENN,
312
296
  keywords: ['venn', 'overlap', 'intersection', 'circles', 'sweet spot'],
313
- variant: 'paper',
314
297
  zones: [
315
298
  title(),
316
299
  card(400, 200, 520, 520, { shape: 'ellipse', stroke: 'muted' }),
@@ -328,7 +311,6 @@ const marketSize = {
328
311
  id: 'market-size',
329
312
  name: SLIDE_NAME_MARKET_SIZE,
330
313
  keywords: ['market', 'tam sam som', 'opportunity', 'sizing', 'circles'],
331
- variant: 'paper',
332
314
  zones: [
333
315
  title(),
334
316
  ...[
@@ -368,7 +350,6 @@ const orgChart = {
368
350
  'reporting',
369
351
  'structure',
370
352
  ],
371
- variant: 'paper',
372
353
  zones: [
373
354
  title(),
374
355
  ...person(650, 220),
@@ -384,7 +365,6 @@ const pricing = {
384
365
  id: 'pricing',
385
366
  name: SLIDE_NAME_PRICING,
386
367
  keywords: ['pricing', 'plans', 'tiers', 'offer', 'packages'],
387
- variant: 'paper',
388
368
  zones: [
389
369
  title(SLIDE_SEED_TITLE, centred),
390
370
  ...columns(3).flatMap(({ x, w }) => [
@@ -400,7 +380,6 @@ const logoWall = {
400
380
  id: 'logo-wall',
401
381
  name: SLIDE_NAME_LOGO_WALL,
402
382
  keywords: ['logos', 'clients', 'partners', 'customers', 'trusted by'],
403
- variant: 'paper',
404
383
  zones: [
405
384
  title(SLIDE_SEED_TITLE, centred),
406
385
  ...[300, 480].flatMap(y => columns(5, 52).map(({ x, w }) => image(x, y, w, 120, { label: SLIDE_SEED_LOGO }))),
@@ -410,7 +389,6 @@ const quote = {
410
389
  id: 'quote',
411
390
  name: SLIDE_NAME_QUOTE,
412
391
  keywords: ['quote', 'citation', 'testimonial', 'voice', 'customer'],
413
- variant: 'inverse',
414
392
  zones: [
415
393
  text('title', SLIDE_SEED_QUOTE, 200, 300, 1200, { lines: 3, ...centred }),
416
394
  text('body', SLIDE_SEED_QUOTE_AUTHOR, 200, 520, 1200, {
@@ -423,7 +401,6 @@ const testimonials = {
423
401
  id: 'testimonials',
424
402
  name: SLIDE_NAME_TESTIMONIALS,
425
403
  keywords: ['testimonials', 'quotes', 'reviews', 'customers', 'clients'],
426
- variant: 'paper',
427
404
  zones: [
428
405
  title(SLIDE_SEED_TESTIMONIALS_TITLE, centred),
429
406
  ...columns(3).flatMap(({ x, w }) => [
@@ -440,7 +417,6 @@ const team = {
440
417
  id: 'team',
441
418
  name: SLIDE_NAME_TEAM,
442
419
  keywords: ['team', 'people', 'staff', 'leadership', 'about us'],
443
- variant: 'paper',
444
420
  zones: [
445
421
  title(SLIDE_SEED_TEAM_TITLE, centred),
446
422
  ...columns(4).flatMap(({ x, w }) => [
@@ -454,7 +430,6 @@ const contact = {
454
430
  id: 'contact',
455
431
  name: SLIDE_NAME_CONTACT,
456
432
  keywords: ['contact', 'address', 'email', 'phone', 'closing', 'thank you'],
457
- variant: 'paper',
458
433
  zones: [
459
434
  image(0, 0, 640, SLIDE_HEIGHT),
460
435
  text('title', SLIDE_SEED_CONTACT_TITLE, 736, TITLE_Y, 768),
@@ -503,7 +478,6 @@ const gantt = {
503
478
  id: 'gantt',
504
479
  name: SLIDE_NAME_GANTT,
505
480
  keywords: ['gantt', 'plan', 'schedule', 'tasks', 'months', 'timeline'],
506
- variant: 'paper',
507
481
  zones: [
508
482
  title(),
509
483
  ...columns(6, 0).flatMap(({ x, w }, i) => [
@@ -521,7 +495,6 @@ const chartText = {
521
495
  id: 'chart-text',
522
496
  name: SLIDE_NAME_CHART_TEXT,
523
497
  keywords: ['chart', 'graph', 'data', 'figures', 'explain', 'bar', 'line'],
524
- variant: 'paper',
525
498
  zones: [
526
499
  title(SLIDE_SEED_TITLE, { w: 760 }),
527
500
  text('body', SLIDE_SEED_BODY, M, 680, 700, { lines: 3, ...muted }),
@@ -532,7 +505,6 @@ const threeCharts = {
532
505
  id: 'three-charts',
533
506
  name: SLIDE_NAME_THREE_CHARTS,
534
507
  keywords: ['charts', 'graphs', 'pie', 'donut', 'compare', 'data'],
535
- variant: 'paper',
536
508
  zones: [
537
509
  title(SLIDE_SEED_TITLE, centred),
538
510
  ...columns(3).flatMap(({ x, w }) => [
@@ -549,7 +521,6 @@ const collage = {
549
521
  id: 'collage',
550
522
  name: SLIDE_NAME_COLLAGE,
551
523
  keywords: ['collage', 'photos', 'pictures', 'gallery', 'text', 'mosaic'],
552
- variant: 'paper',
553
524
  zones: [
554
525
  title(SLIDE_SEED_TITLE, { w: 560 }),
555
526
  text('body', SLIDE_SEED_BODY, M, 640, 560, { lines: 4, ...muted }),
@@ -562,7 +533,6 @@ const bento = {
562
533
  id: 'bento',
563
534
  name: SLIDE_NAME_BENTO,
564
535
  keywords: ['bento', 'photos', 'pictures', 'collage', 'mosaic', 'gallery'],
565
- variant: 'paper',
566
536
  zones: [
567
537
  image(M, 80, 940, 350),
568
538
  image(1076, 80, 428, 350),
@@ -574,7 +544,6 @@ const imageGrid = {
574
544
  id: 'image-grid',
575
545
  name: SLIDE_NAME_IMAGE_GRID,
576
546
  keywords: ['grid', 'photos', 'pictures', 'gallery', 'six', 'mosaic'],
577
- variant: 'paper',
578
547
  zones: [80, 470].flatMap(y => columns(3, 40).map(({ x, w }) => image(x, y, w, 350))),
579
548
  };
580
549
  /** A key-figure card: the number, then what it measures. */
@@ -604,7 +573,6 @@ const featureBento = {
604
573
  id: 'feature-bento',
605
574
  name: SLIDE_NAME_FEATURE_BENTO,
606
575
  keywords: ['bento', 'features', 'metrics', 'kpi', 'product', 'highlights'],
607
- variant: 'paper',
608
576
  zones: [
609
577
  ...featureCard(M, 80, 520, 500),
610
578
  ...figureCard(660, 80, 844, 190),
@@ -617,7 +585,6 @@ const phone = {
617
585
  id: 'phone',
618
586
  name: SLIDE_NAME_PHONE,
619
587
  keywords: ['phone', 'mobile', 'mockup', 'app', 'device', 'screen'],
620
- variant: 'paper',
621
588
  zones: [
622
589
  title(SLIDE_SEED_TITLE, { w: 760 }),
623
590
  text('body', SLIDE_SEED_BODY, M, 700, 760, { lines: 2, ...muted }),
@@ -628,7 +595,6 @@ const tablet = {
628
595
  id: 'tablet',
629
596
  name: SLIDE_NAME_TABLET,
630
597
  keywords: ['tablet', 'mockup', 'app', 'device', 'screen', 'laptop'],
631
- variant: 'paper',
632
598
  zones: [
633
599
  title(SLIDE_SEED_TITLE, { w: 700 }),
634
600
  text('body', SLIDE_SEED_BODY, M, 680, 700, { lines: 3, ...muted }),
@@ -1,4 +1,5 @@
1
1
  import { notifyLinkedDocSwitchedToEmbed } from '../../../affine-components/notification/index.js';
2
+ import { LINKED_DOC_NOTE_STYLE } from '../../../affine-shared/consts/index.js';
2
3
  import { ActionPlacement, DocDisplayMetaProvider, TOOLBAR_CARD_VIEW, TOOLBAR_DELETE, TOOLBAR_EMBED_VIEW, TOOLBAR_INLINE_VIEW, toolbarActionLabel, translateKey, UNTITLED_DOC_LABEL, } from '../../../affine-shared/services/index.js';
3
4
  import { cloneReferenceInfoWithoutAliases, isInsideBlockByFlavour, } from '../../../affine-shared/utils/index.js';
4
5
  import { DeleteIcon } from '@blocksuite/icons/lit';
@@ -57,7 +58,7 @@ export const builtinInlineReferenceToolbarConfig = {
57
58
  // Clears
58
59
  ctx.reset();
59
60
  const index = parent.children.indexOf(model);
60
- const blockId = ctx.store.addBlock('affine:embed-linked-doc', referenceInfo, parent, index + 1);
61
+ const blockId = ctx.store.addBlock('affine:embed-linked-doc', { ...referenceInfo, style: LINKED_DOC_NOTE_STYLE }, parent, index + 1);
61
62
  const totalTextLength = inlineEditor.yTextLength;
62
63
  const inlineTextLength = selfInlineRange.length;
63
64
  if (totalTextLength === inlineTextLength) {
@@ -2,28 +2,6 @@ import type { SerializedXYWH } from '../../../global/gfx/index.js';
2
2
  import type { PointTestOptions } from '../../../std/gfx/index.js';
3
3
  import type { FrameworkBackgroundProps } from '../framework-background/index.js';
4
4
  import { FrameworkBackgroundElementModel } from '../framework-background/index.js';
5
- /**
6
- * Height of the board's title band — the header strip across the top of the
7
- * sheet the diagram title is written in, in model units.
8
- *
9
- * Declared HERE, in the model, and re-exported by `@labre/affine-gfx-c4` rather
10
- * than the other way round, for the reason `POOL_BAND_WIDTH` is: the
11
- * board's own hit test needs it (a board is clickable by its title band as well
12
- * as its border), and `affine-model` cannot reach into `affine-block-surface`
13
- * where the declaration is resolved. One number, owned by the layer that both
14
- * the declaration and the hit test can read.
15
- *
16
- * It is the board's TOP MARGIN, and it always was — the deep inset the plot
17
- * gives up so the title has somewhere to be written. Naming it says out loud
18
- * what was already true, so the strip that is painted, the strip that is picked
19
- * and the strip that opens the rename are one number rather than three.
20
- *
21
- * 56 is what the title has been written in since the pack shipped: a 20-unit
22
- * title, sitting on a baseline a third of the band up from its foot, with the
23
- * rest as breathing room above and below. Changing it moves the title, so it is
24
- * a visual decision and not a hit-test one.
25
- */
26
- export declare const C4_BOARD_TITLE_BAND_HEIGHT = 56;
27
5
  /**
28
6
  * Which of C4's levels this board draws — the DECLARED fact, as opposed to the
29
7
  * title, which is free text and says whatever its author wants it to.
@@ -35,28 +35,7 @@ var __runInitializers = (this && this.__runInitializers) || function (thisArg, i
35
35
  import { rotatePoint } from '../../../global/gfx/index.js';
36
36
  import { field } from '../../../std/gfx/index.js';
37
37
  import { FrameworkBackgroundElementModel } from '../framework-background/index.js';
38
- /**
39
- * Height of the board's title band — the header strip across the top of the
40
- * sheet the diagram title is written in, in model units.
41
- *
42
- * Declared HERE, in the model, and re-exported by `@labre/affine-gfx-c4` rather
43
- * than the other way round, for the reason `POOL_BAND_WIDTH` is: the
44
- * board's own hit test needs it (a board is clickable by its title band as well
45
- * as its border), and `affine-model` cannot reach into `affine-block-surface`
46
- * where the declaration is resolved. One number, owned by the layer that both
47
- * the declaration and the hit test can read.
48
- *
49
- * It is the board's TOP MARGIN, and it always was — the deep inset the plot
50
- * gives up so the title has somewhere to be written. Naming it says out loud
51
- * what was already true, so the strip that is painted, the strip that is picked
52
- * and the strip that opens the rename are one number rather than three.
53
- *
54
- * 56 is what the title has been written in since the pack shipped: a 20-unit
55
- * title, sitting on a baseline a third of the band up from its foot, with the
56
- * rest as breathing room above and below. Changing it moves the title, so it is
57
- * a visual decision and not a hit-test one.
58
- */
59
- export const C4_BOARD_TITLE_BAND_HEIGHT = 56;
38
+ import { C4_BOARD_TITLE_BAND_HEIGHT } from './consts.js';
60
39
  /**
61
40
  * The C4 board: the sheet one diagram of the model is drawn on — a context
62
41
  * diagram, a container diagram, a component diagram. A framework background like
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Constants moved out of the element-class files of this folder, unchanged, so
3
+ * the model's headless entry (`@labre/affine-model/headless`) exports them
4
+ * without `@labre/std/gfx` behind them (ADR 0012, P3 as amended 2026-10-14;
5
+ * the C4 toolbox of `docs/adr/0045` reads the board's metrics from there).
6
+ * The folder index re-exports this file.
7
+ */
8
+ /**
9
+ * Height of the board's title band — the header strip across the top of the
10
+ * sheet the diagram title is written in, in model units.
11
+ *
12
+ * Declared HERE, in the model, and re-exported by `@labre/affine-gfx-c4` rather
13
+ * than the other way round, for the reason `POOL_BAND_WIDTH` is: the
14
+ * board's own hit test needs it (a board is clickable by its title band as well
15
+ * as its border), and `affine-model` cannot reach into `affine-block-surface`
16
+ * where the declaration is resolved. One number, owned by the layer that both
17
+ * the declaration and the hit test can read.
18
+ *
19
+ * It is the board's TOP MARGIN, and it always was — the deep inset the plot
20
+ * gives up so the title has somewhere to be written. Naming it says out loud
21
+ * what was already true, so the strip that is painted, the strip that is picked
22
+ * and the strip that opens the rename are one number rather than three.
23
+ *
24
+ * 56 is what the title has been written in since the pack shipped: a 20-unit
25
+ * title, sitting on a baseline a third of the band up from its foot, with the
26
+ * rest as breathing room above and below. Changing it moves the title, so it is
27
+ * a visual decision and not a hit-test one.
28
+ */
29
+ export declare const C4_BOARD_TITLE_BAND_HEIGHT = 56;
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Constants moved out of the element-class files of this folder, unchanged, so
3
+ * the model's headless entry (`@labre/affine-model/headless`) exports them
4
+ * without `@labre/std/gfx` behind them (ADR 0012, P3 as amended 2026-10-14;
5
+ * the C4 toolbox of `docs/adr/0045` reads the board's metrics from there).
6
+ * The folder index re-exports this file.
7
+ */
8
+ /**
9
+ * Height of the board's title band — the header strip across the top of the
10
+ * sheet the diagram title is written in, in model units.
11
+ *
12
+ * Declared HERE, in the model, and re-exported by `@labre/affine-gfx-c4` rather
13
+ * than the other way round, for the reason `POOL_BAND_WIDTH` is: the
14
+ * board's own hit test needs it (a board is clickable by its title band as well
15
+ * as its border), and `affine-model` cannot reach into `affine-block-surface`
16
+ * where the declaration is resolved. One number, owned by the layer that both
17
+ * the declaration and the hit test can read.
18
+ *
19
+ * It is the board's TOP MARGIN, and it always was — the deep inset the plot
20
+ * gives up so the title has somewhere to be written. Naming it says out loud
21
+ * what was already true, so the strip that is painted, the strip that is picked
22
+ * and the strip that opens the rename are one number rather than three.
23
+ *
24
+ * 56 is what the title has been written in since the pack shipped: a 20-unit
25
+ * title, sitting on a baseline a third of the band up from its foot, with the
26
+ * rest as breathing room above and below. Changing it moves the title, so it is
27
+ * a visual decision and not a hit-test one.
28
+ */
29
+ export const C4_BOARD_TITLE_BAND_HEIGHT = 56;
@@ -1,3 +1,4 @@
1
1
  export * from './board.js';
2
2
  export * from './boundary.js';
3
+ export * from './consts.js';
3
4
  export * from './node.js';
@@ -1,3 +1,4 @@
1
1
  export * from './board.js';
2
2
  export * from './boundary.js';
3
+ export * from './consts.js';
3
4
  export * from './node.js';
@@ -13,6 +13,7 @@
13
13
  */
14
14
  export * from './consts/index.js';
15
15
  export * from './elements/bpmn/consts.js';
16
+ export * from './elements/c4/consts.js';
16
17
  export * from './elements/connector/end-label.js';
17
18
  export { DEFAULT_POLYGON_VERTICES } from './elements/shape/api/polygon.js';
18
19
  export * from './elements/uml/consts.js';
@@ -13,6 +13,7 @@
13
13
  */
14
14
  export * from './consts/index.js';
15
15
  export * from './elements/bpmn/consts.js';
16
+ export * from './elements/c4/consts.js';
16
17
  export * from './elements/connector/end-label.js';
17
18
  export { DEFAULT_POLYGON_VERTICES } from './elements/shape/api/polygon.js';
18
19
  export * from './elements/uml/consts.js';
@@ -4,6 +4,15 @@ export declare const EDGELESS_BLOCK_CHILD_PADDING = 24;
4
4
  export declare const EDGELESS_BLOCK_CHILD_BORDER_WIDTH = 2;
5
5
  export declare const PAGE_HEADER_HEIGHT = 53;
6
6
  export declare const EMBED_CARD_MIN_WIDTH = 450;
7
+ /**
8
+ * The style of a page's `affine:embed-linked-doc` card the library places in
9
+ * a note when no one chose one: the one-line card ("Small horizontal style").
10
+ * Product owner, labre recette 3 P2-7b (ADR-0045 amended 2026-10-27): the
11
+ * default view of a child page's card or of a link to a page is the line. A
12
+ * creation site writes it, never the model's default (`horizontal`), which
13
+ * every stored card already carries. Canvas cards keep their own style.
14
+ */
15
+ export declare const LINKED_DOC_NOTE_STYLE = "list";
7
16
  /**
8
17
  * The smallest a thing you TAP may be, in CSS pixels.
9
18
  *
@@ -6,6 +6,15 @@ export const EDGELESS_BLOCK_CHILD_BORDER_WIDTH = 2;
6
6
  // In AFFiNE, to avoid the option element to be covered by the header, we need to reserve the space for the header
7
7
  export const PAGE_HEADER_HEIGHT = 53;
8
8
  export const EMBED_CARD_MIN_WIDTH = 450;
9
+ /**
10
+ * The style of a page's `affine:embed-linked-doc` card the library places in
11
+ * a note when no one chose one: the one-line card ("Small horizontal style").
12
+ * Product owner, labre recette 3 P2-7b (ADR-0045 amended 2026-10-27): the
13
+ * default view of a child page's card or of a link to a page is the line. A
14
+ * creation site writes it, never the model's default (`horizontal`), which
15
+ * every stored card already carries. Canvas cards keep their own style.
16
+ */
17
+ export const LINKED_DOC_NOTE_STYLE = 'list';
9
18
  /**
10
19
  * The smallest a thing you TAP may be, in CSS pixels.
11
20
  *
@@ -24,7 +24,8 @@ export interface AssetRef {
24
24
  *
25
25
  * - `kind`: `image` for an image block, `file` for an attachment card.
26
26
  * - `mode`: `insert` adds new blocks; `replace` swaps the picture of one
27
- * existing image (one ref is used, the first).
27
+ * existing image, or the file of one attachment card (one ref is used, the
28
+ * first).
28
29
  * - `multiple`: whether more than one ref is welcome (the image insertions).
29
30
  * - `docId`: the document the result lands in, so the host can attach the
30
31
  * asset to that page (a guest of the page must be able to read it).
@@ -51,11 +52,11 @@ export interface AssetPickerService {
51
52
  export declare const AssetPickerProvider: import("../../global/di/types.js").ServiceIdentifier<AssetPickerService> & (<U extends AssetPickerService = AssetPickerService>(variant: import("../../global/di/types.js").ServiceVariant) => import("../../global/di/types.js").ServiceIdentifier<U>);
52
53
  /**
53
54
  * Host seam: the asset dialog. Present, the slash menu's Image, Attachment
54
- * and PDF, the mobile keyboard toolbar's Image and Attachment, and the
55
- * canvas's image and file buttons open it, and the image toolbar gains
56
- * "Replace". Absent, every one of those opens the system file chooser as
57
- * before, and there is no "Replace". Pasting and dropping files never go
58
- * through it.
55
+ * and PDF, the mobile keyboard toolbar's Image and Attachment, the canvas's
56
+ * image and file buttons and its "Add file" tool, and the attachment card's
57
+ * "Replace" open it, and the image toolbar gains "Replace". Absent, every
58
+ * one of those opens the system file chooser as before, and the image
59
+ * toolbar has no "Replace". Pasting and dropping files never go through it.
59
60
  *
60
61
  * `di.override`, like `FrameTemplateExtension`, so a later registration
61
62
  * always wins and registering twice never throws at boot.
@@ -2,11 +2,11 @@ import { createIdentifier } from '../../global/di/index.js';
2
2
  export const AssetPickerProvider = createIdentifier('AffineAssetPicker');
3
3
  /**
4
4
  * Host seam: the asset dialog. Present, the slash menu's Image, Attachment
5
- * and PDF, the mobile keyboard toolbar's Image and Attachment, and the
6
- * canvas's image and file buttons open it, and the image toolbar gains
7
- * "Replace". Absent, every one of those opens the system file chooser as
8
- * before, and there is no "Replace". Pasting and dropping files never go
9
- * through it.
5
+ * and PDF, the mobile keyboard toolbar's Image and Attachment, the canvas's
6
+ * image and file buttons and its "Add file" tool, and the attachment card's
7
+ * "Replace" open it, and the image toolbar gains "Replace". Absent, every
8
+ * one of those opens the system file chooser as before, and the image
9
+ * toolbar has no "Replace". Pasting and dropping files never go through it.
10
10
  *
11
11
  * `di.override`, like `FrameTemplateExtension`, so a later registration
12
12
  * always wins and registering twice never throws at boot.
@@ -119,6 +119,15 @@ export interface TitleBandService {
119
119
  * on a row). Absent, there is no "+".
120
120
  */
121
121
  add?(docId: string): void;
122
+ /**
123
+ * Configure one property (recette 3, 0.61): a right-click on a chip's name
124
+ * asks the host to open the menu its own panel opens for that property
125
+ * (name, type, options, visibility, order, delete), under `anchor`, the
126
+ * name the reader clicked. The band then keeps the browser's menu from
127
+ * showing. Not on a read-only document, nor for a touch long-press, which
128
+ * stays the browser's. Absent, a right-click on a name is the browser's.
129
+ */
130
+ configure?(docId: string, propertyId: string, anchor: HTMLElement): void;
122
131
  /**
123
132
  * Whether the band is collapsed for this document. The host decides where
124
133
  * that is remembered (the Labre app: per device, REQ-PR-6). Absent, the
@@ -138,6 +147,16 @@ export interface TitleBandService {
138
147
  * the host's reading of the document. Absent or empty, no row.
139
148
  */
140
149
  notShown$?(docId: string): ReadonlySignal<readonly TitleBandNotShownPage[]>;
150
+ /**
151
+ * The ids of the child pages of document `docId` in the host's page tree
152
+ * (labre ADR-0045, amended 2026-10-27). A linked-doc card or a synced-doc
153
+ * embed of one of them, in that document, is the child's own card: it is
154
+ * drawn with the plain page (or canvas) icon, without the link arrow an
155
+ * inline `@` reference keeps. Read inside the card's icon computation, so
156
+ * a move redraws it. The library never computes a parent or a child.
157
+ * Absent, every card keeps the arrow (0.59).
158
+ */
159
+ children$?(docId: string): ReadonlySignal<readonly string[]>;
141
160
  }
142
161
  export declare const TitleBandProvider: import("../../global/di/types.js").ServiceIdentifier<TitleBandService> & (<U extends TitleBandService = TitleBandService>(variant: import("../../global/di/types.js").ServiceVariant) => import("../../global/di/types.js").ServiceIdentifier<U>);
143
162
  /**
@@ -1,2 +1,2 @@
1
- export declare const cellSkeletonStyle: string;
1
+ export declare const cellLoadingStyle: string;
2
2
  export declare const cellEmptyStyle: string;
@@ -1,14 +1,14 @@
1
1
  import { css } from '@emotion/css';
2
- // The title band's loading chip, in a cell (`labre-title-band-skeleton`):
3
- // same hover tone, same radius, no motion to honour or disable.
4
- export const cellSkeletonStyle = css({
5
- display: 'block',
6
- width: '60%',
7
- maxWidth: '120px',
8
- height: '16px',
9
- margin: '8px',
10
- borderRadius: '6px',
11
- backgroundColor: 'var(--affine-hover-color)',
2
+ // A cell whose value is on its way: a spinner centred in the cell, the
3
+ // height of a drawn one, never a skeleton (recette 3; the host's rule,
4
+ // ADR-0057 on the Labre side).
5
+ export const cellLoadingStyle = css({
6
+ display: 'flex',
7
+ alignItems: 'center',
8
+ justifyContent: 'center',
9
+ width: '100%',
10
+ minHeight: '32px',
11
+ fontSize: '16px',
12
12
  });
13
13
  export const cellEmptyStyle = css({
14
14
  display: 'block',
@@ -2,7 +2,7 @@ import { type TemplateResult } from 'lit';
2
2
  import type { Cell } from '../../view-manager/cell.js';
3
3
  /**
4
4
  * What a cell container draws INSTEAD of its renderer while the cell is not
5
- * `ready` (ADR 0035 §9e): a skeleton while `pending`, an empty cell on
5
+ * `ready` (ADR 0035 §9e): a spinner while `pending`, an empty cell on
6
6
  * `error`. `undefined` when ready, so the container mounts its renderer as in
7
7
  * 0.48. No renderer is mounted otherwise, which is what keeps a cell whose
8
8
  * value never arrived from being edited over.
@@ -1,8 +1,9 @@
1
+ import { LoadingIcon } from '../../../../affine-components/icons/index.js';
1
2
  import { html } from 'lit';
2
- import { cellEmptyStyle, cellSkeletonStyle } from './cell-status-css.js';
3
+ import { cellEmptyStyle, cellLoadingStyle } from './cell-status-css.js';
3
4
  /**
4
5
  * What a cell container draws INSTEAD of its renderer while the cell is not
5
- * `ready` (ADR 0035 §9e): a skeleton while `pending`, an empty cell on
6
+ * `ready` (ADR 0035 §9e): a spinner while `pending`, an empty cell on
6
7
  * `error`. `undefined` when ready, so the container mounts its renderer as in
7
8
  * 0.48. No renderer is mounted otherwise, which is what keeps a cell whose
8
9
  * value never arrived from being edited over.
@@ -13,11 +14,12 @@ export function renderCellStatus(cell) {
13
14
  return undefined;
14
15
  if (status === 'pending') {
15
16
  return html `<span
16
- class="${cellSkeletonStyle}"
17
- data-testid="dv-cell-skeleton"
17
+ class="${cellLoadingStyle}"
18
+ data-testid="dv-cell-loading"
18
19
  data-cell-status="pending"
19
20
  aria-busy="true"
20
- ></span>`;
21
+ >${LoadingIcon()}</span
22
+ >`;
21
23
  }
22
24
  return html `<span class="${cellEmptyStyle}" data-cell-status="error"></span>`;
23
25
  }
@@ -4,12 +4,30 @@ export declare class NumberCell extends BaseCellRenderer<number, number, NumberP
4
4
  private accessor _inputEle;
5
5
  private _getFormattedString;
6
6
  private readonly _keydown;
7
+ /**
8
+ * The formatted text the input opened with, bound while editing: a value
9
+ * committed while typing must not reformat the input under the caret
10
+ * (`1,` typed, `1` committed, the comma kept).
11
+ */
12
+ private _opened;
13
+ /** The number the editor opened with, then the last one committed: a
14
+ * commit writes only a change (recette 3, P3-5). */
15
+ private _base;
16
+ private _baseSet;
17
+ private readonly _typing;
18
+ /** Parsed input; `null` for text that is not a number yet. */
19
+ private _parse;
20
+ private _changed;
21
+ /** While typing: a number commits, a half-typed one waits, the input is
22
+ * left as typed. */
23
+ private _commitTyped;
7
24
  private readonly _setValue;
8
25
  focusEnd: () => void;
9
26
  _blur(): void;
10
27
  _focus(): void;
11
28
  afterEnterEditingMode(): void;
12
29
  beforeExitEditingMode(): void;
30
+ disconnectedCallback(): void;
13
31
  render(): import("lit-html").TemplateResult<1>;
14
32
  }
15
33
  export declare const numberPropertyConfig: import("../../index.js").PropertyMetaConfig<"number", {