@standardbeagle/edit-db 0.4.449 → 0.4.451

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 (40) hide show
  1. package/dist/components/confirm-dialog.d.ts +1 -1
  2. package/dist/components/content-editor.d.ts +1 -1
  3. package/dist/components/content-panel.d.ts +1 -1
  4. package/dist/components/content-viewer.d.ts +1 -1
  5. package/dist/components/data-table-column-header.d.ts +1 -1
  6. package/dist/components/data-table.d.ts +1 -1
  7. package/dist/components/detail-panel.d.ts +1 -1
  8. package/dist/components/empty-value.d.ts +1 -8
  9. package/dist/components/filters/boolean-filter.d.ts +1 -1
  10. package/dist/components/filters/date-filter.d.ts +1 -1
  11. package/dist/components/filters/fk-filter.d.ts +1 -1
  12. package/dist/components/filters/number-filter.d.ts +1 -1
  13. package/dist/components/filters/text-filter.d.ts +1 -1
  14. package/dist/components/fk-cell-popover.d.ts +1 -1
  15. package/dist/components/m2m-panel.d.ts +4 -4
  16. package/dist/components/row-actions.d.ts +4 -3
  17. package/dist/components/ui/alert.d.ts +3 -3
  18. package/dist/components/ui/button.d.ts +1 -1
  19. package/dist/components/ui/checkbox.d.ts +1 -1
  20. package/dist/components/ui/dropdown-menu.d.ts +15 -15
  21. package/dist/components/ui/label.d.ts +1 -1
  22. package/dist/components/ui/select.d.ts +10 -10
  23. package/dist/components/ui/sheet.d.ts +9 -9
  24. package/dist/components/ui/table.d.ts +8 -8
  25. package/dist/data-edit.d.ts +11 -0
  26. package/dist/data-panel.d.ts +1 -1
  27. package/dist/edit-db.css +1 -1
  28. package/dist/editor.d.ts +1 -1
  29. package/dist/editor.es.js +10883 -9926
  30. package/dist/editor.umd.cjs +37 -41
  31. package/dist/error-panel.d.ts +1 -1
  32. package/dist/header.d.ts +1 -1
  33. package/dist/hooks/useColumnNav.d.ts +1 -1
  34. package/dist/hooks/useEditorConfig.d.ts +1 -1
  35. package/dist/hooks/usePath.d.ts +2 -2
  36. package/dist/hooks/useSchema.d.ts +1 -1
  37. package/dist/lib/format-value.d.ts +22 -3
  38. package/dist/main-frame.d.ts +1 -1
  39. package/dist/tableList.d.ts +1 -1
  40. package/package.json +3 -3
@@ -1 +1 @@
1
- export default function ErrorPage(): import("react/jsx-runtime").JSX.Element;
1
+ export default function ErrorPage(): import("react").JSX.Element;
package/dist/header.d.ts CHANGED
@@ -1 +1 @@
1
- export declare function Header(): import("react/jsx-runtime").JSX.Element;
1
+ export declare function Header(): import("react").JSX.Element;
@@ -19,7 +19,7 @@ interface ColumnNavRegistration {
19
19
  }
20
20
  export declare function ColumnNavProvider({ children }: {
21
21
  children: ReactNode;
22
- }): import("react/jsx-runtime").JSX.Element;
22
+ }): import("react").JSX.Element;
23
23
  export declare function useColumnNav(): ColumnNavState;
24
24
  export declare function useColumnNavRegister(): {
25
25
  register: (reg: ColumnNavRegistration) => void;
@@ -15,5 +15,5 @@ export interface EditorConfig {
15
15
  export declare function EditorConfigProvider({ config, children }: {
16
16
  config: EditorConfig;
17
17
  children: ReactNode;
18
- }): import("react/jsx-runtime").JSX.Element;
18
+ }): import("react").JSX.Element;
19
19
  export declare function useEditorConfig(): EditorConfig;
@@ -35,11 +35,11 @@ export declare function useRouteError(): RouteError;
35
35
  export declare function PathProvider({ path, children }: {
36
36
  path: string;
37
37
  children: ReactNode;
38
- }): import("react/jsx-runtime").JSX.Element;
38
+ }): React.JSX.Element;
39
39
  export declare const Link: React.ForwardRefExoticComponent<LinkProps & React.RefAttributes<HTMLAnchorElement>>;
