build(#10336): update dependencies
This commit is contained in:
parent
bf5fff879f
commit
c2d8759812
435 changed files with 6894 additions and 2953 deletions
|
@ -305,30 +305,6 @@ function toStories(component: string): string {
|
|||
(
|
||||
<identifier name='args' />
|
||||
) as estree.Identifier,
|
||||
(
|
||||
<object-pattern
|
||||
properties={[
|
||||
(
|
||||
<property
|
||||
key={
|
||||
(
|
||||
<identifier name='argTypes' />
|
||||
) as estree.Identifier
|
||||
}
|
||||
value={
|
||||
(
|
||||
<identifier name='argTypes' />
|
||||
) as estree.Identifier
|
||||
}
|
||||
kind={
|
||||
'init' as const
|
||||
}
|
||||
shorthand
|
||||
/>
|
||||
) as estree.AssignmentProperty,
|
||||
]}
|
||||
/>
|
||||
) as estree.ObjectPattern,
|
||||
]}
|
||||
body={
|
||||
(
|
||||
|
@ -378,35 +354,123 @@ function toStories(component: string): string {
|
|||
<property
|
||||
key={
|
||||
(
|
||||
<identifier name='props' />
|
||||
<identifier name='setup' />
|
||||
) as estree.Identifier
|
||||
}
|
||||
value={
|
||||
(
|
||||
<call-expression
|
||||
callee={
|
||||
<function-expression
|
||||
params={[]}
|
||||
body={
|
||||
(
|
||||
<member-expression
|
||||
object={
|
||||
<block-statement
|
||||
body={[
|
||||
(
|
||||
<identifier name='Object' />
|
||||
<return-statement
|
||||
argument={
|
||||
(
|
||||
<object-expression
|
||||
properties={[
|
||||
(
|
||||
<property
|
||||
key={
|
||||
(
|
||||
<identifier name='args' />
|
||||
) as estree.Identifier
|
||||
}
|
||||
value={
|
||||
(
|
||||
<identifier name='args' />
|
||||
) as estree.Identifier
|
||||
}
|
||||
kind={
|
||||
'init' as const
|
||||
}
|
||||
shorthand
|
||||
/>
|
||||
) as estree.Property,
|
||||
]}
|
||||
/>
|
||||
) as estree.ObjectExpression
|
||||
}
|
||||
/>
|
||||
) as estree.ReturnStatement,
|
||||
]}
|
||||
/>
|
||||
) as estree.BlockStatement
|
||||
}
|
||||
/>
|
||||
) as estree.FunctionExpression
|
||||
}
|
||||
method
|
||||
kind={
|
||||
'init' as const
|
||||
}
|
||||
/>
|
||||
) as estree.Property,
|
||||
(
|
||||
<property
|
||||
key={
|
||||
(
|
||||
<identifier name='computed' />
|
||||
) as estree.Identifier
|
||||
}
|
||||
value={
|
||||
(
|
||||
<object-expression
|
||||
properties={[
|
||||
(
|
||||
<property
|
||||
key={
|
||||
(
|
||||
<identifier name='props' />
|
||||
) as estree.Identifier
|
||||
}
|
||||
property={
|
||||
value={
|
||||
(
|
||||
<identifier name='keys' />
|
||||
) as estree.Identifier
|
||||
<function-expression
|
||||
params={[]}
|
||||
body={
|
||||
(
|
||||
<block-statement
|
||||
body={[
|
||||
(
|
||||
<return-statement
|
||||
argument={
|
||||
(
|
||||
<object-expression
|
||||
properties={[
|
||||
(
|
||||
<spread-element
|
||||
argument={
|
||||
(
|
||||
<identifier name='args' />
|
||||
) as estree.Identifier
|
||||
}
|
||||
/>
|
||||
) as estree.SpreadElement,
|
||||
]}
|
||||
/>
|
||||
) as estree.ObjectExpression
|
||||
}
|
||||
/>
|
||||
) as estree.ReturnStatement,
|
||||
]}
|
||||
/>
|
||||
) as estree.BlockStatement
|
||||
}
|
||||
/>
|
||||
) as estree.FunctionExpression
|
||||
}
|
||||
method
|
||||
kind={
|
||||
'init' as const
|
||||
}
|
||||
/>
|
||||
) as estree.MemberExpression
|
||||
}
|
||||
arguments={[
|
||||
(
|
||||
<identifier name='argTypes' />
|
||||
) as estree.Identifier,
|
||||
) as estree.Property,
|
||||
]}
|
||||
/>
|
||||
) as estree.CallExpression
|
||||
) as estree.ObjectExpression
|
||||
}
|
||||
kind={
|
||||
'init' as const
|
||||
|
@ -423,7 +487,7 @@ function toStories(component: string): string {
|
|||
value={
|
||||
(
|
||||
<literal
|
||||
value={`<${identifier.name} v-bind="$props" />`}
|
||||
value={`<${identifier.name} v-bind="props" />`}
|
||||
/>
|
||||
) as estree.Literal
|
||||
}
|
||||
|
|
|
@ -8,6 +8,7 @@ const config = {
|
|||
'@storybook/addon-links',
|
||||
'@storybook/addon-essentials',
|
||||
'@storybook/addon-interactions',
|
||||
'@storybook/addon-storysource',
|
||||
'../node_modules/storybook-addon-misskey-theme',
|
||||
],
|
||||
framework: {
|
||||
|
@ -22,10 +23,15 @@ const config = {
|
|||
},
|
||||
async viteFinal(config, options) {
|
||||
const { plugins, build: { rollupOptions, ...build }, ...original } = getConfig();
|
||||
console.dir(config, {depth:Infinity});
|
||||
console.dir(original, {depth:Infinity});
|
||||
const x = mergeConfig(config, {
|
||||
...original,
|
||||
build,
|
||||
assetsInclude: [resolve(__dirname, '../node_modules/@tabler/icons-webfont/**/*.{css,eot,ttf,woff,woff2}')],
|
||||
server: {
|
||||
hmr: false,
|
||||
},
|
||||
});
|
||||
return x;
|
||||
},
|
||||
|
|
|
@ -1,13 +1,18 @@
|
|||
import { addons } from '@storybook/addons';
|
||||
import { FORCE_REMOUNT } from '@storybook/core-events';
|
||||
import { type Preview, forceReRender, setup } from '@storybook/vue3';
|
||||
import { type Preview, setup } from '@storybook/vue3';
|
||||
import { initialize, mswDecorator } from 'msw-storybook-addon';
|
||||
import locale from './locale';
|
||||
import { commonHandlers, onUnhandledRequest } from './mocks';
|
||||
import themes from './themes';
|
||||
import '../src/style.scss';
|
||||
|
||||
let initialized = false;
|
||||
// TODO: HMR が壊れているのを直す
|
||||
import.meta.hot.invalidate();
|
||||
|
||||
const appInitialized = Symbol();
|
||||
|
||||
let moduleInitialized = false;
|
||||
let unobserve = () => {};
|
||||
|
||||
function loadTheme(applyTheme: typeof import('../src/scripts/theme')['applyTheme']) {
|
||||
|
@ -48,7 +53,11 @@ queueMicrotask(() => {
|
|||
import('../src/scripts/theme'),
|
||||
]).then(([{ default: components }, { default: directives }, { default: widgets }, { applyTheme }]) => {
|
||||
setup((app) => {
|
||||
initialized = true;
|
||||
moduleInitialized = true;
|
||||
if (app[appInitialized]) {
|
||||
return;
|
||||
}
|
||||
app[appInitialized] = true;
|
||||
loadTheme(applyTheme);
|
||||
components(app);
|
||||
directives(app);
|
||||
|
@ -59,17 +68,17 @@ queueMicrotask(() => {
|
|||
|
||||
const preview = {
|
||||
decorators: [
|
||||
mswDecorator,
|
||||
(Story, context) => {
|
||||
const story = Story();
|
||||
if (!initialized) {
|
||||
if (!moduleInitialized) {
|
||||
const channel = addons.getChannel();
|
||||
(globalThis.requestIdleCallback || setTimeout)(() => {
|
||||
channel.emit(FORCE_REMOUNT, { storyId: context.id });
|
||||
});
|
||||
}
|
||||
return story;
|
||||
}
|
||||
},
|
||||
mswDecorator,
|
||||
],
|
||||
parameters: {
|
||||
msw: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue