@object-ui/components 17.3.0 → 17.6.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.
Files changed (47) hide show
  1. package/CHANGELOG.md +2732 -1
  2. package/README.md +38 -38
  3. package/dist/custom/button-group.d.ts +1 -1
  4. package/dist/custom/character-count.d.ts +56 -0
  5. package/dist/custom/config-field-renderer.d.ts +1 -1
  6. package/dist/custom/config-panel-renderer.d.ts +3 -3
  7. package/dist/custom/export-progress-dialog.d.ts +1 -1
  8. package/dist/custom/filter-builder.d.ts +284 -4
  9. package/dist/custom/fullscreen-editor.d.ts +102 -0
  10. package/dist/custom/index.d.ts +28 -27
  11. package/dist/custom/item.d.ts +1 -1
  12. package/dist/custom/resizable.d.ts +1 -1
  13. package/dist/debug/index.d.ts +2 -2
  14. package/dist/index.css +36 -6
  15. package/dist/index.d.ts +21 -20
  16. package/dist/index.js +4991 -4464
  17. package/dist/index.umd.cjs +10 -6
  18. package/dist/lib/form-control-dom-props.d.ts +77 -0
  19. package/dist/lib/sidebar-cookie.d.ts +55 -0
  20. package/dist/lib/slider-thumb.d.ts +86 -0
  21. package/dist/notifications/index.d.ts +5 -5
  22. package/dist/renderers/action/action-bar.d.ts +3 -3
  23. package/dist/renderers/action/action-button.d.ts +12 -2
  24. package/dist/renderers/action/action-group.d.ts +10 -4
  25. package/dist/renderers/action/action-icon.d.ts +10 -2
  26. package/dist/renderers/action/action-menu.d.ts +20 -2
  27. package/dist/renderers/action/auto-trigger.d.ts +20 -0
  28. package/dist/renderers/action/visibility-gate.d.ts +81 -0
  29. package/dist/renderers/basic/elements.d.ts +3 -3
  30. package/dist/renderers/basic/html-elements.d.ts +1 -1
  31. package/dist/renderers/basic/record-picker.d.ts +10 -1
  32. package/dist/renderers/complex/data-table.d.ts +100 -4
  33. package/dist/renderers/form/validationRuleKeys.d.ts +45 -0
  34. package/dist/renderers/layout/containers.d.ts +2 -1
  35. package/dist/renderers/layout/react-page.d.ts +12 -2
  36. package/dist/share/index.d.ts +2 -2
  37. package/dist/ui/calendar.d.ts +1 -1
  38. package/dist/ui/carousel.d.ts +2 -2
  39. package/dist/ui/command.d.ts +1 -1
  40. package/dist/ui/form.d.ts +1 -1
  41. package/dist/ui/index.d.ts +47 -47
  42. package/dist/ui/pagination.d.ts +1 -1
  43. package/dist/ui/sidebar.d.ts +2 -2
  44. package/dist/ui/slider.d.ts +2 -1
  45. package/package.json +14 -14
  46. package/dist/custom/action-param-dialog.d.ts +0 -21
  47. package/dist/renderers/data-display/table.d.ts +0 -2
