@object-ui/components 4.7.0 → 5.0.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.
@@ -0,0 +1,25 @@
1
+ import { default as React } from 'react';
2
+ export interface RecordTitleChipProps {
3
+ /** Resolved title text (already interpolated against the record). */
4
+ title: string;
5
+ /** Optional icon node (object icon, e.g. <Lucide /> or an emoji). */
6
+ icon?: React.ReactNode;
7
+ /** Object label shown beneath the title (e.g. "Lead"). */
8
+ objectLabel?: string;
9
+ /** Record identifier shown next to the object label with a copy button. */
10
+ resourceId?: string;
11
+ /** Hide the favourite star (default: shown). */
12
+ showStar?: boolean;
13
+ /** Hide the copy-id button (default: shown when `resourceId` is given). */
14
+ showCopyId?: boolean;
15
+ /** Controlled favourite state. When omitted, the chip manages its own. */
16
+ isFavorite?: boolean;
17
+ /** Called when the favourite star is toggled. */
18
+ onToggleFavorite?: (next: boolean) => void;
19
+ /** Extra classes for the outer flex column. */
20
+ className?: string;
21
+ /** Optional inline action node rendered after the title (e.g. badges). */
22
+ inlineExtras?: React.ReactNode;
23
+ }
24
+ export declare const RecordTitleChip: React.FC<RecordTitleChipProps>;
25
+ export default RecordTitleChip;
@@ -18,6 +18,8 @@ export * from './sort-builder';
18
18
  export * from './grouping-editor';
19
19
  export * from './action-param-dialog';
20
20
  export * from './view-skeleton';
21
+ export * from './RecordTitleChip';
22
+ export * from './refresh-indicator';
21
23
  export * from './view-states';
22
24
  export * from './mobile-dialog-content';
23
25
  export * from './export-progress-dialog';
@@ -0,0 +1,24 @@
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
+ import * as React from "react";
9
+ export interface RefreshIndicatorProps extends React.HTMLAttributes<HTMLDivElement> {
10
+ /** Whether the indicator is active. When false, nothing is rendered. */
11
+ active: boolean;
12
+ /** Accessible label. Defaults to "Refreshing". */
13
+ ariaLabel?: string;
14
+ }
15
+ /**
16
+ * Thin, absolutely-positioned indeterminate progress bar that animates across
17
+ * the top edge of its nearest positioned ancestor. Use it to signal that a
18
+ * re-fetch is in flight while existing data stays visible underneath — covers
19
+ * the gap between "loading skeleton (no data yet)" and "data swapped in".
20
+ *
21
+ * The parent **must** be `position: relative` (or absolute/fixed) for the
22
+ * indicator to anchor to its top edge.
23
+ */
24
+ export declare const RefreshIndicator: React.FC<RefreshIndicatorProps>;
@@ -23,8 +23,8 @@
23
23
  */
24
24
  interface ProbeFn {
25
25
  (objectName: string, query: {
26
- where?: Record<string, unknown>;
27
- limit?: number;
26
+ $filter?: Record<string, unknown>;
27
+ $top?: number;
28
28
  }): Promise<{
29
29
  total?: number;
30
30
  data?: unknown[];
@@ -16,4 +16,13 @@
16
16
  * - PageHeaderProps -> page:header
17
17
  * - page:footer / page:sidebar / page:section thin wrappers
18
18
  */
19
- export {};
19
+ /**
20
+ * Strip dangling connectors that survive when a `titleFormat` interpolates
21
+ * with one side empty — e.g. `{number} - {name}` becomes `CTR-0001 -` when
22
+ * `name` is blank. Removes a trailing/leading hyphen / middle-dot / colon /
23
+ * slash / pipe (optionally surrounded by whitespace) and collapses
24
+ * adjacent whitespace into a single space. Idempotent.
25
+ *
26
+ * Exported for unit tests.
27
+ */
28
+ export declare function cleanupTitleSeparators(s: string): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@object-ui/components",
3
- "version": "4.7.0",
3
+ "version": "5.0.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",
@@ -69,10 +69,10 @@
69
69
  "tailwind-merge": "^3.6.0",
70
70
  "tailwindcss-animate": "^1.0.7",
71
71
  "vaul": "^1.1.2",
72
- "@object-ui/core": "4.7.0",
73
- "@object-ui/i18n": "4.7.0",
74
- "@object-ui/react": "4.7.0",
75
- "@object-ui/types": "4.7.0"
72
+ "@object-ui/core": "5.0.0",
73
+ "@object-ui/i18n": "5.0.0",
74
+ "@object-ui/react": "5.0.0",
75
+ "@object-ui/types": "5.0.0"
76
76
  },
77
77
  "peerDependencies": {
78
78
  "react": "^18.0.0 || ^19.0.0",