@maykonpaulo/maestro-admin 0.2.0 → 0.3.0-next.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.
package/dist/index.d.ts CHANGED
@@ -176,6 +176,12 @@ interface AdminStrings {
176
176
  entitiesFooter: (count: number) => string;
177
177
  yes: string;
178
178
  no: string;
179
+ jsonFormMode: string;
180
+ jsonRawMode: string;
181
+ jsonInvalid: string;
182
+ emptyObject: string;
183
+ addItem: string;
184
+ removeItem: string;
179
185
  searchMenu: string;
180
186
  recents: string;
181
187
  menus: string;
@@ -359,4 +365,25 @@ declare function FieldInput({ field, value, onChange, disabled, }: {
359
365
  disabled?: boolean;
360
366
  }): react.JSX.Element;
361
367
 
362
- export { AdminClientProvider, type AdminLabels, type AdminLocale, type AdminStrings, type AsyncState, type EntityCapabilities, EntityDetail, EntityForm, type EntityLabelOverride, EntityList, type EntityMetadata, FieldInput, type FieldMetadata, FieldValue, type FilterInput, I18nProvider, type ListQuery, type ListResult, MaestroAdmin, type MaestroAdminProps, MaestroApiError, MaestroClient, type MaestroClientConfig, type MaestroMetadata, type MenuGroup, Sidebar, type SidebarMenu, applyLabels, buildMenu, detailFields, formFields, listFields, primaryListFields, stringsFor, useAsync, useClient, useEntityList, useEntityRecord, useMetadata, useRecents, useT };
368
+ /**
369
+ * Read-only structured rendering for object/array values: one row per key (arrays use indexes),
370
+ * recursing into nested objects — instead of dumping raw JSON at the user.
371
+ */
372
+ declare function ObjectValue({ value, depth }: {
373
+ value: unknown;
374
+ depth?: number;
375
+ }): react.JSX.Element;
376
+
377
+ /**
378
+ * Form control for `json` fields: a structured editor when the value is an object or array (each entry
379
+ * gets a control matching its type; array items can be added/removed), plus a raw-JSON mode for
380
+ * adding/removing object keys or pasting a whole value.
381
+ */
382
+ declare function JsonInput({ field, value, onChange, disabled, }: {
383
+ field: FieldMetadata;
384
+ value: unknown;
385
+ onChange: (next: unknown) => void;
386
+ disabled?: boolean;
387
+ }): react.JSX.Element;
388
+
389
+ export { AdminClientProvider, type AdminLabels, type AdminLocale, type AdminStrings, type AsyncState, type EntityCapabilities, EntityDetail, EntityForm, type EntityLabelOverride, EntityList, type EntityMetadata, FieldInput, type FieldMetadata, FieldValue, type FilterInput, I18nProvider, JsonInput, type ListQuery, type ListResult, MaestroAdmin, type MaestroAdminProps, MaestroApiError, MaestroClient, type MaestroClientConfig, type MaestroMetadata, type MenuGroup, ObjectValue, Sidebar, type SidebarMenu, applyLabels, buildMenu, detailFields, formFields, listFields, primaryListFields, stringsFor, useAsync, useClient, useEntityList, useEntityRecord, useMetadata, useRecents, useT };