@keepkit/ui 0.28.15 → 0.28.16

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/dist/index.js CHANGED
@@ -4212,6 +4212,9 @@ function KeepButton({
4212
4212
  showLabel && showStateLabel && !iconOnly ? label : null
4213
4213
  ] });
4214
4214
  };
4215
+ const meta = props.item.meta;
4216
+ const title = typeof meta === "object" && meta !== null && "title" in meta && typeof meta.title === "string" ? meta.title.trim() : "";
4217
+ const accessibleLabel = (label) => title ? `${label}: ${title}` : label;
4215
4218
  const sharedProps = {
4216
4219
  ...props,
4217
4220
  onClick: (event) => {
@@ -4231,8 +4234,8 @@ function KeepButton({
4231
4234
  "aria-busy": props["aria-busy"] ?? (view.buttonState.isLoading || view.buttonState.isMutating),
4232
4235
  savedLabel: showSavedLabel ? labels?.saved ?? props.savedLabel ?? view.labels.saved : null,
4233
4236
  unsavedLabel: showSaveLabel ? labels?.unsaved ?? props.unsavedLabel ?? view.labels.save : null,
4234
- savedAriaLabel: labels?.savedAriaLabel ?? props.savedAriaLabel ?? (props.children === void 0 && !showSavedLabel ? removeLabel : void 0),
4235
- unsavedAriaLabel: labels?.unsavedAriaLabel ?? props.unsavedAriaLabel ?? (props.children === void 0 && !showSaveLabel ? view.labels.save : void 0)
4237
+ savedAriaLabel: labels?.savedAriaLabel ?? props.savedAriaLabel ?? (props.children === void 0 && !props.asChild && (iconOnly || !showLabel || !showSavedLabel) ? accessibleLabel(removeLabel) : void 0),
4238
+ unsavedAriaLabel: labels?.unsavedAriaLabel ?? props.unsavedAriaLabel ?? (props.children === void 0 && !props.asChild && (iconOnly || !showLabel || !showSaveLabel) ? accessibleLabel(view.labels.save) : void 0)
4236
4239
  };
4237
4240
  if (!view.customStateLabel) return /* @__PURE__ */ jsx7(CoreKeepButton, { ...sharedProps });
4238
4241
  return /* @__PURE__ */ jsx7(CoreKeepButton, { ...sharedProps, children: (state) => /* @__PURE__ */ jsx7(Fragment4, { children: getStateContent(state) }) });
@@ -4248,9 +4251,89 @@ import {
4248
4251
  useCallback as useCallback3,
4249
4252
  useEffect as useEffect6,
4250
4253
  useId,
4254
+ useLayoutEffect,
4251
4255
  useRef as useRef8,
4252
4256
  useState as useState4
4253
4257
  } from "react";
4258
+ import { createPortal } from "react-dom";
4259
+
4260
+ // src/foundation/theme.tsx
4261
+ import {
4262
+ createContext as createContext3,
4263
+ isValidElement as isValidElement2,
4264
+ useContext as useContext3
4265
+ } from "react";
4266
+ import { jsx as jsx8 } from "react/jsx-runtime";
4267
+ var keepThemeNames = [
4268
+ "default",
4269
+ "ocean",
4270
+ "forest",
4271
+ "sunset",
4272
+ "lavender",
4273
+ "compact",
4274
+ "minimal",
4275
+ "rounded",
4276
+ "high-contrast",
4277
+ "dark"
4278
+ ];
4279
+ var KeepThemeContext = createContext3({});
4280
+ function useKeepTheme() {
4281
+ return useContext3(KeepThemeContext);
4282
+ }
4283
+ function KeepThemeProvider({
4284
+ children,
4285
+ theme = "default",
4286
+ mode = "system",
4287
+ density = "comfortable",
4288
+ radius = "medium",
4289
+ accentColor,
4290
+ highContrast = false,
4291
+ reducedMotion = false,
4292
+ variables,
4293
+ style,
4294
+ className,
4295
+ asChild = false,
4296
+ ...props
4297
+ }) {
4298
+ const themeClassName = [
4299
+ "keep-theme",
4300
+ `keep-theme--${theme}`,
4301
+ `keep-theme--${mode}`,
4302
+ `keep-theme--density-${density}`,
4303
+ `keep-theme--radius-${radius}`,
4304
+ className
4305
+ ].filter(Boolean).join(" ");
4306
+ const themeStyle = {
4307
+ ...style,
4308
+ ...accentColor && !highContrast ? { "--keep-accent": accentColor, "--keep-primary": accentColor } : {},
4309
+ ...variables
4310
+ };
4311
+ const rootProps = {
4312
+ ...props,
4313
+ className: themeClassName,
4314
+ style: themeStyle,
4315
+ "data-keep-theme": theme,
4316
+ "data-theme": theme,
4317
+ "data-mode": mode,
4318
+ "data-density": density,
4319
+ "data-radius": radius,
4320
+ "data-accent-color": accentColor,
4321
+ "data-high-contrast": highContrast ? "true" : void 0,
4322
+ "data-reduced-motion": reducedMotion ? "true" : void 0
4323
+ };
4324
+ const content = asChild ? (() => {
4325
+ if (!isValidElement2(children))
4326
+ throw new Error("KeepThemeProvider with asChild requires a single React element child.");
4327
+ return createSlot(children, rootProps);
4328
+ })() : /* @__PURE__ */ jsx8("div", { ...rootProps, children });
4329
+ return /* @__PURE__ */ jsx8(
4330
+ KeepThemeContext.Provider,
4331
+ {
4332
+ value: { theme, mode, density, radius, accentColor, highContrast, reducedMotion, variables, style },
4333
+ children: content
4334
+ }
4335
+ );
4336
+ }
4254
4337
 
4255
4338
  // src/features/editor/KeepQuickEditor.tsx
4256
4339
  import { useKeepCollections as useKeepCollections3, useKeepItem as useKeepItem3 } from "@keepkit/core/react";
@@ -4260,7 +4343,7 @@ import {
4260
4343
  useRef as useRef7,
4261
4344
  useState as useState3
4262
4345
  } from "react";
4263
- import { Fragment as Fragment5, jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
4346
+ import { Fragment as Fragment5, jsx as jsx9, jsxs as jsxs6 } from "react/jsx-runtime";
4264
4347
  function useKeepQuickEditor(item, options = {}) {
4265
4348
  const { debounceMs = 300, onSaved, onSaveError } = options;
4266
4349
  const itemState = useKeepItem3(item);
@@ -4398,7 +4481,7 @@ function KeepQuickEditor({
4398
4481
  ...props
4399
4482
  }) {
4400
4483
  const view = useKeepQuickEditor(item, { debounceMs, onSaved, onSaveError });
4401
- return /* @__PURE__ */ jsx8(KeepQuickEditorView, { ...props, features, state: view.state });
4484
+ return /* @__PURE__ */ jsx9(KeepQuickEditorView, { ...props, features, state: view.state });
4402
4485
  }
4403
4486
  var DEFAULT_FEATURES = {
4404
4487
  title: false,
@@ -4469,8 +4552,8 @@ function KeepQuickEditorView({
4469
4552
  const statusMessage = state.saveStatus === "dirty" ? unsavedChangesLabel : state.saveStatus === "saving" ? savingLabel : state.saveStatus === "saved" ? savedLabel : state.saveStatus === "error" ? getErrorMessage(state.error, errorLabel) : null;
4470
4553
  const body = typeof children === "function" ? children(state) : children ?? /* @__PURE__ */ jsxs6(Fragment5, { children: [
4471
4554
  enabled.note ? /* @__PURE__ */ jsxs6("label", { "data-keep-field": "note", children: [
4472
- showNoteLabel ? /* @__PURE__ */ jsx8("span", { "data-keep-field-icon": true, children: noteLabel }) : null,
4473
- /* @__PURE__ */ jsx8(
4555
+ showNoteLabel ? /* @__PURE__ */ jsx9("span", { "data-keep-field-icon": true, children: noteLabel }) : null,
4556
+ /* @__PURE__ */ jsx9(
4474
4557
  "textarea",
4475
4558
  {
4476
4559
  value: state.note,
@@ -4480,8 +4563,8 @@ function KeepQuickEditorView({
4480
4563
  )
4481
4564
  ] }) : null,
4482
4565
  enabled.title ? /* @__PURE__ */ jsxs6("label", { "data-keep-field": "title", children: [
4483
- showTitleLabel ? /* @__PURE__ */ jsx8("span", { "data-keep-field-icon": true, children: titleLabel }) : null,
4484
- /* @__PURE__ */ jsx8(
4566
+ showTitleLabel ? /* @__PURE__ */ jsx9("span", { "data-keep-field-icon": true, children: titleLabel }) : null,
4567
+ /* @__PURE__ */ jsx9(
4485
4568
  "input",
4486
4569
  {
4487
4570
  value: state.title,
@@ -4491,8 +4574,8 @@ function KeepQuickEditorView({
4491
4574
  )
4492
4575
  ] }) : null,
4493
4576
  enabled.tags ? /* @__PURE__ */ jsxs6("label", { "data-keep-field": "tags", children: [
4494
- showTagsLabel ? /* @__PURE__ */ jsx8("span", { "data-keep-field-icon": true, children: tagsLabel }) : null,
4495
- /* @__PURE__ */ jsx8(
4577
+ showTagsLabel ? /* @__PURE__ */ jsx9("span", { "data-keep-field-icon": true, children: tagsLabel }) : null,
4578
+ /* @__PURE__ */ jsx9(
4496
4579
  "input",
4497
4580
  {
4498
4581
  value: tagsInput,
@@ -4506,7 +4589,7 @@ function KeepQuickEditorView({
4506
4589
  )
4507
4590
  ] }) : null,
4508
4591
  enabled.collection ? /* @__PURE__ */ jsxs6("label", { "data-keep-field": "collection", children: [
4509
- showCollectionLabel ? /* @__PURE__ */ jsx8("span", { "data-keep-field-icon": true, children: collectionLabel }) : null,
4592
+ showCollectionLabel ? /* @__PURE__ */ jsx9("span", { "data-keep-field-icon": true, children: collectionLabel }) : null,
4510
4593
  /* @__PURE__ */ jsxs6(
4511
4594
  "select",
4512
4595
  {
@@ -4514,13 +4597,13 @@ function KeepQuickEditorView({
4514
4597
  "aria-label": showCollectionLabel ? void 0 : collectionLabel,
4515
4598
  onChange: (event) => state.setCollectionId(event.currentTarget.value || void 0),
4516
4599
  children: [
4517
- /* @__PURE__ */ jsx8("option", { value: "", children: uncategorizedLabel }),
4518
- (collectionIds ?? collections.map((collection) => collection.id)).map((id) => /* @__PURE__ */ jsx8("option", { value: id, children: collectionLabels?.[id] ?? collections.find((collection) => collection.id === id)?.name ?? id }, id))
4600
+ /* @__PURE__ */ jsx9("option", { value: "", children: uncategorizedLabel }),
4601
+ (collectionIds ?? collections.map((collection) => collection.id)).map((id) => /* @__PURE__ */ jsx9("option", { value: id, children: collectionLabels?.[id] ?? collections.find((collection) => collection.id === id)?.name ?? id }, id))
4519
4602
  ]
4520
4603
  }
4521
4604
  )
4522
4605
  ] }) : null,
4523
- statusMessage ? /* @__PURE__ */ jsx8(
4606
+ statusMessage ? /* @__PURE__ */ jsx9(
4524
4607
  "p",
4525
4608
  {
4526
4609
  role: state.saveStatus === "error" ? "alert" : "status",
@@ -4531,7 +4614,7 @@ function KeepQuickEditorView({
4531
4614
  children: statusMessage
4532
4615
  }
4533
4616
  ) : null,
4534
- showSaveButton || state.saveStatus === "error" ? /* @__PURE__ */ jsx8(
4617
+ showSaveButton || state.saveStatus === "error" ? /* @__PURE__ */ jsx9(
4535
4618
  "button",
4536
4619
  {
4537
4620
  type: "submit",
@@ -4541,7 +4624,7 @@ function KeepQuickEditorView({
4541
4624
  children: showSaveLabel ? saveLabel : null
4542
4625
  }
4543
4626
  ) : null,
4544
- onClose ? /* @__PURE__ */ jsx8(
4627
+ onClose ? /* @__PURE__ */ jsx9(
4545
4628
  "button",
4546
4629
  {
4547
4630
  type: "button",
@@ -4553,7 +4636,7 @@ function KeepQuickEditorView({
4553
4636
  }
4554
4637
  ) : null
4555
4638
  ] });
4556
- return /* @__PURE__ */ jsx8(
4639
+ return /* @__PURE__ */ jsx9(
4557
4640
  "form",
4558
4641
  {
4559
4642
  ...props,
@@ -4598,13 +4681,14 @@ function trapFocus(event, root) {
4598
4681
  }
4599
4682
 
4600
4683
  // src/features/actions/KeepSavePopover.tsx
4601
- import { jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
4684
+ import { jsx as jsx10, jsxs as jsxs7 } from "react/jsx-runtime";
4602
4685
  function KeepSavePopover({
4603
4686
  item,
4604
4687
  open: controlledOpen,
4605
4688
  defaultOpen = false,
4606
4689
  onOpenChange,
4607
4690
  dialogLabel,
4691
+ portalContainer,
4608
4692
  buttonProps,
4609
4693
  editorProps,
4610
4694
  children,
@@ -4616,6 +4700,7 @@ function KeepSavePopover({
4616
4700
  const triggerRef = useRef8(null);
4617
4701
  const wasOpenRef = useRef8(isOpen);
4618
4702
  const previousSaved = useRef8(state.isSaved);
4703
+ const initiatedSave = useRef8(false);
4619
4704
  const observedHydration = useRef8(!state.isLoading);
4620
4705
  const panelId = useId();
4621
4706
  const titleId = `${panelId}-title`;
@@ -4639,7 +4724,10 @@ function KeepSavePopover({
4639
4724
  previousSaved.current = state.isSaved;
4640
4725
  return;
4641
4726
  }
4642
- if (!previousSaved.current && state.isSaved) setOpen(true);
4727
+ if (!previousSaved.current && state.isSaved && initiatedSave.current) {
4728
+ initiatedSave.current = false;
4729
+ setOpen(true);
4730
+ }
4643
4731
  previousSaved.current = state.isSaved;
4644
4732
  }, [setOpen, state.isLoading, state.isSaved]);
4645
4733
  useEffect6(() => {
@@ -4647,11 +4735,19 @@ function KeepSavePopover({
4647
4735
  }, [isOpen, setOpen, state.isSaved]);
4648
4736
  const currentItem = state.item;
4649
4737
  return /* @__PURE__ */ jsxs7("div", { ...props, "data-keepkit": "save-popover", "data-open": isOpen ? "true" : "false", children: [
4650
- /* @__PURE__ */ jsx9(
4738
+ /* @__PURE__ */ jsx10(
4651
4739
  KeepButton,
4652
4740
  {
4653
4741
  ...resolvedButtonProps,
4654
4742
  item,
4743
+ onClick: (event) => {
4744
+ resolvedButtonProps.onClick?.(event);
4745
+ if (!event.defaultPrevented && !state.isSaved) initiatedSave.current = true;
4746
+ },
4747
+ onToggleError: (error) => {
4748
+ initiatedSave.current = false;
4749
+ resolvedButtonProps.onToggleError?.(error);
4750
+ },
4655
4751
  asChild: false,
4656
4752
  ref: triggerRef,
4657
4753
  "aria-haspopup": "dialog",
@@ -4659,7 +4755,7 @@ function KeepSavePopover({
4659
4755
  "aria-controls": panelId
4660
4756
  }
4661
4757
  ),
4662
- isOpen && currentItem ? /* @__PURE__ */ jsx9(
4758
+ isOpen && currentItem ? /* @__PURE__ */ jsx10(
4663
4759
  KeepSavePopoverPanel,
4664
4760
  {
4665
4761
  id: panelId,
@@ -4668,6 +4764,7 @@ function KeepSavePopover({
4668
4764
  item: currentItem,
4669
4765
  editorProps,
4670
4766
  triggerRef,
4767
+ portalContainer,
4671
4768
  onClose: () => setOpen(false),
4672
4769
  children
4673
4770
  }
@@ -4681,6 +4778,7 @@ function KeepSavePopoverPanel({
4681
4778
  item,
4682
4779
  editorProps,
4683
4780
  triggerRef,
4781
+ portalContainer,
4684
4782
  onClose,
4685
4783
  children
4686
4784
  }) {
@@ -4689,6 +4787,35 @@ function KeepSavePopoverPanel({
4689
4787
  const panelRef = useRef8(null);
4690
4788
  const closingRef = useRef8(null);
4691
4789
  const closeLabel = useUiLabel("close");
4790
+ const theme = useKeepTheme();
4791
+ const [position, setPosition] = useState4({ left: 8, top: 8, width: 320 });
4792
+ useLayoutEffect(() => {
4793
+ const place = () => {
4794
+ const trigger = triggerRef.current?.getBoundingClientRect();
4795
+ const panel = panelRef.current;
4796
+ if (!trigger || !panel) return;
4797
+ const width = Math.min(Math.max(trigger.width, 320), window.innerWidth - 16);
4798
+ const left = Math.max(8, Math.min(trigger.left, window.innerWidth - width - 8));
4799
+ panel.style.width = `${width}px`;
4800
+ const height = panel.getBoundingClientRect().height;
4801
+ const below = trigger.bottom + 8;
4802
+ const top = Math.max(
4803
+ 8,
4804
+ Math.min(
4805
+ below + height <= window.innerHeight - 8 ? below : trigger.top - height - 8,
4806
+ window.innerHeight - height - 8
4807
+ )
4808
+ );
4809
+ setPosition({ left, top, width });
4810
+ };
4811
+ place();
4812
+ window.addEventListener("resize", place);
4813
+ window.addEventListener("scroll", place, true);
4814
+ return () => {
4815
+ window.removeEventListener("resize", place);
4816
+ window.removeEventListener("scroll", place, true);
4817
+ };
4818
+ }, [triggerRef]);
4692
4819
  const requestClose = useCallback3(() => {
4693
4820
  if (closingRef.current) return closingRef.current;
4694
4821
  const promise = state.flush().then(onClose).catch(() => {
@@ -4715,37 +4842,52 @@ function KeepSavePopoverPanel({
4715
4842
  document.addEventListener("pointerdown", closeFromOutside);
4716
4843
  return () => document.removeEventListener("pointerdown", closeFromOutside);
4717
4844
  }, [requestClose, triggerRef]);
4718
- return /* @__PURE__ */ jsxs7(
4719
- "div",
4720
- {
4721
- ref: panelRef,
4722
- id,
4723
- role: "dialog",
4724
- "aria-labelledby": titleId,
4725
- "data-keep-popover-panel": "true",
4726
- "data-save-status": state.saveStatus,
4727
- onKeyDownCapture: (event) => {
4728
- if (event.key !== "Escape") return;
4729
- event.preventDefault();
4730
- event.stopPropagation();
4731
- void requestClose();
4732
- },
4733
- children: [
4734
- /* @__PURE__ */ jsx9("h2", { id: titleId, "data-keep-popover-title": "true", children: dialogLabel }),
4735
- children,
4736
- /* @__PURE__ */ jsx9(KeepQuickEditorView, { ...editorViewProps, state, focusScopeRef: panelRef }),
4737
- /* @__PURE__ */ jsx9(
4738
- "button",
4739
- {
4740
- type: "button",
4741
- onClick: () => void requestClose(),
4742
- disabled: state.isSaving,
4743
- "data-keep-action": "close-save-popover",
4744
- children: closeLabel
4745
- }
4746
- )
4747
- ]
4748
- }
4845
+ if (typeof document === "undefined") return null;
4846
+ return createPortal(
4847
+ /* @__PURE__ */ jsx10(KeepThemeProvider, { ...theme, children: /* @__PURE__ */ jsxs7(
4848
+ "div",
4849
+ {
4850
+ ref: panelRef,
4851
+ style: {
4852
+ position: "fixed",
4853
+ boxSizing: "border-box",
4854
+ left: position.left,
4855
+ top: position.top,
4856
+ width: position.width,
4857
+ right: "auto",
4858
+ bottom: "auto",
4859
+ maxHeight: "calc(100dvh - 16px)",
4860
+ overflowY: "auto"
4861
+ },
4862
+ id,
4863
+ role: "dialog",
4864
+ "aria-labelledby": titleId,
4865
+ "data-keep-popover-panel": "true",
4866
+ "data-save-status": state.saveStatus,
4867
+ onKeyDownCapture: (event) => {
4868
+ if (event.key !== "Escape") return;
4869
+ event.preventDefault();
4870
+ event.stopPropagation();
4871
+ void requestClose();
4872
+ },
4873
+ children: [
4874
+ /* @__PURE__ */ jsx10("h2", { id: titleId, "data-keep-popover-title": "true", children: dialogLabel }),
4875
+ children,
4876
+ /* @__PURE__ */ jsx10(KeepQuickEditorView, { ...editorViewProps, state, focusScopeRef: panelRef }),
4877
+ /* @__PURE__ */ jsx10(
4878
+ "button",
4879
+ {
4880
+ type: "button",
4881
+ onClick: () => void requestClose(),
4882
+ disabled: state.isSaving,
4883
+ "data-keep-action": "close-save-popover",
4884
+ children: closeLabel
4885
+ }
4886
+ )
4887
+ ]
4888
+ }
4889
+ ) }),
4890
+ portalContainer ?? triggerRef.current?.closest("dialog[open]") ?? document.body
4749
4891
  );
4750
4892
  }
4751
4893
 
@@ -4787,18 +4929,18 @@ function useKeepUndo() {
4787
4929
  }
4788
4930
 
4789
4931
  // src/features/actions/KeepUndo.tsx
4790
- import { jsx as jsx10, jsxs as jsxs8 } from "react/jsx-runtime";
4932
+ import { jsx as jsx11, jsxs as jsxs8 } from "react/jsx-runtime";
4791
4933
  function KeepUndo({ children, label, ...props }) {
4792
4934
  const view = useKeepUndo();
4793
4935
  const showLabel = useUiLabelVisibility("undo");
4794
4936
  if (!view.canUndo) return null;
4795
4937
  return /* @__PURE__ */ jsxs8("div", { ...props, role: "status", "aria-live": "polite", "data-keepkit": "undo", "data-state": "available", children: [
4796
- /* @__PURE__ */ jsx10("span", { "data-keepkit": "undo-message", children: children ?? view.message }),
4938
+ /* @__PURE__ */ jsx11("span", { "data-keepkit": "undo-message", children: children ?? view.message }),
4797
4939
  /* @__PURE__ */ jsxs8("span", { "data-keepkit": "undo-countdown", "aria-hidden": "true", children: [
4798
4940
  view.remainingSeconds,
4799
4941
  "s"
4800
4942
  ] }),
4801
- /* @__PURE__ */ jsx10(
4943
+ /* @__PURE__ */ jsx11(
4802
4944
  "progress",
4803
4945
  {
4804
4946
  "data-keepkit": "undo-progress",
@@ -4808,7 +4950,7 @@ function KeepUndo({ children, label, ...props }) {
4808
4950
  "aria-valuetext": `${view.remainingSeconds}s`
4809
4951
  }
4810
4952
  ),
4811
- /* @__PURE__ */ jsx10(
4953
+ /* @__PURE__ */ jsx11(
4812
4954
  "button",
4813
4955
  {
4814
4956
  type: "button",
@@ -4827,10 +4969,10 @@ import { useEffect as useEffect14, useId as useId4, useRef as useRef14, useState
4827
4969
 
4828
4970
  // src/features/query/KeepActiveFiltersSummary.tsx
4829
4971
  import {
4830
- isValidElement as isValidElement2,
4972
+ isValidElement as isValidElement3,
4831
4973
  useRef as useRef9
4832
4974
  } from "react";
4833
- import { Fragment as Fragment6, jsx as jsx11, jsxs as jsxs9 } from "react/jsx-runtime";
4975
+ import { Fragment as Fragment6, jsx as jsx12, jsxs as jsxs9 } from "react/jsx-runtime";
4834
4976
  function KeepActiveFiltersSummary({
4835
4977
  query,
4836
4978
  search: providedSearch,
@@ -4989,11 +5131,11 @@ function KeepActiveFiltersSummary({
4989
5131
  };
4990
5132
  const contentChildren = asChild && isElement(children) ? void 0 : children;
4991
5133
  const body = typeof contentChildren === "function" ? contentChildren(state) : contentChildren ?? (hasFilters || canReset ? /* @__PURE__ */ jsxs9(Fragment6, { children: [
4992
- showActiveFiltersLabel ? /* @__PURE__ */ jsx11("span", { "data-active-filters-label": "true", children: activeFiltersLabel }) : null,
5134
+ showActiveFiltersLabel ? /* @__PURE__ */ jsx12("span", { "data-active-filters-label": "true", children: activeFiltersLabel }) : null,
4993
5135
  /* @__PURE__ */ jsxs9("ul", { "data-active-filters-list": "true", children: [
4994
5136
  search ? /* @__PURE__ */ jsxs9("li", { "data-filter-kind": "search", children: [
4995
- /* @__PURE__ */ jsx11("span", { "data-filter-value": "true", children: search }),
4996
- /* @__PURE__ */ jsx11(
5137
+ /* @__PURE__ */ jsx12("span", { "data-filter-value": "true", children: search }),
5138
+ /* @__PURE__ */ jsx12(
4997
5139
  "button",
4998
5140
  {
4999
5141
  type: "button",
@@ -5009,8 +5151,8 @@ function KeepActiveFiltersSummary({
5009
5151
  )
5010
5152
  ] }) : null,
5011
5153
  tags.map((tag, tagIndex) => /* @__PURE__ */ jsxs9("li", { "data-filter-kind": "tag", children: [
5012
- /* @__PURE__ */ jsx11("span", { "data-filter-value": "true", children: tag }),
5013
- /* @__PURE__ */ jsx11(
5154
+ /* @__PURE__ */ jsx12("span", { "data-filter-value": "true", children: tag }),
5155
+ /* @__PURE__ */ jsx12(
5014
5156
  "button",
5015
5157
  {
5016
5158
  type: "button",
@@ -5026,8 +5168,8 @@ function KeepActiveFiltersSummary({
5026
5168
  )
5027
5169
  ] }, tag)),
5028
5170
  collection && collectionLabel ? /* @__PURE__ */ jsxs9("li", { "data-filter-kind": "collection", children: [
5029
- /* @__PURE__ */ jsx11("span", { "data-filter-value": "true", children: collectionLabel }),
5030
- /* @__PURE__ */ jsx11(
5171
+ /* @__PURE__ */ jsx12("span", { "data-filter-value": "true", children: collectionLabel }),
5172
+ /* @__PURE__ */ jsx12(
5031
5173
  "button",
5032
5174
  {
5033
5175
  type: "button",
@@ -5046,8 +5188,8 @@ function KeepActiveFiltersSummary({
5046
5188
  const index = organizationIndex + filterIndex;
5047
5189
  const label = `${field}: ${value}`;
5048
5190
  return /* @__PURE__ */ jsxs9("li", { "data-filter-kind": `organization-${field}`, children: [
5049
- /* @__PURE__ */ jsx11("span", { "data-filter-value": "true", children: label }),
5050
- /* @__PURE__ */ jsx11(
5191
+ /* @__PURE__ */ jsx12("span", { "data-filter-value": "true", children: label }),
5192
+ /* @__PURE__ */ jsx12(
5051
5193
  "button",
5052
5194
  {
5053
5195
  type: "button",
@@ -5066,8 +5208,8 @@ function KeepActiveFiltersSummary({
5066
5208
  activityFilters.map((filter, filterIndex) => {
5067
5209
  const index = activityIndex + filterIndex;
5068
5210
  return /* @__PURE__ */ jsxs9("li", { "data-filter-kind": `activity-${filter.key}`, children: [
5069
- /* @__PURE__ */ jsx11("span", { "data-filter-value": "true", children: filter.label }),
5070
- /* @__PURE__ */ jsx11(
5211
+ /* @__PURE__ */ jsx12("span", { "data-filter-value": "true", children: filter.label }),
5212
+ /* @__PURE__ */ jsx12(
5071
5213
  "button",
5072
5214
  {
5073
5215
  type: "button",
@@ -5084,8 +5226,8 @@ function KeepActiveFiltersSummary({
5084
5226
  ] }, filter.key);
5085
5227
  }),
5086
5228
  savedBetweenLabel ? /* @__PURE__ */ jsxs9("li", { "data-filter-kind": "saved-between", children: [
5087
- /* @__PURE__ */ jsx11("span", { "data-filter-value": "true", children: savedBetweenLabel }),
5088
- /* @__PURE__ */ jsx11(
5229
+ /* @__PURE__ */ jsx12("span", { "data-filter-value": "true", children: savedBetweenLabel }),
5230
+ /* @__PURE__ */ jsx12(
5089
5231
  "button",
5090
5232
  {
5091
5233
  type: "button",
@@ -5101,8 +5243,8 @@ function KeepActiveFiltersSummary({
5101
5243
  )
5102
5244
  ] }) : null,
5103
5245
  hasArchiveScope && resolvedArchiveScopeLabel ? /* @__PURE__ */ jsxs9("li", { "data-filter-kind": "archive-scope", children: [
5104
- /* @__PURE__ */ jsx11("span", { "data-filter-value": "true", children: resolvedArchiveScopeLabel }),
5105
- /* @__PURE__ */ jsx11(
5246
+ /* @__PURE__ */ jsx12("span", { "data-filter-value": "true", children: resolvedArchiveScopeLabel }),
5247
+ /* @__PURE__ */ jsx12(
5106
5248
  "button",
5107
5249
  {
5108
5250
  type: "button",
@@ -5123,8 +5265,8 @@ function KeepActiveFiltersSummary({
5123
5265
  " ",
5124
5266
  totalCount === 1 ? collectionItemLabel : collectionItemsLabel
5125
5267
  ] }) : null,
5126
- hasFilters ? /* @__PURE__ */ jsx11("button", { type: "button", "data-keep-action": "clear-filters", onClick: state.clear, children: clearAllLabel || clearLabel }) : null,
5127
- canReset ? /* @__PURE__ */ jsx11("button", { type: "button", "data-keep-action": "reset-filters", onClick: state.reset, children: resetLabel }) : null
5268
+ hasFilters ? /* @__PURE__ */ jsx12("button", { type: "button", "data-keep-action": "clear-filters", onClick: state.clear, children: clearAllLabel || clearLabel }) : null,
5269
+ canReset ? /* @__PURE__ */ jsx12("button", { type: "button", "data-keep-action": "reset-filters", onClick: state.reset, children: resetLabel }) : null
5128
5270
  ] }) : null);
5129
5271
  if (!hasFilters && !canReset && !asChild && contentChildren === void 0) return null;
5130
5272
  return renderRoot(
@@ -5180,7 +5322,7 @@ function isCjkLocale(locale) {
5180
5322
  return /^(?:ja|ko|zh)/i.test(locale ?? "");
5181
5323
  }
5182
5324
  function isElement(value) {
5183
- return isValidElement2(value);
5325
+ return isValidElement3(value);
5184
5326
  }
5185
5327
  function focusFilterFallback(scope) {
5186
5328
  const searchInput = scope?.querySelector('[data-keep-action="search"]');
@@ -5202,7 +5344,7 @@ function focusFilterFallback(scope) {
5202
5344
 
5203
5345
  // src/features/query/KeepArchiveScopeSelect.tsx
5204
5346
  import { useState as useState6 } from "react";
5205
- import { jsx as jsx12, jsxs as jsxs10 } from "react/jsx-runtime";
5347
+ import { jsx as jsx13, jsxs as jsxs10 } from "react/jsx-runtime";
5206
5348
  function KeepArchiveScopeSelect({
5207
5349
  value: controlledValue,
5208
5350
  defaultValue = "active",
@@ -5222,7 +5364,7 @@ function KeepArchiveScopeSelect({
5222
5364
  onValueChange?.(next);
5223
5365
  };
5224
5366
  return /* @__PURE__ */ jsxs10("label", { "data-keepkit": "archive-scope", children: [
5225
- /* @__PURE__ */ jsx12("span", { children: label }),
5367
+ /* @__PURE__ */ jsx13("span", { children: label }),
5226
5368
  /* @__PURE__ */ jsxs10(
5227
5369
  "select",
5228
5370
  {
@@ -5232,9 +5374,9 @@ function KeepArchiveScopeSelect({
5232
5374
  "data-keep-action": "archive-scope",
5233
5375
  onChange: (event) => handleChange(event.currentTarget.value),
5234
5376
  children: [
5235
- /* @__PURE__ */ jsx12("option", { value: "active", children: activeLabel }),
5236
- /* @__PURE__ */ jsx12("option", { value: "archived", children: archivedLabel }),
5237
- /* @__PURE__ */ jsx12("option", { value: "all", children: allLabel })
5377
+ /* @__PURE__ */ jsx13("option", { value: "active", children: activeLabel }),
5378
+ /* @__PURE__ */ jsx13("option", { value: "archived", children: archivedLabel }),
5379
+ /* @__PURE__ */ jsx13("option", { value: "all", children: allLabel })
5238
5380
  ]
5239
5381
  }
5240
5382
  )
@@ -5244,7 +5386,7 @@ function KeepArchiveScopeSelect({
5244
5386
  // src/features/query/KeepCollectionFilter.tsx
5245
5387
  import { useKeepCollections as useKeepCollections4, useKeepContext as useKeepContext3 } from "@keepkit/core/react";
5246
5388
  import { useState as useState7 } from "react";
5247
- import { jsx as jsx13, jsxs as jsxs11 } from "react/jsx-runtime";
5389
+ import { jsx as jsx14, jsxs as jsxs11 } from "react/jsx-runtime";
5248
5390
  function useCollectionOptions(collectionLabels, collections) {
5249
5391
  return collections.map((collection) => ({
5250
5392
  id: collection.id,
@@ -5283,8 +5425,8 @@ function KeepCollectionSelect({
5283
5425
  onChange: (event) => handleChange(event.currentTarget.value),
5284
5426
  "data-keep-action": "move-collection",
5285
5427
  children: [
5286
- /* @__PURE__ */ jsx13("option", { value: "", children: uncategorized }),
5287
- options.map((option) => /* @__PURE__ */ jsx13("option", { value: option.id, children: option.label }, option.id))
5428
+ /* @__PURE__ */ jsx14("option", { value: "", children: uncategorized }),
5429
+ options.map((option) => /* @__PURE__ */ jsx14("option", { value: option.id, children: option.label }, option.id))
5288
5430
  ]
5289
5431
  }
5290
5432
  );
@@ -5316,7 +5458,7 @@ function KeepCollectionFilter({
5316
5458
  onChange?.(resolved);
5317
5459
  };
5318
5460
  return /* @__PURE__ */ jsxs11("label", { "data-keepkit": "collection-filter", children: [
5319
- showCollectionLabel ? /* @__PURE__ */ jsx13("span", { children: collectionLabel }) : null,
5461
+ showCollectionLabel ? /* @__PURE__ */ jsx14("span", { children: collectionLabel }) : null,
5320
5462
  /* @__PURE__ */ jsxs11(
5321
5463
  "select",
5322
5464
  {
@@ -5326,9 +5468,9 @@ function KeepCollectionFilter({
5326
5468
  onChange: (event) => handleChange(event.currentTarget.value),
5327
5469
  "data-keep-action": "filter-collection",
5328
5470
  children: [
5329
- /* @__PURE__ */ jsx13("option", { value: "", children: all }),
5330
- /* @__PURE__ */ jsx13("option", { value: "__uncategorized__", children: uncategorized }),
5331
- options.map((option) => /* @__PURE__ */ jsx13("option", { value: option.id, children: option.label }, option.id))
5471
+ /* @__PURE__ */ jsx14("option", { value: "", children: all }),
5472
+ /* @__PURE__ */ jsx14("option", { value: "__uncategorized__", children: uncategorized }),
5473
+ options.map((option) => /* @__PURE__ */ jsx14("option", { value: option.id, children: option.label }, option.id))
5332
5474
  ]
5333
5475
  }
5334
5476
  )
@@ -5336,7 +5478,7 @@ function KeepCollectionFilter({
5336
5478
  }
5337
5479
 
5338
5480
  // src/features/query/KeepTagFilter.tsx
5339
- import { isValidElement as isValidElement3 } from "react";
5481
+ import { isValidElement as isValidElement4 } from "react";
5340
5482
 
5341
5483
  // src/features/query/hooks/useKeepTagFilter.ts
5342
5484
  import { useKeepList as useKeepList2 } from "@keepkit/core/react";
@@ -5408,7 +5550,7 @@ function useKeepTagFilter(options) {
5408
5550
  }
5409
5551
 
5410
5552
  // src/features/query/KeepTagFilter.tsx
5411
- import { jsx as jsx14, jsxs as jsxs12 } from "react/jsx-runtime";
5553
+ import { jsx as jsx15, jsxs as jsxs12 } from "react/jsx-runtime";
5412
5554
  function KeepTagFilter({
5413
5555
  query,
5414
5556
  value: controlledValue,
@@ -5440,10 +5582,10 @@ function KeepTagFilter({
5440
5582
  const showFilterLabel = useUiLabelVisibility("filterTags");
5441
5583
  const showAllTagsLabel = useUiLabelVisibility("allTags");
5442
5584
  const isMulti = controlledValues !== void 0 || defaultValues !== void 0 || onValuesChange !== void 0;
5443
- const contentChildren = asChild && isValidElement3(children) ? void 0 : children;
5585
+ const contentChildren = asChild && isValidElement4(children) ? void 0 : children;
5444
5586
  const body = render ? render(view.state) : typeof contentChildren === "function" ? contentChildren(view.state) : contentChildren ?? /* @__PURE__ */ jsxs12("fieldset", { "aria-label": showFilterLabel ? void 0 : ariaLabel ?? view.labels.aria, children: [
5445
- showFilterLabel ? /* @__PURE__ */ jsx14("legend", { children: ariaLabel ?? view.labels.aria }) : null,
5446
- /* @__PURE__ */ jsx14(
5587
+ showFilterLabel ? /* @__PURE__ */ jsx15("legend", { children: ariaLabel ?? view.labels.aria }) : null,
5588
+ /* @__PURE__ */ jsx15(
5447
5589
  "button",
5448
5590
  {
5449
5591
  type: "button",
@@ -5478,7 +5620,7 @@ function KeepTagFilter({
5478
5620
  ] });
5479
5621
  return renderRoot(
5480
5622
  asChild,
5481
- isValidElement3(children) ? children : void 0,
5623
+ isValidElement4(children) ? children : void 0,
5482
5624
  {
5483
5625
  ...rootProps,
5484
5626
  className,
@@ -5571,7 +5713,7 @@ function getVisiblePages(currentPage, pageCount, maxPageButtons) {
5571
5713
  }
5572
5714
 
5573
5715
  // src/features/query/query-controls.tsx
5574
- import { Fragment as Fragment7, jsx as jsx15, jsxs as jsxs13 } from "react/jsx-runtime";
5716
+ import { Fragment as Fragment7, jsx as jsx16, jsxs as jsxs13 } from "react/jsx-runtime";
5575
5717
  function KeepSearchInput({
5576
5718
  value: controlledValue,
5577
5719
  defaultValue = "",
@@ -5582,7 +5724,7 @@ function KeepSearchInput({
5582
5724
  ...props
5583
5725
  }) {
5584
5726
  const view = useKeepSearchInput({ controlledValue, defaultValue, debounceMs, onValueChange });
5585
- return /* @__PURE__ */ jsx15(
5727
+ return /* @__PURE__ */ jsx16(
5586
5728
  "input",
5587
5729
  {
5588
5730
  ...props,
@@ -5609,13 +5751,13 @@ function KeepSortSelect({
5609
5751
  }) {
5610
5752
  const view = useKeepSortSelect({ controlledValue, defaultValue, onValueChange, onManualSort });
5611
5753
  const options = children ?? /* @__PURE__ */ jsxs13(Fragment7, { children: [
5612
- onManualSort || view.value === "manual" ? /* @__PURE__ */ jsx15("option", { value: "manual", children: view.labels.manualSort }) : null,
5613
- /* @__PURE__ */ jsx15("option", { value: "updatedAt:desc", children: view.labels.updatedNewest }),
5614
- /* @__PURE__ */ jsx15("option", { value: "updatedAt:asc", children: view.labels.updatedOldest }),
5615
- /* @__PURE__ */ jsx15("option", { value: "savedAt:desc", children: view.labels.savedNewest }),
5616
- /* @__PURE__ */ jsx15("option", { value: "savedAt:asc", children: view.labels.savedOldest })
5754
+ onManualSort || view.value === "manual" ? /* @__PURE__ */ jsx16("option", { value: "manual", children: view.labels.manualSort }) : null,
5755
+ /* @__PURE__ */ jsx16("option", { value: "updatedAt:desc", children: view.labels.updatedNewest }),
5756
+ /* @__PURE__ */ jsx16("option", { value: "updatedAt:asc", children: view.labels.updatedOldest }),
5757
+ /* @__PURE__ */ jsx16("option", { value: "savedAt:desc", children: view.labels.savedNewest }),
5758
+ /* @__PURE__ */ jsx16("option", { value: "savedAt:asc", children: view.labels.savedOldest })
5617
5759
  ] });
5618
- return /* @__PURE__ */ jsx15(
5760
+ return /* @__PURE__ */ jsx16(
5619
5761
  "select",
5620
5762
  {
5621
5763
  ...props,
@@ -5649,9 +5791,9 @@ function KeepPagination({
5649
5791
  "data-state": view.pageCount > 1 ? "active" : "idle"
5650
5792
  };
5651
5793
  if (render)
5652
- return /* @__PURE__ */ jsx15("nav", { ...navProps, children: render({ page: view.currentPage, pageCount: view.pageCount, goToPage: view.goToPage }) });
5794
+ return /* @__PURE__ */ jsx16("nav", { ...navProps, children: render({ page: view.currentPage, pageCount: view.pageCount, goToPage: view.goToPage }) });
5653
5795
  return /* @__PURE__ */ jsxs13("nav", { ...navProps, children: [
5654
- /* @__PURE__ */ jsx15(
5796
+ /* @__PURE__ */ jsx16(
5655
5797
  "button",
5656
5798
  {
5657
5799
  type: "button",
@@ -5662,7 +5804,7 @@ function KeepPagination({
5662
5804
  children: showPreviousLabel ? view.labels.previous : null
5663
5805
  }
5664
5806
  ),
5665
- view.visiblePages.map((nextPage) => /* @__PURE__ */ jsx15(
5807
+ view.visiblePages.map((nextPage) => /* @__PURE__ */ jsx16(
5666
5808
  "button",
5667
5809
  {
5668
5810
  type: "button",
@@ -5674,7 +5816,7 @@ function KeepPagination({
5674
5816
  },
5675
5817
  nextPage
5676
5818
  )),
5677
- /* @__PURE__ */ jsx15(
5819
+ /* @__PURE__ */ jsx16(
5678
5820
  "button",
5679
5821
  {
5680
5822
  type: "button",
@@ -5815,7 +5957,7 @@ function notifyChange() {
5815
5957
  }
5816
5958
 
5817
5959
  // src/features/saved-views/KeepSavedViews.tsx
5818
- import { jsx as jsx16, jsxs as jsxs14 } from "react/jsx-runtime";
5960
+ import { jsx as jsx17, jsxs as jsxs14 } from "react/jsx-runtime";
5819
5961
  function KeepSavedViews({ storage, onApply }) {
5820
5962
  const { views, error, updateView, removeView, applyView } = useKeepSavedViews(storage);
5821
5963
  const savedViewsLabel = useUiLabel("savedViews");
@@ -5825,8 +5967,8 @@ function KeepSavedViews({ storage, onApply }) {
5825
5967
  const deleteLabel = useUiLabel("deleteSavedView");
5826
5968
  const loadErrorLabel = useUiLabel("savedViewsLoadError");
5827
5969
  return /* @__PURE__ */ jsxs14("nav", { "aria-label": savedViewsLabel, "data-keepkit": "saved-views", children: [
5828
- /* @__PURE__ */ jsx16("ul", { children: views.map((view) => /* @__PURE__ */ jsxs14("li", { children: [
5829
- /* @__PURE__ */ jsx16(
5970
+ /* @__PURE__ */ jsx17("ul", { children: views.map((view) => /* @__PURE__ */ jsxs14("li", { children: [
5971
+ /* @__PURE__ */ jsx17(
5830
5972
  "button",
5831
5973
  {
5832
5974
  type: "button",
@@ -5834,7 +5976,7 @@ function KeepSavedViews({ storage, onApply }) {
5834
5976
  children: view.name
5835
5977
  }
5836
5978
  ),
5837
- /* @__PURE__ */ jsx16(
5979
+ /* @__PURE__ */ jsx17(
5838
5980
  "button",
5839
5981
  {
5840
5982
  type: "button",
@@ -5844,10 +5986,10 @@ function KeepSavedViews({ storage, onApply }) {
5844
5986
  }
5845
5987
  ),
5846
5988
  /* @__PURE__ */ jsxs14("details", { children: [
5847
- /* @__PURE__ */ jsx16("summary", { children: `${renameLabel} ${view.name}` }),
5848
- /* @__PURE__ */ jsx16(RenameForm, { name: view.name, onRename: (name) => updateView(view.id, { name }) })
5989
+ /* @__PURE__ */ jsx17("summary", { children: `${renameLabel} ${view.name}` }),
5990
+ /* @__PURE__ */ jsx17(RenameForm, { name: view.name, onRename: (name) => updateView(view.id, { name }) })
5849
5991
  ] }),
5850
- /* @__PURE__ */ jsx16(
5992
+ /* @__PURE__ */ jsx17(
5851
5993
  "button",
5852
5994
  {
5853
5995
  type: "button",
@@ -5857,7 +5999,7 @@ function KeepSavedViews({ storage, onApply }) {
5857
5999
  }
5858
6000
  )
5859
6001
  ] }, view.id)) }),
5860
- error ? /* @__PURE__ */ jsx16("p", { role: "alert", children: error instanceof Error ? error.message : loadErrorLabel }) : null
6002
+ error ? /* @__PURE__ */ jsx17("p", { role: "alert", children: error instanceof Error ? error.message : loadErrorLabel }) : null
5861
6003
  ] });
5862
6004
  }
5863
6005
  function KeepSaveViewButton({
@@ -5884,10 +6026,10 @@ function KeepSaveViewButton({
5884
6026
  children: [
5885
6027
  /* @__PURE__ */ jsxs14("label", { children: [
5886
6028
  nameLabel,
5887
- /* @__PURE__ */ jsx16("input", { value: name, onChange: (event) => setName(event.currentTarget.value), required: true })
6029
+ /* @__PURE__ */ jsx17("input", { value: name, onChange: (event) => setName(event.currentTarget.value), required: true })
5888
6030
  ] }),
5889
- /* @__PURE__ */ jsx16("button", { type: "submit", disabled: !name.trim(), children: saveLabel }),
5890
- error ? /* @__PURE__ */ jsx16("p", { role: "alert", children: error }) : null
6031
+ /* @__PURE__ */ jsx17("button", { type: "submit", disabled: !name.trim(), children: saveLabel }),
6032
+ error ? /* @__PURE__ */ jsx17("p", { role: "alert", children: error }) : null
5891
6033
  ]
5892
6034
  }
5893
6035
  );
@@ -5906,9 +6048,9 @@ function RenameForm({ name, onRename }) {
5906
6048
  children: [
5907
6049
  /* @__PURE__ */ jsxs14("label", { children: [
5908
6050
  nameLabel,
5909
- /* @__PURE__ */ jsx16("input", { value, onChange: (event) => setValue(event.currentTarget.value), required: true })
6051
+ /* @__PURE__ */ jsx17("input", { value, onChange: (event) => setValue(event.currentTarget.value), required: true })
5910
6052
  ] }),
5911
- /* @__PURE__ */ jsx16("button", { type: "submit", children: renameLabel })
6053
+ /* @__PURE__ */ jsx17("button", { type: "submit", children: renameLabel })
5912
6054
  ]
5913
6055
  }
5914
6056
  );
@@ -6175,7 +6317,7 @@ function scopeFromArchived(archived) {
6175
6317
  // src/features/collection/KeepCollectionCreate.tsx
6176
6318
  import { useKeepCollections as useKeepCollections5, useKeepContext as useKeepContext4 } from "@keepkit/core/react";
6177
6319
  import { useId as useId2, useState as useState13 } from "react";
6178
- import { jsx as jsx17, jsxs as jsxs15 } from "react/jsx-runtime";
6320
+ import { jsx as jsx18, jsxs as jsxs15 } from "react/jsx-runtime";
6179
6321
  function KeepCollectionCreate({
6180
6322
  onCreated,
6181
6323
  onError,
@@ -6231,9 +6373,9 @@ function KeepCollectionCreate({
6231
6373
  "data-state": error ? "error" : isSubmitting ? "submitting" : "idle",
6232
6374
  onSubmit: handleSubmit,
6233
6375
  children: [
6234
- showLabel ? /* @__PURE__ */ jsx17("label", { htmlFor: inputId, children: label ?? resolvedLabel }) : null,
6376
+ showLabel ? /* @__PURE__ */ jsx18("label", { htmlFor: inputId, children: label ?? resolvedLabel }) : null,
6235
6377
  /* @__PURE__ */ jsxs15("div", { "data-keepkit": "collection-create-row", children: [
6236
- /* @__PURE__ */ jsx17(
6378
+ /* @__PURE__ */ jsx18(
6237
6379
  "input",
6238
6380
  {
6239
6381
  ...inputProps,
@@ -6251,7 +6393,7 @@ function KeepCollectionCreate({
6251
6393
  "data-keep-action": "collection-name-input"
6252
6394
  }
6253
6395
  ),
6254
- /* @__PURE__ */ jsx17(
6396
+ /* @__PURE__ */ jsx18(
6255
6397
  "button",
6256
6398
  {
6257
6399
  type: "submit",
@@ -6262,7 +6404,7 @@ function KeepCollectionCreate({
6262
6404
  }
6263
6405
  )
6264
6406
  ] }),
6265
- error ? /* @__PURE__ */ jsx17("p", { role: "alert", children: error }) : null
6407
+ error ? /* @__PURE__ */ jsx18("p", { role: "alert", children: error }) : null
6266
6408
  ]
6267
6409
  }
6268
6410
  );
@@ -6270,7 +6412,7 @@ function KeepCollectionCreate({
6270
6412
 
6271
6413
  // src/features/collection/KeepInlineSelection.tsx
6272
6414
  import { useEffect as useEffect11, useRef as useRef10, useState as useState14 } from "react";
6273
- import { Fragment as Fragment8, jsx as jsx18, jsxs as jsxs16 } from "react/jsx-runtime";
6415
+ import { Fragment as Fragment8, jsx as jsx19, jsxs as jsxs16 } from "react/jsx-runtime";
6274
6416
  function KeepInlineSelection({
6275
6417
  query,
6276
6418
  children,
@@ -6317,7 +6459,7 @@ function KeepInlineSelection({
6317
6459
  const archivedOnly = query.archiveScope === "archived" || query.archived === true;
6318
6460
  return /* @__PURE__ */ jsxs16(Fragment8, { children: [
6319
6461
  /* @__PURE__ */ jsxs16("fieldset", { "data-keepkit": "inline-selection", "aria-label": selectLabel, "aria-busy": state.isMutating, children: [
6320
- /* @__PURE__ */ jsx18(
6462
+ /* @__PURE__ */ jsx19(
6321
6463
  "button",
6322
6464
  {
6323
6465
  type: "button",
@@ -6332,7 +6474,7 @@ function KeepInlineSelection({
6332
6474
  ),
6333
6475
  selecting ? /* @__PURE__ */ jsxs16(Fragment8, { children: [
6334
6476
  /* @__PURE__ */ jsxs16("label", { children: [
6335
- /* @__PURE__ */ jsx18(
6477
+ /* @__PURE__ */ jsx19(
6336
6478
  "input",
6337
6479
  {
6338
6480
  type: "checkbox",
@@ -6358,30 +6500,30 @@ function KeepInlineSelection({
6358
6500
  /* @__PURE__ */ jsxs16("label", { children: [
6359
6501
  collectionLabel,
6360
6502
  /* @__PURE__ */ jsxs16("select", { value: state.collectionId, onChange: (event) => state.setCollectionId(event.currentTarget.value), children: [
6361
- /* @__PURE__ */ jsx18("option", { value: "", children: uncategorizedLabel }),
6362
- state.collections.map((collection) => /* @__PURE__ */ jsx18("option", { value: collection.id, children: collection.name }, collection.id))
6503
+ /* @__PURE__ */ jsx19("option", { value: "", children: uncategorizedLabel }),
6504
+ state.collections.map((collection) => /* @__PURE__ */ jsx19("option", { value: collection.id, children: collection.name }, collection.id))
6363
6505
  ] })
6364
6506
  ] }),
6365
- /* @__PURE__ */ jsx18("button", { type: "button", onClick: () => run(state.moveToCollection), children: moveLabel }),
6366
- /* @__PURE__ */ jsx18("button", { type: "button", onClick: () => run(archivedOnly ? state.unarchive : state.archive), children: archivedOnly ? unarchiveLabel : archiveLabel }),
6507
+ /* @__PURE__ */ jsx19("button", { type: "button", onClick: () => run(state.moveToCollection), children: moveLabel }),
6508
+ /* @__PURE__ */ jsx19("button", { type: "button", onClick: () => run(archivedOnly ? state.unarchive : state.archive), children: archivedOnly ? unarchiveLabel : archiveLabel }),
6367
6509
  /* @__PURE__ */ jsxs16("details", { children: [
6368
- /* @__PURE__ */ jsx18("summary", { children: moreLabel }),
6510
+ /* @__PURE__ */ jsx19("summary", { children: moreLabel }),
6369
6511
  /* @__PURE__ */ jsxs16("div", { children: [
6370
6512
  /* @__PURE__ */ jsxs16("label", { children: [
6371
6513
  tagsLabel,
6372
- /* @__PURE__ */ jsx18("input", { value: state.tagsInput, onChange: (event) => state.setTagsInput(event.currentTarget.value) })
6514
+ /* @__PURE__ */ jsx19("input", { value: state.tagsInput, onChange: (event) => state.setTagsInput(event.currentTarget.value) })
6373
6515
  ] }),
6374
- /* @__PURE__ */ jsx18("button", { type: "button", onClick: () => run(state.addTags), children: addTagsLabel }),
6375
- /* @__PURE__ */ jsx18("button", { type: "button", onClick: () => run(state.removeTags), children: removeTagsLabel }),
6376
- /* @__PURE__ */ jsx18("button", { type: "button", onClick: () => run(state.updateTags), children: applyTagsLabel }),
6377
- /* @__PURE__ */ jsx18("button", { type: "button", onClick: () => run(state.pin), children: pinLabel }),
6378
- /* @__PURE__ */ jsx18("button", { type: "button", onClick: () => run(state.unpin), children: unpinLabel }),
6379
- /* @__PURE__ */ jsx18("button", { ref: removalTrigger, type: "button", onClick: () => run(state.remove), children: removeLabel })
6516
+ /* @__PURE__ */ jsx19("button", { type: "button", onClick: () => run(state.addTags), children: addTagsLabel }),
6517
+ /* @__PURE__ */ jsx19("button", { type: "button", onClick: () => run(state.removeTags), children: removeTagsLabel }),
6518
+ /* @__PURE__ */ jsx19("button", { type: "button", onClick: () => run(state.updateTags), children: applyTagsLabel }),
6519
+ /* @__PURE__ */ jsx19("button", { type: "button", onClick: () => run(state.pin), children: pinLabel }),
6520
+ /* @__PURE__ */ jsx19("button", { type: "button", onClick: () => run(state.unpin), children: unpinLabel }),
6521
+ /* @__PURE__ */ jsx19("button", { ref: removalTrigger, type: "button", onClick: () => run(state.remove), children: removeLabel })
6380
6522
  ] })
6381
6523
  ] })
6382
6524
  ] }) : null,
6383
- /* @__PURE__ */ jsx18(KeepRemovalConfirmation, { state, triggerRef: removalTrigger }),
6384
- selecting && state.error ? /* @__PURE__ */ jsx18("p", { role: "alert", children: getErrorMessage(state.error, errorLabel) }) : null
6525
+ /* @__PURE__ */ jsx19(KeepRemovalConfirmation, { state, triggerRef: removalTrigger }),
6526
+ selecting && state.error ? /* @__PURE__ */ jsx19("p", { role: "alert", children: getErrorMessage(state.error, errorLabel) }) : null
6385
6527
  ] }),
6386
6528
  children(
6387
6529
  selecting ? { selectedIds, onSelectedIdsChange: setSelectedIds, disabled: state.isMutating } : void 0
@@ -6391,15 +6533,15 @@ function KeepInlineSelection({
6391
6533
 
6392
6534
  // src/features/collection/KeepList.tsx
6393
6535
  import { KeepErrorBoundary } from "@keepkit/core/react";
6394
- import { isValidElement as isValidElement6 } from "react";
6536
+ import { isValidElement as isValidElement7 } from "react";
6395
6537
 
6396
6538
  // src/features/item/KeepItemCard.tsx
6397
6539
  import { useKeepCollections as useKeepCollections6 } from "@keepkit/core/react";
6398
6540
  import {
6399
- createContext as createContext3,
6541
+ createContext as createContext4,
6400
6542
  createElement as createElement2,
6401
- isValidElement as isValidElement4,
6402
- useContext as useContext3,
6543
+ isValidElement as isValidElement5,
6544
+ useContext as useContext4,
6403
6545
  useEffect as useEffect12,
6404
6546
  useId as useId3,
6405
6547
  useRef as useRef11,
@@ -6446,7 +6588,7 @@ function getDisplayStatus(status) {
6446
6588
  }
6447
6589
 
6448
6590
  // src/features/item/KeepItemStatusBadge.tsx
6449
- import { Fragment as Fragment9, jsx as jsx19, jsxs as jsxs17 } from "react/jsx-runtime";
6591
+ import { Fragment as Fragment9, jsx as jsx20, jsxs as jsxs17 } from "react/jsx-runtime";
6450
6592
  function KeepItemStatusBadge({ status = "available", label, className, ...props }) {
6451
6593
  const view = useKeepItemStatusBadge(status);
6452
6594
  return /* @__PURE__ */ jsxs17(
@@ -6460,8 +6602,8 @@ function KeepItemStatusBadge({ status = "available", label, className, ...props
6460
6602
  "data-status": status,
6461
6603
  "data-item-status": view.resolvedStatus,
6462
6604
  children: [
6463
- /* @__PURE__ */ jsx19(StatusIcon, { name: view.icon }),
6464
- /* @__PURE__ */ jsx19("span", { "data-status-label": "true", children: label ?? view.statusLabel })
6605
+ /* @__PURE__ */ jsx20(StatusIcon, { name: view.icon }),
6606
+ /* @__PURE__ */ jsx20("span", { "data-status-label": "true", children: label ?? view.statusLabel })
6465
6607
  ]
6466
6608
  }
6467
6609
  );
@@ -6482,18 +6624,18 @@ function StatusIcon({ name }) {
6482
6624
  "aria-hidden": "true",
6483
6625
  focusable: "false",
6484
6626
  children: [
6485
- name === "check" ? /* @__PURE__ */ jsx19("path", { d: "m5 12 4 4L19 6" }) : null,
6627
+ name === "check" ? /* @__PURE__ */ jsx20("path", { d: "m5 12 4 4L19 6" }) : null,
6486
6628
  name === "clock" ? /* @__PURE__ */ jsxs17(Fragment9, { children: [
6487
- /* @__PURE__ */ jsx19("circle", { cx: "12", cy: "12", r: "8" }),
6488
- /* @__PURE__ */ jsx19("path", { d: "M12 7v5l3 2" })
6629
+ /* @__PURE__ */ jsx20("circle", { cx: "12", cy: "12", r: "8" }),
6630
+ /* @__PURE__ */ jsx20("path", { d: "M12 7v5l3 2" })
6489
6631
  ] }) : null,
6490
6632
  name === "ban" ? /* @__PURE__ */ jsxs17(Fragment9, { children: [
6491
- /* @__PURE__ */ jsx19("circle", { cx: "12", cy: "12", r: "8" }),
6492
- /* @__PURE__ */ jsx19("path", { d: "m6.5 6.5 11 11" })
6633
+ /* @__PURE__ */ jsx20("circle", { cx: "12", cy: "12", r: "8" }),
6634
+ /* @__PURE__ */ jsx20("path", { d: "m6.5 6.5 11 11" })
6493
6635
  ] }) : null,
6494
6636
  name === "lock" ? /* @__PURE__ */ jsxs17(Fragment9, { children: [
6495
- /* @__PURE__ */ jsx19("rect", { x: "5", y: "10", width: "14", height: "10", rx: "2" }),
6496
- /* @__PURE__ */ jsx19("path", { d: "M8 10V7a4 4 0 0 1 8 0v3" })
6637
+ /* @__PURE__ */ jsx20("rect", { x: "5", y: "10", width: "14", height: "10", rx: "2" }),
6638
+ /* @__PURE__ */ jsx20("path", { d: "M8 10V7a4 4 0 0 1 8 0v3" })
6497
6639
  ] }) : null
6498
6640
  ]
6499
6641
  }
@@ -6590,7 +6732,7 @@ function useKeepPruneStale({ statuses, onPruned }) {
6590
6732
  }
6591
6733
 
6592
6734
  // src/features/status/KeepStaleNotice.tsx
6593
- import { jsx as jsx20, jsxs as jsxs18 } from "react/jsx-runtime";
6735
+ import { jsx as jsx21, jsxs as jsxs18 } from "react/jsx-runtime";
6594
6736
  function KeepStaleNotice({
6595
6737
  item,
6596
6738
  onRetry,
@@ -6605,10 +6747,10 @@ function KeepStaleNotice({
6605
6747
  const showRetryLabel = useUiLabelVisibility("retry");
6606
6748
  const showRemoveLabel = useUiLabelVisibility("removeFromList");
6607
6749
  return /* @__PURE__ */ jsxs18("aside", { ...props, className, "data-keepkit": "stale-notice", "data-state": view.error ? "error" : "stale", children: [
6608
- /* @__PURE__ */ jsx20(KeepItemStatusBadge, { status: view.status }),
6609
- children ?? (item.statusReason ? /* @__PURE__ */ jsx20("p", { children: item.statusReason }) : null),
6750
+ /* @__PURE__ */ jsx21(KeepItemStatusBadge, { status: view.status }),
6751
+ children ?? (item.statusReason ? /* @__PURE__ */ jsx21("p", { children: item.statusReason }) : null),
6610
6752
  /* @__PURE__ */ jsxs18("div", { children: [
6611
- /* @__PURE__ */ jsx20(
6753
+ /* @__PURE__ */ jsx21(
6612
6754
  "button",
6613
6755
  {
6614
6756
  type: "button",
@@ -6619,7 +6761,7 @@ function KeepStaleNotice({
6619
6761
  children: showRetryLabel ? retryLabel ?? view.labels.retry : null
6620
6762
  }
6621
6763
  ),
6622
- /* @__PURE__ */ jsx20(
6764
+ /* @__PURE__ */ jsx21(
6623
6765
  "button",
6624
6766
  {
6625
6767
  type: "button",
@@ -6631,7 +6773,7 @@ function KeepStaleNotice({
6631
6773
  }
6632
6774
  )
6633
6775
  ] }),
6634
- view.error ? /* @__PURE__ */ jsx20("p", { role: "alert", children: getErrorMessage(view.error, view.labels.error) }) : null
6776
+ view.error ? /* @__PURE__ */ jsx21("p", { role: "alert", children: getErrorMessage(view.error, view.labels.error) }) : null
6635
6777
  ] });
6636
6778
  }
6637
6779
  function KeepPruneStaleButton({
@@ -6644,7 +6786,7 @@ function KeepPruneStaleButton({
6644
6786
  }) {
6645
6787
  const view = useKeepPruneStale({ statuses, onPruned });
6646
6788
  const showLabel = useUiLabelVisibility("pruneStale");
6647
- return /* @__PURE__ */ jsx20(
6789
+ return /* @__PURE__ */ jsx21(
6648
6790
  "button",
6649
6791
  {
6650
6792
  ...props,
@@ -6758,10 +6900,10 @@ function getDisplayStatus2(status) {
6758
6900
  }
6759
6901
 
6760
6902
  // src/features/item/KeepItemCard.tsx
6761
- import { Fragment as Fragment10, jsx as jsx21, jsxs as jsxs19 } from "react/jsx-runtime";
6762
- var KeepItemCardContext = createContext3(null);
6903
+ import { Fragment as Fragment10, jsx as jsx22, jsxs as jsxs19 } from "react/jsx-runtime";
6904
+ var KeepItemCardContext = createContext4(null);
6763
6905
  function useKeepItemCardCompound(part) {
6764
- const context = useContext3(KeepItemCardContext);
6906
+ const context = useContext4(KeepItemCardContext);
6765
6907
  if (!context) throw new Error(`KeepItemCard.${part} must be rendered inside KeepItemCard.`);
6766
6908
  return context;
6767
6909
  }
@@ -6826,7 +6968,7 @@ function KeepItemCardRoot({
6826
6968
  const moreLabel = useUiLabel("moreActions");
6827
6969
  const contextQuery = useKeepSearchQuery();
6828
6970
  const searchQuery = highlightQuery ?? contextQuery;
6829
- const contentChildren = asChild && isValidElement4(children) ? void 0 : children;
6971
+ const contentChildren = asChild && isValidElement5(children) ? void 0 : children;
6830
6972
  const hasCustomBody = render !== void 0 || contentChildren !== void 0;
6831
6973
  const cardLinkSurface = linkTarget === "card" && !hasCustomBody && Boolean(view.href) && view.isAvailable;
6832
6974
  const [isEditOpen, setEditOpen] = useState16(false);
@@ -6845,7 +6987,7 @@ function KeepItemCardRoot({
6845
6987
  }, [isEditOpen]);
6846
6988
  function renderLink(content, props = {}) {
6847
6989
  if (!view.href || !view.isAvailable) {
6848
- return /* @__PURE__ */ jsx21("span", { ...props, "aria-disabled": view.href ? true : void 0, "data-link-disabled": view.href ? true : void 0, children: content });
6990
+ return /* @__PURE__ */ jsx22("span", { ...props, "aria-disabled": view.href ? true : void 0, "data-link-disabled": view.href ? true : void 0, children: content });
6849
6991
  }
6850
6992
  const linkProps = {
6851
6993
  ...props,
@@ -6861,12 +7003,12 @@ function KeepItemCardRoot({
6861
7003
  },
6862
7004
  children: content
6863
7005
  };
6864
- return LinkComponent ? /* @__PURE__ */ jsx21(LinkComponent, { ...linkProps }) : /* @__PURE__ */ jsx21("a", { ...linkProps });
7006
+ return LinkComponent ? /* @__PURE__ */ jsx22(LinkComponent, { ...linkProps }) : /* @__PURE__ */ jsx22("a", { ...linkProps });
6865
7007
  }
6866
7008
  function renderTitle(content) {
6867
7009
  if (cardLinkSurface) return content;
6868
7010
  if (view.isAvailable) return renderLink(content);
6869
- return view.href ? /* @__PURE__ */ jsx21("span", { "aria-disabled": "true", "data-link-disabled": "true", children: content }) : content;
7011
+ return view.href ? /* @__PURE__ */ jsx22("span", { "aria-disabled": "true", "data-link-disabled": "true", children: content }) : content;
6870
7012
  }
6871
7013
  const resolvedImageProps = view.imageProps ? { ...view.imageProps, alt: imageAlt ?? view.imageProps.alt } : void 0;
6872
7014
  const imageSource = resolvedImageProps?.src;
@@ -6889,7 +7031,7 @@ function KeepItemCardRoot({
6889
7031
  setImageStatus("error");
6890
7032
  }
6891
7033
  };
6892
- image = renderImage?.(imagePropsWithHandlers, item) ?? (ImageComponent ? /* @__PURE__ */ jsx21(ImageComponent, { ...imagePropsWithHandlers }) : /* @__PURE__ */ jsx21("img", { ...imagePropsWithHandlers, alt: imagePropsWithHandlers.alt }));
7034
+ image = renderImage?.(imagePropsWithHandlers, item) ?? (ImageComponent ? /* @__PURE__ */ jsx22(ImageComponent, { ...imagePropsWithHandlers }) : /* @__PURE__ */ jsx22("img", { ...imagePropsWithHandlers, alt: imagePropsWithHandlers.alt }));
6893
7035
  }
6894
7036
  const tags = showTags ? item.tags ?? [] : [];
6895
7037
  const renderedTags = showTags && tags.length > 0 ? renderTags?.(tags, item) ?? null : null;
@@ -6899,11 +7041,11 @@ function KeepItemCardRoot({
6899
7041
  ":"
6900
7042
  ] }) : null,
6901
7043
  showSavedAtLabel ? " " : null,
6902
- /* @__PURE__ */ jsx21("time", { dateTime: new Date(item.savedAt).toISOString(), children: formatSavedAt(item.savedAt) })
7044
+ /* @__PURE__ */ jsx22("time", { dateTime: new Date(item.savedAt).toISOString(), children: formatSavedAt(item.savedAt) })
6903
7045
  ] }) : null;
6904
- const error = view.itemState.error && !isEditOpen ? /* @__PURE__ */ jsx21("p", { role: "alert", children: getErrorMessage(view.itemState.error, view.labels.error) }) : null;
6905
- const actions = view.statusLabel ? /* @__PURE__ */ jsx21(KeepStaleNotice, { item, onRetry, onRemoved }) : /* @__PURE__ */ jsxs19(Fragment10, { children: [
6906
- showEditButton ? isEditOpen ? /* @__PURE__ */ jsx21("div", { ref: editPanelRef, id: editPanelId, role: "dialog", "aria-label": editLabel, "data-keepkit": "item-edit-dialog", children: editSlot ? editSlot(item, closeEdit) : /* @__PURE__ */ jsx21(
7046
+ const error = view.itemState.error && !isEditOpen ? /* @__PURE__ */ jsx22("p", { role: "alert", children: getErrorMessage(view.itemState.error, view.labels.error) }) : null;
7047
+ const actions = view.statusLabel ? /* @__PURE__ */ jsx22(KeepStaleNotice, { item, onRetry, onRemoved }) : /* @__PURE__ */ jsxs19(Fragment10, { children: [
7048
+ showEditButton ? isEditOpen ? /* @__PURE__ */ jsx22("div", { ref: editPanelRef, id: editPanelId, role: "dialog", "aria-label": editLabel, "data-keepkit": "item-edit-dialog", children: editSlot ? editSlot(item, closeEdit) : /* @__PURE__ */ jsx22(
6907
7049
  KeepQuickEditor,
6908
7050
  {
6909
7051
  item: view.itemState.item ?? item,
@@ -6912,7 +7054,7 @@ function KeepItemCardRoot({
6912
7054
  collectionLabels,
6913
7055
  ...presentation === "reading" ? { showSaveButton: false, closeLabel: doneLabel } : {}
6914
7056
  }
6915
- ) }) : /* @__PURE__ */ jsx21(
7057
+ ) }) : /* @__PURE__ */ jsx22(
6916
7058
  "button",
6917
7059
  {
6918
7060
  ref: editTriggerRef,
@@ -6930,22 +7072,22 @@ function KeepItemCardRoot({
6930
7072
  }
6931
7073
  ) : null,
6932
7074
  isEditOpen ? null : /* @__PURE__ */ jsxs19(Fragment10, { children: [
6933
- showSaveButton ? /* @__PURE__ */ jsx21(KeepItemCardSave, {}) : null,
6934
- showPinButton ? /* @__PURE__ */ jsx21(KeepItemCardPin, {}) : null,
7075
+ showSaveButton ? /* @__PURE__ */ jsx22(KeepItemCardSave, {}) : null,
7076
+ showPinButton ? /* @__PURE__ */ jsx22(KeepItemCardPin, {}) : null,
6935
7077
  presentation === "reading" ? /* @__PURE__ */ jsxs19("details", { "data-keep-card-part": "more-actions", children: [
6936
- /* @__PURE__ */ jsx21("summary", { children: moreLabel }),
7078
+ /* @__PURE__ */ jsx22("summary", { children: moreLabel }),
6937
7079
  /* @__PURE__ */ jsxs19("div", { children: [
6938
- showArchiveButton ? /* @__PURE__ */ jsx21(KeepItemCardArchive, {}) : null,
6939
- /* @__PURE__ */ jsx21(KeepItemCardRemove, {})
7080
+ showArchiveButton ? /* @__PURE__ */ jsx22(KeepItemCardArchive, {}) : null,
7081
+ /* @__PURE__ */ jsx22(KeepItemCardRemove, {})
6940
7082
  ] })
6941
7083
  ] }) : /* @__PURE__ */ jsxs19(Fragment10, { children: [
6942
- showArchiveButton ? /* @__PURE__ */ jsx21(KeepItemCardArchive, {}) : null,
6943
- /* @__PURE__ */ jsx21(KeepItemCardRemove, {})
7084
+ showArchiveButton ? /* @__PURE__ */ jsx22(KeepItemCardArchive, {}) : null,
7085
+ /* @__PURE__ */ jsx22(KeepItemCardRemove, {})
6944
7086
  ] })
6945
7087
  ] }),
6946
7088
  isEditOpen && presentation !== "reading" && (showPinButton || showArchiveButton) ? /* @__PURE__ */ jsxs19("div", { "data-keep-card-part": "actions-secondary", children: [
6947
- showPinButton ? /* @__PURE__ */ jsx21(KeepItemCardPin, {}) : null,
6948
- showArchiveButton ? /* @__PURE__ */ jsx21(KeepItemCardArchive, {}) : null
7089
+ showPinButton ? /* @__PURE__ */ jsx22(KeepItemCardPin, {}) : null,
7090
+ showArchiveButton ? /* @__PURE__ */ jsx22(KeepItemCardArchive, {}) : null
6949
7091
  ] }) : null
6950
7092
  ] });
6951
7093
  const compoundValue = {
@@ -6958,7 +7100,7 @@ function KeepItemCardRoot({
6958
7100
  imageStatus,
6959
7101
  fallbackLabel: String(view.resolvedTitle),
6960
7102
  note: showNote ? item.note : void 0,
6961
- activity: showActivity ? /* @__PURE__ */ jsx21(KeepLastActivity, { item, kind: activityKind }) : null,
7103
+ activity: showActivity ? /* @__PURE__ */ jsx22(KeepLastActivity, { item, kind: activityKind }) : null,
6962
7104
  tags,
6963
7105
  tagsLabel: view.labels.tags,
6964
7106
  filterTagsLabel,
@@ -6975,29 +7117,29 @@ function KeepItemCardRoot({
6975
7117
  remove: view.remove,
6976
7118
  isMutating: view.itemState.isMutating,
6977
7119
  saveAriaLabel: `${view.labels.remove} ${String(view.resolvedTitle)}`,
6978
- renderText: (content) => /* @__PURE__ */ jsx21(KeepHighlight, { query: searchQuery, children: content })
7120
+ renderText: (content) => /* @__PURE__ */ jsx22(KeepHighlight, { query: searchQuery, children: content })
6979
7121
  };
6980
- const media = presentation !== "reading" || resolvedImageProps?.src ? /* @__PURE__ */ jsx21(KeepItemCardMedia, {}) : null;
7122
+ const media = presentation !== "reading" || resolvedImageProps?.src ? /* @__PURE__ */ jsx22(KeepItemCardMedia, {}) : null;
6981
7123
  const customMedia = renderImage !== void 0 || ImageComponent !== void 0;
6982
7124
  const defaultBody = cardLinkSurface ? /* @__PURE__ */ jsxs19(Fragment10, { children: [
6983
7125
  customMedia ? media : null,
6984
7126
  renderLink(
6985
7127
  /* @__PURE__ */ jsxs19(Fragment10, { children: [
6986
7128
  customMedia ? null : media,
6987
- /* @__PURE__ */ jsx21(KeepItemCardContent, {})
7129
+ /* @__PURE__ */ jsx22(KeepItemCardContent, {})
6988
7130
  ] })
6989
7131
  ),
6990
- /* @__PURE__ */ jsx21(KeepItemCardTags, {}),
6991
- /* @__PURE__ */ jsx21(KeepItemCardActions, {})
7132
+ /* @__PURE__ */ jsx22(KeepItemCardTags, {}),
7133
+ /* @__PURE__ */ jsx22(KeepItemCardActions, {})
6992
7134
  ] }) : /* @__PURE__ */ jsxs19(Fragment10, { children: [
6993
7135
  media,
6994
- /* @__PURE__ */ jsx21(KeepItemCardContent, {}),
6995
- /* @__PURE__ */ jsx21(KeepItemCardActions, {})
7136
+ /* @__PURE__ */ jsx22(KeepItemCardContent, {}),
7137
+ /* @__PURE__ */ jsx22(KeepItemCardActions, {})
6996
7138
  ] });
6997
7139
  const body = render ? render(view.state) : typeof contentChildren === "function" ? contentChildren(view.state) : contentChildren ?? defaultBody;
6998
7140
  const root = renderRoot(
6999
7141
  asChild,
7000
- isValidElement4(children) ? children : void 0,
7142
+ isValidElement5(children) ? children : void 0,
7001
7143
  {
7002
7144
  ...rootProps,
7003
7145
  id: rootProps.id ?? `saved-item-${encodeURIComponent(item.id)}`,
@@ -7017,27 +7159,27 @@ function KeepItemCardRoot({
7017
7159
  body,
7018
7160
  "KeepItemCard"
7019
7161
  );
7020
- return /* @__PURE__ */ jsx21(KeepItemCardContext.Provider, { value: compoundValue, children: root });
7162
+ return /* @__PURE__ */ jsx22(KeepItemCardContext.Provider, { value: compoundValue, children: root });
7021
7163
  }
7022
7164
  function KeepItemCardMedia({ children, fallback, ...props }) {
7023
7165
  const context = useKeepItemCardCompound("Media");
7024
- return /* @__PURE__ */ jsx21("div", { ...props, "data-keep-card-part": "media", "data-media-status": context.imageStatus, "data-aspect-ratio": "1/1", children: children ?? context.image ?? /* @__PURE__ */ jsx21("span", { role: "img", "aria-label": context.fallbackLabel, "data-keep-card-fallback": "true", children: fallback ?? /* @__PURE__ */ jsx21(KeepMediaPlaceholderIcon, {}) }) });
7166
+ return /* @__PURE__ */ jsx22("div", { ...props, "data-keep-card-part": "media", "data-media-status": context.imageStatus, "data-aspect-ratio": "1/1", children: children ?? context.image ?? /* @__PURE__ */ jsx22("span", { role: "img", "aria-label": context.fallbackLabel, "data-keep-card-fallback": "true", children: fallback ?? /* @__PURE__ */ jsx22(KeepMediaPlaceholderIcon, {}) }) });
7025
7167
  }
7026
7168
  function KeepItemCardLink({ children, ...props }) {
7027
7169
  const context = useKeepItemCardCompound("Link");
7028
- const content = /* @__PURE__ */ jsx21(KeepItemCardContext.Provider, { value: { ...context, cardLinkSurface: true, renderTitle: (title) => title }, children });
7170
+ const content = /* @__PURE__ */ jsx22(KeepItemCardContext.Provider, { value: { ...context, cardLinkSurface: true, renderTitle: (title) => title }, children });
7029
7171
  return context.cardLinkSurface ? content : context.renderLink(content, props);
7030
7172
  }
7031
7173
  function KeepItemCardContent({ children, ...props }) {
7032
7174
  const context = useKeepItemCardCompound("Content");
7033
- return /* @__PURE__ */ jsx21("div", { ...props, "data-keep-card-part": "content", children: children === void 0 ? /* @__PURE__ */ jsxs19(Fragment10, { children: [
7034
- context.reading && context.source ? /* @__PURE__ */ jsx21("span", { "data-keep-card-part": "source", children: context.source }) : null,
7035
- /* @__PURE__ */ jsx21(KeepItemCardTitle, {}),
7036
- context.reading ? /* @__PURE__ */ jsx21(KeepItemCardCollectionBadge, {}) : null,
7175
+ return /* @__PURE__ */ jsx22("div", { ...props, "data-keep-card-part": "content", children: children === void 0 ? /* @__PURE__ */ jsxs19(Fragment10, { children: [
7176
+ context.reading && context.source ? /* @__PURE__ */ jsx22("span", { "data-keep-card-part": "source", children: context.source }) : null,
7177
+ /* @__PURE__ */ jsx22(KeepItemCardTitle, {}),
7178
+ context.reading ? /* @__PURE__ */ jsx22(KeepItemCardCollectionBadge, {}) : null,
7037
7179
  context.reading ? null : context.meta,
7038
7180
  context.reading ? null : context.activity,
7039
- context.note ? /* @__PURE__ */ jsx21("p", { "data-keep-card-part": "memo-preview", "data-line-clamp": "2", children: context.note }) : null,
7040
- context.cardLinkSurface ? null : /* @__PURE__ */ jsx21(KeepItemCardTags, {}),
7181
+ context.note ? /* @__PURE__ */ jsx22("p", { "data-keep-card-part": "memo-preview", "data-line-clamp": "2", children: context.note }) : null,
7182
+ context.cardLinkSurface ? null : /* @__PURE__ */ jsx22(KeepItemCardTags, {}),
7041
7183
  context.reading ? /* @__PURE__ */ jsxs19("div", { "data-keep-card-part": "reading-metadata", children: [
7042
7184
  context.meta,
7043
7185
  context.activity
@@ -7055,7 +7197,7 @@ function KeepItemCardTitle({ as = "h3", children, ...props }) {
7055
7197
  }
7056
7198
  function KeepMediaPlaceholderIcon() {
7057
7199
  return /* @__PURE__ */ jsxs19("svg", { "data-media-fallback-icon": "true", viewBox: "0 0 24 24", "aria-hidden": "true", children: [
7058
- /* @__PURE__ */ jsx21(
7200
+ /* @__PURE__ */ jsx22(
7059
7201
  "path",
7060
7202
  {
7061
7203
  d: "M4 5.5A1.5 1.5 0 0 1 5.5 4h13A1.5 1.5 0 0 1 20 5.5v13a1.5 1.5 0 0 1-1.5 1.5h-13A1.5 1.5 0 0 1 4 18.5v-13Z",
@@ -7063,15 +7205,15 @@ function KeepMediaPlaceholderIcon() {
7063
7205
  stroke: "currentColor"
7064
7206
  }
7065
7207
  ),
7066
- /* @__PURE__ */ jsx21("circle", { cx: "9", cy: "9", r: "1.5", fill: "currentColor" }),
7067
- /* @__PURE__ */ jsx21("path", { d: "m5.5 18 4.5-4.5 3 3 2-2L19 18", fill: "none", stroke: "currentColor" })
7208
+ /* @__PURE__ */ jsx22("circle", { cx: "9", cy: "9", r: "1.5", fill: "currentColor" }),
7209
+ /* @__PURE__ */ jsx22("path", { d: "m5.5 18 4.5-4.5 3 3 2-2L19 18", fill: "none", stroke: "currentColor" })
7068
7210
  ] });
7069
7211
  }
7070
7212
  function KeepItemCardTags({ children, ...props }) {
7071
7213
  const context = useKeepItemCardCompound("Tags");
7072
7214
  if (children === void 0 && context.renderedTags) return context.renderedTags;
7073
7215
  if (children === void 0 && context.tags.length === 0) return null;
7074
- return /* @__PURE__ */ jsx21("ul", { ...props, "aria-label": props["aria-label"] ?? context.tagsLabel, "data-keep-card-part": "tags", children: children ?? context.tags.map((tag) => /* @__PURE__ */ jsx21("li", { children: context.onTagClick ? /* @__PURE__ */ jsx21(
7216
+ return /* @__PURE__ */ jsx22("ul", { ...props, "aria-label": props["aria-label"] ?? context.tagsLabel, "data-keep-card-part": "tags", children: children ?? context.tags.map((tag) => /* @__PURE__ */ jsx22("li", { children: context.onTagClick ? /* @__PURE__ */ jsx22(
7075
7217
  "button",
7076
7218
  {
7077
7219
  type: "button",
@@ -7084,7 +7226,7 @@ function KeepItemCardTags({ children, ...props }) {
7084
7226
  }
7085
7227
  function KeepItemCardActions({ children, ...props }) {
7086
7228
  const context = useKeepItemCardCompound("Actions");
7087
- return /* @__PURE__ */ jsx21("div", { ...props, "data-keep-card-part": "actions", children: children ?? context.actions });
7229
+ return /* @__PURE__ */ jsx22("div", { ...props, "data-keep-card-part": "actions", children: children ?? context.actions });
7088
7230
  }
7089
7231
  function KeepLastActivity({
7090
7232
  item,
@@ -7096,15 +7238,15 @@ function KeepLastActivity({
7096
7238
  const neverOpenedLabel = useUiLabel("activityNeverOpened");
7097
7239
  const inactiveSuffix = useUiLabel("activityInactiveSuffix");
7098
7240
  if (item.lastOpenedAt === void 0) {
7099
- return /* @__PURE__ */ jsx21("span", { ...props, "data-keep-card-part": "activity", children: neverOpenedLabel });
7241
+ return /* @__PURE__ */ jsx22("span", { ...props, "data-keep-card-part": "activity", children: neverOpenedLabel });
7100
7242
  }
7101
7243
  const age = Math.max(0, Date.now() - item.lastOpenedAt);
7102
7244
  const label = kind === "opened" ? `${openedLabel} ${formatRelativeAge(age, locale)}` : `${formatInactiveAge(age, locale)}${isCjkLocale2(locale) ? "" : " "}${inactiveSuffix}`;
7103
- return /* @__PURE__ */ jsx21("span", { ...props, "data-keep-card-part": "activity", children: /* @__PURE__ */ jsx21("time", { dateTime: new Date(item.lastOpenedAt).toISOString(), children: label }) });
7245
+ return /* @__PURE__ */ jsx22("span", { ...props, "data-keep-card-part": "activity", children: /* @__PURE__ */ jsx22("time", { dateTime: new Date(item.lastOpenedAt).toISOString(), children: label }) });
7104
7246
  }
7105
7247
  function KeepItemCardSave({ labels, getAriaLabel, ...props }) {
7106
7248
  const context = useKeepItemCardCompound("Save");
7107
- return /* @__PURE__ */ jsx21(
7249
+ return /* @__PURE__ */ jsx22(
7108
7250
  KeepButton,
7109
7251
  {
7110
7252
  ...props,
@@ -7117,7 +7259,7 @@ function KeepItemCardSave({ labels, getAriaLabel, ...props }) {
7117
7259
  }
7118
7260
  function KeepItemCardRemove({ children, disabled, onClick, ...props }) {
7119
7261
  const context = useKeepItemCardCompound("Remove");
7120
- return /* @__PURE__ */ jsx21(
7262
+ return /* @__PURE__ */ jsx22(
7121
7263
  "button",
7122
7264
  {
7123
7265
  ...props,
@@ -7134,19 +7276,19 @@ function KeepItemCardRemove({ children, disabled, onClick, ...props }) {
7134
7276
  }
7135
7277
  function KeepItemCardPin({ children, ...props }) {
7136
7278
  const context = useKeepItemCardCompound("Pin");
7137
- return /* @__PURE__ */ jsx21(KeepPinButton, { ...props, item: context.item, children });
7279
+ return /* @__PURE__ */ jsx22(KeepPinButton, { ...props, item: context.item, children });
7138
7280
  }
7139
7281
  function KeepItemCardArchive({
7140
7282
  children,
7141
7283
  ...props
7142
7284
  }) {
7143
7285
  const context = useKeepItemCardCompound("Archive");
7144
- return /* @__PURE__ */ jsx21(KeepArchiveButton, { ...props, item: context.item, children });
7286
+ return /* @__PURE__ */ jsx22(KeepArchiveButton, { ...props, item: context.item, children });
7145
7287
  }
7146
7288
  function KeepItemCardCollectionBadge({ children, ...props }) {
7147
7289
  const context = useKeepItemCardCompound("CollectionBadge");
7148
7290
  if (!context.item.collectionId) return null;
7149
- return /* @__PURE__ */ jsx21("span", { ...props, "data-keep-card-part": "collection-badge", children: children ?? context.collectionLabel });
7291
+ return /* @__PURE__ */ jsx22("span", { ...props, "data-keep-card-part": "collection-badge", children: children ?? context.collectionLabel });
7150
7292
  }
7151
7293
  var KeepItemCard = Object.assign(KeepItemCardRoot, {
7152
7294
  Link: KeepItemCardLink,
@@ -7163,11 +7305,11 @@ var KeepItemCard = Object.assign(KeepItemCardRoot, {
7163
7305
  });
7164
7306
  function KeepItemCardSkeleton({ layout = "list", ...props }) {
7165
7307
  return /* @__PURE__ */ jsxs19("article", { ...props, "aria-hidden": "true", "data-keepkit": "card-skeleton", "data-layout": layout, "data-state": "loading", children: [
7166
- /* @__PURE__ */ jsx21("span", { "data-skeleton-part": "media" }),
7167
- /* @__PURE__ */ jsx21("span", { "data-skeleton-part": "title" }),
7168
- /* @__PURE__ */ jsx21("span", { "data-skeleton-part": "meta" }),
7169
- /* @__PURE__ */ jsx21("span", { "data-skeleton-part": "tag" }),
7170
- /* @__PURE__ */ jsx21("span", { "data-skeleton-part": "tag" })
7308
+ /* @__PURE__ */ jsx22("span", { "data-skeleton-part": "media" }),
7309
+ /* @__PURE__ */ jsx22("span", { "data-skeleton-part": "title" }),
7310
+ /* @__PURE__ */ jsx22("span", { "data-skeleton-part": "meta" }),
7311
+ /* @__PURE__ */ jsx22("span", { "data-skeleton-part": "tag" }),
7312
+ /* @__PURE__ */ jsx22("span", { "data-skeleton-part": "tag" })
7171
7313
  ] });
7172
7314
  }
7173
7315
  function formatSavedAt(timestamp) {
@@ -7202,8 +7344,8 @@ function getSource(href) {
7202
7344
  }
7203
7345
 
7204
7346
  // src/features/status/KeepEmptyState.tsx
7205
- import { isValidElement as isValidElement5 } from "react";
7206
- import { Fragment as Fragment11, jsx as jsx22, jsxs as jsxs20 } from "react/jsx-runtime";
7347
+ import { isValidElement as isValidElement6 } from "react";
7348
+ import { Fragment as Fragment11, jsx as jsx23, jsxs as jsxs20 } from "react/jsx-runtime";
7207
7349
  function KeepEmptyState({
7208
7350
  title,
7209
7351
  description,
@@ -7221,11 +7363,11 @@ function KeepEmptyState({
7221
7363
  resolvedVariant === "empty-filtered" ? "noFilteredItemsDescription" : "emptyStorageDescription"
7222
7364
  );
7223
7365
  const clearLabel = useUiLabel("clearFilters");
7224
- const contentChildren = asChild && isValidElement5(children) ? void 0 : children;
7366
+ const contentChildren = asChild && isValidElement6(children) ? void 0 : children;
7225
7367
  const body = contentChildren ?? /* @__PURE__ */ jsxs20(Fragment11, { children: [
7226
- /* @__PURE__ */ jsx22("h2", { children: title ?? defaultTitle }),
7227
- description ?? /* @__PURE__ */ jsx22("p", { children: defaultDescription }),
7228
- action ?? (resolvedVariant === "empty-filtered" && onClearFilters ? /* @__PURE__ */ jsx22("button", { type: "button", "data-keep-action": "clear-filters", onClick: onClearFilters, children: clearLabel }) : null)
7368
+ /* @__PURE__ */ jsx23("h2", { children: title ?? defaultTitle }),
7369
+ description ?? /* @__PURE__ */ jsx23("p", { children: defaultDescription }),
7370
+ action ?? (resolvedVariant === "empty-filtered" && onClearFilters ? /* @__PURE__ */ jsx23("button", { type: "button", "data-keep-action": "clear-filters", onClick: onClearFilters, children: clearLabel }) : null)
7229
7371
  ] });
7230
7372
  return renderRoot(
7231
7373
  asChild,
@@ -7320,7 +7462,7 @@ function useRovingTabIndex() {
7320
7462
 
7321
7463
  // src/features/collection/KeepReorderableList.tsx
7322
7464
  import { useRef as useRef13, useState as useState17 } from "react";
7323
- import { Fragment as Fragment12, jsx as jsx23, jsxs as jsxs21 } from "react/jsx-runtime";
7465
+ import { Fragment as Fragment12, jsx as jsx24, jsxs as jsxs21 } from "react/jsx-runtime";
7324
7466
  function KeepReorderableList({
7325
7467
  items,
7326
7468
  onReorder,
@@ -7377,7 +7519,7 @@ function KeepReorderableList({
7377
7519
  void commit(next, index);
7378
7520
  }
7379
7521
  return /* @__PURE__ */ jsxs21(Fragment12, { children: [
7380
- /* @__PURE__ */ jsx23("ul", { ...props, "aria-busy": pending || props["aria-busy"], "data-keepkit": "reorderable-list", children: items.map((item, index) => {
7522
+ /* @__PURE__ */ jsx24("ul", { ...props, "aria-busy": pending || props["aria-busy"], "data-keepkit": "reorderable-list", children: items.map((item, index) => {
7381
7523
  const moveUp = () => move(index, index - 1);
7382
7524
  const moveDown = () => move(index, index + 1);
7383
7525
  const onHandleKeyDown = (event) => {
@@ -7425,7 +7567,7 @@ function KeepReorderableList({
7425
7567
  onKeyDown: onHandleKeyDown
7426
7568
  }
7427
7569
  };
7428
- return /* @__PURE__ */ jsx23(
7570
+ return /* @__PURE__ */ jsx24(
7429
7571
  "li",
7430
7572
  {
7431
7573
  "data-reorder-index": index,
@@ -7454,18 +7596,18 @@ function KeepReorderableList({
7454
7596
  item.id
7455
7597
  );
7456
7598
  }) }),
7457
- /* @__PURE__ */ jsx23("span", { role: "status", "aria-live": "polite", "aria-atomic": "true", children: announcement }),
7458
- error ? /* @__PURE__ */ jsx23("p", { role: "alert", children: error }) : null
7599
+ /* @__PURE__ */ jsx24("span", { role: "status", "aria-live": "polite", "aria-atomic": "true", children: announcement }),
7600
+ error ? /* @__PURE__ */ jsx24("p", { role: "alert", children: error }) : null
7459
7601
  ] });
7460
7602
  }
7461
7603
 
7462
7604
  // src/features/collection/KeepList.tsx
7463
- import { Fragment as Fragment13, jsx as jsx24, jsxs as jsxs22 } from "react/jsx-runtime";
7605
+ import { Fragment as Fragment13, jsx as jsx25, jsxs as jsxs22 } from "react/jsx-runtime";
7464
7606
  function KeepList(props) {
7465
7607
  const { fallback, onBoundaryError, boundaryResetKey, ...listProps } = props;
7466
- const content = /* @__PURE__ */ jsx24(KeepListContent, { ...listProps });
7608
+ const content = /* @__PURE__ */ jsx25(KeepListContent, { ...listProps });
7467
7609
  if (fallback === void 0 && onBoundaryError === void 0) return content;
7468
- return /* @__PURE__ */ jsx24(KeepErrorBoundary, { fallback, onError: onBoundaryError, resetKey: boundaryResetKey, children: content });
7610
+ return /* @__PURE__ */ jsx25(KeepErrorBoundary, { fallback, onError: onBoundaryError, resetKey: boundaryResetKey, children: content });
7469
7611
  }
7470
7612
  function KeepListContent({
7471
7613
  query,
@@ -7511,7 +7653,7 @@ function KeepListContent({
7511
7653
  });
7512
7654
  return renderRoot(
7513
7655
  asChild,
7514
- asChild && isValidElement6(children) ? children : void 0,
7656
+ asChild && isValidElement7(children) ? children : void 0,
7515
7657
  {
7516
7658
  ...rootProps,
7517
7659
  className,
@@ -7532,7 +7674,7 @@ function KeepListContent({
7532
7674
  if (!event.defaultPrevented) roving.onFocusCapture(event);
7533
7675
  }
7534
7676
  },
7535
- /* @__PURE__ */ jsx24(KeepSearchQueryProvider, { query: query?.search?.query, children: body }),
7677
+ /* @__PURE__ */ jsx25(KeepSearchQueryProvider, { query: query?.search?.query, children: body }),
7536
7678
  "KeepList"
7537
7679
  );
7538
7680
  }
@@ -7548,16 +7690,16 @@ function getListBody(state, options) {
7548
7690
  if (options.loading !== void 0) return resolveContent(options.loading, state);
7549
7691
  const count = Number.isFinite(options.loadingCount) ? Math.max(0, Math.floor(options.loadingCount)) : 6;
7550
7692
  return /* @__PURE__ */ jsxs22(Fragment13, { children: [
7551
- /* @__PURE__ */ jsx24("span", { role: "status", "data-keepkit": "loading-label", children: options.loadingLabel }),
7552
- /* @__PURE__ */ jsx24("ul", { "data-keepkit": "skeleton-list", "data-layout": options.layout, children: Array.from({ length: count }, (_, index) => (
7693
+ /* @__PURE__ */ jsx25("span", { role: "status", "data-keepkit": "loading-label", children: options.loadingLabel }),
7694
+ /* @__PURE__ */ jsx25("ul", { "data-keepkit": "skeleton-list", "data-layout": options.layout, children: Array.from({ length: count }, (_, index) => (
7553
7695
  // biome-ignore lint/suspicious/noArrayIndexKey: Static loading placeholders never reorder.
7554
- /* @__PURE__ */ jsx24("li", { children: /* @__PURE__ */ jsx24(KeepItemCardSkeleton, { layout: options.layout }) }, index)
7696
+ /* @__PURE__ */ jsx25("li", { children: /* @__PURE__ */ jsx25(KeepItemCardSkeleton, { layout: options.layout }) }, index)
7555
7697
  )) })
7556
7698
  ] });
7557
7699
  }
7558
7700
  if (state.isHydrated && state.items.length === 0) {
7559
7701
  if (options.empty !== void 0) return resolveContent(options.empty, state);
7560
- return /* @__PURE__ */ jsx24(
7702
+ return /* @__PURE__ */ jsx25(
7561
7703
  KeepEmptyState,
7562
7704
  {
7563
7705
  variant: options.allItemCount > 0 && hasActiveQueryFilters(options.query) ? "empty-filtered" : "empty-storage",
@@ -7566,9 +7708,9 @@ function getListBody(state, options) {
7566
7708
  );
7567
7709
  }
7568
7710
  if (typeof options.children === "function") return options.children(state);
7569
- if (options.children !== void 0 && !isValidElement6(options.children)) return options.children;
7711
+ if (options.children !== void 0 && !isValidElement7(options.children)) return options.children;
7570
7712
  if (options.reorderable) {
7571
- return /* @__PURE__ */ jsx24(
7713
+ return /* @__PURE__ */ jsx25(
7572
7714
  KeepReorderableList,
7573
7715
  {
7574
7716
  items: state.items,
@@ -7577,20 +7719,20 @@ function getListBody(state, options) {
7577
7719
  await options.onReorder?.(orderedIds);
7578
7720
  },
7579
7721
  renderItem: (item, reorderState) => /* @__PURE__ */ jsxs22(Fragment13, { children: [
7580
- /* @__PURE__ */ jsx24("button", { type: "button", ...reorderState.dragHandleProps, children: "\u2195" }),
7722
+ /* @__PURE__ */ jsx25("button", { type: "button", ...reorderState.dragHandleProps, children: "\u2195" }),
7581
7723
  options.renderItem ? options.renderItem(item, state, getItemSelection(item.id, options.selection)) : /* @__PURE__ */ jsxs22(Fragment13, { children: [
7582
- options.selection ? /* @__PURE__ */ jsx24(KeepItemCheckbox, { item, ...getItemSelection(item.id, options.selection) }) : null,
7583
- /* @__PURE__ */ jsx24(KeepItemCard, { item, ...options.itemCardProps })
7724
+ options.selection ? /* @__PURE__ */ jsx25(KeepItemCheckbox, { item, ...getItemSelection(item.id, options.selection) }) : null,
7725
+ /* @__PURE__ */ jsx25(KeepItemCard, { item, ...options.itemCardProps })
7584
7726
  ] })
7585
7727
  ] }),
7586
7728
  "data-layout": options.layout
7587
7729
  }
7588
7730
  );
7589
7731
  }
7590
- return /* @__PURE__ */ jsx24("ul", { "data-layout": options.layout, children: state.items.map(
7732
+ return /* @__PURE__ */ jsx25("ul", { "data-layout": options.layout, children: state.items.map(
7591
7733
  (item) => options.renderItem ? options.renderItem(item, state, getItemSelection(item.id, options.selection)) : /* @__PURE__ */ jsxs22("li", { "data-selectable": options.selection ? "true" : void 0, children: [
7592
- options.selection ? /* @__PURE__ */ jsx24(KeepItemCheckbox, { item, ...getItemSelection(item.id, options.selection) }) : null,
7593
- /* @__PURE__ */ jsx24(KeepItemCard, { item, ...options.itemCardProps })
7734
+ options.selection ? /* @__PURE__ */ jsx25(KeepItemCheckbox, { item, ...getItemSelection(item.id, options.selection) }) : null,
7735
+ /* @__PURE__ */ jsx25(KeepItemCard, { item, ...options.itemCardProps })
7594
7736
  ] }, item.id)
7595
7737
  ) });
7596
7738
  }
@@ -7614,13 +7756,13 @@ function getItemSelection(id, selection) {
7614
7756
  }
7615
7757
 
7616
7758
  // src/features/collection/KeepCollection.tsx
7617
- import { Fragment as Fragment14, jsx as jsx25, jsxs as jsxs23 } from "react/jsx-runtime";
7759
+ import { Fragment as Fragment14, jsx as jsx26, jsxs as jsxs23 } from "react/jsx-runtime";
7618
7760
  var EMPTY_QUERY = {};
7619
7761
  function KeepCollection(props) {
7620
7762
  const { fallback, onBoundaryError, boundaryResetKey, ...collectionProps } = props;
7621
- const content = /* @__PURE__ */ jsx25(KeepCollectionContent, { ...collectionProps });
7763
+ const content = /* @__PURE__ */ jsx26(KeepCollectionContent, { ...collectionProps });
7622
7764
  if (fallback === void 0 && onBoundaryError === void 0) return content;
7623
- return /* @__PURE__ */ jsx25(KeepErrorBoundary2, { fallback, onError: onBoundaryError, resetKey: boundaryResetKey, children: content });
7765
+ return /* @__PURE__ */ jsx26(KeepErrorBoundary2, { fallback, onError: onBoundaryError, resetKey: boundaryResetKey, children: content });
7624
7766
  }
7625
7767
  function KeepCollectionContent({
7626
7768
  query = EMPTY_QUERY,
@@ -7709,8 +7851,8 @@ function KeepCollectionContent({
7709
7851
  const hasQueryControls = view.enabled.search || view.enabled.sort;
7710
7852
  const hasFilterControls = view.enabled.tagFilter || view.enabled.collectionFilter || archiveScope !== void 0;
7711
7853
  const queryControls = hasQueryControls ? /* @__PURE__ */ jsxs23(Fragment14, { children: [
7712
- view.enabled.search ? /* @__PURE__ */ jsx25(KeepSearchInput, { value: view.searchValue, onValueChange: view.setSearchValue }) : null,
7713
- view.enabled.sort ? /* @__PURE__ */ jsx25(
7854
+ view.enabled.search ? /* @__PURE__ */ jsx26(KeepSearchInput, { value: view.searchValue, onValueChange: view.setSearchValue }) : null,
7855
+ view.enabled.sort ? /* @__PURE__ */ jsx26(
7714
7856
  KeepSortSelect,
7715
7857
  {
7716
7858
  value: view.sortValue,
@@ -7720,8 +7862,8 @@ function KeepCollectionContent({
7720
7862
  ) : null
7721
7863
  ] }) : null;
7722
7864
  const filterControls = hasFilterControls ? /* @__PURE__ */ jsxs23(Fragment14, { children: [
7723
- view.enabled.tagFilter ? /* @__PURE__ */ jsx25(KeepTagFilter, { query, values: view.activeTags, onValuesChange: view.setTags }) : null,
7724
- view.enabled.collectionFilter ? /* @__PURE__ */ jsx25(
7865
+ view.enabled.tagFilter ? /* @__PURE__ */ jsx26(KeepTagFilter, { query, values: view.activeTags, onValuesChange: view.setTags }) : null,
7866
+ view.enabled.collectionFilter ? /* @__PURE__ */ jsx26(
7725
7867
  KeepCollectionFilter,
7726
7868
  {
7727
7869
  value: view.activeCollection ?? "",
@@ -7729,7 +7871,7 @@ function KeepCollectionContent({
7729
7871
  collectionLabels
7730
7872
  }
7731
7873
  ) : null,
7732
- archiveScope !== void 0 ? /* @__PURE__ */ jsx25(
7874
+ archiveScope !== void 0 ? /* @__PURE__ */ jsx26(
7733
7875
  KeepArchiveScopeSelect,
7734
7876
  {
7735
7877
  value: view.archiveScope,
@@ -7747,7 +7889,7 @@ function KeepCollectionContent({
7747
7889
  const uncategorizedLabel = useUiLabel("uncategorized");
7748
7890
  const activeCollectionLabel = view.activeCollection === "__uncategorized__" ? uncategorizedLabel : view.activeCollection === void 0 ? void 0 : collectionLabels?.[view.activeCollection] ?? view.activeCollection;
7749
7891
  const toolbarStartContent = slots?.toolbarStart === void 0 ? null : resolveContent(slots.toolbarStart, view.list);
7750
- const creatableContent = creatable ? /* @__PURE__ */ jsx25(KeepCollectionCreate, {}) : null;
7892
+ const creatableContent = creatable ? /* @__PURE__ */ jsx26(KeepCollectionCreate, {}) : null;
7751
7893
  const toolbarEndContent = /* @__PURE__ */ jsxs23(Fragment14, { children: [
7752
7894
  creatableContent,
7753
7895
  slots?.toolbarEnd === void 0 ? null : resolveContent(slots.toolbarEnd, view.list)
@@ -7764,8 +7906,8 @@ function KeepCollectionContent({
7764
7906
  role: "group",
7765
7907
  "aria-labelledby": labelId,
7766
7908
  children: [
7767
- /* @__PURE__ */ jsx25("legend", { id: labelId, "data-keepkit": "collection-toolbar-label", children: label }),
7768
- /* @__PURE__ */ jsx25("div", { "data-keepkit": "collection-toolbar-content", children: content })
7909
+ /* @__PURE__ */ jsx26("legend", { id: labelId, "data-keepkit": "collection-toolbar-label", children: label }),
7910
+ /* @__PURE__ */ jsx26("div", { "data-keepkit": "collection-toolbar-content", children: content })
7769
7911
  ]
7770
7912
  }
7771
7913
  );
@@ -7780,7 +7922,7 @@ function KeepCollectionContent({
7780
7922
  renderToolbarGroup("toolbarEnd", toolbarEndContent, toolbarEndLabel)
7781
7923
  ] });
7782
7924
  const renderList = (selection) => /* @__PURE__ */ jsxs23(Fragment14, { children: [
7783
- /* @__PURE__ */ jsx25(
7925
+ /* @__PURE__ */ jsx26(
7784
7926
  KeepList,
7785
7927
  {
7786
7928
  query: view.resolvedQuery,
@@ -7798,7 +7940,7 @@ function KeepCollectionContent({
7798
7940
  error
7799
7941
  }
7800
7942
  ),
7801
- view.enabled.pagination ? /* @__PURE__ */ jsx25(
7943
+ view.enabled.pagination ? /* @__PURE__ */ jsx26(
7802
7944
  KeepPagination,
7803
7945
  {
7804
7946
  totalCount: view.list.totalCount,
@@ -7823,10 +7965,10 @@ function KeepCollectionContent({
7823
7965
  children: [
7824
7966
  toolbar,
7825
7967
  view.enabled.savedViews ? /* @__PURE__ */ jsxs23("div", { "data-keepkit": "saved-view-controls", children: [
7826
- /* @__PURE__ */ jsx25(KeepSavedViews, { onApply: view.applyQuery }),
7827
- /* @__PURE__ */ jsx25(KeepSaveViewButton, { query: view.resolvedQuery })
7968
+ /* @__PURE__ */ jsx26(KeepSavedViews, { onApply: view.applyQuery }),
7969
+ /* @__PURE__ */ jsx26(KeepSaveViewButton, { query: view.resolvedQuery })
7828
7970
  ] }) : null,
7829
- activeFilters === void 0 ? /* @__PURE__ */ jsx25(
7971
+ activeFilters === void 0 ? /* @__PURE__ */ jsx26(
7830
7972
  KeepActiveFiltersSummary,
7831
7973
  {
7832
7974
  search: view.searchValue,
@@ -7853,13 +7995,13 @@ function KeepCollectionContent({
7853
7995
  canReset: view.canReset
7854
7996
  }
7855
7997
  ) : resolveContent(activeFilters, view.list),
7856
- view.enabled.bulkActions && bulkActionsVariant === "inline" ? /* @__PURE__ */ jsx25(KeepInlineSelection, { query: view.resolvedQuery, confirmRemoval, children: renderList }) : /* @__PURE__ */ jsxs23(Fragment14, { children: [
7998
+ view.enabled.bulkActions && bulkActionsVariant === "inline" ? /* @__PURE__ */ jsx26(KeepInlineSelection, { query: view.resolvedQuery, confirmRemoval, children: renderList }) : /* @__PURE__ */ jsxs23(Fragment14, { children: [
7857
7999
  renderList(),
7858
- view.enabled.bulkActions ? /* @__PURE__ */ jsx25(KeepBulkActions, { query: view.resolvedQuery, confirmRemoval }) : null
8000
+ view.enabled.bulkActions ? /* @__PURE__ */ jsx26(KeepBulkActions, { query: view.resolvedQuery, confirmRemoval }) : null
7859
8001
  ] }),
7860
8002
  reorderable && reorderUndoIds ? /* @__PURE__ */ jsxs23("div", { "data-keepkit": "reorder-feedback", role: "status", "aria-live": "polite", children: [
7861
- reorderError ? /* @__PURE__ */ jsx25("p", { role: "alert", children: reorderFailedLabel }) : null,
7862
- /* @__PURE__ */ jsx25("button", { type: "button", "data-keep-action": "undo-reorder", onClick: () => void undoReorder(), children: reorderUndoLabel })
8003
+ reorderError ? /* @__PURE__ */ jsx26("p", { role: "alert", children: reorderFailedLabel }) : null,
8004
+ /* @__PURE__ */ jsx26("button", { type: "button", "data-keep-action": "undo-reorder", onClick: () => void undoReorder(), children: reorderUndoLabel })
7863
8005
  ] }) : null
7864
8006
  ]
7865
8007
  }
@@ -8005,7 +8147,7 @@ function useKeepCollectionManager({
8005
8147
  }
8006
8148
 
8007
8149
  // src/features/collection/KeepCollectionManager.tsx
8008
- import { Fragment as Fragment15, jsx as jsx26, jsxs as jsxs24 } from "react/jsx-runtime";
8150
+ import { Fragment as Fragment15, jsx as jsx27, jsxs as jsxs24 } from "react/jsx-runtime";
8009
8151
  function KeepCollectionManager({
8010
8152
  allowCreate = true,
8011
8153
  allowRename = true,
@@ -8044,16 +8186,16 @@ function KeepCollectionManager({
8044
8186
  "aria-labelledby": rootProps["aria-labelledby"] ?? headingId,
8045
8187
  children: [
8046
8188
  /* @__PURE__ */ jsxs24("header", { "data-keepkit": "collection-manager-heading", children: [
8047
- /* @__PURE__ */ jsx26("h2", { id: headingId, children: title ?? defaultTitle }),
8048
- hasRenderableContent(description) ? /* @__PURE__ */ jsx26("p", { children: description }) : null
8189
+ /* @__PURE__ */ jsx27("h2", { id: headingId, children: title ?? defaultTitle }),
8190
+ hasRenderableContent(description) ? /* @__PURE__ */ jsx27("p", { children: description }) : null
8049
8191
  ] }),
8050
- allowCreate ? /* @__PURE__ */ jsx26(KeepCollectionCreate, { onCreated, onError }) : null,
8051
- manager.error ? /* @__PURE__ */ jsx26("p", { "data-keepkit": "collection-manager-error", role: "alert", children: manager.error }) : null,
8052
- manager.collections.length > 0 ? /* @__PURE__ */ jsx26("ul", { "data-keepkit": "collection-manager-list", children: manager.collections.map((collection) => {
8192
+ allowCreate ? /* @__PURE__ */ jsx27(KeepCollectionCreate, { onCreated, onError }) : null,
8193
+ manager.error ? /* @__PURE__ */ jsx27("p", { "data-keepkit": "collection-manager-error", role: "alert", children: manager.error }) : null,
8194
+ manager.collections.length > 0 ? /* @__PURE__ */ jsx27("ul", { "data-keepkit": "collection-manager-list", children: manager.collections.map((collection) => {
8053
8195
  const name = collectionLabels?.[collection.id] ?? collection.name;
8054
8196
  const isEditing = manager.editingId === collection.id;
8055
8197
  const isPendingDelete = manager.pendingDeleteId === collection.id;
8056
- return /* @__PURE__ */ jsx26("li", { "data-keepkit": "collection-manager-item", children: isEditing && allowRename ? /* @__PURE__ */ jsxs24(
8198
+ return /* @__PURE__ */ jsx27("li", { "data-keepkit": "collection-manager-item", children: isEditing && allowRename ? /* @__PURE__ */ jsxs24(
8057
8199
  "form",
8058
8200
  {
8059
8201
  "data-keepkit": "collection-manager-rename",
@@ -8067,7 +8209,7 @@ function KeepCollectionManager({
8067
8209
  ": ",
8068
8210
  name
8069
8211
  ] }),
8070
- /* @__PURE__ */ jsx26(
8212
+ /* @__PURE__ */ jsx27(
8071
8213
  "input",
8072
8214
  {
8073
8215
  id: `${headingId}-rename-${collection.id}`,
@@ -8077,7 +8219,7 @@ function KeepCollectionManager({
8077
8219
  "data-keep-action": "rename-collection-input"
8078
8220
  }
8079
8221
  ),
8080
- /* @__PURE__ */ jsx26(
8222
+ /* @__PURE__ */ jsx27(
8081
8223
  "button",
8082
8224
  {
8083
8225
  type: "submit",
@@ -8086,7 +8228,7 @@ function KeepCollectionManager({
8086
8228
  children: renameSubmitLabel
8087
8229
  }
8088
8230
  ),
8089
- /* @__PURE__ */ jsx26(
8231
+ /* @__PURE__ */ jsx27(
8090
8232
  "button",
8091
8233
  {
8092
8234
  type: "button",
@@ -8100,7 +8242,7 @@ function KeepCollectionManager({
8100
8242
  }
8101
8243
  ) : /* @__PURE__ */ jsxs24(Fragment15, { children: [
8102
8244
  /* @__PURE__ */ jsxs24("div", { "data-keepkit": "collection-manager-summary", children: [
8103
- /* @__PURE__ */ jsx26("span", { "data-keepkit": "collection-manager-name", children: name }),
8245
+ /* @__PURE__ */ jsx27("span", { "data-keepkit": "collection-manager-name", children: name }),
8104
8246
  showCounts ? /* @__PURE__ */ jsxs24("span", { "data-keepkit": "collection-manager-count", children: [
8105
8247
  collection.count,
8106
8248
  " ",
@@ -8108,8 +8250,8 @@ function KeepCollectionManager({
8108
8250
  ] }) : null
8109
8251
  ] }),
8110
8252
  isPendingDelete && allowDelete ? /* @__PURE__ */ jsxs24("fieldset", { "data-keepkit": "collection-manager-delete-confirmation", children: [
8111
- /* @__PURE__ */ jsx26("legend", { children: deleteConfirmLabel }),
8112
- /* @__PURE__ */ jsx26(
8253
+ /* @__PURE__ */ jsx27("legend", { children: deleteConfirmLabel }),
8254
+ /* @__PURE__ */ jsx27(
8113
8255
  "button",
8114
8256
  {
8115
8257
  type: "button",
@@ -8119,7 +8261,7 @@ function KeepCollectionManager({
8119
8261
  children: deleteSubmitLabel
8120
8262
  }
8121
8263
  ),
8122
- /* @__PURE__ */ jsx26(
8264
+ /* @__PURE__ */ jsx27(
8123
8265
  "button",
8124
8266
  {
8125
8267
  type: "button",
@@ -8130,7 +8272,7 @@ function KeepCollectionManager({
8130
8272
  }
8131
8273
  )
8132
8274
  ] }) : /* @__PURE__ */ jsxs24("div", { "data-keepkit": "collection-manager-actions", children: [
8133
- allowRename ? /* @__PURE__ */ jsx26(
8275
+ allowRename ? /* @__PURE__ */ jsx27(
8134
8276
  "button",
8135
8277
  {
8136
8278
  type: "button",
@@ -8141,7 +8283,7 @@ function KeepCollectionManager({
8141
8283
  children: renameLabel
8142
8284
  }
8143
8285
  ) : null,
8144
- allowDelete ? /* @__PURE__ */ jsx26(
8286
+ allowDelete ? /* @__PURE__ */ jsx27(
8145
8287
  "button",
8146
8288
  {
8147
8289
  type: "button",
@@ -8154,7 +8296,7 @@ function KeepCollectionManager({
8154
8296
  ) : null
8155
8297
  ] })
8156
8298
  ] }) }, collection.id);
8157
- }) }) : hasRenderableContent(empty) ? /* @__PURE__ */ jsx26("div", { "data-keepkit": "collection-manager-empty", children: empty }) : null
8299
+ }) }) : hasRenderableContent(empty) ? /* @__PURE__ */ jsx27("div", { "data-keepkit": "collection-manager-empty", children: empty }) : null
8158
8300
  ]
8159
8301
  }
8160
8302
  );
@@ -8162,10 +8304,10 @@ function KeepCollectionManager({
8162
8304
 
8163
8305
  // src/features/collection/KeepInbox.tsx
8164
8306
  import { createInboxQuery } from "@keepkit/core/core";
8165
- import { jsx as jsx27 } from "react/jsx-runtime";
8307
+ import { jsx as jsx28 } from "react/jsx-runtime";
8166
8308
  function KeepInbox({ query, ...props }) {
8167
8309
  const inboxQuery = createInboxQuery({ organization: query?.organization });
8168
- return /* @__PURE__ */ jsx27(
8310
+ return /* @__PURE__ */ jsx28(
8169
8311
  KeepCollection,
8170
8312
  {
8171
8313
  ...props,
@@ -8176,12 +8318,12 @@ function KeepInbox({ query, ...props }) {
8176
8318
  }
8177
8319
 
8178
8320
  // src/features/collection/KeepLayout.tsx
8179
- import { jsx as jsx28 } from "react/jsx-runtime";
8321
+ import { jsx as jsx29 } from "react/jsx-runtime";
8180
8322
  function KeepLayout({ layout = "list", children, onKeyDown, onFocusCapture, ...props }) {
8181
8323
  const roving = useRovingTabIndex();
8182
8324
  return (
8183
8325
  // biome-ignore lint/a11y/noStaticElementInteractions: The group manages keyboard focus for descendant cards.
8184
- /* @__PURE__ */ jsx28(
8326
+ /* @__PURE__ */ jsx29(
8185
8327
  "div",
8186
8328
  {
8187
8329
  ...props,
@@ -8205,10 +8347,10 @@ function KeepLayout({ layout = "list", children, onKeyDown, onFocusCapture, ...p
8205
8347
  }
8206
8348
 
8207
8349
  // src/features/editor/KeepNoteEditor.tsx
8208
- import { isValidElement as isValidElement7 } from "react";
8350
+ import { isValidElement as isValidElement8 } from "react";
8209
8351
 
8210
8352
  // src/features/navigation/KeepShortcutHint.tsx
8211
- import { jsx as jsx29, jsxs as jsxs25 } from "react/jsx-runtime";
8353
+ import { jsx as jsx30, jsxs as jsxs25 } from "react/jsx-runtime";
8212
8354
  function KeepShortcutHint({ shortcut, separator = "+", ...props }) {
8213
8355
  const keys = typeof shortcut === "string" ? shortcut.split("+") : [...shortcut];
8214
8356
  const occurrences = /* @__PURE__ */ new Map();
@@ -8217,9 +8359,9 @@ function KeepShortcutHint({ shortcut, separator = "+", ...props }) {
8217
8359
  occurrences.set(key, occurrence + 1);
8218
8360
  return { id: `${key}-${occurrence}`, value: key };
8219
8361
  });
8220
- return /* @__PURE__ */ jsx29("span", { ...props, "data-keepkit": "shortcut-hint", "aria-hidden": props["aria-hidden"] ?? true, children: keyedKeys.map((key, index) => /* @__PURE__ */ jsxs25("span", { children: [
8221
- index > 0 ? /* @__PURE__ */ jsx29("span", { "data-shortcut-separator": "true", children: separator }) : null,
8222
- /* @__PURE__ */ jsx29("kbd", { children: key.value.trim() })
8362
+ return /* @__PURE__ */ jsx30("span", { ...props, "data-keepkit": "shortcut-hint", "aria-hidden": props["aria-hidden"] ?? true, children: keyedKeys.map((key, index) => /* @__PURE__ */ jsxs25("span", { children: [
8363
+ index > 0 ? /* @__PURE__ */ jsx30("span", { "data-shortcut-separator": "true", children: separator }) : null,
8364
+ /* @__PURE__ */ jsx30("kbd", { children: key.value.trim() })
8223
8365
  ] }, key.id)) });
8224
8366
  }
8225
8367
 
@@ -8280,7 +8422,7 @@ function useKeepNoteEditor({ item, debounceMs, onSaved, onSaveError }) {
8280
8422
  }
8281
8423
 
8282
8424
  // src/features/editor/KeepNoteEditor.tsx
8283
- import { Fragment as Fragment16, jsx as jsx30, jsxs as jsxs26 } from "react/jsx-runtime";
8425
+ import { Fragment as Fragment16, jsx as jsx31, jsxs as jsxs26 } from "react/jsx-runtime";
8284
8426
  function KeepNoteEditor({
8285
8427
  item,
8286
8428
  label,
@@ -8302,11 +8444,11 @@ function KeepNoteEditor({
8302
8444
  const showSaveLabel = useUiLabelVisibility("saveNote");
8303
8445
  const saveAccessibleLabel = useUiLabel("saveNote");
8304
8446
  const { error, isDirty, isSaving, note, setNote } = view.state;
8305
- const contentChildren = asChild && isValidElement7(children) ? void 0 : children;
8447
+ const contentChildren = asChild && isValidElement8(children) ? void 0 : children;
8306
8448
  const body = render ? render(view.state) : typeof contentChildren === "function" ? contentChildren(view.state) : contentChildren ?? /* @__PURE__ */ jsxs26(Fragment16, { children: [
8307
8449
  /* @__PURE__ */ jsxs26("label", { children: [
8308
8450
  showNoteLabel ? label ?? view.labels.note : null,
8309
- /* @__PURE__ */ jsx30(
8451
+ /* @__PURE__ */ jsx31(
8310
8452
  "textarea",
8311
8453
  {
8312
8454
  "data-keep-action": "edit-note",
@@ -8329,7 +8471,7 @@ function KeepNoteEditor({
8329
8471
  "aria-label": showSaveLabel ? void 0 : saveAccessibleLabel,
8330
8472
  children: [
8331
8473
  showSaveLabel ? saveLabel ?? view.labels.save : null,
8332
- showShortcutHint ? /* @__PURE__ */ jsx30(KeepShortcutHint, { shortcut: "Ctrl+Enter" }) : null
8474
+ showShortcutHint ? /* @__PURE__ */ jsx31(KeepShortcutHint, { shortcut: "Ctrl+Enter" }) : null
8333
8475
  ]
8334
8476
  }
8335
8477
  )
@@ -8348,14 +8490,14 @@ function KeepNoteEditor({
8348
8490
  "data-disabled": isSaving ? "true" : void 0,
8349
8491
  children: [
8350
8492
  body,
8351
- error ? /* @__PURE__ */ jsx30("p", { role: "alert", children: getErrorMessage(error, view.labels.error) }) : null
8493
+ error ? /* @__PURE__ */ jsx31("p", { role: "alert", children: getErrorMessage(error, view.labels.error) }) : null
8352
8494
  ]
8353
8495
  }
8354
8496
  );
8355
8497
  }
8356
8498
  return renderRoot(
8357
8499
  true,
8358
- isValidElement7(children) ? children : void 0,
8500
+ isValidElement8(children) ? children : void 0,
8359
8501
  {
8360
8502
  ...formProps,
8361
8503
  className,
@@ -8425,7 +8567,7 @@ function useKeepTagEditor({ item, onSaved, onSaveError }) {
8425
8567
  }
8426
8568
 
8427
8569
  // src/features/editor/KeepTagEditor.tsx
8428
- import { Fragment as Fragment17, jsx as jsx31, jsxs as jsxs27 } from "react/jsx-runtime";
8570
+ import { Fragment as Fragment17, jsx as jsx32, jsxs as jsxs27 } from "react/jsx-runtime";
8429
8571
  function KeepTagEditor({
8430
8572
  item,
8431
8573
  availableTags = [],
@@ -8443,7 +8585,7 @@ function KeepTagEditor({
8443
8585
  const body = render ? render(view.state) : /* @__PURE__ */ jsxs27(Fragment17, { children: [
8444
8586
  /* @__PURE__ */ jsxs27("label", { children: [
8445
8587
  showTagsLabel ? view.labels.tags : null,
8446
- /* @__PURE__ */ jsx31(
8588
+ /* @__PURE__ */ jsx32(
8447
8589
  "input",
8448
8590
  {
8449
8591
  "data-keep-action": "edit-tags",
@@ -8455,10 +8597,10 @@ function KeepTagEditor({
8455
8597
  }
8456
8598
  )
8457
8599
  ] }),
8458
- availableTags.length > 0 ? /* @__PURE__ */ jsx31("datalist", { id: `keep-tags-${item.id}`, children: availableTags.map((tag) => /* @__PURE__ */ jsx31("option", { value: tag }, tag)) }) : null,
8459
- /* @__PURE__ */ jsx31("ul", { "aria-label": view.labels.tags, children: tags.map((tag) => /* @__PURE__ */ jsxs27("li", { children: [
8600
+ availableTags.length > 0 ? /* @__PURE__ */ jsx32("datalist", { id: `keep-tags-${item.id}`, children: availableTags.map((tag) => /* @__PURE__ */ jsx32("option", { value: tag }, tag)) }) : null,
8601
+ /* @__PURE__ */ jsx32("ul", { "aria-label": view.labels.tags, children: tags.map((tag) => /* @__PURE__ */ jsxs27("li", { children: [
8460
8602
  tag,
8461
- /* @__PURE__ */ jsx31(
8603
+ /* @__PURE__ */ jsx32(
8462
8604
  "button",
8463
8605
  {
8464
8606
  type: "button",
@@ -8469,7 +8611,7 @@ function KeepTagEditor({
8469
8611
  }
8470
8612
  )
8471
8613
  ] }, tag)) }),
8472
- /* @__PURE__ */ jsx31(
8614
+ /* @__PURE__ */ jsx32(
8473
8615
  "button",
8474
8616
  {
8475
8617
  type: "submit",
@@ -8493,7 +8635,7 @@ function KeepTagEditor({
8493
8635
  "data-disabled": isSaving ? "true" : void 0,
8494
8636
  children: [
8495
8637
  body,
8496
- view.error ? /* @__PURE__ */ jsx31("p", { role: "alert", children: getErrorMessage(view.error, view.labels.error) }) : null
8638
+ view.error ? /* @__PURE__ */ jsx32("p", { role: "alert", children: getErrorMessage(view.error, view.labels.error) }) : null
8497
8639
  ]
8498
8640
  }
8499
8641
  );
@@ -8522,85 +8664,7 @@ function useKeepToastFeedback(showToast) {
8522
8664
  // src/features/navigation/KeepFloatingTour.tsx
8523
8665
  import { useKeepList as useKeepList6 } from "@keepkit/core/react";
8524
8666
  import { useEffect as useEffect19, useMemo as useMemo7, useRef as useRef16, useState as useState23 } from "react";
8525
- import { createPortal } from "react-dom";
8526
-
8527
- // src/foundation/theme.tsx
8528
- import {
8529
- createContext as createContext4,
8530
- isValidElement as isValidElement8,
8531
- useContext as useContext4
8532
- } from "react";
8533
- import { jsx as jsx32 } from "react/jsx-runtime";
8534
- var keepThemeNames = [
8535
- "default",
8536
- "ocean",
8537
- "forest",
8538
- "sunset",
8539
- "lavender",
8540
- "compact",
8541
- "minimal",
8542
- "rounded",
8543
- "high-contrast",
8544
- "dark"
8545
- ];
8546
- var KeepThemeContext = createContext4({});
8547
- function useKeepTheme() {
8548
- return useContext4(KeepThemeContext);
8549
- }
8550
- function KeepThemeProvider({
8551
- children,
8552
- theme = "default",
8553
- mode = "system",
8554
- density = "comfortable",
8555
- radius = "medium",
8556
- accentColor,
8557
- highContrast = false,
8558
- reducedMotion = false,
8559
- variables,
8560
- style,
8561
- className,
8562
- asChild = false,
8563
- ...props
8564
- }) {
8565
- const themeClassName = [
8566
- "keep-theme",
8567
- `keep-theme--${theme}`,
8568
- `keep-theme--${mode}`,
8569
- `keep-theme--density-${density}`,
8570
- `keep-theme--radius-${radius}`,
8571
- className
8572
- ].filter(Boolean).join(" ");
8573
- const themeStyle = {
8574
- ...style,
8575
- ...accentColor && !highContrast ? { "--keep-accent": accentColor, "--keep-primary": accentColor } : {},
8576
- ...variables
8577
- };
8578
- const rootProps = {
8579
- ...props,
8580
- className: themeClassName,
8581
- style: themeStyle,
8582
- "data-keep-theme": theme,
8583
- "data-theme": theme,
8584
- "data-mode": mode,
8585
- "data-density": density,
8586
- "data-radius": radius,
8587
- "data-accent-color": accentColor,
8588
- "data-high-contrast": highContrast ? "true" : void 0,
8589
- "data-reduced-motion": reducedMotion ? "true" : void 0
8590
- };
8591
- const content = asChild ? (() => {
8592
- if (!isValidElement8(children))
8593
- throw new Error("KeepThemeProvider with asChild requires a single React element child.");
8594
- return createSlot(children, rootProps);
8595
- })() : /* @__PURE__ */ jsx32("div", { ...rootProps, children });
8596
- return /* @__PURE__ */ jsx32(
8597
- KeepThemeContext.Provider,
8598
- {
8599
- value: { theme, mode, density, radius, accentColor, highContrast, reducedMotion, variables, style },
8600
- children: content
8601
- }
8602
- );
8603
- }
8667
+ import { createPortal as createPortal2 } from "react-dom";
8604
8668
 
8605
8669
  // src/features/navigation/KeepTourBar.tsx
8606
8670
  import { useKeepNavigator } from "@keepkit/core/react";
@@ -9067,7 +9131,7 @@ function KeepFloatingTour({
9067
9131
  }
9068
9132
  )
9069
9133
  ] });
9070
- return createPortal(
9134
+ return createPortal2(
9071
9135
  /* @__PURE__ */ jsx35(KeepThemeProvider, { ...theme, children: /* @__PURE__ */ jsx35(
9072
9136
  "aside",
9073
9137
  {