@proveanything/smartlinks-utils-ui 0.10.7 → 0.10.8
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/{IconPicker-BMMQLR5I.d.ts → IconPicker-DKpL5Hcc.d.ts} +1 -1
- package/dist/chunk-2MW54ZVG.js +92 -0
- package/dist/chunk-2MW54ZVG.js.map +1 -0
- package/dist/components/AssetPicker/index.d.ts +1 -1
- package/dist/components/IconPicker/index.d.ts +2 -2
- package/dist/components/RecordsAdmin/index.d.ts +30 -2
- package/dist/components/RecordsAdmin/index.js +119 -105
- package/dist/components/RecordsAdmin/index.js.map +1 -1
- package/dist/index.css +182 -182
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +62 -4
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/{useAssets-BM1bzzkq.d.ts → useAssets-BAtXv6D5.d.ts} +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,14 +1,72 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { g as ASSET_MIME_FILTERS, A as AssetItem, h as AssetMimeFilter, a as AssetPicker, b as AssetPickerMode, c as AssetPickerProps, d as AssetPickerSelection, e as AssetScope, f as AssetViewMode, u as useAssets } from './useAssets-BAtXv6D5.js';
|
|
2
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
|
+
import { ReactNode } from 'react';
|
|
2
4
|
export { ConditionsEditor } from './components/ConditionsEditor/index.js';
|
|
3
5
|
export { C as Condition, a as ConditionGroup, b as ConditionType, c as ConditionTypeMeta, d as ConditionsEditorProps, S as SelectOption, V as VersionOption } from './types-a2DdgZ2H.js';
|
|
4
6
|
export { FacetRuleEditor, FacetRuleEditorProps } from './components/FacetRuleEditor/index.js';
|
|
5
|
-
export {
|
|
7
|
+
export { b as IconPicker, c as IconPickerProps, d as IconSelection } from './IconPicker-DKpL5Hcc.js';
|
|
6
8
|
export { CATEGORY_FALLBACKS, CATEGORY_LABELS, FontCategory, FontEntry, FontPicker, FontPickerProps, FontScope, FontSelection, FontSource, FontWeight, GOOGLE_FONTS_CATALOG, getGoogleFontUrl } from './components/FontPicker/index.js';
|
|
7
9
|
import { ClassValue } from 'clsx';
|
|
8
10
|
export { FacetRule, FacetRuleClause } from '@proveanything/smartlinks/dist/types/appObjects';
|
|
9
|
-
|
|
11
|
+
|
|
12
|
+
type AdminPageHeaderIntroTone = 'info' | 'success' | 'warning';
|
|
13
|
+
interface AdminPageHeaderIntro {
|
|
14
|
+
/** Short headline shown in bold at the start of the intro card. */
|
|
15
|
+
title: string;
|
|
16
|
+
/** Body content — plain text or rich nodes. */
|
|
17
|
+
body: ReactNode;
|
|
18
|
+
/** Visual tone — controls icon and surface tint. Default `'info'`. */
|
|
19
|
+
tone?: AdminPageHeaderIntroTone;
|
|
20
|
+
/** Optional action node rendered inline after the body (e.g. a Learn-more link). */
|
|
21
|
+
action?: ReactNode;
|
|
22
|
+
/** Whether the intro is currently dismissed. Controlled. */
|
|
23
|
+
dismissed: boolean;
|
|
24
|
+
/** Called when the user clicks the dismiss `X`. */
|
|
25
|
+
onDismiss: () => void;
|
|
26
|
+
/**
|
|
27
|
+
* Called when the user clicks the reopen `?` button (only rendered when
|
|
28
|
+
* dismissed is true). Omit to hide the reopen affordance entirely.
|
|
29
|
+
*/
|
|
30
|
+
onReopen?: () => void;
|
|
31
|
+
/** Tooltip / aria-label for the reopen button. Default "How it works". */
|
|
32
|
+
reopenLabel?: string;
|
|
33
|
+
}
|
|
34
|
+
interface AdminPageHeaderProps {
|
|
35
|
+
/** Page title — required. */
|
|
36
|
+
title: string;
|
|
37
|
+
/** Single-line muted subtitle under the title. */
|
|
38
|
+
subtitle?: string;
|
|
39
|
+
/** Icon rendered inline before the title. Pass a Lucide element or any node. */
|
|
40
|
+
icon?: ReactNode;
|
|
41
|
+
/**
|
|
42
|
+
* External help / documentation URL. When set, renders a small icon-button
|
|
43
|
+
* that opens the URL in a new tab. Use this to point at app-specific docs.
|
|
44
|
+
*/
|
|
45
|
+
helpUrl?: string;
|
|
46
|
+
/** Tooltip / aria-label for the help link. Default "Help & documentation". */
|
|
47
|
+
helpLabel?: string;
|
|
48
|
+
/**
|
|
49
|
+
* Right-aligned action slot — typically a primary "+ New" button and/or
|
|
50
|
+
* secondary controls. Rendered before the help / intro-reopen icon-buttons.
|
|
51
|
+
*/
|
|
52
|
+
actions?: ReactNode;
|
|
53
|
+
/**
|
|
54
|
+
* Extra header content rendered between `actions` and the trailing
|
|
55
|
+
* help / reopen icon-buttons. Used by RecordsAdminShell for its stats strip;
|
|
56
|
+
* standalone apps rarely need it.
|
|
57
|
+
*/
|
|
58
|
+
aside?: ReactNode;
|
|
59
|
+
/**
|
|
60
|
+
* Optional dismissible intro card rendered below the header row.
|
|
61
|
+
* See {@link AdminPageHeaderIntro}.
|
|
62
|
+
*/
|
|
63
|
+
intro?: AdminPageHeaderIntro;
|
|
64
|
+
/** Extra class on the root container for layout overrides. */
|
|
65
|
+
className?: string;
|
|
66
|
+
}
|
|
67
|
+
declare function AdminPageHeader({ title, subtitle, icon, helpUrl, helpLabel, actions, aside, intro, className, }: AdminPageHeaderProps): react_jsx_runtime.JSX.Element;
|
|
10
68
|
|
|
11
69
|
/** Merge Tailwind classes with clsx — same pattern as shadcn/ui */
|
|
12
70
|
declare function cn(...inputs: ClassValue[]): string;
|
|
13
71
|
|
|
14
|
-
export { cn };
|
|
72
|
+
export { AdminPageHeader, type AdminPageHeaderIntro, type AdminPageHeaderIntroTone, type AdminPageHeaderProps, cn };
|
package/dist/index.js
CHANGED
|
@@ -2,6 +2,7 @@ export { ASSET_MIME_FILTERS, AssetPicker, useAssets } from './chunk-2IQEDRSZ.js'
|
|
|
2
2
|
export { ConditionsEditor } from './chunk-7UBXTFZQ.js';
|
|
3
3
|
export { IconPicker } from './chunk-JQPS5XPJ.js';
|
|
4
4
|
export { CATEGORY_FALLBACKS, CATEGORY_LABELS, FontPicker, GOOGLE_FONTS_CATALOG, getGoogleFontUrl } from './chunk-OTJV62XV.js';
|
|
5
|
+
export { AdminPageHeader } from './chunk-2MW54ZVG.js';
|
|
5
6
|
import { assertStylesLoaded } from './chunk-OLYC54YT.js';
|
|
6
7
|
import './chunk-5UQQYXCX.js';
|
|
7
8
|
import './chunk-S27GIYV7.js';
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAOA,kBAAA,EAAmB","file":"index.js","sourcesContent":["// =============================================================================\r\n// @proveanything/smartlinks-ui\r\n// =============================================================================\r\n\r\n// Pre-compiled Tailwind utilities — tsup processes this through PostCSS\r\nimport './styles.css';\r\nimport { assertStylesLoaded } from './utils/assertStylesLoaded';\r\nassertStylesLoaded();\r\n\r\n// --- Asset Picker ---\r\nexport { AssetPicker, useAssets } from './components/AssetPicker';\r\nexport type {\r\n AssetPickerProps,\r\n AssetPickerMode,\r\n AssetScope,\r\n AssetPickerSelection,\r\n AssetItem,\r\n AssetViewMode,\r\n AssetMimeFilter,\r\n} from './components/AssetPicker/types';\r\nexport { ASSET_MIME_FILTERS } from './components/AssetPicker/types';\r\n\r\n// --- Admin Page Header ---\r\nexport { AdminPageHeader } from './components/AdminPageHeader';\r\nexport type {\r\n AdminPageHeaderProps,\r\n AdminPageHeaderIntro,\r\n AdminPageHeaderIntroTone,\r\n} from './components/AdminPageHeader';\r\n\r\n// --- Conditions Editor ---\r\nexport { ConditionsEditor } from './components/ConditionsEditor';\r\nexport type {\r\n ConditionsEditorProps,\r\n Condition,\r\n ConditionGroup,\r\n ConditionType,\r\n ConditionTypeMeta,\r\n SelectOption,\r\n VersionOption,\r\n} from './components/ConditionsEditor/types';\r\n\r\n// --- Facet Rule Editor (records targeting) ---\r\nexport { FacetRuleEditor } from './components/FacetRuleEditor';\r\nexport type {\r\n FacetRuleEditorProps,\r\n FacetRule,\r\n FacetRuleClause,\r\n} from './components/FacetRuleEditor/types';\r\n\r\n// --- Icon Picker ---\r\nexport { IconPicker } from './components/IconPicker';\r\nexport type {\r\n IconPickerProps,\r\n IconSelection,\r\n} from './components/IconPicker/types';\r\n\r\n// --- Font Picker ---\r\nexport { FontPicker } from './components/FontPicker';\r\nexport type {\r\n FontPickerProps,\r\n FontSelection,\r\n FontSource,\r\n FontCategory,\r\n FontWeight,\r\n FontEntry,\r\n FontScope,\r\n} from './components/FontPicker/types';\r\nexport { GOOGLE_FONTS_CATALOG, getGoogleFontUrl, CATEGORY_LABELS, CATEGORY_FALLBACKS } from './components/FontPicker/google-fonts';\r\n\r\n// --- Shared utilities ---\r\nexport { cn } from './utils/cn';\r\n"]}
|
|
@@ -202,4 +202,4 @@ interface UseAssetsReturn {
|
|
|
202
202
|
}
|
|
203
203
|
declare function useAssets({ scope, accept, pageSize, appId, listAppId }: UseAssetsOptions): UseAssetsReturn;
|
|
204
204
|
|
|
205
|
-
export {
|
|
205
|
+
export { type AssetItem as A, AssetPicker as a, type AssetPickerMode as b, type AssetPickerProps as c, type AssetPickerSelection as d, type AssetScope as e, type AssetViewMode as f, ASSET_MIME_FILTERS as g, type AssetMimeFilter as h, useAssets as u };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@proveanything/smartlinks-utils-ui",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.8",
|
|
4
4
|
"description": "Reusable React components for SmartLinks microapps — Asset Picker, Conditions Editor, Icon Picker, and more.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|