@krak-stack/registry 0.11.1 → 0.11.2

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 (34) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/components/agent/react.js +29 -183
  3. package/dist/components/animated-list/react.js +16 -168
  4. package/dist/components/animated-number/react.js +8 -162
  5. package/dist/components/async-action-button/react.js +10 -164
  6. package/dist/components/audit-log-table/react.js +59 -213
  7. package/dist/components/code-block/react.js +10 -164
  8. package/dist/components/copy-button/react.js +10 -164
  9. package/dist/components/copy-value/html.js +4 -4
  10. package/dist/components/copy-value/react.js +20 -172
  11. package/dist/components/danger-confirmation/react.js +13 -167
  12. package/dist/components/data-table/react.js +59 -213
  13. package/dist/components/editable-text/react.js +14 -168
  14. package/dist/components/email-composer/react.js +25 -174
  15. package/dist/components/email-editor/react.js +34 -186
  16. package/dist/components/error-component/react.js +15 -169
  17. package/dist/components/icon-input/react.js +7 -161
  18. package/dist/components/image-crop-editor/react.js +19 -173
  19. package/dist/components/markdown/react.js +10 -164
  20. package/dist/components/presence-transition/react.js +9 -163
  21. package/dist/components/registry-previews/component-example.js +10 -164
  22. package/dist/components/rich-text-editor/react.js +9 -161
  23. package/dist/components/search-menu/react.js +11 -165
  24. package/dist/components/sidebar-layout/react.js +3 -157
  25. package/dist/components/support/react.js +14 -168
  26. package/dist/components/timezone-input/react.js +9 -163
  27. package/dist/components/webhook-delivery-table/react.js +74 -226
  28. package/dist/lib/docs.integrations.server.js +16 -35
  29. package/dist/lib/docs.js +31 -183
  30. package/dist/lib/docs.server.js +16 -35
  31. package/dist/lib/documentation-toolkit.js +19 -38
  32. package/dist/lib/effect-ui-adapter/use-model.js +158 -0
  33. package/dist/services/agent/client/index.js +29 -183
  34. package/package.json +5 -1
@@ -2,7 +2,7 @@
2
2
  import { ScrollArea as ScrollAreaPrimitive2 } from "@base-ui/react/scroll-area";
3
3
  import { useVirtualizer, useWindowVirtualizer } from "@tanstack/react-virtual";
4
4
  import { Formatter, Option as Option4, Schema as Schema6 } from "effect";
5
- import { Component as Component3, View as View2 } from "effect/ui";
5
+ import { Component as Component3, View } from "effect/ui";
6
6
  import {
7
7
  ArrowDown,
8
8
  ArrowUp,
@@ -27,17 +27,17 @@ import {
27
27
  X
28
28
  } from "lucide-react";
29
29
  import {
30
- createContext as createContext2,
30
+ createContext,
31
31
  isValidElement,
32
- useCallback as useCallback2,
33
- useContext as useContext2,
34
- useEffect as useEffect2,
32
+ useCallback,
33
+ useContext,
34
+ useEffect,
35
35
  useId as useId2,
36
- useLayoutEffect as useLayoutEffect2,
36
+ useLayoutEffect,
37
37
  useMemo as useMemo2,
38
- useRef as useRef2,
39
- useState as useState2,
40
- useSyncExternalStore as useSyncExternalStore2
38
+ useRef,
39
+ useState,
40
+ useSyncExternalStore
41
41
  } from "react";
42
42
  import { createPortal } from "react-dom";
43
43
 
@@ -1319,162 +1319,8 @@ var PaginationMeta = Schema3.Struct({
1319
1319
  examples: [{ page: 0, pageSize: 20, total: 125, pageCount: 7 }]
1320
1320
  }));
1321
1321
 
