@ai-matrx/records-ui 0.115.101 → 0.115.103

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.d.cts CHANGED
@@ -1,13 +1,13 @@
1
1
  import * as react from 'react';
2
2
  import { ReactNode, KeyboardEvent, ReactElement, ComponentType, RefObject, SVGAttributes } from 'react';
3
3
  import * as _ai_matrx_records from '@ai-matrx/records';
4
- import { Uuid, RowAction, Field, RowActionStep, RecordScopeContext, EnrichCell, RecordsError, RecordDocument, Table, ReadRow, PermissionLevel, RecordRead, RowAgentTarget, AggregateFilter, RelationDisplay, WriteConflict, TableDecorations, StoreFilter as StoreFilter$1, ImportRun, DeclarableFieldKind, NewerFieldKind, ParityFieldType, NewFieldDeclaration, RuleExpression, ChoiceRehome, FieldOptionEdit, StoredRecord, ChoiceNudge, HiddenFieldNotice, ValueEnvelope, ChecklistRequirementKind, ContextPolicy, WorkDueState, FieldSensitivity, StageRuleOnFail, SubscriptionCadence, WorkApprovalState, WorkInboxKind, FieldKind, ArchiveLane, ArchivedRow, WorkInboxView, WorkInboxItem, MigrationEntry, PortalCard, PortalPrincipal, PortalPreviewRow, PortalAccent, PublicPicture, PortalStyle, RecordFilter, MySubscription, DashboardBlockKind, AggregateBucket, AggregateMeasure, AggregateCompare, DashboardTarget, DashboardBlock, DashboardSummary, AggregateGroupValue, DocTemplateRow, DocRenderRow, QuietHours, DashboardBlockResult, DashboardRunResult, ChecklistRunStep, BookingSummary, CaptureSheetFace, CaptureField, AnonTokenBinding, RecordsActor, RecordsDataSource, RecordsConfig, TableDuplicated, HistoryActor, FieldHistoryEntry, DrillDefinition, DrillSource, DrillLane, DrillQuestion, TableDuplicateProgress, TableArchiveProgress } from '@ai-matrx/records';
4
+ import { Uuid, RowAction, Field, RowActionStep, RecordScopeContext, EnrichCell, RecordsError, RecordDocument, Table, ReadRow, PermissionLevel, RecordRead, RowAgentTarget, AggregateFilter, RelationDisplay, WriteConflict, StoreFilter as StoreFilter$1, ImportRun, NewFieldDeclaration, RuleExpression, ChoiceRehome, FieldOptionEdit, StoredRecord, ChoiceNudge, HiddenFieldNotice, ValueEnvelope, ChecklistRequirementKind, ContextPolicy, WorkDueState, FieldSensitivity, StageRuleOnFail, SubscriptionCadence, WorkApprovalState, WorkInboxKind, ArchiveLane, ArchivedRow, WorkInboxView, WorkInboxItem, MigrationEntry, PortalCard, PortalPrincipal, PortalPreviewRow, PortalAccent, PublicPicture, PortalStyle, RecordFilter, MySubscription, DashboardBlockKind, AggregateBucket, AggregateMeasure, AggregateCompare, DashboardTarget, DashboardBlock, DashboardSummary, AggregateGroupValue, DocTemplateRow, DocRenderRow, QuietHours, DashboardBlockResult, DashboardRunResult, ChecklistRunStep, BookingSummary, CaptureSheetFace, CaptureField, AnonTokenBinding, RecordsActor, RecordsDataSource, RecordsConfig, TableDuplicated, HistoryActor, FieldHistoryEntry, DrillDefinition, DrillSource, DrillLane, DrillQuestion, TableDuplicateProgress, TableArchiveProgress } from '@ai-matrx/records';
5
5
  import { ReversibleAnnouncement } from '@ai-matrx/kit/reversible';
