@stacksjs/defaults 0.75.707 → 0.75.710

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.
@@ -775,9 +775,13 @@ the Craft native-sidebar shell. The class owns the layer's whole horizontal
775
775
  box (`left`, `right` and `width`), so a drawer ends at the window's edge. A
776
776
  dialog (`dashboard-modal-dialog` beside it) takes the whole window instead and
777
777
  is centred on it: its `::backdrop` dims the whole window, sidebar included, so
778
- centring it on the content alone looked off centre. Dialogs fade their backdrop
779
- in and lift their panel into place on open, and hold still under
780
- `prefers-reduced-motion`. Do not put a width utility (`w-screen`,
778
+ centring it on the content alone looked off centre. Dialogs fade their dim in
779
+ and lift their panel into place on open, and run the reverse on close through
780
+ stx's `data-stx-if-transition` (a still copy of the dialog fades out, so its
781
+ text does not change as the state that closed it is cleared). The dim is the
782
+ dialog's own background, not its `::backdrop`, because the leaving copy is not
783
+ a modal dialog. Under `prefers-reduced-motion` the panel does not move and
784
+ closing is a short fade. Do not put a width utility (`w-screen`,
781
785
  `w-full`) on an element that carries it: beside `left: 250px` that runs the
782
786
  layer a sidebar's width past the window. The rule's selector is
783
787
  `html .dashboard-modal-layer`, so it outweighs `inset-0` whichever stylesheet
@@ -1799,7 +1803,8 @@ reporter stores allowlisted operational context and excludes bodies and headers.
1799
1803
 
1800
1804
  Declare `dashboard: { highlight: true }` on a model to pin its Data row, or use
1801
1805
  numeric `highlight` values to order pinned rows. Other enabled Data models live
1802
- under the native Sidebar's collapsed More models disclosure. Labels, icons and
1806
+ under the All Models disclosure. The row label opens the registry when the
1807
+ All Models page is enabled in dashboard config. Labels, icons and
1803
1808
  role gates apply to nested rows too. `enabled: false` omits navigation;
1804
1809
  `access: false` excludes generic catalogs and reads as well.
1805
1810
 
@@ -86,7 +86,7 @@ Browser runtime bindings are documented separately in `stacks-auto-imports`.
86
86
  | `@stacksjs/skills` | [`stacks-skills`](../stacks-skills/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/skills/src/index.ts) | 1 |
87
87
  | `@stacksjs/slug` | [`stacks-slug`](../stacks-slug/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/slug/src/index.ts) | 5 |
88
88
  | `@stacksjs/sms` | [`stacks-sms`](../stacks-sms/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/sms/src/index.ts) | 7 |
89
- | `@stacksjs/socials` | [`stacks-socials`](../stacks-socials/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/socials/src/index.ts) | 23 |
89
+ | `@stacksjs/socials` | [`stacks-socials`](../stacks-socials/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/socials/src/index.ts) | 24 |
90
90
  | `@stacksjs/storage` | [`stacks-storage`](../stacks-storage/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/storage/src/index.ts) | 54 |
91
91
  | `@stacksjs/strings` | [`stacks-strings`](../stacks-strings/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/strings/src/index.ts) | 12 |
92
92
  | `@stacksjs/support` | [`stacks-support`](../stacks-support/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/support/src/index.ts) | 6 |
@@ -849,7 +849,7 @@ Read the entrypoint and package export map for re-exported or type-only surfaces
849
849
 
850
850
  Local source modules: [src/abstract.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/socials/src/abstract.ts), [src/authorize.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/socials/src/authorize.ts), [src/drivers/index.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/socials/src/drivers/index.ts), [src/errors.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/socials/src/errors.ts), [src/exceptions.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/socials/src/exceptions.ts), [src/flows.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/socials/src/flows.ts), [src/handoff.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/socials/src/handoff.ts), [src/identities.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/socials/src/identities.ts), [src/media.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/socials/src/media.ts), [src/meta-graph.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/socials/src/meta-graph.ts), [src/publish-errors.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/socials/src/publish-errors.ts), [src/publish.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/socials/src/publish.ts), [src/registry.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/socials/src/registry.ts), [src/text.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/socials/src/text.ts), [src/token.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/socials/src/token.ts), [src/types.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/socials/src/types.ts).
851
851
 
852
- Evidence directory: [23 retained tests](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/socials/tests). These files are evidence pointers, not a claim that all tests were run for this catalog.
852
+ Evidence directory: [24 retained tests](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/socials/tests). These files are evidence pointers, not a claim that all tests were run for this catalog.
853
853
 