1322
- // ../../src/lib/effect-ui-adapter/use-model.ts
1323
- import { MessageLog as MessageLog2 } from "effect/ui";
1324
- import {
1325
- createContext,
1326
- useCallback,
1327
- useContext,
1328
- useEffect,
1329
- useLayoutEffect,
1330
- useRef,
1331
- useState,
1332
- useSyncExternalStore
1333
- } from "react";
1334
-
1335
- // ../../src/lib/effect-ui-adapter/model-runtime.ts
1336
- import { MessageLog, Renderer, View } from "effect/ui";
1337
- import { BrowserHost, Html } from "effect/ui/html";
1338
- import { Cause, Effect as Effect2, Fiber } from "effect";
1339
- var node = () => ({ children: [] });
1340
- var modelHost = (commit) => {
1341
- const remove = (child) => {
1342
- if (!child.parent)
1343
- return;
1344
- child.parent.children.splice(child.parent.children.indexOf(child), 1);
1345
- delete child.parent;
1346
- };
1347
- return {
1348
- createElement: node,
1349
- createText: node,
1350
- setText: () => {},
1351
- setAttr: () => {},
1352
- setProp: () => {},
1353
- setEvents: () => {},
1354
- insertBefore: (parent, child, before) => {
1355
- if (child === before)
1356
- return;
1357
- remove(child);
1358
- const index = before ? parent.children.indexOf(before) : parent.children.length;
1359
- parent.children.splice(index, 0, child);
1360
- child.parent = parent;
1361
- },
1362
- remove,
1363
- parentOf: (child) => child.parent,
1364
- nextOf: (child) => child.parent?.children[child.parent.children.indexOf(child) + 1],
1365
- elements: ["html"],
1366
- controlled: new Set,
1367
- runsMounts: false,
1368
- commit
1369
- };
1370
- };
1371
- var mountModel = (component, props, publishSnapshot, messageLog, onEmit) => {
1372
- let currentProps = props;
1373
- let root;
1374
- let active = true;
1375
- let failure;
1376
- const publish = () => {
1377
- if (!active)
1378
- return;
1379
- if (failure) {
1380
- publishSnapshot({ error: failure });
1381
- return;
1382
- }
1383
- const current = root?.model();
1384
- if (current !== undefined)
1385
- publishSnapshot({ model: current });
1386
- };
1387
- const fiber = Effect2.runFork(Effect2.scoped(Effect2.gen(function* () {
1388
- const mounted = yield* Renderer.mount(component, Effect2.succeed(props), node(), {
1389
- head: false,
1390
- onEmit,
1391
- fallback: ({ cause }) => {
1392
- failure = new Error("Effect UI root failed", {
1393
- cause: Cause.squash(cause)
1394
- });
1395
- return View.text("");
1396
- }
1397
- });
1398
- if (!active)
1399
- return;
1400
- root = mounted;
1401
- if (props !== currentProps)
1402
- mounted.setProps(currentProps);
1403
- publish();
1404
- return yield* Effect2.never;
1405
- }).pipe(Effect2.provide(Renderer.layer(modelHost(publish))), Effect2.provideService(Html.Host, BrowserHost.htmlHost), Effect2.provideService(MessageLog.MessageLog, messageLog))));
1406
- return {
1407
- send: (message) => {
1408
- root?.send(message);
1409
- publish();
1410
- },
1411
- setProps: (next) => {
1412
- currentProps = next;
1413
- root?.setProps(next);
1414
- },
1415
- dispose: () => {
1416
- active = false;
1417
- root = undefined;
1418
- Effect2.runFork(Fiber.interrupt(fiber));
1419
- }
1420
- };
1421
- };
1422
-
1423
- // ../../src/lib/effect-ui-adapter/use-model.ts
1424
- "use client";
1425
- var ModelMessageLogContext = createContext(undefined);
1426
- var useModel = (component, props, options = {}) => {
1427
- const contextLog = useContext(ModelMessageLogContext);
1428
- const messageLog = options.messageLog ?? (contextLog === undefined ? MessageLog2.noop : contextLog);
1429
- const [store] = useState(() => {
1430
- const initial = { model: component.init(props).model };
1431
- let snapshot = initial;
1432
- const listeners = new Set;
1433
- return {
1434
- subscribe: (listener) => {
1435
- listeners.add(listener);
1436
- return () => {
1437
- listeners.delete(listener);
1438
- };
1439
- },
1440
- getSnapshot: () => snapshot,
1441
- getServerSnapshot: () => initial,
1442
- publish: (next) => {
1443
- if ("model" in snapshot && "model" in next && Object.is(snapshot.model, next.model))
1444
- return;
1445
- if ("error" in snapshot && "error" in next && snapshot.error === next.error)
1446
- return;
1447
- snapshot = next;
1448
- listeners.forEach((listener) => listener());
1449
- }
1450
- };
1451
- });
1452
- const snapshot = useSyncExternalStore(store.subscribe, store.getSnapshot, store.getServerSnapshot);
1453
- const committed = useRef(props);
1454
- const onEmit = useRef(options.onEmit);
1455
- const runtime = useRef(undefined);
1456
- const send = useCallback((message) => runtime.current?.send(message), []);
1457
- useLayoutEffect(() => {
1458
- onEmit.current = options.onEmit;
1459
- committed.current = props;
1460
- runtime.current?.setProps(props);
1461
- }, [props, options.onEmit]);
1462
- useEffect(() => {
1463
- if (messageLog === null)
1464
- return;
1465
- const mounted = mountModel(component, committed.current, store.publish, messageLog, (event) => onEmit.current?.(event));
1466
- runtime.current = mounted;
1467
- return () => {
1468
- runtime.current = undefined;
1469
- mounted.dispose();
1470
- };
1471
- }, [component, messageLog, store]);
1472
- if ("error" in snapshot)
1473
- throw snapshot.error;
1474
- return { model: snapshot.model, send };
1475
- };
1476
-
1477
1322
  // ../../src/components/data-table/react.tsx