6
- import { O as ObjectAction, W as WhatYouMayDo, T as TableActionHost, a as ObjectActionIcon } from './objectActions-Ds2NA5Jn.cjs';
7
- export { A as ACTION_CHECKING_ACCESS_REASON, b as ACTION_NOT_HERE_REASON, c as ACTION_NO_ACCESS_REASON, d as ACTION_PLATFORM_TABLE_REASON, B as BuiltOnDestination, C as Capability, D as DEFAULT_ACTION_ORIGIN, K as KERNEL_REASON, L as LEVEL_WORD, N as NOT_ANSWERED_YET, e as OBJECT_ACTION_GROUPS, f as ObjectActionDropdownEntry, g as ObjectActionGroup, h as ObjectActionGroupDef, i as ObjectActionSection, S as STANDARD_VERBS, j as STRIP_FEATURE_ROWS, k as StandardVerbId, l as StripAndRows, m as TableActionSubject, n as TableActionsInput, o as dropdownActionIds, p as dropdownActions, q as groupObjectActions, r as levelNeededFor, s as rightsReason, t as tableActions, u as tableLink, v as toDropdownEntries, w as toStripAndRows, x as whatYouMayDo, y as whatYouMayDoWithTable, z as withExtensions } from './objectActions-Ds2NA5Jn.cjs';
6
+ import { O as ObjectAction, W as WhatYouMayDo, T as TableActionHost, a as ObjectActionIcon } from './objectActions-CfzhrXHK.cjs';
7
+ export { A as ACTION_CHECKING_ACCESS_REASON, b as ACTION_NOT_HERE_REASON, c as ACTION_NO_ACCESS_REASON, d as ACTION_PLATFORM_TABLE_REASON, B as BuiltOnDestination, C as Capability, D as DEFAULT_ACTION_ORIGIN, K as KERNEL_REASON, L as LEVEL_WORD, N as NOT_ANSWERED_YET, e as OBJECT_ACTION_GROUPS, f as ObjectActionDropdownEntry, g as ObjectActionGroup, h as ObjectActionGroupDef, i as ObjectActionSection, S as STANDARD_VERBS, j as STRIP_FEATURE_ROWS, k as StandardVerbId, l as StripAndRows, m as TableActionSubject, n as TableActionsInput, o as dropdownActionIds, p as dropdownActions, q as groupObjectActions, r as levelNeededFor, s as rightsReason, t as tableActions, u as tableLink, v as toDropdownEntries, w as toStripAndRows, x as whatYouMayDo, y as whatYouMayDoWithTable, z as withExtensions } from './objectActions-CfzhrXHK.cjs';
8
8
  import { Uuid as Uuid$1, Table as Table$1, Field as Field$1, ReadRow as ReadRow$1, StoreFilter, useRecordsClient } from '@ai-matrx/records/react';
9
9
  import * as _ai_matrx_records_core from '@ai-matrx/records/core';
10
- import { RecordsClient, ParsedImport, NewFieldSpec } from '@ai-matrx/records/core';
10
+ import { RecordsClient, Field as Field$2, TableDecorations, ParsedImport, DeclarableFieldKind, NewerFieldKind, ParityFieldType, FieldKind, NewFieldSpec } from '@ai-matrx/records/core';
11
11
  export { DEFAULT_FIELDS, DeclareResult, NewFieldSpec, NewTableSpec, addFields, declareTable, fieldDeclarationFor, tokenFor } from '@ai-matrx/records/core';
12
12
  import { FieldFormatConfig } from '@ai-matrx/design-system/field-formats';
13
13
  import { RecordVersions } from '@ai-matrx/records/versions';
@@ -1894,7 +1894,7 @@ declare function parseGridPresentation(raw: unknown): GridPresentation;
1894
1894
  declare function presentationIsEmpty(p: GridPresentation): boolean;
1895
1895
  /** The string a view record stores. Empty string for "this view styles nothing". */
1896
1896
  declare function presentationDocument(p: GridPresentation): string;
1897
- declare function formatForField(field: Field): FieldFormatConfig | undefined;
1897
+ declare function formatForField(field: Field$2): FieldFormatConfig | undefined;
1898
1898
  declare function currencyCodeFor(unit: string | null | undefined): string;
1899
1899
  /**
1900
1900
  * The color a value paints with when a view colors BY a column.
@@ -1921,7 +1921,7 @@ declare const colorFromTheValue: ChoiceColorLookup;
1921
1921
  * longer resolves to a key) is dropped rather than crashing the whole style — a defect in
1922
1922
  * one rule costs that rule, never the read.
1923
1923
  */
1924
- declare function styleFromDecorations(decorations: TableDecorations | null | undefined, fields: readonly Field[]): TableStyle;
1924
+ declare function styleFromDecorations(decorations: TableDecorations | null | undefined, fields: readonly Field$2[]): TableStyle;
1925
1925
  /**
1926
1926
  * THE ONE PRESENTATION RESOLVER every colored surface in this package reads —
1927
1927
  * `Grid`, and (via `Card`) the kanban board, the calendar and the gallery.
@@ -1943,7 +1943,7 @@ declare function styleFromDecorations(decorations: TableDecorations | null | und
1943
1943
  * table rule it meant to replace. Per-piece, never all-or-nothing, because a view is a
1944
1944
  * LOOK on top of the table, not a wholesale substitute for it.
1945
1945
  */
