@ai-matrx/design-system 0.86.328 → 0.86.330

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.
@@ -229,57 +229,13 @@ declare function splitAddOnProps<T extends Record<string, unknown>>(props: T, ex
229
229
  dom: T;
230
230
  addOnProps: Record<string, unknown>;
231
231
  };
232
- /**
233
- * What a field may know BEFORE the add-ons load: pure, dependency-free answers the field needs to
234
- * draw itself the same way it will once they load (no "…" appearing after the first click).
235
- */
236
- interface WritingFieldLight {
237
- menuHasItems?: WritingFieldAddOns["menuHasItems"];
238
- /**
239
- * Whether a right-click on this field will open the add-ons' menu. Answered true, the first
240
- * right-click before load is held and replayed once the add-ons arrive; otherwise the browser's
241
- * own menu shows as usual.
242
- */
243
- holdsContextMenu?: ((field: Pick<WritingFieldApi, "kind" | "addOnProps">) => boolean) | undefined;
244
- /** Light enough to draw before engagement (a pinned stats bar is visible on first paint). */
245
- TextStats?: WritingFieldTextStats | undefined;
246
- propNames?: readonly string[] | undefined;
247
- }
248
- /**
249
- * THE DOOR (packages are thin shells until engaged). With `load`, nothing behind the add-ons is in
250
- * the page until a person engages ANY writing field (press, key, right-click, mic, "…"); that first
251
- * action calls `load` once and every field on the page switches to the real add-ons together.
252
- * Before that the field draws its own light stand-ins (a mic button, a "…" with a spinner) whose
253
- * presses are queued and replayed the moment the add-ons arrive.
254
- */
255
- interface AddOnsDoor {
256
- /** The loaded (or eagerly given) add-ons; null while the door is still shut. */
257
- addOns: WritingFieldAddOns | null;
258
- /** A loader is registered and has not delivered yet. */
259
- pending: boolean;
260
- /** The last load failed (the next engagement retries). */
261
- failed: boolean;
262
- light: WritingFieldLight;
263
- /** Open the door (idempotent); resolves with the add-ons, or null when the load failed. */
264
- engage: () => Promise<WritingFieldAddOns | null>;
265
- /** The add-ons a field draws with right now (the loaded set, or the light pending set). */
266
- effective: WritingFieldAddOns;
267
- }
268
- /**
269
- * Mount once at the host's app root. Pass `load` (one dynamic import of everything) to keep the
270
- * add-ons out of the page until a field is engaged, or `addOns` to register them eagerly. The first
271
- * value of either is kept for the provider's life (hook ports must be module-constant).
272
- */
273
- declare function WritingFieldAddOnsProvider({ addOns, load, light, children, }: {
274
- addOns?: WritingFieldAddOns | undefined;
275
- load?: (() => Promise<WritingFieldAddOns>) | undefined;
276
- light?: WritingFieldLight | undefined;
232
+ /** Mount once at the host's app root. The first `addOns` object is kept for the provider's life. */
233
+ declare function WritingFieldAddOnsProvider({ addOns, children, }: {
234
+ addOns: WritingFieldAddOns;
277
235
  children: React.ReactNode;
278
236
  }): React.JSX.Element;
279
- /** The add-ons a field draws with right now: the registered set, the light pending set, or none. */
237
+ /** The registered add-ons (or none). */
280
238
  declare function useWritingFieldAddOns(): WritingFieldAddOns;
281
- /** The door's state, for a field that must know whether its add-ons are still on the way. */
282
- declare function useWritingFieldDoor(): Pick<AddOnsDoor, "pending" | "failed" | "engage">;
283
239
  /** Announce a missing port once, in words naming what to register. */
284
240
  declare function announceMissingPort(port: string): void;
285
241
 
@@ -595,4 +551,4 @@ interface ProTextareaAddOnProps {
595
551
  interface ProInputAddOnProps {
596
552
  }
597
553
 
598
- export { ADD_ON_PROP_NAMES, COARSE_SIZES, type ClusterPlacement, type ClusterRow, type ControlSizes, DENSE_FIELD_MAX_HEIGHT_PX, DENSE_SIZES, type DictationRefusalReason, type DictationStartResult, FINE_SIZES, FieldMenuRow, type FitRequest, type FitResult, type FoldableControl, INLINE_CONTROLS_MIN_HEIGHT_PX, type MicFit, PRO_INPUT_MIN_RIGHT_PADDING_PX, PRO_INPUT_NARROW_FIELD_PX, PRO_INPUT_TEXT_GAP_PX, ProInput, type ProInputAddOnProps, type ProInputElement, type ProInputProps, ProTextarea, type ProTextareaAddOnProps, type ProTextareaControls, type ProTextareaEditorHandle, type ProTextareaEditorRenderProps, type ProTextareaEditorSlot, type ProTextareaElement, type ProTextareaProps, SUBMIT_BUTTON_WIDTH_PX, StandInMenu, TAP_HALF_GAP_PX, VoiceProtectionDialog, type WritingFieldAddOns, WritingFieldAddOnsProvider, type WritingFieldApi, type WritingFieldContextMenuProps, type WritingFieldLight, type WritingFieldMenuProps, type WritingFieldMicButtonProps, type WritingFieldNotify, type WritingFieldTextStats, type WritingFieldVoice, type WritingFieldVoiceOptions, announceMissingPort, clusterPlacementProblems, controlSizes, fitFieldControls, hoverRevealsCluster, inlineControlsFieldPadding, isDenseField, micAriaLabel, minTextPx, proTextareaClusterPlacement, reservedRightPaddingPx, splitAddOnProps, useWritingFieldAddOns, useWritingFieldDoor };
554
+ export { ADD_ON_PROP_NAMES, COARSE_SIZES, type ClusterPlacement, type ClusterRow, type ControlSizes, DENSE_FIELD_MAX_HEIGHT_PX, DENSE_SIZES, type DictationRefusalReason, type DictationStartResult, FINE_SIZES, FieldMenuRow, type FitRequest, type FitResult, type FoldableControl, INLINE_CONTROLS_MIN_HEIGHT_PX, type MicFit, PRO_INPUT_MIN_RIGHT_PADDING_PX, PRO_INPUT_NARROW_FIELD_PX, PRO_INPUT_TEXT_GAP_PX, ProInput, type ProInputAddOnProps, type ProInputElement, type ProInputProps, ProTextarea, type ProTextareaAddOnProps, type ProTextareaControls, type ProTextareaEditorHandle, type ProTextareaEditorRenderProps, type ProTextareaEditorSlot, type ProTextareaElement, type ProTextareaProps, SUBMIT_BUTTON_WIDTH_PX, StandInMenu, TAP_HALF_GAP_PX, VoiceProtectionDialog, type WritingFieldAddOns, WritingFieldAddOnsProvider, type WritingFieldApi, type WritingFieldContextMenuProps, type WritingFieldMenuProps, type WritingFieldMicButtonProps, type WritingFieldNotify, type WritingFieldTextStats, type WritingFieldVoice, type WritingFieldVoiceOptions, announceMissingPort, clusterPlacementProblems, controlSizes, fitFieldControls, hoverRevealsCluster, inlineControlsFieldPadding, isDenseField, micAriaLabel, minTextPx, proTextareaClusterPlacement, reservedRightPaddingPx, splitAddOnProps, useWritingFieldAddOns };
@@ -229,57 +229,13 @@ declare function splitAddOnProps<T extends Record<string, unknown>>(props: T, ex
229
229
  dom: T;
230
230
  addOnProps: Record<string, unknown>;
231
231
  };
232
- /**
233
- * What a field may know BEFORE the add-ons load: pure, dependency-free answers the field needs to
234
- * draw itself the same way it will once they load (no "…" appearing after the first click).
235
- */
236
- interface WritingFieldLight {
237
- menuHasItems?: WritingFieldAddOns["menuHasItems"];
238
- /**
239
- * Whether a right-click on this field will open the add-ons' menu. Answered true, the first
240
- * right-click before load is held and replayed once the add-ons arrive; otherwise the browser's
241
- * own menu shows as usual.
242
- */
243
- holdsContextMenu?: ((field: Pick<WritingFieldApi, "kind" | "addOnProps">) => boolean) | undefined;
244
- /** Light enough to draw before engagement (a pinned stats bar is visible on first paint). */
245
- TextStats?: WritingFieldTextStats | undefined;
246
- propNames?: readonly string[] | undefined;
247
- }
248
- /**
249
- * THE DOOR (packages are thin shells until engaged). With `load`, nothing behind the add-ons is in
250
- * the page until a person engages ANY writing field (press, key, right-click, mic, "…"); that first
251
- * action calls `load` once and every field on the page switches to the real add-ons together.
252
- * Before that the field draws its own light stand-ins (a mic button, a "…" with a spinner) whose
253
- * presses are queued and replayed the moment the add-ons arrive.
254
- */
255
- interface AddOnsDoor {
256
- /** The loaded (or eagerly given) add-ons; null while the door is still shut. */
257
- addOns: WritingFieldAddOns | null;
258
- /** A loader is registered and has not delivered yet. */
259
- pending: boolean;
260
- /** The last load failed (the next engagement retries). */
261
- failed: boolean;
262
- light: WritingFieldLight;
263
- /** Open the door (idempotent); resolves with the add-ons, or null when the load failed. */
264
- engage: () => Promise<WritingFieldAddOns | null>;
265
- /** The add-ons a field draws with right now (the loaded set, or the light pending set). */
266
- effective: WritingFieldAddOns;
267
- }
268
- /**
269
- * Mount once at the host's app root. Pass `load` (one dynamic import of everything) to keep the
270
- * add-ons out of the page until a field is engaged, or `addOns` to register them eagerly. The first
271
- * value of either is kept for the provider's life (hook ports must be module-constant).
272
- */
273
- declare function WritingFieldAddOnsProvider({ addOns, load, light, children, }: {
274
- addOns?: WritingFieldAddOns | undefined;
275
- load?: (() => Promise<WritingFieldAddOns>) | undefined;
276
- light?: WritingFieldLight | undefined;
232
+ /** Mount once at the host's app root. The first `addOns` object is kept for the provider's life. */
233
+ declare function WritingFieldAddOnsProvider({ addOns, children, }: {
234
+ addOns: WritingFieldAddOns;
277
235
  children: React.ReactNode;
278
236
  }): React.JSX.Element;
279
- /** The add-ons a field draws with right now: the registered set, the light pending set, or none. */
237
+ /** The registered add-ons (or none). */
280
238
  declare function useWritingFieldAddOns(): WritingFieldAddOns;
281
- /** The door's state, for a field that must know whether its add-ons are still on the way. */
282
- declare function useWritingFieldDoor(): Pick<AddOnsDoor, "pending" | "failed" | "engage">;
283
239
  /** Announce a missing port once, in words naming what to register. */
284
240
  declare function announceMissingPort(port: string): void;
285
241
 
@@ -595,4 +551,4 @@ interface ProTextareaAddOnProps {
595
551
  interface ProInputAddOnProps {
596
552
  }
597
553
 
598
- export { ADD_ON_PROP_NAMES, COARSE_SIZES, type ClusterPlacement, type ClusterRow, type ControlSizes, DENSE_FIELD_MAX_HEIGHT_PX, DENSE_SIZES, type DictationRefusalReason, type DictationStartResult, FINE_SIZES, FieldMenuRow, type FitRequest, type FitResult, type FoldableControl, INLINE_CONTROLS_MIN_HEIGHT_PX, type MicFit, PRO_INPUT_MIN_RIGHT_PADDING_PX, PRO_INPUT_NARROW_FIELD_PX, PRO_INPUT_TEXT_GAP_PX, ProInput, type ProInputAddOnProps, type ProInputElement, type ProInputProps, ProTextarea, type ProTextareaAddOnProps, type ProTextareaControls, type ProTextareaEditorHandle, type ProTextareaEditorRenderProps, type ProTextareaEditorSlot, type ProTextareaElement, type ProTextareaProps, SUBMIT_BUTTON_WIDTH_PX, StandInMenu, TAP_HALF_GAP_PX, VoiceProtectionDialog, type WritingFieldAddOns, WritingFieldAddOnsProvider, type WritingFieldApi, type WritingFieldContextMenuProps, type WritingFieldLight, type WritingFieldMenuProps, type WritingFieldMicButtonProps, type WritingFieldNotify, type WritingFieldTextStats, type WritingFieldVoice, type WritingFieldVoiceOptions, announceMissingPort, clusterPlacementProblems, controlSizes, fitFieldControls, hoverRevealsCluster, inlineControlsFieldPadding, isDenseField, micAriaLabel, minTextPx, proTextareaClusterPlacement, reservedRightPaddingPx, splitAddOnProps, useWritingFieldAddOns, useWritingFieldDoor };
554
+ export { ADD_ON_PROP_NAMES, COARSE_SIZES, type ClusterPlacement, type ClusterRow, type ControlSizes, DENSE_FIELD_MAX_HEIGHT_PX, DENSE_SIZES, type DictationRefusalReason, type DictationStartResult, FINE_SIZES, FieldMenuRow, type FitRequest, type FitResult, type FoldableControl, INLINE_CONTROLS_MIN_HEIGHT_PX, type MicFit, PRO_INPUT_MIN_RIGHT_PADDING_PX, PRO_INPUT_NARROW_FIELD_PX, PRO_INPUT_TEXT_GAP_PX, ProInput, type ProInputAddOnProps, type ProInputElement, type ProInputProps, ProTextarea, type ProTextareaAddOnProps, type ProTextareaControls, type ProTextareaEditorHandle, type ProTextareaEditorRenderProps, type ProTextareaEditorSlot, type ProTextareaElement, type ProTextareaProps, SUBMIT_BUTTON_WIDTH_PX, StandInMenu, TAP_HALF_GAP_PX, VoiceProtectionDialog, type WritingFieldAddOns, WritingFieldAddOnsProvider, type WritingFieldApi, type WritingFieldContextMenuProps, type WritingFieldMenuProps, type WritingFieldMicButtonProps, type WritingFieldNotify, type WritingFieldTextStats, type WritingFieldVoice, type WritingFieldVoiceOptions, announceMissingPort, clusterPlacementProblems, controlSizes, fitFieldControls, hoverRevealsCluster, inlineControlsFieldPadding, isDenseField, micAriaLabel, minTextPx, proTextareaClusterPlacement, reservedRightPaddingPx, splitAddOnProps, useWritingFieldAddOns };