1323
+ import { useModel } from "@krak-stack/registry/effect-ui-adapter/react";
1478
1324
  import { useKrakstackLocale as useKrakstackLocale3 } from "@krak-stack/registry/krakstack-provider/react";
1479
1325
 
1480
1326
  // ../../src/components/data-table/classes.ts
@@ -1515,7 +1361,7 @@ var resolveTableClasses = (overrides) => ({
1515
1361
  });
1516
1362
 
1517
1363
  // ../../src/components/data-table/index.ts
1518
- import { DateTime as DateTime3, Effect as Effect3, Option as Option3, Redacted, Schema as Schema5, Stream } from "effect";
1364
+ import { DateTime as DateTime3, Effect as Effect2, Option as Option3, Redacted, Schema as Schema5, Stream } from "effect";
1519
1365
  import { Csv } from "effect/encoding";
1520
1366
  import { Command, Component as Component2, Subscription, UiSchema as UiSchema2 } from "effect/ui";
1521
1367
 
@@ -2422,8 +2268,8 @@ var dataTablePage = (props, model, locale) => {
2422
2268
  pageSizes: pagination && pagination.pageSizes || defaultPageSizes
2423
2269
  };
2424
2270
  };
2425
- var encodeTableCsv = (headers, data) => Effect3.runSync(Stream.fromIterable([headers, ...data]).pipe(Stream.map((row) => row.map((value) => value == null ? "" : String(value))), Stream.pipeThroughChannel(Csv.encodeString({ newline: `
2426
- ` })), Stream.runCollect, Effect3.map((parts) => parts.join("").slice(0, -1))));
2271
+ var encodeTableCsv = (headers, data) => Effect2.runSync(Stream.fromIterable([headers, ...data]).pipe(Stream.map((row) => row.map((value) => value == null ? "" : String(value))), Stream.pipeThroughChannel(Csv.encodeString({ newline: `
2272
+ ` })), Stream.runCollect, Effect2.map((parts) => parts.join("").slice(0, -1))));
2427
2273
  var tableExportFilename = (name, extension) => name.includes(".") ? name.replace(/\.[^/.]+$/, `.${extension}`) : `${name}.${extension}`;