1946
- declare function resolveTableStyle(decorations: TableDecorations | null | undefined, fields: readonly Field[], viewStyle: TableStyle | undefined): TableStyle;
1946
+ declare function resolveTableStyle(decorations: TableDecorations | null | undefined, fields: readonly Field$2[], viewStyle: TableStyle | undefined): TableStyle;
1947
1947
 
1948
1948
  /** THE DECLARATIVE SPEC, with this package's grid look. */
1949
1949
  type SavedViewSpec = base.SavedViewSpec<GridPresentation>;
@@ -3606,7 +3606,7 @@ type EditorKind = FieldKind;
3606
3606
  * It is `fieldKindFor` with this package's kernel ids bound. Nothing here
3607
3607
  * decides anything the core does not.
3608
3608
  */
3609
- declare function editorKindFor(field: Field): EditorKind;
3609
+ declare function editorKindFor(field: Field$2): EditorKind;
3610
3610
  /**
3611
3611
  * WHICH KIND A PERSON PICKED, read back off the Field the store keeps — the ONE reader every
3612
3612
  * "what does this column hold" answer goes through (the Settings column list, the column panel).
@@ -3620,13 +3620,13 @@ declare function editorKindFor(field: Field): EditorKind;
3620
3620
  *
3621
3621
  * `undefined` when the Field is none of the kinds the menu offers.
3622
3622
  */
3623
- declare function pickableTypeOf(field: Field): PickableFieldType | undefined;
3623
+ declare function pickableTypeOf(field: Field$2): PickableFieldType | undefined;
3624
3624
  /**
3625
3625
  * The type word a person sees in a header or a settings row — and it is the
3626
3626
  * SAME word the field panel offers, read from `FIELD_TYPE_CHOICES`, so a column
3627
3627
  * added as "Money" is never described anywhere else as "Currency".
3628
3628
  */
3629
- declare function fieldTypeLabel(field: Field): string;
3629
+ declare function fieldTypeLabel(field: Field$2): string;
3630
3630
 
3631
3631
  /** The one token form, written the way the store's own pattern reads it. */
3632
3632
  declare function fieldToken(fieldId: Uuid): string;
package/dist/index.d.ts CHANGED
@@ -1,13 +1,13 @@
1
1
  import * as react from 'react';
2
2
  import { ReactNode, KeyboardEvent, ReactElement, ComponentType, RefObject, SVGAttributes } from 'react';
3
3
  import * as _ai_matrx_records from '@ai-matrx/records';
4
- import { Uuid, RowAction, Field, RowActionStep, RecordScopeContext, EnrichCell, RecordsError, RecordDocument, Table, ReadRow, PermissionLevel, RecordRead, RowAgentTarget, AggregateFilter, RelationDisplay, WriteConflict, TableDecorations, StoreFilter as StoreFilter$1, ImportRun, DeclarableFieldKind, NewerFieldKind, ParityFieldType, NewFieldDeclaration, RuleExpression, ChoiceRehome, FieldOptionEdit, StoredRecord, ChoiceNudge, HiddenFieldNotice, ValueEnvelope, ChecklistRequirementKind, ContextPolicy, WorkDueState, FieldSensitivity, StageRuleOnFail, SubscriptionCadence, WorkApprovalState, WorkInboxKind, FieldKind, ArchiveLane, ArchivedRow, WorkInboxView, WorkInboxItem, MigrationEntry, PortalCard, PortalPrincipal, PortalPreviewRow, PortalAccent, PublicPicture, PortalStyle, RecordFilter, MySubscription, DashboardBlockKind, AggregateBucket, AggregateMeasure, AggregateCompare, DashboardTarget, DashboardBlock, DashboardSummary, AggregateGroupValue, DocTemplateRow, DocRenderRow, QuietHours, DashboardBlockResult, DashboardRunResult, ChecklistRunStep, BookingSummary, CaptureSheetFace, CaptureField, AnonTokenBinding, RecordsActor, RecordsDataSource, RecordsConfig, TableDuplicated, HistoryActor, FieldHistoryEntry, DrillDefinition, DrillSource, DrillLane, DrillQuestion, TableDuplicateProgress, TableArchiveProgress } from '@ai-matrx/records';
4
+ import { Uuid, RowAction, Field, RowActionStep, RecordScopeContext, EnrichCell, RecordsError, RecordDocument, Table, ReadRow, PermissionLevel, RecordRead, RowAgentTarget, AggregateFilter, RelationDisplay, WriteConflict, StoreFilter as StoreFilter$1, ImportRun, NewFieldDeclaration, RuleExpression, ChoiceRehome, FieldOptionEdit, StoredRecord, ChoiceNudge, HiddenFieldNotice, ValueEnvelope, ChecklistRequirementKind, ContextPolicy, WorkDueState, FieldSensitivity, StageRuleOnFail, SubscriptionCadence, WorkApprovalState, WorkInboxKind, ArchiveLane, ArchivedRow, WorkInboxView, WorkInboxItem, MigrationEntry, PortalCard, PortalPrincipal, PortalPreviewRow, PortalAccent, PublicPicture, PortalStyle, RecordFilter, MySubscription, DashboardBlockKind, AggregateBucket, AggregateMeasure, AggregateCompare, DashboardTarget, DashboardBlock, DashboardSummary, AggregateGroupValue, DocTemplateRow, DocRenderRow, QuietHours, DashboardBlockResult, DashboardRunResult, ChecklistRunStep, BookingSummary, CaptureSheetFace, CaptureField, AnonTokenBinding, RecordsActor, RecordsDataSource, RecordsConfig, TableDuplicated, HistoryActor, FieldHistoryEntry, DrillDefinition, DrillSource, DrillLane, DrillQuestion, TableDuplicateProgress, TableArchiveProgress } from '@ai-matrx/records';
5
5
  import { ReversibleAnnouncement } from '@ai-matrx/kit/reversible';
