@rokkit/app 1.15.0 → 1.15.1

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,9 @@
1
1
  <script lang="ts">
2
2
  /**
3
- * One screen, laid out from data: a title bar (mark, title, context, then search, the
4
- * screen's own buttons and the band toggles), a description, the info / stats / filters
5
- * bands, a body and a sidebar that each scroll on their own, and a footer. The shell fills
3
+ * One screen, laid out from data: a title bar (mark, title, context, then the screen's own
4
+ * buttons and the band toggles), a description, the info / stats / filters bands (search is
5
+ * the filters band's first control), a body and a sidebar that each scroll on their own, and
6
+ * a footer. The shell fills
6
7
  * its container; nothing but the body and the sidebar scrolls.
7
8
  *
8
9
  * Layout only, and it persists nothing: `panels` and `filter` are bindable (and emitted
@@ -81,7 +82,9 @@
81
82
  const has = $derived<Record<PanelId, boolean>>({
82
83
  info: Boolean(info?.length),
83
84
  stats: stats !== undefined,
84
- filters: Boolean(filters),
85
+ // Search lives in the filters band, so a screen with search has the band even when it
86
+ // passes no filters of its own.
87
+ filters: Boolean(filters) || search !== false,
85
88
  side: Boolean(sidebar)
86
89
  })
87
90
  const present = $derived(presentPanels(has))
@@ -221,27 +224,9 @@
221
224
  {@render glyph(mark.kanji, mark.icon)}
222
225
  <h1 data-screen-title>{title}</h1>
223
226
  {#if context}<span data-screen-context>{context}</span>{/if}
224
- {#if searchOn || items.length}
227
+ {#if items.length}
225
228
  <div data-screen-tools>
226
- {#if searchOn}
227
- <label data-screen-search>
228
- <span
229
- data-screen-search-icon
230
- class={DEFAULT_STATE_ICONS.action.search}
231
- aria-hidden="true"
232
- ></span>
233
- <input
234
- type="search"
235
- bind:value={query}
236
- oninput={onsearch}
237
- {placeholder}
238
- aria-label={placeholder}
239
- />
240
- </label>
241
- {/if}
242
- {#if items.length}
243
- <Toolbar {items} label={title} width="fit" showDividers={false} onclick={runItem} />
244
- {/if}
229
+ <Toolbar {items} label={title} width="fit" showDividers={false} onclick={runItem} />
245
230
  </div>
246
231
  {/if}
247
232
  </div>
@@ -276,8 +261,24 @@
276
261
  </div>
277
262
  {/if}
278
263
 
279
- {#if filters && shown('filters')}
264
+ {#if shown('filters')}
280
265
  <div data-screen-filters role="group" aria-label={text.filters}>
266
+ {#if searchOn}
267
+ <label data-screen-search>
268
+ <span
269
+ data-screen-search-icon
270
+ class={DEFAULT_STATE_ICONS.action.search}
271
+ aria-hidden="true"
272
+ ></span>
273
+ <input
274
+ type="search"
275
+ bind:value={query}
276
+ oninput={onsearch}
277
+ {placeholder}
278
+ aria-label={placeholder}
279
+ />
280
+ </label>
281
+ {/if}
281
282
  {#if filterSnippet}
282
283
  {@render filterSnippet(api)}
283
284
  {:else if filterSchema}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rokkit/app",
3
- "version": "1.15.0",
3
+ "version": "1.15.1",
4
4
  "description": "App-level controls for Rokkit applications - theme management and UI chrome",
5
5
  "repository": {
6
6
  "type": "git",
@@ -38,11 +38,11 @@
38
38
  "build": "svelte-package -i src -o dist"
39
39
  },
40
40
  "dependencies": {
41
- "@rokkit/actions": "1.15.0",
42
- "@rokkit/core": "1.15.0",
43
- "@rokkit/forms": "1.15.0",
44
- "@rokkit/states": "1.15.0",
45
- "@rokkit/ui": "1.15.0"
41
+ "@rokkit/actions": "1.15.1",
42
+ "@rokkit/core": "1.15.1",
43
+ "@rokkit/forms": "1.15.1",
44
+ "@rokkit/states": "1.15.1",
45
+ "@rokkit/ui": "1.15.1"
46
46
  },
47
47
  "peerDependencies": {
48
48
  "svelte": "^5.0.0"