From edbf1cfaf94663dc513b5d60e1ff0c59a98eb55d Mon Sep 17 00:00:00 2001 From: Stephanie Smith Date: Thu, 30 May 2024 14:02:53 -0700 Subject: [PATCH] adjustments after testing @explorer-1/nuxt in a separate project (#451) * adjustments after testing the nuxt module in a separate project * updatinb uild * lint * removing vscode settings --- .gitignore | 1 - .vscode/settings.json | 3 - packages/nuxt/playground/app.vue | 65 +- packages/nuxt/src/module.ts | 1 - packages/nuxt/src/runtime/tailwind.config.js | 10 +- packages/vue/dist/explorer-1-vue.d.ts | 1 + packages/vue/dist/explorer-1-vue.js | 6464 +++++++---------- packages/vue/dist/explorer-1-vue.umd.cjs | 4329 +---------- .../components/BaseButton/BaseButton.vue.d.ts | 94 + .../components/BaseImage/BaseImage.vue.d.ts | 88 + .../BaseImageCaption.vue.d.ts | 23 + .../BaseImagePlaceholder.vue.d.ts | 61 + .../src/components/BaseLink/BaseLink.vue.d.ts | 169 + .../components/BlockImage/BlockImage.vue.d.ts | 24 + .../BlockImage/BlockImageFullBleed.vue.d.ts | 51 + .../BlockImage/BlockImageStandard.vue.d.ts | 46 + .../src/components/Icons/IconArrows.vue.d.ts | 2 + .../src/components/Icons/IconCaret.vue.d.ts | 2 + .../src/components/Icons/IconExpand.vue.d.ts | 2 + .../components/Icons/IconLocation.vue.d.ts | 2 + .../src/components/Icons/IconUser.vue.d.ts | 2 + .../LayoutHelper/LayoutHelper.vue.d.ts | 24 + .../MixinAnimationCaret.vue.d.ts | 62 + .../MixinFancybox/MixinFancybox.vue.d.ts | 153 + .../MixinFancyboxOpenButton.vue.d.ts | 2 + packages/vue/dist/src/interfaces.d.ts | 19 + packages/vue/dist/src/main.d.ts | 1 + packages/vue/dist/src/utils/getSrcSet.d.ts | 3 + packages/vue/dist/style.css | 1201 +-- packages/vue/lib/main.ts | 13 +- packages/vue/package.json | 1 + .../src/components/BaseImage/BaseImage.vue | 5 +- .../MixinFancybox/MixinFancybox.vue | 2 +- .../MixinFancybox/MixinFancyboxOpenButton.vue | 2 +- packages/vue/vite.config.ts | 8 +- pnpm-lock.yaml | 334 + 36 files changed, 3839 insertions(+), 9431 deletions(-) delete mode 100644 .vscode/settings.json create mode 100644 packages/vue/dist/explorer-1-vue.d.ts create mode 100644 packages/vue/dist/src/components/BaseButton/BaseButton.vue.d.ts create mode 100644 packages/vue/dist/src/components/BaseImage/BaseImage.vue.d.ts create mode 100644 packages/vue/dist/src/components/BaseImageCaption/BaseImageCaption.vue.d.ts create mode 100644 packages/vue/dist/src/components/BaseImagePlaceholder/BaseImagePlaceholder.vue.d.ts create mode 100644 packages/vue/dist/src/components/BaseLink/BaseLink.vue.d.ts create mode 100644 packages/vue/dist/src/components/BlockImage/BlockImage.vue.d.ts create mode 100644 packages/vue/dist/src/components/BlockImage/BlockImageFullBleed.vue.d.ts create mode 100644 packages/vue/dist/src/components/BlockImage/BlockImageStandard.vue.d.ts create mode 100644 packages/vue/dist/src/components/Icons/IconArrows.vue.d.ts create mode 100644 packages/vue/dist/src/components/Icons/IconCaret.vue.d.ts create mode 100644 packages/vue/dist/src/components/Icons/IconExpand.vue.d.ts create mode 100644 packages/vue/dist/src/components/Icons/IconLocation.vue.d.ts create mode 100644 packages/vue/dist/src/components/Icons/IconUser.vue.d.ts create mode 100644 packages/vue/dist/src/components/LayoutHelper/LayoutHelper.vue.d.ts create mode 100644 packages/vue/dist/src/components/MixinAnimationCaret/MixinAnimationCaret.vue.d.ts create mode 100644 packages/vue/dist/src/components/MixinFancybox/MixinFancybox.vue.d.ts create mode 100644 packages/vue/dist/src/components/MixinFancybox/MixinFancyboxOpenButton.vue.d.ts create mode 100644 packages/vue/dist/src/interfaces.d.ts create mode 100644 packages/vue/dist/src/main.d.ts create mode 100644 packages/vue/dist/src/utils/getSrcSet.d.ts diff --git a/.gitignore b/.gitignore index d6397b54..60c58b5c 100644 --- a/.gitignore +++ b/.gitignore @@ -37,7 +37,6 @@ out/ # VSCode .vscode/* -!.vscode/settings.json !.vscode/tasks.json !.vscode/launch.json !.vscode/extensions.json diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index ae67e59e..00000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "scss.lint.unknownAtRules": "ignore" -} diff --git a/packages/nuxt/playground/app.vue b/packages/nuxt/playground/app.vue index db22155b..fe4ba278 100644 --- a/packages/nuxt/playground/app.vue +++ b/packages/nuxt/playground/app.vue @@ -1,11 +1,68 @@ diff --git a/packages/nuxt/src/module.ts b/packages/nuxt/src/module.ts index cd9af370..b6a64d4a 100644 --- a/packages/nuxt/src/module.ts +++ b/packages/nuxt/src/module.ts @@ -44,7 +44,6 @@ export default defineNuxtModule({ // extend nuxt's vite config without overriding nuxt.config.js _nuxt.options.vite = { ..._nuxt.options.vite, - resolve: { ..._nuxt.options.vite.resolve, alias: { diff --git a/packages/nuxt/src/runtime/tailwind.config.js b/packages/nuxt/src/runtime/tailwind.config.js index 9008ba8a..07803552 100644 --- a/packages/nuxt/src/runtime/tailwind.config.js +++ b/packages/nuxt/src/runtime/tailwind.config.js @@ -1,6 +1,14 @@ +import path from 'path' +import { fileURLToPath } from 'node:url' import explorer1Config from '@explorer-1/common/tailwind.config' + +// mimic CommonJS variables -- not needed if using CommonJS +const __filename = fileURLToPath(import.meta.url) +const __dirname = path.dirname(__filename) + console.log('ℹ Tailwind Config provided by @explorer-1/nuxt') + export default { ...explorer1Config, - content: ['./../node_modules/@explorer-1/vue/src/components/**/*.vue'] + content: [path.resolve(__dirname, './../../node_modules/@explorer-1/vue/src/**/*.vue')] } diff --git a/packages/vue/dist/explorer-1-vue.d.ts b/packages/vue/dist/explorer-1-vue.d.ts new file mode 100644 index 00000000..7b140b35 --- /dev/null +++ b/packages/vue/dist/explorer-1-vue.d.ts @@ -0,0 +1 @@ +export * from './lib/main' diff --git a/packages/vue/dist/explorer-1-vue.js b/packages/vue/dist/explorer-1-vue.js index c716762f..30a822c6 100644 --- a/packages/vue/dist/explorer-1-vue.js +++ b/packages/vue/dist/explorer-1-vue.js @@ -1,4498 +1,3174 @@ -import { - defineComponent as k, - openBlock as v, - createBlock as A, - resolveDynamicComponent as gt, - normalizeClass as L, - withCtx as M, - createElementVNode as w, - renderSlot as S, - createElementBlock as T, - resolveComponent as R, - createVNode as q, - createCommentVNode as mt, - createStaticVNode as bt -} from 'vue' -const Q = { - primary: '-primary', - secondary: '-secondary', - dark: '-dark', - social: '-social' - }, - yt = k({ - name: 'BaseButton', - props: { - variant: { - type: String, - required: !1, - default: 'primary', - validator: (n) => Object.keys(Q).includes(n) - }, - compact: { - type: Boolean, - default: !1, - required: !1 - }, - blockClasses: { - type: String, - required: !1, - default: 'inline-block' - }, - disabled: { - type: Boolean, - default: !1, - required: !1 - }, - ariaLabel: { - type: String, - default: '', - required: !1 - }, - to: { - type: [String, Object], - required: !1, - default: null - }, - href: { - type: String, - required: !1, - default: null - } +import { defineComponent as C, openBlock as m, createBlock as P, resolveDynamicComponent as Ct, normalizeClass as T, withCtx as _, createElementVNode as w, renderSlot as L, createElementBlock as b, createCommentVNode as k, resolveComponent as $, createVNode as O, toDisplayString as St, createTextVNode as Et, createStaticVNode as kt } from "vue"; +const li = (s) => { + let t = ""; + if (Object.keys(s).some(function(i) { + return !!i.startsWith("screen"); + })) { + const i = []; + for (const [o, n] of Object.entries(s)) + o.startsWith("screen") && n.url && n.width && i.push(`${n.url} ${n.width}w`); + t = i.join(", "); + } + return t; +}, tt = { + primary: "-primary", + secondary: "-secondary", + dark: "-dark", + social: "-social" +}, Lt = C({ + name: "BaseButton", + props: { + variant: { + type: String, + required: !1, + default: "primary", + validator: (s) => Object.keys(tt).includes(s) }, - emits: ['click'], - computed: { - tag() { - return this.disabled ? 'button' : this.to ? 'nuxt-link' : this.href ? 'a' : 'button' - }, - // necessary for valid html - // must account for , , and