6
- import { O as ObjectAction, W as WhatYouMayDo, T as TableActionHost, a as ObjectActionIcon } from './objectActions-Ds2NA5Jn.js';
7
- export { A as ACTION_CHECKING_ACCESS_REASON, b as ACTION_NOT_HERE_REASON, c as ACTION_NO_ACCESS_REASON, d as ACTION_PLATFORM_TABLE_REASON, B as BuiltOnDestination, C as Capability, D as DEFAULT_ACTION_ORIGIN, K as KERNEL_REASON, L as LEVEL_WORD, N as NOT_ANSWERED_YET, e as OBJECT_ACTION_GROUPS, f as ObjectActionDropdownEntry, g as ObjectActionGroup, h as ObjectActionGroupDef, i as ObjectActionSection, S as STANDARD_VERBS, j as STRIP_FEATURE_ROWS, k as StandardVerbId, l as StripAndRows, m as TableActionSubject, n as TableActionsInput, o as dropdownActionIds, p as dropdownActions, q as groupObjectActions, r as levelNeededFor, s as rightsReason, t as tableActions, u as tableLink, v as toDropdownEntries, w as toStripAndRows, x as whatYouMayDo, y as whatYouMayDoWithTable, z as withExtensions } from './objectActions-Ds2NA5Jn.js';
6
+ import { O as ObjectAction, W as WhatYouMayDo, T as TableActionHost, a as ObjectActionIcon } from './objectActions-CfzhrXHK.js';
7
+ export { A as ACTION_CHECKING_ACCESS_REASON, b as ACTION_NOT_HERE_REASON, c as ACTION_NO_ACCESS_REASON, d as ACTION_PLATFORM_TABLE_REASON, B as BuiltOnDestination, C as Capability, D as DEFAULT_ACTION_ORIGIN, K as KERNEL_REASON, L as LEVEL_WORD, N as NOT_ANSWERED_YET, e as OBJECT_ACTION_GROUPS, f as ObjectActionDropdownEntry, g as ObjectActionGroup, h as ObjectActionGroupDef, i as ObjectActionSection, S as STANDARD_VERBS, j as STRIP_FEATURE_ROWS, k as StandardVerbId, l as StripAndRows, m as TableActionSubject, n as TableActionsInput, o as dropdownActionIds, p as dropdownActions, q as groupObjectActions, r as levelNeededFor, s as rightsReason, t as tableActions, u as tableLink, v as toDropdownEntries, w as toStripAndRows, x as whatYouMayDo, y as whatYouMayDoWithTable, z as withExtensions } from './objectActions-CfzhrXHK.js';
8
8
  import { Uuid as Uuid$1, Table as Table$1, Field as Field$1, ReadRow as ReadRow$1, StoreFilter, useRecordsClient } from '@ai-matrx/records/react';
9
9
  import * as _ai_matrx_records_core from '@ai-matrx/records/core';
