@proveanything/smartlinks-utils-ui 0.12.5 → 0.12.7
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/chunk-WCUKTVWC.js +382 -0
- package/dist/chunk-WCUKTVWC.js.map +1 -0
- package/dist/components/AssetPicker/index.css +9 -2
- package/dist/components/AssetPicker/index.css.map +1 -1
- package/dist/components/ConditionsEditor/index.css +9 -2
- package/dist/components/ConditionsEditor/index.css.map +1 -1
- package/dist/components/ConditionsEditor/index.js +1 -1
- package/dist/components/FontPicker/index.css +9 -2
- package/dist/components/FontPicker/index.css.map +1 -1
- package/dist/components/IconPicker/index.css +9 -2
- package/dist/components/IconPicker/index.css.map +1 -1
- package/dist/components/LinkPicker/index.css +3989 -0
- package/dist/components/LinkPicker/index.css.map +1 -0
- package/dist/components/LinkPicker/index.d.ts +131 -0
- package/dist/components/LinkPicker/index.js +6 -0
- package/dist/components/LinkPicker/index.js.map +1 -0
- package/dist/components/RecordsAdmin/index.css +9 -2
- package/dist/components/RecordsAdmin/index.css.map +1 -1
- package/dist/components/RecordsAdmin/index.d.ts +37 -2
- package/dist/components/RecordsAdmin/index.js +406 -127
- package/dist/components/RecordsAdmin/index.js.map +1 -1
- package/dist/index.css +9 -2
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/package.json +5 -1
package/dist/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { ReactNode } from 'react';
|
|
|
4
4
|
export { ConditionsEditor } from './components/ConditionsEditor/index.js';
|
|
5
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';
|
|
6
6
|
export { FacetRuleEditor, FacetRuleEditorProps } from './components/FacetRuleEditor/index.js';
|
|
7
|
+
export { AppLinkTarget, DeepLinkTarget, DiscoveredApp, ExternalLinkTarget, LinkKind, LinkOpenTarget, LinkPicker, LinkPickerProps, LinkTarget, LinkableEntry, ResolveLinkContext, ResolvedLink, UseLinkTargetsOptions, UseLinkTargetsReturn, resolveLink, useLinkTargets } from './components/LinkPicker/index.js';
|
|
7
8
|
export { b as IconPicker, c as IconPickerProps, d as IconSelection } from './IconPicker-nhY3wWlB.js';
|
|
8
9
|
export { CATEGORY_FALLBACKS, CATEGORY_LABELS, FontCategory, FontEntry, FontPicker, FontPickerProps, FontScope, FontSelection, FontSource, FontWeight, GOOGLE_FONTS_CATALOG, getGoogleFontUrl } from './components/FontPicker/index.js';
|
|
9
10
|
import { ClassValue } from 'clsx';
|
package/dist/index.js
CHANGED
|
@@ -4,11 +4,12 @@ export { IconPicker } from './chunk-JQPS5XPJ.js';
|
|
|
4
4
|
export { CATEGORY_FALLBACKS, CATEGORY_LABELS, FontPicker, GOOGLE_FONTS_CATALOG, getGoogleFontUrl } from './chunk-OTJV62XV.js';
|
|
5
5
|
import { useHintsPreference } from './chunk-3RRHM4LP.js';
|
|
6
6
|
export { AdminPageHeader, HINTS_PREFS_APP_ID, HINTS_PREFS_KEY, useHintsPreference, useIntroState } from './chunk-3RRHM4LP.js';
|
|
7
|
-
import { assertStylesLoaded } from './chunk-OLYC54YT.js';
|
|
8
|
-
import './chunk-5UQQYXCX.js';
|
|
9
7
|
import './chunk-S27GIYV7.js';
|
|
10
8
|
export { FacetRuleEditor } from './chunk-JMCV6FOW.js';
|
|
11
9
|
import './chunk-4LHF5JB7.js';
|
|
10
|
+
export { LinkPicker, resolveLink, useLinkTargets } from './chunk-WCUKTVWC.js';
|
|
11
|
+
import { assertStylesLoaded } from './chunk-OLYC54YT.js';
|
|
12
|
+
import './chunk-5UQQYXCX.js';
|
|
12
13
|
export { cn } from './chunk-L7FQ52F5.js';
|
|
13
14
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
14
15
|
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/hints/HintsPreferenceToggle.tsx","../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/hints/HintsPreferenceToggle.tsx","../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAmBO,SAAS,qBAAA,CAAsB;AAAA,EACpC,EAAA;AAAA,EAAI,KAAA,GAAQ,kBAAA;AAAA,EAAoB,WAAA;AAAA,EAAa;AAC/C,CAAA,EAA+B;AAC7B,EAAA,MAAM,EAAE,SAAA,EAAW,YAAA,EAAc,SAAA,EAAU,GAAI,mBAAmB,EAAE,CAAA;AACpE,EAAA,uBACE,IAAA,CAAC,OAAA,EAAA,EAAM,SAAA,EAAsB,KAAA,EAAO,EAAE,OAAA,EAAS,MAAA,EAAQ,UAAA,EAAY,YAAA,EAAc,GAAA,EAAK,QAAA,EAAU,MAAA,EAAQ,WAAU,EAChH,QAAA,EAAA;AAAA,oBAAA,GAAA;AAAA,MAAC,OAAA;AAAA,MAAA;AAAA,QACC,IAAA,EAAK,UAAA;AAAA,QACL,OAAA,EAAS,SAAA;AAAA,QACT,QAAA,EAAU,SAAA;AAAA,QACV,QAAA,EAAU,CAAC,CAAA,KAAM;AAAE,UAAA,KAAK,YAAA,CAAa,CAAA,CAAE,MAAA,CAAO,OAAO,CAAA;AAAA,QAAG,CAAA;AAAA,QACxD,KAAA,EAAO,EAAE,SAAA,EAAW,QAAA;AAAS;AAAA,KAC/B;AAAA,yBACC,MAAA,EAAA,EACC,QAAA,EAAA;AAAA,sBAAA,GAAA,CAAC,UAAK,KAAA,EAAO,EAAE,UAAA,EAAY,GAAA,IAAQ,QAAA,EAAA,KAAA,EAAM,CAAA;AAAA,MACxC,WAAA,mBACC,GAAA,CAAC,MAAA,EAAA,EAAK,KAAA,EAAO,EAAE,OAAA,EAAS,OAAA,EAAS,QAAA,EAAU,QAAA,EAAU,OAAA,EAAS,GAAA,EAAI,EAAI,uBAAY,CAAA,GAChF;AAAA,KAAA,EACN;AAAA,GAAA,EACF,CAAA;AAEJ;;;ACjCA,kBAAA,EAAmB","file":"index.js","sourcesContent":["// =============================================================================\r\n// HintsPreferenceToggle\r\n//\r\n// Tiny opt-in component that flips the global `prefs.showHints` flag on the\r\n// user record. Drop into any settings/account surface — the value affects\r\n// every SmartLinks admin app the user opens, no per-app wiring required.\r\n// =============================================================================\r\nimport { useHintsPreference } from './useHintsPreference';\r\n\r\nexport interface HintsPreferenceToggleProps {\r\n /** SmartLinks SDK namespace (`* as SL from '@proveanything/smartlinks'`). */\r\n SL: any;\r\n /** Visible label. Default: \"Show inline help\". */\r\n label?: string;\r\n /** Optional helper line under the label. */\r\n description?: string;\r\n className?: string;\r\n}\r\n\r\nexport function HintsPreferenceToggle({\r\n SL, label = 'Show inline help', description, className,\r\n}: HintsPreferenceToggleProps) {\r\n const { showHints, setShowHints, isLoading } = useHintsPreference(SL);\r\n return (\r\n <label className={className} style={{ display: 'flex', alignItems: 'flex-start', gap: '0.5rem', cursor: 'pointer' }}>\r\n <input\r\n type=\"checkbox\"\r\n checked={showHints}\r\n disabled={isLoading}\r\n onChange={(e) => { void setShowHints(e.target.checked); }}\r\n style={{ marginTop: '0.2rem' }}\r\n />\r\n <span>\r\n <span style={{ fontWeight: 500 }}>{label}</span>\r\n {description ? (\r\n <span style={{ display: 'block', fontSize: '0.85em', opacity: 0.7 }}>{description}</span>\r\n ) : null}\r\n </span>\r\n </label>\r\n );\r\n}\r\n","// =============================================================================\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// --- Hints (global user preference + per-browser dismiss) ---\r\nexport {\r\n useHintsPreference, useIntroState, HintsPreferenceToggle,\r\n HINTS_PREFS_APP_ID, HINTS_PREFS_KEY,\r\n} from './hints';\r\nexport type {\r\n UseHintsPreferenceResult, UseIntroStateArgs, UseIntroStateResult,\r\n HintsPreferenceToggleProps,\r\n} from './hints';\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// --- Link Picker (universal link/app/deep-link) ---\r\nexport { LinkPicker, useLinkTargets, resolveLink } from './components/LinkPicker';\r\nexport type {\r\n LinkPickerProps,\r\n LinkTarget,\r\n LinkKind,\r\n LinkOpenTarget,\r\n ExternalLinkTarget,\r\n AppLinkTarget,\r\n DeepLinkTarget,\r\n LinkableEntry,\r\n DiscoveredApp,\r\n UseLinkTargetsOptions,\r\n UseLinkTargetsReturn,\r\n ResolveLinkContext,\r\n ResolvedLink,\r\n} from './components/LinkPicker';\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"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@proveanything/smartlinks-utils-ui",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.7",
|
|
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",
|
|
@@ -35,6 +35,10 @@
|
|
|
35
35
|
"./facet-rule-editor": {
|
|
36
36
|
"types": "./dist/components/FacetRuleEditor/index.d.ts",
|
|
37
37
|
"import": "./dist/components/FacetRuleEditor/index.js"
|
|
38
|
+
},
|
|
39
|
+
"./link-picker": {
|
|
40
|
+
"types": "./dist/components/LinkPicker/index.d.ts",
|
|
41
|
+
"import": "./dist/components/LinkPicker/index.js"
|
|
38
42
|
}
|
|
39
43
|
},
|
|
40
44
|
"sideEffects": [
|