acrylblends 0.6.2 → 0.6.3
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.
- package/README.md +4 -1
- package/docs/framework/README.md +3 -2
- package/docs/framework/UPSTREAM.md +1 -1
- package/docs/framework/cordis/acryl-in-a-cordis-app.md +6 -0
- package/docs/framework/getting-started/basic.md +1 -0
- package/docs/framework/getting-started/desktop.md +41 -0
- package/docs/framework/guides/jsx-dom.md +0 -3
- package/docs/framework/guides/jsx.md +0 -3
- package/docs/framework/helpers/css.md +0 -3
- package/docs/framework/upstream.json +3 -3
- package/lib/accepts.d.ts +1 -1
- package/lib/acryl-base.d.ts +1 -1
- package/lib/adapter.d.ts +1 -1
- package/lib/{app-BdrVHBlJ.d.ts → app-wFwpg-bt.d.ts} +1 -1
- package/lib/base-BpQy2Rk7.d.ts +783 -0
- package/lib/base-ddiVmiE7.js +721 -0
- package/lib/basic-auth.d.ts +1 -1
- package/lib/bearer-auth.d.ts +1 -1
- package/lib/body-limit.d.ts +1 -1
- package/lib/cache.d.ts +1 -1
- package/lib/client.d.ts +2 -2
- package/lib/combine.d.ts +1 -1
- package/lib/common-D8Z4JRCw.d.ts +46 -0
- package/lib/components-Ce5FRyHU.js +268 -0
- package/lib/components-DYZdxJIJ.js +24 -0
- package/lib/compress.d.ts +1 -1
- package/lib/conninfo.d.ts +2 -2
- package/lib/constants-BR9jM9BC.js +9 -0
- package/lib/{context-B5Y1lLha.d.ts → context-DVQBjuns.d.ts} +1 -1
- package/lib/context-DxFdY_un.d.ts +250 -0
- package/lib/context-storage.d.ts +1 -1
- package/lib/{cookie-D9_nQbsM.d.ts → cookie-CCelEqky.d.ts} +1 -1
- package/lib/cookie.d.ts +3 -3
- package/lib/cors.d.ts +1 -1
- package/lib/csrf.d.ts +1 -1
- package/lib/css-D2jb7X8b.js +320 -0
- package/lib/css.d.ts +82 -0
- package/lib/css.js +134 -0
- package/lib/dev.d.ts +2 -2
- package/lib/etag.d.ts +1 -1
- package/lib/factory.d.ts +2 -2
- package/lib/hooks-Bq5q9IMl.js +762 -0
- package/lib/html-SllAe0YT.d.ts +46 -0
- package/lib/html.d.ts +1 -1
- package/lib/index-C850MeBA.d.ts +94 -0
- package/lib/{index-m12zcmph.d.ts → index-CUTfU69R.d.ts} +3 -3
- package/lib/{index-DtEoak1i.d.ts → index-Cqcdluyn.d.ts} +2 -2
- package/lib/{index-Kqou8Fjh.d.ts → index-CsvB-F9j.d.ts} +2 -2
- package/lib/index.d.ts +4 -4
- package/lib/ip-restriction.d.ts +2 -2
- package/lib/jsx/dom/client.d.ts +30 -0
- package/lib/jsx/dom/client.js +49 -0
- package/lib/jsx/dom/css.d.ts +84 -0
- package/lib/jsx/dom/css.js +2 -0
- package/lib/jsx/dom/jsx-dev-runtime.d.ts +3 -0
- package/lib/jsx/dom/jsx-dev-runtime.js +2 -0
- package/lib/jsx/dom/jsx-runtime.d.ts +3 -0
- package/lib/jsx/dom/jsx-runtime.js +2 -0
- package/lib/jsx/dom/server.d.ts +105 -0
- package/lib/jsx/dom/server.js +37 -0
- package/lib/jsx/dom.d.ts +5 -0
- package/lib/jsx/dom.js +74 -0
- package/lib/jsx/jsx-dev-runtime.d.ts +6 -0
- package/lib/jsx/jsx-dev-runtime.js +14 -0
- package/lib/jsx/jsx-runtime.d.ts +10 -0
- package/lib/jsx/jsx-runtime.js +30 -0
- package/lib/jsx/streaming.d.ts +2 -0
- package/lib/jsx/streaming.js +2 -0
- package/lib/jsx-dev-runtime-B22O-Npk.d.ts +7 -0
- package/lib/jsx-dev-runtime-kAhR_4C7.js +354 -0
- package/lib/jsx-runtime-BVVgDSdq.d.ts +1 -0
- package/lib/jsx.d.ts +3 -0
- package/lib/jsx.js +47 -0
- package/lib/jwk.d.ts +4 -4
- package/lib/{jwt-BA65QhnJ.d.ts → jwt-BARhotDz.d.ts} +1 -1
- package/lib/jwt.d.ts +4 -4
- package/lib/language.d.ts +1 -1
- package/lib/logger.d.ts +1 -1
- package/lib/loopback-only.d.ts +1 -1
- package/lib/method-not-allowed.d.ts +2 -2
- package/lib/method-override.d.ts +2 -2
- package/lib/mount.d.ts +1 -1
- package/lib/node-server/conninfo.d.ts +1 -1
- package/lib/node-server/serve-static.d.ts +1 -1
- package/lib/node-server/serve-static.js +1 -1
- package/lib/node-server.d.ts +1 -1
- package/lib/node-server.js +1 -1
- package/lib/powered-by.d.ts +1 -1
- package/lib/pretty-json.d.ts +1 -1
- package/lib/proxy.d.ts +1 -1
- package/lib/quick.d.ts +1 -1
- package/lib/request-id.d.ts +1 -1
- package/lib/request.d.ts +1 -1
- package/lib/route.d.ts +1 -1
- package/lib/schema-validator.d.ts +1 -1
- package/lib/secure-headers.d.ts +1 -1
- package/lib/{serve-static-Dw_m6KxR.js → serve-static-Cw23shXv.js} +1 -0
- package/lib/serve-static.d.ts +1 -1
- package/lib/streaming.d.ts +1 -1
- package/lib/testing.d.ts +4 -4
- package/lib/timeout.d.ts +1 -1
- package/lib/timing.d.ts +1 -1
- package/lib/tiny.d.ts +1 -1
- package/lib/trailing-slash.d.ts +1 -1
- package/lib/{types-Bd29gh2o.d.ts → types-CQiGmsWW.d.ts} +3 -3
- package/lib/{types-D9DEXMjE.d.ts → types-Lqx5BxQF.d.ts} +8 -1
- package/lib/{types-ZM9gIiKh.d.ts → types-nEL8VPDC.d.ts} +1 -1
- package/lib/types.d.ts +1 -1
- package/lib/utils/body.d.ts +1 -1
- package/lib/utils/cookie.d.ts +1 -1
- package/lib/utils/crypto.d.ts +1 -1
- package/lib/utils/html.d.ts +1 -45
- package/lib/utils/ipaddr.d.ts +1 -1
- package/lib/utils/jwt.d.ts +1 -1
- package/lib/utils/types.d.ts +2 -2
- package/lib/validator.d.ts +2 -2
- package/lib/ws.d.ts +1 -1
- package/package.json +45 -1
- package/plugins/acryl-inspect/upstream.json +1 -1
- package/plugins/acryl-node-server/upstream.json +1 -1
- package/plugins/acryl-router/src/core/helper/css/common.case.test.tsx +506 -0
- package/plugins/acryl-router/src/core/helper/css/common.ts +337 -0
- package/plugins/acryl-router/src/core/helper/css/index.test.tsx +678 -0
- package/plugins/acryl-router/src/core/helper/css/index.ts +262 -0
- package/plugins/acryl-router/src/core/helper/streaming/sse.test.tsx +557 -0
- package/plugins/acryl-router/src/core/jsx/base.test.tsx +97 -0
- package/plugins/acryl-router/src/core/jsx/base.ts +490 -0
- package/plugins/acryl-router/src/core/jsx/children.test.ts +52 -0
- package/plugins/acryl-router/src/core/jsx/children.ts +20 -0
- package/plugins/acryl-router/src/core/jsx/components.test.tsx +936 -0
- package/plugins/acryl-router/src/core/jsx/components.ts +257 -0
- package/plugins/acryl-router/src/core/jsx/constants.ts +6 -0
- package/plugins/acryl-router/src/core/jsx/context-isolation.test.ts +655 -0
- package/plugins/acryl-router/src/core/jsx/context.ts +266 -0
- package/plugins/acryl-router/src/core/jsx/dom/client.test.tsx +128 -0
- package/plugins/acryl-router/src/core/jsx/dom/client.ts +89 -0
- package/plugins/acryl-router/src/core/jsx/dom/components.test.tsx +330 -0
- package/plugins/acryl-router/src/core/jsx/dom/components.ts +39 -0
- package/plugins/acryl-router/src/core/jsx/dom/context.test.tsx +184 -0
- package/plugins/acryl-router/src/core/jsx/dom/context.ts +52 -0
- package/plugins/acryl-router/src/core/jsx/dom/css.test.tsx +149 -0
- package/plugins/acryl-router/src/core/jsx/dom/css.ts +263 -0
- package/plugins/acryl-router/src/core/jsx/dom/hooks/index.test.tsx +172 -0
- package/plugins/acryl-router/src/core/jsx/dom/hooks/index.ts +91 -0
- package/plugins/acryl-router/src/core/jsx/dom/index.test.tsx +3681 -0
- package/plugins/acryl-router/src/core/jsx/dom/index.ts +170 -0
- package/plugins/acryl-router/src/core/jsx/dom/intrinsic-element/components.test.tsx +1344 -0
- package/plugins/acryl-router/src/core/jsx/dom/intrinsic-element/components.ts +438 -0
- package/plugins/acryl-router/src/core/jsx/dom/jsx-dev-runtime.ts +23 -0
- package/plugins/acryl-router/src/core/jsx/dom/jsx-runtime.ts +8 -0
- package/plugins/acryl-router/src/core/jsx/dom/render.ts +879 -0
- package/plugins/acryl-router/src/core/jsx/dom/server.test.tsx +199 -0
- package/plugins/acryl-router/src/core/jsx/dom/server.ts +76 -0
- package/plugins/acryl-router/src/core/jsx/dom/utils.ts +7 -0
- package/plugins/acryl-router/src/core/jsx/hooks/dom.test.tsx +859 -0
- package/plugins/acryl-router/src/core/jsx/hooks/index.ts +437 -0
- package/plugins/acryl-router/src/core/jsx/hooks/string.test.tsx +40 -0
- package/plugins/acryl-router/src/core/jsx/index.test.tsx +1744 -0
- package/plugins/acryl-router/src/core/jsx/index.ts +115 -0
- package/plugins/acryl-router/src/core/jsx/intrinsic-element/common.ts +23 -0
- package/plugins/acryl-router/src/core/jsx/intrinsic-element/components.test.tsx +666 -0
- package/plugins/acryl-router/src/core/jsx/intrinsic-element/components.ts +210 -0
- package/plugins/acryl-router/src/core/jsx/intrinsic-elements.ts +938 -0
- package/plugins/acryl-router/src/core/jsx/jsx-dev-runtime.ts +26 -0
- package/plugins/acryl-router/src/core/jsx/jsx-runtime.test.tsx +85 -0
- package/plugins/acryl-router/src/core/jsx/jsx-runtime.ts +51 -0
- package/plugins/acryl-router/src/core/jsx/streaming.test.tsx +1281 -0
- package/plugins/acryl-router/src/core/jsx/streaming.ts +231 -0
- package/plugins/acryl-router/src/core/jsx/types.ts +41 -0
- package/plugins/acryl-router/src/core/jsx/utils.test.ts +366 -0
- package/plugins/acryl-router/src/core/jsx/utils.ts +202 -0
- package/plugins/acryl-router/src/core/utils/types.ts +6 -0
- package/plugins/acryl-router/src/helpers/index.ts +1 -0
- package/plugins/acryl-router/tests/jsx.spec.tsx +63 -0
- package/plugins/acryl-router/upstream.json +3 -3
- package/plugins/acryl-router-http/upstream.json +1 -1
- package/plugins/acryl-state/upstream.json +1 -1
- package/plugins/desktop/upstream.json +1 -1
- package/plugins/desktop-web/upstream.json +1 -1
- package/plugins/save/plugin.json +1 -1
- package/templates/todo/upstream.json +1 -1
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
import { a as DomEvent } from "./types-Lqx5BxQF.js";
|
|
2
|
+
import { i as HtmlEscapedString } from "./html-SllAe0YT.js";
|
|
3
|
+
import { a as JSX, o as JSXNode, p as JSX$1, r as FC, s as Props, t as Child } from "./base-BpQy2Rk7.js";
|
|
4
|
+
|
|
5
|
+
//#region ../../plugins/acryl-router/src/core/jsx/components.d.ts
|
|
6
|
+
type ErrorHandler = (error: Error) => void;
|
|
7
|
+
type FallbackRender = (error: Error) => Child;
|
|
8
|
+
/**
|
|
9
|
+
* @experimental
|
|
10
|
+
* `ErrorBoundary` is an experimental feature.
|
|
11
|
+
* The API might be changed.
|
|
12
|
+
*/
|
|
13
|
+
declare const ErrorBoundary: FC<PropsWithChildren<{
|
|
14
|
+
fallback?: Child;
|
|
15
|
+
fallbackRender?: FallbackRender;
|
|
16
|
+
onError?: ErrorHandler;
|
|
17
|
+
}>>;
|
|
18
|
+
//#endregion
|
|
19
|
+
//#region ../../plugins/acryl-router/src/core/jsx/hooks/index.d.ts
|
|
20
|
+
type UpdateStateFunction<T> = (newState: T | ((currentState: T) => T)) => void;
|
|
21
|
+
declare const startViewTransition: (callback: () => void) => void;
|
|
22
|
+
declare const useViewTransition: () => [boolean, (callback: () => void) => void];
|
|
23
|
+
declare const startTransition: (callback: () => void) => void;
|
|
24
|
+
declare const useTransition: () => [boolean, (callback: () => void | Promise<void>) => void];
|
|
25
|
+
type UseDeferredValue = <T>(value: T, initialValue?: T) => T;
|
|
26
|
+
declare const useDeferredValue: UseDeferredValue;
|
|
27
|
+
type UseStateType = {
|
|
28
|
+
<T>(initialState: T | (() => T)): [T, UpdateStateFunction<T>];
|
|
29
|
+
<T = undefined>(): [T | undefined, UpdateStateFunction<T | undefined>];
|
|
30
|
+
};
|
|
31
|
+
declare const useState: UseStateType;
|
|
32
|
+
declare const useReducer: <T, A>(reducer: (state: T, action: A) => T, initialArg: T, init?: (initialState: T) => T) => [T, (action: A) => void];
|
|
33
|
+
declare const useEffect: (effect: () => void | (() => void), deps?: readonly unknown[]) => void;
|
|
34
|
+
declare const useLayoutEffect: (effect: () => void | (() => void), deps?: readonly unknown[]) => void;
|
|
35
|
+
declare const useInsertionEffect: (effect: () => void | (() => void), deps?: readonly unknown[]) => void;
|
|
36
|
+
declare const useCallback: <T extends Function>(callback: T, deps: readonly unknown[]) => T;
|
|
37
|
+
type RefObject<T> = {
|
|
38
|
+
current: T;
|
|
39
|
+
};
|
|
40
|
+
declare function useRef<T>(initialValue: T): RefObject<T>;
|
|
41
|
+
declare function useRef<T>(initialValue: T | null): RefObject<T | null>;
|
|
42
|
+
declare function useRef<T>(initialValue: T | undefined): RefObject<T | undefined>;
|
|
43
|
+
declare const use: <T>(promise: Promise<T>) => T;
|
|
44
|
+
declare const useMemo: <T>(factory: () => T, deps: readonly unknown[]) => T;
|
|
45
|
+
declare const useId: () => string;
|
|
46
|
+
declare const useDebugValue: (_value: unknown, _formatter?: (value: unknown) => string) => void;
|
|
47
|
+
declare const createRef: <T>() => RefObject<T | null>;
|
|
48
|
+
declare const forwardRef: <T, P = {}>(Component: (props: P, ref?: RefObject<T | null>) => JSX.Element) => ((props: P & {
|
|
49
|
+
ref?: RefObject<T | null>;
|
|
50
|
+
}) => JSX.Element);
|
|
51
|
+
declare const useImperativeHandle: <T>(ref: RefObject<T | null>, createHandle: () => T, deps: readonly unknown[]) => void;
|
|
52
|
+
declare const useSyncExternalStore: <T>(subscribe: (callback: () => void) => () => void, getSnapshot: () => T, getServerSnapshot?: () => T) => T;
|
|
53
|
+
//#endregion
|
|
54
|
+
//#region ../../plugins/acryl-router/src/core/jsx/types.d.ts
|
|
55
|
+
type PropsWithChildren<P = unknown> = P & {
|
|
56
|
+
children?: Child | undefined;
|
|
57
|
+
};
|
|
58
|
+
type CSSProperties = JSX$1.CSSProperties;
|
|
59
|
+
/**
|
|
60
|
+
* React types
|
|
61
|
+
*/
|
|
62
|
+
type ReactElement<P = any, T = string | Function> = JSXNode & {
|
|
63
|
+
type: T;
|
|
64
|
+
props: P;
|
|
65
|
+
key: string | null;
|
|
66
|
+
};
|
|
67
|
+
type ReactNode = ReactElement | string | number | boolean | null | undefined;
|
|
68
|
+
type ComponentClass<_P = {}, _S = {}> = unknown;
|
|
69
|
+
type Event = globalThis.Event;
|
|
70
|
+
type MouseEvent = DomEvent<'MouseEvent'>;
|
|
71
|
+
type KeyboardEvent = DomEvent<'KeyboardEvent'>;
|
|
72
|
+
type FocusEvent = DomEvent<'FocusEvent'>;
|
|
73
|
+
type ClipboardEvent = DomEvent<'ClipboardEvent'>;
|
|
74
|
+
type InputEvent = DomEvent<'InputEvent'>;
|
|
75
|
+
type PointerEvent = DomEvent<'PointerEvent'>;
|
|
76
|
+
type TouchEvent = DomEvent<'TouchEvent'>;
|
|
77
|
+
type WheelEvent = DomEvent<'WheelEvent'>;
|
|
78
|
+
type AnimationEvent = DomEvent<'AnimationEvent'>;
|
|
79
|
+
type TransitionEvent = DomEvent<'TransitionEvent'>;
|
|
80
|
+
type DragEvent = DomEvent<'DragEvent'>;
|
|
81
|
+
//#endregion
|
|
82
|
+
//#region ../../plugins/acryl-router/src/core/jsx/children.d.ts
|
|
83
|
+
declare const Children: {
|
|
84
|
+
map: (children: Child[], fn: (child: Child, index: number) => Child) => Child[];
|
|
85
|
+
forEach: (children: Child[], fn: (child: Child, index: number) => void) => void;
|
|
86
|
+
count: (children: Child[]) => number;
|
|
87
|
+
only: (_children: Child[]) => Child;
|
|
88
|
+
toArray: (children: Child) => Child[];
|
|
89
|
+
};
|
|
90
|
+
//#endregion
|
|
91
|
+
//#region ../../plugins/acryl-router/src/core/jsx/dom/hooks/index.d.ts
|
|
92
|
+
type FormStatus = {
|
|
93
|
+
pending: false;
|
|
94
|
+
data: null;
|
|
95
|
+
method: null;
|
|
96
|
+
action: null;
|
|
97
|
+
} | {
|
|
98
|
+
pending: true;
|
|
99
|
+
data: FormData;
|
|
100
|
+
method: 'get' | 'post';
|
|
101
|
+
action: string | ((formData: FormData) => void | Promise<void>);
|
|
102
|
+
};
|
|
103
|
+
/**
|
|
104
|
+
* This hook returns the current form status
|
|
105
|
+
* @returns FormStatus
|
|
106
|
+
*/
|
|
107
|
+
declare const useFormStatus: () => FormStatus;
|
|
108
|
+
/**
|
|
109
|
+
* This hook returns the current state and a function to update the state optimistically
|
|
110
|
+
* The current state is updated optimistically and then reverted to the original state when all actions are resolved
|
|
111
|
+
* @param state
|
|
112
|
+
* @param updateState
|
|
113
|
+
* @returns [T, (action: N) => void]
|
|
114
|
+
*/
|
|
115
|
+
declare const useOptimistic: <T, N>(state: T, updateState: (currentState: T, action: N) => T) => [T, (action: N) => void];
|
|
116
|
+
/**
|
|
117
|
+
* This hook returns the current state and a function to update the state by form action
|
|
118
|
+
* @param fn
|
|
119
|
+
* @param initialState
|
|
120
|
+
* @param permalink
|
|
121
|
+
* @returns [T, (data: FormData) => void]
|
|
122
|
+
*/
|
|
123
|
+
declare const useActionState: <T>(fn: Function, initialState: T, permalink?: string) => [T, Function];
|
|
124
|
+
//#endregion
|
|
125
|
+
//#region ../../plugins/acryl-router/src/core/jsx/streaming.d.ts
|
|
126
|
+
/**
|
|
127
|
+
* Used to specify nonce for scripts generated by `Suspense` and `ErrorBoundary`.
|
|
128
|
+
*
|
|
129
|
+
* @example
|
|
130
|
+
* ```tsx
|
|
131
|
+
* <StreamingContext.Provider value={{ scriptNonce: 'test-nonce' }}>
|
|
132
|
+
* <Suspense fallback={<p>Loading...</p>}>
|
|
133
|
+
* <Content />
|
|
134
|
+
* </Suspense>
|
|
135
|
+
* </StreamingContext.Provider>
|
|
136
|
+
* ```
|
|
137
|
+
*/
|
|
138
|
+
declare const StreamingContext: Context<{
|
|
139
|
+
scriptNonce: string;
|
|
140
|
+
} | null>;
|
|
141
|
+
/**
|
|
142
|
+
* @experimental
|
|
143
|
+
* `Suspense` is an experimental feature.
|
|
144
|
+
* The API might be changed.
|
|
145
|
+
*/
|
|
146
|
+
declare const Suspense: FC<PropsWithChildren<{
|
|
147
|
+
fallback: any;
|
|
148
|
+
}>>;
|
|
149
|
+
/**
|
|
150
|
+
* @experimental
|
|
151
|
+
* `renderToReadableStream()` is an experimental feature.
|
|
152
|
+
* The API might be changed.
|
|
153
|
+
*/
|
|
154
|
+
declare const renderToReadableStream: (content: HtmlEscapedString | JSXNode | Promise<HtmlEscapedString>, onError?: (e: unknown) => string | void) => ReadableStream<Uint8Array>;
|
|
155
|
+
//#endregion
|
|
156
|
+
//#region ../../plugins/acryl-router/src/core/jsx/index.d.ts
|
|
157
|
+
declare const _default: {
|
|
158
|
+
version: string;
|
|
159
|
+
memo: <T>(component: FC<T>, propsAreEqual?: (prevProps: Readonly<T>, nextProps: Readonly<T>) => boolean) => FC<T>;
|
|
160
|
+
Fragment: ({
|
|
161
|
+
children
|
|
162
|
+
}: {
|
|
163
|
+
key?: string;
|
|
164
|
+
children?: Child | HtmlEscapedString;
|
|
165
|
+
}) => HtmlEscapedString;
|
|
166
|
+
StrictMode: ({
|
|
167
|
+
children
|
|
168
|
+
}: {
|
|
169
|
+
key?: string;
|
|
170
|
+
children?: Child | HtmlEscapedString;
|
|
171
|
+
}) => HtmlEscapedString;
|
|
172
|
+
isValidElement: (element: unknown) => element is JSXNode;
|
|
173
|
+
createElement: (tag: string | Function, props: Props | null, ...children: Child[]) => JSXNode;
|
|
174
|
+
cloneElement: <T extends JSXNode | JSX.Element>(element: T, props: Partial<Props>, ...children: Child[]) => T;
|
|
175
|
+
ErrorBoundary: FC<PropsWithChildren<{
|
|
176
|
+
fallback?: Child;
|
|
177
|
+
fallbackRender?: FallbackRender;
|
|
178
|
+
onError?: ErrorHandler;
|
|
179
|
+
}>>;
|
|
180
|
+
createContext: <T>(defaultValue: T) => Context<T>;
|
|
181
|
+
useContext: <T>(context: Context<T>) => T;
|
|
182
|
+
useState: {
|
|
183
|
+
<T>(initialState: T | (() => T)): [T, (newState: T | ((currentState: T) => T)) => void];
|
|
184
|
+
<T = undefined>(): [T | undefined, (newState: T | ((currentState: T | undefined) => T | undefined) | undefined) => void];
|
|
185
|
+
};
|
|
186
|
+
useEffect: (effect: () => void | (() => void), deps?: readonly unknown[]) => void;
|
|
187
|
+
useRef: typeof useRef;
|
|
188
|
+
useCallback: <T extends Function>(callback: T, deps: readonly unknown[]) => T;
|
|
189
|
+
useReducer: <T, A>(reducer: (state: T, action: A) => T, initialArg: T, init?: (initialState: T) => T) => [T, (action: A) => void];
|
|
190
|
+
useId: () => string;
|
|
191
|
+
useDebugValue: (_value: unknown, _formatter?: (value: unknown) => string) => void;
|
|
192
|
+
use: <T>(promise: Promise<T>) => T;
|
|
193
|
+
startTransition: (callback: () => void) => void;
|
|
194
|
+
useTransition: () => [boolean, (callback: () => void | Promise<void>) => void];
|
|
195
|
+
useDeferredValue: <T>(value: T, initialValue?: T) => T;
|
|
196
|
+
startViewTransition: (callback: () => void) => void;
|
|
197
|
+
useViewTransition: () => [boolean, (callback: () => void) => void];
|
|
198
|
+
useMemo: <T>(factory: () => T, deps: readonly unknown[]) => T;
|
|
199
|
+
useLayoutEffect: (effect: () => void | (() => void), deps?: readonly unknown[]) => void;
|
|
200
|
+
useInsertionEffect: (effect: () => void | (() => void), deps?: readonly unknown[]) => void;
|
|
201
|
+
createRef: <T>() => RefObject<T | null>;
|
|
202
|
+
forwardRef: <T, P = {}>(Component: (props: P, ref?: RefObject<T | null>) => JSX.Element) => ((props: P & {
|
|
203
|
+
ref?: RefObject<T | null>;
|
|
204
|
+
}) => JSX.Element);
|
|
205
|
+
useImperativeHandle: <T>(ref: RefObject<T | null>, createHandle: () => T, deps: readonly unknown[]) => void;
|
|
206
|
+
useSyncExternalStore: <T>(subscribe: (callback: () => void) => () => void, getSnapshot: () => T, getServerSnapshot?: () => T) => T;
|
|
207
|
+
useActionState: <T>(fn: Function, initialState: T, permalink?: string) => [T, Function];
|
|
208
|
+
useOptimistic: <T, N>(state: T, updateState: (currentState: T, action: N) => T) => [T, (action: N) => void];
|
|
209
|
+
Suspense: FC<PropsWithChildren<{
|
|
210
|
+
fallback: any;
|
|
211
|
+
}>>;
|
|
212
|
+
Children: {
|
|
213
|
+
map: (children: Child[], fn: (child: Child, index: number) => Child) => Child[];
|
|
214
|
+
forEach: (children: Child[], fn: (child: Child, index: number) => void) => void;
|
|
215
|
+
count: (children: Child[]) => number;
|
|
216
|
+
only: (_children: Child[]) => Child;
|
|
217
|
+
toArray: (children: Child) => Child[];
|
|
218
|
+
};
|
|
219
|
+
};
|
|
220
|
+
//#endregion
|
|
221
|
+
//#region ../../plugins/acryl-router/src/core/jsx/context.d.ts
|
|
222
|
+
interface Context<T> extends FC<PropsWithChildren<{
|
|
223
|
+
value: T;
|
|
224
|
+
}>> {
|
|
225
|
+
values: T[];
|
|
226
|
+
Provider: FC<PropsWithChildren<{
|
|
227
|
+
value: T;
|
|
228
|
+
}>>;
|
|
229
|
+
}
|
|
230
|
+
/**
|
|
231
|
+
* Create a context whose value can be provided with `<Context.Provider>` and
|
|
232
|
+
* read with {@link useContext}.
|
|
233
|
+
*
|
|
234
|
+
* Server-side renders are isolated per request, so a provided value never leaks
|
|
235
|
+
* into a concurrent request — even across `await` in an async component, when
|
|
236
|
+
* `AsyncLocalStorage` is available (Node.js >= 20.16, Deno, Bun, Cloudflare
|
|
237
|
+
* Workers with `nodejs_compat`). Without it, reading context after `await`
|
|
238
|
+
* returns the default value; synchronous components and `use()`-based
|
|
239
|
+
* suspension are unaffected.
|
|
240
|
+
*/
|
|
241
|
+
declare const createContext: <T>(defaultValue: T) => Context<T>;
|
|
242
|
+
/**
|
|
243
|
+
* Read the current value of a context created with {@link createContext}.
|
|
244
|
+
*
|
|
245
|
+
* Safe to call from async components after `await`. See {@link createContext}
|
|
246
|
+
* for the per-runtime isolation guarantees.
|
|
247
|
+
*/
|
|
248
|
+
declare const useContext: <T>(context: Context<T>) => T;
|
|
249
|
+
//#endregion
|
|
250
|
+
export { createRef as A, useImperativeHandle as B, PropsWithChildren as C, TransitionEvent as D, TouchEvent as E, useCallback as F, useRef as G, useLayoutEffect as H, useDebugValue as I, useTransition as J, useState as K, useDeferredValue as L, startTransition as M, startViewTransition as N, WheelEvent as O, use as P, FallbackRender as Q, useEffect as R, PointerEvent as S, ReactNode as T, useMemo as U, useInsertionEffect as V, useReducer as W, ErrorBoundary as X, useViewTransition as Y, ErrorHandler as Z, Event as _, StreamingContext as a, KeyboardEvent as b, useActionState as c, Children as d, AnimationEvent as f, DragEvent as g, ComponentClass as h, _default as i, forwardRef as j, RefObject as k, useFormStatus as l, ClipboardEvent as m, createContext as n, Suspense as o, CSSProperties as p, useSyncExternalStore as q, useContext as r, renderToReadableStream as s, Context as t, useOptimistic as u, FocusEvent as v, ReactElement as w, MouseEvent as x, InputEvent as y, useId as z };
|
package/lib/context-storage.d.ts
CHANGED
package/lib/cookie.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as Context } from "./context-
|
|
2
|
-
import { n as BufferSource } from "./types-
|
|
3
|
-
import { a as SignedCookie, i as CookiePrefixOptions, r as CookieOptions, t as Cookie } from "./cookie-
|
|
1
|
+
import { t as Context } from "./context-DVQBjuns.js";
|
|
2
|
+
import { n as BufferSource } from "./types-Lqx5BxQF.js";
|
|
3
|
+
import { a as SignedCookie, i as CookiePrefixOptions, r as CookieOptions, t as Cookie } from "./cookie-CCelEqky.js";
|
|
4
4
|
|
|
5
5
|
//#region ../../plugins/acryl-router/src/core/helper/cookie/index.d.ts
|
|
6
6
|
interface GetCookie {
|
package/lib/cors.d.ts
CHANGED
package/lib/csrf.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { I as MiddlewareHandler, t as Context } from "./context-
|
|
1
|
+
import { I as MiddlewareHandler, t as Context } from "./context-DVQBjuns.js";
|
|
2
2
|
|
|
3
3
|
//#region ../../plugins/acryl-router/src/core/middleware/csrf/index.d.ts
|
|
4
4
|
type IsAllowedOriginHandler = (origin: string, context: Context) => boolean | Promise<boolean>;
|
|
@@ -0,0 +1,320 @@
|
|
|
1
|
+
//#region ../../plugins/acryl-router/src/core/helper/css/common.ts
|
|
2
|
+
const PSEUDO_GLOBAL_SELECTOR = ":-acryl-global";
|
|
3
|
+
const isPseudoGlobalSelectorRe = new RegExp(`^${PSEUDO_GLOBAL_SELECTOR}{(.*)}$`);
|
|
4
|
+
const DEFAULT_STYLE_ID = "acryl-css";
|
|
5
|
+
const SELECTOR = Symbol();
|
|
6
|
+
const CLASS_NAME = Symbol();
|
|
7
|
+
const STYLE_STRING = Symbol();
|
|
8
|
+
const SELECTORS = Symbol();
|
|
9
|
+
const EXTERNAL_CLASS_NAMES = Symbol();
|
|
10
|
+
const CSS_ESCAPED = Symbol();
|
|
11
|
+
/**
|
|
12
|
+
* @experimental
|
|
13
|
+
* `rawCssString` is an experimental feature.
|
|
14
|
+
* The API might be changed.
|
|
15
|
+
*/
|
|
16
|
+
const rawCssString = (value) => {
|
|
17
|
+
return { [CSS_ESCAPED]: value };
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Used the goober'code as a reference:
|
|
21
|
+
* https://github.com/cristianbote/goober/blob/master/src/core/to-hash.js
|
|
22
|
+
* MIT License, Copyright (c) 2019 Cristian Bote
|
|
23
|
+
*/
|
|
24
|
+
const toHash = (str) => {
|
|
25
|
+
let i = 0, out = 11;
|
|
26
|
+
while (i < str.length) out = 101 * out + str.charCodeAt(i++) >>> 0;
|
|
27
|
+
return "css-" + out;
|
|
28
|
+
};
|
|
29
|
+
const normalizeLabel = (label) => {
|
|
30
|
+
return label.trim().replace(/\s+/g, "-");
|
|
31
|
+
};
|
|
32
|
+
const isValidClassName = (name) => /^-?[_a-zA-Z][_a-zA-Z0-9-]*$/.test(name);
|
|
33
|
+
const hasUnsafeSelectorChar = (name) => /[<{}]/.test(name);
|
|
34
|
+
const RESERVED_KEYFRAME_NAMES = /* @__PURE__ */ new Set([
|
|
35
|
+
"default",
|
|
36
|
+
"inherit",
|
|
37
|
+
"initial",
|
|
38
|
+
"none",
|
|
39
|
+
"revert",
|
|
40
|
+
"revert-layer",
|
|
41
|
+
"unset"
|
|
42
|
+
]);
|
|
43
|
+
const isValidKeyframeName = (name) => isValidClassName(name) && !RESERVED_KEYFRAME_NAMES.has(name.toLowerCase());
|
|
44
|
+
const defaultOnInvalidSlug = (slug) => {
|
|
45
|
+
console.warn(`Invalid slug: ${slug}`);
|
|
46
|
+
};
|
|
47
|
+
const cssStringReStr = [
|
|
48
|
+
"\"(?:(?:\\\\[\\s\\S]|[^\"\\\\])*)\"",
|
|
49
|
+
"'(?:(?:\\\\[\\s\\S]|[^'\\\\])*)'",
|
|
50
|
+
"url\\(\\s*[^)\"'\\s]*\\s*\\)"
|
|
51
|
+
].join("|");
|
|
52
|
+
const minifyCssRe = new RegExp([
|
|
53
|
+
"(" + cssStringReStr + ")",
|
|
54
|
+
"(?:" + [
|
|
55
|
+
"^\\s+",
|
|
56
|
+
"\\/\\*.*?\\*\\/\\s*",
|
|
57
|
+
"\\/\\/.*\\n\\s*",
|
|
58
|
+
"\\s+$"
|
|
59
|
+
].join("|") + ")",
|
|
60
|
+
"\\s*;\\s*(}|$)\\s*",
|
|
61
|
+
"\\s*([{};,])\\s*",
|
|
62
|
+
"(:)\\s*",
|
|
63
|
+
"(\\s)\\s+"
|
|
64
|
+
].join("|"), "g");
|
|
65
|
+
const minify = (css) => {
|
|
66
|
+
return css.replace(minifyCssRe, (_, $1, $2, $3, $4, $5) => $1 || $2 || $3 || $4 || $5 || "");
|
|
67
|
+
};
|
|
68
|
+
const buildStyleString = (strings, values) => {
|
|
69
|
+
const selectors = [];
|
|
70
|
+
const externalClassNames = [];
|
|
71
|
+
const label = strings[0].match(/^\s*\/\*(.*?)\*\//)?.[1] || "";
|
|
72
|
+
let styleString = "";
|
|
73
|
+
for (let i = 0, len = strings.length; i < len; i++) {
|
|
74
|
+
styleString += strings[i];
|
|
75
|
+
let vArray = values[i];
|
|
76
|
+
if (typeof vArray === "boolean" || vArray === null || vArray === void 0) continue;
|
|
77
|
+
if (!Array.isArray(vArray)) vArray = [vArray];
|
|
78
|
+
for (let j = 0, len = vArray.length; j < len; j++) {
|
|
79
|
+
let value = vArray[j];
|
|
80
|
+
if (typeof value === "boolean" || value === null || value === void 0) continue;
|
|
81
|
+
if (typeof value === "string") if (/([\\"'\/])/.test(value)) styleString += value.replace(/([\\"']|(?<=<)\/)/g, "\\$1");
|
|
82
|
+
else styleString += value;
|
|
83
|
+
else if (typeof value === "number") styleString += value;
|
|
84
|
+
else if (value[CSS_ESCAPED]) styleString += value[CSS_ESCAPED];
|
|
85
|
+
else if (value[CLASS_NAME].startsWith("@keyframes ")) {
|
|
86
|
+
selectors.push(value);
|
|
87
|
+
styleString += ` ${value[CLASS_NAME].substring(11)} `;
|
|
88
|
+
} else {
|
|
89
|
+
if (strings[i + 1]?.match(/^\s*{/)) {
|
|
90
|
+
selectors.push(value);
|
|
91
|
+
value = `.${value[CLASS_NAME]}`;
|
|
92
|
+
} else {
|
|
93
|
+
selectors.push(...value[SELECTORS]);
|
|
94
|
+
externalClassNames.push(...value[EXTERNAL_CLASS_NAMES]);
|
|
95
|
+
value = value[STYLE_STRING];
|
|
96
|
+
const valueLen = value.length;
|
|
97
|
+
if (valueLen > 0) {
|
|
98
|
+
const lastChar = value[valueLen - 1];
|
|
99
|
+
if (lastChar !== ";" && lastChar !== "}") value += ";";
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
styleString += `${value || ""}`;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
return [
|
|
107
|
+
label,
|
|
108
|
+
minify(styleString),
|
|
109
|
+
selectors,
|
|
110
|
+
externalClassNames
|
|
111
|
+
];
|
|
112
|
+
};
|
|
113
|
+
const cssCommon = (strings, values, classNameSlug, onInvalidSlug) => {
|
|
114
|
+
let [label, thisStyleString, selectors, externalClassNames] = buildStyleString(strings, values);
|
|
115
|
+
const isPseudoGlobal = isPseudoGlobalSelectorRe.exec(thisStyleString);
|
|
116
|
+
if (isPseudoGlobal) thisStyleString = isPseudoGlobal[1];
|
|
117
|
+
const hash = toHash(label + thisStyleString);
|
|
118
|
+
let customSlug;
|
|
119
|
+
if (classNameSlug) {
|
|
120
|
+
const slug = classNameSlug(hash, normalizeLabel(label), thisStyleString);
|
|
121
|
+
if (slug) if (isValidClassName(slug)) customSlug = slug;
|
|
122
|
+
else (onInvalidSlug || defaultOnInvalidSlug)(slug);
|
|
123
|
+
}
|
|
124
|
+
const selector = (isPseudoGlobal ? PSEUDO_GLOBAL_SELECTOR : "") + (customSlug || hash);
|
|
125
|
+
const className = (isPseudoGlobal ? selectors.map((s) => s[CLASS_NAME]) : [selector, ...externalClassNames]).join(" ");
|
|
126
|
+
return {
|
|
127
|
+
[SELECTOR]: selector,
|
|
128
|
+
[CLASS_NAME]: className,
|
|
129
|
+
[STYLE_STRING]: thisStyleString,
|
|
130
|
+
[SELECTORS]: selectors,
|
|
131
|
+
[EXTERNAL_CLASS_NAMES]: externalClassNames
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
const cxCommon = (args) => {
|
|
135
|
+
for (let i = 0, len = args.length; i < len; i++) {
|
|
136
|
+
const arg = args[i];
|
|
137
|
+
if (typeof arg === "string") args[i] = {
|
|
138
|
+
[SELECTOR]: "",
|
|
139
|
+
[CLASS_NAME]: "",
|
|
140
|
+
[STYLE_STRING]: "",
|
|
141
|
+
[SELECTORS]: [],
|
|
142
|
+
[EXTERNAL_CLASS_NAMES]: hasUnsafeSelectorChar(arg) ? [] : [arg]
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
return args;
|
|
146
|
+
};
|
|
147
|
+
const keyframesCommon = (strings, values, classNameSlug, onInvalidSlug) => {
|
|
148
|
+
const [label, styleString] = buildStyleString(strings, values);
|
|
149
|
+
const hash = toHash(label + styleString);
|
|
150
|
+
let customSlug;
|
|
151
|
+
if (classNameSlug) {
|
|
152
|
+
const slug = classNameSlug(hash, normalizeLabel(label), styleString);
|
|
153
|
+
if (slug) if (isValidKeyframeName(slug)) customSlug = slug;
|
|
154
|
+
else (onInvalidSlug || defaultOnInvalidSlug)(slug);
|
|
155
|
+
}
|
|
156
|
+
return {
|
|
157
|
+
[SELECTOR]: "",
|
|
158
|
+
[CLASS_NAME]: `@keyframes ${customSlug || hash}`,
|
|
159
|
+
[STYLE_STRING]: styleString,
|
|
160
|
+
[SELECTORS]: [],
|
|
161
|
+
[EXTERNAL_CLASS_NAMES]: []
|
|
162
|
+
};
|
|
163
|
+
};
|
|
164
|
+
let viewTransitionNameIndex = 0;
|
|
165
|
+
const viewTransitionCommon = ((strings, values, classNameSlug, onInvalidSlug) => {
|
|
166
|
+
if (!strings) strings = [`/* h-v-t ${viewTransitionNameIndex++} */`];
|
|
167
|
+
const content = Array.isArray(strings) ? cssCommon(strings, values, classNameSlug, onInvalidSlug) : strings;
|
|
168
|
+
const transitionName = content[CLASS_NAME];
|
|
169
|
+
const res = cssCommon(["view-transition-name:", ""], [transitionName], classNameSlug, onInvalidSlug);
|
|
170
|
+
content[CLASS_NAME] = PSEUDO_GLOBAL_SELECTOR + content[CLASS_NAME];
|
|
171
|
+
content[STYLE_STRING] = content[STYLE_STRING].replace(/(?<=::view-transition(?:[a-z-]*)\()(?=\))/g, transitionName);
|
|
172
|
+
res[CLASS_NAME] = res[SELECTOR] = transitionName;
|
|
173
|
+
res[SELECTORS] = [...content[SELECTORS], content];
|
|
174
|
+
return res;
|
|
175
|
+
});
|
|
176
|
+
//#endregion
|
|
177
|
+
//#region ../../plugins/acryl-router/src/core/jsx/dom/css.ts
|
|
178
|
+
const splitRule = (rule) => {
|
|
179
|
+
const result = [];
|
|
180
|
+
let startPos = 0;
|
|
181
|
+
let depth = 0;
|
|
182
|
+
for (let i = 0, len = rule.length; i < len; i++) {
|
|
183
|
+
const char = rule[i];
|
|
184
|
+
if (char === "'" || char === "\"") {
|
|
185
|
+
const quote = char;
|
|
186
|
+
i++;
|
|
187
|
+
for (; i < len; i++) {
|
|
188
|
+
if (rule[i] === "\\") {
|
|
189
|
+
i++;
|
|
190
|
+
continue;
|
|
191
|
+
}
|
|
192
|
+
if (rule[i] === quote) break;
|
|
193
|
+
}
|
|
194
|
+
continue;
|
|
195
|
+
}
|
|
196
|
+
if (char === "{") {
|
|
197
|
+
depth++;
|
|
198
|
+
continue;
|
|
199
|
+
}
|
|
200
|
+
if (char === "}") {
|
|
201
|
+
depth--;
|
|
202
|
+
if (depth === 0) {
|
|
203
|
+
result.push(rule.slice(startPos, i + 1));
|
|
204
|
+
startPos = i + 1;
|
|
205
|
+
}
|
|
206
|
+
continue;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
return result;
|
|
210
|
+
};
|
|
211
|
+
const createCssJsxDomObjects = ({ id }) => {
|
|
212
|
+
let styleSheet = void 0;
|
|
213
|
+
const findStyleSheet = () => {
|
|
214
|
+
if (!styleSheet) {
|
|
215
|
+
styleSheet = document.querySelector(`style#${id}`)?.sheet;
|
|
216
|
+
if (styleSheet) styleSheet.addedStyles = /* @__PURE__ */ new Set();
|
|
217
|
+
}
|
|
218
|
+
return styleSheet ? [styleSheet, styleSheet.addedStyles] : [];
|
|
219
|
+
};
|
|
220
|
+
const insertRule = (className, styleString) => {
|
|
221
|
+
const [sheet, addedStyles] = findStyleSheet();
|
|
222
|
+
if (!sheet || !addedStyles) {
|
|
223
|
+
Promise.resolve().then(() => {
|
|
224
|
+
if (!findStyleSheet()[0]) throw new Error("style sheet not found");
|
|
225
|
+
insertRule(className, styleString);
|
|
226
|
+
});
|
|
227
|
+
return;
|
|
228
|
+
}
|
|
229
|
+
if (!addedStyles.has(className)) {
|
|
230
|
+
addedStyles.add(className);
|
|
231
|
+
(className.startsWith(":-acryl-global") ? splitRule(styleString) : [`${className[0] === "@" ? "" : "."}${className}{${styleString}}`]).forEach((rule) => {
|
|
232
|
+
sheet.insertRule(rule, sheet.cssRules.length);
|
|
233
|
+
});
|
|
234
|
+
}
|
|
235
|
+
};
|
|
236
|
+
const cssObject = { toString() {
|
|
237
|
+
const selector = this[SELECTOR];
|
|
238
|
+
insertRule(selector, this[STYLE_STRING]);
|
|
239
|
+
this[SELECTORS].forEach(({ [CLASS_NAME]: className, [STYLE_STRING]: styleString }) => {
|
|
240
|
+
insertRule(className, styleString);
|
|
241
|
+
});
|
|
242
|
+
return this[CLASS_NAME];
|
|
243
|
+
} };
|
|
244
|
+
const Style = ({ children, nonce }) => ({
|
|
245
|
+
tag: "style",
|
|
246
|
+
props: {
|
|
247
|
+
id,
|
|
248
|
+
nonce,
|
|
249
|
+
children: children && (Array.isArray(children) ? children : [children]).map((c) => c[STYLE_STRING])
|
|
250
|
+
}
|
|
251
|
+
});
|
|
252
|
+
return [cssObject, Style];
|
|
253
|
+
};
|
|
254
|
+
/**
|
|
255
|
+
* @experimental
|
|
256
|
+
* `createCssContext` is an experimental feature.
|
|
257
|
+
* The API might be changed.
|
|
258
|
+
*
|
|
259
|
+
* @param options.id - The ID for the style element
|
|
260
|
+
* @param options.classNameSlug - Optional function to customize generated CSS class names
|
|
261
|
+
* @param options.onInvalidSlug - Optional callback function called when an invalid slug is returned from ClassNameSlug
|
|
262
|
+
*/
|
|
263
|
+
const createCssContext = ({ id, classNameSlug, onInvalidSlug }) => {
|
|
264
|
+
const [cssObject, Style] = createCssJsxDomObjects({ id });
|
|
265
|
+
const newCssClassNameObject = (cssClassName) => {
|
|
266
|
+
cssClassName.toString = cssObject.toString;
|
|
267
|
+
return cssClassName;
|
|
268
|
+
};
|
|
269
|
+
const css = (strings, ...values) => {
|
|
270
|
+
return newCssClassNameObject(cssCommon(strings, values, classNameSlug, onInvalidSlug));
|
|
271
|
+
};
|
|
272
|
+
const cx = (...args) => {
|
|
273
|
+
args = cxCommon(args);
|
|
274
|
+
return css(Array(args.length).fill(""), ...args);
|
|
275
|
+
};
|
|
276
|
+
const keyframes = (strings, ...values) => keyframesCommon(strings, values, classNameSlug, onInvalidSlug);
|
|
277
|
+
const viewTransition = ((strings, ...values) => {
|
|
278
|
+
return newCssClassNameObject(viewTransitionCommon(strings, values, classNameSlug, onInvalidSlug));
|
|
279
|
+
});
|
|
280
|
+
return {
|
|
281
|
+
css,
|
|
282
|
+
cx,
|
|
283
|
+
keyframes,
|
|
284
|
+
viewTransition,
|
|
285
|
+
Style
|
|
286
|
+
};
|
|
287
|
+
};
|
|
288
|
+
const defaultContext = createCssContext({ id: DEFAULT_STYLE_ID });
|
|
289
|
+
/**
|
|
290
|
+
* @experimental
|
|
291
|
+
* `css` is an experimental feature.
|
|
292
|
+
* The API might be changed.
|
|
293
|
+
*/
|
|
294
|
+
const css = defaultContext.css;
|
|
295
|
+
/**
|
|
296
|
+
* @experimental
|
|
297
|
+
* `cx` is an experimental feature.
|
|
298
|
+
* The API might be changed.
|
|
299
|
+
*/
|
|
300
|
+
const cx = defaultContext.cx;
|
|
301
|
+
/**
|
|
302
|
+
* @experimental
|
|
303
|
+
* `keyframes` is an experimental feature.
|
|
304
|
+
* The API might be changed.
|
|
305
|
+
*/
|
|
306
|
+
const keyframes = defaultContext.keyframes;
|
|
307
|
+
/**
|
|
308
|
+
* @experimental
|
|
309
|
+
* `viewTransition` is an experimental feature.
|
|
310
|
+
* The API might be changed.
|
|
311
|
+
*/
|
|
312
|
+
const viewTransition = defaultContext.viewTransition;
|
|
313
|
+
/**
|
|
314
|
+
* @experimental
|
|
315
|
+
* `Style` is an experimental feature.
|
|
316
|
+
* The API might be changed.
|
|
317
|
+
*/
|
|
318
|
+
const Style = defaultContext.Style;
|
|
319
|
+
//#endregion
|
|
320
|
+
export { rawCssString as _, cx as a, CLASS_NAME as c, SELECTOR as d, SELECTORS as f, keyframesCommon as g, cxCommon as h, css as i, DEFAULT_STYLE_ID as l, cssCommon as m, createCssContext as n, keyframes as o, STYLE_STRING as p, createCssJsxDomObjects as r, viewTransition as s, Style as t, PSEUDO_GLOBAL_SELECTOR as u, viewTransitionCommon as v };
|