10
- import { RecordsClient, ParsedImport, NewFieldSpec } from '@ai-matrx/records/core';
10
+ import { RecordsClient, Field as Field$2, TableDecorations, ParsedImport, DeclarableFieldKind, NewerFieldKind, ParityFieldType, FieldKind, NewFieldSpec } from '@ai-matrx/records/core';
11
11
  export { DEFAULT_FIELDS, DeclareResult, NewFieldSpec, NewTableSpec, addFields, declareTable, fieldDeclarationFor, tokenFor } from '@ai-matrx/records/core';
12
12
  import { FieldFormatConfig } from '@ai-matrx/design-system/field-formats';
13
13
  import { RecordVersions } from '@ai-matrx/records/versions';
@@ -1894,7 +1894,7 @@ declare function parseGridPresentation(raw: unknown): GridPresentation;
1894
1894
  declare function presentationIsEmpty(p: GridPresentation): boolean;
1895
1895
  /** The string a view record stores. Empty string for "this view styles nothing". */
1896
1896
  declare function presentationDocument(p: GridPresentation): string;
1897
- declare function formatForField(field: Field): FieldFormatConfig | undefined;
1897
+ declare function formatForField(field: Field$2): FieldFormatConfig | undefined;
1898
1898
  declare function currencyCodeFor(unit: string | null | undefined): string;
1899
1899
  /**
1900
1900
  * The color a value paints with when a view colors BY a column.
@@ -1921,7 +1921,7 @@ declare const colorFromTheValue: ChoiceColorLookup;
1921
1921
  * longer resolves to a key) is dropped rather than crashing the whole style — a defect in
1922
1922
  * one rule costs that rule, never the read.
1923
1923
  */
1924
- declare function styleFromDecorations(decorations: TableDecorations | null | undefined, fields: readonly Field[]): TableStyle;
1924
+ declare function styleFromDecorations(decorations: TableDecorations | null | undefined, fields: readonly Field$2[]): TableStyle;
1925
1925
  /**
1926
1926
  * THE ONE PRESENTATION RESOLVER every colored surface in this package reads —
1927
1927
  * `Grid`, and (via `Card`) the kanban board, the calendar and the gallery.
@@ -1943,7 +1943,7 @@ declare function styleFromDecorations(decorations: TableDecorations | null | und
1943
1943
  * table rule it meant to replace. Per-piece, never all-or-nothing, because a view is a
1944
1944
  * LOOK on top of the table, not a wholesale substitute for it.
1945
1945
  */
1946
- declare function resolveTableStyle(decorations: TableDecorations | null | undefined, fields: readonly Field[], viewStyle: TableStyle | undefined): TableStyle;
1946
+ declare function resolveTableStyle(decorations: TableDecorations | null | undefined, fields: readonly Field$2[], viewStyle: TableStyle | undefined): TableStyle;
1947
1947
 
1948
1948
  /** THE DECLARATIVE SPEC, with this package's grid look. */
1949
1949
  type SavedViewSpec = base.SavedViewSpec<GridPresentation>;
@@ -3606,7 +3606,7 @@ type EditorKind = FieldKind;
3606
3606
  * It is `fieldKindFor` with this package's kernel ids bound. Nothing here
3607
3607
  * decides anything the core does not.
3608
3608
  */
3609
- declare function editorKindFor(field: Field): EditorKind;
3609
+ declare function editorKindFor(field: Field$2): EditorKind;
3610
3610
  /**
3611
3611
  * WHICH KIND A PERSON PICKED, read back off the Field the store keeps — the ONE reader every
3612
3612
  * "what does this column hold" answer goes through (the Settings column list, the column panel).
@@ -3620,13 +3620,13 @@ declare function editorKindFor(field: Field): EditorKind;
3620
3620
  *
3621
3621
  * `undefined` when the Field is none of the kinds the menu offers.
3622
3622
  */
3623
- declare function pickableTypeOf(field: Field): PickableFieldType | undefined;
3623
+ declare function pickableTypeOf(field: Field$2): PickableFieldType | undefined;
3624
3624
  /**
3625
3625
  * The type word a person sees in a header or a settings row — and it is the
3626
3626
  * SAME word the field panel offers, read from `FIELD_TYPE_CHOICES`, so a column
3627
3627
  * added as "Money" is never described anywhere else as "Currency".
3628
3628
  */
3629
- declare function fieldTypeLabel(field: Field): string;
3629
+ declare function fieldTypeLabel(field: Field$2): string;
3630
3630
 
