@bridge-ui/vue 0.0.6 → 0.0.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/ai/AGENTS.md +31 -0
- package/ai/README.md +35 -0
- package/ai/guidelines/core.md +44 -0
- package/ai/llms.txt +38 -0
- package/ai/skills/bridge-ui-components/SKILL.md +37 -0
- package/ai/skills/bridge-ui-forms/SKILL.md +38 -0
- package/ai/skills/bridge-ui-overlays/SKILL.md +37 -0
- package/ai/skills/bridge-ui-setup/SKILL.md +38 -0
- package/bin/__tests__/ai.test.ts +319 -0
- package/bin/ai.mjs +469 -0
- package/dist/Actions/Snackbar/BridgeSnackbarAction.vue_vue_type_script_setup_true_lang.js +8 -8
- package/dist/Actions/Snackbar/BridgeSnackbarHost.vue_vue_type_script_setup_true_lang.js +5 -5
- package/dist/Actions/Snackbar/createBridgeSnackbarApi.js +17 -17
- package/dist/Adapters/I18n/index.d.ts +1 -1
- package/dist/Adapters/I18n/index.js +2 -2
- package/dist/Adapters/I18n/useI18nAdapter.d.ts +7 -3
- package/dist/Adapters/I18n/useI18nAdapter.js +12 -7
- package/dist/Adapters/Icon/useIconAdapter.d.ts +1 -1
- package/dist/Adapters/index.d.ts +1 -1
- package/dist/Adapters/index.js +3 -3
- package/dist/Components/Alert/composables/useAlert.js +17 -17
- package/dist/Components/Autocomplete/Autocomplete.js +5 -0
- package/dist/Components/Autocomplete/Autocomplete.vue.d.ts +40 -0
- package/dist/Components/Autocomplete/Autocomplete.vue_vue_type_script_setup_true_lang.js +197 -0
- package/dist/Components/Autocomplete/AutocompleteOption.js +5 -0
- package/dist/Components/Autocomplete/AutocompleteOption.vue.d.ts +4 -0
- package/dist/Components/Autocomplete/AutocompleteOption.vue_vue_type_script_setup_true_lang.js +32 -0
- package/dist/Components/Autocomplete/autocomplete.types.d.ts +285 -0
- package/dist/Components/Autocomplete/autocompleteInjectionKey.d.ts +7 -0
- package/dist/Components/Autocomplete/autocompleteInjectionKey.js +4 -0
- package/dist/Components/Autocomplete/composables/useAutocomplete.d.ts +763 -0
- package/dist/Components/Autocomplete/composables/useAutocomplete.js +386 -0
- package/dist/Components/Autocomplete/index.d.ts +4 -0
- package/dist/Components/Autocomplete/index.js +4 -0
- package/dist/Components/Avatar/composables/useAvatar.d.ts +1 -1
- package/dist/Components/Avatar/composables/useAvatar.js +13 -13
- package/dist/Components/Badge/composables/useBadge.js +8 -8
- package/dist/Components/BaseField/BaseField.js +5 -0
- package/dist/Components/BaseField/BaseField.vue.d.ts +15 -0
- package/dist/Components/BaseField/BaseField.vue_vue_type_script_setup_true_lang.js +41 -0
- package/dist/Components/BaseField/BaseFieldLabel.js +5 -0
- package/dist/Components/BaseField/BaseFieldLabel.vue.d.ts +7 -0
- package/dist/Components/BaseField/BaseFieldLabel.vue_vue_type_script_setup_true_lang.js +16 -0
- package/dist/Components/BaseField/baseField.types.d.ts +222 -0
- package/dist/Components/BaseField/composables/useBaseField.d.ts +55 -0
- package/dist/Components/BaseField/composables/useBaseField.js +131 -0
- package/dist/Components/BaseField/index.d.ts +4 -0
- package/dist/Components/BaseField/index.js +3 -0
- package/dist/Components/Button/composables/useButton.d.ts +1 -1
- package/dist/Components/Button/composables/useButton.js +14 -14
- package/dist/Components/Card/composables/useCard.js +27 -27
- package/dist/Components/Checkbox/Checkbox.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/Components/Checkbox/composables/useCheckbox.d.ts +3 -3
- package/dist/Components/Checkbox/composables/useCheckbox.js +9 -9
- package/dist/Components/Chip/Chip.vue.d.ts +1 -1
- package/dist/Components/Chip/composables/useChip.d.ts +1 -1
- package/dist/Components/Chip/composables/useChip.js +6 -6
- package/dist/Components/Divider/composables/useDivider.js +5 -5
- package/dist/Components/Drawer/Drawer.vue.d.ts +2 -2
- package/dist/Components/Drawer/composables/useDrawer.d.ts +1 -1
- package/dist/Components/Drawer/composables/useDrawer.js +23 -23
- package/dist/Components/FormControl/FormControl.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/Components/FormControl/composables/useFormControl.d.ts +13 -4
- package/dist/Components/FormControl/composables/useFormControl.js +63 -59
- package/dist/Components/FormControl/formControl.types.d.ts +6 -6
- package/dist/Components/FormControl/index.d.ts +1 -1
- package/dist/Components/FormField/FilledFormField.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/Components/FormField/NotchedFormField.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/Components/FormField/OutlinedFormField.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/Components/FormField/StackedFormField.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/Components/FormField/UnderlinedFormField.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/Components/FormField/composables/useFormField.d.ts +7 -3
- package/dist/Components/FormField/composables/useFormField.js +29 -29
- package/dist/Components/FormField/formField.types.d.ts +14 -14
- package/dist/Components/Icon/composables/useIcon.js +5 -5
- package/dist/Components/Label/composables/useLabel.js +5 -5
- package/dist/Components/Link/composables/useLink.js +9 -9
- package/dist/Components/List/composables/useList.js +6 -6
- package/dist/Components/ListItem/ListItem.vue.d.ts +1 -1
- package/dist/Components/ListItem/composables/useListItem.d.ts +1 -1
- package/dist/Components/ListItem/composables/useListItem.js +20 -20
- package/dist/Components/ListSection/composables/useListSection.js +8 -8
- package/dist/Components/Listbox/Listbox.vue.d.ts +3 -3
- package/dist/Components/Listbox/Listbox.vue_vue_type_script_setup_true_lang.js +29 -28
- package/dist/Components/Listbox/composables/useListbox.d.ts +10 -1
- package/dist/Components/Listbox/composables/useListbox.js +23 -23
- package/dist/Components/Listbox/index.d.ts +1 -0
- package/dist/Components/Listbox/index.js +3 -3
- package/dist/Components/Listbox/listbox.types.d.ts +6 -0
- package/dist/Components/Menu/Menu.vue.d.ts +2 -2
- package/dist/Components/Menu/composables/useMenu.js +43 -43
- package/dist/Components/Modal/Modal.vue.d.ts +2 -2
- package/dist/Components/Modal/composables/useModal.d.ts +1 -1
- package/dist/Components/Modal/composables/useModal.js +18 -18
- package/dist/Components/NumberField/NumberField.vue.d.ts +2 -2
- package/dist/Components/NumberField/NumberField.vue_vue_type_script_setup_true_lang.js +34 -34
- package/dist/Components/NumberField/composables/useNumberField.d.ts +4 -4
- package/dist/Components/NumberField/composables/useNumberField.js +13 -10
- package/dist/Components/OtpField/OtpField.js +5 -0
- package/dist/Components/OtpField/OtpField.vue.d.ts +31 -0
- package/dist/Components/OtpField/OtpField.vue_vue_type_script_setup_true_lang.js +62 -0
- package/dist/Components/OtpField/composables/useOtpField.d.ts +287 -0
- package/dist/Components/OtpField/composables/useOtpField.js +154 -0
- package/dist/Components/OtpField/index.d.ts +4 -0
- package/dist/Components/OtpField/index.js +3 -0
- package/dist/Components/OtpField/otpField.types.d.ts +120 -0
- package/dist/Components/PasswordField/PasswordField.vue_vue_type_script_setup_true_lang.js +23 -23
- package/dist/Components/PasswordField/composables/usePasswordField.d.ts +4 -4
- package/dist/Components/PasswordField/composables/usePasswordField.js +6 -3
- package/dist/Components/Progress/composables/useProgress.js +11 -11
- package/dist/Components/Radio/Radio.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/Components/Radio/composables/useRadio.d.ts +3 -3
- package/dist/Components/Radio/composables/useRadio.js +9 -9
- package/dist/Components/Select/Select.vue.d.ts +5 -5
- package/dist/Components/Select/Select.vue_vue_type_script_setup_true_lang.js +16 -13
- package/dist/Components/Select/composables/useSelect.d.ts +5 -4
- package/dist/Components/Select/composables/useSelect.js +167 -163
- package/dist/Components/Skeleton/composables/useSkeleton.js +5 -5
- package/dist/Components/Slider/Slider.js +5 -0
- package/dist/Components/Slider/Slider.vue.d.ts +25 -0
- package/dist/Components/Slider/Slider.vue_vue_type_script_setup_true_lang.js +113 -0
- package/dist/Components/Slider/composables/useSlider.d.ts +482 -0
- package/dist/Components/Slider/composables/useSlider.js +287 -0
- package/dist/Components/Slider/index.d.ts +4 -0
- package/dist/Components/Slider/index.js +3 -0
- package/dist/Components/Slider/slider.types.d.ts +169 -0
- package/dist/Components/Snackbar/Snackbar.vue.d.ts +2 -2
- package/dist/Components/Snackbar/Snackbar.vue_vue_type_script_setup_true_lang.js +54 -54
- package/dist/Components/Snackbar/composables/useSnackbar.js +115 -115
- package/dist/Components/Spinner/composables/useSpinner.js +11 -11
- package/dist/Components/Switch/Switch.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/Components/Switch/composables/useSwitch.d.ts +3 -3
- package/dist/Components/Switch/composables/useSwitch.js +9 -9
- package/dist/Components/Tab/composables/useTab.js +11 -11
- package/dist/Components/TabList/composables/useTabList.js +7 -7
- package/dist/Components/TabPanel/composables/useTabPanel.js +7 -7
- package/dist/Components/Tabs/Tabs.vue.d.ts +2 -2
- package/dist/Components/Tabs/composables/useTabs.js +22 -22
- package/dist/Components/TextField/TextField.vue.d.ts +1 -1
- package/dist/Components/TextField/TextField.vue_vue_type_script_setup_true_lang.js +6 -6
- package/dist/Components/TextField/composables/useTextField.d.ts +4 -4
- package/dist/Components/TextField/composables/useTextField.js +2 -2
- package/dist/Components/Textarea/Textarea.vue.d.ts +1 -1
- package/dist/Components/Textarea/Textarea.vue_vue_type_script_setup_true_lang.js +6 -6
- package/dist/Components/Textarea/composables/useTextarea.d.ts +4 -4
- package/dist/Components/Textarea/composables/useTextarea.js +10 -9
- package/dist/Components/Tooltip/composables/useTooltip.js +17 -17
- package/dist/Provider/bridgeUITypes.d.ts +4 -1
- package/dist/Provider/createBridgeUIApi.js +13 -1
- package/dist/Utils/index.d.ts +3 -3
- package/dist/Utils/index.js +11 -8
- package/dist/Utils/useBreakpoint.js +7 -7
- package/dist/augments.d.ts +29 -17
- package/dist/index.d.ts +11 -3
- package/dist/index.js +88 -80
- package/docs/README.md +56 -0
- package/docs/components/Alert.md +96 -0
- package/docs/components/Autocomplete.md +198 -0
- package/docs/components/Avatar.md +60 -0
- package/docs/components/Badge.md +47 -0
- package/docs/components/BaseField.md +126 -0
- package/docs/components/BridgeUIProvider.md +151 -0
- package/docs/components/Button.md +93 -0
- package/docs/components/Card.md +287 -0
- package/docs/components/Checkbox.md +87 -0
- package/docs/components/Divider.md +56 -0
- package/docs/components/Drawer.md +137 -0
- package/docs/components/FormControl.md +66 -0
- package/docs/components/FormField.md +71 -0
- package/docs/components/I18n.md +125 -0
- package/docs/components/Icon.md +88 -0
- package/docs/components/Label.md +31 -0
- package/docs/components/Link.md +71 -0
- package/docs/components/List.md +167 -0
- package/docs/components/Menu.md +97 -0
- package/docs/components/Modal.md +154 -0
- package/docs/components/NumberField.md +80 -0
- package/docs/components/OtpField.md +133 -0
- package/docs/components/PasswordField.md +82 -0
- package/docs/components/Progress.md +68 -0
- package/docs/components/Radio.md +91 -0
- package/docs/components/Select.md +181 -0
- package/docs/components/Skeleton.md +38 -0
- package/docs/components/Slider.md +140 -0
- package/docs/components/Snackbar.md +99 -0
- package/docs/components/Spinner.md +61 -0
- package/docs/components/Switch.md +72 -0
- package/docs/components/Tabs.md +207 -0
- package/docs/components/TextField.md +72 -0
- package/docs/components/Textarea.md +80 -0
- package/docs/components/Tooltip.md +125 -0
- package/docs/components/useBreakpoint.md +100 -0
- package/docs/components/useDialogAction.md +97 -0
- package/docs/components/useDrawerAction.md +75 -0
- package/docs/components/useModalAction.md +75 -0
- package/docs/components/useSnackbarAction.md +85 -0
- package/docs/examples/i18n-dictionary.ts +48 -0
- package/docs/examples/i18n-vue-i18n.ts +34 -0
- package/docs/examples/icon-fontawesome.ts +112 -0
- package/docs/examples/icon-heroicons.ts +57 -0
- package/docs/examples/icon-lucide.ts +57 -0
- package/docs/examples/icon-phosphor.ts +57 -0
- package/docs/examples/icon-tabler.ts +57 -0
- package/package.json +13 -5
package/bin/ai.mjs
ADDED
|
@@ -0,0 +1,469 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Install Bridge UI agent guidelines, docs, and skills into a consumer app.
|
|
4
|
+
*
|
|
5
|
+
* Usage:
|
|
6
|
+
* npx bridge-ui-vue-ai install|remove [--copy] [--cwd <dir>]
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import {
|
|
10
|
+
cpSync,
|
|
11
|
+
existsSync,
|
|
12
|
+
lstatSync,
|
|
13
|
+
mkdirSync,
|
|
14
|
+
readdirSync,
|
|
15
|
+
readFileSync,
|
|
16
|
+
readlinkSync,
|
|
17
|
+
realpathSync,
|
|
18
|
+
rmdirSync,
|
|
19
|
+
rmSync,
|
|
20
|
+
symlinkSync,
|
|
21
|
+
writeFileSync,
|
|
22
|
+
} from "node:fs";
|
|
23
|
+
import { dirname, join, relative, resolve } from "node:path";
|
|
24
|
+
import { fileURLToPath } from "node:url";
|
|
25
|
+
|
|
26
|
+
// ---------------------------------------------------------------------------
|
|
27
|
+
// Package context
|
|
28
|
+
// ---------------------------------------------------------------------------
|
|
29
|
+
|
|
30
|
+
const packageRoot = resolve(dirname(fileURLToPath(import.meta.url)), "..");
|
|
31
|
+
const pkg = JSON.parse(readFileSync(join(packageRoot, "package.json"), "utf8"));
|
|
32
|
+
|
|
33
|
+
const packageName = pkg.name;
|
|
34
|
+
const aiRoot = join(packageRoot, "ai");
|
|
35
|
+
const docsRoot = join(packageRoot, "docs");
|
|
36
|
+
const binName = Object.keys(pkg.bin ?? {})[0] ?? "bridge-ui-ai";
|
|
37
|
+
|
|
38
|
+
const MARK_END = "<!-- bridge-ui-ai:end -->";
|
|
39
|
+
const MARK_START = "<!-- bridge-ui-ai:start -->";
|
|
40
|
+
const MARK_BLOCK = new RegExp(`${MARK_START}[\\s\\S]*?${MARK_END}`, "m");
|
|
41
|
+
const MARK_BLOCK_PADDED = new RegExp(
|
|
42
|
+
`\\n*${MARK_START}[\\s\\S]*?${MARK_END}\\n*`,
|
|
43
|
+
"m",
|
|
44
|
+
);
|
|
45
|
+
|
|
46
|
+
/** Paths linked/copied into the consumer app (relative dest → absolute source). */
|
|
47
|
+
function installTargets() {
|
|
48
|
+
return [
|
|
49
|
+
{ dest: ".ai/docs", src: docsRoot },
|
|
50
|
+
{ dest: "llms.txt", src: join(aiRoot, "llms.txt") },
|
|
51
|
+
{ dest: ".ai/AGENTS.md", src: join(aiRoot, "AGENTS.md") },
|
|
52
|
+
{ dest: ".ai/guidelines", src: join(aiRoot, "guidelines") },
|
|
53
|
+
].filter(({ src }) => existsSync(src));
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
function skillTargets() {
|
|
57
|
+
const skillsDir = join(aiRoot, "skills");
|
|
58
|
+
|
|
59
|
+
if (!existsSync(skillsDir)) return [];
|
|
60
|
+
|
|
61
|
+
return readdirSync(skillsDir, { withFileTypes: true })
|
|
62
|
+
.filter((entry) => entry.isDirectory())
|
|
63
|
+
.map((entry) => entry.name)
|
|
64
|
+
.sort()
|
|
65
|
+
.map((name) => ({
|
|
66
|
+
dest: join(".cursor", "skills", name),
|
|
67
|
+
src: join(skillsDir, name),
|
|
68
|
+
}));
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// ---------------------------------------------------------------------------
|
|
72
|
+
// CLI
|
|
73
|
+
// ---------------------------------------------------------------------------
|
|
74
|
+
|
|
75
|
+
function printHelp() {
|
|
76
|
+
console.log(`Usage: ${binName} <command> [options]
|
|
77
|
+
|
|
78
|
+
Commands:
|
|
79
|
+
install Link (or copy) AI guidelines, docs, and skills into the app
|
|
80
|
+
remove Remove links/copies created by install
|
|
81
|
+
help Show this help
|
|
82
|
+
|
|
83
|
+
Options:
|
|
84
|
+
--copy Copy files instead of symlinking (Windows / PnP fallback)
|
|
85
|
+
--cwd App root (default: process.cwd())
|
|
86
|
+
`);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
function parseArgs(argv) {
|
|
90
|
+
const args = { command: "help", copy: false, cwd: process.cwd() };
|
|
91
|
+
|
|
92
|
+
for (let i = 0; i < argv.length; i++) {
|
|
93
|
+
const arg = argv[i];
|
|
94
|
+
|
|
95
|
+
if (arg === "--copy") {
|
|
96
|
+
args.copy = true;
|
|
97
|
+
} else if (arg === "--cwd") {
|
|
98
|
+
args.cwd = resolve(argv[++i] ?? process.cwd());
|
|
99
|
+
} else if (arg === "-h" || arg === "--help") {
|
|
100
|
+
args.command = "help";
|
|
101
|
+
} else if (!arg.startsWith("-") && args.command === "help") {
|
|
102
|
+
args.command = arg;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
return args;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
// ---------------------------------------------------------------------------
|
|
110
|
+
// Filesystem helpers
|
|
111
|
+
// ---------------------------------------------------------------------------
|
|
112
|
+
|
|
113
|
+
function pathExists(path) {
|
|
114
|
+
try {
|
|
115
|
+
lstatSync(path);
|
|
116
|
+
return true;
|
|
117
|
+
} catch {
|
|
118
|
+
return false;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
function removePath(path) {
|
|
123
|
+
if (!pathExists(path)) return;
|
|
124
|
+
|
|
125
|
+
rmSync(path, { recursive: true, force: true });
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
function linkTypeFor(target) {
|
|
129
|
+
if (lstatSync(target).isDirectory()) {
|
|
130
|
+
return process.platform === "win32" ? "junction" : "dir";
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
return "file";
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/** @returns {"linked" | "copied"} */
|
|
137
|
+
function linkOrCopy(target, dest, { copy }) {
|
|
138
|
+
mkdirSync(dirname(dest), { recursive: true });
|
|
139
|
+
removePath(dest);
|
|
140
|
+
|
|
141
|
+
if (!copy) {
|
|
142
|
+
try {
|
|
143
|
+
symlinkSync(target, dest, linkTypeFor(target));
|
|
144
|
+
return "linked";
|
|
145
|
+
} catch (err) {
|
|
146
|
+
console.warn(`Symlink failed (${err.message}); falling back to copy.`);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
cpSync(target, dest, { recursive: true });
|
|
151
|
+
|
|
152
|
+
return "copied";
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
function isSymlink(path) {
|
|
156
|
+
try {
|
|
157
|
+
return lstatSync(path).isSymbolicLink();
|
|
158
|
+
} catch {
|
|
159
|
+
return false;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
function resolvesUnder(path, root, fileName) {
|
|
164
|
+
if (!pathExists(path)) return false;
|
|
165
|
+
try {
|
|
166
|
+
const real = realpathSync(path);
|
|
167
|
+
|
|
168
|
+
return real === join(root, fileName) || real.startsWith(`${root}/`);
|
|
169
|
+
} catch {
|
|
170
|
+
return false;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
/** True when `path` is a real file whose contents match the package AGENTS.md. */
|
|
175
|
+
function isPackageAgentsCopy(path) {
|
|
176
|
+
const src = join(aiRoot, "AGENTS.md");
|
|
177
|
+
|
|
178
|
+
if (!existsSync(src) || !existsSync(path) || isSymlink(path)) {
|
|
179
|
+
return false;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
try {
|
|
183
|
+
return readFileSync(path, "utf8") === readFileSync(src, "utf8");
|
|
184
|
+
} catch {
|
|
185
|
+
return false;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
function removeEmptyDir(path) {
|
|
190
|
+
try {
|
|
191
|
+
rmdirSync(path);
|
|
192
|
+
return true;
|
|
193
|
+
} catch {
|
|
194
|
+
return false;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
function cleanupEmptyDirs(appRoot) {
|
|
199
|
+
const cleaned = [];
|
|
200
|
+
|
|
201
|
+
for (const rel of [".ai", join(".cursor", "skills"), ".cursor"]) {
|
|
202
|
+
if (removeEmptyDir(join(appRoot, rel))) {
|
|
203
|
+
cleaned.push(rel.replaceAll("\\", "/"));
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
return cleaned;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
function assertAiPresent() {
|
|
211
|
+
if (existsSync(aiRoot)) return;
|
|
212
|
+
console.error(`Missing AI resources in ${packageName}: expected ${aiRoot}`);
|
|
213
|
+
|
|
214
|
+
process.exit(1);
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
function logResults(title, results) {
|
|
218
|
+
console.log(title);
|
|
219
|
+
|
|
220
|
+
for (const { mode, dest } of results) {
|
|
221
|
+
console.log(` ${String(mode).padEnd(7)} ${dest}`);
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
// ---------------------------------------------------------------------------
|
|
226
|
+
// AGENTS.md / CLAUDE.md
|
|
227
|
+
// ---------------------------------------------------------------------------
|
|
228
|
+
|
|
229
|
+
function agentsSnippet(skills) {
|
|
230
|
+
const skillList = skills
|
|
231
|
+
.map(({ dest }) => `- \`${dest.replaceAll("\\", "/")}\``)
|
|
232
|
+
.join("\n");
|
|
233
|
+
|
|
234
|
+
return `${MARK_START}
|
|
235
|
+
## Bridge UI
|
|
236
|
+
|
|
237
|
+
This app uses **${packageName}**. Full agent guide: \`.ai/AGENTS.md\` (also see \`llms.txt\`).
|
|
238
|
+
|
|
239
|
+
- Docs: \`.ai/docs/\` (component API and examples)
|
|
240
|
+
- Guidelines: \`.ai/guidelines/core.md\`
|
|
241
|
+
- Skills (on demand):
|
|
242
|
+
${skillList}
|
|
243
|
+
|
|
244
|
+
Install/update: \`npx ${binName} install\`
|
|
245
|
+
${MARK_END}
|
|
246
|
+
`;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
function upsertAgentsMd(appRoot, skills) {
|
|
250
|
+
let next;
|
|
251
|
+
const snippet = agentsSnippet(skills);
|
|
252
|
+
const path = join(appRoot, "AGENTS.md");
|
|
253
|
+
|
|
254
|
+
// Never write through a symlink (would mutate package sources under file: installs).
|
|
255
|
+
if (isSymlink(path)) {
|
|
256
|
+
removePath(path);
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
if (!existsSync(path)) {
|
|
260
|
+
// Stub only — strip on remove deletes the file cleanly.
|
|
261
|
+
next = `${snippet.trimEnd()}\n`;
|
|
262
|
+
} else {
|
|
263
|
+
const prev = readFileSync(path, "utf8");
|
|
264
|
+
|
|
265
|
+
if (prev.includes(MARK_START) && prev.includes(MARK_END)) {
|
|
266
|
+
next = prev.replace(MARK_BLOCK, snippet.trimEnd());
|
|
267
|
+
} else {
|
|
268
|
+
next = `${prev.trimEnd()}\n\n${snippet}\n`;
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
writeFileSync(path, next.endsWith("\n") ? next : `${next}\n`);
|
|
273
|
+
return path;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
function stripAgentsMd(appRoot) {
|
|
277
|
+
const path = join(appRoot, "AGENTS.md");
|
|
278
|
+
|
|
279
|
+
if (!pathExists(path)) return null;
|
|
280
|
+
|
|
281
|
+
// Legacy installs that linked/copied the full package guide to the root.
|
|
282
|
+
if (isPackageAgentsCopy(path) || resolvesUnder(path, aiRoot, "AGENTS.md")) {
|
|
283
|
+
removePath(path);
|
|
284
|
+
return path;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
if (!existsSync(path)) return null;
|
|
288
|
+
|
|
289
|
+
const prev = readFileSync(path, "utf8");
|
|
290
|
+
|
|
291
|
+
if (!prev.includes(MARK_START)) return null;
|
|
292
|
+
|
|
293
|
+
const next = prev.replace(MARK_BLOCK_PADDED, "\n").trimEnd();
|
|
294
|
+
|
|
295
|
+
if (!next.trim()) {
|
|
296
|
+
rmSync(path, { force: true });
|
|
297
|
+
return path;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
writeFileSync(path, `${next}\n`);
|
|
301
|
+
|
|
302
|
+
return path;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
/**
|
|
306
|
+
* Root AGENTS.md is always a short stub (or inject into the app's own file).
|
|
307
|
+
* Full guide lives at `.ai/AGENTS.md` only.
|
|
308
|
+
*/
|
|
309
|
+
function installRootAgents(appRoot, skills) {
|
|
310
|
+
const dest = join(appRoot, "AGENTS.md");
|
|
311
|
+
const rel = relative(appRoot, dest);
|
|
312
|
+
|
|
313
|
+
// Legacy full-guide link/copy or foreign Bridge symlink → replace with stub.
|
|
314
|
+
if (
|
|
315
|
+
isSymlink(dest) ||
|
|
316
|
+
isPackageAgentsCopy(dest) ||
|
|
317
|
+
resolvesUnder(dest, aiRoot, "AGENTS.md")
|
|
318
|
+
) {
|
|
319
|
+
removePath(dest);
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
upsertAgentsMd(appRoot, skills);
|
|
323
|
+
|
|
324
|
+
return { dest: rel, mode: "updated" };
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
/** True when CLAUDE.md is our symlink/copy of the root AGENTS.md stub. */
|
|
328
|
+
function isClaudeBridgeManaged(appRoot, claudePath) {
|
|
329
|
+
const agents = join(appRoot, "AGENTS.md");
|
|
330
|
+
|
|
331
|
+
if (!pathExists(claudePath) || !pathExists(agents)) return false;
|
|
332
|
+
|
|
333
|
+
if (isSymlink(claudePath)) {
|
|
334
|
+
try {
|
|
335
|
+
return realpathSync(claudePath) === realpathSync(agents);
|
|
336
|
+
} catch {
|
|
337
|
+
try {
|
|
338
|
+
const target = readlinkSync(claudePath);
|
|
339
|
+
|
|
340
|
+
return resolve(dirname(claudePath), target) === agents;
|
|
341
|
+
} catch {
|
|
342
|
+
return false;
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
try {
|
|
348
|
+
return readFileSync(claudePath, "utf8") === readFileSync(agents, "utf8");
|
|
349
|
+
} catch {
|
|
350
|
+
return false;
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
function installClaudeMd(appRoot, { copy }) {
|
|
355
|
+
const dest = join(appRoot, "CLAUDE.md");
|
|
356
|
+
const agents = join(appRoot, "AGENTS.md");
|
|
357
|
+
|
|
358
|
+
if (!existsSync(agents)) return null;
|
|
359
|
+
|
|
360
|
+
// App already has its own CLAUDE.md → leave it alone.
|
|
361
|
+
if (pathExists(dest) && !isClaudeBridgeManaged(appRoot, dest)) {
|
|
362
|
+
return null;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
return {
|
|
366
|
+
dest: "CLAUDE.md",
|
|
367
|
+
mode: linkOrCopy(agents, dest, { copy }),
|
|
368
|
+
};
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
function stripClaudeMd(appRoot) {
|
|
372
|
+
const path = join(appRoot, "CLAUDE.md");
|
|
373
|
+
|
|
374
|
+
if (!isClaudeBridgeManaged(appRoot, path)) return null;
|
|
375
|
+
|
|
376
|
+
removePath(path);
|
|
377
|
+
return path;
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
// ---------------------------------------------------------------------------
|
|
381
|
+
// Commands
|
|
382
|
+
// ---------------------------------------------------------------------------
|
|
383
|
+
|
|
384
|
+
function install({ cwd: appRoot, copy }) {
|
|
385
|
+
assertAiPresent();
|
|
386
|
+
|
|
387
|
+
const results = [];
|
|
388
|
+
const skills = skillTargets();
|
|
389
|
+
|
|
390
|
+
for (const { src, dest } of [...installTargets(), ...skills]) {
|
|
391
|
+
results.push({
|
|
392
|
+
dest,
|
|
393
|
+
mode: linkOrCopy(src, join(appRoot, dest), { copy }),
|
|
394
|
+
});
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
results.push(installRootAgents(appRoot, skills));
|
|
398
|
+
|
|
399
|
+
const claude = installClaudeMd(appRoot, { copy });
|
|
400
|
+
|
|
401
|
+
if (claude) results.push(claude);
|
|
402
|
+
|
|
403
|
+
logResults(`Installed Bridge UI AI resources from ${packageName}`, results);
|
|
404
|
+
|
|
405
|
+
console.log(`\nPackage AI root: ${aiRoot}`);
|
|
406
|
+
|
|
407
|
+
try {
|
|
408
|
+
console.log(`Resolved: ${realpathSync(aiRoot)}`);
|
|
409
|
+
} catch {
|
|
410
|
+
/* ignore */
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
function remove({ cwd: appRoot }) {
|
|
415
|
+
const removed = [];
|
|
416
|
+
|
|
417
|
+
for (const { dest } of [...installTargets(), ...skillTargets()]) {
|
|
418
|
+
const absolute = join(appRoot, dest);
|
|
419
|
+
|
|
420
|
+
if (!pathExists(absolute)) continue;
|
|
421
|
+
|
|
422
|
+
removePath(absolute);
|
|
423
|
+
removed.push(dest);
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
// CLAUDE before AGENTS so content/realpath checks still resolve.
|
|
427
|
+
const claude = stripClaudeMd(appRoot);
|
|
428
|
+
const agents = stripAgentsMd(appRoot);
|
|
429
|
+
const emptyDirs = cleanupEmptyDirs(appRoot);
|
|
430
|
+
|
|
431
|
+
console.log(`Removed Bridge UI AI resources for ${packageName}`);
|
|
432
|
+
|
|
433
|
+
for (const path of removed) {
|
|
434
|
+
console.log(` removed ${path}`);
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
if (claude) {
|
|
438
|
+
console.log(` cleaned ${relative(appRoot, claude)}`);
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
if (agents) {
|
|
442
|
+
console.log(` cleaned ${relative(appRoot, agents)}`);
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
for (const dir of emptyDirs) {
|
|
446
|
+
console.log(` removed ${dir}/`);
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
// ---------------------------------------------------------------------------
|
|
451
|
+
// Entry
|
|
452
|
+
// ---------------------------------------------------------------------------
|
|
453
|
+
|
|
454
|
+
const args = parseArgs(process.argv.slice(2));
|
|
455
|
+
|
|
456
|
+
switch (args.command) {
|
|
457
|
+
case "install":
|
|
458
|
+
install(args);
|
|
459
|
+
break;
|
|
460
|
+
case "remove":
|
|
461
|
+
remove(args);
|
|
462
|
+
break;
|
|
463
|
+
case "help":
|
|
464
|
+
printHelp();
|
|
465
|
+
break;
|
|
466
|
+
default:
|
|
467
|
+
printHelp();
|
|
468
|
+
process.exitCode = 1;
|
|
469
|
+
}
|
|
@@ -2,8 +2,8 @@ import { mergeNestedComponentProps as e } from "../../Utils/index.js";
|
|
|
2
2
|
import t from "../../Components/Button/Button.js";
|
|
3
3
|
import n from "../../Components/Link/Link.js";
|
|
4
4
|
import { computed as r, createBlock as i, createTextVNode as a, defineComponent as o, mergeProps as s, openBlock as c, toDisplayString as l, unref as u, withCtx as d } from "vue";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { cn as f, snackbarRoundedProps as p } from "@bridge-ui/core";
|
|
6
|
+
import { get as m } from "es-toolkit/compat";
|
|
7
7
|
//#region src/Actions/Snackbar/BridgeSnackbarAction.vue?vue&type=script&setup=true&lang.ts
|
|
8
8
|
var h = /* @__PURE__ */ o({
|
|
9
9
|
__name: "BridgeSnackbarAction",
|
|
@@ -23,24 +23,24 @@ var h = /* @__PURE__ */ o({
|
|
|
23
23
|
let { onClick: e, ...t } = g.action.link;
|
|
24
24
|
return t;
|
|
25
25
|
}), x = r(() => {
|
|
26
|
-
let e =
|
|
27
|
-
return
|
|
26
|
+
let e = m(p, g.snackbarRounded ?? "lg"), t = m(e, "tr"), n = m(e, "br");
|
|
27
|
+
return m({
|
|
28
28
|
trailing: "mr-4 shrink-0",
|
|
29
|
-
"right-accept":
|
|
29
|
+
"right-accept": f({
|
|
30
30
|
"w-full rounded-none": !0,
|
|
31
31
|
[t ?? ""]: !0,
|
|
32
32
|
[n ?? ""]: !g.hasReject
|
|
33
33
|
}),
|
|
34
|
-
"right-reject":
|
|
34
|
+
"right-reject": f({
|
|
35
35
|
"w-full rounded-none": !0,
|
|
36
36
|
[n ?? ""]: !0,
|
|
37
37
|
[t ?? ""]: !g.hasAccept
|
|
38
38
|
})
|
|
39
39
|
}, g.layout, "");
|
|
40
|
-
}), S = r(() =>
|
|
40
|
+
}), S = r(() => f({
|
|
41
41
|
[x.value]: !0,
|
|
42
42
|
[g.action.className ?? ""]: !0
|
|
43
|
-
})), C = r(() => e(b.value, { classes: { root: S.value } })), w = r(() => e(g.action.button, { classes: { root:
|
|
43
|
+
})), C = r(() => e(b.value, { classes: { root: S.value } })), w = r(() => e(g.action.button, { classes: { root: f({
|
|
44
44
|
[S.value]: !0,
|
|
45
45
|
"w-full": g.layout === "right-accept" || g.layout === "right-reject"
|
|
46
46
|
}) } }));
|
|
@@ -3,8 +3,8 @@ import { BRIDGE_SNACKBAR_INJECTION_KEY as t } from "./bridgeSnackbarInjectionKey
|
|
|
3
3
|
import n from "./BridgeSnackbarItem.js";
|
|
4
4
|
import { createBridgeSnackbarApi as r } from "./createBridgeSnackbarApi.js";
|
|
5
5
|
import { Fragment as i, Teleport as a, computed as o, createBlock as s, createElementBlock as c, createElementVNode as l, defineComponent as u, inject as d, normalizeClass as f, openBlock as p, provide as m, renderList as h, renderSlot as g, unref as _ } from "vue";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
6
|
+
import { cn as v, mergeBridgeUILayeredClasses as y, snackbarPositionProps as b } from "@bridge-ui/core";
|
|
7
|
+
import { get as x } from "es-toolkit/compat";
|
|
8
8
|
//#region src/Actions/Snackbar/BridgeSnackbarHost.vue?vue&type=script&setup=true&lang.ts
|
|
9
9
|
var S = "[Bridge UI] Nested <BridgeSnackbarHost /> detected. useSnackbarAction() will target the nearest host only. Remove the extra host.", C = /* @__PURE__ */ u({
|
|
10
10
|
__name: "BridgeSnackbarHost",
|
|
@@ -26,17 +26,17 @@ var S = "[Bridge UI] Nested <BridgeSnackbarHost /> detected. useSnackbarAction()
|
|
|
26
26
|
timeout: C.timeout
|
|
27
27
|
}), T = e();
|
|
28
28
|
m(t, w);
|
|
29
|
-
let E = o(() => w.entries.value), D = o(() => T?.components.value.Snackbar), O = o(() => C.position ?? D.value?.defaultProps?.position ?? "bottom-center"), k = o(() =>
|
|
29
|
+
let E = o(() => w.entries.value), D = o(() => T?.components.value.Snackbar), O = o(() => C.position ?? D.value?.defaultProps?.position ?? "bottom-center"), k = o(() => x(y(b, D.value?.tokens?.position), O.value)), A = o(() => C.teleportTo === !1), j = o(() => C.teleportTo === !1 ? "body" : C.teleportTo), M = o(() => O.value.startsWith("top") ? "flex-col" : "flex-col-reverse");
|
|
30
30
|
return (e, t) => (p(), c(i, null, [g(e.$slots, "default"), (p(), s(a, {
|
|
31
31
|
to: j.value,
|
|
32
32
|
disabled: A.value
|
|
33
33
|
}, [l("div", {
|
|
34
34
|
"data-snackbar-host": "",
|
|
35
|
-
class: f(_(
|
|
35
|
+
class: f(_(v)({
|
|
36
36
|
"fixed inset-0 z-40 flex pointer-events-none px-4 py-6 sm:p-5 sm:pt-4": !0,
|
|
37
37
|
[k.value ?? ""]: !0
|
|
38
38
|
}))
|
|
39
|
-
}, [l("div", { class: f(_(
|
|
39
|
+
}, [l("div", { class: f(_(v)({
|
|
40
40
|
"flex w-full max-w-sm gap-y-2 pointer-events-auto": !0,
|
|
41
41
|
[M.value]: !0
|
|
42
42
|
})) }, [(p(!0), c(i, null, h(E.value, (e) => (p(), s(n, {
|
|
@@ -1,47 +1,47 @@
|
|
|
1
1
|
import { shallowRef as e } from "vue";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { closeAllLayers as t, closeLayer as n, closeTopLayer as r, createLayerId as i, createOpenLayerEntry as a, isLayerMounted as o, removeLayer as s, syncLayerShow as c, trimLayersToMax as l, updateLayerMerged as u } from "@bridge-ui/core";
|
|
3
|
+
import { isNil as d } from "es-toolkit/compat";
|
|
4
4
|
//#region src/Actions/Snackbar/createBridgeSnackbarApi.ts
|
|
5
5
|
function f(e, t) {
|
|
6
6
|
let { onClose: n, onClosed: r, ...i } = t;
|
|
7
|
-
return
|
|
7
|
+
return a(e, {
|
|
8
8
|
props: i,
|
|
9
9
|
onClose: n,
|
|
10
10
|
onClosed: r
|
|
11
11
|
});
|
|
12
12
|
}
|
|
13
|
-
function p(e,
|
|
14
|
-
return !
|
|
13
|
+
function p(e, t) {
|
|
14
|
+
return !d(e.duration) || d(t) ? e : {
|
|
15
15
|
...e,
|
|
16
|
-
duration:
|
|
16
|
+
duration: t
|
|
17
17
|
};
|
|
18
18
|
}
|
|
19
|
-
function m(
|
|
20
|
-
let { max:
|
|
19
|
+
function m(a = {}) {
|
|
20
|
+
let { max: d, timeout: m = 5e3 } = a, h = e([]);
|
|
21
21
|
function g(e) {
|
|
22
|
-
let t =
|
|
23
|
-
return
|
|
22
|
+
let t = i(), n = h.value;
|
|
23
|
+
return d != null && d > 0 && (n = l(n, d)), h.value = [...n, f(t, p(e, m))], t;
|
|
24
24
|
}
|
|
25
25
|
function _(e) {
|
|
26
|
-
h.value =
|
|
26
|
+
h.value = n(h.value, e);
|
|
27
27
|
}
|
|
28
28
|
function v() {
|
|
29
|
-
h.value =
|
|
29
|
+
h.value = r(h.value);
|
|
30
30
|
}
|
|
31
31
|
function y() {
|
|
32
|
-
h.value =
|
|
32
|
+
h.value = t(h.value);
|
|
33
33
|
}
|
|
34
34
|
function b(e) {
|
|
35
|
-
return
|
|
35
|
+
return o(h.value, e);
|
|
36
36
|
}
|
|
37
37
|
function x(e) {
|
|
38
|
-
h.value =
|
|
38
|
+
h.value = s(h.value, e);
|
|
39
39
|
}
|
|
40
40
|
function S(e, t) {
|
|
41
|
-
h.value =
|
|
41
|
+
h.value = u(h.value, e, t, ["props"]);
|
|
42
42
|
}
|
|
43
43
|
function C(e, t) {
|
|
44
|
-
h.value =
|
|
44
|
+
h.value = c(h.value, e, t);
|
|
45
45
|
}
|
|
46
46
|
return {
|
|
47
47
|
open: g,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { setI18nAdapterForTests, useI18nAdapter, } from './useI18nAdapter';
|
|
1
|
+
export { setI18nAdapterForTests, useI18nAdapter, useResolveMessage, } from './useI18nAdapter';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { setI18nAdapterForTests as e, useI18nAdapter as t } from "./useI18nAdapter.js";
|
|
2
|
-
export { e as setI18nAdapterForTests, t as useI18nAdapter };
|
|
1
|
+
import { setI18nAdapterForTests as e, useI18nAdapter as t, useResolveMessage as n } from "./useI18nAdapter.js";
|
|
2
|
+
export { e as setI18nAdapterForTests, t as useI18nAdapter, n as useResolveMessage };
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import { ComputedRef } from 'vue';
|
|
2
|
-
import { I18nAdapter } from '@bridge-ui/core';
|
|
2
|
+
import { I18nAdapter, MessageParams } from '@bridge-ui/core';
|
|
3
3
|
/**
|
|
4
4
|
* Sets a process-wide i18n adapter fallback. For tests only.
|
|
5
5
|
*/
|
|
6
6
|
export declare function setI18nAdapterForTests(adapter: undefined | I18nAdapter): void;
|
|
7
7
|
/**
|
|
8
8
|
* Returns the active i18n adapter from {@link BridgeUIProvider}.
|
|
9
|
-
* When unset,
|
|
10
|
-
* (see `
|
|
9
|
+
* When unset, {@link useResolveMessage} returns the English source string
|
|
10
|
+
* (see `packages/vue/docs/examples`).
|
|
11
11
|
*/
|
|
12
12
|
export declare function useI18nAdapter(): ComputedRef<undefined | I18nAdapter>;
|
|
13
|
+
/**
|
|
14
|
+
* Resolves Bridge chrome strings through the active i18n adapter.
|
|
15
|
+
*/
|
|
16
|
+
export declare function useResolveMessage(): (message: string, params?: MessageParams) => string;
|
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
import { useBridgeUI as e } from "../../Provider/useBridgeUI.js";
|
|
2
2
|
import { computed as t } from "vue";
|
|
3
|
+
import { resolveMessage as n } from "@bridge-ui/core";
|
|
3
4
|
//#region src/Adapters/I18n/useI18nAdapter.ts
|
|
4
|
-
var
|
|
5
|
-
function
|
|
6
|
-
|
|
5
|
+
var r;
|
|
6
|
+
function i(e) {
|
|
7
|
+
r = e;
|
|
7
8
|
}
|
|
8
|
-
function
|
|
9
|
-
let
|
|
10
|
-
return t(() =>
|
|
9
|
+
function a() {
|
|
10
|
+
let n = e();
|
|
11
|
+
return t(() => n?.global.value.i18n ?? r);
|
|
12
|
+
}
|
|
13
|
+
function o() {
|
|
14
|
+
let e = a();
|
|
15
|
+
return (t, r) => n(t, e.value, r);
|
|
11
16
|
}
|
|
12
17
|
//#endregion
|
|
13
|
-
export {
|
|
18
|
+
export { i as setI18nAdapterForTests, a as useI18nAdapter, o as useResolveMessage };
|
|
@@ -6,6 +6,6 @@ import { IconAdapter } from '@bridge-ui/core';
|
|
|
6
6
|
export declare function setIconAdapterForTests(adapter: undefined | IconAdapter): void;
|
|
7
7
|
/**
|
|
8
8
|
* Returns the active icon adapter from {@link BridgeUIProvider}.
|
|
9
|
-
* Semantic icon names require `global.icons` (see `
|
|
9
|
+
* Semantic icon names require `global.icons` (see `packages/vue/docs/examples`).
|
|
10
10
|
*/
|
|
11
11
|
export declare function useIconAdapter(): ComputedRef<undefined | IconAdapter>;
|
package/dist/Adapters/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { setI18nAdapterForTests, useI18nAdapter } from './I18n';
|
|
1
|
+
export { setI18nAdapterForTests, useI18nAdapter, useResolveMessage, } from './I18n';
|
|
2
2
|
export { setIconAdapterForTests, useIconAdapter } from './Icon';
|
|
3
3
|
export type { IconElement, IconSource, IconSourceValueOverrides, SemanticIconName, } from './Icon';
|
package/dist/Adapters/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { setI18nAdapterForTests as e, useI18nAdapter as t } from "./I18n/useI18nAdapter.js";
|
|
2
|
-
import { setIconAdapterForTests as
|
|
3
|
-
export { e as setI18nAdapterForTests,
|
|
1
|
+
import { setI18nAdapterForTests as e, useI18nAdapter as t, useResolveMessage as n } from "./I18n/useI18nAdapter.js";
|
|
2
|
+
import { setIconAdapterForTests as r, useIconAdapter as i } from "./Icon/useIconAdapter.js";
|
|
3
|
+
export { e as setI18nAdapterForTests, r as setIconAdapterForTests, t as useI18nAdapter, i as useIconAdapter, n as useResolveMessage };
|