Skip to content
This repository was archived by the owner on Sep 20, 2024. It is now read-only.

Commit 606cae5

Browse files
committed
build: seutp esbuild and turbo
1 parent 0818071 commit 606cae5

File tree

7 files changed

+60
-373
lines changed

7 files changed

+60
-373
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
<template>
22
<c-spinner />
33
</template>
4+
5+
<script lang="ts" setup>
6+
import { CSpinner } from "@chakra-ui/vue-next"
7+
</script>
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
import {
2+
h,
3+
defineComponent,
4+
Fragment,
5+
PropType,
6+
provide,
7+
inject,
8+
computed,
9+
} from "vue"
10+
import type { Theme } from "@chakra-ui/theme"
11+
import type * as ThemeTools from "@chakra-ui/theme-tools"
12+
13+
export interface CThemeProviderProps {
14+
value?: Theme
15+
}
16+
17+
const CThemeProvider = defineComponent({
18+
name: "CThemeProvider",
19+
props: {
20+
value: {
21+
type: [Object] as PropType<Theme>,
22+
default: () => undefined,
23+
},
24+
},
25+
setup(props, { slots }) {
26+
const pluginTheme = inject("$chakraTheme")
27+
const applicationTheme = computed(() => props.value || pluginTheme)
28+
provide("$chakraTheme", applicationTheme.value)
29+
return () => (
30+
<Fragment>{slots?.default?.({ $chakraTheme: props.value })}</Fragment>
31+
)
32+
},
33+
})
34+
35+
export default CThemeProvider
Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1 @@
1-
import { defineComponent, inject, computed, provide, Fragment } from 'vue';
2-
3-
defineComponent({
4-
name: "CThemeProvider",
5-
props: {
6-
value: {
7-
type: [Object],
8-
default: () => void 0
9-
}
10-
},
11-
setup(props, { slots }) {
12-
const pluginTheme = inject("$chakraTheme");
13-
const applicationTheme = computed(() => props.value || pluginTheme);
14-
provide("$chakraTheme", applicationTheme.value);
15-
return () => {
16-
var _a;
17-
return /* @__PURE__ */ React.createElement(Fragment, null, (_a = slots == null ? void 0 : slots.default) == null ? void 0 : _a.call(slots, { $chakraTheme: props.value }));
18-
};
19-
}
20-
});
21-
//# sourceMappingURL=chakra-ui-c-theme-provider.esm.js.map
1+
export * from "./c-theme-provider"

packages/c-theme-provider/tests/c-theme-provider.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { ThemeProviderProps } from "@chakra-ui/vue-next"
22
import { render, screen } from "../../test-utils"
33
import { h, defineComponent, inject } from "vue"
4-
import CThemeProvider from "../src"
4+
import CThemeProvider from "../src/c-theme-provider"
55

66
let blueString: string
77

packages/nuxt/src/index.tsx

Lines changed: 4 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,5 @@
1-
import { defineComponent, h } from 'vue';
1+
import { defineComponent, h } from "vue"
22

3-
var __defProp = Object.defineProperty;
4-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5-
var __hasOwnProp = Object.prototype.hasOwnProperty;
6-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
7-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8-
var __spreadValues = (a, b) => {
9-
for (var prop in b || (b = {}))
10-
if (__hasOwnProp.call(b, prop))
11-
__defNormalProp(a, prop, b[prop]);
12-
if (__getOwnPropSymbols)
13-
for (var prop of __getOwnPropSymbols(b)) {
14-
if (__propIsEnum.call(b, prop))
15-
__defNormalProp(a, prop, b[prop]);
16-
}
17-
return a;
18-
};
19-
defineComponent({
20-
props: {
21-
as: {
22-
type: String,
23-
default: "div"
24-
}
25-
},
26-
render() {
27-
return h(this == null ? void 0 : this.as, __spreadValues(__spreadValues({}, this.$props), this.$attrs), this.$slots.default);
28-
}
29-
});
30-
//# sourceMappingURL=chakra-ui-nuxt-next.esm.js.map
3+
export const NuxtModule = defineComponent(() => {
4+
return <div>Hello World</div>
5+
})

packages/nuxt/tsup.config.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ export default defineConfig({
99
}
1010
},
1111
jsxFactory: "h",
12-
jsxFragmentFactory: "Fragment",
1312
format: ["esm", "cjs"],
1413
entry: {
1514
"chakra-ui-nuxt-next": "src/index.tsx",

0 commit comments

Comments
 (0)