2428
2274
  var downloadTableBlob = (content, type, filename) => {
2429
2275
  const url = window.URL.createObjectURL(new Blob([content], { type }));
@@ -2464,7 +2310,7 @@ var DownloadTable = Command.make("DataTable/Download", {
2464
2310
  content: Schema5.Redacted(Schema5.String, { disallowJsonEncode: true }),
2465
2311
  type: Schema5.String
2466
2312
  }
2467
- }, ({ filename, content, type }) => Effect3.try(() => downloadTableBlob(Redacted.value(content), type, filename)).pipe(Effect3.match({
2313
+ }, ({ filename, content, type }) => Effect2.try(() => downloadTableBlob(Redacted.value(content), type, filename)).pipe(Effect2.match({
2468
2314
  onSuccess: () => DataTableMessage.ExportFinished({ failed: false }),
2469
2315
  onFailure: () => DataTableMessage.ExportFinished({ failed: true })
2470
2316
  })));
@@ -2773,11 +2619,11 @@ var dataTableBehaviours = {
2773
2619
 
2774
2620
  // ../../src/components/data-table/react.tsx
2775
2621
  import { jsx as jsx15, jsxs as jsxs9, Fragment } from "react/jsx-runtime";
2776
- var DataTableStylesContext = createContext2(undefined);
2777
- var DataTableSlotClassesContext = createContext2(resolveTableClasses());
2622
+ var DataTableStylesContext = createContext(undefined);
2623
+ var DataTableSlotClassesContext = createContext(resolveTableClasses());
2778
2624
  var styledTablePart = (Part, slot, style) => {
2779
2625
  const StyledPart = (props) => {
2780
- const styles = useContext2(DataTableStylesContext);
2626
+ const styles = useContext(DataTableStylesContext);
2781
2627
  const className = cn(props.className, style(styles));
2782
2628
  return /* @__PURE__ */ jsx15(Part, {
2783
2629
  "data-table-slot": slot,
@@ -2818,8 +2664,8 @@ var DataTableReferenceCell = ({
2818
2664
  emptyLabel = "—",
2819
2665
  imageVariant = "circle"
2820
2666
  }) => {
2821
- const tableClasses = useContext2(DataTableSlotClassesContext);
2822
- const [failedImage, setFailedImage] = useState2();
2667
+ const tableClasses = useContext(DataTableSlotClassesContext);
2668
+ const [failedImage, setFailedImage] = useState();
2823
2669
  if (!item)
2824
2670
  return emptyLabel;
2825
2671
  const initials = tableInitials(item.label);
@@ -3107,10 +2953,10 @@ var reorderDataTableRows = (rows, sourceRowId, targetRowId) => {
3107
2953
  reordered.splice(targetIndex, 0, source);
3108
2954
  return reordered;
3109
2955
  };
3110
- var RowIdContext = createContext2(null);
3111
- var ColumnIdContext = createContext2(null);
2956
+ var RowIdContext = createContext(null);
2957
+ var ColumnIdContext = createContext(null);
3112
2958
  var useRequiredId = (context) => {
3113
- const id = useContext2(context);
2959
+ const id = useContext(context);
3114
2960
  if (!id)
3115
2961
  throw new Error("DataTable internal ID context is missing");
3116
2962
  return id;
@@ -3336,7 +3182,7 @@ var DataTableRowActions = ({
3336
3182
  row,
3337
3183
  title
3338
3184
  }) => {
3339
- const tableClasses = useContext2(DataTableSlotClassesContext);
3185
+ const tableClasses = useContext(DataTableSlotClassesContext);
3340
3186
  const visible = actions.filter((action) => !action.visible || action.visible(row));
3341
3187
  if (!visible.length)
3342
3188
  return null;
@@ -3423,9 +3269,9 @@ var DataTableRowActionMenu = ({
3423
3269
  var DataTableToolbar = ({
3424
3270
  table
3425
3271
  }) => {
3426
- const tableClasses = useContext2(DataTableSlotClassesContext);
3272
+ const tableClasses = useContext(DataTableSlotClassesContext);
3427
3273
  const [store, send] = table;
3428
- const exportPending = useRef2(false);
3274
+ const exportPending = useRef(false);
3429
3275
  const { exporting, exportFailed } = store.ui;
3430
3276
  const { features, labels } = store.config;
3431
3277
  const model = deriveModel(store);
@@ -3663,7 +3509,7 @@ var FilterEditor = ({
3663
3509
  }) => {
3664
3510
  const inputId = useId2();
3665
3511
  const kind = getDataTableFilterKind(column);
3666
- const [draft, setDraft] = useState2(() => tableFilterDraft(column.id, current));
3512
+ const [draft, setDraft] = useState(() => tableFilterDraft(column.id, current));
3667
3513
  const { primary, secondary, operator } = draft;
3668
3514
  const operatorOptions = [
3669
3515
  { value: "contains", label: labels.filterContains },
@@ -3671,8 +3517,8 @@ var FilterEditor = ({
3671
3517
  { value: "startsWith", label: labels.filterStartsWith },
3672
3518
  { value: "endsWith", label: labels.filterEndsWith }
3673
3519
  ];
3674
- const [invalid, setInvalid] = useState2(false);
3675
- const [optionSearch, setOptionSearch] = useState2("");
3520
+ const [invalid, setInvalid] = useState(false);
3521
+ const [optionSearch, setOptionSearch] = useState("");
3676
3522
  const apply = (candidate) => {
3677
3523
  const decoded = parseTableFilterDraft(kind, candidate);
3678
3524
  if (Option4.isNone(decoded)) {
@@ -4147,7 +3993,7 @@ var ColumnMenu = ({
4147
3993
  var ResizeHandle = ({
4148
3994
  table
4149
3995
  }) => {
4150
- const tableClasses = useContext2(DataTableSlotClassesContext);
3996
+ const tableClasses = useContext(DataTableSlotClassesContext);
4151
3997
  const [store, send] = table;
4152
3998
  const columnId = useRequiredId(ColumnIdContext);
4153
3999
  const column = deriveModel(store).columns.find(({ id }) => id === columnId);
@@ -4198,8 +4044,8 @@ var DragHandle = ({
4198
4044
  }) => {
4199
4045
  const [store] = table;
4200
4046
  const rowId = useRequiredId(RowIdContext);
4201
- const dragRef = useRef2(null);
4202
- const [overlay, setOverlay] = useState2(null);
4047
+ const dragRef = useRef(null);
4048
+ const [overlay, setOverlay] = useState(null);
4203
4049
  const reset = (element) => {
4204
4050
  clearDragPresentation(element.closest("[data-table-root]"));
4205
4051
  dragRef.current = null;
@@ -4329,7 +4175,7 @@ var TableDataRow = ({
4329
4175
  virtualIndex,
4330
4176
  measureRef
4331
4177
  }) => {
4332
- const tableClasses = useContext2(DataTableSlotClassesContext);
4178
+ const tableClasses = useContext(DataTableSlotClassesContext);
4333
4179
  const [store, send] = table;
4334
4180
  const model = deriveModel(store);
4335
4181
  const selection = store.config.features.selection;
@@ -4441,7 +4287,7 @@ var GroupHeaderRow = ({
4441
4287
  virtualIndex,
4442
4288
  measureRef
4443
4289
  }) => {
4444
- const tableClasses = useContext2(DataTableSlotClassesContext);
4290
+ const tableClasses = useContext(DataTableSlotClassesContext);
4445
4291
  const [store, send] = table;
4446
4292
  const collapsed = !!store.state.collapsedGroups[section.key];
4447
4293
  return /* @__PURE__ */ jsx15(TableRow2, {
@@ -4532,7 +4378,7 @@ var GroupedTable = ({
4532
4378
  var ColumnHeaderMenu = ({
4533
4379
  table
4534
4380
  }) => {
4535
- const tableClasses = useContext2(DataTableSlotClassesContext);
4381
+ const tableClasses = useContext(DataTableSlotClassesContext);
4536
4382
  const [store, send] = table;
4537
4383
  const columnId = useRequiredId(ColumnIdContext);
4538
4384
  const model = deriveModel(store);
@@ -4693,7 +4539,7 @@ var DataTableHeader = ({
4693
4539
  table,
4694
4540
  sticky
4695
4541
  }) => {
4696
- const tableClasses = useContext2(DataTableSlotClassesContext);
4542
+ const tableClasses = useContext(DataTableSlotClassesContext);
4697
4543
  const [store, send] = table;
4698
4544
  const model = deriveModel(store);
4699
4545
  const selection = store.config.features.selection;
@@ -4792,7 +4638,7 @@ var VirtualTableRows = ({
4792
4638
  result.push({ key: `row:${row.id}`, kind: "data", row });
4793
4639
  return result;
4794
4640
  }, [rows, sections, state.collapsedGroups]);
4795
- useLayoutEffect2(() => {
4641
+ useLayoutEffect(() => {
4796
4642
  if (!pageScroll && scrollElement)
4797
4643
  scrollElement.scrollTop = 0;
4798
4644
  }, [
@@ -4807,7 +4653,7 @@ var VirtualTableRows = ({
4807
4653
  ]);
4808
4654
  const options = {
4809
4655
  count: entries.length,
4810
- getItemKey: useCallback2((index) => entries[index].key, [entries]),
4656
+ getItemKey: useCallback((index) => entries[index].key, [entries]),
4811
4657
  estimateSize: () => viewport.options.estimateRowHeight ?? 64,
4812
4658
  overscan: viewport.options.overscan ?? 5,
4813
4659
  scrollMargin
@@ -4875,7 +4721,7 @@ var DataTableBody = ({
4875
4721
  table,
4876
4722
  viewport
4877
4723
  }) => {
4878
- const styles = useContext2(DataTableStylesContext);
4724
+ const styles = useContext(DataTableStylesContext);
4879
4725
  const [store] = table;
4880
4726
  const model = deriveModel(store);
4881
4727
  const fields = getActiveGrouping(store);
@@ -5041,7 +4887,7 @@ var GalleryCard = ({
5041
4887
  var DataTableGallery = ({
5042
4888
  table
5043
4889
  }) => {
5044
- const styles = useContext2(DataTableStylesContext);
4890
+ const styles = useContext(DataTableStylesContext);
5045
4891
  const [store, send] = table;
5046
4892
  const model = deriveModel(store);
5047
4893
  const fields = getActiveGrouping(store);
@@ -5145,13 +4991,13 @@ var DataTableGallery = ({
5145
4991
  var DataTablePagination = ({
5146
4992
  table
5147
4993
  }) => {
5148
- const styles = useContext2(DataTableStylesContext);
4994
+ const styles = useContext(DataTableStylesContext);
5149
4995
  const [store, send] = table;
5150
4996
  const model = deriveModel(store);
5151
4997
  const pagination = store.config.features.pagination ?? false;
5152
4998
  const { paginationVisible, page } = model;
5153
4999
  const pageIndex = store.state.page;
5154
- useLayoutEffect2(() => {
5000
+ useLayoutEffect(() => {
5155
5001
  if (paginationVisible && pagination && pagination.mode === "client" && pageIndex > page) {
5156
5002
  send(DataTableMessage.PageRequested({ page }));
5157
5003
  }
@@ -5179,7 +5025,7 @@ var DataTablePagination = ({
5179
5025
  };
5180
5026
  var ReactTableModel = Component3.define(dataTableOptions).make({
5181
5027
  ...dataTableBehaviours,
5182
- view: () => View2.text("")
5028
+ view: () => View.text("")
5183
5029
  });
5184
5030
  var modelField = (id, definition) => {
5185
5031
  const field = {
@@ -5276,8 +5122,8 @@ var HydratedDataTable = (props) => {
5276
5122
  }
5277
5123
  }
5278
5124
  });
5279
- const [storageKey] = useState2(() => tablePreferencesKey(globalThis.window?.location.pathname ?? "/", columns.map(({ id }) => id), !!props.features?.gallery));
5280
- useEffect2(() => {
5125
+ const [storageKey] = useState(() => tablePreferencesKey(globalThis.window?.location.pathname ?? "/", columns.map(({ id }) => id), !!props.features?.gallery));
5126
+ useEffect(() => {
5281
5127
  if (!model.preferencesLoaded) {
5282
5128
  send(DataTableMessage.PreferencesLoaded({
5283
5129
  preferences: readTablePreferences(storageKey)
@@ -5285,8 +5131,8 @@ var HydratedDataTable = (props) => {
5285
5131
  }
5286
5132
  }, [model, send, storageKey]);
5287
5133
  const { columnVisibility, columnSizing, grouping, view, preferencesLoaded } = model;
5288
- const loadedPreferences = useRef2(false);
5289
- useEffect2(() => {
5134
+ const loadedPreferences = useRef(false);
5135
+ useEffect(() => {
5290
5136
  const preferences = tablePreferences({
5291
5137
  columnVisibility,
5292
5138
  columnSizing,
@@ -5372,7 +5218,7 @@ var TablePlaceholder = ({
5372
5218
  });
5373
5219
  var DataTable = (props) => {
5374
5220
  const locale = useKrakstackLocale3(props.locale);
5375
- const hydrated = useSyncExternalStore2(subscribeToHydration, clientSnapshot, serverSnapshot);
5221
+ const hydrated = useSyncExternalStore(subscribeToHydration, clientSnapshot, serverSnapshot);
5376
5222
  if (!hydrated)
5377
5223
  return /* @__PURE__ */ jsx15(TablePlaceholder, {
5378
5224
  props
@@ -5392,11 +5238,11 @@ var DataTableContent = ({
5392
5238
  table
5393
5239
  }) => {
5394
5240
  const [store] = table;
5395
- const [scrollElement, setScrollElement] = useState2(null);
5396
- const [headerHeight, setHeaderHeight] = useState2(48);
5397
- const [pageTable, setPageTable] = useState2(null);
5398
- const [pageOffset, setPageOffset] = useState2();
5399
- useLayoutEffect2(() => {
5241
+ const [scrollElement, setScrollElement] = useState(null);
5242
+ const [headerHeight, setHeaderHeight] = useState(48);
5243
+ const [pageTable, setPageTable] = useState(null);
5244
+ const [pageOffset, setPageOffset] = useState();
5245
+ useLayoutEffect(() => {
5400
5246
  const header = pageTable?.querySelector("thead");
5401
5247
  if (!pageTable || !header)
5402
5248
  return;
@@ -5411,7 +5257,7 @@ var DataTableContent = ({
5411
5257
  observer?.disconnect();
5412
5258
  };
5413
5259
  }, [pageTable]);
5414
- useLayoutEffect2(() => {
5260
+ useLayoutEffect(() => {
5415
5261
  const header = scrollElement?.querySelector("thead");
5416
5262
  if (!header)
5417
5263
  return;
@@ -5534,7 +5380,7 @@ var DataTableContent = ({
5534
5380
  });
5535
5381
  };
5536
5382
  var DataTableListCell = (props) => {
5537
- const tableClasses = useContext2(DataTableSlotClassesContext);
5383
+ const tableClasses = useContext(DataTableSlotClassesContext);
5538
5384
  const locale = useKrakstackLocale3(props.locale);
5539
5385
  const resolvedProps = { ...props, locale };
5540
5386
  if (resolvedProps.options && (resolvedProps.onAdd || resolvedProps.onRemove)) {
@@ -5596,9 +5442,9 @@ var EditableDataTableListCell = ({
5596
5442
  locale = "en",
5597
5443
  messages
5598
5444
  }) => {
5599
- const tableClasses = useContext2(DataTableSlotClassesContext);
5600
- const [selected, setSelected] = useState2([...items]);
5601
- const [previousItems, setPreviousItems] = useState2(items);
5445
+ const tableClasses = useContext(DataTableSlotClassesContext);
5446
+ const [selected, setSelected] = useState([...items]);
5447
+ const [previousItems, setPreviousItems] = useState(items);
5602
5448
  if (previousItems !== items) {
5603
5449
  setPreviousItems(items);
5604
5450
  setSelected([...items]);
@@ -5786,8 +5632,8 @@ var DataTableListAddMenu = ({
5786
5632
  options,
5787
5633
  searchLabel
5788
5634
  }) => {
5789
- const [search, setSearch] = useState2("");
5790
- const focusSearch = useCallback2((input) => {
5635
+ const [search, setSearch] = useState("");
5636
+ const focusSearch = useCallback((input) => {
5791
5637
  input?.focus({ preventScroll: true });
5792
5638
  }, []);
5793
5639
  const labels = dataTableMessages(locale, messages);