@lapis-notes/bases 0.1.3 → 0.1.4
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.
- package/CHANGELOG.md +8 -0
- package/README.md +1 -1
- package/dist/bases-view/components/column-visibility.svelte +69 -20
- package/dist/bases-view/components/filters/filter-properties.svelte +3 -2
- package/dist/bases-view/components/filters/filter-row.svelte +3 -2
- package/dist/bases-view/components/group/group-root.svelte +3 -2
- package/dist/bases-view/components/limit.svelte +1 -3
- package/dist/bases-view/components/sort/sort-root.svelte +3 -2
- package/dist/bases-view/components/sort/sort-row.svelte +3 -2
- package/dist/bases-view/view-settings.svelte +3 -2
- package/manifest.json +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Bases changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Restore property-picker accessibility with unique search/result associations, named independent visibility/edit controls in grid rows, and readable hidden-property labels. Preserve keyboard activation without toggling visibility while opening an editor.
|
|
8
|
+
|
|
9
|
+
- [#16](https://github.com/lapismd/lapis-plugins/pull/16) [`a6f080e`](https://github.com/lapismd/lapis-plugins/commit/a6f080e9e09197dc883968bbd8e15cbec55a6b8e) Thanks [@stevejuma](https://github.com/stevejuma)! - Preserve theme contrast for the results-limit label in the query menu.
|
|
10
|
+
|
|
3
11
|
## 0.1.3
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@ Register the exported plugin class in the application's `PluginProfile`. Import
|
|
|
13
13
|
registration so the host owns its lifecycle.
|
|
14
14
|
|
|
15
15
|
The runtime plugin ID is `bases`. A matching signed
|
|
16
|
-
`bases-0.1.
|
|
16
|
+
`bases-0.1.4.lapis-plugin` archive is attached to the
|
|
17
17
|
package-scoped GitHub release for manual or registry installation.
|
|
18
18
|
|
|
19
19
|
See the [repository README](https://github.com/lapismd/lapis-plugins#readme) for
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
+
const commandListId = $props.id();
|
|
2
3
|
import * as Popover from "@lapismd/design-core/shadcn/popover";
|
|
3
4
|
import * as Command from "@lapismd/design-core/shadcn/command";
|
|
4
5
|
import * as DropdownMenu from "@lapismd/design-core/shadcn/dropdown-menu";
|
|
@@ -220,7 +221,7 @@
|
|
|
220
221
|
<DropdownMenu.Root>
|
|
221
222
|
<DropdownMenu.Trigger>
|
|
222
223
|
{#snippet child({ props }: { props: Record<string, unknown> })}
|
|
223
|
-
<Button {...props} size="sm" variant="ghost"
|
|
224
|
+
<Button {...props} size="sm" variant="ghost" aria-label={`${name} property actions`}
|
|
224
225
|
><Ellipsis /></Button
|
|
225
226
|
>
|
|
226
227
|
{/snippet}
|
|
@@ -324,9 +325,11 @@
|
|
|
324
325
|
</div>
|
|
325
326
|
</Command.Root>
|
|
326
327
|
{:else}
|
|
327
|
-
<Command.Root>
|
|
328
|
-
<Command.Input placeholder="Find or create" />
|
|
329
|
-
<Command.List class="bases-style-p-1-eb6a3c">
|
|
328
|
+
<Command.Root label="Filter properties">
|
|
329
|
+
<Command.Input aria-controls={commandListId} aria-haspopup="grid" placeholder="Find or create" />
|
|
330
|
+
<Command.List id={commandListId} class="bases-style-p-1-eb6a3c">
|
|
331
|
+
{#snippet child({ props })}
|
|
332
|
+
<div {...props} role="grid" aria-label="Properties">
|
|
330
333
|
<Command.Empty>No results found.</Command.Empty>
|
|
331
334
|
{#each sortedColumns as column (column.id)}
|
|
332
335
|
<Command.Item
|
|
@@ -334,33 +337,58 @@
|
|
|
334
337
|
controller.toggleVisibility(column.id);
|
|
335
338
|
}}
|
|
336
339
|
>
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
"
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
340
|
+
{#snippet child({ props })}
|
|
341
|
+
<div {...props} role="row">
|
|
342
|
+
<div role="gridcell" class="bases-property-picker__visibility">
|
|
343
|
+
<button
|
|
344
|
+
type="button"
|
|
345
|
+
class="bases-property-picker__toggle"
|
|
346
|
+
aria-label={`Toggle ${column.displayName ?? normalizeName(column.id)} visibility`}
|
|
347
|
+
aria-pressed={controller.isVisible(column.id)}
|
|
348
|
+
onkeydown={(event) => event.stopPropagation()}
|
|
349
|
+
onclick={(event) => {
|
|
350
|
+
event.stopPropagation();
|
|
351
|
+
controller.toggleVisibility(column.id);
|
|
352
|
+
}}
|
|
353
|
+
>
|
|
354
|
+
<div
|
|
355
|
+
data-ui-part="bases-option-indicator"
|
|
356
|
+
data-selected={controller.isVisible(column.id)}
|
|
357
|
+
class={cn(
|
|
358
|
+
"bases-style-mr-2-d2347e bases-style-flex-60fbb7 bases-style-size-4-f7b5fa bases-style-items-center-3960ff bases-style-justify-center-86843c bases-style-rounded-sm-36d446 border bases-style-border-var-interactive-accent-f46c93",
|
|
359
|
+
controller.isVisible(column.id)
|
|
360
|
+
? "bases-style-ring-ring-3e1868 bases-style-border-none-4a5f0e bases-style-bg-var-interactive-accent-c58cc0 bases-style-text-var-text-on-accent-22b2b1 hover:ring bases-style-hover-ring-2-8a0edf"
|
|
361
|
+
: "bases-style-opacity-50-0b8c50 [&_svg]:invisible",
|
|
362
|
+
)}
|
|
363
|
+
>
|
|
364
|
+
<CheckIcon class="bases-style-size-4-f7b5fa" />
|
|
365
|
+
</div>
|
|
366
|
+
<Icon name={[column.icon ?? "lucide-info"]} />
|
|
367
|
+
<span
|
|
368
|
+
class={cn({ "bases-style-text-muted-foreground-bfa603": !controller.isVisible(column.id) })}
|
|
369
|
+
>{column.displayName ?? normalizeName(column.id)}</span
|
|
370
|
+
>
|
|
371
|
+
</button>
|
|
348
372
|
</div>
|
|
349
|
-
<
|
|
350
|
-
<span
|
|
351
|
-
class={cn({ "bases-style-opacity-40-2a2db4": !controller.isVisible(column.id) })}
|
|
352
|
-
>{column.displayName ?? normalizeName(column.id)}</span
|
|
353
|
-
>
|
|
373
|
+
<div role="gridcell">
|
|
354
374
|
<Command.Shortcut>
|
|
355
375
|
<button
|
|
356
376
|
class="bases-style-hover-bg-border-2e3f11 bases-style-rounded-sm-36d446 bases-style-p-1-eb6a3c"
|
|
377
|
+
type="button"
|
|
378
|
+
aria-label={`Edit ${column.displayName ?? normalizeName(column.id)}`}
|
|
379
|
+
onkeydown={(event) => event.stopPropagation()}
|
|
357
380
|
onclick={(evt) => editColumn(evt, column)}
|
|
358
381
|
>
|
|
359
382
|
<ChevronRight />
|
|
360
383
|
</button>
|
|
361
384
|
</Command.Shortcut>
|
|
385
|
+
</div>
|
|
386
|
+
</div>
|
|
387
|
+
{/snippet}
|
|
362
388
|
</Command.Item>
|
|
363
389
|
{/each}
|
|
390
|
+
</div>
|
|
391
|
+
{/snippet}
|
|
364
392
|
</Command.List>
|
|
365
393
|
</Command.Root>
|
|
366
394
|
{/if}
|
|
@@ -386,3 +414,24 @@
|
|
|
386
414
|
{/if}
|
|
387
415
|
</Popover.Content>
|
|
388
416
|
</Popover.Root>
|
|
417
|
+
|
|
418
|
+
<style>
|
|
419
|
+
.bases-property-picker__visibility {
|
|
420
|
+
flex: 1;
|
|
421
|
+
min-width: 0;
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
.bases-property-picker__toggle {
|
|
425
|
+
display: flex;
|
|
426
|
+
align-items: center;
|
|
427
|
+
gap: var(--spacing, 0.25rem);
|
|
428
|
+
width: 100%;
|
|
429
|
+
border: 0;
|
|
430
|
+
padding: 0;
|
|
431
|
+
background: transparent;
|
|
432
|
+
color: inherit;
|
|
433
|
+
font: inherit;
|
|
434
|
+
text-align: start;
|
|
435
|
+
cursor: pointer;
|
|
436
|
+
}
|
|
437
|
+
</style>
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
+
const commandListId = $props.id();
|
|
2
3
|
import * as Popover from "@lapismd/design-core/shadcn/popover";
|
|
3
4
|
import { Button } from "@lapismd/design-core/shadcn/button";
|
|
4
5
|
import * as Command from "@lapismd/design-core/shadcn/command";
|
|
@@ -47,8 +48,8 @@
|
|
|
47
48
|
</Popover.Trigger>
|
|
48
49
|
<Popover.Content class="bases-style-w-310px-8357f2 bases-style-p-0-8a539c" align="start">
|
|
49
50
|
<Command.Root>
|
|
50
|
-
<Command.Input placeholder="Find or create" />
|
|
51
|
-
<Command.List class="bases-style-p-1-eb6a3c">
|
|
51
|
+
<Command.Input aria-controls={commandListId} placeholder="Find or create" />
|
|
52
|
+
<Command.List id={commandListId} class="bases-style-p-1-eb6a3c">
|
|
52
53
|
<Command.Empty>No results found.</Command.Empty>
|
|
53
54
|
{#each controller
|
|
54
55
|
.getAllColumns()
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
</script>
|
|
4
4
|
|
|
5
5
|
<script lang="ts">
|
|
6
|
+
const commandListId = $props.id();
|
|
6
7
|
import type { Table } from "@tanstack/table-core";
|
|
7
8
|
import * as Popover from "@lapismd/design-core/shadcn/popover";
|
|
8
9
|
import * as Command from "@lapismd/design-core/shadcn/command";
|
|
@@ -235,8 +236,8 @@
|
|
|
235
236
|
</Popover.Trigger>
|
|
236
237
|
<Popover.Content class="bases-style-w-max-2f935d bases-style-p-0-8a539c" align="start">
|
|
237
238
|
<Command.Root>
|
|
238
|
-
<Command.Input placeholder="Find or create" />
|
|
239
|
-
<Command.List class="bases-style-p-1-eb6a3c">
|
|
239
|
+
<Command.Input aria-controls={commandListId} placeholder="Find or create" />
|
|
240
|
+
<Command.List id={commandListId} class="bases-style-p-1-eb6a3c">
|
|
240
241
|
<Command.Empty>No results found.</Command.Empty>
|
|
241
242
|
{#each controller.getAllColumns() as column (column.id)}
|
|
242
243
|
<Command.Item
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
+
const commandListId = $props.id();
|
|
2
3
|
import * as Command from "@lapismd/design-core/shadcn/command";
|
|
3
4
|
import * as Popover from "@lapismd/design-core/shadcn/popover";
|
|
4
5
|
import * as Select from "@lapismd/design-core/shadcn/select";
|
|
@@ -66,8 +67,8 @@
|
|
|
66
67
|
</Popover.Trigger>
|
|
67
68
|
<Popover.Content class="bases-style-w-320px-57f3af bases-style-p-0-8a539c" align="start">
|
|
68
69
|
<Command.Root>
|
|
69
|
-
<Command.Input placeholder="Group by property" />
|
|
70
|
-
<Command.List class="bases-style-p-1-eb6a3c">
|
|
70
|
+
<Command.Input aria-controls={commandListId} placeholder="Group by property" />
|
|
71
|
+
<Command.List id={commandListId} class="bases-style-p-1-eb6a3c">
|
|
71
72
|
<Command.Empty>No properties found.</Command.Empty>
|
|
72
73
|
{#each controller.getAllColumns() as column (column.id)}
|
|
73
74
|
<Command.Item onSelect={() => setGroupBy(column.id)}>
|
|
@@ -55,9 +55,7 @@
|
|
|
55
55
|
<Command.Root>
|
|
56
56
|
<div class="bases-style-p-2-7660b4">
|
|
57
57
|
<div class="bases-style-grid-f3c543 bases-style-grid-cols-1-d7c833 bases-style-items-center-3960ff bases-style-gap-2-77a2a2 bases-style-px-2-d5eab2 bases-style-pt-1-6b7d6e">
|
|
58
|
-
<Label for="column_name"
|
|
59
|
-
>Limit number of results</Label
|
|
60
|
-
>
|
|
58
|
+
<Label for="column_name">Limit number of results</Label>
|
|
61
59
|
<Input
|
|
62
60
|
type="number"
|
|
63
61
|
placeholder="e.g 10"
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
+
const commandListId = $props.id();
|
|
2
3
|
import { DragDropProvider } from "@dnd-kit/svelte";
|
|
3
4
|
import type { DragEndEvent } from "@dnd-kit/dom";
|
|
4
5
|
import { arrayMove } from "@dnd-kit/helpers";
|
|
@@ -144,8 +145,8 @@
|
|
|
144
145
|
</Popover.Trigger>
|
|
145
146
|
<Popover.Content class="bases-style-w-max-2f935d bases-style-p-0-8a539c" align="start">
|
|
146
147
|
<Command.Root>
|
|
147
|
-
<Command.Input placeholder="Group by property" />
|
|
148
|
-
<Command.List class="bases-style-p-1-eb6a3c">
|
|
148
|
+
<Command.Input aria-controls={commandListId} placeholder="Group by property" />
|
|
149
|
+
<Command.List id={commandListId} class="bases-style-p-1-eb6a3c">
|
|
149
150
|
<Command.Empty>No results found.</Command.Empty>
|
|
150
151
|
{#each controller.getAllColumns() as column (column.id)}
|
|
151
152
|
<Command.Item onSelect={() => setGroupBy(column.id)}>
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
+
const commandListId = $props.id();
|
|
2
3
|
import { createDraggable, createDroppable } from "@dnd-kit/svelte";
|
|
3
4
|
import * as Popover from "@lapismd/design-core/shadcn/popover";
|
|
4
5
|
import * as Command from "@lapismd/design-core/shadcn/command";
|
|
@@ -124,8 +125,8 @@
|
|
|
124
125
|
</Popover.Trigger>
|
|
125
126
|
<Popover.Content class="bases-style-w-max-2f935d bases-style-p-0-8a539c" align="start">
|
|
126
127
|
<Command.Root>
|
|
127
|
-
<Command.Input placeholder="Find or create" />
|
|
128
|
-
<Command.List class="bases-style-p-1-eb6a3c">
|
|
128
|
+
<Command.Input aria-controls={commandListId} placeholder="Find or create" />
|
|
129
|
+
<Command.List id={commandListId} class="bases-style-p-1-eb6a3c">
|
|
129
130
|
<Command.Empty>No results found.</Command.Empty>
|
|
130
131
|
{#each controller.getAllColumns() as column (column.id)}
|
|
131
132
|
<Command.Item
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
+
const commandListId = $props.id();
|
|
2
3
|
import { Icon } from "@lapis-notes/api/icon";
|
|
3
4
|
import { Label } from "@lapismd/design-core/shadcn/label";
|
|
4
5
|
import { Input } from "@lapismd/design-core/shadcn/input";
|
|
@@ -297,8 +298,8 @@
|
|
|
297
298
|
</Popover.Trigger>
|
|
298
299
|
<Popover.Content class="bases-style-w-310px-8357f2 bases-style-p-0-8a539c" align="start">
|
|
299
300
|
<Command.Root>
|
|
300
|
-
<Command.Input placeholder="Find or create" />
|
|
301
|
-
<Command.List class="bases-style-p-1-eb6a3c">
|
|
301
|
+
<Command.Input aria-controls={`${commandListId}-${option.key}`} placeholder="Find or create" />
|
|
302
|
+
<Command.List id={`${commandListId}-${option.key}`} class="bases-style-p-1-eb6a3c">
|
|
302
303
|
<Command.Empty>No results found.</Command.Empty>
|
|
303
304
|
{#each controller
|
|
304
305
|
.getAllColumns()
|
package/manifest.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "bases",
|
|
3
3
|
"name": "Bases",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.4",
|
|
5
5
|
"minAppVersion": "0.1.0",
|
|
6
6
|
"description": "Build table, card, and grouped views from Markdown properties",
|
|
7
7
|
"author": "Lapis Notes Bases",
|
|
8
8
|
"authorUrl": "https://app.lapis.md",
|
|
9
|
-
"authorAvatarUrl": "https://
|
|
9
|
+
"authorAvatarUrl": "https://gravatar.com/avatar/f7226d5f9cf07af2a6a60d3ab11413abb9d2e2eb60f2d5cce17356845a166155?size=256&d=initials",
|
|
10
10
|
"isDesktopOnly": false,
|
|
11
11
|
"lapis": {
|
|
12
12
|
"manifestVersion": 1,
|