@@ -0,0 +1,45 @@
1
+ /**
2
+ * ObjectUI
3
+ * Copyright (c) 2024-present ObjectStack Inc.
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ /**
9
+ * The validation-rule names react-hook-form actually RUNS (objectui#5099).
10
+ *
11
+ * react-hook-form's field validator destructures a FIXED key set off the
12
+ * field descriptor and silently drops every other key. From the installed
13
+ * 7.85.0 bundle (`dist/index.cjs.js`, minified):
14
+ *
15
+ * const{ref:c,refs:f,required:m,maxLength:y,minLength:p,min:g,max:b,
16
+ * pattern:V,validate:A,name:x,valueAsNumber:S,mount:k}=e._f
17
+ *
18
+ * Of those twelve, seven are authorable validation rules — the rest are
19
+ * field-descriptor internals react-hook-form writes itself and an author
20
+ * never supplies through `FieldValidationRules`. Any rule name outside the
21
+ * seven — a misspelled `minlength`, an invented `email`, the numeric keys
22
+ * left by spreading an ARRAY into `validation` — is dropped without a trace:
23
+ * the field renders, the form looks validated, and the rule never runs. The
24
+ * form renderer reports such names loudly (dev-time `console.error`; see
25
+ * `form.tsx`).
26
+ *
27
+ * Both lists are PINNED against the installed react-hook-form bundle by
28
+ * `__tests__/rhf-recognized-rule-keys.test.ts`, which re-derives the
29
+ * destructured set from `dist/index.cjs.js` at test time. A react-hook-form
30
+ * bump that changes the set turns that test red — forcing a human to re-sort
31
+ * the new key into one of these two lists — instead of silently rotting the
32
+ * diagnostic.
33
+ */
34
+ /**
35
+ * Keys react-hook-form's validator destructures that are NOT authorable
36
+ * rules: descriptor internals the library maintains itself.
37
+ */
38
+ export declare const RHF_DESCRIPTOR_NON_RULE_KEYS: readonly string[];
39
+ /**
40
+ * The authorable rule names react-hook-form's validator reads. Exactly the
41
+ * declared key set of `FieldValidationRules` in `@object-ui/types` —
42
+ * declared = enforced; anything else in a field's `validation` object is a
43
+ * bug in the metadata, not a rule.
44
+ */
45
+ export declare const RHF_RECOGNIZED_RULE_KEYS: ReadonlySet<string>;
@@ -14,7 +14,8 @@
14
14
  * - PageCardProps -> page:card
15
15
  * - PageAccordionProps -> page:accordion
16
16
  * - PageHeaderProps -> page:header
17
- * - page:footer / page:sidebar / page:section thin wrappers
17
+ * - PageContainerProps -> page:footer / page:sidebar / page:section
18
+ * (the thin wrappers; one shared `children` slot)
18
19
  */
19
20
  /**
20
21
  * Strip dangling connectors that survive when a `titleFormat` interpolates
@@ -21,11 +21,21 @@
21
21
  * - `React` — so authors can call hooks.
22
22
  * - the PUBLIC data blocks — `<ObjectGrid>`, `<ObjectForm>`, charts, metrics…
23
23
  * each as a prop-driven wrapper that renders via SchemaRenderer. Layout is
24
- * left to plain HTML + Tailwind (React's strength); only the data blocks
25
- * that can't be expressed in HTML are injected.
24
+ * left to plain HTML (React's strength); only the data blocks that can't be
25
+ * expressed in HTML are injected.
26
26
  * - `Block` — escape hatch: `<Block type="object-grid" .../>`.
27
27
  * - `useAdapter` — live data hook: query/create/update objects.
28
28
  * - `data` / `variables` — page data + local variables, for convenience.
29
+ *
30
+ * Styling — page source is metadata, not build input. A react page styles with
31
+ * inline `style` objects using `hsl(var(--token))` theme colors; overlays render
32
+ * through `<ObjectForm formType="drawer"|"modal">` rather than a hand-rolled
33
+ * `fixed inset-0` backdrop. Do NOT author Tailwind utility classes in page
34
+ * `source`: `source` is runtime metadata, the console's Tailwind is compiled at
35
+ * build time by scanning the console's own `src`, and there is no safelist — an
36
+ * authored utility class silently produces no CSS. `os validate` reports it as
37
+ * `page-source-className-tailwind`. (ADR-0065; ADR-0080's 2026-06-30 amendment;
38
+ * see `content/docs/guide/react-pages.md`.)
29
39
  */
30
40
  import * as React from 'react';
