Skip to content

Commit

Permalink
chore: skip building type for netlify; change changesets; change appe…
Browse files Browse the repository at this point in the history
…arance switch style
  • Loading branch information
lejunyang committed Nov 5, 2024
1 parent b54a0d3 commit 2aa0076
Show file tree
Hide file tree
Showing 11 changed files with 37 additions and 17 deletions.
9 changes: 1 addition & 8 deletions .changeset/curvy-brooms-kiss.md → .changeset/components.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
---
'@lun-web/components': patch
'@lun-web/core': patch
'@lun-web/plugins': patch
'@lun-web/react': patch
'@lun-web/theme': patch
'@lun-web/utils': patch
---

## Features

- `components/config`: add `transitionRegistry` and `transitions` global context config; add `useTransition` hook and `registerTransition` util
- `components/config`: add `transitionRegistry` and `transitions` global context config; add `useTransition` hook and `registerTransition` util function
- `components/dialog`: add custom renderer for header, remove `title` prop
- `components/message`: support string param for `Message.open`
- `components/switch`: add `beforeUpdate` to asynchronously determine whether to update checked status
Expand All @@ -24,6 +19,4 @@

- `components/tree`: fix check methods are not working
- `components/tree`: fix wrong expose type; fix items processing issue
- `core/createCollector`: parent element can be undefined when adding item; invode getParentEl if collectOnSetup is true
- `theme/form-item`: fix vertical align issue of checkbox-group and radio-group in form-item
- `components/tabs`: fix transition issue when switching tabs
8 changes: 8 additions & 0 deletions .changeset/core.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
'@lun-web/core': patch
---


## Bug Fixes

- `core/createCollector`: parent element can be undefined when adding item; invoke getParentEl if collectOnSetup is true
3 changes: 3 additions & 0 deletions .changeset/plugins.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
'@lun-web/plugins': patch
---
3 changes: 3 additions & 0 deletions .changeset/react.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
'@lun-web/react': patch
---
9 changes: 9 additions & 0 deletions .changeset/theme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
'@lun-web/theme': patch
---


## Bug Fixes

- `theme/form-item`: fix vertical align issue of checkbox-group and radio-group in form-item
- `theme/tabs`: fix transition issue when switching tabs; fix active tab can be covered by hidden tab panels
3 changes: 3 additions & 0 deletions .changeset/utils.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
'@lun-web/utils': patch
---
4 changes: 2 additions & 2 deletions packages/components/src/custom/apiCustomElement.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ export function defineCustomElement<
extraOptions?: CustomElementOptions,
): VueElementConstructor<T extends DefineComponent<infer P, any, any, any> ? P : unknown>;

/*! #__NO_SIDE_EFFECTS__ */
/*@__NO_SIDE_EFFECTS__*/
export function defineCustomElement(
options: any,
extraOptions?: ComponentOptions,
Expand All @@ -204,7 +204,7 @@ export function defineCustomElement(
return VueCustomElement;
}

/*! #__NO_SIDE_EFFECTS__ */
/*@__NO_SIDE_EFFECTS__*/
export const defineSSRCustomElement = ((options: any, extraOptions?: ComponentOptions) => {
// @ts-ignore
return defineCustomElement(options, extraOptions, createSSRApp);
Expand Down
2 changes: 2 additions & 0 deletions packages/components/src/utils/component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ export function createDefineElement(
};
}

/*@__NO_SIDE_EFFECTS__*/
export function createImportStyle(
compKey: OpenShadowComponentKey | 'common',
style: string | (() => string) | CSSStyleSheet | (() => CSSStyleSheet),
Expand All @@ -144,6 +145,7 @@ export function createImportStyle(
});
}

/*@__NO_SIDE_EFFECTS__*/
export function createImportDynamicStyle(
compKey: OpenShadowComponentKey | 'common',
style:
Expand Down
5 changes: 1 addition & 4 deletions src/components/Layout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
class="appearance-switch"
data-popover="appearance"
>
<span :class="isDark ? 'vpi-moon moon' : 'vpi-sun sun'" slot="thumb" style="color: var(--l-accent-9)" />
<span :class="isDark ? 'vpi-moon moon' : 'vpi-sun sun'" slot="thumb" style="color: var(--l-accent-9); transform: scale(0.9)" />
</l-switch>
<div slot="appearance">是否开启暗黑模式</div>
<l-color-picker
Expand Down Expand Up @@ -336,9 +336,6 @@ watchEffect(() => {
</script>

<style lang="scss">
.VPDoc > .container {
// view-transition-name: content; // this has some issues if new page has stored scroll position
}
::view-transition-old(root),
::view-transition-new(root) {
animation: none;
Expand Down
4 changes: 2 additions & 2 deletions src/components/ThemeConfigPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
</l-radio-group>
<strong>{{ locales[lang]?.components.appearance }}</strong>
<l-switch :checked="isDark" @update="toggleAppearanceWithTransition" id="switch-appearance">
<span :class="isDark ? 'vpi-moon moon' : 'vpi-sun sun'" slot="thumb" style="color: var(--l-accent-9)" />
<span :class="isDark ? 'vpi-moon moon' : 'vpi-sun sun'" slot="thumb" style="color: var(--l-accent-9); transform: scale(0.9)" />
</l-switch>
<strong>{{ locales[lang]?.components.size }}</strong>
<l-radio-group v-update="theme.size">
Expand Down Expand Up @@ -75,7 +75,7 @@ const props = defineProps<{
'gray-color': string;
size: string;
radius: string;
scale: string;
scale: string | number;
};
lang: keyof typeof locales;
animate: (update: AnyFn) => void;
Expand Down
4 changes: 3 additions & 1 deletion utils/getViteConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@ export const isIIFE = () => process.env.BUILD_FORMAT === 'iife';

export const isDev = () => process.env.NODE_ENV === 'development';

const isNetlify = process.env.NETLIFY === 'true';

export function getViteConfig(name: string, viteConfig?: UserConfig) {
const iife = isIIFE();
const dev = iife || isDev() || !!process.env.VITEST;
const noType = iife || process.env.NO_TYPE_EMIT === 'true';
const noType = isNetlify || iife || process.env.NO_TYPE_EMIT === 'true';
const fileName = name.replace('@', '').replace(/\//g, '-');
return defineConfig({
...viteConfig,
Expand Down

0 comments on commit 2aa0076

Please sign in to comment.