@seed-design/stackflow 1.1.19 → 1.1.21
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/lib/_virtual/_rolldown/runtime.cjs +34 -0
- package/lib/_virtual/_rolldown/runtime.js +14 -0
- package/lib/components/AppBar/AppBar.cjs +88 -87
- package/lib/components/AppBar/AppBar.d.ts +3 -0
- package/lib/components/AppBar/AppBar.js +86 -84
- package/lib/components/AppBar/AppBar.namespace.cjs +20 -15
- package/lib/components/AppBar/AppBar.namespace.d.ts +2 -2
- package/lib/components/AppBar/AppBar.namespace.js +15 -1
- package/lib/components/AppBar/index.cjs +17 -17
- package/lib/components/AppBar/index.d.ts +2 -2
- package/lib/components/AppBar/index.js +3 -3
- package/lib/components/AppScreen/AppScreen.cjs +46 -61
- package/lib/components/AppScreen/AppScreen.js +45 -57
- package/lib/components/AppScreen/AppScreen.namespace.cjs +17 -13
- package/lib/components/AppScreen/AppScreen.namespace.js +12 -1
- package/lib/components/AppScreen/index.cjs +14 -15
- package/lib/components/AppScreen/index.js +3 -3
- package/lib/components/index.cjs +30 -25
- package/lib/components/index.js +5 -6
- package/lib/hooks/index.cjs +3 -9
- package/lib/hooks/index.js +2 -1
- package/lib/hooks/useActivityZIndexBase.cjs +12 -11
- package/lib/hooks/useActivityZIndexBase.js +11 -7
- package/lib/index.cjs +41 -31
- package/lib/index.js +8 -10
- package/lib/plugin.cjs +16 -16
- package/lib/plugin.js +14 -12
- package/lib/primitive/AppBar/AppBar.cjs +41 -33
- package/lib/primitive/AppBar/AppBar.js +40 -29
- package/lib/primitive/AppBar/AppBar.namespace.cjs +16 -12
- package/lib/primitive/AppBar/AppBar.namespace.js +11 -1
- package/lib/primitive/AppBar/anatomy.cjs +18 -0
- package/lib/primitive/AppBar/anatomy.d.ts +15 -0
- package/lib/primitive/AppBar/anatomy.js +18 -0
- package/lib/primitive/AppBar/index.cjs +13 -14
- package/lib/primitive/AppBar/index.js +3 -3
- package/lib/primitive/AppBar/useAppBar.cjs +29 -36
- package/lib/primitive/AppBar/useAppBar.js +28 -32
- package/lib/primitive/AppBar/useAppBarContext.cjs +11 -18
- package/lib/primitive/AppBar/useAppBarContext.js +10 -14
- package/lib/primitive/AppScreen/AppScreen.cjs +49 -52
- package/lib/primitive/AppScreen/AppScreen.js +48 -48
- package/lib/primitive/AppScreen/AppScreen.namespace.cjs +16 -12
- package/lib/primitive/AppScreen/AppScreen.namespace.js +11 -1
- package/lib/primitive/AppScreen/anatomy.cjs +17 -0
- package/lib/primitive/AppScreen/anatomy.d.ts +14 -0
- package/lib/primitive/AppScreen/anatomy.js +17 -0
- package/lib/primitive/AppScreen/index.cjs +15 -16
- package/lib/primitive/AppScreen/index.js +4 -4
- package/lib/primitive/AppScreen/useAppScreen.cjs +60 -63
- package/lib/primitive/AppScreen/useAppScreen.js +59 -59
- package/lib/primitive/AppScreen/useAppScreenContext.cjs +11 -18
- package/lib/primitive/AppScreen/useAppScreenContext.js +10 -14
- package/lib/primitive/GlobalInteraction/GlobalInteraction.cjs +21 -26
- package/lib/primitive/GlobalInteraction/GlobalInteraction.js +20 -22
- package/lib/primitive/GlobalInteraction/animation.cjs +303 -0
- package/lib/primitive/GlobalInteraction/animation.d.ts +16 -0
- package/lib/primitive/GlobalInteraction/animation.js +299 -0
- package/lib/primitive/GlobalInteraction/constants.cjs +9 -0
- package/lib/primitive/GlobalInteraction/constants.d.ts +19 -0
- package/lib/primitive/GlobalInteraction/constants.js +8 -0
- package/lib/primitive/GlobalInteraction/dom.cjs +147 -0
- package/lib/primitive/GlobalInteraction/dom.d.ts +44 -0
- package/lib/primitive/GlobalInteraction/dom.js +140 -0
- package/lib/primitive/GlobalInteraction/index.cjs +5 -11
- package/lib/primitive/GlobalInteraction/index.js +3 -2
- package/lib/primitive/GlobalInteraction/useGlobalInteraction.cjs +220 -133
- package/lib/primitive/GlobalInteraction/useGlobalInteraction.d.ts +10 -26
- package/lib/primitive/GlobalInteraction/useGlobalInteraction.js +219 -129
- package/lib/primitive/GlobalInteraction/useGlobalInteractionContext.cjs +11 -18
- package/lib/primitive/GlobalInteraction/useGlobalInteractionContext.js +10 -14
- package/lib/primitive/GlobalInteraction/useSwipeBack.cjs +71 -55
- package/lib/primitive/GlobalInteraction/useSwipeBack.d.ts +19 -2
- package/lib/primitive/GlobalInteraction/useSwipeBack.js +70 -51
- package/lib/primitive/index.cjs +55 -27
- package/lib/primitive/index.js +26 -9
- package/lib/primitive/private/useElementOffset.cjs +29 -51
- package/lib/primitive/private/useElementOffset.js +27 -28
- package/lib/primitive/private/useTopActivity.cjs +22 -31
- package/lib/primitive/private/useTopActivity.js +21 -27
- package/lib/utils/createStyleContext.cjs +91 -74
- package/lib/utils/createStyleContext.js +89 -70
- package/lib/utils/styled.cjs +13 -20
- package/lib/utils/styled.js +12 -16
- package/package.json +4 -4
- package/src/components/AppBar/AppBar.namespace.ts +2 -0
- package/src/components/AppBar/AppBar.tsx +29 -3
- package/src/components/AppBar/index.ts +2 -0
- package/src/primitive/AppBar/AppBar.tsx +4 -1
- package/src/primitive/AppBar/anatomy.ts +16 -0
- package/src/primitive/AppBar/useAppBar.tsx +2 -1
- package/src/primitive/AppScreen/anatomy.ts +15 -0
- package/src/primitive/AppScreen/useAppScreen.tsx +5 -4
- package/src/primitive/GlobalInteraction/animation.ts +447 -0
- package/src/primitive/GlobalInteraction/constants.ts +24 -0
- package/src/primitive/GlobalInteraction/dom.ts +211 -0
- package/src/primitive/GlobalInteraction/useGlobalInteraction.ts +302 -129
- package/src/primitive/GlobalInteraction/useSwipeBack.ts +64 -26
|
@@ -1,66 +1,51 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
const
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
"data-transition-style": transitionStyle,
|
|
44
|
-
...domUtils.mergeProps({ className: classNames.root }, otherProps)
|
|
45
|
-
}
|
|
46
|
-
)
|
|
47
|
-
}
|
|
48
|
-
) });
|
|
1
|
+
"use client";
|
|
2
|
+
require("../../_virtual/_rolldown/runtime.cjs");
|
|
3
|
+
const require_AppScreen = require("../../primitive/AppScreen/AppScreen.cjs");
|
|
4
|
+
const require_useTopActivity = require("../../primitive/private/useTopActivity.cjs");
|
|
5
|
+
const require_createStyleContext = require("../../utils/createStyleContext.cjs");
|
|
6
|
+
const require_AppBar = require("../AppBar/AppBar.cjs");
|
|
7
|
+
let _seed_design_css_recipes_app_bar = require("@seed-design/css/recipes/app-bar");
|
|
8
|
+
let _seed_design_dom_utils = require("@seed-design/dom-utils");
|
|
9
|
+
let react = require("react");
|
|
10
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
11
|
+
let _stackflow_react = require("@stackflow/react");
|
|
12
|
+
let _seed_design_css_recipes_app_screen = require("@seed-design/css/recipes/app-screen");
|
|
13
|
+
//#region src/components/AppScreen/AppScreen.tsx
|
|
14
|
+
var { ClassNamesProvider, PropsProvider, withContext, useProps } = require_createStyleContext.createStyleContext(_seed_design_css_recipes_app_screen.appScreen);
|
|
15
|
+
var AppScreenPropsProvider = PropsProvider;
|
|
16
|
+
var AppScreenRoot = (0, react.forwardRef)((props, ref) => {
|
|
17
|
+
const contextProps = useProps();
|
|
18
|
+
const [variantProps, otherProps] = _seed_design_css_recipes_app_screen.appScreen.splitVariantProps({
|
|
19
|
+
...contextProps,
|
|
20
|
+
...props
|
|
21
|
+
});
|
|
22
|
+
const transitionStyle = variantProps.transitionStyle ?? (variantProps.theme === "cupertino" ? "slideFromRightIOS" : "fadeFromBottomAndroid");
|
|
23
|
+
const topActivityTransitionStyle = require_useTopActivity.useTopActivity().transitionStyle;
|
|
24
|
+
const classNames = (0, _seed_design_css_recipes_app_screen.appScreen)({
|
|
25
|
+
...variantProps,
|
|
26
|
+
transitionStyle: (0, _stackflow_react.useActivity)().isTop ? transitionStyle : topActivityTransitionStyle
|
|
27
|
+
});
|
|
28
|
+
const [appBarVariantProps] = (0, react.useMemo)(() => _seed_design_css_recipes_app_bar.appBar.splitVariantProps(variantProps), [variantProps]);
|
|
29
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ClassNamesProvider, {
|
|
30
|
+
value: classNames,
|
|
31
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_AppBar.AppBarPropsProvider, {
|
|
32
|
+
value: (0, react.useMemo)(() => ({
|
|
33
|
+
...appBarVariantProps,
|
|
34
|
+
transitionStyle
|
|
35
|
+
}), [appBarVariantProps, transitionStyle]),
|
|
36
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_AppScreen.AppScreenRoot, {
|
|
37
|
+
ref,
|
|
38
|
+
"data-transition-style": transitionStyle,
|
|
39
|
+
...(0, _seed_design_dom_utils.mergeProps)({ className: classNames.root }, otherProps)
|
|
40
|
+
})
|
|
41
|
+
})
|
|
42
|
+
});
|
|
49
43
|
});
|
|
50
44
|
AppScreenRoot.displayName = "AppScreenRoot";
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
const AppScreenEdge = withContext(
|
|
56
|
-
AppScreen.AppScreenEdge,
|
|
57
|
-
"edge"
|
|
58
|
-
);
|
|
59
|
-
const AppScreenLayer = withContext(
|
|
60
|
-
AppScreen.AppScreenLayer,
|
|
61
|
-
"layer"
|
|
62
|
-
);
|
|
63
|
-
|
|
45
|
+
var AppScreenDim = withContext(require_AppScreen.AppScreenDim, "dim");
|
|
46
|
+
var AppScreenEdge = withContext(require_AppScreen.AppScreenEdge, "edge");
|
|
47
|
+
var AppScreenLayer = withContext(require_AppScreen.AppScreenLayer, "layer");
|
|
48
|
+
//#endregion
|
|
64
49
|
exports.AppScreenDim = AppScreenDim;
|
|
65
50
|
exports.AppScreenEdge = AppScreenEdge;
|
|
66
51
|
exports.AppScreenLayer = AppScreenLayer;
|
|
@@ -1,60 +1,48 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { useActivity } from
|
|
11
|
-
import {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
)
|
|
43
|
-
}
|
|
44
|
-
) });
|
|
1
|
+
"use client";
|
|
2
|
+
import { AppScreenDim as AppScreenDim$1, AppScreenEdge as AppScreenEdge$1, AppScreenLayer as AppScreenLayer$1, AppScreenRoot as AppScreenRoot$1 } from "../../primitive/AppScreen/AppScreen.js";
|
|
3
|
+
import { useTopActivity } from "../../primitive/private/useTopActivity.js";
|
|
4
|
+
import { createStyleContext } from "../../utils/createStyleContext.js";
|
|
5
|
+
import { AppBarPropsProvider } from "../AppBar/AppBar.js";
|
|
6
|
+
import { appBar } from "@seed-design/css/recipes/app-bar";
|
|
7
|
+
import { mergeProps } from "@seed-design/dom-utils";
|
|
8
|
+
import { forwardRef, useMemo } from "react";
|
|
9
|
+
import { jsx } from "react/jsx-runtime";
|
|
10
|
+
import { useActivity } from "@stackflow/react";
|
|
11
|
+
import { appScreen } from "@seed-design/css/recipes/app-screen";
|
|
12
|
+
//#region src/components/AppScreen/AppScreen.tsx
|
|
13
|
+
var { ClassNamesProvider, PropsProvider, withContext, useProps } = createStyleContext(appScreen);
|
|
14
|
+
var AppScreenPropsProvider = PropsProvider;
|
|
15
|
+
var AppScreenRoot = forwardRef((props, ref) => {
|
|
16
|
+
const contextProps = useProps();
|
|
17
|
+
const [variantProps, otherProps] = appScreen.splitVariantProps({
|
|
18
|
+
...contextProps,
|
|
19
|
+
...props
|
|
20
|
+
});
|
|
21
|
+
const transitionStyle = variantProps.transitionStyle ?? (variantProps.theme === "cupertino" ? "slideFromRightIOS" : "fadeFromBottomAndroid");
|
|
22
|
+
const topActivityTransitionStyle = useTopActivity().transitionStyle;
|
|
23
|
+
const classNames = appScreen({
|
|
24
|
+
...variantProps,
|
|
25
|
+
transitionStyle: useActivity().isTop ? transitionStyle : topActivityTransitionStyle
|
|
26
|
+
});
|
|
27
|
+
const [appBarVariantProps] = useMemo(() => appBar.splitVariantProps(variantProps), [variantProps]);
|
|
28
|
+
return /* @__PURE__ */ jsx(ClassNamesProvider, {
|
|
29
|
+
value: classNames,
|
|
30
|
+
children: /* @__PURE__ */ jsx(AppBarPropsProvider, {
|
|
31
|
+
value: useMemo(() => ({
|
|
32
|
+
...appBarVariantProps,
|
|
33
|
+
transitionStyle
|
|
34
|
+
}), [appBarVariantProps, transitionStyle]),
|
|
35
|
+
children: /* @__PURE__ */ jsx(AppScreenRoot$1, {
|
|
36
|
+
ref,
|
|
37
|
+
"data-transition-style": transitionStyle,
|
|
38
|
+
...mergeProps({ className: classNames.root }, otherProps)
|
|
39
|
+
})
|
|
40
|
+
})
|
|
41
|
+
});
|
|
45
42
|
});
|
|
46
43
|
AppScreenRoot.displayName = "AppScreenRoot";
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
const AppScreenEdge = withContext(
|
|
52
|
-
AppScreenEdge$1,
|
|
53
|
-
"edge"
|
|
54
|
-
);
|
|
55
|
-
const AppScreenLayer = withContext(
|
|
56
|
-
AppScreenLayer$1,
|
|
57
|
-
"layer"
|
|
58
|
-
);
|
|
59
|
-
|
|
44
|
+
var AppScreenDim = withContext(AppScreenDim$1, "dim");
|
|
45
|
+
var AppScreenEdge = withContext(AppScreenEdge$1, "edge");
|
|
46
|
+
var AppScreenLayer = withContext(AppScreenLayer$1, "layer");
|
|
47
|
+
//#endregion
|
|
60
48
|
export { AppScreenDim, AppScreenEdge, AppScreenLayer, AppScreenPropsProvider, AppScreenRoot };
|
|
@@ -1,13 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
exports
|
|
13
|
-
|
|
1
|
+
const require_runtime = require("../../_virtual/_rolldown/runtime.cjs");
|
|
2
|
+
const require_AppScreen = require("./AppScreen.cjs");
|
|
3
|
+
//#region src/components/AppScreen/AppScreen.namespace.ts
|
|
4
|
+
var AppScreen_namespace_exports = /* @__PURE__ */ require_runtime.__exportAll({
|
|
5
|
+
Dim: () => require_AppScreen.AppScreenDim,
|
|
6
|
+
Edge: () => require_AppScreen.AppScreenEdge,
|
|
7
|
+
Layer: () => require_AppScreen.AppScreenLayer,
|
|
8
|
+
PropsProvider: () => require_AppScreen.AppScreenPropsProvider,
|
|
9
|
+
Root: () => require_AppScreen.AppScreenRoot
|
|
10
|
+
});
|
|
11
|
+
//#endregion
|
|
12
|
+
Object.defineProperty(exports, "AppScreen_namespace_exports", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function() {
|
|
15
|
+
return AppScreen_namespace_exports;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
@@ -1 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
import { __exportAll } from "../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { AppScreenDim, AppScreenEdge, AppScreenLayer, AppScreenPropsProvider, AppScreenRoot } from "./AppScreen.js";
|
|
3
|
+
//#region src/components/AppScreen/AppScreen.namespace.ts
|
|
4
|
+
var AppScreen_namespace_exports = /* @__PURE__ */ __exportAll({
|
|
5
|
+
Dim: () => AppScreenDim,
|
|
6
|
+
Edge: () => AppScreenEdge,
|
|
7
|
+
Layer: () => AppScreenLayer,
|
|
8
|
+
PropsProvider: () => AppScreenPropsProvider,
|
|
9
|
+
Root: () => AppScreenRoot
|
|
10
|
+
});
|
|
11
|
+
//#endregion
|
|
12
|
+
export { AppScreen_namespace_exports };
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
exports.AppScreenDim =
|
|
11
|
-
exports.AppScreenEdge =
|
|
12
|
-
exports.AppScreenLayer =
|
|
13
|
-
exports.AppScreenPropsProvider =
|
|
14
|
-
exports.AppScreenRoot =
|
|
15
|
-
exports.AppScreen = AppScreen_namespace;
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_AppScreen = require("./AppScreen.cjs");
|
|
3
|
+
const require_AppScreen_namespace = require("./AppScreen.namespace.cjs");
|
|
4
|
+
Object.defineProperty(exports, "AppScreen", {
|
|
5
|
+
enumerable: true,
|
|
6
|
+
get: function() {
|
|
7
|
+
return require_AppScreen_namespace.AppScreen_namespace_exports;
|
|
8
|
+
}
|
|
9
|
+
});
|
|
10
|
+
exports.AppScreenDim = require_AppScreen.AppScreenDim;
|
|
11
|
+
exports.AppScreenEdge = require_AppScreen.AppScreenEdge;
|
|
12
|
+
exports.AppScreenLayer = require_AppScreen.AppScreenLayer;
|
|
13
|
+
exports.AppScreenPropsProvider = require_AppScreen.AppScreenPropsProvider;
|
|
14
|
+
exports.AppScreenRoot = require_AppScreen.AppScreenRoot;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
export {
|
|
1
|
+
import { AppScreenDim, AppScreenEdge, AppScreenLayer, AppScreenPropsProvider, AppScreenRoot } from "./AppScreen.js";
|
|
2
|
+
import { AppScreen_namespace_exports } from "./AppScreen.namespace.js";
|
|
3
|
+
export { AppScreen_namespace_exports as AppScreen, AppScreenDim, AppScreenEdge, AppScreenLayer, AppScreenPropsProvider, AppScreenRoot };
|
package/lib/components/index.cjs
CHANGED
|
@@ -1,25 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
exports.AppBarIconButton =
|
|
13
|
-
exports.AppBarLeft =
|
|
14
|
-
exports.AppBarMain =
|
|
15
|
-
exports.AppBarRight =
|
|
16
|
-
exports.AppBarRoot =
|
|
17
|
-
exports.
|
|
18
|
-
exports.
|
|
19
|
-
exports.
|
|
20
|
-
exports
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_AppBar = require("./AppBar/AppBar.cjs");
|
|
3
|
+
const require_AppBar_namespace = require("./AppBar/AppBar.namespace.cjs");
|
|
4
|
+
const require_AppScreen = require("./AppScreen/AppScreen.cjs");
|
|
5
|
+
const require_AppScreen_namespace = require("./AppScreen/AppScreen.namespace.cjs");
|
|
6
|
+
Object.defineProperty(exports, "AppBar", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function() {
|
|
9
|
+
return require_AppBar_namespace.AppBar_namespace_exports;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
exports.AppBarIconButton = require_AppBar.AppBarIconButton;
|
|
13
|
+
exports.AppBarLeft = require_AppBar.AppBarLeft;
|
|
14
|
+
exports.AppBarMain = require_AppBar.AppBarMain;
|
|
15
|
+
exports.AppBarRight = require_AppBar.AppBarRight;
|
|
16
|
+
exports.AppBarRoot = require_AppBar.AppBarRoot;
|
|
17
|
+
exports.AppBarSlot = require_AppBar.AppBarSlot;
|
|
18
|
+
exports.AppBarSubtitle = require_AppBar.AppBarSubtitle;
|
|
19
|
+
exports.AppBarTitle = require_AppBar.AppBarTitle;
|
|
20
|
+
Object.defineProperty(exports, "AppScreen", {
|
|
21
|
+
enumerable: true,
|
|
22
|
+
get: function() {
|
|
23
|
+
return require_AppScreen_namespace.AppScreen_namespace_exports;
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
exports.AppScreenDim = require_AppScreen.AppScreenDim;
|
|
27
|
+
exports.AppScreenEdge = require_AppScreen.AppScreenEdge;
|
|
28
|
+
exports.AppScreenLayer = require_AppScreen.AppScreenLayer;
|
|
29
|
+
exports.AppScreenPropsProvider = require_AppScreen.AppScreenPropsProvider;
|
|
30
|
+
exports.AppScreenRoot = require_AppScreen.AppScreenRoot;
|
package/lib/components/index.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export { AppScreen_namespace as AppScreen };
|
|
1
|
+
import { AppBarIconButton, AppBarLeft, AppBarMain, AppBarRight, AppBarRoot, AppBarSlot, AppBarSubtitle, AppBarTitle } from "./AppBar/AppBar.js";
|
|
2
|
+
import { AppBar_namespace_exports } from "./AppBar/AppBar.namespace.js";
|
|
3
|
+
import { AppScreenDim, AppScreenEdge, AppScreenLayer, AppScreenPropsProvider, AppScreenRoot } from "./AppScreen/AppScreen.js";
|
|
4
|
+
import { AppScreen_namespace_exports } from "./AppScreen/AppScreen.namespace.js";
|
|
5
|
+
export { AppBar_namespace_exports as AppBar, AppBarIconButton, AppBarLeft, AppBarMain, AppBarRight, AppBarRoot, AppBarSlot, AppBarSubtitle, AppBarTitle, AppScreen_namespace_exports as AppScreen, AppScreenDim, AppScreenEdge, AppScreenLayer, AppScreenPropsProvider, AppScreenRoot };
|
package/lib/hooks/index.cjs
CHANGED
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const useActivityZIndexBase = require('./useActivityZIndexBase.cjs');
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
exports.useActivityZIndexBase = useActivityZIndexBase.useActivityZIndexBase;
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_useActivityZIndexBase = require("./useActivityZIndexBase.cjs");
|
|
3
|
+
exports.useActivityZIndexBase = require_useActivityZIndexBase.useActivityZIndexBase;
|
package/lib/hooks/index.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { useActivityZIndexBase } from "./useActivityZIndexBase.js";
|
|
2
|
+
export { useActivityZIndexBase };
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
require("../_virtual/_rolldown/runtime.cjs");
|
|
3
|
+
let _stackflow_react_ui_core = require("@stackflow/react-ui-core");
|
|
4
|
+
//#region src/hooks/useActivityZIndexBase.ts
|
|
5
|
+
var Z_INDEX_SPACING = 5;
|
|
6
|
+
/**
|
|
7
|
+
* Returns the base z-index which is calculated by multiplying the activity's index by 5.
|
|
8
|
+
* This value is used to give proper z-index values to elements of AppScreen (e.g. app-bar, dim, edge, layer). See the stylesheet of AppScreen for more details.
|
|
9
|
+
* This value can be provided to layerIndex of various overlay components (e.g. AlertDialog, BottomSheet, MenuSheet) to ensure correct stacking order.
|
|
10
|
+
*/
|
|
9
11
|
function useActivityZIndexBase(params) {
|
|
10
|
-
|
|
11
|
-
return ((activity?.zIndex ?? 0) + (params?.activityOffset ?? 0)) * Z_INDEX_SPACING;
|
|
12
|
+
return (((0, _stackflow_react_ui_core.useNullableActivity)()?.zIndex ?? 0) + (params?.activityOffset ?? 0)) * Z_INDEX_SPACING;
|
|
12
13
|
}
|
|
13
|
-
|
|
14
|
+
//#endregion
|
|
14
15
|
exports.useActivityZIndexBase = useActivityZIndexBase;
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
import { useNullableActivity } from
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
import { useNullableActivity } from "@stackflow/react-ui-core";
|
|
3
|
+
//#region src/hooks/useActivityZIndexBase.ts
|
|
4
|
+
var Z_INDEX_SPACING = 5;
|
|
5
|
+
/**
|
|
6
|
+
* Returns the base z-index which is calculated by multiplying the activity's index by 5.
|
|
7
|
+
* This value is used to give proper z-index values to elements of AppScreen (e.g. app-bar, dim, edge, layer). See the stylesheet of AppScreen for more details.
|
|
8
|
+
* This value can be provided to layerIndex of various overlay components (e.g. AlertDialog, BottomSheet, MenuSheet) to ensure correct stacking order.
|
|
9
|
+
*/
|
|
5
10
|
function useActivityZIndexBase(params) {
|
|
6
|
-
|
|
7
|
-
return ((activity?.zIndex ?? 0) + (params?.activityOffset ?? 0)) * Z_INDEX_SPACING;
|
|
11
|
+
return ((useNullableActivity()?.zIndex ?? 0) + (params?.activityOffset ?? 0)) * Z_INDEX_SPACING;
|
|
8
12
|
}
|
|
9
|
-
|
|
13
|
+
//#endregion
|
|
10
14
|
export { useActivityZIndexBase };
|
package/lib/index.cjs
CHANGED
|
@@ -1,31 +1,41 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
exports.
|
|
16
|
-
exports.
|
|
17
|
-
exports.
|
|
18
|
-
exports.
|
|
19
|
-
exports.
|
|
20
|
-
exports.
|
|
21
|
-
exports.AppBarSubtitle =
|
|
22
|
-
exports.AppBarTitle =
|
|
23
|
-
exports
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
exports.
|
|
30
|
-
exports.
|
|
31
|
-
exports.
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_useActivityZIndexBase = require("./hooks/useActivityZIndexBase.cjs");
|
|
3
|
+
const require_index = require("./primitive/index.cjs");
|
|
4
|
+
const require_AppBar = require("./components/AppBar/AppBar.cjs");
|
|
5
|
+
const require_AppBar_namespace = require("./components/AppBar/AppBar.namespace.cjs");
|
|
6
|
+
const require_AppScreen = require("./components/AppScreen/AppScreen.cjs");
|
|
7
|
+
const require_AppScreen_namespace = require("./components/AppScreen/AppScreen.namespace.cjs");
|
|
8
|
+
const require_plugin = require("./plugin.cjs");
|
|
9
|
+
Object.defineProperty(exports, "AppBar", {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
get: function() {
|
|
12
|
+
return require_AppBar_namespace.AppBar_namespace_exports;
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
exports.AppBarIconButton = require_AppBar.AppBarIconButton;
|
|
16
|
+
exports.AppBarLeft = require_AppBar.AppBarLeft;
|
|
17
|
+
exports.AppBarMain = require_AppBar.AppBarMain;
|
|
18
|
+
exports.AppBarRight = require_AppBar.AppBarRight;
|
|
19
|
+
exports.AppBarRoot = require_AppBar.AppBarRoot;
|
|
20
|
+
exports.AppBarSlot = require_AppBar.AppBarSlot;
|
|
21
|
+
exports.AppBarSubtitle = require_AppBar.AppBarSubtitle;
|
|
22
|
+
exports.AppBarTitle = require_AppBar.AppBarTitle;
|
|
23
|
+
Object.defineProperty(exports, "AppScreen", {
|
|
24
|
+
enumerable: true,
|
|
25
|
+
get: function() {
|
|
26
|
+
return require_AppScreen_namespace.AppScreen_namespace_exports;
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
exports.AppScreenDim = require_AppScreen.AppScreenDim;
|
|
30
|
+
exports.AppScreenEdge = require_AppScreen.AppScreenEdge;
|
|
31
|
+
exports.AppScreenLayer = require_AppScreen.AppScreenLayer;
|
|
32
|
+
exports.AppScreenPropsProvider = require_AppScreen.AppScreenPropsProvider;
|
|
33
|
+
exports.AppScreenRoot = require_AppScreen.AppScreenRoot;
|
|
34
|
+
Object.defineProperty(exports, "Primitive", {
|
|
35
|
+
enumerable: true,
|
|
36
|
+
get: function() {
|
|
37
|
+
return require_index.primitive_exports;
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
exports.seedPlugin = require_plugin.seedPlugin;
|
|
41
|
+
exports.useActivityZIndexBase = require_useActivityZIndexBase.useActivityZIndexBase;
|
package/lib/index.js
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
export {
|
|
9
|
-
import * as index from './primitive/index.js';
|
|
10
|
-
export { index as Primitive };
|
|
1
|
+
import { useActivityZIndexBase } from "./hooks/useActivityZIndexBase.js";
|
|
2
|
+
import { primitive_exports } from "./primitive/index.js";
|
|
3
|
+
import { AppBarIconButton, AppBarLeft, AppBarMain, AppBarRight, AppBarRoot, AppBarSlot, AppBarSubtitle, AppBarTitle } from "./components/AppBar/AppBar.js";
|
|
4
|
+
import { AppBar_namespace_exports } from "./components/AppBar/AppBar.namespace.js";
|
|
5
|
+
import { AppScreenDim, AppScreenEdge, AppScreenLayer, AppScreenPropsProvider, AppScreenRoot } from "./components/AppScreen/AppScreen.js";
|
|
6
|
+
import { AppScreen_namespace_exports } from "./components/AppScreen/AppScreen.namespace.js";
|
|
7
|
+
import { seedPlugin } from "./plugin.js";
|
|
8
|
+
export { AppBar_namespace_exports as AppBar, AppBarIconButton, AppBarLeft, AppBarMain, AppBarRight, AppBarRoot, AppBarSlot, AppBarSubtitle, AppBarTitle, AppScreen_namespace_exports as AppScreen, AppScreenDim, AppScreenEdge, AppScreenLayer, AppScreenPropsProvider, AppScreenRoot, primitive_exports as Primitive, seedPlugin, useActivityZIndexBase };
|
package/lib/plugin.cjs
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
require("./_virtual/_rolldown/runtime.cjs");
|
|
4
|
+
const require_GlobalInteraction = require("./primitive/GlobalInteraction/GlobalInteraction.cjs");
|
|
5
|
+
const require_AppScreen = require("./components/AppScreen/AppScreen.cjs");
|
|
6
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
7
|
+
//#region src/plugin.tsx
|
|
8
|
+
var seedPlugin = (options) => () => ({
|
|
9
|
+
key: "seed-design",
|
|
10
|
+
wrapStack({ stack, initialContext }) {
|
|
11
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_AppScreen.AppScreenPropsProvider, {
|
|
12
|
+
value: typeof options === "function" ? options({ initialContext }) : options,
|
|
13
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_GlobalInteraction.GlobalInteraction, { children: stack.render() })
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
16
|
});
|
|
17
|
-
|
|
17
|
+
//#endregion
|
|
18
18
|
exports.seedPlugin = seedPlugin;
|
package/lib/plugin.js
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import { AppScreenPropsProvider } from
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
import { GlobalInteraction } from "./primitive/GlobalInteraction/GlobalInteraction.js";
|
|
3
|
+
import { AppScreenPropsProvider } from "./components/AppScreen/AppScreen.js";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
//#region src/plugin.tsx
|
|
6
|
+
var seedPlugin = (options) => () => ({
|
|
7
|
+
key: "seed-design",
|
|
8
|
+
wrapStack({ stack, initialContext }) {
|
|
9
|
+
return /* @__PURE__ */ jsx(AppScreenPropsProvider, {
|
|
10
|
+
value: typeof options === "function" ? options({ initialContext }) : options,
|
|
11
|
+
children: /* @__PURE__ */ jsx(GlobalInteraction, { children: stack.render() })
|
|
12
|
+
});
|
|
13
|
+
}
|
|
12
14
|
});
|
|
13
|
-
|
|
15
|
+
//#endregion
|
|
14
16
|
export { seedPlugin };
|