@krak-stack/registry 0.11.6 → 0.11.9

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 (123) hide show
  1. package/CHANGELOG.md +80 -0
  2. package/README.md +39 -0
  3. package/dist/components/app-switcher/html.d.ts +2 -2
  4. package/dist/components/asset-input/html.d.ts +70 -0
  5. package/dist/components/asset-input/html.js +1549 -0
  6. package/dist/components/asset-input/index.d.ts +280 -0
  7. package/dist/components/asset-input/react.d.ts +32 -0
  8. package/dist/components/asset-input/react.js +2269 -0
  9. package/dist/components/asset-input/schema.d.ts +93 -0
  10. package/dist/components/asset-input/upload.d.ts +15 -0
  11. package/dist/components/asset-table/html.d.ts +110 -0
  12. package/dist/components/asset-table/html.js +4934 -0
  13. package/dist/components/asset-table/index.d.ts +225 -0
  14. package/dist/components/asset-table/react.d.ts +21 -0
  15. package/dist/components/asset-table/react.js +8241 -0
  16. package/dist/components/asset-table/schema.d.ts +73 -0
  17. package/dist/components/audit-log-table/classes.d.ts +1 -0
  18. package/dist/components/audit-log-table/html.d.ts +158 -0
  19. package/dist/components/audit-log-table/html.js +3294 -0
  20. package/dist/components/audit-log-table/index.d.ts +37 -0
  21. package/dist/components/audit-log-table/react.d.ts +3 -51
  22. package/dist/components/audit-log-table/react.js +130 -89
  23. package/dist/components/audit-log-table/schema.d.ts +122 -0
  24. package/dist/components/danger-confirmation/html.d.ts +2 -2
  25. package/dist/components/danger-confirmation/index.d.ts +2 -2
  26. package/dist/components/data-table/classes.d.ts +3 -0
  27. package/dist/components/data-table/html.d.ts +70 -12
  28. package/dist/components/data-table/html.js +56 -19
  29. package/dist/components/data-table/index.d.ts +51 -1
  30. package/dist/components/data-table/react.d.ts +1 -0
  31. package/dist/components/data-table/react.js +46 -16
  32. package/dist/components/data-table/schema.d.ts +93 -3
  33. package/dist/components/docs/html.js +22 -4
  34. package/dist/components/docs/react.js +33 -2
  35. package/dist/components/editable-text/html.d.ts +2 -2
  36. package/dist/components/editable-text/index.d.ts +4 -4
  37. package/dist/components/effect-form/react.js +343 -138
  38. package/dist/components/email-editor/legacy-editor.html.d.ts +6 -6
  39. package/dist/components/file-input/classes.d.ts +1 -1
  40. package/dist/components/file-input/file-type.d.ts +1 -0
  41. package/dist/components/file-input/html.d.ts +8 -1
  42. package/dist/components/file-input/html.js +170 -12
  43. package/dist/components/file-input/index.d.ts +1 -0
  44. package/dist/components/file-input/react.d.ts +9 -1
  45. package/dist/components/file-input/react.js +277 -127
  46. package/dist/components/file-input/schema.d.ts +1 -0
  47. package/dist/components/form/react.js +343 -138
  48. package/dist/components/icon-input/html.js +19 -5
  49. package/dist/components/icon-input/react.js +70 -13
  50. package/dist/components/map-menu/html.d.ts +6 -0
  51. package/dist/components/map-menu/html.js +13 -8
  52. package/dist/components/map-menu/index.d.ts +5 -4
  53. package/dist/components/map-menu/react.d.ts +28 -17
  54. package/dist/components/map-menu/react.js +84 -178
  55. package/dist/components/map-menu/schema.d.ts +6 -0
  56. package/dist/components/map-menu/shared.d.ts +4 -0
  57. package/dist/components/permissions-input/classes.d.ts +8 -0
  58. package/dist/components/permissions-input/html.d.ts +41 -0
  59. package/dist/components/permissions-input/html.js +130 -0
  60. package/dist/components/permissions-input/index.d.ts +80 -0
  61. package/dist/components/permissions-input/react.d.ts +7 -0
  62. package/dist/components/permissions-input/react.js +201 -0
  63. package/dist/components/permissions-input/schema.d.ts +33 -0
  64. package/dist/components/phone-number-input/html.js +48 -14
  65. package/dist/components/phone-number-input/react.js +67 -10
  66. package/dist/components/search-menu/html.d.ts +2 -2
  67. package/dist/components/select-with-custom-input/html.d.ts +2 -2
  68. package/dist/components/sidebar-layout/html.d.ts +3 -2
  69. package/dist/components/sidebar-layout/html.js +20 -2
  70. package/dist/components/sidebar-layout/index.d.ts +1 -0
  71. package/dist/components/sidebar-layout/react.js +33 -2
  72. package/dist/components/switch/react.d.ts +14 -0
  73. package/dist/components/switch/react.js +55 -0
  74. package/dist/components/theme-switcher/html.d.ts +2 -2
  75. package/dist/components/time-input/html.d.ts +2 -2
  76. package/dist/components/timezone-input/html.js +48 -14
  77. package/dist/components/timezone-input/react.js +67 -10
  78. package/dist/components/tracking-notice/classes.d.ts +6 -0
  79. package/dist/components/tracking-notice/html.d.ts +85 -0
  80. package/dist/components/tracking-notice/html.js +354 -0
  81. package/dist/components/tracking-notice/index.d.ts +95 -0
  82. package/dist/components/tracking-notice/react.d.ts +5 -27
  83. package/dist/components/tracking-notice/react.js +189 -59
  84. package/dist/components/tracking-notice/schema.d.ts +45 -0
  85. package/dist/components/upload-attachment/classes.d.ts +3 -2
  86. package/dist/components/upload-attachment/html.d.ts +5 -5
  87. package/dist/components/upload-attachment/html.js +7 -5
  88. package/dist/components/upload-attachment/react.d.ts +3 -1
  89. package/dist/components/upload-attachment/react.js +25 -17
  90. package/dist/components/virtualized-combobox/classes.d.ts +12 -0
  91. package/dist/components/virtualized-combobox/html.d.ts +42 -0
  92. package/dist/components/virtualized-combobox/html.js +48 -14
  93. package/dist/components/virtualized-combobox/index.d.ts +55 -4
  94. package/dist/components/virtualized-combobox/react.d.ts +6 -2
  95. package/dist/components/virtualized-combobox/react.js +67 -10
  96. package/dist/components/virtualized-combobox/schema.d.ts +60 -4
  97. package/dist/components/webhook-delivery-table/html.js +56 -19
  98. package/dist/components/webhook-delivery-table/react.js +46 -16
  99. package/dist/lib/access/index.d.ts +61 -0
  100. package/dist/lib/access/index.js +92 -0
  101. package/dist/lib/access/table/classes.d.ts +13 -0
  102. package/dist/lib/access/table/html.d.ts +39 -0
  103. package/dist/lib/access/table/html.js +157 -0
  104. package/dist/lib/access/table/index.d.ts +32 -0
  105. package/dist/lib/access/table/react.d.ts +3 -0
  106. package/dist/lib/access/table/react.js +195 -0
  107. package/dist/lib/access/table/schema.d.ts +43 -0
  108. package/dist/lib/docs.integrations.server.js +23 -1
  109. package/dist/lib/docs.js +33 -2
  110. package/dist/lib/docs.server.js +29 -2
  111. package/dist/lib/documentation-toolkit.js +23 -1
  112. package/dist/lib/effect-ui-adapter/use-model.d.ts +1 -1
  113. package/dist/lib/effect-ui-adapter/use-model.js +19 -11
  114. package/dist/lib/lucide-effect.d.ts +19 -19
  115. package/dist/lib/lucide-effect.js +38 -38
  116. package/dist/services/assets/library.d.ts +221 -0
  117. package/dist/services/assets/schema.d.ts +3 -0
  118. package/dist/services/assets/url.d.ts +12 -0
  119. package/dist/services/assets/use-library.d.ts +20 -0
  120. package/dist/services/events/browser.js +39 -26
  121. package/dist/services/events/index.js +23 -19
  122. package/dist/services/opentelemetry/web-vitals.js +27 -23
  123. package/package.json +21 -1
