@seed-design/stackflow 1.1.20 → 1.1.22

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.
Files changed (93) hide show
  1. package/lib/_virtual/_rolldown/runtime.cjs +34 -0
  2. package/lib/_virtual/_rolldown/runtime.js +14 -0
  3. package/lib/components/AppBar/AppBar.cjs +86 -102
  4. package/lib/components/AppBar/AppBar.js +84 -98
  5. package/lib/components/AppBar/AppBar.namespace.cjs +20 -16
  6. package/lib/components/AppBar/AppBar.namespace.js +15 -1
  7. package/lib/components/AppBar/index.cjs +17 -18
  8. package/lib/components/AppBar/index.js +3 -3
  9. package/lib/components/AppScreen/AppScreen.cjs +46 -61
  10. package/lib/components/AppScreen/AppScreen.js +45 -57
  11. package/lib/components/AppScreen/AppScreen.namespace.cjs +17 -13
  12. package/lib/components/AppScreen/AppScreen.namespace.js +12 -1
  13. package/lib/components/AppScreen/index.cjs +14 -15
  14. package/lib/components/AppScreen/index.js +3 -3
  15. package/lib/components/index.cjs +30 -26
  16. package/lib/components/index.js +5 -6
  17. package/lib/hooks/index.cjs +3 -9
  18. package/lib/hooks/index.js +2 -1
  19. package/lib/hooks/useActivityZIndexBase.cjs +12 -11
  20. package/lib/hooks/useActivityZIndexBase.js +11 -7
  21. package/lib/index.cjs +41 -32
  22. package/lib/index.js +8 -10
  23. package/lib/plugin.cjs +16 -16
  24. package/lib/plugin.js +14 -12
  25. package/lib/primitive/AppBar/AppBar.cjs +41 -33
  26. package/lib/primitive/AppBar/AppBar.js +40 -29
  27. package/lib/primitive/AppBar/AppBar.namespace.cjs +16 -12
  28. package/lib/primitive/AppBar/AppBar.namespace.js +11 -1
  29. package/lib/primitive/AppBar/anatomy.cjs +18 -0
  30. package/lib/primitive/AppBar/anatomy.d.ts +15 -0
  31. package/lib/primitive/AppBar/anatomy.js +18 -0
  32. package/lib/primitive/AppBar/index.cjs +13 -14
  33. package/lib/primitive/AppBar/index.js +3 -3
  34. package/lib/primitive/AppBar/useAppBar.cjs +29 -36
  35. package/lib/primitive/AppBar/useAppBar.js +28 -32
  36. package/lib/primitive/AppBar/useAppBarContext.cjs +11 -18
  37. package/lib/primitive/AppBar/useAppBarContext.js +10 -14
  38. package/lib/primitive/AppScreen/AppScreen.cjs +49 -52
  39. package/lib/primitive/AppScreen/AppScreen.js +48 -48
  40. package/lib/primitive/AppScreen/AppScreen.namespace.cjs +16 -12
  41. package/lib/primitive/AppScreen/AppScreen.namespace.js +11 -1
  42. package/lib/primitive/AppScreen/anatomy.cjs +17 -0
  43. package/lib/primitive/AppScreen/anatomy.d.ts +14 -0
  44. package/lib/primitive/AppScreen/anatomy.js +17 -0
  45. package/lib/primitive/AppScreen/index.cjs +15 -16
  46. package/lib/primitive/AppScreen/index.js +4 -4
  47. package/lib/primitive/AppScreen/useAppScreen.cjs +60 -63
  48. package/lib/primitive/AppScreen/useAppScreen.js +59 -59
  49. package/lib/primitive/AppScreen/useAppScreenContext.cjs +11 -18
  50. package/lib/primitive/AppScreen/useAppScreenContext.js +10 -14
  51. package/lib/primitive/GlobalInteraction/GlobalInteraction.cjs +21 -26
  52. package/lib/primitive/GlobalInteraction/GlobalInteraction.js +20 -22
  53. package/lib/primitive/GlobalInteraction/animation.cjs +303 -0
  54. package/lib/primitive/GlobalInteraction/animation.d.ts +16 -0
  55. package/lib/primitive/GlobalInteraction/animation.js +299 -0
  56. package/lib/primitive/GlobalInteraction/constants.cjs +9 -0
  57. package/lib/primitive/GlobalInteraction/constants.d.ts +19 -0
  58. package/lib/primitive/GlobalInteraction/constants.js +8 -0
  59. package/lib/primitive/GlobalInteraction/dom.cjs +147 -0
  60. package/lib/primitive/GlobalInteraction/dom.d.ts +44 -0
  61. package/lib/primitive/GlobalInteraction/dom.js +140 -0
  62. package/lib/primitive/GlobalInteraction/index.cjs +5 -11
  63. package/lib/primitive/GlobalInteraction/index.js +3 -2
  64. package/lib/primitive/GlobalInteraction/useGlobalInteraction.cjs +220 -133
  65. package/lib/primitive/GlobalInteraction/useGlobalInteraction.d.ts +10 -26
  66. package/lib/primitive/GlobalInteraction/useGlobalInteraction.js +219 -129
  67. package/lib/primitive/GlobalInteraction/useGlobalInteractionContext.cjs +11 -18
  68. package/lib/primitive/GlobalInteraction/useGlobalInteractionContext.js +10 -14
  69. package/lib/primitive/GlobalInteraction/useSwipeBack.cjs +71 -55
  70. package/lib/primitive/GlobalInteraction/useSwipeBack.d.ts +19 -2
  71. package/lib/primitive/GlobalInteraction/useSwipeBack.js +70 -51
  72. package/lib/primitive/index.cjs +55 -27
  73. package/lib/primitive/index.js +26 -9
  74. package/lib/primitive/private/useElementOffset.cjs +29 -51
  75. package/lib/primitive/private/useElementOffset.js +27 -28
  76. package/lib/primitive/private/useTopActivity.cjs +22 -31
  77. package/lib/primitive/private/useTopActivity.js +21 -27
  78. package/lib/utils/createStyleContext.cjs +91 -74
  79. package/lib/utils/createStyleContext.js +89 -70
  80. package/lib/utils/styled.cjs +13 -20
  81. package/lib/utils/styled.js +12 -16
  82. package/package.json +5 -5
  83. package/src/components/AppBar/AppBar.tsx +9 -3
  84. package/src/primitive/AppBar/AppBar.tsx +4 -1
  85. package/src/primitive/AppBar/anatomy.ts +16 -0
  86. package/src/primitive/AppBar/useAppBar.tsx +2 -1
  87. package/src/primitive/AppScreen/anatomy.ts +15 -0
  88. package/src/primitive/AppScreen/useAppScreen.tsx +5 -4
  89. package/src/primitive/GlobalInteraction/animation.ts +447 -0
  90. package/src/primitive/GlobalInteraction/constants.ts +24 -0
  91. package/src/primitive/GlobalInteraction/dom.ts +211 -0
  92. package/src/primitive/GlobalInteraction/useGlobalInteraction.ts +302 -129
  93. package/src/primitive/GlobalInteraction/useSwipeBack.ts +64 -26