854
854
  ### @stacksjs/storage
855
855
 
@@ -148,6 +148,14 @@ reference with the post, then pass it as `quote` in the driver's third
148
148
  argument. A quote can accompany images or an external card. Supply
149
149
  `selfLabels` in the same argument to attach the author's content labels.
150
150
 
151
+ Mastodon and Bluesky take one MP4 in `PublishPostInput.video` with its bytes,
152
+ MIME type, optional alt text, and optional dimensions. Mastodon checks the
153
+ instance's advertised media limits and waits for its attachment endpoint to
154
+ return the processed video. Bluesky uses a PDS-scoped upload token and waits
155
+ for its video service to return the processed blob. Reuse the normal Mastodon
156
+ idempotency key or Bluesky record key on retry. The other drivers reject a
157
+ video before they publish a post.
158
+
151
159
  Instagram waits for
152
160
  each media container to be FINISHED before publishing it (containerTimeoutMs,
153
161
  five minutes by default), sends alt text on images and carousel items, refuses an
@@ -160,6 +168,15 @@ member may post for (rw_organization_admin). PublishedPost.warnings
160
168
  lists what went out without failing the post. The LinkedIn version is
161
169
  LINKEDIN_API_VERSION unless a configured one is still supported.
162
170
 
171
+ For LinkedIn and Instagram first comments, call
172
+ `createComment(identity, publishedPost.uri, text)` after saving the published
173
+ post. LinkedIn needs `w_member_social_feed` or `w_organization_social_feed`
174
+ and the matching author URN. Instagram (Facebook Login) needs a Facebook User
175
+ token with `instagram_manage_comments` in addition to its normal account access.
176
+ An accepted response can return no comment ID. The comment is a distinct
177
+ write. Do not send the parent post again when this write fails, and do not
178
+ blindly repeat a timed-out comment whose outcome is unknown.
179
+
163
180
  A driver error's isAuthError is narrow; classifySocialError in
164
181
  publish-errors.ts sorts any failure by status and body, and only `expired`
165
182
  means the account must sign in again (a duplicate post on X is a 403).
@@ -192,6 +209,16 @@ read budget before calling the driver.
192
209
 
193
210
  ## Authorization and operational limits
194
211
 
212
+ For X messaging, request `dm.read` and `dm.write` only when the user enables
213
+ that feature. `TwitterPublishingDriver.listDirectMessageEvents(identity,
214
+ { limit, cursor, conversationId })` reads one page for the account or a
215
+ conversation and returns the next cursor. The request expands only the sender
216
+ so a caller can reserve the maximum charge for one DM event and one user per
217
+ result. `sendDirectMessage(identity, conversationId, text)` sends one reply
218
+ and returns its confirmed event ID. A permission refusal does not invalidate
219
+ the account's token. See the [X API pricing](https://docs.x.com/x-api/getting-started/pricing)
220
+ and [DM lookup reference](https://docs.x.com/x-api/direct-messages/lookup/introduction).
221
+
195
222
  The native terminal consent helper in authorize.ts currently supports X only.
196
223
  It uses loopback callback URI, checked state and PKCE; offline.access supplies
197
224
  refresh credentials. Declaring another publishing platform does not make the
@@ -78,7 +78,9 @@ The stx component uses `mountNativeSupport` from the browser subpath and native
78
78
  so the bridge uses the native double-submit cookie from the current page.
79
79
  Navigation, page removal,
80
80
  logout, sign-in and cross-tab auth changes clear the old messenger before any
81
- new customer session is booted. Customer credentials remain element properties.
81
+ new customer session is booted. When a browser restores a cached page from
82
+ history, the bridge requests a fresh session for the current account. Customer
83
+ credentials remain element properties.
82
84
  No framework upgrade enables this integration or sends customer data by itself.
83
85
 
84
86
  `buddy support:doctor` checks usage, bounded summaries and, when native UI is
@@ -2,7 +2,7 @@
2
2
  "publisher": "Stacks",
3
3
  "name": "vscode-stacks",
4
4
  "displayName": "Stacks",
5
- "version": "0.75.707",
5
+ "version": "0.75.710",
6
6
  "description": "Stacks, built into VS Code: stx templates, pickier linting and formatting, encrypted env files, the dev server preview and every buddy command. No other extensions required.",
7
7
  "license": "MIT",
8
8
  "funding": "https://github.com/sponsors/chrisbbreuer",
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@stacksjs/defaults",
3
3
  "type": "module",
4
4
  "sideEffects": false,
5
- "version": "0.75.707",
5
+ "version": "0.75.710",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "git+https://github.com/stacksjs/stacks.git",
@@ -45,15 +45,15 @@
45
45
  "dependencies": {
46
46
  "@iconify-json/f7": "^1.2.2",
47
47
  "@iconify-json/hugeicons": "^1.2.35",
48
- "@stacksjs/desktop": "^0.2.957",
49
- "@stacksjs/mobile": "0.75.707",
50
- "@stacksjs/sanitizer": "^0.2.957",
51
- "@stacksjs/stx": "^0.2.957",
52
- "@stacksjs/strings": "0.75.707",
48
+ "@stacksjs/desktop": "^0.2.960",
49
+ "@stacksjs/mobile": "0.75.710",
50
+ "@stacksjs/sanitizer": "^0.2.960",
51
+ "@stacksjs/stx": "^0.2.960",
52
+ "@stacksjs/strings": "0.75.710",
53
53
  "@xterm/addon-fit": "^0.11.0",
54
54
  "@xterm/xterm": "^6.0.0",
55
55
  "ts-qr-codes": "^0.1.8",
56
- "@stacksjs/support": "0.75.707",
57
- "@stacksjs/browser": "0.75.707"
56
+ "@stacksjs/support": "0.75.710",
57
+ "@stacksjs/browser": "0.75.710"
58
58
  }
59
59
  }