@@ -114,8 +114,10 @@ export declare const isTableList: <I>(input: I) => input is I & readonly {
114
114
  readonly label: string;
115
115
  }[];
116
116
  export declare const tableInitials: (label: string) => string;
117
+ export declare const formatBytes: (bytes: number, locale: string) => string;
117
118
  export declare const formatNumberValue: (value: number, options: (Intl.NumberFormatOptions & {
118
119
  locale?: string;
120
+ format?: "bytes";
119
121
  }) | undefined, defaultLocale?: string) => string;
120
122
  type DateColumnType = "date" | "dateTime";
121
123
  export declare const resolveDate: (value: unknown, type: DateColumnType) => {
@@ -177,6 +179,7 @@ export declare const filterTableColumns: (rows: readonly DataTableRow[], columns
177
179
  readonly name: string;
178
180
  readonly variant?: "default" | "destructive" | undefined;
179
181
  readonly disabled?: boolean | undefined;
182
+ readonly icon?: (<Msg>(h: import("effect/ui/html/Html").H<Msg>, { size, color, strokeWidth, className, }?: import("../../lib/lucide-effect.js").LucideIconProps) => import("effect/ui/html/Html").SvgElement<Msg, never, SVGSVGElement, "svg">) | undefined;
180
183
  }[] | undefined;
181
184
  readonly primaryActionId?: string | undefined;
182
185
  readonly groups?: {
@@ -205,6 +208,7 @@ export declare const sortTableRows: (rows: readonly DataTableRow[], columns: rea
205
208
  readonly name: string;
206
209
  readonly variant?: "default" | "destructive" | undefined;
207
210
  readonly disabled?: boolean | undefined;
211
+ readonly icon?: (<Msg>(h: import("effect/ui/html/Html").H<Msg>, { size, color, strokeWidth, className, }?: import("../../lib/lucide-effect.js").LucideIconProps) => import("effect/ui/html/Html").SvgElement<Msg, never, SVGSVGElement, "svg">) | undefined;
208
212
  }[] | undefined;
209
213
  readonly primaryActionId?: string | undefined;
210
214
  readonly groups?: {
@@ -231,6 +235,7 @@ export declare const filterTableRows: (rows: readonly DataTableRow[], columns: r
231
235
  readonly name: string;
232
236
  readonly variant?: "default" | "destructive" | undefined;
233
237
  readonly disabled?: boolean | undefined;
238
+ readonly icon?: (<Msg>(h: import("effect/ui/html/Html").H<Msg>, { size, color, strokeWidth, className, }?: import("../../lib/lucide-effect.js").LucideIconProps) => import("effect/ui/html/Html").SvgElement<Msg, never, SVGSVGElement, "svg">) | undefined;
234
239
  }[] | undefined;
235
240
  readonly primaryActionId?: string | undefined;
236
241
  readonly groups?: {
@@ -551,7 +556,7 @@ export declare const DataTableMessage: UiSchema.TaggedEnum<{
551
556
  export declare const dataTableOptions: {
552
557
  readonly name: "DataTable";
553
558
  readonly props: Schema.Struct<{
554
- readonly classes: Schema.optional<Schema.$Record<Schema.Literals<("actionTrigger" | "actionsAlign" | "actionsCell" | "cell" | "cellContent" | "count" | "group" | "groupContent" | "groupSticky" | "groupTrigger" | "header" | "headerTrigger" | "menubar" | "reference" | "referenceAvatar" | "referenceDescription" | "referenceName" | "referenceText" | "relationshipCell" | "relationshipTrigger" | "resizeHandle" | "selectedTrigger" | "selectionCell" | "selectionCenter" | "stickyHeader" | "stickyHeaderRule" | "toolbar" | "toolbarMenus" | "toolbarSearch")[]>, Schema.optionalKey<Schema.String>>>;
559
+ readonly classes: Schema.optional<Schema.$Record<Schema.Literals<("actionTrigger" | "actionsAlign" | "actionsCell" | "cell" | "cellContent" | "count" | "group" | "groupContent" | "groupSticky" | "groupTrigger" | "header" | "headerTrigger" | "menubar" | "reference" | "referenceAvatar" | "referenceDescription" | "referenceName" | "referenceText" | "relationshipCell" | "relationshipTrigger" | "resizeHandle" | "row" | "selectedTrigger" | "selectionCell" | "selectionCenter" | "stickyHeader" | "stickyHeaderRule" | "toolbar" | "toolbarMenus" | "toolbarSearch")[]>, Schema.optionalKey<Schema.String>>>;
555
560
  readonly className: Schema.optionalKey<Schema.String>;
556
561
  readonly locale: Schema.optionalKey<Schema.String>;
557
562
  readonly label: Schema.String;
@@ -571,6 +576,7 @@ export declare const dataTableOptions: {
571
576
  readonly name: Schema.String;
572
577
  readonly variant: Schema.optionalKey<Schema.Literals<readonly ["default", "destructive"]>>;
573
578
  readonly disabled: Schema.optionalKey<Schema.Boolean>;
579
+ readonly icon: Schema.optionalKey<Schema.declare<<Msg>(h: import("effect/ui/html/Html").H<Msg>, { size, color, strokeWidth, className, }?: import("../../lib/lucide-effect.js").LucideIconProps) => import("effect/ui/html/Html").SvgElement<Msg, never, SVGSVGElement, "svg">, <Msg>(h: import("effect/ui/html/Html").H<Msg>, { size, color, strokeWidth, className, }?: import("../../lib/lucide-effect.js").LucideIconProps) => import("effect/ui/html/Html").SvgElement<Msg, never, SVGSVGElement, "svg">>>;
574
580
  }>>>;
575
581
  readonly primaryActionId: Schema.optionalKey<Schema.String>;
576
582
  readonly groups: Schema.optionalKey<Schema.$Record<Schema.String, Schema.$Array<Schema.String>>>;
@@ -646,6 +652,7 @@ export declare const dataTableOptions: {
646
652
  readonly type: Schema.Literal<"number">;
647
653
  readonly typeOptions: Schema.optionalKey<Schema.Struct<{
648
654
  readonly locale: Schema.optionalKey<Schema.String>;
655
+ readonly format: Schema.optionalKey<Schema.Literal<"bytes">>;
649
656
  readonly style: Schema.optionalKey<Schema.Literals<readonly ["decimal", "percent", "currency", "unit"]>>;
650
657
  readonly currency: Schema.optionalKey<Schema.String>;
651
658
  readonly unit: Schema.optionalKey<Schema.String>;
@@ -670,6 +677,10 @@ export declare const dataTableOptions: {
670
677
  readonly emptyLabel: Schema.optionalKey<Schema.String>;
671
678
  readonly nulls: Schema.optionalKey<Schema.Literals<readonly ["first", "last"]>>;
672
679
  readonly type: Schema.Literal<"reference">;
680
+ readonly typeOptions: Schema.optionalKey<Schema.Struct<{
681
+ readonly imageVariant: Schema.optionalKey<Schema.Literals<readonly ["circle", "square"]>>;
682
+ readonly fallbackIcons: Schema.optionalKey<Schema.$Record<Schema.String, Schema.declare<<Msg>(h: import("effect/ui/html/Html").H<Msg>, { size, color, strokeWidth, className, }?: import("../../lib/lucide-effect.js").LucideIconProps) => import("effect/ui/html/Html").SvgElement<Msg, never, SVGSVGElement, "svg">, <Msg>(h: import("effect/ui/html/Html").H<Msg>, { size, color, strokeWidth, className, }?: import("../../lib/lucide-effect.js").LucideIconProps) => import("effect/ui/html/Html").SvgElement<Msg, never, SVGSVGElement, "svg">>>>;
683
+ }>>;
673
684
  }>, Schema.Struct<{
674
685
  readonly id: Schema.NonEmptyString;
675
686
  readonly headerName: Schema.String;
@@ -792,6 +803,7 @@ export declare const dataTableOptions: {
792
803
  readonly type: Schema.Literal<"number">;
793
804
  readonly typeOptions: Schema.optionalKey<Schema.Struct<{
794
805
  readonly locale: Schema.optionalKey<Schema.String>;
806
+ readonly format: Schema.optionalKey<Schema.Literal<"bytes">>;
795
807
  readonly style: Schema.optionalKey<Schema.Literals<readonly ["decimal", "percent", "currency", "unit"]>>;
796
808
  readonly currency: Schema.optionalKey<Schema.String>;
797
809
  readonly unit: Schema.optionalKey<Schema.String>;
@@ -843,6 +855,7 @@ export declare const dataTableOptions: {
843
855
  readonly type: Schema.Literal<"number">;
844
856
  readonly typeOptions: Schema.optionalKey<Schema.Struct<{
845
857
  readonly locale: Schema.optionalKey<Schema.String>;
858
+ readonly format: Schema.optionalKey<Schema.Literal<"bytes">>;
846
859
  readonly style: Schema.optionalKey<Schema.Literals<readonly ["decimal", "percent", "currency", "unit"]>>;
847
860
  readonly currency: Schema.optionalKey<Schema.String>;
848
861
  readonly unit: Schema.optionalKey<Schema.String>;
@@ -867,6 +880,10 @@ export declare const dataTableOptions: {
867
880
  readonly emptyLabel: Schema.optionalKey<Schema.String>;
868
881
  readonly nulls: Schema.optionalKey<Schema.Literals<readonly ["first", "last"]>>;
869
882
  readonly type: Schema.Literal<"reference">;
883
+ readonly typeOptions: Schema.optionalKey<Schema.Struct<{
884
+ readonly imageVariant: Schema.optionalKey<Schema.Literals<readonly ["circle", "square"]>>;
885
+ readonly fallbackIcons: Schema.optionalKey<Schema.$Record<Schema.String, Schema.declare<<Msg>(h: import("effect/ui/html/Html").H<Msg>, { size, color, strokeWidth, className, }?: import("../../lib/lucide-effect.js").LucideIconProps) => import("effect/ui/html/Html").SvgElement<Msg, never, SVGSVGElement, "svg">, <Msg>(h: import("effect/ui/html/Html").H<Msg>, { size, color, strokeWidth, className, }?: import("../../lib/lucide-effect.js").LucideIconProps) => import("effect/ui/html/Html").SvgElement<Msg, never, SVGSVGElement, "svg">>>>;
886
+ }>>;
870
887
  }>, Schema.Struct<{
871
888
  readonly id: Schema.NonEmptyString;
872
889
  readonly headerName: Schema.String;
@@ -987,6 +1004,10 @@ export declare const dataTableOptions: {
987
1004
  readonly emptyLabel: Schema.optionalKey<Schema.String>;
988
1005
  readonly nulls: Schema.optionalKey<Schema.Literals<readonly ["first", "last"]>>;
989
1006
  readonly type: Schema.Literal<"reference">;
1007
+ readonly typeOptions: Schema.optionalKey<Schema.Struct<{
1008
+ readonly imageVariant: Schema.optionalKey<Schema.Literals<readonly ["circle", "square"]>>;
1009
+ readonly fallbackIcons: Schema.optionalKey<Schema.$Record<Schema.String, Schema.declare<<Msg>(h: import("effect/ui/html/Html").H<Msg>, { size, color, strokeWidth, className, }?: import("../../lib/lucide-effect.js").LucideIconProps) => import("effect/ui/html/Html").SvgElement<Msg, never, SVGSVGElement, "svg">, <Msg>(h: import("effect/ui/html/Html").H<Msg>, { size, color, strokeWidth, className, }?: import("../../lib/lucide-effect.js").LucideIconProps) => import("effect/ui/html/Html").SvgElement<Msg, never, SVGSVGElement, "svg">>>>;
1010
+ }>>;
990
1011
  readonly fields: Schema.optionalKey<Schema.$Array<Schema.Union<readonly [Schema.Struct<{
991
1012
  readonly id: Schema.NonEmptyString;
992
1013
  readonly headerName: Schema.String;
@@ -1030,6 +1051,7 @@ export declare const dataTableOptions: {
1030
1051
  readonly type: Schema.Literal<"number">;
1031
1052
  readonly typeOptions: Schema.optionalKey<Schema.Struct<{
1032
1053
  readonly locale: Schema.optionalKey<Schema.String>;
1054
+ readonly format: Schema.optionalKey<Schema.Literal<"bytes">>;
1033
1055
  readonly style: Schema.optionalKey<Schema.Literals<readonly ["decimal", "percent", "currency", "unit"]>>;
1034
1056
  readonly currency: Schema.optionalKey<Schema.String>;
1035
1057
  readonly unit: Schema.optionalKey<Schema.String>;
@@ -1054,6 +1076,10 @@ export declare const dataTableOptions: {
1054
1076
  readonly emptyLabel: Schema.optionalKey<Schema.String>;
1055
1077
  readonly nulls: Schema.optionalKey<Schema.Literals<readonly ["first", "last"]>>;
1056
1078
  readonly type: Schema.Literal<"reference">;
1079
+ readonly typeOptions: Schema.optionalKey<Schema.Struct<{
1080
+ readonly imageVariant: Schema.optionalKey<Schema.Literals<readonly ["circle", "square"]>>;
1081
+ readonly fallbackIcons: Schema.optionalKey<Schema.$Record<Schema.String, Schema.declare<<Msg>(h: import("effect/ui/html/Html").H<Msg>, { size, color, strokeWidth, className, }?: import("../../lib/lucide-effect.js").LucideIconProps) => import("effect/ui/html/Html").SvgElement<Msg, never, SVGSVGElement, "svg">, <Msg>(h: import("effect/ui/html/Html").H<Msg>, { size, color, strokeWidth, className, }?: import("../../lib/lucide-effect.js").LucideIconProps) => import("effect/ui/html/Html").SvgElement<Msg, never, SVGSVGElement, "svg">>>>;
1082
+ }>>;
1057
1083
  }>, Schema.Struct<{
1058
1084
  readonly id: Schema.NonEmptyString;
1059
1085
  readonly headerName: Schema.String;
@@ -1223,6 +1249,7 @@ export declare const dataTableOptions: {
1223
1249
  readonly type: Schema.Literal<"number">;
1224
1250
  readonly typeOptions: Schema.optionalKey<Schema.Struct<{
1225
1251
  readonly locale: Schema.optionalKey<Schema.String>;
1252
+ readonly format: Schema.optionalKey<Schema.Literal<"bytes">>;
1226
1253
  readonly style: Schema.optionalKey<Schema.Literals<readonly ["decimal", "percent", "currency", "unit"]>>;
1227
1254
  readonly currency: Schema.optionalKey<Schema.String>;
1228
1255
  readonly unit: Schema.optionalKey<Schema.String>;
@@ -1247,6 +1274,10 @@ export declare const dataTableOptions: {
1247
1274
  readonly emptyLabel: Schema.optionalKey<Schema.String>;
1248
1275
  readonly nulls: Schema.optionalKey<Schema.Literals<readonly ["first", "last"]>>;
1249
1276
  readonly type: Schema.Literal<"reference">;
1277
+ readonly typeOptions: Schema.optionalKey<Schema.Struct<{
1278
+ readonly imageVariant: Schema.optionalKey<Schema.Literals<readonly ["circle", "square"]>>;
1279
+ readonly fallbackIcons: Schema.optionalKey<Schema.$Record<Schema.String, Schema.declare<<Msg>(h: import("effect/ui/html/Html").H<Msg>, { size, color, strokeWidth, className, }?: import("../../lib/lucide-effect.js").LucideIconProps) => import("effect/ui/html/Html").SvgElement<Msg, never, SVGSVGElement, "svg">, <Msg>(h: import("effect/ui/html/Html").H<Msg>, { size, color, strokeWidth, className, }?: import("../../lib/lucide-effect.js").LucideIconProps) => import("effect/ui/html/Html").SvgElement<Msg, never, SVGSVGElement, "svg">>>>;
1280
+ }>>;
1250
1281
  }>, Schema.Struct<{
1251
1282
  readonly id: Schema.NonEmptyString;
1252
1283
  readonly headerName: Schema.String;
@@ -1418,6 +1449,7 @@ export declare const dataTableOptions: {
1418
1449
  readonly type: Schema.Literal<"number">;
1419
1450
  readonly typeOptions: Schema.optionalKey<Schema.Struct<{
1420
1451
  readonly locale: Schema.optionalKey<Schema.String>;
1452
+ readonly format: Schema.optionalKey<Schema.Literal<"bytes">>;
1421
1453
  readonly style: Schema.optionalKey<Schema.Literals<readonly ["decimal", "percent", "currency", "unit"]>>;
1422
1454
  readonly currency: Schema.optionalKey<Schema.String>;
1423
1455
  readonly unit: Schema.optionalKey<Schema.String>;
@@ -1442,6 +1474,10 @@ export declare const dataTableOptions: {
1442
1474
  readonly emptyLabel: Schema.optionalKey<Schema.String>;
1443
1475
  readonly nulls: Schema.optionalKey<Schema.Literals<readonly ["first", "last"]>>;
1444
1476
  readonly type: Schema.Literal<"reference">;
1477
+ readonly typeOptions: Schema.optionalKey<Schema.Struct<{
1478
+ readonly imageVariant: Schema.optionalKey<Schema.Literals<readonly ["circle", "square"]>>;
1479
+ readonly fallbackIcons: Schema.optionalKey<Schema.$Record<Schema.String, Schema.declare<<Msg>(h: import("effect/ui/html/Html").H<Msg>, { size, color, strokeWidth, className, }?: import("../../lib/lucide-effect.js").LucideIconProps) => import("effect/ui/html/Html").SvgElement<Msg, never, SVGSVGElement, "svg">, <Msg>(h: import("effect/ui/html/Html").H<Msg>, { size, color, strokeWidth, className, }?: import("../../lib/lucide-effect.js").LucideIconProps) => import("effect/ui/html/Html").SvgElement<Msg, never, SVGSVGElement, "svg">>>>;
1480
+ }>>;
1445
1481
  }>, Schema.Struct<{
1446
1482
  readonly id: Schema.NonEmptyString;
1447
1483
  readonly headerName: Schema.String;
@@ -1611,6 +1647,7 @@ export declare const dataTableOptions: {
1611
1647
  readonly type: Schema.Literal<"number">;
1612
1648
  readonly typeOptions: Schema.optionalKey<Schema.Struct<{
1613
1649
  readonly locale: Schema.optionalKey<Schema.String>;
1650
+ readonly format: Schema.optionalKey<Schema.Literal<"bytes">>;
1614
1651
  readonly style: Schema.optionalKey<Schema.Literals<readonly ["decimal", "percent", "currency", "unit"]>>;
1615
1652
  readonly currency: Schema.optionalKey<Schema.String>;
1616
1653
  readonly unit: Schema.optionalKey<Schema.String>;
@@ -1635,6 +1672,10 @@ export declare const dataTableOptions: {
1635
1672
  readonly emptyLabel: Schema.optionalKey<Schema.String>;
1636
1673
  readonly nulls: Schema.optionalKey<Schema.Literals<readonly ["first", "last"]>>;
1637
1674
  readonly type: Schema.Literal<"reference">;
1675
+ readonly typeOptions: Schema.optionalKey<Schema.Struct<{
1676
+ readonly imageVariant: Schema.optionalKey<Schema.Literals<readonly ["circle", "square"]>>;
1677
+ readonly fallbackIcons: Schema.optionalKey<Schema.$Record<Schema.String, Schema.declare<<Msg>(h: import("effect/ui/html/Html").H<Msg>, { size, color, strokeWidth, className, }?: import("../../lib/lucide-effect.js").LucideIconProps) => import("effect/ui/html/Html").SvgElement<Msg, never, SVGSVGElement, "svg">, <Msg>(h: import("effect/ui/html/Html").H<Msg>, { size, color, strokeWidth, className, }?: import("../../lib/lucide-effect.js").LucideIconProps) => import("effect/ui/html/Html").SvgElement<Msg, never, SVGSVGElement, "svg">>>>;
1678
+ }>>;
1638
1679
  }>, Schema.Struct<{
1639
1680
  readonly id: Schema.NonEmptyString;
1640
1681
  readonly headerName: Schema.String;
@@ -1817,6 +1858,7 @@ export declare const dataTableOptions: {
1817
1858
  readonly type: Schema.Literal<"number">;
1818
1859
  readonly typeOptions: Schema.optionalKey<Schema.Struct<{
1819
1860
  readonly locale: Schema.optionalKey<Schema.String>;
1861
+ readonly format: Schema.optionalKey<Schema.Literal<"bytes">>;
1820
1862
  readonly style: Schema.optionalKey<Schema.Literals<readonly ["decimal", "percent", "currency", "unit"]>>;
1821
1863
  readonly currency: Schema.optionalKey<Schema.String>;
1822
1864
  readonly unit: Schema.optionalKey<Schema.String>;
@@ -1841,6 +1883,10 @@ export declare const dataTableOptions: {
1841
1883
  readonly emptyLabel: Schema.optionalKey<Schema.String>;
1842
1884
  readonly nulls: Schema.optionalKey<Schema.Literals<readonly ["first", "last"]>>;
1843
1885
  readonly type: Schema.Literal<"reference">;
1886
+ readonly typeOptions: Schema.optionalKey<Schema.Struct<{
1887
+ readonly imageVariant: Schema.optionalKey<Schema.Literals<readonly ["circle", "square"]>>;
1888
+ readonly fallbackIcons: Schema.optionalKey<Schema.$Record<Schema.String, Schema.declare<<Msg>(h: import("effect/ui/html/Html").H<Msg>, { size, color, strokeWidth, className, }?: import("../../lib/lucide-effect.js").LucideIconProps) => import("effect/ui/html/Html").SvgElement<Msg, never, SVGSVGElement, "svg">, <Msg>(h: import("effect/ui/html/Html").H<Msg>, { size, color, strokeWidth, className, }?: import("../../lib/lucide-effect.js").LucideIconProps) => import("effect/ui/html/Html").SvgElement<Msg, never, SVGSVGElement, "svg">>>>;
1889
+ }>>;
1844
1890
  }>, Schema.Struct<{
1845
1891
  readonly id: Schema.NonEmptyString;
1846
1892
  readonly headerName: Schema.String;
@@ -2592,6 +2638,7 @@ export declare const tableRowActions: (row: DataTableRow, siblings: readonly Dat
2592
2638
  name: string;
2593
2639
  variant?: "default" | "destructive" | undefined;
2594
2640
  disabled?: boolean | undefined;
2641
+ icon?: (<Msg>(h: import("effect/ui/html/Html").H<Msg>, { size, color, strokeWidth, className, }?: import("../../lib/lucide-effect.js").LucideIconProps) => import("effect/ui/html/Html").SvgElement<Msg, never, SVGSVGElement, "svg">) | undefined;
2595
2642
  message: {
2596
2643
  readonly _tag: "RowActionRequested";
2597
2644
  readonly rowId: string;
@@ -2687,6 +2734,7 @@ export declare const dataTablePage: (props: DataTableProps, model: TableModel, l
2687
2734
  readonly name: string;
2688
2735
  readonly variant?: "default" | "destructive" | undefined;
2689
2736
  readonly disabled?: boolean | undefined;
2737
+ readonly icon?: (<Msg>(h: import("effect/ui/html/Html").H<Msg>, { size, color, strokeWidth, className, }?: import("../../lib/lucide-effect.js").LucideIconProps) => import("effect/ui/html/Html").SvgElement<Msg, never, SVGSVGElement, "svg">) | undefined;
2690
2738
  }[] | undefined;
2691
2739
  readonly primaryActionId?: string | undefined;
2692
2740
  readonly groups?: {
@@ -2713,6 +2761,7 @@ export declare const dataTablePage: (props: DataTableProps, model: TableModel, l
2713
2761
  readonly name: string;
2714
2762
  readonly variant?: "default" | "destructive" | undefined;
2715
2763
  readonly disabled?: boolean | undefined;
2764
+ readonly icon?: (<Msg>(h: import("effect/ui/html/Html").H<Msg>, { size, color, strokeWidth, className, }?: import("../../lib/lucide-effect.js").LucideIconProps) => import("effect/ui/html/Html").SvgElement<Msg, never, SVGSVGElement, "svg">) | undefined;
2716
2765
  }[] | undefined;
2717
2766
  readonly primaryActionId?: string | undefined;
2718
2767
  readonly groups?: {
@@ -2739,6 +2788,7 @@ export declare const dataTablePage: (props: DataTableProps, model: TableModel, l
2739
2788
  readonly name: string;
2740
2789
  readonly variant?: "default" | "destructive" | undefined;
2741
2790
  readonly disabled?: boolean | undefined;
2791
+ readonly icon?: (<Msg>(h: import("effect/ui/html/Html").H<Msg>, { size, color, strokeWidth, className, }?: import("../../lib/lucide-effect.js").LucideIconProps) => import("effect/ui/html/Html").SvgElement<Msg, never, SVGSVGElement, "svg">) | undefined;
2742
2792
  }[] | undefined;
2743
2793
  readonly primaryActionId?: string | undefined;
2744
2794
  readonly groups?: {
@@ -43,6 +43,7 @@ export interface DataTableReferenceItem {
43
43
  /** Secondary text, such as a user's email or a record identifier. */
44
44
  description?: string | null;
45
45
  imageSrc?: string | null;
46
+ fallbackIcon?: ReactNode;
46
47
  }
47
48
  export interface DataTableReferenceOptions<TData> {
48
49
  getItem: (row: TData) => DataTableReferenceItem | null | undefined;
@@ -635,6 +635,7 @@ var tableClasses = {
635
635
  actionTrigger: `size-8 ${cellTriggerFocus}`,
636
636
  actionsCell: "sticky right-0 z-20 w-10 min-w-10 cursor-default bg-background p-0 transition-colors group-hover/row:bg-[color-mix(in_oklab,var(--muted)_50%,var(--background))]",
637
637
  actionsAlign: "flex min-h-12 items-center justify-end pe-1",
638
+ row: "h-16 [&:where(:not(:last-child))>td]:border-b",
638
639
  header: "relative h-12 p-0",
639
640
  stickyHeader: "sticky top-0 z-30 bg-background",
640
641
  stickyHeaderRule: "after:border-border after:pointer-events-none after:absolute after:inset-x-0 after:bottom-0 after:border-b",
@@ -652,6 +653,7 @@ var tableClasses = {
652
653
  referenceName: "truncate font-medium",
653
654
  referenceDescription: "text-muted-foreground truncate text-xs"
654
655
  };
656
+ var tableResultsFooterClass = "bg-background text-muted-foreground sticky bottom-0 z-30 shrink-0 border-t px-2 py-2 text-sm";
655
657
  var resolveTableClasses = (overrides) => ({
656
658
  ...tableClasses,
657
659
  ...overrides
@@ -706,6 +708,7 @@ var DataTableItemSchema = Schema4.Struct({
706
708
  value: Schema4.NonEmptyString,
707
709
  label: Schema4.String
708
710
  }).annotate({ identifier: "DataTableItem" });
711
+ var TableIconSchema = Schema4.declare((value) => Predicate.isFunction(value)).annotate({ identifier: "DataTableIcon" });
709
712
  var DataTableReferenceSchema = Schema4.Struct({
710
713
  label: Schema4.String,
711
714
  description: Schema4.optionalKey(Schema4.String),
@@ -745,11 +748,15 @@ var DataTableActionSchema = Schema4.Struct({
745
748
  variant: Schema4.optionalKey(Schema4.Literals(["default", "destructive"])),
746
749
  disabled: Schema4.optionalKey(Schema4.Boolean)
747
750
  }).annotate({ identifier: "DataTableAction" });
751
+ var DataTableRowActionSchema = Schema4.Struct({
752
+ ...DataTableActionSchema.fields,
753
+ icon: Schema4.optionalKey(TableIconSchema)
754
+ }).annotate({ identifier: "DataTableRowAction" });
748
755
  var DataTableRowSchema = Schema4.Struct({
749
756
  id: Schema4.NonEmptyString,
750
757
  label: Schema4.String,
751
758
  cells: Schema4.Record(Schema4.String, DataTableCellValueSchema),
752
- actions: Schema4.optionalKey(Schema4.Array(DataTableActionSchema)),
759
+ actions: Schema4.optionalKey(Schema4.Array(DataTableRowActionSchema)),
753
760
  primaryActionId: Schema4.optionalKey(Schema4.String),
754
761
  groups: Schema4.optionalKey(Schema4.Record(Schema4.String, Schema4.Array(Schema4.String))),
755
762
  selectable: Schema4.optionalKey(Schema4.Boolean),
@@ -784,11 +791,10 @@ var DataTableBadgeOptionSchema = Schema4.Struct({
784
791
  "muted"
785
792
  ]))
786
793
  }).annotate({ identifier: "DataTableBadgeOption" });
787
- var BadgeIcon = Schema4.declare((value) => Predicate.isFunction(value)).annotate({ identifier: "DataTableBadgeIcon" });
788
794
  var DataTableBadgeOptionsSchema = Schema4.Struct({
789
795
  options: Schema4.optionalKey(Schema4.Array(DataTableBadgeOptionSchema.mapFields((fields) => ({
790
796
  ...fields,
791
- icon: Schema4.optionalKey(BadgeIcon)
797
+ icon: Schema4.optionalKey(TableIconSchema)
792
798
  }))))
793
799
  }).annotate({ identifier: "DataTableBadgeOptions" });
794
800
  var DataTableFieldSchema = Schema4.Union([
@@ -803,6 +809,7 @@ var DataTableFieldSchema = Schema4.Union([
803
809
  type: Schema4.Literal("number"),
804
810
  typeOptions: Schema4.optionalKey(Schema4.Struct({
805
811
  locale: Schema4.optionalKey(Schema4.String),
812
+ format: Schema4.optionalKey(Schema4.Literal("bytes")),
806
813
  style: Schema4.optionalKey(Schema4.Literals(["decimal", "percent", "currency", "unit"])),
807
814
  currency: Schema4.optionalKey(Schema4.String),
808
815
  unit: Schema4.optionalKey(Schema4.String),
@@ -812,7 +819,14 @@ var DataTableFieldSchema = Schema4.Union([
812
819
  exportFormat: Schema4.optionalKey(Schema4.Literals(["raw", "formatted"]))
813
820
  }).annotate({ identifier: "DataTableNumberFormat" }))
814
821
  }),
815
- Schema4.Struct({ ...column, type: Schema4.Literal("reference") }),
822
+ Schema4.Struct({
823
+ ...column,
824
+ type: Schema4.Literal("reference"),
825
+ typeOptions: Schema4.optionalKey(Schema4.Struct({
826
+ imageVariant: Schema4.optionalKey(Schema4.Literals(["circle", "square"])),
827
+ fallbackIcons: Schema4.optionalKey(Schema4.Record(Schema4.String, TableIconSchema))
828
+ }).annotate({ identifier: "DataTableReferenceOptions" }))
829
+ }),
816
830
  Schema4.Struct({
817
831
  ...column,
818
832
  type: Schema4.Literal("date"),
@@ -1091,9 +1105,17 @@ var isTableBoolean = Schema5.is(Schema5.Boolean);
1091
1105
  var isTableReference = Schema5.is(DataTableReferenceSchema);
1092
1106
  var isTableList = Schema5.is(Schema5.Array(DataTableItemSchema));
1093
1107
  var tableInitials = (label) => label.trim().split(/\s+/).slice(0, 2).map((word) => word.slice(0, 1)).join("").toLocaleUpperCase();
1108
+ var formatBytes = (bytes, locale) => {
1109
+ const [unit, scale] = bytes >= 1024 ** 2 ? ["megabyte", 1024 ** 2] : bytes >= 1024 ? ["kilobyte", 1024] : ["byte", 1];
1110
+ return new Intl.NumberFormat(locale, {
1111
+ style: "unit",
1112
+ unit,
1113
+ maximumFractionDigits: 1
1114
+ }).format(bytes / scale);
1115
+ };
1094
1116
  var formatNumberValue = (value, options, defaultLocale = "en") => {
1095
- const { locale, ...format } = options ?? {};
1096
- return new Intl.NumberFormat(locale ?? defaultLocale, format).format(value);
1117
+ const { locale, format, ...intlOptions } = options ?? {};
1118
+ return format === "bytes" ? formatBytes(value, locale ?? defaultLocale) : new Intl.NumberFormat(locale ?? defaultLocale, intlOptions).format(value);
1097
1119
  };
1098
1120
  var tableBooleanLabel = (value, options) => (value ? options?.trueLabel : options?.falseLabel) ?? String(value);
1099
1121
  var decodeDateInput = Schema5.decodeUnknownOption(DataTableDateInputSchema);
@@ -2026,6 +2048,7 @@ var DataTableReferenceCell = ({
2026
2048
  if (!item)
2027
2049
  return emptyLabel;
2028
2050
  const initials = tableInitials(item.label);
2051
+ const image = item.imageSrc && item.imageSrc !== failedImage ? item.imageSrc : undefined;
2029
2052
  return /* @__PURE__ */ jsxs3("div", {
2030
2053
  className: tableClasses.reference,
2031
2054
  children: [
@@ -2035,14 +2058,16 @@ var DataTableReferenceCell = ({
2035
2058
  "aria-hidden": "true",
2036
2059
  className: "[&_svg]:size-4",
2037
2060
  children: item.icon
2038
- }) : item.imageSrc && item.imageSrc !== failedImage ? /* @__PURE__ */ jsx3("img", {
2039
- src: item.imageSrc,
2040
- alt: item.label,
2061
+ }) : image ? /* @__PURE__ */ jsx3("img", {
2062
+ src: image,
2063
+ alt: item.fallbackIcon ? "" : item.label,
2064
+ loading: "lazy",
2041
2065
  className: "size-full object-cover",
2042
- onError: () => setFailedImage(item.imageSrc ?? undefined)
2066
+ onError: () => setFailedImage(image)
2043
2067
  }) : /* @__PURE__ */ jsx3("span", {
2044
2068
  "aria-hidden": "true",
2045
- children: initials
2069
+ className: "[&_svg]:size-4",
2070
+ children: item.fallbackIcon ?? initials
2046
2071
  })
2047
2072
  }),
2048
2073
  /* @__PURE__ */ jsxs3("div", {
@@ -3584,7 +3609,7 @@ var TableDataRow = ({
3584
3609
  ref: measureRef,
3585
3610
  "data-index": virtualIndex,
3586
3611
  "aria-rowindex": virtualIndex === undefined ? undefined : virtualIndex + 2,
3587
- className: cn("group/row data-[drop-position=before]:[&>td]:border-primary data-[drop-position=after]:[&>td]:border-primary h-16 data-[drag-source=true]:opacity-40 data-[drop-position=after]:[&>td]:border-b-2 data-[drop-position=before]:[&>td]:border-t-2", store.config.onRowClicked && "cursor-pointer"),
3612
+ className: cn("group/row data-[drop-position=before]:[&>td]:border-primary data-[drop-position=after]:[&>td]:border-primary data-[drag-source=true]:opacity-40 data-[drop-position=after]:[&>td]:border-b-2 data-[drop-position=before]:[&>td]:border-t-2", tableClasses.row, store.config.onRowClicked && "cursor-pointer"),
3588
3613
  "data-state": store.state.rowSelection[row.id] && "selected",
3589
3614
  "data-table-row": row.id,
3590
3615
  onClick: () => store.config.onRowClicked?.(row.data),
@@ -4389,7 +4414,7 @@ var DataTableGallery = ({
4389
4414
  children: renderSections(sections)
4390
4415
  });
4391
4416
  };
4392
- var DataTablePagination = ({
4417
+ var DataTableFooter = ({
4393
4418
  table
4394
4419
  }) => {
4395
4420
  const styles = useContext(DataTableStylesContext);
@@ -4403,8 +4428,13 @@ var DataTablePagination = ({
4403
4428
  send(DataTableMessage.PageRequested({ page }));
4404
4429
  }
4405
4430
  }, [page, pageIndex, pagination, paginationVisible, send]);
4406
- if (!paginationVisible || !pagination)
4407
- return null;
4431
+ if (!paginationVisible || !pagination) {
4432
+ return /* @__PURE__ */ jsx3("div", {
4433
+ className: tableResultsFooterClass,
4434
+ role: "status",
4435
+ children: store.config.labels.results(model.totalRows)
4436
+ });
4437
+ }
4408
4438
  const selected = model.rows.filter((row) => store.state.rowSelection[row.id]).length;
4409
4439
  return /* @__PURE__ */ jsx3("div", {
4410
4440
  "data-table-slot": "pagination",
@@ -4601,7 +4631,7 @@ var HydratedDataTable = (props) => {
4601
4631
  /* @__PURE__ */ jsx3(DataTableContent, {
4602
4632
  table
4603
4633
  }),
4604
- /* @__PURE__ */ jsx3(DataTablePagination, {
4634
+ /* @__PURE__ */ jsx3(DataTableFooter, {
4605
4635
  table
4606
4636
  })
4607
4637
  ]