3631
3631
  /** The one token form, written the way the store's own pattern reads it. */
3632
3632
  declare function fieldToken(fieldId: Uuid): string;
package/dist/index.js CHANGED
@@ -26,7 +26,7 @@ var __copyProps = (to, from, except, desc) => {
26
26
  var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
27
27
 
28
28
  // src/rights.ts
29
- import { atLeast } from "@ai-matrx/records";
29
+ import { atLeast } from "@ai-matrx/records/core";
30
30
  function levelNeededFor(what) {
31
31
  return NEEDS[what];
32
32
  }
@@ -504,7 +504,7 @@ var init_plainWords = __esm({
504
504
  });
505
505
 
506
506
  // src/choiceLooks.ts
507
- import { newerKindOf } from "@ai-matrx/records";
507
+ import { newerKindOf } from "@ai-matrx/records/core";
508
508
  import { CHOICE_CHIP_CLASS, NEUTRAL_CHIP_CLASS, STYLE_COLORS } from "@ai-matrx/design-system/data-table/table-style";
509
509
  function displayFormatOf(field2) {
510
510
  const raw = field2.display_format;
@@ -618,7 +618,7 @@ var init_docs = __esm({
618
618
  });
619
619
 
620
620
  // src/fieldTypes.ts
621
- import { DECLARABLE_FIELD_KINDS, NEWER_FIELD_KINDS, PARITY_FIELD_TYPES } from "@ai-matrx/records";
621
+ import { DECLARABLE_FIELD_KINDS, NEWER_FIELD_KINDS, PARITY_FIELD_TYPES } from "@ai-matrx/records/core";
622
622
  function declaredAsLook(kind2) {
623
623
  return kind2 in LOOK_KINDS && !storePublishesKind(kind2);
624
624
  }
@@ -722,8 +722,8 @@ import {
722
722
  PARITY_FIELD_TYPES as PARITY_FIELD_TYPES2,
723
723
  fieldKindFor,
724
724
  newerKindOf as newerKindOf2
725
- } from "@ai-matrx/records";
726
- import { isButtonField } from "@ai-matrx/records";
725
+ } from "@ai-matrx/records/core";
726
+ import { isButtonField } from "@ai-matrx/records/core";
727
727
  import { humanizeIdentifier as humanizeIdentifier2 } from "@ai-matrx/kit/text-case";
728
728
  function editorKindFor(field2) {
729
729
  return fieldKindFor(field2, KERNEL);
@@ -10295,7 +10295,7 @@ init_parity();
10295
10295
  init_dates();
10296
10296
  import { COLOR_ROTATION, parseTableStyle, tableStyleIsEmpty } from "@ai-matrx/design-system/data-table/table-style";
10297
10297
  import { getFieldFormat } from "@ai-matrx/design-system/field-formats";
10298
- import { newerKindOf as newerKindOf3, ratingMaxOf } from "@ai-matrx/records";
10298
+ import { newerKindOf as newerKindOf3, ratingMaxOf } from "@ai-matrx/records/core";
10299
10299
  function parseGanttLook(raw) {
10300
10300
  if (!raw || typeof raw !== "object" || Array.isArray(raw)) return void 0;
10301
10301
  const v = raw;
@@ -30269,6 +30269,9 @@ function GridBody({
30269
30269
  }, [countedButNotReturned]);
30270
30270
  const askPerRow = Boolean(editable) && !host.rights && rights.known && !rights.write && rows.length > 0;
30271
30271
  const rowRights = useRowRights(rowIds, askPerRow);
30272
+ const rowRightsAnswered = useRef42(false);
30273
+ const rowRightsWaiting = askPerRow && !rowRightsAnswered.current && rowIds.length > 0 && rowRights(rowIds[0])?.known === false;
30274
+ if (askPerRow && !rowRightsWaiting) rowRightsAnswered.current = true;
30272
30275
  const mayWriteRow = useCallback32(
30273
30276
  (rowId) => askPerRow ? rowRights(rowId)?.write ?? false : rights.write,
30274
30277
  [askPerRow, rowRights, rights.write]
@@ -31825,7 +31828,7 @@ function GridBody({
31825
31828
  if (table.error) return /* @__PURE__ */ jsx99(RefusalNotice, { error: table.error, className });
31826
31829
  if (fields.error) return /* @__PURE__ */ jsx99(RefusalNotice, { error: fields.error, className });
31827
31830
  const nothingToShowYet = table.loading && !table.data || // No columns on a table whose level may hide them: not yet known which (one read, Confidential only).
31828
- !structure.settled && (fields.data ?? []).length === 0 || fields.loading && !fields.data || !rights.known || records.loading && rows.length === 0 || // The page read has neither answered nor refused: nothing has been said yet, so nothing is empty.
31831
+ !structure.settled && (fields.data ?? []).length === 0 || fields.loading && !fields.data || !rights.known || rowRightsWaiting || records.loading && rows.length === 0 || // The page read has neither answered nor refused: nothing has been said yet, so nothing is empty.
31829
31832
  !records.data && !records.error || countedButNotReturned || manual && hand.loading && rows.length === 0;
31830
31833
  const refreshing = !nothingToShowYet && (records.loading || manual && hand.loading);
31831
31834
  const structureLocked = !nothingToShowYet && (fields.data ?? []).length === 0 && structure.hidden;
@@ -53221,7 +53224,7 @@ function ReviewBlockView({ block, viewerUserId, extra }) {
53221
53224
  const name = block.title ?? table.data?.name ?? "Records";
53222
53225
  const neighbors = current ? neighborsOf(rows.map((r) => r.id), current.id) : null;
53223
53226
  if (read.error) return /* @__PURE__ */ jsx165(RefusalLine, { error: read.error });
53224
- if (read.waiting || read.loading && rows.length === 0) return /* @__PURE__ */ jsx165(Skeleton40, { className: "h-48 w-full" });
53227
+ if (read.waiting || read.loading && rows.length === 0) return /* @__PURE__ */ jsx165(Skeleton40, { className: "h-72 w-full" });
53225
53228
  if (rows.length === 0) return /* @__PURE__ */ jsx165(BlockNote, { children: read.mine ? "Nothing assigned to you here." : "No records match." });
53226
53229
  return /* @__PURE__ */ jsxs153("div", { className: "grid min-w-0 grid-cols-1 gap-2 md:grid-cols-[minmax(0,2fr)_minmax(0,3fr)]", "data-records-page-review": block.id, children: [
53227
53230
  /* @__PURE__ */ jsxs153("div", { className: "flex min-w-0 flex-col rounded-md border bg-card", children: [
@@ -55949,6 +55952,8 @@ import { Fragment as Fragment73, jsx as jsx176, jsxs as jsxs164 } from "react/js
55949
55952
  function RecordPanel({ tableId, recordId, onClose, onAskAboutField, onPage = false, neighbors, onStep, expanded, onToggleExpand }) {
55950
55953
  const host = useRecordsUi();
55951
55954
  const [asking, setAsking] = useState150(null);
55955
+ const record = useRecord5(recordId, true, { tableId });
55956
+ const answered = Boolean(record.data) && !record.error;
55952
55957
  return /* @__PURE__ */ jsxs164(
55953
55958
  "div",
55954
55959
  {
@@ -55975,28 +55980,30 @@ function RecordPanel({ tableId, recordId, onClose, onAskAboutField, onPage = fal
55975
55980
  children: [
55976
55981
  neighbors && onStep ? /* @__PURE__ */ jsx176(RecordStepper, { neighbors, onStep: (to) => onStep(to), expanded, onToggleExpand }) : null,
55977
55982
  /* @__PURE__ */ jsx176(Peek, { tableId, recordId, onPage, ...onClose ? { onClose } : {} }),
55978
- onPage ? /* @__PURE__ */ jsxs164(Fragment73, { children: [
55979
- /* @__PURE__ */ jsx176(RecordBody, { tableId, recordId }),
55980
- /* @__PURE__ */ jsx176(LinkedLists, { tableId, recordId }),
55981
- /* @__PURE__ */ jsx176(ReverseLinksSections, { tableId, recordId })
55982
- ] }) : null,
55983
- host.recordSections ? /* @__PURE__ */ jsxs164(Fragment72, { children: [
55983
+ answered ? /* @__PURE__ */ jsxs164(Fragment73, { children: [
55984
+ onPage ? /* @__PURE__ */ jsxs164(Fragment73, { children: [
55985
+ /* @__PURE__ */ jsx176(RecordBody, { tableId, recordId }),
55986
+ /* @__PURE__ */ jsx176(LinkedLists, { tableId, recordId }),
55987
+ /* @__PURE__ */ jsx176(ReverseLinksSections, { tableId, recordId })
55988
+ ] }) : null,
55989
+ host.recordSections ? /* @__PURE__ */ jsxs164(Fragment72, { children: [
55990
+ /* @__PURE__ */ jsx176(Separator13, {}),
55991
+ host.recordSections({ tableId, recordId })
55992
+ ] }) : null,
55993
+ /* @__PURE__ */ jsx176(ChecklistRunner, { tableId, recordId, quietWhenEmpty: true, className: "border-t pt-3" }),
55984
55994
  /* @__PURE__ */ jsx176(Separator13, {}),
55985
- host.recordSections({ tableId, recordId })
55986
- ] }) : null,
55987
- /* @__PURE__ */ jsx176(ChecklistRunner, { tableId, recordId, quietWhenEmpty: true, className: "border-t pt-3" }),
55988
- /* @__PURE__ */ jsx176(Separator13, {}),
55989
- /* @__PURE__ */ jsx176(CommentThread, { tableId, recordId }),
55990
- /* @__PURE__ */ jsx176(Separator13, {}),
55991
- /* @__PURE__ */ jsx176(
55992
- HistoryPanel,
55993
- {
55994
- tableId,
55995
- recordId,
55996
- onAskAboutField: (fieldKey) => onAskAboutField ? onAskAboutField(fieldKey) : setAsking(fieldKey)
55997
- }
55998
- ),
55999
- !onAskAboutField && asking ? /* @__PURE__ */ jsx176(FieldHistoryPanel, { tableId, fieldKey: asking, recordId, onClose: () => setAsking(null) }) : null
55995
+ /* @__PURE__ */ jsx176(CommentThread, { tableId, recordId }),
55996
+ /* @__PURE__ */ jsx176(Separator13, {}),
55997
+ /* @__PURE__ */ jsx176(
55998
+ HistoryPanel,
55999
+ {
56000
+ tableId,
56001
+ recordId,
56002
+ onAskAboutField: (fieldKey) => onAskAboutField ? onAskAboutField(fieldKey) : setAsking(fieldKey)
56003
+ }
56004
+ ),
56005
+ !onAskAboutField && asking ? /* @__PURE__ */ jsx176(FieldHistoryPanel, { tableId, fieldKey: asking, recordId, onClose: () => setAsking(null) }) : null
56006
+ ] }) : null
56000
56007
  ]
56001
56008
  }
56002
56009
  );
@@ -56520,6 +56527,7 @@ init_host();
56520
56527
 
56521
56528
  // src/toolbarFit.ts
56522
56529
  import { useEffect as useEffect130, useLayoutEffect as useLayoutEffect6, useState as useState155 } from "react";
56530
+ import { flushSync } from "react-dom";
56523
56531
  function widthAtFold(piece, fold) {
56524
56532
  for (let f = Math.min(fold, (piece.byFold?.length ?? 0) - 1); f >= 0; f -= 1) {
56525
56533
  const w = piece.byFold?.[f];
@@ -56619,7 +56627,7 @@ function useToolbarFit(row) {
56619
56627
  let current = 0;
56620
56628
  let pending = 0;
56621
56629
  let stopped = false;
56622
- const measure = () => {
56630
+ const measure = (sync = false) => {
56623
56631
  pending = 0;
56624
56632
  if (stopped) return;
56625
56633
  const available = row.clientWidth;
@@ -56639,12 +56647,13 @@ function useToolbarFit(row) {
56639
56647
  const next = toolbarFold({ available, needsNow: needs, gap, folded: current, look, chooser, tools, share });
56640
56648
  if (next !== current) {
56641
56649
  current = next;
56642
- setFold(next);
56650
+ if (sync) flushSync(() => setFold(next));
56651
+ else setFold(next);
56643
56652
  }
56644
56653
  };
56645
56654
  const schedule = () => {
56646
56655
  if (pending) return;
56647
- pending = typeof requestAnimationFrame === "function" ? requestAnimationFrame(measure) : setTimeout(measure, 0);
56656
+ pending = typeof requestAnimationFrame === "function" ? requestAnimationFrame(() => measure()) : setTimeout(() => measure(), 0);
56648
56657
  };
56649
56658
  const sizes = typeof ResizeObserver === "function" ? new ResizeObserver(schedule) : null;
56650
56659
  const watchSizes = () => {
@@ -56658,6 +56667,7 @@ function useToolbarFit(row) {
56658
56667
  };
56659
56668
  const content = new MutationObserver(() => {
56660
56669
  watchSizes();
56670
+ measure(true);
56661
56671
  schedule();
56662
56672
  });
56663
56673
  content.observe(row, { childList: true, subtree: true, characterData: true, attributes: true, attributeFilter: ["class", "style"] });