Skip to content

fix(vue): package distribution bundle exports #208

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions apps/vue-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,6 @@
},
"devDependencies": {
"@formkit/auto-animate": "^0.8.1",
"@vanilla-extract/dynamic": "^2.1.2",
"@vanilla-extract/css": "^1.15.5",
"@vanilla-extract/css-utils": "^0.1.4",
"@vanilla-extract/recipes": "^0.5.5",
"@vanilla-extract/private": "^1.0.6",
"@vanilla-extract/vite-plugin": "^4.0.4",
"@vitejs/plugin-vue": "^5.0.4",
"animejs": "^3.2.1",
"autoprefixer": "^10.4.16",
Expand Down
92 changes: 65 additions & 27 deletions apps/vue-example/src/components/modal-preview.vue
Original file line number Diff line number Diff line change
@@ -1,42 +1,80 @@
<script setup lang="ts">
import { ModalsContainer, useModal } from 'vue-final-modal';
import { Box } from '@interchain-ui/vue'
import ModalView from './modal/modal.vue';
import VButton from './v-button.vue';

const { open, close } = useModal({
component: ModalView,
attrs: {
},
slots: {
default: '<p>The content of the modal</p>',
},
})
import { ref } from "vue";
import {
Box,
Modal,
Button,
ConnectModalQrcode,
ConnectModalHead,
ConnectModalWalletList,
} from "@interchain-ui/vue";

import {
wallets,
qrCodeProps,
WalletPluginSystem,
} from "../data/connect-wallet-data";

function convert(ws: typeof wallets) {
return ws.map((wallet) => ({
...wallet,
logo: wallet.extends
? WalletPluginSystem[wallet.extends].logo
: wallet.logo,
badge: wallet.extends ? WalletPluginSystem[wallet.extends].text : undefined,
btmLogo: wallet.extends ? wallet.logo : undefined,
}));
}

const isOpen = ref(false);
const hasBack = ref(false);

function onClose() {
isOpen.value = false;
hasBack.value = false;
}

function onBack() {
hasBack.value = false;
}

function onNext() {
hasBack.value = true;
}

const convertedWallets = convert(wallets);
</script>

<template>
<div class="flex w-[100vw] h-[100vh]">
<div class="flex flex-col gap-4 text-center mx-auto my-0 pt-[300px]">
<p>Vite + Vue + @interchain-ui/vue demo</p>

<Box color="$blue400" bg="$cardBg" padding="$4">
Hello Boxy box
</Box>
<Box color="$blue400" bg="$cardBg" padding="$4"> Hello Boxy box </Box>

<VButton @click="open">
<Button @click="isOpen = true">
<span class="flex justify-center items-center">
Open Modal
Open Connect Modal
</span>
</VButton>

<VButton @click="close">
<span class="flex justify-center items-center">
Close Modal
</span>
</VButton>
</Button>
</div>
</div>


<ModalsContainer />
<Modal :is-open="isOpen" @close="onClose">
<template #header="{ closeButtonProps }">
<ConnectModalHead
title="Connect Wallet"
:hasCloseButton="true"
:hasBackButton="hasBack"
@back="onBack"
:closeButtonProps="closeButtonProps"
/>
</template>
<ConnectModalQrcode v-if="hasBack" v-bind="qrCodeProps" />
<ConnectModalWalletList
v-else
:wallets="convertedWallets"
@wallet-item-click="onNext"
/>
</Modal>
</template>
63 changes: 0 additions & 63 deletions apps/vue-example/src/components/modal/modal.css.ts

This file was deleted.

29 changes: 0 additions & 29 deletions apps/vue-example/src/components/modal/modal.vue

This file was deleted.

8,977 changes: 8,977 additions & 0 deletions apps/vue-example/src/data/connect-wallet-data.ts

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions apps/vue-example/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { vanillaExtractPlugin } from "@vanilla-extract/vite-plugin";
import vue from "@vitejs/plugin-vue";
import { defineConfig } from "vite";
import checker from "vite-plugin-checker";
Expand All @@ -9,7 +8,6 @@ export default defineConfig({
checker({
vueTsc: true,
}),
vanillaExtractPlugin(),
vue(),
],
});
79 changes: 39 additions & 40 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@
"test:coverage": "jest --coverage"
},
"devDependencies": {
"@babel/core": "^7.24.7",
"@babel/generator": "^7.25.6",
"@babel/parser": "^7.25.6",
"@babel/plugin-proposal-decorators": "^7.24.7",
"@babel/preset-env": "^7.24.7",
"@babel/preset-react": "^7.24.7",
"@babel/preset-typescript": "^7.24.7",
"@babel/traverse": "^7.25.6",
"@babel/types": "^7.25.6",
"@babel/core": "^7.25.8",
"@babel/generator": "^7.25.7",
"@babel/parser": "^7.25.8",
"@babel/plugin-proposal-decorators": "^7.25.7",
"@babel/preset-env": "^7.25.8",
"@babel/preset-react": "^7.25.7",
"@babel/preset-typescript": "^7.25.7",
"@babel/traverse": "^7.25.7",
"@babel/types": "^7.25.8",
"@builder.io/eslint-plugin-mitosis": "^0.0.16",
"@builder.io/mitosis": "0.4.3",
"@builder.io/mitosis-cli": "0.4.3",
Expand All @@ -57,33 +57,32 @@
"@parcel/transformer-typescript-types": "^2.12.0",
"@parcel/transformer-vue": "^2.12.0",
"@parcel/watcher": "^2.4.1",
"@react-aria/i18n": "^3.11.1",
"@react-aria/numberfield": "^3.11.3",
"@react-aria/utils": "^3.24.1",
"@react-stately/numberfield": "^3.9.3",
"@swc/helpers": "^0.5.11",
"@react-aria/i18n": "^3.12.3",
"@react-aria/numberfield": "^3.11.8",
"@react-aria/utils": "^3.25.3",
"@react-stately/numberfield": "^3.9.7",
"@swc/helpers": "^0.5.13",
"@types/animejs": "^3.1.12",
"@types/node": "^20.14.9",
"@types/node": "^20.16.13",
"@types/react": "latest",
"@typescript-eslint/eslint-plugin": "^7.15.0",
"@typescript-eslint/parser": "^7.15.0",
"@vitejs/plugin-vue": "^5.0.5",
"@typescript-eslint/eslint-plugin": "^7.18.0",
"@typescript-eslint/parser": "^7.18.0",
"@vitejs/plugin-vue": "^5.1.4",
"@vue/babel-preset-app": "^5.0.8",
"@vue/compiler-sfc": "^3.4.38",
"autoprefixer": "^10.4.19",
"@vue/compiler-sfc": "^3.5.12",
"autoprefixer": "^10.4.20",
"cli-color": "^2.0.4",
"command-line-args": "^5.2.1",
"copy-to-clipboard": "^3.3.3",
"cross-env": "^7.0.3",
"eslint": "^8.57.0",
"eslint": "^8.57.1",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-storybook": "^0.8.0",
"execa": "^5.1.1",
"fs-extra": "^11.2.0",
"glob": "^11.0.0",
"gluegun": "^5.1.6",
"husky": "^9.0.11",
"gluegun": "^5.2.0",
"husky": "^9.1.6",
"lerna": "8.1.3",
"lerna-changelog": "^2.2.0",
"listr2": "^5.0.8",
Expand All @@ -93,34 +92,34 @@
"ora": "^5.4.1",
"patch-package": "^8.0.0",
"postinstall-postinstall": "^2.1.0",
"prettier": "^3.3.2",
"prettier": "^3.3.3",
"process": "^0.11.10",
"rainbow-sprinkles": "^0.17.2",
"rainbow-sprinkles": "^0.17.3",
"replace": "^1.2.2",
"replace-in-file": "^6.3.5",
"rimraf": "^5.0.7",
"rimraf": "^5.0.10",
"tsx": "^4.19.1",
"typescript": "^5.5.3",
"vite": "^5.4.2",
"typescript": "^5.6.3",
"vite": "^5.4.9",
"vue": "^3.4.21",
"vue-metamorph": "^3.1.16",
"vue-tsc": "^2.0.26"
"vue-metamorph": "^3.2.0",
"vue-tsc": "^2.1.6"
},
"dependencies": {
"@floating-ui/core": "^1.6.4",
"@floating-ui/dom": "^1.6.7",
"@types/lodash": "^4.17.7",
"@vanilla-extract/dynamic": "^2.1.2",
"@vanilla-extract/css": "^1.15.5",
"@floating-ui/core": "^1.6.8",
"@floating-ui/dom": "^1.6.11",
"@types/lodash": "^4.17.12",
"@vanilla-extract/css": "^1.16.0",
"@vanilla-extract/css-utils": "^0.1.4",
"@vanilla-extract/recipes": "^0.5.5",
"@vanilla-extract/dynamic": "^2.1.2",
"@vanilla-extract/private": "^1.0.6",
"@vanilla-extract/recipes": "^0.5.5",
"animejs": "^3.2.2",
"bignumber.js": "^9.1.2",
"clsx": "^2.1.1",
"immer": "^10.1.1",
"vue": "^3.4.31",
"zustand": "^4.5.4"
"vue": "^3.5.12",
"zustand": "^4.5.5"
},
"changelog": {
"labels": {
Expand Down
5 changes: 3 additions & 2 deletions packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
"copy-to-clipboard": "^3.3.3",
"immer": "^10.1.1",
"lodash": "^4.17.21",
"rainbow-sprinkles": "^0.17.2",
"rainbow-sprinkles": "^0.17.3",
"react-aria": "^3.34.3",
"react-stately": "^3.32.2",
"zustand": "^4.5.5"
Expand Down Expand Up @@ -133,6 +133,7 @@
"@parcel/transformer-typescript-tsc": "^2.12.0",
"@parcel/transformer-typescript-types": "^2.12.0",
"@react-types/combobox": "^3.12.1",
"@react-types/shared": "^3.25.0",
"@storybook/addon-essentials": "^8.3.0",
"@storybook/addon-interactions": "^8.3.0",
"@storybook/addon-links": "^8.3.0",
Expand All @@ -158,4 +159,4 @@
"vite-plugin-replace": "^0.1.1"
},
"gitHead": "05adf69046d07d6f764b96cf54cbaa492de06d95"
}
}
Loading
Loading