@classic-homes/theme-svelte 1.24.0 → 1.24.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.
@@ -1278,6 +1278,18 @@
1278
1278
  return 'animate-scale-in';
1279
1279
  });
1280
1280
 
1281
+ // Resize handles sit over the content's right/bottom edge, where its
1282
+ // scrollbars live. Inset the scroll container so the scrollbars stay clickable.
1283
+ const resizeRight = $derived(
1284
+ !disableResize &&
1285
+ ((variant === 'full' && (mode === 'detached' || edge === 'left')) ||
1286
+ (variant === 'card' && isExpanded && !isMobile))
1287
+ );
1288
+ const resizeBottom = $derived(
1289
+ !disableResize && variant === 'full' && (mode === 'detached' || edge === 'top')
1290
+ );
1291
+ const hasFooter = $derived(!!(footer || actions.length > 0 || footerActions));
1292
+
1281
1293
  // Whether to show content (collapsed card only shows header)
1282
1294
  const showContent = $derived(
1283
1295
  variant !== 'card' ||
@@ -1535,7 +1547,9 @@
1535
1547
 
1536
1548
  <!-- Content (hidden when card is collapsed) -->
1537
1549
  {#if showContent}
1538
- <DataPanelContent>
1550
+ <DataPanelContent
1551
+ class={cn(resizeRight && 'mr-2.5', resizeBottom && !hasFooter && 'mb-2.5')}
1552
+ >
1539
1553
  {@render children()}
1540
1554
  </DataPanelContent>
1541
1555
 
@@ -102,6 +102,16 @@
102
102
  let inputRef: HTMLInputElement | undefined = $state();
103
103
  let debounceTimer: ReturnType<typeof setTimeout> | null = null;
104
104
 
105
+ // The shortcut hint names the platform's modifier. The server cannot know the
106
+ // platform, so it renders "Ctrl" and Apple devices switch to ⌘ once mounted.
107
+ let modifierKey = $state('Ctrl');
108
+ $effect(() => {
109
+ const platform =
110
+ (navigator as Navigator & { userAgentData?: { platform?: string } }).userAgentData
111
+ ?.platform || navigator.platform;
112
+ if (/mac|iphone|ipad|ipod/i.test(platform)) modifierKey = '⌘';
113
+ });
114
+
105
115
  function isGrouped(
106
116
  value: SearchResultItem[] | SearchResultGroup[]
107
117
  ): value is SearchResultGroup[] {
@@ -228,7 +238,7 @@
228
238
  className
229
239
  )}
230
240
  aria-label="Search"
231
- title={enableShortcut ? `Search (⌘/${shortcutKey.toUpperCase()})` : 'Search'}
241
+ title={enableShortcut ? `Search (${modifierKey}+${shortcutKey.toUpperCase()})` : 'Search'}
232
242
  >
233
243
  <svg class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
234
244
  <path
@@ -264,7 +274,7 @@
264
274
  <kbd
265
275
  class="pointer-events-none hidden h-5 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[10px] font-medium text-muted-foreground sm:inline-flex"
266
276
  >
267
- <span class="text-xs">⌘</span>{shortcutKey.toUpperCase()}
277
+ <span class="text-xs">{modifierKey}</span>{shortcutKey.toUpperCase()}
268
278
  </kbd>
269
279
  {/if}
270
280
  </button>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@classic-homes/theme-svelte",
3
- "version": "1.24.0",
3
+ "version": "1.24.2",
4
4
  "description": "Svelte components for the Classic theme system",
5
5
  "type": "module",
6
6
  "svelte": "./dist/lib/index.js",