@@ -90,7 +90,7 @@ function retry(): void {
90
90
  <!-- Back to Login -->
91
91
  <p class="mt-6 text-center text-neutral-500 text-sm dark:text-neutral-400">
92
92
  <a href="/login" class="inline-flex gap-1 items-center font-medium text-blue-600 dark:text-blue-400 hover:text-blue-500 dark:hover:text-blue-300">
93
- <div class="h-4 w-4 i-hugeicons-arrow-left-01"></div>
93
+ <span aria-hidden="true" class="h-4 w-4 i-hugeicons-arrow-left-01"></span>
94
94
  Back to sign in
95
95
  </a>
96
96
  </p>
@@ -53,7 +53,7 @@ function handleKeydown(event: KeyboardEvent): void {
53
53
 
54
54
  function handlePanelClick(event: MouseEvent): void {
55
55
  const target = event.target as HTMLElement | null
56
- if (target?.closest('a[href]'))
56
+ if (!event.defaultPrevented && target?.closest('a[href]'))
57
57
  closeSidebar()
58
58
  }
59
59
 
@@ -844,7 +844,9 @@ onDestroy(() => {
844
844
  </thead>
845
845
 
846
846
  <tbody :class="bodyClass()" :aria-busy="loading() ? 'true' : null">
847
- <tr :for="row in rows()" class="hover:bg-neutral-50 dark:hover:bg-white/5 transition-colors group">
847
+ <!-- One hover colour for the row and its sticky Actions cell, opaque so
848
+ the columns scrolling under that cell never show through it. -->
849
+ <tr :for="row in rows()" class="hover:bg-[var(--row-hover)] transition-colors [--row-hover:#fafafa] dark:[--row-hover:#232323] group">
848
850
  <td :if="selectable()" class="pl-3 pr-1 py-2 w-8">
849
851
  <input
850
852
  type="checkbox"
@@ -864,7 +866,7 @@ onDestroy(() => {
864
866
  <img :if="cellKind(row, column) === 'image'" :src="cellHref(row, column)" alt="" loading="lazy" class="inline-block object-cover h-7 w-7 bg-neutral-100 dark:bg-neutral-800 rounded" />
865
867
  <code :if="cellKind(row, column) === 'code'" class="font-mono text-[12px]">{{ cellValue(row, column) }}</code>
866
868
  </td>
867
- <td class="right-0 sticky z-10 px-3 py-2 text-right bg-white dark:bg-neutral-900 group-hover:bg-neutral-50 dark:group-hover:bg-white/5 border-black/5 border-l dark:border-white/10 transition-colors">
869
+ <td class="right-0 sticky z-10 px-3 py-2 text-right bg-white dark:bg-neutral-900 group-hover:bg-[var(--row-hover)] border-black/5 border-l dark:border-white/10 transition-colors">
868
870
  <ModelRecordActions
869
871
  :record="row"
870
872
  :modelName="modelName()"
@@ -97,6 +97,9 @@ effect(() => {
97
97
  return
98
98
  }
99
99
 
100
+ // Closed at once, so the page behind is no longer inert when focus goes
101
+ // back below. The copy that fades out in its place shows all the same; see
102
+ // .dashboard-modal-leave-active.
100
103
  if (dialog.current?.open)
101
104
  dialog.current.close()
102
105
  const target = restoreFocus
@@ -111,7 +114,8 @@ effect(() => {
111
114
  :role="liveRole()"
112
115
  aria-modal="true"
113
116
  :aria-label="liveAriaLabel() || liveTitle() || 'Dialog'"
114
- class="fixed inset-0 overflow-y-auto z-[55] m-0 p-0 h-dvh max-h-none max-w-none bg-transparent dashboard-modal-dialog dashboard-modal-layer"
117
+ data-stx-if-transition="dashboard-modal"
118
+ class="fixed inset-0 overflow-y-auto z-[55] m-0 p-0 h-dvh max-h-none max-w-none dashboard-modal-dialog dashboard-modal-layer"
115
119
  @cancel="handleCancel"
116
120
  >
117
121
  <!-- Modal container -->
@@ -166,17 +170,26 @@ effect(() => {
166
170
  </dialog>
167
171
 
168
172
  <style>
169
- .dashboard-modal-dialog::backdrop {
173
+ /*
174
+ * The dim and blur behind the panel are the dialog's own background, not its
175
+ * ::backdrop. The dialog fills the window, so it covers the same area, and
176
+ * the copy that fades out on close (a plain open dialog, not a modal one) has
177
+ * no ::backdrop: a dim drawn there would vanish the moment closing began.
178
+ */
179
+ .dashboard-modal-dialog {
170
180
  background: rgb(0 0 0 / 50%);
171
181
  backdrop-filter: blur(4px);
172
182
  }
183
+ .dashboard-modal-dialog::backdrop {
184
+ background: transparent;
185
+ }
173
186
 
174
187
  /*
175
- * Opening fades the backdrop in and lifts the panel into place. The dialog is
188
+ * Opening fades the dim in and lifts the panel into place. The dialog is
176
189
  * added to the page as it opens, so an animation (which runs when an element
177
190
  * first appears) does this without any script.
178
191
  */
179
- .dashboard-modal-dialog[open]::backdrop {
192
+ .dashboard-modal-dialog[open] {
180
193
  animation: dashboard-modal-backdrop-in 180ms ease-out;
181
194
  }
182
195
  .dashboard-modal-dialog[open] [data-dashboard-overlay="modal"] {
@@ -188,10 +201,48 @@ effect(() => {
188
201
  @keyframes dashboard-modal-panel-in {
189
202
  from { opacity: 0; transform: translateY(8px) scale(0.96); }
190
203
  }
204
+
205
+ /*
206
+ * Closing runs the same in reverse on a still copy of the dialog
207
+ * (data-stx-if-transition above), which stx removes when it ends. The copy
208
+ * may be taken after the dialog closed, and a closed dialog is not drawn, so
209
+ * the copy is drawn here for as long as it leaves.
210
+ *
211
+ * The rules on the dialog itself name two of its classes. The layout's
212
+ * `html .dashboard-modal-layer` sets the dialog's transition (to animate its
213
+ * left edge), and with one class this rule weighed less: the panel eased
214
+ * down while the dim and everything in it vanished in one frame.
215
+ */
216
+ .dashboard-modal-dialog.dashboard-modal-leave-active {
217
+ display: block;
218
+ transition: opacity 160ms ease-in;
219
+ }
220
+ .dashboard-modal-leave-active [data-dashboard-overlay="modal"] {
221
+ transition: opacity 160ms ease-in, transform 160ms ease-in;
222
+ }
223
+ .dashboard-modal-dialog.dashboard-modal-leave-to {
224
+ opacity: 0;
225
+ }
226
+ .dashboard-modal-leave-to [data-dashboard-overlay="modal"] {
227
+ opacity: 0;
228
+ transform: translateY(8px) scale(0.96);
229
+ }
230
+
231
+ /*
232
+ * Asked for less motion, the panel does not move: opening is immediate and
233
+ * closing is a short fade, so a closed dialog does not linger.
234
+ */
191
235
  @media (prefers-reduced-motion: reduce) {
192
- .dashboard-modal-dialog[open]::backdrop,
236
+ .dashboard-modal-dialog[open],
193
237
  .dashboard-modal-dialog[open] [data-dashboard-overlay="modal"] {
194
238
  animation: none;
195
239
  }
240
+ .dashboard-modal-dialog.dashboard-modal-leave-active,
241
+ .dashboard-modal-leave-active [data-dashboard-overlay="modal"] {
242
+ transition: opacity 100ms linear;
243
+ }
244
+ .dashboard-modal-leave-to [data-dashboard-overlay="modal"] {
245
+ transform: none;
246
+ }
196
247
  }
197
248
  </style>
@@ -32,6 +32,22 @@ export function parseSidebarOrder(value: unknown): SidebarOrder {
32
32
  items[key] = ids(list, 2048)
33
33
  }
34
34
  if (JSON.stringify(input).length > 256 * 1024) throw new TypeError('Sidebar order is too large.')
35
+
36
+ // Keep the registry row's position and the old disclosure's child order
37
+ // when the two rows become a single All Models entry.
38
+ const dataKey = sidebarGroupKey('data')
39
+ const dataRows = items[dataKey]
40
+ if (dataRows?.includes('models-more')) {
41
+ items[dataKey] = dataRows.includes('models')
42
+ ? dataRows.filter(id => id !== 'models-more')
43
+ : dataRows.map(id => id === 'models-more' ? 'models' : id)
44
+ }
45
+ const oldModelGroup = sidebarGroupKey('data', ['models-more'])
46
+ if (items[oldModelGroup]) {
47
+ items[sidebarGroupKey('data', ['models'])] ??= items[oldModelGroup]
48
+ delete items[oldModelGroup]
49
+ }
50
+
35
51
  return { version: 1, sections: ids(input.sections, 128), items }
36
52
  }
37
53
 
@@ -425,8 +425,8 @@ export function buildNavSections(
425
425
  ...categoryNavItems(discoveredModels, 'system', new Set()),
426
426
  ]])
427
427
 
428
- // Data pins model-declared highlights. Other visible models stay accessible
429
- // through a collapsed disclosure using the shared Sidebar component.
428
+ // Data pins model-declared highlights. All Models links to the registry and
429
+ // discloses the remaining models through the shared Sidebar component.
430
430
  // Per-model rows link to `/models/<id>` (dynamic ORM viewer); the
431
431
  // built-in dashboard / activity / users / teams / subscribers rows keep
432
432
  // their bespoke pages under `/data/<row>`.
@@ -438,8 +438,8 @@ export function buildNavSections(
438
438
  if (dataRows.users) dataNav.push({ to: '/data/users', icon: 'users', text: 'Users' })
439
439
  if (dataRows.teams) dataNav.push({ to: '/data/teams', icon: 'group', text: 'Teams' })
440
440
  if (dataRows.subscribers) dataNav.push({ to: '/data/subscribers', icon: 'mail', text: 'Subscribers' })
441
- if (dataRows.allModels) dataNav.push({ to: '/models', icon: 'table', text: 'All Models' })
442
- const moreModels: NavItem[] = []
441
+ const pinnedModels: NavItem[] = []
442
+ const modelChildren: NavItem[] = []
443
443
  const highlighted = (model: DiscoveredModel) => model.dashboard?.highlight === true
444
444
  || (typeof model.dashboard?.highlight === 'number' && Number.isFinite(model.dashboard.highlight))
445
445
  const rank = (model: DiscoveredModel) => typeof model.dashboard?.highlight === 'number' ? model.dashboard.highlight : Number.POSITIVE_INFINITY
@@ -465,10 +465,19 @@ export function buildNavSections(
465
465
  ? { roles: m.dashboard.roles }
466
466
  : {}),
467
467
  }
468
- if (highlighted(m)) dataNav.push(item)
469
- else moreModels.push(item)
468
+ if (highlighted(m)) pinnedModels.push(item)
469
+ else modelChildren.push(item)
470
470
  }
471
- if (moreModels.length) dataNav.push({ id: 'models-more', to: '', text: 'More models', icon: 'table', expanded: false, children: moreModels })
471
+ if (dataRows.allModels || modelChildren.length) {
472
+ dataNav.push({
473
+ id: 'models',
474
+ to: dataRows.allModels ? '/models' : '',
475
+ icon: 'table',
476
+ text: 'All Models',
477
+ ...(modelChildren.length ? { children: modelChildren, expanded: false } : {}),
478
+ })
479
+ }
480
+ dataNav.push(...pinnedModels)
472
481
  sections.push(['data', 'data', dataNav])
473
482
 
474
483
  if (toggles.commerce) {