@accelint/design-system 1.0.4 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../node_modules/.pnpm/@ladle+react@5.
|
|
1
|
+
{"version":3,"sources":["../../../node_modules/.pnpm/@ladle+react@5.1.0_@swc+helpers@0.5.17_@types+node@24.9.1_@types+react@19.2.2_jiti@2.6._53e1e0ea88e607d1df5fe4b5cc2f9745/node_modules/@ladle/react/lib/app/exports.ts","../../src/ladle/actions.ts"],"names":[],"mappings":";;;;;;;;;AAkDO,IAAM,MAAA,GAAS,CAAC,IAAA,KAAiB;AACtC,EAAA,MAAM,WAAY,MAAA,CACf,aAAA;AACH,EAAA,OAAO,CAAC,KAAA,GAAa,MAAA,KACnB,QAAA,CAAS;AAAA,IACP,MAAM,UAAA,CAAW,YAAA;AAAA,IACjB,KAAA,EAAO,EAAE,IAAA,EAAM,KAAA,EAAM;AAAA,IACrB,KAAA,EAAO;AAAA,GACR,CAAA;AACL,CAAA;;;ACzDO,SAAS,WAAc,IAAA,EAA+B;AAC3D,EAAA,OAAO,IAAA,CAAK,MAAA,CAAmB,CAAC,GAAA,EAAK,GAAA,KAAQ;AAC3C,IAAA,GAAA,CAAI,GAAG,CAAA,GAAI,MAAA,CAAO,GAAa,CAAA;AAE/B,IAAA,OAAO,GAAA;AAAA,EACT,CAAA,EAAG,EAAE,CAAA;AACP","file":"actions.js","sourcesContent":["import type * as React from \"react\";\nimport { useLadleContext } from \"./src/context\";\nimport {\n StoryDecorator,\n ActionType,\n GlobalState,\n ThemeState,\n ModeState,\n GlobalAction,\n Config,\n KnownMeta,\n MetaJson as BaseMetaJson,\n MetaJsonStory as BaseMetaJsonStory,\n} from \"../shared/types\";\n\nimport * as msw from \"msw\";\nexport { msw };\n\nexport type { UserConfig } from \"../shared/types\";\nexport * as ui from \"./src/ui\";\nexport * as dialog from \"./src/dialog\";\nexport * as icons from \"./src/icons\";\nexport { useMDXComponents } from \"@mdx-js/react\";\nexport const Story = (props: any) => props.children;\nexport const Meta = (props: any) => props.children;\nexport const Description = (props: any) => props.children;\n\ntype ReactNodeWithoutObject =\n | React.ReactElement\n | string\n | number\n | boolean\n | null\n | undefined;\n\nexport { useLadleContext, ActionType, ThemeState, ModeState };\nexport type { StoryDecorator };\n\n// deprecated, linkTo is just easier to use\nexport const useLink = () => {\n const { dispatch } = useLadleContext();\n return (value: string) => dispatch({ type: ActionType.UpdateStory, value });\n};\n\nexport const linkTo = (value: string) => {\n const dispatch = (window as any)\n .ladleDispatch as React.Dispatch<GlobalAction>;\n return () => dispatch({ type: ActionType.UpdateStory, value });\n};\n\nexport const action = (name: string) => {\n const dispatch = (window as any)\n .ladleDispatch as React.Dispatch<GlobalAction>;\n return (event: any = undefined) =>\n dispatch({\n type: ActionType.UpdateAction,\n value: { name, event },\n clear: false,\n });\n};\n\nexport type { GlobalAction, GlobalState };\n\nexport type GlobalProvider = React.FC<{\n globalState: GlobalState;\n dispatch: React.Dispatch<GlobalAction>;\n config: Config;\n children: ReactNodeWithoutObject;\n storyMeta?: Meta;\n}>;\n\nexport type SourceHeader = React.FC<{\n path: string;\n locStart: number;\n locEnd: number;\n}>;\n\nexport interface StoryDefault<P = {}> {\n args?: Args<P>;\n argTypes?: ArgTypes<P>;\n decorators?: StoryDecorator<P>[];\n meta?: Meta;\n title?: string;\n msw?: msw.RequestHandler[];\n parameters?: { [key: string]: any };\n}\n\nexport interface Story<P = {}> extends React.FC<P> {\n args?: Args<P>;\n argTypes?: ArgTypes<P>;\n decorators?: StoryDecorator<P>[];\n meta?: Meta;\n storyName?: string;\n msw?: msw.RequestHandler[];\n parameters?: { [key: string]: any };\n}\n\nexport type Args<\n P = {\n [key: string]: any;\n },\n> = Partial<P>;\n\nexport type ControlType =\n | \"select\"\n | \"multi-select\"\n | \"radio\"\n | \"inline-radio\"\n | \"check\"\n | \"inline-check\"\n | \"background\"\n | \"color\"\n | \"date\"\n | \"number\"\n | \"text\"\n | \"boolean\"\n | \"range\";\n\nexport interface ArgType<K = any> {\n control?: {\n name?: string;\n labels?: { [key: string]: string };\n type: ControlType;\n min?: number;\n max?: number;\n step?: number;\n [key: string]: any;\n };\n mapping?: { [key: string | number]: any };\n options?: K[] | unknown;\n defaultValue?: K;\n description?: string;\n name?: string;\n action?: string;\n [key: string]: any;\n}\n\nexport type ArgTypes<\n P = {\n [key: string]: any;\n },\n> = {\n [key in keyof P]?: ArgType<P[key]>;\n};\n\nexport interface Meta extends KnownMeta {\n [key: string]: any;\n}\n\nexport type MetaJson = BaseMetaJson<Meta>;\nexport type MetaJsonStory = BaseMetaJsonStory<Meta>;\n","import { action } from '@ladle/react';\n\nexport function actions<T>(...keys: (keyof T)[]): Partial<T> {\n return keys.reduce<Partial<T>>((acc, key) => {\n acc[key] = action(key as string) as T[keyof T];\n\n return acc;\n }, {});\n}\n"]}
|
package/dist/test/setup.js
CHANGED
|
@@ -3877,7 +3877,7 @@ typeof document !== "undefined" && document.body ? getQueriesForElement(document
|
|
|
3877
3877
|
return helpers;
|
|
3878
3878
|
}, initialValue);
|
|
3879
3879
|
|
|
3880
|
-
// ../node_modules/.pnpm/@testing-library+react@16.3.0_@testing-library+dom@10.4.0_@types+react-dom@19.
|
|
3880
|
+
// ../node_modules/.pnpm/@testing-library+react@16.3.0_@testing-library+dom@10.4.0_@types+react-dom@19.2.2_@type_42dafc68f916d85688afcbd0763451e5/node_modules/@testing-library/react/dist/@testing-library/react.esm.js
|
|
3881
3881
|
var reactAct = typeof React.act === "function" ? React.act : DeprecatedReactTestUtils.act;
|
|
3882
3882
|
function getGlobalThis() {
|
|
3883
3883
|
if (typeof globalThis !== "undefined") {
|
|
@@ -4081,13 +4081,13 @@ async function waitForImportsToResolve() {
|
|
|
4081
4081
|
await waitForImportsToResolve();
|
|
4082
4082
|
}
|
|
4083
4083
|
|
|
4084
|
-
// ../node_modules/.pnpm/vitest@2.1.9_@types+node@24.9.
|
|
4084
|
+
// ../node_modules/.pnpm/vitest@2.1.9_@types+node@24.9.1_jsdom@25.0.1_msw@2.11.6_@types+node@24.9.1_typescript@5.8.3_/node_modules/vitest/dist/chunks/_commonjsHelpers.BFTU3MAI.js
|
|
4085
4085
|
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
4086
4086
|
function getDefaultExportFromCjs(x) {
|
|
4087
4087
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
4088
4088
|
}
|
|
4089
4089
|
|
|
4090
|
-
// ../node_modules/.pnpm/vitest@2.1.9_@types+node@24.9.
|
|
4090
|
+
// ../node_modules/.pnpm/vitest@2.1.9_@types+node@24.9.1_jsdom@25.0.1_msw@2.11.6_@types+node@24.9.1_typescript@5.8.3_/node_modules/vitest/dist/chunks/date.W2xKR2qe.js
|
|
4091
4091
|
var RealDate = Date;
|
|
4092
4092
|
var now = null;
|
|
4093
4093
|
var MockDate = class _MockDate extends RealDate {
|