diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..40f0b1d --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,23 @@ +name: CI + +on: + push: + branches: + - master + - main + pull_request: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Use Node.js + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: npm + - name: Install dependencies + run: npm ci + - name: Build package + run: npm run build diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 6f557fe..0000000 --- a/.travis.yml +++ /dev/null @@ -1,18 +0,0 @@ -language: node_js -node_js: - - "12.13" -cache: - directories: - - "node_modules" - -install: - - npm install - - npm run build - -deploy: - provider: npm - email: "$NPM_EMAIL_ADDRESS" - api_key: "$NPM_AUTH_TOKEN" - skip-cleanup: true - on: - branch: release diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..8a8a18a --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 Sergei Iudin + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md index 88a1c63..9ba0883 100644 --- a/README.md +++ b/README.md @@ -1,27 +1,99 @@ -# see-on-github Vue.js NPM Package +# see-on-github-vue [](https://badge.fury.io/js/see-on-github-vue) -[](https://travis-ci.com/yudin-s/see-on-github) +[](https://github.com/yudin-s/see-on-github-vue/actions/workflows/ci.yml) -Improve your portfolio websites by this simple component! +A small Vue 3 component that adds a sticky "See on GitHub" link to the bottom of a page. -## How to install? +## Install -`npm i see-on-github-vue -` +```bash +npm i see-on-github-vue +``` -After just put this component code: +```bash +yarn add see-on-github-vue +``` -` -` +```bash +pnpm add see-on-github-vue +``` -## Changelog +## Usage -### 1.0.5 +### Global registration -- Frontend changes for make center position correctness -- Fix huge SVG issue on Nuxt.js Run Generate issue. +```js +import { createApp } from 'vue'; +import App from './App.vue'; +import SeeOnGithub from 'see-on-github-vue'; +import 'see-on-github-vue/style.css'; +const app = createApp(App); +app.use(SeeOnGithub); +app.mount('#app'); +``` -## How it's look like? +```vue + + + +``` - +### Local component import + +```vue + + + + + +``` + +## Props + +| Prop | Type | Required | Default | Description | +| --- | --- | --- | --- | --- | +| `linkTo` | `String` | Yes | - | URL opened by the sticky link. Supports `https://`, `http://`, protocol-relative, and root-relative URLs. | +| `caption` | `String` | No | `Watch sources on GitHub` | Visible link text. | +| `target` | `String` | No | `_blank` | Anchor target. | +| `rel` | `String` | No | `''` | Anchor rel value. `noopener noreferrer` is added automatically for `_blank` targets. | +| `ariaLabel` | `String` | No | `Open source code on GitHub` | Accessible label for the anchor. | + +## Development + +```bash +npm install +npm run dev +npm run build +npm run preview +``` + +The package is built with Vite library mode and publishes ESM, CommonJS, UMD, CSS, and TypeScript declaration files from `dist/`. + +## Migration from v1 + +Version 2 targets Vue 3 and Node 18+. Vue 2 projects should stay on `see-on-github-vue@1`. + +Plugin registration changed from Vue 2's global constructor API to Vue 3's app API: + +```js +// Vue 2 / v1 +Vue.use(SeeOnGithub); + +// Vue 3 / v2 +createApp(App).use(SeeOnGithub).mount('#app'); +``` + +Template usage is still the same conceptually. In templates, use kebab-case props such as `link-to` and `aria-label`. + +## How it looks + + diff --git a/babel.config.js b/babel.config.js deleted file mode 100644 index d97bc1a..0000000 --- a/babel.config.js +++ /dev/null @@ -1,5 +0,0 @@ -module.exports = { - presets: [ - '@babel/preset-env', - ], -}; diff --git a/build/rollup.config.js b/build/rollup.config.js deleted file mode 100644 index c24882b..0000000 --- a/build/rollup.config.js +++ /dev/null @@ -1,152 +0,0 @@ -// rollup.config.js -import fs from 'fs'; -import path from 'path'; -import vue from 'rollup-plugin-vue'; -import alias from '@rollup/plugin-alias'; -import commonjs from '@rollup/plugin-commonjs'; -import replace from '@rollup/plugin-replace'; -import babel from 'rollup-plugin-babel'; -import { terser } from 'rollup-plugin-terser'; -import minimist from 'minimist'; - -// Get browserslist config and remove ie from es build targets -const esbrowserslist = fs.readFileSync('./.browserslistrc') - .toString() - .split('\n') - .filter((entry) => entry && entry.substring(0, 2) !== 'ie'); - -const argv = minimist(process.argv.slice(2)); - -const projectRoot = path.resolve(__dirname, '..'); - -const baseConfig = { - input: 'src/entry.js', - plugins: { - preVue: [ - replace({ - 'process.env.NODE_ENV': JSON.stringify('production'), - }), - alias({ - resolve: ['.js', '.jsx', '.ts', '.tsx', '.vue'], - entries: { - '@': path.resolve(projectRoot, 'src'), - }, - }), - ], - vue: { - css: true, - template: { - isProduction: true, - }, - }, - babel: { - exclude: 'node_modules/**', - extensions: ['.js', '.jsx', '.ts', '.tsx', '.vue'], - }, - }, -}; - -// ESM/UMD/IIFE shared settings: externals -// Refer to https://rollupjs.org/guide/en/#warning-treating-module-as-external-dependency -const external = [ - // list external dependencies, exactly the way it is written in the import statement. - // eg. 'jquery' - 'vue', -]; - -// UMD/IIFE shared settings: output.globals -// Refer to https://rollupjs.org/guide/en#output-globals for details -const globals = { - // Provide global variable names to replace your external imports - // eg. jquery: '$' - vue: 'Vue', -}; - -// Customize configs for individual targets -const buildFormats = []; -if (!argv.format || argv.format === 'es') { - const esConfig = { - ...baseConfig, - external, - output: { - file: 'dist/see-on-github-vue.esm.js', - format: 'esm', - exports: 'named', - }, - plugins: [ - ...baseConfig.plugins.preVue, - vue(baseConfig.plugins.vue), - babel({ - ...baseConfig.plugins.babel, - presets: [ - [ - '@babel/preset-env', - { - targets: esbrowserslist, - }, - ], - ], - }), - commonjs(), - ], - }; - buildFormats.push(esConfig); -} - -if (!argv.format || argv.format === 'cjs') { - const umdConfig = { - ...baseConfig, - external, - output: { - compact: true, - file: 'dist/see-on-github-vue.ssr.js', - format: 'cjs', - name: 'SeeOnGithub', - exports: 'named', - globals, - }, - plugins: [ - ...baseConfig.plugins.preVue, - vue({ - ...baseConfig.plugins.vue, - template: { - ...baseConfig.plugins.vue.template, - optimizeSSR: true, - }, - }), - babel(baseConfig.plugins.babel), - commonjs(), - ], - }; - buildFormats.push(umdConfig); -} - -if (!argv.format || argv.format === 'iife') { - const unpkgConfig = { - ...baseConfig, - external, - output: { - compact: true, - file: 'dist/see-on-github-vue.min.js', - format: 'iife', - name: 'SeeOnGithub', - exports: 'named', - globals, - }, - plugins: [ - ...baseConfig.plugins.preVue, - vue(baseConfig.plugins.vue), - babel(baseConfig.plugins.babel), - commonjs(), - terser({ - output: { - ecma: 5, - }, - }), - ], - }; - buildFormats.push(unpkgConfig); -} - -// Export config -export default buildFormats; diff --git a/dist/index.d.ts b/dist/index.d.ts new file mode 100644 index 0000000..b8082b3 --- /dev/null +++ b/dist/index.d.ts @@ -0,0 +1,22 @@ +import type { App, DefineComponent } from 'vue'; + +export interface SeeOnGithubProps { + linkTo: string; + caption?: string; + target?: string; + rel?: string; + ariaLabel?: string; +} + +declare const SeeOnGithub: DefineComponent & { + install(app: App, options?: { name?: string }): void; +}; + +declare const SeeOnGithubPlugin: { + install(app: App, options?: { name?: string }): void; +}; + +declare function install(app: App, options?: { name?: string }): void; + +export { SeeOnGithub, SeeOnGithubPlugin, install }; +export default SeeOnGithub; diff --git a/dist/see-on-github-vue.cjs b/dist/see-on-github-vue.cjs new file mode 100644 index 0000000..eb84a10 --- /dev/null +++ b/dist/see-on-github-vue.cjs @@ -0,0 +1 @@ +"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("vue"),c=(e,r)=>{const t=e.__vccOpts||e;for(const[o,s]of r)t[o]=s;return t},u={name:"SeeOnGithub",props:{linkTo:{type:String,required:!0,validator:e=>e.startsWith("http://")||e.startsWith("https://")||e.startsWith("//")||e.startsWith("/")},caption:{type:String,default:"Watch sources on GitHub"},target:{type:String,default:"_blank"},rel:{type:String,default:""},ariaLabel:{type:String,default:"Open source code on GitHub"}},computed:{safeRel(){if(this.target!=="_blank")return this.rel||null;const e=new Set(this.rel.split(" ").filter(Boolean));return e.add("noopener"),e.add("noreferrer"),Array.from(e).join(" ")}}},d={class:"see-on-github"},h=["href","target","rel","aria-label"],g={class:"see-on-github__caption"};function _(e,r,t,o,s,l){return n.openBlock(),n.createElementBlock("div",d,[n.createElementVNode("a",{class:"see-on-github__container",href:t.linkTo,target:t.target,rel:l.safeRel,"aria-label":t.ariaLabel},[r[0]||(r[0]=n.createElementVNode("span",{class:"see-on-github__icon","aria-hidden":"true"},[n.createElementVNode("svg",{role:"img",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[n.createElementVNode("title",null,"GitHub"),n.createElementVNode("path",{d:"M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"})])],-1)),n.createElementVNode("span",g,n.toDisplayString(t.caption),1)],8,h)])}const a=c(u,[["render",_]]),i=function(r,t={}){r.component(t.name||a.name||"SeeOnGithub",a)},b={install:i};a.install=i;exports.SeeOnGithub=a;exports.SeeOnGithubPlugin=b;exports.default=a;exports.install=i; diff --git a/dist/see-on-github-vue.css b/dist/see-on-github-vue.css new file mode 100644 index 0000000..e233fcc --- /dev/null +++ b/dist/see-on-github-vue.css @@ -0,0 +1 @@ +.see-on-github{position:fixed;right:0;bottom:0;left:0;z-index:2147483647;display:flex;justify-content:center;width:100%;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;font-size:.875rem;line-height:1.3;pointer-events:none}.see-on-github__container{display:inline-flex;align-items:center;gap:.4rem;max-width:calc(100vw - 1rem);min-height:2rem;padding:.35rem .7rem;color:#24292f;text-decoration:none;pointer-events:auto;background:#f6f8fa;border:1px solid #d0d7de;border-bottom:0;border-top-left-radius:8px;border-top-right-radius:8px;box-shadow:0 -2px 10px #1b1f2414;transition:color .16s ease,background-color .16s ease,border-color .16s ease}.see-on-github__container:hover,.see-on-github__container:focus-visible{color:#0969da;background:#fff;border-color:#0969da;outline:none}.see-on-github__icon{display:inline-flex;width:1.15rem;height:1.15rem;flex:0 0 auto}.see-on-github__icon svg{width:100%;height:100%;fill:currentColor}.see-on-github__caption{overflow:hidden;text-overflow:ellipsis;white-space:nowrap} diff --git a/dist/see-on-github-vue.esm.js b/dist/see-on-github-vue.esm.js deleted file mode 100644 index 436db30..0000000 --- a/dist/see-on-github-vue.esm.js +++ /dev/null @@ -1,262 +0,0 @@ -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -var script = { - name: 'SeeOnGithub', - - // vue component name - data() { - return {}; - }, - - props: { - linkTo: { - type: String - }, - caption: { - type: String, - default: "Watch sources on GitHub" - } - } -}; - -function normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier /* server only */, shadowMode, createInjector, createInjectorSSR, createInjectorShadow) { - if (typeof shadowMode !== 'boolean') { - createInjectorSSR = createInjector; - createInjector = shadowMode; - shadowMode = false; - } - // Vue.extend constructor export interop. - const options = typeof script === 'function' ? script.options : script; - // render functions - if (template && template.render) { - options.render = template.render; - options.staticRenderFns = template.staticRenderFns; - options._compiled = true; - // functional template - if (isFunctionalTemplate) { - options.functional = true; - } - } - // scopedId - if (scopeId) { - options._scopeId = scopeId; - } - let hook; - if (moduleIdentifier) { - // server build - hook = function (context) { - // 2.3 injection - context = - context || // cached call - (this.$vnode && this.$vnode.ssrContext) || // stateful - (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext); // functional - // 2.2 with runInNewContext: true - if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') { - context = __VUE_SSR_CONTEXT__; - } - // inject component styles - if (style) { - style.call(this, createInjectorSSR(context)); - } - // register component module identifier for async chunk inference - if (context && context._registeredComponents) { - context._registeredComponents.add(moduleIdentifier); - } - }; - // used by ssr in case component is cached and beforeCreate - // never gets called - options._ssrRegister = hook; - } - else if (style) { - hook = shadowMode - ? function (context) { - style.call(this, createInjectorShadow(context, this.$root.$options.shadowRoot)); - } - : function (context) { - style.call(this, createInjector(context)); - }; - } - if (hook) { - if (options.functional) { - // register for functional component in vue file - const originalRender = options.render; - options.render = function renderWithStyleInjection(h, context) { - hook.call(context); - return originalRender(h, context); - }; - } - else { - // inject component registration as beforeCreate hook - const existing = options.beforeCreate; - options.beforeCreate = existing ? [].concat(existing, hook) : [hook]; - } - } - return script; -} - -const isOldIE = typeof navigator !== 'undefined' && - /msie [6-9]\\b/.test(navigator.userAgent.toLowerCase()); -function createInjector(context) { - return (id, style) => addStyle(id, style); -} -let HEAD; -const styles = {}; -function addStyle(id, css) { - const group = isOldIE ? css.media || 'default' : id; - const style = styles[group] || (styles[group] = { ids: new Set(), styles: [] }); - if (!style.ids.has(id)) { - style.ids.add(id); - let code = css.source; - if (css.map) { - // https://developer.chrome.com/devtools/docs/javascript-debugging - // this makes source maps inside style tags work properly in Chrome - code += '\n/*# sourceURL=' + css.map.sources[0] + ' */'; - // http://stackoverflow.com/a/26603875 - code += - '\n/*# sourceMappingURL=data:application/json;base64,' + - btoa(unescape(encodeURIComponent(JSON.stringify(css.map)))) + - ' */'; - } - if (!style.element) { - style.element = document.createElement('style'); - style.element.type = 'text/css'; - if (css.media) - style.element.setAttribute('media', css.media); - if (HEAD === undefined) { - HEAD = document.head || document.getElementsByTagName('head')[0]; - } - HEAD.appendChild(style.element); - } - if ('styleSheet' in style.element) { - style.styles.push(code); - style.element.styleSheet.cssText = style.styles - .filter(Boolean) - .join('\n'); - } - else { - const index = style.ids.size - 1; - const textNode = document.createTextNode(code); - const nodes = style.element.childNodes; - if (nodes[index]) - style.element.removeChild(nodes[index]); - if (nodes.length) - style.element.insertBefore(textNode, nodes[index]); - else - style.element.appendChild(textNode); - } - } -} - -/* script */ -const __vue_script__ = script; -/* template */ - -var __vue_render__ = function () { - var _vm = this; - - var _h = _vm.$createElement; - - var _c = _vm._self._c || _h; - - return _c('div', { - staticClass: "see-on-github" - }, [_c('a', { - staticClass: "see-on-github__container", - attrs: { - "href": _vm.linkTo, - "target": "_blank" - } - }, [_c('div', { - staticClass: "see-on-github__icon" - }, [_c('svg', { - attrs: { - "role": "img", - "viewBox": "0 0 24 24", - "xmlns": "http://www.w3.org/2000/svg" - } - }, [_c('title', [_vm._v("GitHub Icon")]), _vm._v(" "), _c('path', { - attrs: { - "d": "M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12" - } - })])]), _vm._v("\n " + _vm._s(_vm.caption) + "\n ")])]); -}; - -var __vue_staticRenderFns__ = []; -/* style */ - -const __vue_inject_styles__ = function (inject) { - if (!inject) return; - inject("data-v-27b19afc_0", { - source: ".see-on-github{position:fixed;bottom:0;display:flex;justify-content:center;width:100%;font-family:Roboto,sans-serif;font-size:.8em}.see-on-github__container{display:flex;align-items:center;text-decoration:none;color:#586069;background:#f6f8fa;border-top:1px solid #d1d5da;border-left:1px solid #d1d5da;border-right:1px solid #d1d5da;border-top-left-radius:8px;border-top-right-radius:8px;padding:5px}.see-on-github__container:hover{color:#0080fe}.see-on-github__icon{width:20px;margin-right:5px}", - map: undefined, - media: undefined - }); -}; -/* scoped */ - - -const __vue_scope_id__ = undefined; -/* module identifier */ - -const __vue_module_identifier__ = undefined; -/* functional template */ - -const __vue_is_functional_template__ = false; -/* style inject SSR */ - -/* style inject shadow dom */ - -const __vue_component__ = normalizeComponent({ - render: __vue_render__, - staticRenderFns: __vue_staticRenderFns__ -}, __vue_inject_styles__, __vue_script__, __vue_scope_id__, __vue_is_functional_template__, __vue_module_identifier__, false, createInjector, undefined, undefined); - -// Import vue component - -const install = function installSeeOnGithub(Vue) { - if (install.installed) return; - install.installed = true; - Vue.component('SeeOnGithub', __vue_component__); -}; // Create module definition for Vue.use() - - -const plugin = { - install -}; // To auto-install when vue is found -// eslint-disable-next-line no-redeclare - -/* global window, global */ - -let GlobalVue = null; - -if (typeof window !== 'undefined') { - GlobalVue = window.Vue; -} else if (typeof global !== 'undefined') { - GlobalVue = global.Vue; -} - -if (GlobalVue) { - GlobalVue.use(plugin); -} // Inject install function into component - allows component -// to be registered via Vue.use() as well as Vue.component() - - -__vue_component__.install = install; // Export component by default -// also be used as directives, etc. - eg. import { RollupDemoDirective } from 'rollup-demo'; -// export const RollupDemoDirective = component; - -export default __vue_component__; diff --git a/dist/see-on-github-vue.global.js b/dist/see-on-github-vue.global.js new file mode 100644 index 0000000..b6021bb --- /dev/null +++ b/dist/see-on-github-vue.global.js @@ -0,0 +1 @@ +(function(n,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(n=typeof globalThis<"u"?globalThis:n||self,e(n.SeeOnGithubVue={},n.Vue))})(this,(function(n,e){"use strict";const c=(t,r)=>{const i=t.__vccOpts||t;for(const[s,l]of r)i[s]=l;return i},u={name:"SeeOnGithub",props:{linkTo:{type:String,required:!0,validator:t=>t.startsWith("http://")||t.startsWith("https://")||t.startsWith("//")||t.startsWith("/")},caption:{type:String,default:"Watch sources on GitHub"},target:{type:String,default:"_blank"},rel:{type:String,default:""},ariaLabel:{type:String,default:"Open source code on GitHub"}},computed:{safeRel(){if(this.target!=="_blank")return this.rel||null;const t=new Set(this.rel.split(" ").filter(Boolean));return t.add("noopener"),t.add("noreferrer"),Array.from(t).join(" ")}}},d={class:"see-on-github"},h=["href","target","rel","aria-label"],f={class:"see-on-github__caption"};function p(t,r,i,s,l,b){return e.openBlock(),e.createElementBlock("div",d,[e.createElementVNode("a",{class:"see-on-github__container",href:i.linkTo,target:i.target,rel:b.safeRel,"aria-label":i.ariaLabel},[r[0]||(r[0]=e.createElementVNode("span",{class:"see-on-github__icon","aria-hidden":"true"},[e.createElementVNode("svg",{role:"img",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("title",null,"GitHub"),e.createElementVNode("path",{d:"M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"})])],-1)),e.createElementVNode("span",f,e.toDisplayString(i.caption),1)],8,h)])}const a=c(u,[["render",p]]),o=function(r,i={}){r.component(i.name||a.name||"SeeOnGithub",a)},_={install:o};a.install=o,n.SeeOnGithub=a,n.SeeOnGithubPlugin=_,n.default=a,n.install=o,Object.defineProperties(n,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})})); diff --git a/dist/see-on-github-vue.js b/dist/see-on-github-vue.js new file mode 100644 index 0000000..c9d8a72 --- /dev/null +++ b/dist/see-on-github-vue.js @@ -0,0 +1,76 @@ +import { openBlock as c, createElementBlock as u, createElementVNode as r, toDisplayString as h } from "vue"; +const d = (t, n) => { + const e = t.__vccOpts || t; + for (const [i, s] of n) + e[i] = s; + return e; +}, p = { + name: "SeeOnGithub", + props: { + linkTo: { + type: String, + required: !0, + validator: (t) => t.startsWith("http://") || t.startsWith("https://") || t.startsWith("//") || t.startsWith("/") + }, + caption: { + type: String, + default: "Watch sources on GitHub" + }, + target: { + type: String, + default: "_blank" + }, + rel: { + type: String, + default: "" + }, + ariaLabel: { + type: String, + default: "Open source code on GitHub" + } + }, + computed: { + safeRel() { + if (this.target !== "_blank") + return this.rel || null; + const t = new Set(this.rel.split(" ").filter(Boolean)); + return t.add("noopener"), t.add("noreferrer"), Array.from(t).join(" "); + } + } +}, _ = { class: "see-on-github" }, g = ["href", "target", "rel", "aria-label"], f = { class: "see-on-github__caption" }; +function b(t, n, e, i, s, l) { + return c(), u("div", _, [ + r("a", { + class: "see-on-github__container", + href: e.linkTo, + target: e.target, + rel: l.safeRel, + "aria-label": e.ariaLabel + }, [ + n[0] || (n[0] = r("span", { + class: "see-on-github__icon", + "aria-hidden": "true" + }, [ + r("svg", { + role: "img", + viewBox: "0 0 24 24", + xmlns: "http://www.w3.org/2000/svg" + }, [ + r("title", null, "GitHub"), + r("path", { d: "M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12" }) + ]) + ], -1)), + r("span", f, h(e.caption), 1) + ], 8, g) + ]); +} +const a = /* @__PURE__ */ d(p, [["render", b]]), o = function(n, e = {}) { + n.component(e.name || a.name || "SeeOnGithub", a); +}, S = { install: o }; +a.install = o; +export { + a as SeeOnGithub, + S as SeeOnGithubPlugin, + a as default, + o as install +}; diff --git a/dist/see-on-github-vue.min.js b/dist/see-on-github-vue.min.js deleted file mode 100644 index f7178f3..0000000 --- a/dist/see-on-github-vue.min.js +++ /dev/null @@ -1 +0,0 @@ -var SeeOnGithub=function(e){"use strict";var t={name:"SeeOnGithub",data:function(){return{}},props:{linkTo:{type:String},caption:{type:String,default:"Watch sources on GitHub"}}};const n="undefined"!=typeof navigator&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());let o;const i={};var s=function(e,t,n,o,i,s,a,r,d,l){"boolean"!=typeof a&&(d=r,r=a,a=!1);const c="function"==typeof n?n.options:n;let u;if(e&&e.render&&(c.render=e.render,c.staticRenderFns=e.staticRenderFns,c._compiled=!0,i&&(c.functional=!0)),o&&(c._scopeId=o),s?(u=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),t&&t.call(this,d(e)),e&&e._registeredComponents&&e._registeredComponents.add(s)},c._ssrRegister=u):t&&(u=a?function(e){t.call(this,l(e,this.$root.$options.shadowRoot))}:function(e){t.call(this,r(e))}),u)if(c.functional){const e=c.render;c.render=function(t,n){return u.call(n),e(t,n)}}else{const e=c.beforeCreate;c.beforeCreate=e?[].concat(e,u):[u]}return n}({render:function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"see-on-github"},[t("a",{staticClass:"see-on-github__container",attrs:{href:this.linkTo,target:"_blank"}},[t("div",{staticClass:"see-on-github__icon"},[t("svg",{attrs:{role:"img",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"}},[t("title",[this._v("GitHub Icon")]),this._v(" "),t("path",{attrs:{d:"M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"}})])]),this._v("\n "+this._s(this.caption)+"\n ")])])},staticRenderFns:[]},(function(e){e&&e("data-v-27b19afc_0",{source:".see-on-github{position:fixed;bottom:0;display:flex;justify-content:center;width:100%;font-family:Roboto,sans-serif;font-size:.8em}.see-on-github__container{display:flex;align-items:center;text-decoration:none;color:#586069;background:#f6f8fa;border-top:1px solid #d1d5da;border-left:1px solid #d1d5da;border-right:1px solid #d1d5da;border-top-left-radius:8px;border-top-right-radius:8px;padding:5px}.see-on-github__container:hover{color:#0080fe}.see-on-github__icon{width:20px;margin-right:5px}",map:void 0,media:void 0})}),t,void 0,!1,void 0,!1,(function(e){return(e,t)=>function(e,t){const s=n?t.media||"default":e,a=i[s]||(i[s]={ids:new Set,styles:[]});if(!a.ids.has(e)){a.ids.add(e);let n=t.source;if(t.map&&(n+="\n/*# sourceURL="+t.map.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(t.map))))+" */"),a.element||(a.element=document.createElement("style"),a.element.type="text/css",t.media&&a.element.setAttribute("media",t.media),void 0===o&&(o=document.head||document.getElementsByTagName("head")[0]),o.appendChild(a.element)),"styleSheet"in a.element)a.styles.push(n),a.element.styleSheet.cssText=a.styles.filter(Boolean).join("\n");else{const e=a.ids.size-1,t=document.createTextNode(n),o=a.element.childNodes;o[e]&&a.element.removeChild(o[e]),o.length?a.element.insertBefore(t,o[e]):a.element.appendChild(t)}}}(e,t)}),void 0,void 0),a=function(e){a.installed||(a.installed=!0,e.component("SeeOnGithub",s))},r={install:a},d=null;return"undefined"!=typeof window?d=window.Vue:"undefined"!=typeof global&&(d=global.Vue),d&&d.use(r),s.install=a,e.default=s,e}({}); \ No newline at end of file diff --git a/dist/see-on-github-vue.ssr.js b/dist/see-on-github-vue.ssr.js deleted file mode 100644 index 0ad5bfc..0000000 --- a/dist/see-on-github-vue.ssr.js +++ /dev/null @@ -1,220 +0,0 @@ -'use strict';Object.defineProperty(exports,'__esModule',{value:true});// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -var script = { - name: 'SeeOnGithub', - // vue component name - data: function data() { - return {}; - }, - props: { - linkTo: { - type: String - }, - caption: { - type: String, - default: "Watch sources on GitHub" - } - } -};function normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier /* server only */, shadowMode, createInjector, createInjectorSSR, createInjectorShadow) { - if (typeof shadowMode !== 'boolean') { - createInjectorSSR = createInjector; - createInjector = shadowMode; - shadowMode = false; - } - // Vue.extend constructor export interop. - const options = typeof script === 'function' ? script.options : script; - // render functions - if (template && template.render) { - options.render = template.render; - options.staticRenderFns = template.staticRenderFns; - options._compiled = true; - // functional template - if (isFunctionalTemplate) { - options.functional = true; - } - } - // scopedId - if (scopeId) { - options._scopeId = scopeId; - } - let hook; - if (moduleIdentifier) { - // server build - hook = function (context) { - // 2.3 injection - context = - context || // cached call - (this.$vnode && this.$vnode.ssrContext) || // stateful - (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext); // functional - // 2.2 with runInNewContext: true - if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') { - context = __VUE_SSR_CONTEXT__; - } - // inject component styles - if (style) { - style.call(this, createInjectorSSR(context)); - } - // register component module identifier for async chunk inference - if (context && context._registeredComponents) { - context._registeredComponents.add(moduleIdentifier); - } - }; - // used by ssr in case component is cached and beforeCreate - // never gets called - options._ssrRegister = hook; - } - else if (style) { - hook = shadowMode - ? function (context) { - style.call(this, createInjectorShadow(context, this.$root.$options.shadowRoot)); - } - : function (context) { - style.call(this, createInjector(context)); - }; - } - if (hook) { - if (options.functional) { - // register for functional component in vue file - const originalRender = options.render; - options.render = function renderWithStyleInjection(h, context) { - hook.call(context); - return originalRender(h, context); - }; - } - else { - // inject component registration as beforeCreate hook - const existing = options.beforeCreate; - options.beforeCreate = existing ? [].concat(existing, hook) : [hook]; - } - } - return script; -}function createInjectorSSR(context) { - if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') { - context = __VUE_SSR_CONTEXT__; - } - if (!context) - return () => { }; - if (!('styles' in context)) { - context._styles = context._styles || {}; - Object.defineProperty(context, 'styles', { - enumerable: true, - get: () => context._renderStyles(context._styles) - }); - context._renderStyles = context._renderStyles || renderStyles; - } - return (id, style) => addStyle(id, style, context); -} -function addStyle(id, css, context) { - const group = css.media || 'default' ; - const style = context._styles[group] || (context._styles[group] = { ids: [], css: '' }); - if (!style.ids.includes(id)) { - style.media = css.media; - style.ids.push(id); - let code = css.source; - style.css += code + '\n'; - } -} -function renderStyles(styles) { - let css = ''; - for (const key in styles) { - const style = styles[key]; - css += - ''; - } - return css; -}/* script */ -var __vue_script__ = script; -/* template */ - -var __vue_render__ = function __vue_render__() { - var _vm = this; - - var _h = _vm.$createElement; - - var _c = _vm._self._c || _h; - - return _c('div', { - staticClass: "see-on-github" - }, [_vm._ssrNode("GitHub Icon " + _vm._ssrEscape("\n " + _vm._s(_vm.caption) + "\n ") + "")]); -}; - -var __vue_staticRenderFns__ = []; -/* style */ - -var __vue_inject_styles__ = function __vue_inject_styles__(inject) { - if (!inject) return; - inject("data-v-27b19afc_0", { - source: ".see-on-github{position:fixed;bottom:0;display:flex;justify-content:center;width:100%;font-family:Roboto,sans-serif;font-size:.8em}.see-on-github__container{display:flex;align-items:center;text-decoration:none;color:#586069;background:#f6f8fa;border-top:1px solid #d1d5da;border-left:1px solid #d1d5da;border-right:1px solid #d1d5da;border-top-left-radius:8px;border-top-right-radius:8px;padding:5px}.see-on-github__container:hover{color:#0080fe}.see-on-github__icon{width:20px;margin-right:5px}", - map: undefined, - media: undefined - }); -}; -/* scoped */ - - -var __vue_scope_id__ = undefined; -/* module identifier */ - -var __vue_module_identifier__ = "data-v-27b19afc"; -/* functional template */ - -var __vue_is_functional_template__ = false; -/* style inject shadow dom */ - -var __vue_component__ = normalizeComponent({ - render: __vue_render__, - staticRenderFns: __vue_staticRenderFns__ -}, __vue_inject_styles__, __vue_script__, __vue_scope_id__, __vue_is_functional_template__, __vue_module_identifier__, false, undefined, createInjectorSSR, undefined);// Import vue component - -var install = function installSeeOnGithub(Vue) { - if (install.installed) return; - install.installed = true; - Vue.component('SeeOnGithub', __vue_component__); -}; // Create module definition for Vue.use() - - -var plugin = { - install: install -}; // To auto-install when vue is found -// eslint-disable-next-line no-redeclare - -/* global window, global */ - -var GlobalVue = null; - -if (typeof window !== 'undefined') { - GlobalVue = window.Vue; -} else if (typeof global !== 'undefined') { - GlobalVue = global.Vue; -} - -if (GlobalVue) { - GlobalVue.use(plugin); -} // Inject install function into component - allows component -// to be registered via Vue.use() as well as Vue.component() - - -__vue_component__.install = install; // Export component by default -// also be used as directives, etc. - eg. import { RollupDemoDirective } from 'rollup-demo'; -// export const RollupDemoDirective = component; -exports.default=__vue_component__; \ No newline at end of file diff --git a/index.html b/index.html new file mode 100644 index 0000000..902891f --- /dev/null +++ b/index.html @@ -0,0 +1,12 @@ + + + + + + see-on-github-vue demo + + + + + + diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..f5c2459 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,1352 @@ +{ + "name": "see-on-github-vue", + "version": "2.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "see-on-github-vue", + "version": "2.0.0", + "license": "MIT", + "devDependencies": { + "@vitejs/plugin-vue": "^5.2.1", + "vite": "^6.0.7", + "vue": "^3.5.13" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "vue": "^3.3.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz", + "integrity": "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.28.5.tgz", + "integrity": "sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/parser": { + "version": "7.29.3", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.3.tgz", + "integrity": "sha512-b3ctpQwp+PROvU/cttc4OYl4MzfJUWy6FZg+PMXfzmt/+39iHVF0sDfqay8TQM3JA2EUOyKcFZt75jWriQijsA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.29.0" + }, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/types": { + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.0.tgz", + "integrity": "sha512-LwdZHpScM4Qz8Xw2iKSzS+cfglZzJGvofQICy7W7v4caru4EaAmyUuO6BGrbyQ2mYV11W0U8j5mBhd14dd3B0A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-string-parser": "^7.27.1", + "@babel/helper-validator-identifier": "^7.28.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.12.tgz", + "integrity": "sha512-Hhmwd6CInZ3dwpuGTF8fJG6yoWmsToE+vYgD4nytZVxcu1ulHpUQRAB1UJ8+N1Am3Mz4+xOByoQoSZf4D+CpkA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.12.tgz", + "integrity": "sha512-VJ+sKvNA/GE7Ccacc9Cha7bpS8nyzVv0jdVgwNDaR4gDMC/2TTRc33Ip8qrNYUcpkOHUT5OZ0bUcNNVZQ9RLlg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.12.tgz", + "integrity": "sha512-6AAmLG7zwD1Z159jCKPvAxZd4y/VTO0VkprYy+3N2FtJ8+BQWFXU+OxARIwA46c5tdD9SsKGZ/1ocqBS/gAKHg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.12.tgz", + "integrity": "sha512-5jbb+2hhDHx5phYR2By8GTWEzn6I9UqR11Kwf22iKbNpYrsmRB18aX/9ivc5cabcUiAT/wM+YIZ6SG9QO6a8kg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.12.tgz", + "integrity": "sha512-N3zl+lxHCifgIlcMUP5016ESkeQjLj/959RxxNYIthIg+CQHInujFuXeWbWMgnTo4cp5XVHqFPmpyu9J65C1Yg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.12.tgz", + "integrity": "sha512-HQ9ka4Kx21qHXwtlTUVbKJOAnmG1ipXhdWTmNXiPzPfWKpXqASVcWdnf2bnL73wgjNrFXAa3yYvBSd9pzfEIpA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.12.tgz", + "integrity": "sha512-gA0Bx759+7Jve03K1S0vkOu5Lg/85dou3EseOGUes8flVOGxbhDDh/iZaoek11Y8mtyKPGF3vP8XhnkDEAmzeg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.12.tgz", + "integrity": "sha512-TGbO26Yw2xsHzxtbVFGEXBFH0FRAP7gtcPE7P5yP7wGy7cXK2oO7RyOhL5NLiqTlBh47XhmIUXuGciXEqYFfBQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.12.tgz", + "integrity": "sha512-lPDGyC1JPDou8kGcywY0YILzWlhhnRjdof3UlcoqYmS9El818LLfJJc3PXXgZHrHCAKs/Z2SeZtDJr5MrkxtOw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.12.tgz", + "integrity": "sha512-8bwX7a8FghIgrupcxb4aUmYDLp8pX06rGh5HqDT7bB+8Rdells6mHvrFHHW2JAOPZUbnjUpKTLg6ECyzvas2AQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.12.tgz", + "integrity": "sha512-0y9KrdVnbMM2/vG8KfU0byhUN+EFCny9+8g202gYqSSVMonbsCfLjUO+rCci7pM0WBEtz+oK/PIwHkzxkyharA==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.12.tgz", + "integrity": "sha512-h///Lr5a9rib/v1GGqXVGzjL4TMvVTv+s1DPoxQdz7l/AYv6LDSxdIwzxkrPW438oUXiDtwM10o9PmwS/6Z0Ng==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.12.tgz", + "integrity": "sha512-iyRrM1Pzy9GFMDLsXn1iHUm18nhKnNMWscjmp4+hpafcZjrr2WbT//d20xaGljXDBYHqRcl8HnxbX6uaA/eGVw==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.12.tgz", + "integrity": "sha512-9meM/lRXxMi5PSUqEXRCtVjEZBGwB7P/D4yT8UG/mwIdze2aV4Vo6U5gD3+RsoHXKkHCfSxZKzmDssVlRj1QQA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.12.tgz", + "integrity": "sha512-Zr7KR4hgKUpWAwb1f3o5ygT04MzqVrGEGXGLnj15YQDJErYu/BGg+wmFlIDOdJp0PmB0lLvxFIOXZgFRrdjR0w==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.12.tgz", + "integrity": "sha512-MsKncOcgTNvdtiISc/jZs/Zf8d0cl/t3gYWX8J9ubBnVOwlk65UIEEvgBORTiljloIWnBzLs4qhzPkJcitIzIg==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.12.tgz", + "integrity": "sha512-uqZMTLr/zR/ed4jIGnwSLkaHmPjOjJvnm6TVVitAa08SLS9Z0VM8wIRx7gWbJB5/J54YuIMInDquWyYvQLZkgw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.12.tgz", + "integrity": "sha512-xXwcTq4GhRM7J9A8Gv5boanHhRa/Q9KLVmcyXHCTaM4wKfIpWkdXiMog/KsnxzJ0A1+nD+zoecuzqPmCRyBGjg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.12.tgz", + "integrity": "sha512-Ld5pTlzPy3YwGec4OuHh1aCVCRvOXdH8DgRjfDy/oumVovmuSzWfnSJg+VtakB9Cm0gxNO9BzWkj6mtO1FMXkQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.12.tgz", + "integrity": "sha512-fF96T6KsBo/pkQI950FARU9apGNTSlZGsv1jZBAlcLL1MLjLNIWPBkj5NlSz8aAzYKg+eNqknrUJ24QBybeR5A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.12.tgz", + "integrity": "sha512-MZyXUkZHjQxUvzK7rN8DJ3SRmrVrke8ZyRusHlP+kuwqTcfWLyqMOE3sScPPyeIXN/mDJIfGXvcMqCgYKekoQw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openharmony-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.12.tgz", + "integrity": "sha512-rm0YWsqUSRrjncSXGA7Zv78Nbnw4XL6/dzr20cyrQf7ZmRcsovpcRBdhD43Nuk3y7XIoW2OxMVvwuRvk9XdASg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.12.tgz", + "integrity": "sha512-3wGSCDyuTHQUzt0nV7bocDy72r2lI33QL3gkDNGkod22EsYl04sMf0qLb8luNKTOmgF/eDEDP5BFNwoBKH441w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.12.tgz", + "integrity": "sha512-rMmLrur64A7+DKlnSuwqUdRKyd3UE7oPJZmnljqEptesKM8wx9J8gx5u0+9Pq0fQQW8vqeKebwNXdfOyP+8Bsg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.12.tgz", + "integrity": "sha512-HkqnmmBoCbCwxUKKNPBixiWDGCpQGVsrQfJoVGYLPT41XWF8lHuE5N6WhVia2n4o5QK5M4tYr21827fNhi4byQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.12.tgz", + "integrity": "sha512-alJC0uCZpTFrSL0CCDjcgleBXPnCrEAhTBILpeAp7M/OFgoqtAetfBzX0xM00MUsVVPpVjlPuMbREqnZCXaTnA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", + "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", + "dev": true, + "license": "MIT" + }, + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.60.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.60.4.tgz", + "integrity": "sha512-F5QXMSiFebS9hKZj02XhWLLnRpJ3B3AROP0tWbFBSj+6kCbg5m9j5JoHKd4mmSVy5mS/IMQloYgYxCuJC0fxEQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.60.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.60.4.tgz", + "integrity": "sha512-GxxTKApUpzRhof7poWvCJHRF51C67u1R7D6DiluBE8wKU1u5GWE8t+v81JvJYtbawoBFX1hLv5Ei4eVjkWokaw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.60.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.60.4.tgz", + "integrity": "sha512-tua0TaJxMOB1R0V0RS1jFZ/RpURFDJIOR2A6jWwQeawuFyS4gBW+rntLRaQd0EQ4bd6Vp44Z2rXW+YYDBsj6IA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.60.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.60.4.tgz", + "integrity": "sha512-CSKq7MsP+5PFIcydhAiR1K0UhEI1A2jWXVKHPCBZ151yOutENwvnPocgVHkivu2kviURtCEB6zUQw0vs8RrhMg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-freebsd-arm64": { + "version": "4.60.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.60.4.tgz", + "integrity": "sha512-+O8OkVdyvXMtJEciu2wS/pzm1IxntEEQx3z5TAVy4l32G0etZn+RsA48ARRrFm6Ri8fvqPQfgrvNxSjKAbnd3g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-freebsd-x64": { + "version": "4.60.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.60.4.tgz", + "integrity": "sha512-Iw3oMskH3AfNuhU0MSN7vNbdi4me/NiYo2azqPz/Le16zHSa+3RRmliCMWWQmh4lcndccU40xcJuTYJZxNo/lw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.60.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.60.4.tgz", + "integrity": "sha512-EIPRXTVQpHyF8WOo219AD2yEltPehLTcTMz2fn6JsatLYSzQf00hj3rulF+yauOlF9/FtM2WpkT/hJh/KJFGhA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.60.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.60.4.tgz", + "integrity": "sha512-J3Yh9PzzF1Ovah2At+lHiGQdsYgArxBbXv/zHfSyaiFQEqvNv7DcW98pCrmdjCZBrqBiKrKKe2V+aaSGWuBe/w==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.60.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.60.4.tgz", + "integrity": "sha512-BFDEZMYfUvLn37ONE1yMBojPxnMlTFsdyNoqncT0qFq1mAfllL+ATMMJd8TeuVMiX84s1KbcxcZbXInmcO2mRg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.60.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.60.4.tgz", + "integrity": "sha512-pc9EYOSlOgdQ2uPl1o9PF6/kLSgaUosia7gOuS8mB69IxJvlclko1MECXysjs5ryez1/5zjYqx3+xYU0TU6R1A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-gnu": { + "version": "4.60.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.60.4.tgz", + "integrity": "sha512-NxnomyxYerDh5n4iLrNa+sH+Z+U4BMEE46V2PgQ/hoB909i8gV1M5wPojWg9fk1jWpO3IQnOs20K4wyZuFLEFQ==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-musl": { + "version": "4.60.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.60.4.tgz", + "integrity": "sha512-nbJnQ8a3z1mtmrwImCYhc6BGpThAyYVRQxw9uKSKG4wR6aAYno9sVjJ0zaZcW9BPJX1GbrDPf+SvdWjgTuDmnw==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-gnu": { + "version": "4.60.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.60.4.tgz", + "integrity": "sha512-2EU6acNrQLd8tYvo/LXW535wupT3m6fo7HKo6lr7ktQoItxTyOL1ZCR/GfGCuXl2vR+zmfI6eRXkSemafv+iVg==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-musl": { + "version": "4.60.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.60.4.tgz", + "integrity": "sha512-WeBtoMuaMxiiIrO2IYP3xs6GMWkJP2C0EoT8beTLkUPmzV1i/UcOSVw1d5r9KBODtHKilG5yFxsGRnBbK3wJ4A==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.60.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.60.4.tgz", + "integrity": "sha512-FJHFfqpKUI3A10WrWKiFbBZ7yVbGT4q4B5o1qKFFojqpaYoh9LrQgqWCmmcxQzVSXYtyB5bzkXrYzlHTs21MYA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-musl": { + "version": "4.60.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.60.4.tgz", + "integrity": "sha512-mcEl6CUT5IAUmQf1m9FYSmVqCJlpQ8r8eyftFUHG8i9OhY7BkBXSUdnLH5DOf0wCOjcP9v/QO93zpmF1SptCCw==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.60.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.60.4.tgz", + "integrity": "sha512-ynt3JxVd2w2buzoKDWIyiV1pJW93xlQic1THVLXilz429oijRpSHivZAgp65KBu+cMcgf1eVVjdnTLvPxgCuoQ==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.60.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.60.4.tgz", + "integrity": "sha512-Boiz5+MsaROEWDf+GGEwF8VMHGhlUoQMtIPjOgA5fv4osupqTVnJteQNKJwUcnUog2G55jYXH7KZFFiJe0TEzQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.60.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.60.4.tgz", + "integrity": "sha512-+qfSY27qIrFfI/Hom04KYFw3GKZSGU4lXus51wsb5EuySfFlWRwjkKWoE9emgRw/ukoT4Udsj4W/+xxG8VbPKg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-openbsd-x64": { + "version": "4.60.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.60.4.tgz", + "integrity": "sha512-VpTfOPHgVXEBeeR8hZ2O0F3aSso+JDWqTWmTmzcQKted54IAdUVbxE+j/MVxUsKa8L20HJhv3vUezVPoquqWjA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ] + }, + "node_modules/@rollup/rollup-openharmony-arm64": { + "version": "4.60.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.60.4.tgz", + "integrity": "sha512-IPOsh5aRYuLv/nkU51X10Bf75Bsf6+gZdx1X+QP5QM6lIJFHHqbHLG0uJn/hWthzo13UAc2umiUorqZy3axoZg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.60.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.60.4.tgz", + "integrity": "sha512-4QzE9E81OohJ/HKzHhsqU+zcYYojVOXlFMs1DdyMT6qXl/niOH7AVElmmEdUNHHS/oRkc++d5k6Vy85zFs0DEw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.60.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.60.4.tgz", + "integrity": "sha512-zTPgT1YuHHcd+Tmx7h8aml0FWFVelV5N54oHow9SLj+GfoDy/huQ+UV396N/C7KpMDMiPspRktzM1/0r1usYEA==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-gnu": { + "version": "4.60.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.60.4.tgz", + "integrity": "sha512-DRS4G7mi9lJxqEDezIkKCaUIKCrLUUDCUaCsTPCi/rtqaC6D/jjwslMQyiDU50Ka0JKpeXeRBFBAXwArY52vBw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.60.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.60.4.tgz", + "integrity": "sha512-QVTUovf40zgTqlFVrKA1uXMVvU2QWEFWfAH8Wdc48IxLvrJMQVMBRjuQyUpzZCDkakImib9eVazbWlC6ksWtJw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@types/estree": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", + "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", + "dev": true, + "license": "MIT" + }, + "node_modules/@vitejs/plugin-vue": { + "version": "5.2.4", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-5.2.4.tgz", + "integrity": "sha512-7Yx/SXSOcQq5HiiV3orevHUFn+pmMB4cgbEkDYgnkUWb0WfeQ/wa2yFv6D5ICiCQOVpjA7vYDXrC7AGO8yjDHA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.0.0 || >=20.0.0" + }, + "peerDependencies": { + "vite": "^5.0.0 || ^6.0.0", + "vue": "^3.2.25" + } + }, + "node_modules/@vue/compiler-core": { + "version": "3.5.34", + "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.5.34.tgz", + "integrity": "sha512-s9cLyK5mLcvZ4Agva5QgRsQyLKvts9WbU9DB6NqiZkkGEdwmcEiylj5Jbwkp680drF/NNCV8OlAJSe+yMLxaJw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.29.3", + "@vue/shared": "3.5.34", + "entities": "^7.0.1", + "estree-walker": "^2.0.2", + "source-map-js": "^1.2.1" + } + }, + "node_modules/@vue/compiler-dom": { + "version": "3.5.34", + "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.5.34.tgz", + "integrity": "sha512-EbF/T++k0e2MMZlJsBhzK8Sgwt0HcIPOhzn1CTB/lv6sQcyk+OWf8YeiLxZp3ro7MbbLcAfAJ6sEvjFWuNgUCw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vue/compiler-core": "3.5.34", + "@vue/shared": "3.5.34" + } + }, + "node_modules/@vue/compiler-sfc": { + "version": "3.5.34", + "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.5.34.tgz", + "integrity": "sha512-D/ihr6uZeIt6r+pVZf46RWT1fAsLFMbUP7k8G1VkiiWexriED9GrX3echHd4Abbt17zjlfiFJ8z7a3BxZOPNjg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.29.3", + "@vue/compiler-core": "3.5.34", + "@vue/compiler-dom": "3.5.34", + "@vue/compiler-ssr": "3.5.34", + "@vue/shared": "3.5.34", + "estree-walker": "^2.0.2", + "magic-string": "^0.30.21", + "postcss": "^8.5.14", + "source-map-js": "^1.2.1" + } + }, + "node_modules/@vue/compiler-ssr": { + "version": "3.5.34", + "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.5.34.tgz", + "integrity": "sha512-cDtTHKibkThKGHH1SP+WdccquNRYQDFH6rRjQCqT9G2ltFAfoR5pUftpab/z+aM5mW9HLLVQW7hfKKQe/1GBeQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vue/compiler-dom": "3.5.34", + "@vue/shared": "3.5.34" + } + }, + "node_modules/@vue/reactivity": { + "version": "3.5.34", + "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.5.34.tgz", + "integrity": "sha512-y9XDjCEuBp+98k+UL5dbYkh57AHU4o6cxZedOPXw3bmrZZYLQsVHguGurq7hVrPCSrQtrnz1f9dssyFr+dMXfQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vue/shared": "3.5.34" + } + }, + "node_modules/@vue/runtime-core": { + "version": "3.5.34", + "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.5.34.tgz", + "integrity": "sha512-mKeBYvu8tcMSLhypAHBmriUFfWXKTCF/23Z4jiCoYK3UtWepkliViNLuR90V9XOyD62mUxs9p1jsrpK3CCGIzw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vue/reactivity": "3.5.34", + "@vue/shared": "3.5.34" + } + }, + "node_modules/@vue/runtime-dom": { + "version": "3.5.34", + "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.5.34.tgz", + "integrity": "sha512-e8kZzERmCwUnBRVsgSQlAfrfU2rGoy0FFKPBXSlfEjc/O3KfA7QP0t1/2ZylrbchjmIKB4dPTd07A6WPr0eOrg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vue/reactivity": "3.5.34", + "@vue/runtime-core": "3.5.34", + "@vue/shared": "3.5.34", + "csstype": "^3.2.3" + } + }, + "node_modules/@vue/server-renderer": { + "version": "3.5.34", + "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.5.34.tgz", + "integrity": "sha512-nHxmJoTrKsmrkbILRhkC9gY1G3moZbJTqCzDd7DOOzG5KH9oeJ0Unqrff5f9v0pW//jES05ZkJcNtfE8JjOIew==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vue/compiler-ssr": "3.5.34", + "@vue/shared": "3.5.34" + }, + "peerDependencies": { + "vue": "3.5.34" + } + }, + "node_modules/@vue/shared": { + "version": "3.5.34", + "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.5.34.tgz", + "integrity": "sha512-24uqU4OIiX29ryC3MeWid/Xf2fa2EFRUVLb77nRhk+UrTVrh/XiGtFAFmJBAtBRbjwNdsPRP+jj/OL27Eg1NDA==", + "dev": true, + "license": "MIT" + }, + "node_modules/csstype": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz", + "integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/entities": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/entities/-/entities-7.0.1.tgz", + "integrity": "sha512-TWrgLOFUQTH994YUyl1yT4uyavY5nNB5muff+RtWaqNVCAK408b5ZnnbNAUEWLTCpum9w6arT70i1XdQ4UeOPA==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/esbuild": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.12.tgz", + "integrity": "sha512-bbPBYYrtZbkt6Os6FiTLCTFxvq4tt3JKall1vRwshA3fdVztsLAatFaZobhkBC8/BrPetoa0oksYoKXoG4ryJg==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.25.12", + "@esbuild/android-arm": "0.25.12", + "@esbuild/android-arm64": "0.25.12", + "@esbuild/android-x64": "0.25.12", + "@esbuild/darwin-arm64": "0.25.12", + "@esbuild/darwin-x64": "0.25.12", + "@esbuild/freebsd-arm64": "0.25.12", + "@esbuild/freebsd-x64": "0.25.12", + "@esbuild/linux-arm": "0.25.12", + "@esbuild/linux-arm64": "0.25.12", + "@esbuild/linux-ia32": "0.25.12", + "@esbuild/linux-loong64": "0.25.12", + "@esbuild/linux-mips64el": "0.25.12", + "@esbuild/linux-ppc64": "0.25.12", + "@esbuild/linux-riscv64": "0.25.12", + "@esbuild/linux-s390x": "0.25.12", + "@esbuild/linux-x64": "0.25.12", + "@esbuild/netbsd-arm64": "0.25.12", + "@esbuild/netbsd-x64": "0.25.12", + "@esbuild/openbsd-arm64": "0.25.12", + "@esbuild/openbsd-x64": "0.25.12", + "@esbuild/openharmony-arm64": "0.25.12", + "@esbuild/sunos-x64": "0.25.12", + "@esbuild/win32-arm64": "0.25.12", + "@esbuild/win32-ia32": "0.25.12", + "@esbuild/win32-x64": "0.25.12" + } + }, + "node_modules/estree-walker": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", + "dev": true, + "license": "MIT" + }, + "node_modules/fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/magic-string": { + "version": "0.30.21", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz", + "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.5" + } + }, + "node_modules/nanoid": { + "version": "3.3.12", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.12.tgz", + "integrity": "sha512-ZB9RH/39qpq5Vu6Y+NmUaFhQR6pp+M2Xt76XBnEwDaGcVAqhlvxrl3B2bKS5D3NH3QR76v3aSrKaF/Kiy7lEtQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.4.tgz", + "integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/postcss": { + "version": "8.5.14", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.14.tgz", + "integrity": "sha512-SoSL4+OSEtR99LHFZQiJLkT59C5B1amGO1NzTwj7TT1qCUgUO6hxOvzkOYxD+vMrXBM3XJIKzokoERdqQq/Zmg==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "nanoid": "^3.3.11", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/rollup": { + "version": "4.60.4", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.60.4.tgz", + "integrity": "sha512-WHeFSbZYsPu3+bLoNRUuAO+wavNlocOPf3wSHTP7hcFKVnJeWsYlCDbr3mTS14FCizf9ccIxXA8sGL8zKeQN3g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "1.0.8" + }, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@rollup/rollup-android-arm-eabi": "4.60.4", + "@rollup/rollup-android-arm64": "4.60.4", + "@rollup/rollup-darwin-arm64": "4.60.4", + "@rollup/rollup-darwin-x64": "4.60.4", + "@rollup/rollup-freebsd-arm64": "4.60.4", + "@rollup/rollup-freebsd-x64": "4.60.4", + "@rollup/rollup-linux-arm-gnueabihf": "4.60.4", + "@rollup/rollup-linux-arm-musleabihf": "4.60.4", + "@rollup/rollup-linux-arm64-gnu": "4.60.4", + "@rollup/rollup-linux-arm64-musl": "4.60.4", + "@rollup/rollup-linux-loong64-gnu": "4.60.4", + "@rollup/rollup-linux-loong64-musl": "4.60.4", + "@rollup/rollup-linux-ppc64-gnu": "4.60.4", + "@rollup/rollup-linux-ppc64-musl": "4.60.4", + "@rollup/rollup-linux-riscv64-gnu": "4.60.4", + "@rollup/rollup-linux-riscv64-musl": "4.60.4", + "@rollup/rollup-linux-s390x-gnu": "4.60.4", + "@rollup/rollup-linux-x64-gnu": "4.60.4", + "@rollup/rollup-linux-x64-musl": "4.60.4", + "@rollup/rollup-openbsd-x64": "4.60.4", + "@rollup/rollup-openharmony-arm64": "4.60.4", + "@rollup/rollup-win32-arm64-msvc": "4.60.4", + "@rollup/rollup-win32-ia32-msvc": "4.60.4", + "@rollup/rollup-win32-x64-gnu": "4.60.4", + "@rollup/rollup-win32-x64-msvc": "4.60.4", + "fsevents": "~2.3.2" + } + }, + "node_modules/source-map-js": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/tinyglobby": { + "version": "0.2.16", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.16.tgz", + "integrity": "sha512-pn99VhoACYR8nFHhxqix+uvsbXineAasWm5ojXoN8xEwK5Kd3/TrhNn1wByuD52UxWRLy8pu+kRMniEi6Eq9Zg==", + "dev": true, + "license": "MIT", + "dependencies": { + "fdir": "^6.5.0", + "picomatch": "^4.0.4" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/vite": { + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/vite/-/vite-6.4.2.tgz", + "integrity": "sha512-2N/55r4JDJ4gdrCvGgINMy+HH3iRpNIz8K6SFwVsA+JbQScLiC+clmAxBgwiSPgcG9U15QmvqCGWzMbqda5zGQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "esbuild": "^0.25.0", + "fdir": "^6.4.4", + "picomatch": "^4.0.2", + "postcss": "^8.5.3", + "rollup": "^4.34.9", + "tinyglobby": "^0.2.13" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^18.0.0 || ^20.0.0 || >=22.0.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", + "jiti": ">=1.21.0", + "less": "*", + "lightningcss": "^1.21.0", + "sass": "*", + "sass-embedded": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.16.0", + "tsx": "^4.8.1", + "yaml": "^2.4.2" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "jiti": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + }, + "tsx": { + "optional": true + }, + "yaml": { + "optional": true + } + } + }, + "node_modules/vue": { + "version": "3.5.34", + "resolved": "https://registry.npmjs.org/vue/-/vue-3.5.34.tgz", + "integrity": "sha512-WdLBG9gm02OgJIG9axd5Hpx0TFLdzVgfG2evFFu8Rur5O/IoGc5cMjnjh3tPL6GnRGsYvUhBSKVPYVcxRKpMCA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vue/compiler-dom": "3.5.34", + "@vue/compiler-sfc": "3.5.34", + "@vue/runtime-dom": "3.5.34", + "@vue/server-renderer": "3.5.34", + "@vue/shared": "3.5.34" + }, + "peerDependencies": { + "typescript": "*" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + } + } +} diff --git a/package.json b/package.json index a2236d4..d5c2834 100644 --- a/package.json +++ b/package.json @@ -1,59 +1,66 @@ { "name": "see-on-github-vue", - "version": "1.0.7", - "description": "Component adds 'See on Github' sticky block on the bottom of the every page where added.", + "version": "2.0.0", + "description": "Vue 3 component that adds a sticky See on GitHub link to your app.", "author": "Sergei Iudin", + "license": "MIT", "repository": { "type": "git", "url": "https://github.com/yudin-s/see-on-github-vue.git" }, - "main": "dist/see-on-github-vue.ssr.js", - "browser": "dist/see-on-github-vue.esm.js", - "module": "dist/see-on-github-vue.esm.js", - "unpkg": "dist/see-on-github-vue.min.js", + "type": "module", + "main": "./dist/see-on-github-vue.cjs", + "module": "./dist/see-on-github-vue.js", + "browser": "./dist/see-on-github-vue.js", + "unpkg": "./dist/see-on-github-vue.global.js", + "jsdelivr": "./dist/see-on-github-vue.global.js", + "style": "./dist/see-on-github-vue.css", + "types": "./dist/index.d.ts", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "import": "./dist/see-on-github-vue.js", + "require": "./dist/see-on-github-vue.cjs" + }, + "./style.css": "./dist/see-on-github-vue.css", + "./package.json": "./package.json" + }, "files": [ - "dist/*", - "src/**/*.vue", - "!src/serve-dev.*" + "dist/*" + ], + "sideEffects": [ + "*.css", + "*.vue" ], "scripts": { - "serve": "vue-cli-service serve src/serve-dev.js", - "build": "cross-env NODE_ENV=production rollup --config build/rollup.config.js", - "build:ssr": "cross-env NODE_ENV=production rollup --config build/rollup.config.js --format cjs", - "build:es": "cross-env NODE_ENV=production rollup --config build/rollup.config.js --format es", - "build:unpkg": "cross-env NODE_ENV=production rollup --config build/rollup.config.js --format iife" + "dev": "vite", + "serve": "vite", + "build": "vite build && npm run build:types", + "build:types": "node scripts/build-types.cjs", + "preview": "vite preview" }, "keywords": [ "browser", "vue", + "vue3", "vuejs", + "component", "web", "frontend", - "vanila", + "vanilla", + "github", "promotion" ], "dependencies": {}, "devDependencies": { - "@babel/core": "^7.7.7", - "@babel/preset-env": "^7.7.7", - "@rollup/plugin-alias": "^2.2.0", - "@rollup/plugin-commonjs": "^11.0.1", - "@rollup/plugin-replace": "^2.2.1", - "@vue/cli-plugin-babel": "^4.1.0", - "@vue/cli-service": "^4.1.0", - "cross-env": "^6.0.3", - "minimist": "^1.2.0", - "rollup": "^1.27.13", - "rollup-plugin-babel": "^4.3.3", - "rollup-plugin-terser": "^5.1.3", - "rollup-plugin-vue": "^5.1.5", - "vue": "^2.6.10", - "vue-template-compiler": "^2.6.10" + "@vitejs/plugin-vue": "^5.2.1", + "vite": "^6.0.7", + "vue": "^3.5.13" }, "peerDependencies": { - "vue": "^2.6.10" + "vue": "^3.3.0" }, "engines": { - "node": ">=8" + "node": ">=18" } } diff --git a/scripts/build-types.cjs b/scripts/build-types.cjs new file mode 100644 index 0000000..0038a45 --- /dev/null +++ b/scripts/build-types.cjs @@ -0,0 +1,7 @@ +const fs = require('fs'); +const path = require('path'); + +const distDir = path.resolve(__dirname, '..', 'dist'); +fs.mkdirSync(distDir, { recursive: true }); + +fs.writeFileSync(path.join(distDir, 'index.d.ts'), "import type { App, DefineComponent } from 'vue';\n\nexport interface SeeOnGithubProps {\n linkTo: string;\n caption?: string;\n target?: string;\n rel?: string;\n ariaLabel?: string;\n}\n\ndeclare const SeeOnGithub: DefineComponent & {\n install(app: App, options?: { name?: string }): void;\n};\n\ndeclare const SeeOnGithubPlugin: {\n install(app: App, options?: { name?: string }): void;\n};\n\ndeclare function install(app: App, options?: { name?: string }): void;\n\nexport { SeeOnGithub, SeeOnGithubPlugin, install };\nexport default SeeOnGithub;\n"); diff --git a/src/entry.js b/src/entry.js index 40cab80..2462aad 100644 --- a/src/entry.js +++ b/src/entry.js @@ -1,38 +1,12 @@ -// Import vue component -import component from '@/see-on-github.vue'; +import SeeOnGithub from './see-on-github.vue'; -// install function executed by Vue.use() -const install = function installSeeOnGithub(Vue) { - if (install.installed) return; - install.installed = true; - Vue.component('SeeOnGithub', component); +const install = function installSeeOnGithub(app, options = {}) { + app.component(options.name || SeeOnGithub.name || 'SeeOnGithub', SeeOnGithub); }; -// Create module definition for Vue.use() -const plugin = { - install, -}; - -// To auto-install when vue is found -// eslint-disable-next-line no-redeclare -/* global window, global */ -let GlobalVue = null; -if (typeof window !== 'undefined') { - GlobalVue = window.Vue; -} else if (typeof global !== 'undefined') { - GlobalVue = global.Vue; -} -if (GlobalVue) { - GlobalVue.use(plugin); -} - -// Inject install function into component - allows component -// to be registered via Vue.use() as well as Vue.component() -component.install = install; +const SeeOnGithubPlugin = { install }; -// Export component by default -export default component; +SeeOnGithub.install = install; -// It's possible to expose named exports when writing components that can -// also be used as directives, etc. - eg. import { RollupDemoDirective } from 'rollup-demo'; -// export const RollupDemoDirective = component; +export { SeeOnGithub, SeeOnGithubPlugin, install }; +export default SeeOnGithub; diff --git a/src/see-on-github.vue b/src/see-on-github.vue index 826c4d9..fa35c08 100644 --- a/src/see-on-github.vue +++ b/src/see-on-github.vue @@ -1,70 +1,123 @@ - - - - GitHub Icon - - - - {{caption}} + + + GitHub + + + + {{ caption }} - diff --git a/src/serve-dev.js b/src/serve-dev.js index 68752da..b230fd8 100644 --- a/src/serve-dev.js +++ b/src/serve-dev.js @@ -1,8 +1,4 @@ -import Vue from 'vue'; -import Dev from '@/serve-dev.vue'; +import { createApp } from 'vue'; +import Dev from './serve-dev.vue'; -Vue.config.productionTip = false; - -new Vue({ - render: (h) => h(Dev), -}).$mount('#app'); +createApp(Dev).mount('#app'); diff --git a/src/serve-dev.vue b/src/serve-dev.vue index 7fd5987..fd1f9c5 100644 --- a/src/serve-dev.vue +++ b/src/serve-dev.vue @@ -1,17 +1,36 @@ - - - + + see-on-github-vue + Vue 3 sticky GitHub link component. + + + + diff --git a/vite.config.js b/vite.config.js new file mode 100644 index 0000000..ec4b839 --- /dev/null +++ b/vite.config.js @@ -0,0 +1,34 @@ +import { fileURLToPath, URL } from 'node:url'; + +import { defineConfig } from 'vite'; +import vue from '@vitejs/plugin-vue'; + +export default defineConfig({ + plugins: [vue()], + resolve: { + alias: { + '@': fileURLToPath(new URL('./src', import.meta.url)), + }, + }, + build: { + lib: { + entry: fileURLToPath(new URL('./src/entry.js', import.meta.url)), + name: 'SeeOnGithubVue', + formats: ['es', 'cjs', 'umd'], + fileName: (format) => { + if (format === 'es') return 'see-on-github-vue.js'; + if (format === 'umd') return 'see-on-github-vue.global.js'; + return 'see-on-github-vue.cjs'; + }, + }, + rollupOptions: { + external: ['vue'], + output: { + exports: 'named', + globals: { + vue: 'Vue', + }, + }, + }, + }, +});
Vue 3 sticky GitHub link component.