@@ -1,66 +1,51 @@
1
- 'use client';
2
- 'use strict';
3
-
4
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
5
-
6
- const jsxRuntime = require('react/jsx-runtime');
7
- const appScreen = require('@seed-design/css/recipes/app-screen');
8
- const domUtils = require('@seed-design/dom-utils');
9
- const React = require('react');
10
- const AppScreen = require('../../primitive/AppScreen/AppScreen.cjs');
11
- const createStyleContext = require('../../utils/createStyleContext.cjs');
12
- const AppBar = require('../AppBar/AppBar.cjs');
13
- const useTopActivity = require('../../primitive/private/useTopActivity.cjs');
14
- const react = require('@stackflow/react');
15
- const appBar = require('@seed-design/css/recipes/app-bar');
16
-
17
- const { ClassNamesProvider, PropsProvider, withContext, useProps } = createStyleContext.createStyleContext(appScreen.appScreen);
18
- const AppScreenPropsProvider = PropsProvider;
19
- const AppScreenRoot = React.forwardRef((props, ref) => {
20
- const contextProps = useProps();
21
- const [variantProps, otherProps] = appScreen.appScreen.splitVariantProps({ ...contextProps, ...props });
22
- const transitionStyle = variantProps.transitionStyle ?? (variantProps.theme === "cupertino" ? "slideFromRightIOS" : "fadeFromBottomAndroid");
23
- const topActivityTransitionStyle = useTopActivity.useTopActivity().transitionStyle;
24
- const classNames = appScreen.appScreen({
25
- ...variantProps,
26
- transitionStyle: react.useActivity().isTop ? transitionStyle : topActivityTransitionStyle
27
- });
28
- const [appBarVariantProps] = React.useMemo(
29
- () => appBar.appBar.splitVariantProps(variantProps),
30
- [variantProps]
31
- );
32
- return /* @__PURE__ */ jsxRuntime.jsx(ClassNamesProvider, { value: classNames, children: /* @__PURE__ */ jsxRuntime.jsx(
33
- AppBar.AppBarPropsProvider,
34
- {
35
- value: React.useMemo(
36
- () => ({ ...appBarVariantProps, transitionStyle }),
37
- [appBarVariantProps, transitionStyle]
38
- ),
39
- children: /* @__PURE__ */ jsxRuntime.jsx(
40
- AppScreen.AppScreenRoot,
41
- {
42
- ref,
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
- const AppScreenDim = withContext(
52
- AppScreen.AppScreenDim,
53
- "dim"
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
- 'use client';
2
- import { jsx } from 'react/jsx-runtime';
3
- import { appScreen } from '@seed-design/css/recipes/app-screen';
4
- import { mergeProps } from '@seed-design/dom-utils';
5
- import { forwardRef, useMemo } from 'react';
6
- import { AppScreenDim as AppScreenDim$1, AppScreenEdge as AppScreenEdge$1, AppScreenLayer as AppScreenLayer$1, AppScreenRoot as AppScreenRoot$1 } from '../../primitive/AppScreen/AppScreen.js';
7
- import { createStyleContext } from '../../utils/createStyleContext.js';
8
- import { AppBarPropsProvider } from '../AppBar/AppBar.js';
9
- import { useTopActivity } from '../../primitive/private/useTopActivity.js';
10
- import { useActivity } from '@stackflow/react';
11
- import { appBar } from '@seed-design/css/recipes/app-bar';
12
-
13
- const { ClassNamesProvider, PropsProvider, withContext, useProps } = createStyleContext(appScreen);
14
- const AppScreenPropsProvider = PropsProvider;
15
- const AppScreenRoot = forwardRef((props, ref) => {
16
- const contextProps = useProps();
17
- const [variantProps, otherProps] = appScreen.splitVariantProps({ ...contextProps, ...props });
18
- const transitionStyle = variantProps.transitionStyle ?? (variantProps.theme === "cupertino" ? "slideFromRightIOS" : "fadeFromBottomAndroid");
19
- const topActivityTransitionStyle = useTopActivity().transitionStyle;
20
- const classNames = appScreen({
21
- ...variantProps,
22
- transitionStyle: useActivity().isTop ? transitionStyle : topActivityTransitionStyle
23
- });
24
- const [appBarVariantProps] = useMemo(
25
- () => appBar.splitVariantProps(variantProps),
26
- [variantProps]
27
- );
28
- return /* @__PURE__ */ jsx(ClassNamesProvider, { value: classNames, children: /* @__PURE__ */ jsx(
29
- AppBarPropsProvider,
30
- {
31
- value: useMemo(
32
- () => ({ ...appBarVariantProps, transitionStyle }),
33
- [appBarVariantProps, transitionStyle]
34
- ),
35
- children: /* @__PURE__ */ jsx(
36
- AppScreenRoot$1,
37
- {
38
- ref,
39
- "data-transition-style": transitionStyle,
40
- ...mergeProps({ className: classNames.root }, otherProps)
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
- const AppScreenDim = withContext(
48
- AppScreenDim$1,
49
- "dim"
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
- 'use strict';
2
-
3
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
-
5
- const AppScreen = require('./AppScreen.cjs');
6
-
7
-
8
-
9
- exports.Dim = AppScreen.AppScreenDim;
10
- exports.Edge = AppScreen.AppScreenEdge;
11
- exports.Layer = AppScreen.AppScreenLayer;
12
- exports.PropsProvider = AppScreen.AppScreenPropsProvider;
13
- exports.Root = AppScreen.AppScreenRoot;
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
- export { AppScreenDim as Dim, AppScreenEdge as Edge, AppScreenLayer as Layer, AppScreenPropsProvider as PropsProvider, AppScreenRoot as Root } from './AppScreen.js';
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
- 'use strict';
2
-
3
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
-
5
- const AppScreen = require('./AppScreen.cjs');
6
- const AppScreen_namespace = require('./AppScreen.namespace.cjs');
7
-
8
-
9
-
10
- exports.AppScreenDim = AppScreen.AppScreenDim;
11
- exports.AppScreenEdge = AppScreen.AppScreenEdge;
12
- exports.AppScreenLayer = AppScreen.AppScreenLayer;
13
- exports.AppScreenPropsProvider = AppScreen.AppScreenPropsProvider;
14
- exports.AppScreenRoot = AppScreen.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
- export { AppScreenDim, AppScreenEdge, AppScreenLayer, AppScreenPropsProvider, AppScreenRoot } from './AppScreen.js';
2
- import * as AppScreen_namespace from './AppScreen.namespace.js';
3
- export { AppScreen_namespace as AppScreen };
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 };
@@ -1,26 +1,30 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
-
5
- const AppBar = require('./AppBar/AppBar.cjs');
6
- const AppBar_namespace = require('./AppBar/AppBar.namespace.cjs');
7
- const AppScreen = require('./AppScreen/AppScreen.cjs');
8
- const AppScreen_namespace = require('./AppScreen/AppScreen.namespace.cjs');
9
-
10
-
11
-
12
- exports.AppBarIconButton = AppBar.AppBarIconButton;
13
- exports.AppBarLeft = AppBar.AppBarLeft;
14
- exports.AppBarMain = AppBar.AppBarMain;
15
- exports.AppBarRight = AppBar.AppBarRight;
16
- exports.AppBarRoot = AppBar.AppBarRoot;
17
- exports.AppBarSlot = AppBar.AppBarSlot;
18
- exports.AppBarSubtitle = AppBar.AppBarSubtitle;
19
- exports.AppBarTitle = AppBar.AppBarTitle;
20
- exports.AppBar = AppBar_namespace;
21
- exports.AppScreenDim = AppScreen.AppScreenDim;
22
- exports.AppScreenEdge = AppScreen.AppScreenEdge;
23
- exports.AppScreenLayer = AppScreen.AppScreenLayer;
24
- exports.AppScreenPropsProvider = AppScreen.AppScreenPropsProvider;
25
- exports.AppScreenRoot = AppScreen.AppScreenRoot;
26
- exports.AppScreen = AppScreen_namespace;
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;
@@ -1,6 +1,5 @@
1
- export { AppBarIconButton, AppBarLeft, AppBarMain, AppBarRight, AppBarRoot, AppBarSlot, AppBarSubtitle, AppBarTitle } from './AppBar/AppBar.js';
2
- import * as AppBar_namespace from './AppBar/AppBar.namespace.js';
3
- export { AppBar_namespace as AppBar };
4
- export { AppScreenDim, AppScreenEdge, AppScreenLayer, AppScreenPropsProvider, AppScreenRoot } from './AppScreen/AppScreen.js';
5
- import * as AppScreen_namespace from './AppScreen/AppScreen.namespace.js';
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 };
@@ -1,9 +1,3 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
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;
@@ -1 +1,2 @@
1
- export { useActivityZIndexBase } from './useActivityZIndexBase.js';
1
+ import { useActivityZIndexBase } from "./useActivityZIndexBase.js";
2
+ export { useActivityZIndexBase };
@@ -1,14 +1,15 @@
1
- 'use client';
2
- 'use strict';
3
-
4
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
5
-
6
- const reactUiCore = require('@stackflow/react-ui-core');
7
-
8
- const Z_INDEX_SPACING = 5;
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
- const activity = reactUiCore.useNullableActivity();
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
- 'use client';
2
- import { useNullableActivity } from '@stackflow/react-ui-core';
3
-
4
- const Z_INDEX_SPACING = 5;
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
- const activity = useNullableActivity();
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,32 +1,41 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
-
5
- const plugin = require('./plugin.cjs');
6
- const AppBar = require('./components/AppBar/AppBar.cjs');
7
- const AppBar_namespace = require('./components/AppBar/AppBar.namespace.cjs');
8
- const AppScreen = require('./components/AppScreen/AppScreen.cjs');
9
- const AppScreen_namespace = require('./components/AppScreen/AppScreen.namespace.cjs');
10
- const useActivityZIndexBase = require('./hooks/useActivityZIndexBase.cjs');
11
- const index = require('./primitive/index.cjs');
12
-
13
-
14
-
15
- exports.seedPlugin = plugin.seedPlugin;
16
- exports.AppBarIconButton = AppBar.AppBarIconButton;
17
- exports.AppBarLeft = AppBar.AppBarLeft;
18
- exports.AppBarMain = AppBar.AppBarMain;
19
- exports.AppBarRight = AppBar.AppBarRight;
20
- exports.AppBarRoot = AppBar.AppBarRoot;
21
- exports.AppBarSlot = AppBar.AppBarSlot;
22
- exports.AppBarSubtitle = AppBar.AppBarSubtitle;
23
- exports.AppBarTitle = AppBar.AppBarTitle;
24
- exports.AppBar = AppBar_namespace;
25
- exports.AppScreenDim = AppScreen.AppScreenDim;
26
- exports.AppScreenEdge = AppScreen.AppScreenEdge;
27
- exports.AppScreenLayer = AppScreen.AppScreenLayer;
28
- exports.AppScreenPropsProvider = AppScreen.AppScreenPropsProvider;
29
- exports.AppScreenRoot = AppScreen.AppScreenRoot;
30
- exports.AppScreen = AppScreen_namespace;
31
- exports.useActivityZIndexBase = useActivityZIndexBase.useActivityZIndexBase;
32
- exports.Primitive = index;
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
- export { seedPlugin } from './plugin.js';
2
- export { AppBarIconButton, AppBarLeft, AppBarMain, AppBarRight, AppBarRoot, AppBarSlot, AppBarSubtitle, AppBarTitle } from './components/AppBar/AppBar.js';
3
- import * as AppBar_namespace from './components/AppBar/AppBar.namespace.js';
4
- export { AppBar_namespace as AppBar };
5
- export { AppScreenDim, AppScreenEdge, AppScreenLayer, AppScreenPropsProvider, AppScreenRoot } from './components/AppScreen/AppScreen.js';
6
- import * as AppScreen_namespace from './components/AppScreen/AppScreen.namespace.js';
7
- export { AppScreen_namespace as AppScreen };
8
- export { useActivityZIndexBase } from './hooks/useActivityZIndexBase.js';
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
- 'use client';
2
- 'use strict';
3
-
4
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
5
-
6
- const jsxRuntime = require('react/jsx-runtime');
7
- const AppScreen = require('./components/AppScreen/AppScreen.cjs');
8
- const GlobalInteraction = require('./primitive/GlobalInteraction/GlobalInteraction.cjs');
9
-
10
- const seedPlugin = (options) => () => ({
11
- key: "seed-design",
12
- wrapStack({ stack, initialContext }) {
13
- const resolved = typeof options === "function" ? options({ initialContext }) : options;
14
- return /* @__PURE__ */ jsxRuntime.jsx(AppScreen.AppScreenPropsProvider, { value: resolved, children: /* @__PURE__ */ jsxRuntime.jsx(GlobalInteraction.GlobalInteraction, { children: stack.render() }) });
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
- 'use client';
2
- import { jsx } from 'react/jsx-runtime';
3
- import { AppScreenPropsProvider } from './components/AppScreen/AppScreen.js';
4
- import { GlobalInteraction } from './primitive/GlobalInteraction/GlobalInteraction.js';
5
-
6
- const seedPlugin = (options) => () => ({
7
- key: "seed-design",
8
- wrapStack({ stack, initialContext }) {
9
- const resolved = typeof options === "function" ? options({ initialContext }) : options;
10
- return /* @__PURE__ */ jsx(AppScreenPropsProvider, { value: resolved, children: /* @__PURE__ */ jsx(GlobalInteraction, { children: stack.render() }) });
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 };