@globalbrain/sefirot 4.61.1 → 4.62.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.
@@ -1768,6 +1768,9 @@ defineExpose({
1768
1768
  :width="sheetWidth"
1769
1769
  @close="sheet.off"
1770
1770
  >
1771
+ <template v-if="$slots['sheet-title-after']" #title-after="s">
1772
+ <slot name="sheet-title-after" v-bind="s" />
1773
+ </template>
1771
1774
  <template v-if="$slots['sheet-before']" #before="s">
1772
1775
  <slot name="sheet-before" v-bind="s" />
1773
1776
  </template>
@@ -301,15 +301,15 @@ function requestClose() {
301
301
 
302
302
  // --- Slot context -----------------------------------------------------------
303
303
  //
304
- // Content passed to the `#before` / `#after` slots is declared in the page
304
+ // Content passed to the `#title-after` / `#before` / `#after` slots is declared in the page
305
305
  // that hosts the catalog, so it cannot `inject` the edit context (which is
306
306
  // provided inside `LensCatalog`, a child of that page). Expose the pieces a
307
- // slot needs as slot props instead: the resolved record id, a record-bound
308
- // partial `save`, the entity key, the sheet `mode` (so a slot can render
309
- // different content for create vs view), and `registerCreateExtension` (so a
310
- // create-mode slot can contribute extra keys to the create payload). This keeps
311
- // the generic sheet free of one-off concerns (avatar upload, social links,
312
- // linked records) while still letting a page implement them.
307
+ // slot needs as slot props instead: the rendered title, resolved record id, a
308
+ // record-bound partial `save`, the entity key, the sheet `mode` (so a slot can
309
+ // render different content for create vs view), and `registerCreateExtension`
310
+ // (so a create-mode slot can contribute extra keys to the create payload). This
311
+ // keeps the generic sheet free of one-off concerns (badges, avatar upload,
312
+ // social links, linked records) while still letting a page implement them.
313
313
 
314
314
  const resolvedId = computed(() => (props.record && edit ? edit.resolveId(props.record) : null))
315
315
 
@@ -331,6 +331,7 @@ function saveRecord(values: Record<string, any>): Promise<void> {
331
331
  }
332
332
 
333
333
  const slotProps = computed(() => ({
334
+ title: title.value,
334
335
  record: props.record ?? null,
335
336
  id: resolvedId.value,
336
337
  entity: props.entity,
@@ -357,7 +358,12 @@ const slotProps = computed(() => ({
357
358
  <SSheet :open :closable="!saving" :width="width ?? '480px'" @close="requestClose">
358
359
  <div class="LensSheet">
359
360
  <div class="header">
360
- <div class="title">{{ title }}</div>
361
+ <div class="heading">
362
+ <div class="title">{{ title }}</div>
363
+ <div v-if="$slots['title-after']" class="title-after">
364
+ <slot name="title-after" v-bind="slotProps" />
365
+ </div>
366
+ </div>
361
367
  <button
362
368
  class="close"
363
369
  type="button"
@@ -462,6 +468,15 @@ const slotProps = computed(() => ({
462
468
  border-bottom: 1px solid var(--c-divider);
463
469
  }
464
470
 
471
+ .heading {
472
+ display: flex;
473
+ align-items: center;
474
+ flex-wrap: wrap;
475
+ flex: 1;
476
+ gap: 8px;
477
+ min-width: 0;
478
+ }
479
+
465
480
  .title {
466
481
  font-size: 16px;
467
482
  font-weight: 500;
@@ -469,10 +484,17 @@ const slotProps = computed(() => ({
469
484
  color: var(--c-text-1);
470
485
  }
471
486
 
487
+ .title-after {
488
+ display: flex;
489
+ align-items: center;
490
+ flex: none;
491
+ }
492
+
472
493
  .close {
473
494
  display: flex;
474
495
  align-items: center;
475
496
  justify-content: center;
497
+ flex: none;
476
498
  width: 32px;
477
499
  height: 32px;
478
500
  border-radius: 6px;
@@ -141,7 +141,8 @@ const ignoreErrors = [
141
141
  /Non-Error (?:exception|promise rejection) captured/,
142
142
  /ResizeObserver loop/,
143
143
  /Can't find variable: gmo/,
144
- /\[Cloudflare Turnstile\] Error: (?:10[2-46]|1106[02]|[36]00)/
144
+ /\[Cloudflare Turnstile\] Error: (?:10[2-46]|1106[02]|[36]00)/,
145
+ /window\.webkit\.messageHandlers/
145
146
  ]
146
147
 
147
148
  const stringifiers: readonly ((e: unknown) => string | false)[] = [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@globalbrain/sefirot",
3
- "version": "4.61.1",
3
+ "version": "4.62.0",
4
4
  "description": "Vue Components for Global Brain Design System.",
5
5
  "keywords": [
6
6
  "components",