@protobase/ui 0.55.3 → 0.55.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/dist/app/create/create-page.js +11 -1
  2. package/dist/app/marks/marks-hook.d.ts +10 -0
  3. package/dist/app/nav-recent.js +10 -1
  4. package/dist/app/pages/merge-ui.d.ts +1 -1
  5. package/dist/app/pages/merge-ui.js +3 -1
  6. package/dist/app/pages/project-ui.d.ts +4 -1
  7. package/dist/app/use-live-save.js +11 -4
  8. package/dist/app/use-nav-recent.js +10 -6
  9. package/dist/app-shell/index.d.ts +1 -1
  10. package/dist/app-shell/nav.d.ts +13 -1
  11. package/dist/app-shell/record-marks.js +18 -0
  12. package/dist/app-shell/sidebar-group.js +10 -17
  13. package/dist/app-shell/sidebar-records.js +54 -0
  14. package/dist/auth/auth-provider.d.ts +4 -0
  15. package/dist/auth/use-signed-in-user.d.ts +13 -0
  16. package/dist/auth/use-signed-in-user.js +22 -0
  17. package/dist/chat/chat-thread.d.ts +10 -4
  18. package/dist/chat/chat-thread.js +20 -6
  19. package/dist/chat/thread-scroll.js +4 -1
  20. package/dist/chat/use-read-to-end.js +32 -0
  21. package/dist/index.d.ts +5 -2
  22. package/dist/index.js +2 -1
  23. package/dist/notifications/bell/notification-bell.js +5 -8
  24. package/dist/notifications/bell/unread-label.js +1 -3
  25. package/dist/notifications/push/push-notifications.d.ts +1 -0
  26. package/dist/package.js +1 -1
  27. package/dist/plugins/plugin-ui.js +1 -0
  28. package/dist/primitives/count-badge.js +20 -0
  29. package/dist/shell/assets/app-NiljOxYe.js +9 -0
  30. package/dist/shell/assets/{index-CEhwvXIf.js → index-BIUTidjX.js} +2 -2
  31. package/dist/shell/assets/{records-map-Cp4sUeC-.js → records-map-BwX2z-di.js} +2 -2
  32. package/dist/shell/assets/shared-protobase-ui-BD_5D_Ot.js +2 -0
  33. package/dist/shell/index.html +3 -3
  34. package/dist/shell/protobase.shell.json +1 -1
  35. package/dist/shell/protobase.sw.js +2 -2
  36. package/dist/shell-source-maps/assets/app-NiljOxYe.js.map +1 -0
  37. package/dist/shell-source-maps/assets/{index-CEhwvXIf.js.map → index-BIUTidjX.js.map} +1 -1
  38. package/dist/shell-source-maps/assets/{records-map-Cp4sUeC-.js.map → records-map-BwX2z-di.js.map} +1 -1
  39. package/dist/shell-source-maps/assets/shared-protobase-ui-BD_5D_Ot.js.map +1 -0
  40. package/package.json +4 -4
  41. package/dist/shell/assets/app-CAj-S5YI.js +0 -9
  42. package/dist/shell/assets/shared-protobase-ui-Dd4pdw8C.js +0 -2
  43. package/dist/shell-source-maps/assets/app-CAj-S5YI.js.map +0 -1
  44. package/dist/shell-source-maps/assets/shared-protobase-ui-Dd4pdw8C.js.map +0 -1
@@ -1,12 +1,10 @@
1
1
  import { text } from "./messages.js";
2
2
  //#region src/notifications/bell/unread-label.ts
3
3
  const shownMax = 99;
4
- /** The count over the bell, or none while nothing is unread. */
5
- const unreadBadge = (count) => count === void 0 || count <= 0 ? void 0 : count > shownMax ? `${shownMax}+` : String(count);
6
4
  /** The bell's name for a screen reader, with how many are unread. */
7
5
  const bellLabel = (count) => {
8
6
  if (count === void 0 || count <= 0) return text("notifications");
9
7
  return count > shownMax ? text("notificationsManyUnread") : text("notificationsUnread", String(count));
10
8
  };
11
9
  //#endregion
12
- export { bellLabel, unreadBadge };
10
+ export { bellLabel };
@@ -0,0 +1 @@
1
+ import "./web-push.js";
package/dist/package.js CHANGED
@@ -1,5 +1,5 @@
1
1
  //#region package.json
2
- var version = "0.55.3";
2
+ var version = "0.55.4";
3
3
  var protobase = { "pluginApi": 1 };
4
4
  //#endregion
5
5
  export { protobase, version };
@@ -43,6 +43,7 @@ const pluginUi = (plugin, module) => {
43
43
  ...ui.dropRules && { dropRules: ui.dropRules },
44
44
  ...ui.boardDrops && { boardDrops: ui.boardDrops },
45
45
  ...ui.titles && { titles: ui.titles },
46
+ ...ui.marks && { marks: ui.marks },
46
47
  ...fields && { fields },
47
48
  ...shell && { shell },
48
49
  ...beforeSignIn && { beforeSignIn }
@@ -0,0 +1,20 @@
1
+ import { cn } from "../lib/cn.js";
2
+ import { Badge } from "./badge.js";
3
+ import { jsx } from "react/jsx-runtime";
4
+ //#region src/primitives/count-badge.tsx
5
+ const shownMax = 99;
6
+ /** A count as its badge shows it: up to 99, then 99+; none while it is zero or unknown. */
7
+ const countBadgeText = (count) => count === void 0 || count <= 0 ? void 0 : count > shownMax ? `${shownMax}+` : String(count);
8
+ /** The small red pill with a count of unread things, such as over the notification bell; nothing while the count is zero. */
9
+ const CountBadge = ({ count, className }) => {
10
+ const shown = countBadgeText(count);
11
+ if (!shown) return null;
12
+ return /* @__PURE__ */ jsx(Badge, {
13
+ tone: "red",
14
+ dot: false,
15
+ className: cn("h-4 min-w-4 justify-center px-1 text-[10px] font-semibold", className),
16
+ children: shown
17
+ });
18
+ };
19
+ //#endregion
20
+ export { CountBadge, countBadgeText };