31
41
  export declare const ReactKindPage: React.FC<{
@@ -1,2 +1,2 @@
1
- export { ShareDialog, type ShareDialogProps, type ShareLink, type ShareLinkAudience, type ShareLinkPermission, } from './ShareDialog';
2
- export { default } from './ShareDialog';
1
+ export { ShareDialog, type ShareDialogProps, type ShareLink, type ShareLinkAudience, type ShareLinkPermission, } from './ShareDialog.js';
2
+ export { default } from './ShareDialog.js';
@@ -1,5 +1,5 @@
1
1
  import { DayButton, DayPicker } from 'react-day-picker';
2
- import { Button } from './button';
2
+ import { Button } from './button.js';
3
3
  /**
4
4
  * ObjectUI
5
5
  * Copyright (c) 2024-present ObjectStack Inc.
@@ -20,6 +20,6 @@ type CarouselProps = {
20
20
  declare const Carousel: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & CarouselProps & React.RefAttributes<HTMLDivElement>>;
21
21
  declare const CarouselContent: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
22
22
  declare const CarouselItem: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
23
- declare const CarouselPrevious: React.ForwardRefExoticComponent<Omit<import('./button').ButtonProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
24
- declare const CarouselNext: React.ForwardRefExoticComponent<Omit<import('./button').ButtonProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
23
+ declare const CarouselPrevious: React.ForwardRefExoticComponent<Omit<import('./button.js').ButtonProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
24
+ declare const CarouselNext: React.ForwardRefExoticComponent<Omit<import('./button.js').ButtonProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
25
25
  export { type CarouselApi, Carousel, CarouselContent, CarouselItem, CarouselPrevious, CarouselNext, };
@@ -1,5 +1,5 @@
1
1
  import { DialogProps } from '@radix-ui/react-dialog';
2
- import { DialogContent } from './dialog';
2
+ import { DialogContent } from './dialog.js';
3
3
  /**
4
4
  * ObjectUI
5
5
  * Copyright (c) 2024-present ObjectStack Inc.
package/dist/ui/form.d.ts CHANGED
@@ -15,7 +15,7 @@ declare const useFormField: () => {
15
15
  isDirty: boolean;
16
16
  isTouched: boolean;
17
17
  isValidating: boolean;
18
- error?: import('react-hook-form').FieldError;
18
+ error?: import('react-hook-form').FieldError | undefined;
19
19
  id: string;
20
20
  name: string;
21
21
  formItemId: string;
@@ -5,50 +5,50 @@
5
5
  * This source code is licensed under the MIT license found in the
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  */
8
- export * from './accordion';
9
- export * from './alert-dialog';
10
- export * from './alert';
11
- export * from './aspect-ratio';
12
- export * from './avatar';
13
- export * from './badge';
14
- export * from './breadcrumb';
15
- export * from './button';
16
- export * from './calendar';
17
- export * from './card';
18
- export * from './carousel';
19
- export * from './chart';
20
- export * from './checkbox';
21
- export * from './collapsible';
22
- export * from './command';
23
- export * from './context-menu';
24
- export * from './dialog';
25
- export * from './drawer';
26
- export * from './dropdown-menu';
27
- export * from './form';
28
- export * from './hover-card';
29
- export * from './input-otp';
30
- export * from './input';
31
- export * from './label';
32
- export * from './menubar';
33
- export * from './navigation-menu';
34
- export * from './pagination';
35
- export * from './popover';
36
- export * from './progress';
37
- export * from './radio-group';
38
- export * from './scroll-area';
39
- export * from './select';
40
- export * from './separator';
41
- export * from './sheet';
42
- export * from './sidebar';
43
- export * from './skeleton';
44
- export * from './slider';
45
- export * from './sonner';
46
- export { Toaster } from './sonner';
47
- export * from './switch';
48
- export * from './table';
49
- export * from './tabs';
50
- export * from './textarea';
51
- export * from './toggle-group';
52
- export * from './toggle';
53
- export * from './tooltip';
54
- export * from './typography';
8
+ export * from './accordion.js';
9
+ export * from './alert-dialog.js';
10
+ export * from './alert.js';
11
+ export * from './aspect-ratio.js';
12
+ export * from './avatar.js';
13
+ export * from './badge.js';
14
+ export * from './breadcrumb.js';
15
+ export * from './button.js';
16
+ export * from './calendar.js';
17
+ export * from './card.js';
18
+ export * from './carousel.js';
19
+ export * from './chart.js';
20
+ export * from './checkbox.js';
21
+ export * from './collapsible.js';
22
+ export * from './command.js';
23
+ export * from './context-menu.js';
24
+ export * from './dialog.js';
25
+ export * from './drawer.js';
26
+ export * from './dropdown-menu.js';
27
+ export * from './form.js';
28
+ export * from './hover-card.js';
29
+ export * from './input-otp.js';
30
+ export * from './input.js';
31
+ export * from './label.js';
32
+ export * from './menubar.js';
33
+ export * from './navigation-menu.js';
34
+ export * from './pagination.js';
35
+ export * from './popover.js';
36
+ export * from './progress.js';
37
+ export * from './radio-group.js';
38
+ export * from './scroll-area.js';
39
+ export * from './select.js';
40
+ export * from './separator.js';
41
+ export * from './sheet.js';
42
+ export * from './sidebar.js';
43
+ export * from './skeleton.js';
44
+ export * from './slider.js';
45
+ export * from './sonner.js';
46
+ export { Toaster } from './sonner.js';
47
+ export * from './switch.js';
48
+ export * from './table.js';
49
+ export * from './tabs.js';
50
+ export * from './textarea.js';
51
+ export * from './toggle-group.js';
52
+ export * from './toggle.js';
53
+ export * from './tooltip.js';
54
+ export * from './typography.js';
@@ -1,4 +1,4 @@
1
- import { ButtonProps } from './button';
1
+ import { ButtonProps } from './button.js';
2
2
  /**
3
3
  * ObjectUI
4
4
  * Copyright (c) 2024-present ObjectStack Inc.
@@ -1,5 +1,5 @@
1
1
  import { VariantProps } from 'class-variance-authority';
2
- import { TooltipContent } from './tooltip';
2
+ import { TooltipContent } from './tooltip.js';
3
3
  /**
4
4
  * ObjectUI
5
5
  * Copyright (c) 2024-present ObjectStack Inc.
@@ -28,7 +28,7 @@ declare const Sidebar: React.ForwardRefExoticComponent<Omit<React.ClassAttribute
28
28
  variant?: "sidebar" | "floating" | "inset";
29
29
  collapsible?: "offcanvas" | "icon" | "none";
30
30
  }, "ref"> & React.RefAttributes<HTMLDivElement>>;
31
- declare const SidebarTrigger: React.ForwardRefExoticComponent<Omit<import('./button').ButtonProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
31
+ declare const SidebarTrigger: React.ForwardRefExoticComponent<Omit<import('./button.js').ButtonProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
32
32
  declare const SidebarRail: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
33
33
  declare const SidebarInset: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
34
34
  declare const SidebarInput: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
@@ -1,3 +1,4 @@
1
+ import { SliderThumbPassThrough } from '../lib/slider-thumb.js';
1
2
  /**
2
3
  * ObjectUI
3
4
  * Copyright (c) 2024-present ObjectStack Inc.
@@ -7,5 +8,5 @@
7
8
  */
8
9
  import * as React from "react";
9
10
  import * as SliderPrimitive from "@radix-ui/react-slider";
10
- declare const Slider: React.ForwardRefExoticComponent<Omit<SliderPrimitive.SliderProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
11
+ declare const Slider: React.ForwardRefExoticComponent<Omit<SliderPrimitive.SliderProps & React.RefAttributes<HTMLSpanElement>, "ref"> & SliderThumbPassThrough & React.RefAttributes<HTMLSpanElement>>;
11
12
  export { Slider };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@object-ui/components",
3
- "version": "17.3.0",
3
+ "version": "17.6.0",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "description": "Standard UI component library for Object UI, built with Shadcn UI + Tailwind CSS",
@@ -26,7 +26,7 @@
26
26
  "./style.css": "./dist/index.css"
27
27
  },
