@alepha/react 0.14.4 → 0.15.0

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.
@@ -43,14 +43,14 @@ declare const ClientOnly: (props: PropsWithChildren<ClientOnlyProps>) => ReactNo
43
43
  */
44
44
  interface ErrorBoundaryProps {
45
45
  /**
46
- * Fallback React node to render when an error is caught.
47
- * If not provided, a default error message will be shown.
48
- */
46
+ * Fallback React node to render when an error is caught.
47
+ * If not provided, a default error message will be shown.
48
+ */
49
49
  fallback: (error: Error) => ReactNode;
50
50
  /**
51
- * Optional callback that receives the error and error info.
52
- * Use this to log errors to a monitoring service.
53
- */
51
+ * Optional callback that receives the error and error info.
52
+ * Use this to log errors to a monitoring service.
53
+ */
54
54
  onError?: (error: Error, info: ErrorInfo) => void;
55
55
  }
56
56
  /**
@@ -67,13 +67,13 @@ interface ErrorBoundaryState {
67
67
  declare class ErrorBoundary extends React.Component<PropsWithChildren<ErrorBoundaryProps>, ErrorBoundaryState> {
68
68
  constructor(props: ErrorBoundaryProps);
69
69
  /**
70
- * Update state so the next render shows the fallback UI.
71
- */
70
+ * Update state so the next render shows the fallback UI.
71
+ */
72
72
  static getDerivedStateFromError(error: Error): ErrorBoundaryState;
73
73
  /**
74
- * Lifecycle method called when an error is caught.
75
- * You can log the error or perform side effects here.
76
- */
74
+ * Lifecycle method called when an error is caught.
75
+ * You can log the error or perform side effects here.
76
+ */
77
77
  componentDidCatch(error: Error, info: ErrorInfo): void;
78
78
  render(): ReactNode;
79
79
  }
