bojuvue 0.2.1 → 0.4.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.
- package/LICENSE.md +0 -0
- package/README.md +69 -243
- package/dist/BVButton.test.d.ts +0 -0
- package/dist/BVButton.types.d.ts +0 -0
- package/dist/BVButton.vue.d.ts +0 -0
- package/dist/BVIconButton.test.d.ts +0 -0
- package/dist/BVIconButton.types.d.ts +0 -0
- package/dist/BVIconButton.vue.d.ts +0 -0
- package/dist/BVMoreButton.test.d.ts +0 -0
- package/dist/BVMoreButton.types.d.ts +0 -0
- package/dist/BVMoreButton.vue.d.ts +0 -0
- package/dist/BVPlatformButton.test.d.ts +0 -0
- package/dist/BVPlatformButton.types.d.ts +0 -0
- package/dist/BVPlatformButton.vue.d.ts +0 -0
- package/dist/bojuvue.css +1 -1
- package/dist/bojuvue.js +3 -3
- package/dist/index.d.ts +1 -1
- package/dist/moreButtonMenu.d.ts +0 -0
- package/dist/moreButtonMenu.test.d.ts +0 -0
- package/dist/platform.d.ts +4 -1
- package/dist/platform.test.d.ts +0 -0
- package/dist/url.d.ts +0 -0
- package/dist/useManifestFetch.d.ts +54 -49
- package/dist/{useMoreButtonMenu-BdAgqGZv.js → useMoreButtonMenu-CewNc9xN.js} +17 -14
- package/dist/useMoreButtonMenu.d.ts +0 -0
- package/dist/vitepress/BVButton.test.d.ts +0 -0
- package/dist/vitepress/BVButton.vue.d.ts +0 -0
- package/dist/vitepress/BVIconButton.test.d.ts +0 -0
- package/dist/vitepress/BVIconButton.vue.d.ts +0 -0
- package/dist/vitepress/BVMoreButton.test.d.ts +0 -0
- package/dist/vitepress/BVMoreButton.vue.d.ts +0 -0
- package/dist/vitepress/BVPlatformButton.test.d.ts +0 -0
- package/dist/vitepress/BVPlatformButton.vue.d.ts +0 -0
- package/dist/vitepress.d.ts +1 -1
- package/dist/vitepress.js +4 -4
- package/package.json +78 -65
package/LICENSE.md
CHANGED
|
File without changes
|
package/README.md
CHANGED
|
@@ -1,280 +1,106 @@
|
|
|
1
|
-
|
|
2
|
-
<div align="center">
|
|
1
|
+
# BojuVue 보주뷰 <a href="https://github.com/qoomon/starlines"><img src="https://raw.githubusercontent.com/ScottKirvan/BojuVue/refs/heads/starlines/ScottKirvan/BojuVue/starline.svg" alt="starline" /></a>
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
<h1><a href="https://github.com/ScottKirvan/BojuVue">ScottKirvan/BojuVue</a></h1>
|
|
6
|
-
<h3>Shared Vue 3 components, with VitePress-aware builds</h3>
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
<!-- Badges -->
|
|
10
|
-
<p>
|
|
11
|
-
<a href="https://github.com/ScottKirvan/BojuVue/graphs/contributors">
|
|
12
|
-
<img src="https://img.shields.io/github/contributors/ScottKirvan/BojuVue" alt="contributors" />
|
|
13
|
-
</a>
|
|
14
|
-
<a href="https://github.com/ScottKirvan/BojuVue/commits/main">
|
|
15
|
-
<img src="https://img.shields.io/github/last-commit/ScottKirvan/BojuVue" alt="last update" />
|
|
16
|
-
</a>
|
|
17
|
-
<a href="https://github.com/ScottKirvan/BojuVue/network/members">
|
|
18
|
-
<img src="https://img.shields.io/github/forks/ScottKirvan/BojuVue" alt="forks" />
|
|
19
|
-
</a>
|
|
20
|
-
<a href="https://github.com/ScottKirvan/BojuVue/stargazers">
|
|
21
|
-
<img src="https://img.shields.io/github/stars/ScottKirvan/BojuVue" alt="stars" />
|
|
22
|
-
</a>
|
|
23
|
-
<a href="https://github.com/ScottKirvan/BojuVue/issues/">
|
|
24
|
-
<img src="https://img.shields.io/github/issues/ScottKirvan/BojuVue" alt="open issues" />
|
|
25
|
-
</a>
|
|
26
|
-
<a href="https://github.com/ScottKirvan/BojuVue/blob/main/LICENSE.md">
|
|
27
|
-
<img src="https://img.shields.io/github/license/ScottKirvan/BojuVue.svg" alt="license" />
|
|
28
|
-
</a>
|
|
29
|
-
<a href="https://discord.gg/TN6XJSNK5Y">
|
|
30
|
-
<!--<img src="https://img.shields.io/discord/704680098577514527?style=flat-square&label=%F0%9F%92%AC%20discord&color=00ACD7">-->
|
|
31
|
-
<img src="https://img.shields.io/discord/1052011377415438346?style=flat-square&label=discord&color=00ACD7">
|
|
32
|
-
</a>
|
|
33
|
-
</p>
|
|
34
|
-
|
|
35
|
-
<h4>
|
|
36
|
-
<a href="https://scottkirvan.github.io/BojuVue/">Documentation</a>
|
|
37
|
-
<span> · </span>
|
|
38
|
-
<a href="https://github.com/ScottKirvan/BojuVue/issues/new?template=bug_report.md">Report Bug</a>
|
|
39
|
-
<span> · </span>
|
|
40
|
-
<a href="https://github.com/ScottKirvan/BojuVue/issues/new?template=feature_request.md">Request Feature</a>
|
|
41
|
-
</h4>
|
|
42
|
-
</div>
|
|
3
|
+
BojuVue is a Vue 3 component library including a download button that serves each visitor the right build for their OS. Works in any Vue 3 app; VitePress-aware variants at a second import path, zero VitePress overhead in the generic build.
|
|
43
4
|
|
|
44
|
-
|
|
5
|
+
<!-- TODO: demo GIF — record label changing across macOS, Windows, Linux → save to assets/media/demo.gif -->
|
|
45
6
|
|
|
46
|
-
|
|
47
|
-
--------
|
|
48
|
-
`main` is the [deployed](https://ScottKirvan.github.io/BojuVue/) branch. The repo doesn't currently contain any other historic or dev branches.
|
|
7
|
+
<div align="center"><a href="https://github.com/ScottKirvan/BojuVue/stargazers"><img src="https://img.shields.io/github/stars/ScottKirvan/BojuVue" alt="stars" /></a> <a href="https://github.com/ScottKirvan/BojuVue/commits/main"><img src="https://img.shields.io/github/last-commit/ScottKirvan/BojuVue" alt="last update" /></a> <a href="https://github.com/ScottKirvan/BojuVue/blob/main/LICENSE.md"><img src="https://img.shields.io/github/license/ScottKirvan/BojuVue.svg" alt="license" /></a> <a href="https://discord.gg/TN6XJSNK5Y"><img src="https://img.shields.io/discord/1052011377415438346?style=flat-square&label=discord&color=00ACD7" alt="discord" /></a></div>
|
|
49
8
|
|
|
50
|
-
|
|
51
|
-
-----------
|
|
52
|
-
```
|
|
53
|
-
BojuVue
|
|
54
|
-
├───.github
|
|
55
|
-
│ ├───gitignore-templates # .gitignore templates for other stacks (not used by this repo's own Node build)
|
|
56
|
-
│ ├───release-please # Release-Please config — automated version bumps + CHANGELOG from Conventional Commits
|
|
57
|
-
│ └───workflows # CI (test + build), docs deploy, release, pre-release staging
|
|
58
|
-
├───assets
|
|
59
|
-
│ └───media # Logo
|
|
60
|
-
├───docs # VitePress site — consumer-facing docs, deployed to GitHub Pages
|
|
61
|
-
├───notes
|
|
62
|
-
│ ├───dev # Design specs and working notes for this repo's own contributors
|
|
63
|
-
│ ├───CHANGELOG.md # Auto-generated by Release-Please
|
|
64
|
-
│ ├───TODO.md
|
|
65
|
-
│ └───VERSION.md
|
|
66
|
-
├───src # Library source — see Architecture below
|
|
67
|
-
├───CLAUDE.md # AI agent context
|
|
68
|
-
├───CODE_OF_CONDUCT.md # Community guidelines
|
|
69
|
-
├───CONTRIBUTING.md # Contribution guidelines
|
|
70
|
-
├───LICENSE.md # MIT License
|
|
71
|
-
└───README.md # This file
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
Issue and PR templates aren't in this repo's own `.github/` — they're inherited from
|
|
75
|
-
the `ScottKirvan/.github` org repo via GitHub's community health file fallback.
|
|
76
|
-
|
|
77
|
-
Table of Contents
|
|
78
|
-
-----------------
|
|
79
|
-
- [Branches](#branches)
|
|
80
|
-
- [Repo Layout](#repo-layout)
|
|
81
|
-
- [Features](#features)
|
|
82
|
-
- [Architecture](#architecture)
|
|
83
|
-
- [Installation](#installation)
|
|
84
|
-
- [Usage](#usage)
|
|
85
|
-
- [Adding a new component](#adding-a-new-component)
|
|
86
|
-
- [Contributions / Contact](#contributions--contact)
|
|
87
|
-
- [Credits](#credits)
|
|
9
|
+
**[See it live](https://www.scottkirvan.com/BojuVue/appendix/examples.html)** — every component rendered, not just described.
|
|
88
10
|
|
|
89
|
-
|
|
90
|
-
--------
|
|
91
|
-
- Vue 3 + TypeScript components, built as an ES module via Vite library mode
|
|
92
|
-
- `vue` is a peer dependency, so consuming sites use their own Vue instance — no duplicate copies, no broken reactivity
|
|
93
|
-
- Every component is exported from one entry point (`src/index.ts`), so consuming a new component is a one-line import change
|
|
94
|
-
- The `docs/` VitePress site imports directly from `src/index.ts`/`src/vitepress.ts` and registers every exported component globally, so new components can be previewed live in a real VitePress site without publishing or `npm link`
|
|
95
|
-
- Some components (currently `BVPlatformButton`) ship as **two fully independent builds behind two import paths**: a generic implementation at `@scottkirvan/bojuvue`, with zero dependency on `vitepress`, and a VitePress-specific implementation at `@scottkirvan/bojuvue/vitepress`, same component name, resolving anything VitePress-specific for you. Neither component imports or renders the other — the import path is what disambiguates them. `vitepress` is an *optional* peer dependency — installing the package alone never requires it; only importing from the `/vitepress` path does.
|
|
11
|
+
## Install
|
|
96
12
|
|
|
97
|
-
Architecture
|
|
98
|
-
------------
|
|
99
|
-
The bit that shapes everything else in this repo: **the generic build must have zero
|
|
100
|
-
dependency on `vitepress`, anywhere in its module graph.** Everything below exists to
|
|
101
|
-
make that hold under a real bundler, not just in theory.
|
|
102
|
-
|
|
103
|
-
**Two entry points, two physical files.** `vite.config.ts` builds library mode with two
|
|
104
|
-
separate entries — `src/index.ts` → `dist/bojuvue.js` (published as `.`) and
|
|
105
|
-
`src/vitepress.ts` → `dist/vitepress.js` (published as `./vitepress`). `src/vitepress.ts`
|
|
106
|
-
re-exports everything `src/index.ts` has, plus its own VitePress-specific component
|
|
107
|
-
implementations, under the same names. This has to be two genuinely separate output
|
|
108
|
-
files, not two exports of one bundle — if both compiled into a single file, importing
|
|
109
|
-
only the generic path would still execute a top-level `import 'vitepress'` somewhere in
|
|
110
|
-
it. Verify this invariant after touching anything under `src/` by building and grepping
|
|
111
|
-
the output:
|
|
112
13
|
```sh
|
|
113
|
-
npm
|
|
114
|
-
grep -r vitepress dist/bojuvue.js # should print nothing
|
|
14
|
+
npm install bojuvue
|
|
115
15
|
```
|
|
116
16
|
|
|
117
|
-
|
|
118
|
-
needs anything VitePress-specific (site data, the router, VitePress's own `VPButton`)
|
|
119
|
-
doesn't take a runtime "VitePress mode" flag — it gets two fully independent
|
|
120
|
-
implementations sharing one exported name, disambiguated by import path:
|
|
121
|
-
`src/ComponentName.vue` (plain props, no `vitepress` import, exported from
|
|
122
|
-
`src/index.ts`) and `src/vitepress/ComponentName.vue` (calls whatever VitePress
|
|
123
|
-
composables it needs itself, exported from `src/vitepress.ts`). Neither imports or
|
|
124
|
-
renders the other. `BVPlatformButton` is the worked example — see
|
|
125
|
-
`src/BVPlatformButton.vue` and `src/vitepress/BVPlatformButton.vue`. Logic genuinely
|
|
126
|
-
shared between the two (e.g. manifest-fetch orchestration) lives in a plain utility
|
|
127
|
-
module both call independently — see `src/useManifestFetch.ts` — not in one component
|
|
128
|
-
owning the other's rendering.
|
|
129
|
-
|
|
130
|
-
**Prop types stay inline in `defineProps<T>()`.** `@vue/compiler-sfc` resolving a
|
|
131
|
-
`defineProps<T>()` type imported from another module needs the `typescript` package
|
|
132
|
-
loadable from wherever the `.vue` file is compiled — which breaks under `docs/`'s
|
|
133
|
-
cross-directory source build (next point) whenever the repo root's `node_modules` isn't
|
|
134
|
-
present. Keep the type written out inline in the macro itself. A type used only for a
|
|
135
|
-
public, non-macro export (`BVPlatformButtonProps` in `src/BVPlatformButton.types.ts`,
|
|
136
|
-
for instance) is fine to keep in its own file — the constraint is specifically about the
|
|
137
|
-
`defineProps<T>()` type position.
|
|
17
|
+
## Usage
|
|
138
18
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
or mock Vue-specific APIs to exercise the same branch.
|
|
19
|
+
```vue
|
|
20
|
+
<script setup>
|
|
21
|
+
import { BVPlatformButton } from 'bojuvue'
|
|
22
|
+
</script>
|
|
144
23
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
about: files under repo-root `src/` still `import 'vue'`/`import 'vitepress'`
|
|
152
|
-
themselves, which would otherwise resolve relative to `src/`'s own location. A scoped
|
|
153
|
-
Vite plugin in `docs/.vitepress/config.mts` fixes this by redirecting any such import,
|
|
154
|
-
when the importing file is physically under repo-root `src/`, through Vite's normal
|
|
155
|
-
resolver as if it came from inside `docs/` instead. Verify a change here by temporarily
|
|
156
|
-
renaming the repo root's `node_modules` out of the way and confirming `npm run
|
|
157
|
-
docs:build` (from `docs/`) still succeeds — `docs/`'s deploy job never installs the repo
|
|
158
|
-
root's dependencies, so this has to work without them.
|
|
159
|
-
|
|
160
|
-
**Typechecking and build.** `npm run build` runs `vue-tsc -b` (typecheck, via composite
|
|
161
|
-
TypeScript project references) then `vite build` (emits `dist/`). There's no separate
|
|
162
|
-
typecheck-only script — `vue-tsc -b --noEmit` isn't valid with composite project
|
|
163
|
-
references, so `build` is the only way to typecheck the library.
|
|
164
|
-
|
|
165
|
-
Installation
|
|
166
|
-
------------
|
|
167
|
-
```
|
|
168
|
-
npm install @scottkirvan/bojuvue
|
|
24
|
+
<template>
|
|
25
|
+
<BVPlatformButton
|
|
26
|
+
manifest-url="/platformButton.json"
|
|
27
|
+
fallback-href="https://github.com/you/app/releases"
|
|
28
|
+
/>
|
|
29
|
+
</template>
|
|
169
30
|
```
|
|
170
31
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
```ts
|
|
176
|
-
// main.ts (or wherever you create your Vue app)
|
|
177
|
-
import { createApp } from 'vue'
|
|
178
|
-
import { BVPlatformButton, SomeComponent } from '@scottkirvan/bojuvue'
|
|
179
|
-
import App from './App.vue'
|
|
180
|
-
|
|
181
|
-
const app = createApp(App)
|
|
182
|
-
app.component('BVPlatformButton', BVPlatformButton)
|
|
183
|
-
app.component('SomeComponent', SomeComponent)
|
|
184
|
-
app.mount('#app')
|
|
185
|
-
```
|
|
186
|
-
|
|
187
|
-
Building a VitePress site? Register the same way from `enhanceApp` in
|
|
188
|
-
`.vitepress/theme/index.ts` instead of `main.ts`, and prefer importing from
|
|
189
|
-
`@scottkirvan/bojuvue/vitepress` for any component with a VitePress-aware build (see
|
|
190
|
-
Features above):
|
|
32
|
+
Works as-is in any Vue 3 app. Building a VitePress site instead? Swap the import for
|
|
33
|
+
`bojuvue/vitepress` to get real `VPButton` theme styling, and register it once so every
|
|
34
|
+
`.md` page can use it with no per-page import:
|
|
191
35
|
|
|
192
36
|
```ts
|
|
37
|
+
// .vitepress/theme/index.ts
|
|
193
38
|
import DefaultTheme from 'vitepress/theme'
|
|
194
|
-
import
|
|
195
|
-
import { SomeComponent } from '@scottkirvan/bojuvue'
|
|
39
|
+
import * as BojuVue from 'bojuvue/vitepress'
|
|
196
40
|
|
|
197
41
|
export default {
|
|
198
42
|
extends: DefaultTheme,
|
|
199
43
|
enhanceApp({ app }) {
|
|
200
|
-
|
|
201
|
-
|
|
44
|
+
for (const [name, component] of Object.entries(BojuVue)) {
|
|
45
|
+
app.component(name, component)
|
|
46
|
+
}
|
|
202
47
|
},
|
|
203
48
|
}
|
|
204
49
|
```
|
|
205
50
|
|
|
206
|
-
Then
|
|
51
|
+
Then in any .md page, no import needed:
|
|
207
52
|
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
53
|
+
```md
|
|
54
|
+
<BVPlatformButton manifest-url="platformButton.json" />
|
|
55
|
+
```
|
|
211
56
|
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
57
|
+
Your manifest (`public/platformButton.json`) — put one entry under `platforms` for each
|
|
58
|
+
platform you ship for:
|
|
59
|
+
|
|
60
|
+
```json
|
|
61
|
+
{
|
|
62
|
+
"platforms": {
|
|
63
|
+
"windows": { "href": "https://example.com/app.msi" },
|
|
64
|
+
"macos": { "href": "https://example.com/app.dmg" },
|
|
65
|
+
"linux": { "href": "https://example.com/app.tar.gz" }
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
```
|
|
216
69
|
|
|
217
|
-
**
|
|
70
|
+
**[Documentation](https://scottkirvan.github.io/BojuVue/)** -- props reference, live demos, full setup guide, every component.
|
|
218
71
|
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
scoped>` for CSS scoped to that component alone.
|
|
222
|
-
2. Make configurable text/behavior actual props, not hardcoded strings —
|
|
223
|
-
`defineProps<{...}>()` with `withDefaults(...)` for sensible fallbacks. Keep the prop
|
|
224
|
-
type written inline in the macro.
|
|
225
|
-
3. Extract any real logic (detection, data-shaping) into a plain `.ts` module next to
|
|
226
|
-
the component, and write unit tests for it (see `src/platform.ts` /
|
|
227
|
-
`src/platform.test.ts`).
|
|
228
|
-
4. Add one line to `src/index.ts`: `export { default as YourComponent } from
|
|
229
|
-
'./YourComponent.vue'`.
|
|
230
|
-
5. Preview it: `npm run docs:dev` (from `docs/`), then use `<YourComponent />` anywhere
|
|
231
|
-
in a `.md` file — it's registered globally in this repo's own `docs/` theme, so no
|
|
232
|
-
import is needed there.
|
|
233
|
-
6. Add a reference page at `docs/components/your-component.md` (props table + usage
|
|
234
|
-
example — copy the structure of an existing page) and link it from
|
|
235
|
-
`docs/components/index.md` and the sidebar in `docs/.vitepress/config.mts`.
|
|
236
|
-
7. `npm run build` at the repo root to confirm the library itself still builds clean,
|
|
237
|
-
and `npm test` to run the unit suite.
|
|
72
|
+
What's in the package
|
|
73
|
+
---------------------
|
|
238
74
|
|
|
239
|
-
|
|
240
|
-
`BVPlatformButton`) gets two fully independent implementations instead of one file:
|
|
75
|
+
Published to npm as [`bojuvue`](https://www.npmjs.com/package/bojuvue). It exists so that VitePress sites can share one set of landing-page components instead of duplicating them per repo. This repo gets updated, the package gets published, and every consuming site picks it up with `npm update`.
|
|
241
76
|
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
2. `src/vitepress/YourComponent.vue` calls whatever VitePress composables it needs
|
|
248
|
-
itself and implements its own rendering. It does not import or render
|
|
249
|
-
`src/YourComponent.vue`. Any logic genuinely shared between the two (like fetch
|
|
250
|
-
orchestration — see `useManifestFetch`) lives in a plain utility module both call
|
|
251
|
-
independently, not in one component owning the other's rendering.
|
|
252
|
-
3. `src/index.ts` exports the generic implementation; `src/vitepress.ts` re-exports
|
|
253
|
-
everything `src/index.ts` has, plus exports the VitePress-specific implementation —
|
|
254
|
-
both under the same name, `YourComponent`. The import path is what disambiguates
|
|
255
|
-
them.
|
|
256
|
-
4. Preview via `docs/.vitepress/theme/index.ts`, which registers from `src/vitepress.ts`
|
|
257
|
-
(the superset) — this exercises both the VitePress-specific implementation and
|
|
258
|
-
everything re-exported from the generic one.
|
|
259
|
-
5. `npm run build` must still produce two separate physical files (check
|
|
260
|
-
`vite.config.ts`'s `build.lib.entry`), and the generic build's output file must
|
|
261
|
-
contain zero reference to `vitepress` — grep for it directly after any build that
|
|
262
|
-
touches this component (see [Architecture](#architecture)).
|
|
263
|
-
6. Add the reference page and sidebar entry as in step 6 above, and document both import
|
|
264
|
-
paths on that page — see `docs/components/platform-button.md` for the pattern.
|
|
77
|
+
- **BVPlatformButton** — reads the visitor's OS from the browser, fetches a manifest you host, and links to the right download. No manifest entry for a platform? The button hides itself, or shows a fallback link if you provide one. VitePress sites get real `VPButton` styling from `bojuvue/vitepress`; plain Vue 3 apps use the same prop surface without any VitePress dependency.
|
|
78
|
+
- **BVMoreButton** — an overflow dropdown for the secondary links every project needs (repo, report a bug, request a feature) without letting them outweigh your primary call-to-action. Visible-text mode ("More...") or a compact icon-only "⋯" button; VitePress sites get real `VPButton` styling for free via `bojuvue/vitepress`, same as `BVPlatformButton`.
|
|
79
|
+
<!-- TODO: demo GIF/screenshot — the dropdown open, showing the GitHub/bug/feature links → save to assets/media/more-button-demo.gif -->
|
|
80
|
+
- **BVButton** — VitePress's own `VPButton` prop shape, usable in any Vue 3 app. The primitive the others build on.
|
|
81
|
+
- **BVIconButton** — `BVButton` with an optional inline SVG icon in addition to, or in place of, the button text.
|
|
265
82
|
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
83
|
+
Every component exports from `bojuvue`. Components with VitePress-specific builds are located at `bojuvue/vitepress` — same exported name, resolves VitePress-specific values and renders through real VitePress components. `vitepress` is an optional peer dependency: installing the package alone never requires it.
|
|
84
|
+
|
|
85
|
+
Why not a monorepo workspace?
|
|
86
|
+
-----------------------------
|
|
87
|
+
|
|
88
|
+
npm/yarn/pnpm workspaces already solve "share a component across projects" for free, and if every consuming site lived in this repo, that would be the right answer — skip this package entirely.
|
|
89
|
+
|
|
90
|
+
It only holds while that's true. The moment a consuming site is a separate repo — a different site, a client's project, a repo you don't control — a workspace can't reach across that boundary. There's no shared `package.json` to add an entry to, no symlinked `node_modules` to rely on. Publishing is what still works: a versioned package on the registry that any repo, anywhere, can `npm install` and `npm update`.
|
|
91
|
+
|
|
92
|
+
That's the actual reason this exists — not "components in a folder," but components that survive the boundary between repos.
|
|
93
|
+
|
|
94
|
+
Contributing
|
|
95
|
+
------------
|
|
96
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup, the branch and commit
|
|
97
|
+
conventions, and step-by-step instructions for adding a new component.
|
|
272
98
|
|
|
273
99
|
Contributions / Contact
|
|
274
100
|
-----------------------
|
|
275
101
|
- Please [file an issue](https://github.com/ScottKirvan/BojuVue/issues/new), or [grab a fork](https://github.com/ScottKirvan/BojuVue/fork), hack away, and submit a [pull request](https://github.com/ScottKirvan/BojuVue/pulls).
|
|
276
102
|
- Contact me at [linkedin.com/in/scottkirvan/](https://www.linkedin.com/in/scottkirvan/)
|
|
277
|
-
- You can also
|
|
103
|
+
- You can also find me on [Discord](https://discord.gg/TN6XJSNK5Y) — I'm cptvideo.
|
|
278
104
|
|
|
279
105
|
Credits
|
|
280
106
|
-------
|
|
@@ -282,6 +108,6 @@ Credits
|
|
|
282
108
|
|
|
283
109
|
Scaffolded from [ScooterGitTemplate](https://github.com/ScottKirvan/ScooterGitTemplate).
|
|
284
110
|
|
|
285
|
-
Project Link:
|
|
286
|
-
[CHANGELOG](notes/CHANGELOG.md)
|
|
111
|
+
Project Link: [BojuVue](https://github.com/ScottKirvan/BojuVue)
|
|
112
|
+
[CHANGELOG](notes/CHANGELOG.md)
|
|
287
113
|
[TODO](notes/TODO.md)
|
package/dist/BVButton.test.d.ts
CHANGED
|
File without changes
|
package/dist/BVButton.types.d.ts
CHANGED
|
File without changes
|
package/dist/BVButton.vue.d.ts
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/bojuvue.css
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
.bv-button[data-v-
|
|
1
|
+
.bv-button[data-v-4f016e07]{text-align:center;white-space:nowrap;border:1px solid #0000;font-weight:600;text-decoration:none;transition:color .25s,border-color .25s,background-color .25s;display:inline-block}.bv-button[data-v-4f016e07]:active{transition:color .1s,border-color .1s,background-color .1s}.bv-button.medium[data-v-4f016e07]{border-radius:20px;padding:0 20px;font-size:14px;line-height:38px}.bv-button.big[data-v-4f016e07]{border-radius:24px;padding:0 24px;font-size:16px;line-height:46px}.bv-button.brand[data-v-4f016e07]{border-color:var(--vp-button-brand-border,#3c8772);color:var(--vp-button-brand-text,#fff);background-color:var(--vp-button-brand-bg,#3c8772)}.bv-button.brand[data-v-4f016e07]:hover{border-color:var(--vp-button-brand-hover-border,#359469);color:var(--vp-button-brand-hover-text,#fff);background-color:var(--vp-button-brand-hover-bg,#359469)}.bv-button.brand[data-v-4f016e07]:active{border-color:var(--vp-button-brand-active-border,#2b8760);color:var(--vp-button-brand-active-text,#fff);background-color:var(--vp-button-brand-active-bg,#2b8760)}.bv-button.alt[data-v-4f016e07]{border-color:var(--vp-button-alt-border,transparent);color:var(--vp-button-alt-text,#3c3c43);background-color:var(--vp-button-alt-bg,#f2f2f3)}.bv-button.alt[data-v-4f016e07]:hover{border-color:var(--vp-button-alt-hover-border,transparent);color:var(--vp-button-alt-hover-text,#3c3c43);background-color:var(--vp-button-alt-hover-bg,#e6e6e7)}.bv-button.alt[data-v-4f016e07]:active{border-color:var(--vp-button-alt-active-border,transparent);color:var(--vp-button-alt-active-text,#3c3c43);background-color:var(--vp-button-alt-active-bg,#dcdcdd)}.bv-button.sponsor[data-v-4f016e07]{border-color:var(--vp-button-sponsor-border,transparent);color:var(--vp-button-sponsor-text,#d5389c);background-color:var(--vp-button-sponsor-bg,transparent)}.bv-button.sponsor[data-v-4f016e07]:hover{border-color:var(--vp-button-sponsor-hover-border,#d5389c);color:var(--vp-button-sponsor-hover-text,#d5389c);background-color:var(--vp-button-sponsor-hover-bg,transparent)}.bv-button.sponsor[data-v-4f016e07]:active{border-color:var(--vp-button-sponsor-active-border,#d5389c);color:var(--vp-button-sponsor-active-text,#d5389c);background-color:var(--vp-button-sponsor-active-bg,transparent)}.bv-icon-button[data-v-5330079c]{align-items:center;display:inline-flex;position:relative}.bv-icon-button-icon[data-v-5330079c]{pointer-events:none;justify-content:center;align-items:center;display:inline-flex;position:absolute}.bv-icon-button-icon[data-v-5330079c] svg{width:1em;height:1em}.bv-icon-button.icon-only .bv-icon-button-icon[data-v-5330079c]{inset:0}.bv-icon-button.has-icon .bv-icon-button-icon[data-v-5330079c]{top:50%;transform:translateY(-50%)}.bv-icon-button.has-icon.medium .bv-icon-button-icon[data-v-5330079c]{font-size:14px;left:20px}.bv-icon-button.has-icon.big .bv-icon-button-icon[data-v-5330079c]{font-size:16px;left:24px}[data-v-5330079c] .bv-button.icon-only{padding:0;line-height:1}[data-v-5330079c] .bv-button.icon-only.medium{width:38px;height:38px}[data-v-5330079c] .bv-button.icon-only.big{width:46px;height:46px}[data-v-5330079c] .bv-button.has-icon.medium{padding-left:calc(26px + 1em)}[data-v-5330079c] .bv-button.has-icon.big{padding-left:calc(30px + 1em)}.bv-more-button[data-v-a2fecc58]{display:inline-flex;position:relative}.bv-more-button-panel[data-v-a2fecc58]{z-index:100;border:1px solid var(--vp-c-divider,#e2e2e3);background-color:var(--vp-c-bg-elv,#fff);min-width:180px;box-shadow:var(--vp-shadow-3,0 12px 32px #0000002e);border-radius:8px;flex-direction:column;padding:4px;display:flex;position:fixed}.bv-more-button-item[data-v-a2fecc58]{color:var(--vp-c-text-1,#3c3c43);white-space:nowrap;border-radius:6px;align-items:center;gap:8px;padding:8px 12px;font-size:14px;text-decoration:none;display:flex}.bv-more-button-item[data-v-a2fecc58]:hover,.bv-more-button-item[data-v-a2fecc58]:focus-visible{background-color:var(--vp-c-default-soft,#f2f2f3);outline:none}.bv-more-button-item-icon[data-v-a2fecc58] svg{width:1em;height:1em}.VPButton[data-v-8beb07d9]{text-decoration:none}.bv-icon-button[data-v-4a289ccc]{align-items:center;display:inline-flex;position:relative}.bv-icon-button-icon[data-v-4a289ccc]{pointer-events:none;justify-content:center;align-items:center;display:inline-flex;position:absolute}.bv-icon-button-icon[data-v-4a289ccc] svg{width:1em;height:1em}.bv-icon-button.icon-only .bv-icon-button-icon[data-v-4a289ccc]{inset:0}.bv-icon-button.has-icon .bv-icon-button-icon[data-v-4a289ccc]{top:50%;transform:translateY(-50%)}.bv-icon-button.has-icon.medium .bv-icon-button-icon[data-v-4a289ccc]{font-size:14px;left:20px}.bv-icon-button.has-icon.big .bv-icon-button-icon[data-v-4a289ccc]{font-size:16px;left:24px}[data-v-4a289ccc] .bv-button.icon-only{padding:0;line-height:1}[data-v-4a289ccc] .bv-button.icon-only.medium{width:38px;height:38px}[data-v-4a289ccc] .bv-button.icon-only.big{width:46px;height:46px}[data-v-4a289ccc] .VPButton.has-icon.medium{padding-left:calc(26px + 1em)}[data-v-4a289ccc] .VPButton.has-icon.big{padding-left:calc(30px + 1em)}.bv-more-button[data-v-5f02f0be]{display:inline-flex;position:relative}.bv-more-button-panel[data-v-5f02f0be]{z-index:100;border:1px solid var(--vp-c-divider);background-color:var(--vp-c-bg-elv);min-width:180px;box-shadow:var(--vp-shadow-3);border-radius:8px;flex-direction:column;padding:4px;display:flex;position:fixed}.bv-more-button-item[data-v-5f02f0be]{color:var(--vp-c-text-1);white-space:nowrap;border-radius:6px;align-items:center;gap:8px;padding:8px 12px;font-size:14px;text-decoration:none;display:flex}.bv-more-button-item[data-v-5f02f0be]:hover,.bv-more-button-item[data-v-5f02f0be]:focus-visible{background-color:var(--vp-c-default-soft);outline:none}.bv-more-button-item-icon[data-v-5f02f0be] svg{width:1em;height:1em}
|
|
2
2
|
/*$vite$:1*/
|
package/dist/bojuvue.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s, t as c } from "./useMoreButtonMenu-
|
|
1
|
+
import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s, t as c } from "./useMoreButtonMenu-CewNc9xN.js";
|
|
2
2
|
import { Fragment as l, computed as u, createBlock as d, createCommentVNode as f, createElementBlock as p, createTextVNode as m, createVNode as h, defineComponent as g, mergeProps as _, normalizeClass as v, normalizeStyle as y, onMounted as b, openBlock as x, ref as S, renderList as C, toDisplayString as w, unref as T } from "vue";
|
|
3
3
|
//#region src/BVIconButton.vue?vue&type=script&setup=true&lang.ts
|
|
4
4
|
var E = ["innerHTML"], D = /*#__PURE__*/ t(/* @__PURE__ */ g({
|
|
@@ -49,7 +49,7 @@ var E = ["innerHTML"], D = /*#__PURE__*/ t(/* @__PURE__ */ g({
|
|
|
49
49
|
innerHTML: e.icon
|
|
50
50
|
}, null, 8, E)) : f("", !0)], 2));
|
|
51
51
|
}
|
|
52
|
-
}), [["__scopeId", "data-v-
|
|
52
|
+
}), [["__scopeId", "data-v-5330079c"]]), O = /* @__PURE__ */ g({
|
|
53
53
|
__name: "BVPlatformButton",
|
|
54
54
|
props: {
|
|
55
55
|
manifestUrl: { default: "platformButton.json" },
|
|
@@ -169,6 +169,6 @@ var E = ["innerHTML"], D = /*#__PURE__*/ t(/* @__PURE__ */ g({
|
|
|
169
169
|
innerHTML: e.icon
|
|
170
170
|
}, null, 8, A)) : f("", !0), m(" " + w(e.label), 1)], 8, k))), 128))], 36)) : f("", !0)], 512));
|
|
171
171
|
}
|
|
172
|
-
}), [["__scopeId", "data-v-
|
|
172
|
+
}), [["__scopeId", "data-v-a2fecc58"]]);
|
|
173
173
|
//#endregion
|
|
174
174
|
export { s as BVButton, D as BVIconButton, M as BVMoreButton, O as BVPlatformButton, o as defaultLabels, n as detectPlatform, e as resolveDownload, a as resolveManifestUrl };
|
package/dist/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export { default as BVIconButton } from './BVIconButton.vue';
|
|
|
4
4
|
export type { BVIconButtonProps } from './BVIconButton.types';
|
|
5
5
|
export { default as BVPlatformButton } from './BVPlatformButton.vue';
|
|
6
6
|
export { detectPlatform, resolveDownload, resolveManifestUrl, defaultLabels } from './platform';
|
|
7
|
-
export type {
|
|
7
|
+
export type { BVPlatformData, BVPlatformEntry, BVPlatformId, BVPlatformManifest } from './platform';
|
|
8
8
|
export type { BVPlatformButtonProps } from './BVPlatformButton.types';
|
|
9
9
|
export { default as BVMoreButton } from './BVMoreButton.vue';
|
|
10
10
|
export type { BVMoreButtonItem, BVMoreButtonProps } from './BVMoreButton.types';
|
package/dist/moreButtonMenu.d.ts
CHANGED
|
File without changes
|
|
File without changes
|
package/dist/platform.d.ts
CHANGED
|
@@ -3,7 +3,10 @@ export interface BVPlatformEntry {
|
|
|
3
3
|
href: string;
|
|
4
4
|
label?: string;
|
|
5
5
|
}
|
|
6
|
-
export type
|
|
6
|
+
export type BVPlatformData = Partial<Record<BVPlatformId, BVPlatformEntry>>;
|
|
7
|
+
export interface BVPlatformManifest {
|
|
8
|
+
platforms: BVPlatformData;
|
|
9
|
+
}
|
|
7
10
|
export interface NavigatorLike {
|
|
8
11
|
userAgent: string;
|
|
9
12
|
platform: string;
|
package/dist/platform.test.d.ts
CHANGED
|
File without changes
|
package/dist/url.d.ts
CHANGED
|
File without changes
|
|
@@ -1,53 +1,58 @@
|
|
|
1
|
+
import { BVPlatformManifest } from './platform';
|
|
1
2
|
export declare function useManifestFetch(getUrl: () => string): {
|
|
2
3
|
manifest: import('vue').Ref<{
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
4
|
+
platforms: {
|
|
5
|
+
windows?: {
|
|
6
|
+
href: string;
|
|
7
|
+
label?: string | undefined;
|
|
8
|
+
} | undefined;
|
|
9
|
+
macos?: {
|
|
10
|
+
href: string;
|
|
11
|
+
label?: string | undefined;
|
|
12
|
+
} | undefined;
|
|
13
|
+
linux?: {
|
|
14
|
+
href: string;
|
|
15
|
+
label?: string | undefined;
|
|
16
|
+
} | undefined;
|
|
17
|
+
android?: {
|
|
18
|
+
href: string;
|
|
19
|
+
label?: string | undefined;
|
|
20
|
+
} | undefined;
|
|
21
|
+
ios?: {
|
|
22
|
+
href: string;
|
|
23
|
+
label?: string | undefined;
|
|
24
|
+
} | undefined;
|
|
25
|
+
chromeos?: {
|
|
26
|
+
href: string;
|
|
27
|
+
label?: string | undefined;
|
|
28
|
+
} | undefined;
|
|
29
|
+
};
|
|
30
|
+
} | null, BVPlatformManifest | {
|
|
31
|
+
platforms: {
|
|
32
|
+
windows?: {
|
|
33
|
+
href: string;
|
|
34
|
+
label?: string | undefined;
|
|
35
|
+
} | undefined;
|
|
36
|
+
macos?: {
|
|
37
|
+
href: string;
|
|
38
|
+
label?: string | undefined;
|
|
39
|
+
} | undefined;
|
|
40
|
+
linux?: {
|
|
41
|
+
href: string;
|
|
42
|
+
label?: string | undefined;
|
|
43
|
+
} | undefined;
|
|
44
|
+
android?: {
|
|
45
|
+
href: string;
|
|
46
|
+
label?: string | undefined;
|
|
47
|
+
} | undefined;
|
|
48
|
+
ios?: {
|
|
49
|
+
href: string;
|
|
50
|
+
label?: string | undefined;
|
|
51
|
+
} | undefined;
|
|
52
|
+
chromeos?: {
|
|
53
|
+
href: string;
|
|
54
|
+
label?: string | undefined;
|
|
55
|
+
} | undefined;
|
|
56
|
+
};
|
|
52
57
|
} | null>;
|
|
53
58
|
};
|
|
@@ -38,7 +38,7 @@ var v = /*@__PURE__*/ r({
|
|
|
38
38
|
let n = e.__vccOpts || e;
|
|
39
39
|
for (let [e, r] of t) n[e] = r;
|
|
40
40
|
return n;
|
|
41
|
-
}, b = /*#__PURE__*/ y(v, [["__scopeId", "data-v-
|
|
41
|
+
}, b = /*#__PURE__*/ y(v, [["__scopeId", "data-v-4f016e07"]]);
|
|
42
42
|
//#endregion
|
|
43
43
|
//#region src/platform.ts
|
|
44
44
|
function x(e) {
|
|
@@ -57,12 +57,15 @@ var S = {
|
|
|
57
57
|
function w(e, t) {
|
|
58
58
|
return C.test(t) ? t : `${e}${t}`;
|
|
59
59
|
}
|
|
60
|
-
function T(e
|
|
60
|
+
function T(e) {
|
|
61
|
+
return typeof e == "object" && !!e;
|
|
62
|
+
}
|
|
63
|
+
function E(e, t, n = {}) {
|
|
61
64
|
if (e && t) {
|
|
62
|
-
let n = e === "chromeos" ?
|
|
63
|
-
if (
|
|
64
|
-
href:
|
|
65
|
-
label:
|
|
65
|
+
let n = T(t.platforms) ? t.platforms : void 0, r = n && (e === "chromeos" ? n.chromeos ?? n.android : n[e]);
|
|
66
|
+
if (r) return {
|
|
67
|
+
href: r.href,
|
|
68
|
+
label: r.label ?? S[e]
|
|
66
69
|
};
|
|
67
70
|
}
|
|
68
71
|
return n.fallbackHref ? {
|
|
@@ -72,7 +75,7 @@ function T(e, t, n = {}) {
|
|
|
72
75
|
}
|
|
73
76
|
//#endregion
|
|
74
77
|
//#region src/useManifestFetch.ts
|
|
75
|
-
function
|
|
78
|
+
function D(e) {
|
|
76
79
|
let t = d(null), n = null;
|
|
77
80
|
async function r() {
|
|
78
81
|
n?.abort();
|
|
@@ -90,13 +93,13 @@ function E(e) {
|
|
|
90
93
|
}
|
|
91
94
|
//#endregion
|
|
92
95
|
//#region src/moreButtonMenu.ts
|
|
93
|
-
function
|
|
96
|
+
function O({ triggerLeft: e, triggerRight: t, panelWidth: n, viewportWidth: r }) {
|
|
94
97
|
let i = e;
|
|
95
98
|
if (i + n <= r) return i;
|
|
96
99
|
let a = t - n;
|
|
97
100
|
return a >= 0 ? a : Math.max(0, r - n);
|
|
98
101
|
}
|
|
99
|
-
function
|
|
102
|
+
function k(e, t, n) {
|
|
100
103
|
if (n <= 0) return -1;
|
|
101
104
|
switch (e) {
|
|
102
105
|
case "Home": return 0;
|
|
@@ -107,7 +110,7 @@ function O(e, t, n) {
|
|
|
107
110
|
}
|
|
108
111
|
//#endregion
|
|
109
112
|
//#region src/useMoreButtonMenu.ts
|
|
110
|
-
function
|
|
113
|
+
function A({ itemCount: e, rootEl: t, iconButtonEl: n, panelEl: r }) {
|
|
111
114
|
let a = d(!1), c = d(0), l = d(0);
|
|
112
115
|
function u() {
|
|
113
116
|
return (n.value?.$el)?.querySelector("a, button") ?? null;
|
|
@@ -134,7 +137,7 @@ function k({ itemCount: e, rootEl: t, iconButtonEl: n, panelEl: r }) {
|
|
|
134
137
|
let e = u(), t = r.value;
|
|
135
138
|
if (!e || !t || typeof window > "u") return;
|
|
136
139
|
let n = _(), i = e.getBoundingClientRect(), a = t.getBoundingClientRect().width / n;
|
|
137
|
-
c.value =
|
|
140
|
+
c.value = O({
|
|
138
141
|
triggerLeft: i.left / n,
|
|
139
142
|
triggerRight: i.right / n,
|
|
140
143
|
panelWidth: a,
|
|
@@ -151,7 +154,7 @@ function k({ itemCount: e, rootEl: t, iconButtonEl: n, panelEl: r }) {
|
|
|
151
154
|
a.value ? b() : y();
|
|
152
155
|
}
|
|
153
156
|
function S(t) {
|
|
154
|
-
a.value || (t.key === "ArrowDown" ? (t.preventDefault(), y(
|
|
157
|
+
a.value || (t.key === "ArrowDown" ? (t.preventDefault(), y(k("ArrowDown", -1, e()))) : t.key === "ArrowUp" && (t.preventDefault(), y(k("ArrowUp", -1, e()))));
|
|
155
158
|
}
|
|
156
159
|
let C = [
|
|
157
160
|
"ArrowDown",
|
|
@@ -166,7 +169,7 @@ function k({ itemCount: e, rootEl: t, iconButtonEl: n, panelEl: r }) {
|
|
|
166
169
|
}
|
|
167
170
|
if (C.includes(t.key)) {
|
|
168
171
|
t.preventDefault();
|
|
169
|
-
let n =
|
|
172
|
+
let n = k(t.key, h(), e());
|
|
170
173
|
n >= 0 && g(n);
|
|
171
174
|
}
|
|
172
175
|
}
|
|
@@ -191,4 +194,4 @@ function k({ itemCount: e, rootEl: t, iconButtonEl: n, panelEl: r }) {
|
|
|
191
194
|
};
|
|
192
195
|
}
|
|
193
196
|
//#endregion
|
|
194
|
-
export {
|
|
197
|
+
export { E as a, y as c, x as i, _ as l, D as n, w as o, S as r, b as s, A as t };
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/vitepress.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { detectPlatform, resolveDownload, resolveManifestUrl, defaultLabels } from './platform';
|
|
2
|
-
export type {
|
|
2
|
+
export type { BVPlatformData, BVPlatformEntry, BVPlatformId, BVPlatformManifest } from './platform';
|
|
3
3
|
export type { BVPlatformButtonProps } from './BVPlatformButton.types';
|
|
4
4
|
export { default as BVPlatformButton } from './vitepress/BVPlatformButton.vue';
|
|
5
5
|
export type { BVButtonProps } from './BVButton.types';
|
package/dist/vitepress.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s, t as c } from "./useMoreButtonMenu-
|
|
1
|
+
import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s, t as c } from "./useMoreButtonMenu-CewNc9xN.js";
|
|
2
2
|
import { Fragment as l, computed as u, createBlock as d, createCommentVNode as f, createElementBlock as p, createTextVNode as m, createVNode as h, defineComponent as g, mergeProps as _, normalizeClass as v, normalizeStyle as y, onMounted as b, openBlock as x, ref as S, renderList as C, toDisplayString as w, unref as T } from "vue";
|
|
3
3
|
import { useData as E, withBase as D } from "vitepress";
|
|
4
4
|
import { VPButton as O } from "vitepress/theme";
|
|
@@ -34,7 +34,7 @@ var k = /*#__PURE__*/ t(/* @__PURE__ */ g({
|
|
|
34
34
|
"theme"
|
|
35
35
|
]));
|
|
36
36
|
}
|
|
37
|
-
}), [["__scopeId", "data-v-
|
|
37
|
+
}), [["__scopeId", "data-v-8beb07d9"]]), A = ["innerHTML"], j = ["innerHTML"], M = /*#__PURE__*/ t(/* @__PURE__ */ g({
|
|
38
38
|
inheritAttrs: !1,
|
|
39
39
|
__name: "BVIconButton",
|
|
40
40
|
props: {
|
|
@@ -99,7 +99,7 @@ var k = /*#__PURE__*/ t(/* @__PURE__ */ g({
|
|
|
99
99
|
innerHTML: e.icon
|
|
100
100
|
}, null, 8, j)) : f("", !0)], 64))], 2));
|
|
101
101
|
}
|
|
102
|
-
}), [["__scopeId", "data-v-
|
|
102
|
+
}), [["__scopeId", "data-v-4a289ccc"]]), N = /* @__PURE__ */ g({
|
|
103
103
|
__name: "BVPlatformButton",
|
|
104
104
|
props: {
|
|
105
105
|
manifestUrl: { default: "platformButton.json" },
|
|
@@ -218,6 +218,6 @@ var k = /*#__PURE__*/ t(/* @__PURE__ */ g({
|
|
|
218
218
|
innerHTML: e.icon
|
|
219
219
|
}, null, 8, F)) : f("", !0), m(" " + w(e.label), 1)], 8, P))), 128))], 36)) : f("", !0)], 512));
|
|
220
220
|
}
|
|
221
|
-
}), [["__scopeId", "data-v-
|
|
221
|
+
}), [["__scopeId", "data-v-5f02f0be"]]);
|
|
222
222
|
//#endregion
|
|
223
223
|
export { k as BVButton, M as BVIconButton, L as BVMoreButton, N as BVPlatformButton, o as defaultLabels, n as detectPlatform, e as resolveDownload, a as resolveManifestUrl };
|
package/package.json
CHANGED
|
@@ -1,65 +1,78 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "bojuvue",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"type": "module",
|
|
5
|
-
"license": "MIT",
|
|
6
|
-
"description": "Vue 3 components
|
|
7
|
-
"
|
|
8
|
-
|
|
9
|
-
"
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
"
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
"
|
|
23
|
-
"types": "./dist/
|
|
24
|
-
"import": "./dist/
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
},
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
"
|
|
45
|
-
"vue": "^3.
|
|
46
|
-
},
|
|
47
|
-
"
|
|
48
|
-
"vitepress":
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "bojuvue",
|
|
3
|
+
"version": "0.4.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"description": "Vue 3 components including a download button that serves each visitor the right build for their OS. Works in any Vue 3 app; VitePress-aware variants included.",
|
|
7
|
+
"homepage": "https://www.scottkirvan.com/BojuVue/",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/ScottKirvan/BojuVue.git"
|
|
11
|
+
},
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/ScottKirvan/BojuVue/issues"
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"dist"
|
|
17
|
+
],
|
|
18
|
+
"main": "./dist/bojuvue.js",
|
|
19
|
+
"module": "./dist/bojuvue.js",
|
|
20
|
+
"types": "./dist/index.d.ts",
|
|
21
|
+
"exports": {
|
|
22
|
+
".": {
|
|
23
|
+
"types": "./dist/index.d.ts",
|
|
24
|
+
"import": "./dist/bojuvue.js"
|
|
25
|
+
},
|
|
26
|
+
"./vitepress": {
|
|
27
|
+
"types": "./dist/vitepress.d.ts",
|
|
28
|
+
"import": "./dist/vitepress.js"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"scripts": {
|
|
32
|
+
"build": "vue-tsc -b && vite build",
|
|
33
|
+
"test": "vitest run"
|
|
34
|
+
},
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"@types/node": "^26.2.0",
|
|
37
|
+
"@vitejs/plugin-vue": "^6.0.8",
|
|
38
|
+
"@vue/test-utils": "^2.4.11",
|
|
39
|
+
"jsdom": "^29.1.1",
|
|
40
|
+
"typescript": "^5.9.3",
|
|
41
|
+
"vite": "^8.2.2",
|
|
42
|
+
"vite-plugin-dts": "^5.0.3",
|
|
43
|
+
"vitepress": "^1.6.4",
|
|
44
|
+
"vitest": "^4.1.11",
|
|
45
|
+
"vue-tsc": "^3.3.11"
|
|
46
|
+
},
|
|
47
|
+
"peerDependencies": {
|
|
48
|
+
"vitepress": "^1.6.4",
|
|
49
|
+
"vue": "^3.5.41"
|
|
50
|
+
},
|
|
51
|
+
"peerDependenciesMeta": {
|
|
52
|
+
"vitepress": {
|
|
53
|
+
"optional": true
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
"funding": [
|
|
57
|
+
{
|
|
58
|
+
"type": "github",
|
|
59
|
+
"url": "https://github.com/sponsors/ScottKirvan"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"type": "ko-fi",
|
|
63
|
+
"url": "https://ko-fi.com/ScottKirvan"
|
|
64
|
+
}
|
|
65
|
+
],
|
|
66
|
+
"keywords": [
|
|
67
|
+
"vue",
|
|
68
|
+
"vue3",
|
|
69
|
+
"vitepress",
|
|
70
|
+
"vitepress-components",
|
|
71
|
+
"vitepress-theme",
|
|
72
|
+
"component-library",
|
|
73
|
+
"download-button",
|
|
74
|
+
"platform-detection",
|
|
75
|
+
"typescript",
|
|
76
|
+
"vite"
|
|
77
|
+
]
|
|
78
|
+
}
|