28
28
  "dependencies": {
29
- "@objectstack/spec": "^17.0.0-rc.2",
29
+ "@objectstack/spec": "^17.0.0",
30
30
  "@radix-ui/react-accordion": "^1.2.20",
31
31
  "@radix-ui/react-alert-dialog": "^1.1.23",
32
32
  "@radix-ui/react-aspect-ratio": "^1.1.15",
@@ -60,22 +60,22 @@
60
60
  "date-fns": "^4.4.0",
61
61
  "embla-carousel-react": "^8.6.0",
62
62
  "input-otp": "^1.4.2",
63
- "lucide-react": "^1.28.0",
63
+ "lucide-react": "^1.31.0",
64
64
  "next-themes": "^0.4.6",
65
65
  "react-day-picker": "^10.0.1",
66
- "react-hook-form": "^7.83.0",
66
+ "react-hook-form": "^7.85.0",
67
67
  "react-resizable-panels": "^4.12.2",
68
68
  "recharts": "3.10.1",
69
- "sonner": "^2.0.7",
69
+ "sonner": "^2.0.8",
70
70
  "tailwind-merge": "^3.6.0",
71
71
  "tailwindcss-animate": "^1.0.7",
72
72
  "vaul": "^1.1.2",
73
- "@object-ui/core": "17.3.0",
74
- "@object-ui/i18n": "17.3.0",
75
- "@object-ui/react": "17.3.0",
76
- "@object-ui/react-runtime": "17.3.0",
77
- "@object-ui/sdui-parser": "17.3.0",
78
- "@object-ui/types": "17.3.0"
73
+ "@object-ui/core": "17.6.0",
74
+ "@object-ui/i18n": "17.6.0",
75
+ "@object-ui/react": "17.6.0",
76
+ "@object-ui/types": "17.6.0",
77
+ "@object-ui/sdui-parser": "17.6.0",
78
+ "@object-ui/react-runtime": "17.6.0"
79
79
  },