@@ -209,126 +209,126 @@ declare function useAction<Args extends any[], Result = void>(options: UseAction
209
209
  */
210
210
  interface ActionContext {
211
211
  /**
212
- * AbortSignal that can be passed to fetch or other async operations.
213
- * The signal will be aborted when:
214
- * - The component unmounts
215
- * - A new action is triggered (cancels previous)
216
- * - The cancel() method is called
217
- *
218
- * @example
219
- * ```tsx
220
- * const action = useAction({
221
- * handler: async (url, { signal }) => {
222
- * const response = await fetch(url, { signal });
223
- * return response.json();
224
- * }
225
- * }, []);
226
- * ```
227
- */
212
+ * AbortSignal that can be passed to fetch or other async operations.
213
+ * The signal will be aborted when:
214
+ * - The component unmounts
215
+ * - A new action is triggered (cancels previous)
216
+ * - The cancel() method is called
217
+ *
218
+ * @example
219
+ * ```tsx
220
+ * const action = useAction({
221
+ * handler: async (url, { signal }) => {
222
+ * const response = await fetch(url, { signal });
223
+ * return response.json();
224
+ * }
225
+ * }, []);
226
+ * ```
227
+ */
228
228
  signal: AbortSignal;
229
229
  }
230
230
  interface UseActionOptions<Args extends any[] = any[], Result = any> {
231
231
  /**
232
- * The async action handler function.
233
- * Receives the action arguments plus an ActionContext as the last parameter.
234
- */
232
+ * The async action handler function.
233
+ * Receives the action arguments plus an ActionContext as the last parameter.
234
+ */
235
235
  handler: (...args: [...Args, ActionContext]) => Async<Result>;
236
236
  /**
237
- * Custom error handler. If provided, prevents default error re-throw.
238
- */
237
+ * Custom error handler. If provided, prevents default error re-throw.
238
+ */
239
239
  onError?: (error: Error) => void | Promise<void>;
240
240
  /**
241
- * Custom success handler.
242
- */
241
+ * Custom success handler.
242
+ */
243
243
  onSuccess?: (result: Result) => void | Promise<void>;
244
244
  /**
245
- * Optional identifier for this action (useful for debugging/analytics)
246
- */
245
+ * Optional identifier for this action (useful for debugging/analytics)
246
+ */
247
247
  id?: string;
248
248
  name?: string;
249
249
  /**
250
- * Debounce delay in milliseconds. If specified, the action will only execute
251
- * after the specified delay has passed since the last call. Useful for search inputs
252
- * or other high-frequency events.
253
- *
254
- * @example
255
- * ```tsx
256
- * // Execute search 300ms after user stops typing
257
- * const search = useAction({ handler: search, debounce: 300 }, [])
258
- * ```
259
- */
250
+ * Debounce delay in milliseconds. If specified, the action will only execute
251
+ * after the specified delay has passed since the last call. Useful for search inputs
252
+ * or other high-frequency events.
253
+ *
254
+ * @example
255
+ * ```tsx
256
+ * // Execute search 300ms after user stops typing
257
+ * const search = useAction({ handler: search, debounce: 300 }, [])
258
+ * ```
259
+ */
260
260
  debounce?: number;
261
261
  /**
262
- * If true, the action will be executed once when the component mounts.
263
- *
264
- * @example
265
- * ```tsx
266
- * const fetchData = useAction({
267
- * handler: async () => await api.getData(),
268
- * runOnInit: true
269
- * }, []);
270
- * ```
271
- */
262
+ * If true, the action will be executed once when the component mounts.
263
+ *
264
+ * @example
265
+ * ```tsx
266
+ * const fetchData = useAction({
267
+ * handler: async () => await api.getData(),
268
+ * runOnInit: true
269
+ * }, []);
270
+ * ```
271
+ */
272
272
  runOnInit?: boolean;
273
273
  /**
274
- * If specified, the action will be executed periodically at the given interval.
275
- * The interval is specified as a DurationLike value (number in ms, Duration object, or [number, unit] tuple).
276
- *
277
- * @example
278
- * ```tsx
279
- * // Run every 5 seconds
280
- * const poll = useAction({
281
- * handler: async () => await api.poll(),
282
- * runEvery: 5000
283
- * }, []);
284
- * ```
285
- *
286
- * @example
287
- * ```tsx
288
- * // Run every 1 minute
289
- * const poll = useAction({
290
- * handler: async () => await api.poll(),
291
- * runEvery: [1, 'minute']
292
- * }, []);
293
- * ```
294
- */
274
+ * If specified, the action will be executed periodically at the given interval.
275
+ * The interval is specified as a DurationLike value (number in ms, Duration object, or [number, unit] tuple).
276
+ *
277
+ * @example
278
+ * ```tsx
279
+ * // Run every 5 seconds
280
+ * const poll = useAction({
281
+ * handler: async () => await api.poll(),
282
+ * runEvery: 5000
283
+ * }, []);
284
+ * ```
285
+ *
286
+ * @example
287
+ * ```tsx
288
+ * // Run every 1 minute
289
+ * const poll = useAction({
290
+ * handler: async () => await api.poll(),
291
+ * runEvery: [1, 'minute']
292
+ * }, []);
293
+ * ```
294
+ */
295
295
  runEvery?: DurationLike;
296
296
  }
297
297
  interface UseActionReturn<Args extends any[], Result> {
298
298
  /**
299
- * Execute the action with the provided arguments.
300
- *
301
- * @example
302
- * ```tsx
303
- * const action = useAction({ handler: async (data) => { ... } }, []);
304
- * action.run(data);
305
- * ```
306
- */
299
+ * Execute the action with the provided arguments.
300
+ *
301
+ * @example
302
+ * ```tsx
303
+ * const action = useAction({ handler: async (data) => { ... } }, []);
304
+ * action.run(data);
305
+ * ```
306
+ */
307
307
  run: (...args: Args) => Promise<Result | undefined>;
308
308
  /**
309
- * Loading state - true when action is executing.
310
- */
309
+ * Loading state - true when action is executing.
310
+ */
311
311
  loading: boolean;
312
312
  /**
313
- * Error state - contains error if action failed, undefined otherwise.
314
- */
313
+ * Error state - contains error if action failed, undefined otherwise.
314
+ */
315
315
  error?: Error;
316
316
  /**
317
- * Cancel any pending debounced action or abort the current in-flight request.
318
- *
319
- * @example
320
- * ```tsx
321
- * const action = useAction({ ... }, []);
322
- *
323
- * <button onClick={action.cancel} disabled={!action.loading}>
324
- * Cancel
325
- * </button>
326
- * ```
327
- */
317
+ * Cancel any pending debounced action or abort the current in-flight request.
318
+ *
319
+ * @example
320
+ * ```tsx
321
+ * const action = useAction({ ... }, []);
322
+ *
323
+ * <button onClick={action.cancel} disabled={!action.loading}>
324
+ * Cancel
325
+ * </button>
326
+ * ```
327
+ */
328
328
  cancel: () => void;
329
329
  /**
330
- * The result data from the last successful action execution.
331
- */
330
+ * The result data from the last successful action execution.
331
+ */
332
332
  result?: Result;
333
333
  }
334
334
  //#endregion
@@ -379,7 +379,7 @@ type UseEvents = { [T in keyof Hooks]?: Hook<T> | ((payload: Hooks[T]) => Async<
379
379
  * Hook to inject a service instance.
380
380
  * It's a wrapper of `useAlepha().inject(service)` with a memoization.
381
381
  */
382
- declare const useInject: <T$1 extends object>(service: Service<T$1>) => T$1;
382
+ declare const useInject: <T extends object>(service: Service<T>) => T;
383
383
  //#endregion
384
384
  //#region ../../src/core/hooks/useClient.d.ts
385
385
  /**
@@ -387,48 +387,48 @@ declare const useInject: <T$1 extends object>(service: Service<T$1>) => T$1;
387
387
  *
388
388
  * It's the React-hook version of `$client()`, from `AlephaServerLinks` module.
389
389
  */
390
- declare const useClient: <T$1 extends object>(scope?: ClientScope) => HttpVirtualClient<T$1>;
390
+ declare const useClient: <T extends object>(scope?: ClientScope) => HttpVirtualClient<T>;
391
391
  //#endregion
392
392
  //#region ../../src/core/hooks/useStore.d.ts
393
393
  /**
394
394
  * Hook to access and mutate the Alepha state.
395
395
  */
396
- declare function useStore<T$1 extends TAtomObject>(target: Atom<T$1>, defaultValue?: Static<T$1>): UseStoreReturn<Static<T$1>>;
396
+ declare function useStore<T extends TAtomObject>(target: Atom<T>, defaultValue?: Static<T>): UseStoreReturn<Static<T>>;
397
397
  declare function useStore<Key extends keyof State>(target: Key, defaultValue?: State[Key]): UseStoreReturn<State[Key]>;
398
- type UseStoreReturn<T$1> = [T$1, (value: T$1) => void];
398
+ type UseStoreReturn<T> = [T, (value: T) => void];
399
399
  //#endregion
400
400
  //#region ../../src/core/index.d.ts
401
401
  declare module "alepha" {
402
402
  interface Hooks {
403
403
  /**
404
- * Fires when a user action is starting.
405
- * Action can be a form submission, a route transition, or a custom action.
406
- */
404
+ * Fires when a user action is starting.
405
+ * Action can be a form submission, a route transition, or a custom action.
406
+ */
407
407
  "react:action:begin": {
408
408
  type: string;
409
409
  id?: string;
410
410
  };
411
411
  /**
412
- * Fires when a user action has succeeded.
413
- * Action can be a form submission, a route transition, or a custom action.
414
- */
412
+ * Fires when a user action has succeeded.
413
+ * Action can be a form submission, a route transition, or a custom action.
414
+ */
415
415
  "react:action:success": {
416
416
  type: string;
417
417
  id?: string;
418
418
  };
419
419
  /**
420
- * Fires when a user action has failed.
421
- * Action can be a form submission, a route transition, or a custom action.
422
- */
420
+ * Fires when a user action has failed.
421
+ * Action can be a form submission, a route transition, or a custom action.
422
+ */
423
423
  "react:action:error": {
424
424
  type: string;
425
425
  id?: string;
426
426
  error: Error;
427
427
  };
428
428
  /**
429
- * Fires when a user action has completed, regardless of success or failure.
430
- * Action can be a form submission, a route transition, or a custom action.
431
- */
429
+ * Fires when a user action has completed, regardless of success or failure.
430
+ * Action can be a form submission, a route transition, or a custom action.
431
+ */
432
432
  "react:action:end": {
433
433
  type: string;
434
434
  id?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../../src/core/components/ClientOnly.tsx","../../src/core/components/ErrorBoundary.tsx","../../src/core/contexts/AlephaProvider.tsx","../../src/core/contexts/AlephaContext.ts","../../src/core/hooks/useAction.ts","../../src/core/hooks/useAlepha.ts","../../src/core/hooks/useEvents.ts","../../src/core/hooks/useInject.ts","../../src/core/hooks/useClient.ts","../../src/core/hooks/useStore.ts","../../src/core/index.ts"],"sourcesContent":[],"mappings":";;;;;;;;;UAOiB,eAAA;aACJ;;;;;;;AADb;AAGC;;;;;;;;ACDD;;;;;;AAYC;AAcD;;;;cDCM,UCGe,EAAA,CAAA,KAAA,EDHM,iBCGN,CDHwB,eCGxB,CAAA,EAAA,GDHwC,SCGxC;;;;;;UA9BJ,kBAAA;;;;;EDFA,QAAA,EAAA,CAAA,KAAA,ECOG,KDPY,EAAA,GCOF,SDNjB;EA4BP;;;;EAUL,OAAA,CAAA,EAAA,CAAA,KAAA,EC1BmB,KD0BnB,EAAA,IAAA,EC1BgC,SD0BhC,EAAA,GAAA,IAAA;;;;ACrCD;UAiBU,kBAAA,CAZU;EAAU,KAAA,CAAA,EAapB,KAboB;;;;AAO7B;AAcD;;AACE,cADW,aAAA,SAAsB,KAAA,CAAM,SACvC,CAAA,iBAAA,CAAkB,kBAAlB,CAAA,EACA,kBADA,CAAA,CAAA;EACA,WAAA,CAAA,KAAA,EAEmB,kBAFnB;EAEmB;;;EAkBM,OAAA,wBAAA,CAAA,KAAA,EAVc,KAUd,CAAA,EAVsB,kBAUtB;EAAa;;;;2BAAb,aAAa;YAM5B;;;;UC3DK,mBAAA;YACL;mBACO,UAAU;mBACV;;;;;AFAnB;AAGC;AA0B4C,cErBhC,cFqBgC,EAAA,CAAA,KAAA,EErBP,mBFqBO,EAAA,GAAA,MAAA,GAAA,MAAA,GAAA,MAAA,GAAA,OAAA,GErBY,QFqBZ,CErBY,SFqBZ,CAAA,GErBY,OFqBZ,CAAA,MAAA,GAAA,MAAA,GAAA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Cb;;;IAE6B,kBAAA,EAAA;MACV,IAAA,EAAA,MAAA;MAAS,EAAA,CAAA,EAAA,MAAA;IAQf,CAAA;EAAyB;;;;;;;;;;;;cQsDzB,aAAW,OAAA,CAAA,QAEtB,OAAA,CAFsB,MAAA"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../src/core/components/ClientOnly.tsx","../../src/core/components/ErrorBoundary.tsx","../../src/core/contexts/AlephaProvider.tsx","../../src/core/contexts/AlephaContext.ts","../../src/core/hooks/useAction.ts","../../src/core/hooks/useAlepha.ts","../../src/core/hooks/useEvents.ts","../../src/core/hooks/useInject.ts","../../src/core/hooks/useClient.ts","../../src/core/hooks/useStore.ts","../../src/core/index.ts"],"mappings":";;;;;;;;;UAOiB,eAAA;EAAA,QAAA,GACJ,SAAA;EAAA,QAAA;AAAA;AAAA;AAEZ;;;;;;;;ACDD;;;;;;AAYC;AAcD;;;;;;;;AD3Ba,cA4BP,UAAA,GAAA,KAAA,EAAqB,iBAAA,CAAkB,eAAA,MAAgB,SAAA;;;;AC3B7D;;UAAiB,kBAAA;EAAA;;;;EAAA,QAAA,GAAA,KAAA,EAKG,KAAA,KAAU,SAAA;EAAA;;;;EAAA,OAAA,IAAA,KAAA,EAMV,KAAA,EAAA,IAAA,EAAa,SAAA;AAAA;AAAA;;AAChC;AADgC,UAMvB,kBAAA;EAAA,KAAA,GACA,KAAA;AAAA;AAAA;AAQV;;;;AARU,cAQG,aAAA,SAAsB,KAAA,CAAM,SAAA,CACvC,iBAAA,CAAkB,kBAAA,GAClB,kBAAA;EAAA,YAAA,KAAA,EAEmB,kBAAA;EAAA;;;EAAA,OAAA,yBAAA,KAAA,EAQoB,KAAA,GAAQ,kBAAA;EAAA;;;;EAAA,kBAAA,KAAA,EAUtB,KAAA,EAAA,IAAA,EAAa,SAAA;EAAA,OAAA,GAM5B,SAAA;AAAA;;;UC3DK,mBAAA;EAAA,QAAA,EACL,SAAA;EAAA,OAAA,GAAA,KAAA,EACO,KAAA,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}
@@ -4,7 +4,6 @@ import { InputHTMLAttributes, ReactNode } from "react";
4
4
  import * as alepha_logger0 from "alepha/logger";
5
5
 
6
6
  //#region ../../src/form/services/FormModel.d.ts
7
-
8
7
  /**
9
8
  * FormModel is a dynamic form handler that generates form inputs based on a provided TypeBox schema.
10
9
  * It manages form state, handles input changes, and processes form submissions with validation.
@@ -34,14 +33,14 @@ declare class FormModel<T extends TObject> {
34
33
  readonly reset: (event: FormEventLike) => Promise<void>;
35
34
  readonly submit: () => Promise<void>;
36
35
  /**
37
- * Restructures flat keys like "address.city" into nested objects like { address: { city: ... } }
38
- * Values are already typed from onChange, so no conversion is needed.
39
- */
36
+ * Restructures flat keys like "address.city" into nested objects like { address: { city: ... } }
37
+ * Values are already typed from onChange, so no conversion is needed.
38
+ */
40
39
  protected restructureValues(store: Record<string, any>): Record<string, any>;
41
40
  /**
42
- * Helper to restructure a flat key like "address.city" into nested object structure.
43
- * The value is already typed, so we just assign it to the nested path.
44
- */
41
+ * Helper to restructure a flat key like "address.city" into nested object structure.
42
+ * The value is already typed, so we just assign it to the nested path.
43
+ */
45
44
  protected restructureNestedValue(values: Record<string, any>, key: string, value: any): void;
46
45
  protected createProxyFromSchema<T extends TObject>(options: FormCtrlOptions<T>, schema: TSchema, context: {
47
46
  parent: string;
@@ -52,9 +51,9 @@ declare class FormModel<T extends TObject> {
52
51
  store: Record<string, any>;
53
52
  }): BaseInputField;
54
53
  /**
55
- * Convert an input value to the correct type based on the schema.
56
- * Handles raw DOM values (strings, booleans from checkboxes, Files, etc.)
57
- */
54
+ * Convert an input value to the correct type based on the schema.
55
+ * Handles raw DOM values (strings, booleans from checkboxes, Files, etc.)
56
+ */
58
57
  protected getValueFromInput(input: any, schema: TSchema): any;
59
58
  protected valueToInputEntry(value: any): string | number | boolean;
60
59
  }
@@ -86,34 +85,34 @@ type InputHTMLAttributesLike = Pick<InputHTMLAttributes<unknown>, "id" | "name"
86
85
  };
87
86
  type FormCtrlOptions<T extends TObject> = {
88
87
  /**
89
- * The schema defining the structure and validation rules for the form.
90
- * This should be a TypeBox schema object.
91
- */
88
+ * The schema defining the structure and validation rules for the form.
89
+ * This should be a TypeBox schema object.
90
+ */
92
91
  schema: T;
93
92
  /**
94
- * Callback function to handle form submission.
95
- * This function will receive the parsed and validated form values.
96
- */
93
+ * Callback function to handle form submission.
94
+ * This function will receive the parsed and validated form values.
95
+ */
97
96
  handler: (values: Static<T>, args: {
98
97
  form: HTMLFormElement;
99
98
  }) => unknown;
100
99
  /**
101
- * Optional initial values for the form fields.
102
- * This can be used to pre-populate the form with existing data.
103
- */
100
+ * Optional initial values for the form fields.
101
+ * This can be used to pre-populate the form with existing data.
102
+ */
104
103
  initialValues?: Partial<Static<T>>;
105
104
  /**
106
- * Optional function to create custom field attributes.
107
- * This can be used to add custom validation, styles, or other attributes.
108
- */
105
+ * Optional function to create custom field attributes.
106
+ * This can be used to add custom validation, styles, or other attributes.
107
+ */
109
108
  onCreateField?: (name: keyof Static<T> & string, schema: TSchema) => InputHTMLAttributes<unknown>;
110
109
  /**
111
- * If defined, this will generate a unique ID for each field, prefixed with this string.
112
- *
113
- * > "username" with id="form-123" will become "form-123-username".
114
- *
115
- * If omitted, IDs will not be generated.
116
- */
110
+ * If defined, this will generate a unique ID for each field, prefixed with this string.
111
+ *
112
+ * > "username" with id="form-123" will become "form-123-username".
113
+ *
114
+ * If omitted, IDs will not be generated.
115
+ */
117
116
  id?: string;
118
117
  onError?: (error: Error, args: {
119
118
  form: HTMLFormElement;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../../src/form/services/FormModel.ts","../../src/form/components/FormState.tsx","../../src/form/hooks/useForm.ts","../../src/form/hooks/useFormState.ts","../../src/form/errors/FormValidationError.ts","../../src/form/index.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;AAaA;;;;;AAE2B,cAFd,SAEc,CAAA,UAFM,OAEN,CAAA,CAAA;EACE,SAAA,EAAA,EAAA,MAAA;EAGC,SAAA,O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IAAW,aAAA,EAAA;MAcY,EAAA,EAAA,MAAA;MAAhB,IAAA,EAAA,MAAA;MAAe,KAbpB,EAAA,GAAA;IACG,CAAA;IACE,YAAA,EAAA;MAGC,EAAA,EAAA,MAAA;MAAd,MAAA,EKJwB,MLIxB,CAAA,MAAA,EAAA,GAAA,CAAA;IAQ6B,CAAA;IAAhB,mBAAA,EAAA;MAiBL,EAAA,EAAA,MAAA;IAIM,CAAA;IAQR,qBAAA,EAAA;MAIC,EAAA,EAAA,MAAA;MAAa,MAAA,EK3Ca,ML2Cb,CAAA,MAAA,EAAA,GAAA,CAAA;IAIF,CAAA;IAAa,mBAAA,EAAA;MAoBvB,EAAA,EAAA,MAAA;MA4Ea,KAAA,EK9IS,KL8IT;IAAsB,CAAA;IAqB/C,iBAAA,EAAA;MAsBgC,EAAA,EAAA,MAAA;IACf,CAAA;EAAhB;;;;;;;;;;;;;AAoPqC,cK5ZrC,eL4ZqC,EK5ZtB,OAAA,CAAA,OL4ZsB,CK1ZhD,OAAA,CAF0B,MAAA,CL4ZsB"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../src/form/services/FormModel.ts","../../src/form/components/FormState.tsx","../../src/form/hooks/useForm.ts","../../src/form/hooks/useFormState.ts","../../src/form/errors/FormValidationError.ts","../../src/form/index.ts"],"mappings":";;;;;;;AAaA;;;;;;;cAAa,SAAA,WAAoB,OAAA;EAAA,SAAA,EAAA;EAAA,SAAA,OAAA,EAcJ,eAAA,CAAgB,CAAA;EAAA,mBAAA,GAAA,EAAD,cAAA,CAbpB,MAAA;EAAA,mBAAA,MAAA,EACG,MAAA;EAAA,mBAAA,MAAA,EACE,MAAA;EAAA,UAAA,gBAAA;EAAA,KAAA,EAGb,aAAA,CAAc,CAAA;EAAA,IAAA,WAAA;EAAA,YAAA,EAAA,UAAA,OAAA,EAQD,eAAA,CAAgB,CAAA;EAAA,IAAA,QAAA,GAiBrB,eAAA;EAAA,IAAA,cAAA,GAIM,MAAA;EAAA,IAAA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GACD,KAAA;AAAA;AAAA,cAGG,YAAA,aACD,OAAA,qBACS,kBAAA,EAAA,MAAA,EAEX,SAAA,CAAU,CAAA;EAAA,IAAA,EAAa,SAAA,CAAU,CAAA;EAAA,IAAA;AAAA,GAAA,OAAA,GAChC,IAAA,OACR,IAAA,CAAK,kBAAA,EAAoB,IAAA;;;cChBf,mBAAA,SAA4B,YAAA;EAAA,SAAA,IAAA;EAAA,YAAA,OAAA;IAAA,OAAA;IAAA,IAAA;EAAA;AAAA;;;;;;;;;;;;cCaD,MAAA;IAAA;IAAA;MAAA,EAAA;IAAA;IAAA;MAAA,EAAA;MAAA,MAAA,EAES,MAAA;IAAA;IAAA;MAAA,EAAA;MAAA,KAAA,EACH,KAAA;IAAA;IAAA;MAAA,EAAA;IAAA;EAAA;AAAA;AAAA;;;;AAkB9C;;;;;;;AAlB8C,cAkBjC,eAAA,EAAe,OAAA,CAAA,OAAA,CAE1B,OAAA,CAF0B,MAAA"}
@@ -3,7 +3,6 @@ import { Alepha, KIND, Primitive } from "alepha";
3
3
  import * as alepha_logger0 from "alepha/logger";
4
4
 
5
5
  //#region ../../src/head/interfaces/Head.d.ts
6
-
7
6
  /**
8
7
  * Complete head configuration combining basic head elements with SEO fields.
9
8
  *
@@ -45,26 +44,17 @@ interface Seo {
45
44
  imageAlt?: string;
46
45
  /** Twitter-specific overrides */
47
46
  twitter?: {
48
- /** Twitter card type */
49
- card?: "summary" | "summary_large_image" | "app" | "player";
50
- /** @username of website */
51
- site?: string;
52
- /** @username of content creator */
53
- creator?: string;
54
- /** Override title for Twitter */
55
- title?: string;
56
- /** Override description for Twitter */
57
- description?: string;
58
- /** Override image for Twitter */
47
+ /** Twitter card type */card?: "summary" | "summary_large_image" | "app" | "player"; /** @username of website */
48
+ site?: string; /** @username of content creator */
49
+ creator?: string; /** Override title for Twitter */
50
+ title?: string; /** Override description for Twitter */
51
+ description?: string; /** Override image for Twitter */
59
52
  image?: string;
60
53
  };
61
54
  /** OpenGraph-specific overrides */
62
55
  og?: {
63
- /** Override title for OpenGraph */
64
- title?: string;
65
- /** Override description for OpenGraph */
66
- description?: string;
67
- /** Override image for OpenGraph */
56
+ /** Override title for OpenGraph */title?: string; /** Override description for OpenGraph */
57
+ description?: string; /** Override image for OpenGraph */
68
58
  image?: string;
69
59
  };
70
60
  }
@@ -139,18 +129,18 @@ declare class HeadProvider {
139
129
  protected readonly seoExpander: SeoExpander;
140
130
  global?: Array<Head | (() => Head)>;
141
131
  /**
142
- * Track if we've warned about page-level htmlAttributes to avoid spam.
143
- */
132
+ * Track if we've warned about page-level htmlAttributes to avoid spam.
133
+ */
144
134
  protected warnedAboutHtmlAttributes: boolean;
145
135
  /**
146
- * Resolve global head configuration (from $head primitives only).
147
- *
148
- * This is used to get htmlAttributes early, before page loaders run.
149
- * Only htmlAttributes from global $head are allowed; page-level htmlAttributes
150
- * are ignored for early streaming optimization.
151
- *
152
- * @returns Merged global head with htmlAttributes
153
- */
136
+ * Resolve global head configuration (from $head primitives only).
137
+ *
138
+ * This is used to get htmlAttributes early, before page loaders run.
139
+ * Only htmlAttributes from global $head are allowed; page-level htmlAttributes
140
+ * are ignored for early streaming optimization.
141
+ *
142
+ * @returns Merged global head with htmlAttributes
143
+ */
154
144
  resolveGlobalHead(): Head;
155
145
  fillHead(state: HeadState): void;
156
146
  protected mergeHead(state: HeadState, head: Head): void;
@@ -222,16 +212,16 @@ type UseHeadReturn = [Head, (head?: Head | ((previous?: Head) => Head)) => void]
222
212
  declare class ServerHeadProvider {
223
213
  protected readonly headProvider: HeadProvider;
224
214
  /**
225
- * Resolve global head configuration (htmlAttributes only).
226
- *
227
- * Used for early streaming optimization - htmlAttributes can be sent
228
- * before page loaders run since they come from global $head only.
229
- */
215
+ * Resolve global head configuration (htmlAttributes only).
216
+ *
217
+ * Used for early streaming optimization - htmlAttributes can be sent
218
+ * before page loaders run since they come from global $head only.
219
+ */
230
220
  resolveGlobalHead(): Head;
231
221
  /**
232
- * Fill head state from route configurations.
233
- * Delegates to HeadProvider to merge head data from all route layers.
234
- */
222
+ * Fill head state from route configurations.
223
+ * Delegates to HeadProvider to merge head data from all route layers.
224
+ */
235
225
  fillHead(state: {
236
226
  head: SimpleHead;
237
227
  layers: Array<any>;
@@ -251,11 +241,11 @@ declare class BrowserHeadProvider {
251
241
  protected readonly headProvider: HeadProvider;
252
242
  protected get document(): Document;
253
243
  /**
254
- * Fill head state from route configurations and render to document.
255
- * Combines fillHead from HeadProvider with renderHead to the DOM.
256
- *
257
- * Only runs in browser environment - no-op on server.
258
- */
244
+ * Fill head state from route configurations and render to document.
245
+ * Combines fillHead from HeadProvider with renderHead to the DOM.
246
+ *
247
+ * Only runs in browser environment - no-op on server.
248
+ */
259
249
  fillAndRenderHead(state: {
260
250
  head: Head;
261
251
  layers: Array<any>;