40
40
  export declare function Routes({ children }: {
41
41
  children: ReactNode;
42
- }): import("react/jsx-runtime").JSX.Element;
42
+ }): React.JSX.Element;
43
43
  export declare function Route({ path, element }: {
44
44
  path: string;
45
45
  element: ReactElement;
@@ -13,7 +13,7 @@ import { Schema } from '../types/schema';
13
13
  */
14
14
  export declare const SchemaProvider: ({ children }: {
15
15
  children: ReactNode;
16
- }) => import("react/jsx-runtime").JSX.Element;
16
+ }) => import("react").JSX.Element;
17
17
  /**
18
18
  * Hook to access the database schema context.
19
19
  *
@@ -21,9 +21,28 @@ import { Column } from '../types/schema';
21
21
  * precise underlying data.
22
22
  */
23
23
  export declare const DISPLAY_FORMAT_KEY = "display-format";
24
+ /**
25
+ * Secondary, context-specific format template (used by compact surfaces like FK
26
+ * preview popovers). When a column doesn't set it, formatting falls back to the
27
+ * main `display-format`, so the preview matches the grid by default.
28
+ */
29
+ export declare const DISPLAY_FORMAT_PREVIEW_KEY = "display-format-preview";
24
30
  export type DisplayFormat = 'date' | 'datetime' | 'time' | 'relative' | 'number' | 'percent' | 'raw';
25
- /** Resolve the effective format: explicit metadata wins, else inferred from type. */
26
- export declare function resolveDisplayFormat(column: Column): DisplayFormat | null;
31
+ /** Options for {@link formatColumnValue}. */
32
+ export interface FormatOptions {
33
+ /**
34
+ * Metadata key to read the format from before falling back to the main
35
+ * `display-format`. Lets a context override the template while defaulting to
36
+ * the main one when the column doesn't set the override key.
37
+ */
38
+ formatKey?: string;
39
+ }
40
+ /**
41
+ * Resolve the effective format: an explicit override key wins, then the main
42
+ * `display-format` metadata, else inferred from the column type. Passing
43
+ * `formatKey` lets a context default to the main template when its own is unset.
44
+ */
45
+ export declare function resolveDisplayFormat(column: Column, formatKey?: string): DisplayFormat | null;
27
46
  /** "4 hours ago" / "in 3 days" via Intl.RelativeTimeFormat. */
28
47
  export declare function formatRelative(date: Date, now?: Date): string;
29
48
  /**
@@ -31,4 +50,4 @@ export declare function formatRelative(date: Date, now?: Date): string;
31
50
  * placeholder for null/empty, a locale-formatted node for known formats (with a
32
51
  * `title` revealing the exact value), or the plain string otherwise.
33
52
  */
34
- export declare function formatColumnValue(value: unknown, column: Column): ReactNode;
53
+ export declare function formatColumnValue(value: unknown, column: Column, options?: FormatOptions): ReactNode;
@@ -1,5 +1,5 @@
1
1
  interface MainFrameProps {
2
2
  onLocate?: (location: string) => void;
3
3
  }
4
- export declare function MainFrame({ onLocate }: MainFrameProps): import("react/jsx-runtime").JSX.Element;
4
+ export declare function MainFrame({ onLocate }: MainFrameProps): import("react").JSX.Element;
5
5
  export {};
@@ -13,4 +13,4 @@
13
13
  * <TableList />
14
14
  * ```
15
15
  */
16
- export declare function TableList(): import("react/jsx-runtime").JSX.Element;
16
+ export declare function TableList(): import("react").JSX.Element;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@standardbeagle/edit-db",
3
3
  "private": false,
4
- "version": "0.4.449",
4
+ "version": "0.4.451",
5
5
  "type": "module",
6
6
  "dependencies": {
7
7
  "@radix-ui/react-slot": "^1.2.4",
@@ -18,7 +18,7 @@
18
18
  "tailwind-merge": "^3.6.0"
19
19
  },
20
20
  "devDependencies": {
21
- "@babel/core": "^7.29.0",
21
+ "@babel/core": "^7.29.7",
22
22
  "@storybook/addon-links": "^10.4.1",
23
23
  "@storybook/react": "^10.4.1",
24
24
  "@storybook/react-vite": "^10.4.1",
@@ -41,7 +41,7 @@
41
41
  "storybook": "^10.4.1",
42
42
  "tailwindcss": "^4.3.0",
43
43
  "typescript": "^5.9.3",
44
- "vite": "^7.3.3",
44
+ "vite": "^7.3.5",
45
45
  "vite-plugin-dts": "^4.5.4",
46
46
  "vitest": "^4.1.8"
47
47
  },