80
80
  "peerDependencies": {
81
81
  "react": "^18.0.0 || ^19.0.0",
@@ -90,10 +90,10 @@
90
90
  "@vitejs/plugin-react": "^6.0.5",
91
91
  "autoprefixer": "^10.5.4",
92
92
  "postcss": "^8.5.26",
93
- "shadcn": "^4.16.0",
93
+ "shadcn": "^4.18.0",
94
94
  "tailwindcss": "^4.3.3",
95
95
  "typescript": "^6.0.3",
96
- "vite": "^8.2.0",
96
+ "vite": "^8.2.1",
97
97
  "vite-plugin-dts": "^5.0.3",
98
98
  "zod": "^4.4.3"
99
99
  },
@@ -124,7 +124,7 @@
124
124
  "prebuild": "pnpm --filter @object-ui/types build && pnpm --filter @object-ui/core build && pnpm --filter @object-ui/react build",
125
125
  "pretest": "pnpm run prebuild",
126
126
  "test": "vitest run",
127
- "type-check": "tsc --noEmit && tsc -p tsconfig.typetests.json",
127
+ "type-check": "tsc --noEmit && tsc -p tsconfig.test.json",
128
128
  "lint": "eslint ."
129
129
  }
130
130
  }
@@ -1,21 +0,0 @@
1
- import { default as React } from 'react';
2
- import { ActionParamDef } from '@object-ui/core';
3
- export interface ActionParamDialogProps {
4
- /** The param definitions to render */
5
- params: ActionParamDef[];
6
- /** Whether the dialog is open */
7
- open: boolean;
8
- /** Called when the user submits the form */
9
- onSubmit: (values: Record<string, any>) => void;
10
- /** Called when the user cancels */
11
- onCancel: () => void;
12
- /** Dialog title */
13
- title?: string;
14
- /** Dialog description */
15
- description?: string;
16
- }
17
- /**
18
- * ActionParamDialog renders a dialog with form fields for each ActionParam.
19
- * It collects user input and returns the values on submit.
20
- */
21
- export declare const ActionParamDialog: React.FC<ActionParamDialogProps>;
@@ -1,2 +0,0 @@
1
- import { default as React } from 'react';
2
- export declare const SimpleTableRenderer: ({ schema, className }: any) => React.JSX.Element;