@seed-design/stackflow 0.0.1-rc.0 → 0.0.1-rc.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.
Files changed (92) hide show
  1. package/lib/components/AppBar/AppBar.cjs +92 -0
  2. package/lib/components/AppBar/AppBar.d.ts +13 -12
  3. package/lib/components/AppBar/AppBar.js +81 -0
  4. package/lib/components/AppBar/AppBar.namespace.cjs +15 -0
  5. package/lib/components/AppBar/AppBar.namespace.d.ts +2 -2
  6. package/lib/components/AppBar/AppBar.namespace.js +1 -0
  7. package/lib/components/AppBar/index.cjs +17 -0
  8. package/lib/components/AppBar/index.d.ts +3 -3
  9. package/lib/components/AppBar/index.js +3 -0
  10. package/lib/components/AppScreen/AppScreen.cjs +58 -0
  11. package/lib/components/AppScreen/AppScreen.d.ts +8 -7
  12. package/lib/components/AppScreen/AppScreen.js +50 -0
  13. package/lib/components/AppScreen/AppScreen.namespace.cjs +13 -0
  14. package/lib/components/AppScreen/AppScreen.namespace.d.ts +2 -2
  15. package/lib/components/AppScreen/AppScreen.namespace.js +1 -0
  16. package/lib/components/AppScreen/index.cjs +15 -0
  17. package/lib/components/AppScreen/index.d.ts +3 -3
  18. package/lib/components/AppScreen/index.js +3 -0
  19. package/lib/components/index.cjs +25 -0
  20. package/lib/components/index.d.ts +2 -2
  21. package/lib/components/index.js +6 -0
  22. package/lib/index.cjs +29 -0
  23. package/lib/index.d.ts +3 -3
  24. package/lib/index.js +9 -786
  25. package/lib/plugin.cjs +16 -0
  26. package/lib/plugin.d.ts +1 -1
  27. package/lib/plugin.js +12 -0
  28. package/lib/primitive/AppBar/AppBar.cjs +43 -0
  29. package/lib/primitive/AppBar/AppBar.d.ts +7 -6
  30. package/lib/primitive/AppBar/AppBar.js +36 -0
  31. package/lib/primitive/AppBar/AppBar.namespace.cjs +12 -0
  32. package/lib/primitive/AppBar/AppBar.namespace.d.ts +1 -1
  33. package/lib/primitive/AppBar/AppBar.namespace.js +1 -0
  34. package/lib/primitive/AppBar/index.cjs +14 -0
  35. package/lib/primitive/AppBar/index.d.ts +2 -2
  36. package/lib/primitive/AppBar/index.js +3 -0
  37. package/lib/primitive/AppBar/useAppBar.cjs +38 -0
  38. package/lib/primitive/AppBar/useAppBar.d.ts +168 -167
  39. package/lib/primitive/AppBar/useAppBar.js +34 -0
  40. package/lib/primitive/AppBar/useAppBarContext.cjs +20 -0
  41. package/lib/primitive/AppBar/useAppBarContext.d.ts +3 -2
  42. package/lib/primitive/AppBar/useAppBarContext.js +15 -0
  43. package/lib/primitive/AppScreen/AppScreen.cjs +57 -0
  44. package/lib/primitive/AppScreen/AppScreen.d.ts +7 -6
  45. package/lib/primitive/AppScreen/AppScreen.js +50 -0
  46. package/lib/primitive/AppScreen/AppScreen.namespace.cjs +12 -0
  47. package/lib/primitive/AppScreen/AppScreen.namespace.d.ts +1 -1
  48. package/lib/primitive/AppScreen/AppScreen.namespace.js +1 -0
  49. package/lib/primitive/AppScreen/index.cjs +16 -0
  50. package/lib/primitive/AppScreen/index.d.ts +3 -3
  51. package/lib/primitive/AppScreen/index.js +4 -0
  52. package/lib/primitive/AppScreen/useAppScreen.cjs +64 -0
  53. package/lib/primitive/AppScreen/useAppScreen.d.ts +657 -655
  54. package/lib/primitive/AppScreen/useAppScreen.js +60 -0
  55. package/lib/primitive/AppScreen/useAppScreenContext.cjs +20 -0
  56. package/lib/primitive/AppScreen/useAppScreenContext.d.ts +3 -2
  57. package/lib/primitive/AppScreen/useAppScreenContext.js +15 -0
  58. package/lib/primitive/GlobalInteraction/GlobalInteraction.cjs +27 -0
  59. package/lib/primitive/GlobalInteraction/GlobalInteraction.d.ts +3 -2
  60. package/lib/primitive/GlobalInteraction/GlobalInteraction.js +23 -0
  61. package/lib/primitive/GlobalInteraction/index.cjs +11 -0
  62. package/lib/primitive/GlobalInteraction/index.d.ts +2 -2
  63. package/lib/primitive/GlobalInteraction/index.js +2 -0
  64. package/lib/primitive/GlobalInteraction/useGlobalInteraction.cjs +122 -0
  65. package/lib/primitive/GlobalInteraction/useGlobalInteraction.d.ts +5 -4
  66. package/lib/primitive/GlobalInteraction/useGlobalInteraction.js +118 -0
  67. package/lib/primitive/GlobalInteraction/useGlobalInteractionContext.cjs +20 -0
  68. package/lib/primitive/GlobalInteraction/useGlobalInteractionContext.d.ts +3 -2
  69. package/lib/primitive/GlobalInteraction/useGlobalInteractionContext.js +15 -0
  70. package/lib/primitive/GlobalInteraction/useSwipeBack.cjs +57 -0
  71. package/lib/primitive/GlobalInteraction/useSwipeBack.d.ts +1 -1
  72. package/lib/primitive/GlobalInteraction/useSwipeBack.js +53 -0
  73. package/lib/primitive/index.cjs +27 -0
  74. package/lib/primitive/index.d.ts +3 -3
  75. package/lib/primitive/index.js +9 -0
  76. package/lib/primitive/private/useElementOffset.cjs +53 -0
  77. package/lib/primitive/private/useElementOffset.js +30 -0
  78. package/lib/primitive/private/useTopActivity.cjs +31 -0
  79. package/lib/primitive/private/useTopActivity.js +27 -0
  80. package/lib/utils/createStyleContext.cjs +76 -0
  81. package/lib/utils/createStyleContext.js +72 -0
  82. package/lib/utils/createWithStateProps.d.ts +2 -1
  83. package/package.json +13 -14
  84. package/src/components/AppScreen/AppScreen.namespace.ts +1 -0
  85. package/src/components/AppScreen/{index.tsx → index.ts} +1 -0
  86. package/src/plugin.tsx +1 -1
  87. package/lib/index.js.map +0 -7
  88. package/lib/index.mjs +0 -759
  89. package/lib/index.mjs.map +0 -7
  90. /package/src/components/AppBar/{index.tsx → index.ts} +0 -0
  91. /package/src/components/{index.tsx → index.ts} +0 -0
  92. /package/src/primitive/{index.tsx → index.ts} +0 -0
@@ -0,0 +1,9 @@
1
+ export { AppScreenDim, AppScreenEdge, AppScreenLayer, AppScreenRoot } from './AppScreen/AppScreen.js';
2
+ import * as AppScreen_namespace from './AppScreen/AppScreen.namespace.js';
3
+ export { AppScreen_namespace as AppScreen };
4
+ export { useAppScreenContext } from './AppScreen/useAppScreenContext.js';
5
+ export { AppBarLeft, AppBarMain, AppBarRight, AppBarRoot } from './AppBar/AppBar.js';
6
+ import * as AppBar_namespace from './AppBar/AppBar.namespace.js';
7
+ export { AppBar_namespace as AppBar };
8
+ export { GlobalInteraction } from './GlobalInteraction/GlobalInteraction.js';
9
+ export { useGlobalInteractionContext } from './GlobalInteraction/useGlobalInteractionContext.js';
@@ -0,0 +1,53 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
+
5
+ const React = require('react');
6
+
7
+ function _interopNamespaceDefault(e) {
8
+ const n = Object.create(null, { [Symbol.toStringTag]: { value: 'Module' } });
9
+ if (e) {
10
+ for (const k in e) {
11
+ if (k !== 'default') {
12
+ const d = Object.getOwnPropertyDescriptor(e, k);
13
+ Object.defineProperty(n, k, d.get ? d : {
14
+ enumerable: true,
15
+ get: () => e[k]
16
+ });
17
+ }
18
+ }
19
+ }
20
+ n.default = e;
21
+ return Object.freeze(n);
22
+ }
23
+
24
+ const React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
25
+
26
+ const useLayoutEffect = typeof window !== "undefined" ? React__namespace.useLayoutEffect : React__namespace.useEffect;
27
+ function useElementOffset(element) {
28
+ const [offset, setOffset] = React__namespace.useState(
29
+ void 0
30
+ );
31
+ useLayoutEffect(() => {
32
+ if (!element) {
33
+ setOffset(void 0);
34
+ return;
35
+ }
36
+ if (element) {
37
+ setOffset({
38
+ fromLeft: element.offsetLeft + element.offsetWidth,
39
+ fromRight: (element.offsetParent ?? document.body).clientWidth - element.offsetLeft
40
+ });
41
+ const resizeObserver = new ResizeObserver(() => {
42
+ const fromLeft = element.offsetLeft + element.offsetWidth;
43
+ const fromRight = (element.offsetParent ?? document.body).clientWidth - element.offsetLeft;
44
+ setOffset({ fromLeft, fromRight });
45
+ });
46
+ resizeObserver.observe(element);
47
+ return () => resizeObserver.unobserve(element);
48
+ }
49
+ }, [element]);
50
+ return offset;
51
+ }
52
+
53
+ exports.useElementOffset = useElementOffset;
@@ -0,0 +1,30 @@
1
+ import * as React from 'react';
2
+
3
+ const useLayoutEffect = typeof window !== "undefined" ? React.useLayoutEffect : React.useEffect;
4
+ function useElementOffset(element) {
5
+ const [offset, setOffset] = React.useState(
6
+ void 0
7
+ );
8
+ useLayoutEffect(() => {
9
+ if (!element) {
10
+ setOffset(void 0);
11
+ return;
12
+ }
13
+ if (element) {
14
+ setOffset({
15
+ fromLeft: element.offsetLeft + element.offsetWidth,
16
+ fromRight: (element.offsetParent ?? document.body).clientWidth - element.offsetLeft
17
+ });
18
+ const resizeObserver = new ResizeObserver(() => {
19
+ const fromLeft = element.offsetLeft + element.offsetWidth;
20
+ const fromRight = (element.offsetParent ?? document.body).clientWidth - element.offsetLeft;
21
+ setOffset({ fromLeft, fromRight });
22
+ });
23
+ resizeObserver.observe(element);
24
+ return () => resizeObserver.unobserve(element);
25
+ }
26
+ }, [element]);
27
+ return offset;
28
+ }
29
+
30
+ export { useElementOffset };
@@ -0,0 +1,31 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
+
5
+ const react = require('@stackflow/react');
6
+ const React = require('react');
7
+
8
+ function useTopActivity() {
9
+ const stack = react.useStack();
10
+ if (!stack) {
11
+ throw new Error(
12
+ "useStack is not available in the context. Make sure you are using @stackflow/react >= 1.4.1. (https://github.com/daangn/stackflow/blob/main/integrations/react/CHANGELOG.md#141)"
13
+ );
14
+ }
15
+ const topId = stack.activities.find((activity) => activity.isTop)?.id;
16
+ const topActivity = stack.activities.find((activity) => activity.isTop);
17
+ const transitionState = topActivity?.transitionState ?? "enter-done";
18
+ const [topEl, setTopEl] = React.useState(null);
19
+ const activityType = topEl?.dataset["activityType"];
20
+ React.useEffect(() => {
21
+ if (!topId) return;
22
+ const el = document.querySelector(`[data-activity-id="${topId}"]`);
23
+ setTopEl(el);
24
+ }, [topId]);
25
+ return {
26
+ transitionState,
27
+ activityType
28
+ };
29
+ }
30
+
31
+ exports.useTopActivity = useTopActivity;
@@ -0,0 +1,27 @@
1
+ import { useStack } from '@stackflow/react';
2
+ import { useState, useEffect } from 'react';
3
+
4
+ function useTopActivity() {
5
+ const stack = useStack();
6
+ if (!stack) {
7
+ throw new Error(
8
+ "useStack is not available in the context. Make sure you are using @stackflow/react >= 1.4.1. (https://github.com/daangn/stackflow/blob/main/integrations/react/CHANGELOG.md#141)"
9
+ );
10
+ }
11
+ const topId = stack.activities.find((activity) => activity.isTop)?.id;
12
+ const topActivity = stack.activities.find((activity) => activity.isTop);
13
+ const transitionState = topActivity?.transitionState ?? "enter-done";
14
+ const [topEl, setTopEl] = useState(null);
15
+ const activityType = topEl?.dataset["activityType"];
16
+ useEffect(() => {
17
+ if (!topId) return;
18
+ const el = document.querySelector(`[data-activity-id="${topId}"]`);
19
+ setTopEl(el);
20
+ }, [topId]);
21
+ return {
22
+ transitionState,
23
+ activityType
24
+ };
25
+ }
26
+
27
+ export { useTopActivity };
@@ -0,0 +1,76 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
+
5
+ const jsxRuntime = require('react/jsx-runtime');
6
+ const clsx = require('clsx');
7
+ const React = require('react');
8
+
9
+ function createStyleContext(recipe) {
10
+ const ClassNamesContext = React.createContext(null);
11
+ const PropsContext = React.createContext(null);
12
+ const ClassNamesProvider = ({
13
+ children,
14
+ value
15
+ }) => {
16
+ return /* @__PURE__ */ jsxRuntime.jsx(ClassNamesContext.Provider, { value, children });
17
+ };
18
+ const PropsProvider = ({ children, value }) => {
19
+ return /* @__PURE__ */ jsxRuntime.jsx(PropsContext.Provider, { value, children });
20
+ };
21
+ function useClassNames() {
22
+ const context = React.useContext(ClassNamesContext);
23
+ if (context === null) {
24
+ throw new Error(
25
+ "useClassNames must be used within a ClassNamesProvider. Did you forget to wrap your component in a ClassNamesProvider?"
26
+ );
27
+ }
28
+ return context;
29
+ }
30
+ function useProps() {
31
+ return React.useContext(PropsContext);
32
+ }
33
+ const withRootProvider = (Component, options) => {
34
+ const { defaultProps } = options ?? {};
35
+ const StyledComponent = (innerProps) => {
36
+ const props = { ...defaultProps ?? {}, ...useProps(), ...innerProps };
37
+ const [variantProps, otherProps] = recipe.splitVariantProps(props);
38
+ const classNames = recipe(variantProps);
39
+ return /* @__PURE__ */ jsxRuntime.jsx(ClassNamesProvider, { value: classNames, children: /* @__PURE__ */ jsxRuntime.jsx(Component, { ...otherProps }) });
40
+ };
41
+ StyledComponent.displayName = Component.displayName || Component.name;
42
+ return StyledComponent;
43
+ };
44
+ const withProvider = (Component, slot, options) => {
45
+ const { defaultProps } = options ?? {};
46
+ const StyledComponent = React.forwardRef((innerProps, ref) => {
47
+ const props = { ...defaultProps ?? {}, ...useProps(), ...innerProps };
48
+ const [variantProps, otherProps] = recipe.splitVariantProps(props);
49
+ const classNames = recipe(variantProps);
50
+ const className = classNames[slot];
51
+ return /* @__PURE__ */ jsxRuntime.jsx(ClassNamesProvider, { value: classNames, children: /* @__PURE__ */ jsxRuntime.jsx(Component, { ref, ...otherProps, className: clsx(className, props.className) }) });
52
+ });
53
+ StyledComponent.displayName = Component.displayName || Component.name;
54
+ return StyledComponent;
55
+ };
56
+ const withContext = (Component, slot) => {
57
+ const StyledComponent = React.forwardRef((props, ref) => {
58
+ const classNames = useClassNames();
59
+ const className = classNames?.[slot];
60
+ return /* @__PURE__ */ jsxRuntime.jsx(Component, { ref, ...props, className: clsx(className, props.className) });
61
+ });
62
+ StyledComponent.displayName = Component.displayName || Component.name;
63
+ return StyledComponent;
64
+ };
65
+ return {
66
+ ClassNamesProvider,
67
+ PropsProvider,
68
+ useClassNames,
69
+ useProps,
70
+ withRootProvider,
71
+ withProvider,
72
+ withContext
73
+ };
74
+ }
75
+
76
+ exports.createStyleContext = createStyleContext;
@@ -0,0 +1,72 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import clsx from 'clsx';
3
+ import { createContext, forwardRef, useContext } from 'react';
4
+
5
+ function createStyleContext(recipe) {
6
+ const ClassNamesContext = createContext(null);
7
+ const PropsContext = createContext(null);
8
+ const ClassNamesProvider = ({
9
+ children,
10
+ value
11
+ }) => {
12
+ return /* @__PURE__ */ jsx(ClassNamesContext.Provider, { value, children });
13
+ };
14
+ const PropsProvider = ({ children, value }) => {
15
+ return /* @__PURE__ */ jsx(PropsContext.Provider, { value, children });
16
+ };
17
+ function useClassNames() {
18
+ const context = useContext(ClassNamesContext);
19
+ if (context === null) {
20
+ throw new Error(
21
+ "useClassNames must be used within a ClassNamesProvider. Did you forget to wrap your component in a ClassNamesProvider?"
22
+ );
23
+ }
24
+ return context;
25
+ }
26
+ function useProps() {
27
+ return useContext(PropsContext);
28
+ }
29
+ const withRootProvider = (Component, options) => {
30
+ const { defaultProps } = options ?? {};
31
+ const StyledComponent = (innerProps) => {
32
+ const props = { ...defaultProps ?? {}, ...useProps(), ...innerProps };
33
+ const [variantProps, otherProps] = recipe.splitVariantProps(props);
34
+ const classNames = recipe(variantProps);
35
+ return /* @__PURE__ */ jsx(ClassNamesProvider, { value: classNames, children: /* @__PURE__ */ jsx(Component, { ...otherProps }) });
36
+ };
37
+ StyledComponent.displayName = Component.displayName || Component.name;
38
+ return StyledComponent;
39
+ };
40
+ const withProvider = (Component, slot, options) => {
41
+ const { defaultProps } = options ?? {};
42
+ const StyledComponent = forwardRef((innerProps, ref) => {
43
+ const props = { ...defaultProps ?? {}, ...useProps(), ...innerProps };
44
+ const [variantProps, otherProps] = recipe.splitVariantProps(props);
45
+ const classNames = recipe(variantProps);
46
+ const className = classNames[slot];
47
+ return /* @__PURE__ */ jsx(ClassNamesProvider, { value: classNames, children: /* @__PURE__ */ jsx(Component, { ref, ...otherProps, className: clsx(className, props.className) }) });
48
+ });
49
+ StyledComponent.displayName = Component.displayName || Component.name;
50
+ return StyledComponent;
51
+ };
52
+ const withContext = (Component, slot) => {
53
+ const StyledComponent = forwardRef((props, ref) => {
54
+ const classNames = useClassNames();
55
+ const className = classNames?.[slot];
56
+ return /* @__PURE__ */ jsx(Component, { ref, ...props, className: clsx(className, props.className) });
57
+ });
58
+ StyledComponent.displayName = Component.displayName || Component.name;
59
+ return StyledComponent;
60
+ };
61
+ return {
62
+ ClassNamesProvider,
63
+ PropsProvider,
64
+ useClassNames,
65
+ useProps,
66
+ withRootProvider,
67
+ withProvider,
68
+ withContext
69
+ };
70
+ }
71
+
72
+ export { createStyleContext };
@@ -1,3 +1,4 @@
1
+ import { ForwardRefExoticComponent, PropsWithoutRef, RefAttributes } from 'react';
1
2
  type AtLeastOne<T> = [T, ...T[]];
2
3
  export declare function createWithStateProps(useContexts: AtLeastOne<(prop?: {
3
4
  strict?: boolean;
@@ -5,5 +6,5 @@ export declare function createWithStateProps(useContexts: AtLeastOne<(prop?: {
5
6
  stateProps: React.HTMLAttributes<HTMLElement>;
6
7
  } | null>, options?: {
7
8
  strict?: boolean;
8
- }): <P, R>(Component: React.ComponentType<P & React.RefAttributes<R>>) => import("react").ForwardRefExoticComponent<import("react").PropsWithoutRef<P> & import("react").RefAttributes<R>>;
9
+ }): <P, R>(Component: React.ComponentType<P & React.RefAttributes<R>>) => ForwardRefExoticComponent< PropsWithoutRef<P> & RefAttributes<R>>;
9
10
  export {};
package/package.json CHANGED
@@ -1,28 +1,30 @@
1
1
  {
2
2
  "name": "@seed-design/stackflow",
3
- "version": "0.0.1-rc.0",
3
+ "version": "0.0.1-rc.3",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/daangn/seed-design.git",
7
7
  "directory": "packages/stackflow"
8
8
  },
9
9
  "sideEffects": false,
10
+ "type": "module",
10
11
  "exports": {
11
12
  ".": {
12
13
  "types": "./lib/index.d.ts",
13
- "require": "./lib/index.js",
14
- "import": "./lib/index.mjs"
14
+ "import": "./lib/index.js",
15
+ "require": "./lib/index.cjs"
15
16
  },
16
17
  "./package.json": "./package.json"
17
18
  },
18
- "main": "./lib/index.js",
19
+ "main": "./lib/index.cjs",
19
20
  "files": [
20
21
  "lib",
21
22
  "src"
22
23
  ],
23
24
  "scripts": {
24
25
  "clean": "rm -rf lib",
25
- "build": "bun build.mjs && tsc"
26
+ "build": "vite build",
27
+ "lint:publish": "bun publint"
26
28
  },
27
29
  "dependencies": {
28
30
  "@radix-ui/react-compose-refs": "^1.1.1",
@@ -33,11 +35,14 @@
33
35
  "clsx": "^2.1.1"
34
36
  },
35
37
  "devDependencies": {
36
- "@stackflow/core": "^1.1.0",
37
- "esbuild": "^0.25.0"
38
+ "@seed-design/css": "0.0.1-rc.3",
39
+ "globby": "^14.1.0",
40
+ "vite": "^6.1.1",
41
+ "vite-plugin-dts": "^4.5.0"
38
42
  },
39
43
  "peerDependencies": {
40
- "@seed-design/css": "0.0.1-rc.0",
44
+ "@seed-design/css": "0.0.1-rc.3",
45
+ "@stackflow/core": ">=1.1.0",
41
46
  "@stackflow/react": ">=1.4.1",
42
47
  "@stackflow/react-ui-core": ">=1.2.1",
43
48
  "react": ">=18.0.0",
@@ -45,11 +50,5 @@
45
50
  },
46
51
  "publishConfig": {
47
52
  "access": "public"
48
- },
49
- "ultra": {
50
- "concurrent": [
51
- "dev",
52
- "build"
53
- ]
54
53
  }
55
54
  }
@@ -3,6 +3,7 @@ export {
3
3
  AppScreenEdge as Edge,
4
4
  AppScreenLayer as Layer,
5
5
  AppScreenRoot as Root,
6
+ AppScreenPropsProvider as PropsProvider,
6
7
  } from "./AppScreen";
7
8
 
8
9
  export type {
@@ -3,6 +3,7 @@ export {
3
3
  AppScreenEdge,
4
4
  AppScreenLayer,
5
5
  AppScreenRoot,
6
+ AppScreenPropsProvider,
6
7
  } from "./AppScreen";
7
8
 
8
9
  export type {
package/src/plugin.tsx CHANGED
@@ -1,5 +1,5 @@
1
1
  import type { StackflowReactPlugin } from "@stackflow/react";
2
- import { AppScreenPropsProvider } from "./components/AppScreen/AppScreen";
2
+ import { AppScreenPropsProvider } from "./components";
3
3
  import { GlobalInteraction } from "./primitive";
4
4
 
5
5
  export interface SeedPluginOptions {
package/lib/index.js.map DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/index.ts", "../src/components/AppScreen/AppScreen.tsx", "../src/primitive/index.tsx", "../src/primitive/AppScreen/AppScreen.tsx", "../src/primitive/AppScreen/useAppScreen.tsx", "../src/primitive/GlobalInteraction/useSwipeBack.ts", "../src/primitive/GlobalInteraction/useGlobalInteractionContext.tsx", "../src/primitive/AppScreen/useAppScreenContext.ts", "../src/primitive/AppScreen/AppScreen.namespace.ts", "../src/primitive/AppBar/AppBar.tsx", "../src/primitive/AppBar/useAppBar.tsx", "../src/primitive/private/useElementOffset.ts", "../src/primitive/AppBar/useAppBarContext.ts", "../src/primitive/AppBar/AppBar.namespace.ts", "../src/primitive/GlobalInteraction/GlobalInteraction.tsx", "../src/primitive/GlobalInteraction/useGlobalInteraction.ts", "../src/primitive/private/useTopActivity.ts", "../src/utils/createStyleContext.tsx", "../src/components/AppBar/AppBar.tsx", "../src/plugin.tsx", "../src/components/AppBar/AppBar.namespace.ts", "../src/components/AppScreen/AppScreen.namespace.ts"],
4
- "sourcesContent": ["export { seedPlugin, type SeedPluginOptions } from \"./plugin\";\n\nexport * from \"./components\";\nexport * as Primitive from \"./primitive\";\n", "import { appScreen, type AppScreenVariantProps } from \"@seed-design/css/recipes/app-screen\";\nimport { forwardRef, useMemo } from \"react\";\nimport { AppScreen as AppScreenPrimitive } from \"../../primitive\";\nimport { createStyleContext } from \"../../utils/createStyleContext\";\nimport { AppBarPropsProvider } from \"../AppBar/AppBar\";\nimport { mergeProps } from \"@seed-design/dom-utils\";\n\nconst { ClassNamesProvider, PropsProvider, withContext, useProps } = createStyleContext(appScreen);\n\nexport const AppScreenPropsProvider = PropsProvider;\n\nexport interface AppScreenRootProps extends AppScreenVariantProps, AppScreenPrimitive.RootProps {}\n\nexport const AppScreenRoot = forwardRef<HTMLDivElement, AppScreenRootProps>((props, ref) => {\n const contextProps = useProps();\n const [variantProps, otherProps] = appScreen.splitVariantProps({ ...contextProps, ...props });\n\n // TODO: we have to implement conditional default in recipe; this is temporal workaround.\n const transitionStyle =\n variantProps.transitionStyle ??\n (variantProps.theme === \"cupertino\" ? \"slideFromRightIOS\" : \"fadeFromBottomAndroid\");\n\n const classNames = appScreen({\n ...variantProps,\n transitionStyle,\n });\n\n return (\n <ClassNamesProvider value={classNames}>\n <AppBarPropsProvider\n value={useMemo(\n () => ({ theme: variantProps.theme, transitionStyle }),\n [variantProps.theme, transitionStyle],\n )}\n >\n <AppScreenPrimitive.Root\n ref={ref}\n {...mergeProps({ className: classNames.root }, otherProps)}\n />\n </AppBarPropsProvider>\n </ClassNamesProvider>\n );\n});\nAppScreenRoot.displayName = \"AppScreenRoot\";\n\nexport interface AppScreenDimProps extends AppScreenPrimitive.DimProps {}\n\nexport const AppScreenDim = withContext<HTMLDivElement, AppScreenDimProps>(\n AppScreenPrimitive.Dim,\n \"dim\",\n);\n\nexport interface AppScreenEdgeProps extends AppScreenPrimitive.EdgeProps {}\n\nexport const AppScreenEdge = withContext<HTMLDivElement, AppScreenEdgeProps>(\n AppScreenPrimitive.Edge,\n \"edge\",\n);\n\nexport interface AppScreenLayerProps extends AppScreenPrimitive.LayerProps {}\n\nexport const AppScreenLayer = withContext<HTMLDivElement, AppScreenLayerProps>(\n AppScreenPrimitive.Layer,\n \"layer\",\n);\n", "export * from \"./AppScreen\";\nexport * from \"./AppBar\";\nexport * from \"./GlobalInteraction\";\n", "import { mergeProps } from \"@seed-design/dom-utils\";\nimport { Primitive, type PrimitiveProps } from \"@seed-design/react-primitive\";\nimport { forwardRef } from \"react\";\nimport { useAppScreen, type UseAppScreenProps } from \"./useAppScreen\";\nimport { AppScreenProvider, useAppScreenContext } from \"./useAppScreenContext\";\n\nexport interface AppScreenRootProps\n extends PrimitiveProps,\n UseAppScreenProps,\n React.HTMLAttributes<HTMLDivElement> {}\n\nexport const AppScreenRoot = forwardRef<HTMLDivElement, AppScreenRootProps>((props, ref) => {\n const {\n swipeBackDisplacementRatioThreshold,\n swipeBackVelocityThreshold,\n onSwipeBackEnd,\n onSwipeBackMove,\n onSwipeBackStart,\n ...otherProps\n } = props;\n const api = useAppScreen({\n swipeBackDisplacementRatioThreshold,\n swipeBackVelocityThreshold,\n onSwipeBackEnd,\n onSwipeBackMove,\n onSwipeBackStart,\n });\n\n return (\n <AppScreenProvider value={api}>\n <Primitive.div\n ref={ref}\n data-stackflow-component-name=\"AppScreen\"\n {...mergeProps(api.activityProps, otherProps)}\n />\n </AppScreenProvider>\n );\n});\nAppScreenRoot.displayName = \"AppScreenRoot\";\n\nexport interface AppScreenDimProps extends PrimitiveProps, React.HTMLAttributes<HTMLDivElement> {}\n\nexport const AppScreenDim = forwardRef<HTMLDivElement, AppScreenDimProps>((props, ref) => {\n const { dimProps } = useAppScreenContext();\n\n return <Primitive.div ref={ref} {...mergeProps(dimProps, props)} />;\n});\nAppScreenDim.displayName = \"AppScreenDim\";\n\nexport interface AppScreenEdgeProps extends PrimitiveProps, React.HTMLAttributes<HTMLDivElement> {}\n\nexport const AppScreenEdge = forwardRef<HTMLDivElement, AppScreenEdgeProps>((props, ref) => {\n const { edgeProps } = useAppScreenContext();\n\n return <Primitive.div ref={ref} {...mergeProps(edgeProps, props)} />;\n});\nAppScreenEdge.displayName = \"AppScreenEdge\";\n\nexport interface AppScreenLayerProps extends PrimitiveProps, React.HTMLAttributes<HTMLDivElement> {}\n\nexport const AppScreenLayer = forwardRef<HTMLDivElement, AppScreenLayerProps>((props, ref) => {\n const { layerProps } = useAppScreenContext();\n\n return <Primitive.div ref={ref} {...mergeProps(layerProps, props)} />;\n});\nAppScreenLayer.displayName = \"AppScreenLayer\";\n", "import { dataAttr, elementProps } from \"@seed-design/dom-utils\";\nimport { useNullableActivity, useZIndexBase } from \"@stackflow/react-ui-core\";\nimport { useMemo } from \"react\";\nimport { type UseSwipeBackProps, useSwipeBack } from \"../GlobalInteraction/useSwipeBack\";\n\nexport interface UseAppScreenProps extends UseSwipeBackProps {}\n\nexport type UseAppScreenReturn = ReturnType<typeof useAppScreen>;\n\nexport function useAppScreen(props: UseAppScreenProps) {\n const activity = useNullableActivity();\n\n const transitionState = activity?.transitionState ?? \"enter-done\";\n\n const { activityProps, layerProps, edgeProps } = useSwipeBack(props);\n\n const zIndexBase = useZIndexBase();\n const zIndexStyle = useMemo(\n () =>\n ({\n \"--z-index-base\": zIndexBase.toString(),\n }) as React.CSSProperties,\n [zIndexBase],\n );\n\n const stateProps = useMemo(\n () => ({\n \"data-activity-is-top\": dataAttr(activity?.isTop),\n \"data-activity-is-active\": dataAttr(activity?.isActive),\n \"data-transition-state\": transitionState,\n }),\n [transitionState, activity?.isActive, activity?.isTop],\n ) as React.HTMLAttributes<HTMLElement>;\n\n return useMemo(\n () => ({\n activity,\n stateProps,\n activityProps: elementProps({\n \"data-part\": \"activity\",\n \"data-activity-type\": \"full-screen\",\n ...activityProps,\n ...stateProps,\n \"data-activity-id\": activity?.id,\n style: zIndexStyle,\n // FIXME: @stackflow/react should prevent activity.id hydration mismatch; this is temporal fix.\n suppressHydrationWarning: true,\n }),\n dimProps: elementProps({\n \"data-part\": \"dim\",\n ...stateProps,\n }),\n layerProps: elementProps({\n \"data-part\": \"layer\",\n ...stateProps,\n ...layerProps,\n }),\n edgeProps: elementProps({\n \"data-part\": \"edge\",\n \"aria-hidden\": true,\n tabIndex: -1,\n ...edgeProps,\n ...stateProps,\n }),\n }),\n [activity, zIndexStyle, stateProps, activityProps, edgeProps, layerProps],\n );\n}\n", "import { useEffect, useMemo } from \"react\";\nimport type { SwipeBackProps } from \"./useGlobalInteraction\";\nimport { useGlobalInteractionContext } from \"./useGlobalInteractionContext\";\n\nexport interface UseSwipeBackProps extends SwipeBackProps {}\n\nexport function useSwipeBack(props: UseSwipeBackProps) {\n const globalInteraction = useGlobalInteractionContext();\n const events = globalInteraction.getSwipeBackEvents(props);\n\n useEffect(() => {\n return () => {\n events.reset();\n };\n }, [events]);\n\n return useMemo(\n () => ({\n activityProps: {\n \"data-swipe-back\": \"\",\n } as React.HTMLAttributes<HTMLDivElement>,\n layerProps: {\n onTransitionEnd: (e) => {\n if (e.target === e.currentTarget) {\n events.reset();\n }\n },\n onAnimationEnd: (e) => {\n if (e.target === e.currentTarget) {\n events.reset();\n }\n },\n } as React.HTMLAttributes<HTMLDivElement>,\n edgeProps: {\n tabIndex: -1,\n onTouchStart: (e) => {\n const x0 = e.touches[0].clientX;\n const t0 = Date.now();\n events.startSwipeBack({ x0, t0 });\n },\n onTouchMove: (e) => {\n const x = e.touches[0].clientX;\n const t = Date.now();\n events.moveSwipeBack({ x, t });\n },\n onTouchEnd: () => {\n events.endSwipeBack({});\n },\n onTouchCancel: () => {\n events.endSwipeBack({});\n },\n } as React.HTMLAttributes<HTMLElement>,\n }),\n [events],\n );\n}\n", "import { createContext, useContext } from \"react\";\nimport type { UseGlobalInteractionReturn } from \"./useGlobalInteraction\";\n\nexport interface UseGlobalInteractionContext extends UseGlobalInteractionReturn {}\n\nconst GlobalInteractionContext = createContext<UseGlobalInteractionContext | null>(null);\n\nexport const GlobalInteractionProvider = GlobalInteractionContext.Provider;\n\nexport function useGlobalInteractionContext<T extends boolean | undefined = true>({\n strict = true,\n}: { strict?: T } = {}): T extends false\n ? UseGlobalInteractionContext | null\n : UseGlobalInteractionContext {\n const context = useContext(GlobalInteractionContext);\n if (!context && strict) {\n throw new Error(\"useGlobalInteractionContext must be used within a GlobalInteractionProvider\");\n }\n\n return context as UseGlobalInteractionContext;\n}\n", "import { createContext, useContext } from \"react\";\nimport type { UseAppScreenReturn } from \"./useAppScreen\";\n\nexport interface UseAppScreenContext extends UseAppScreenReturn {}\n\nconst AppScreenContext = createContext<UseAppScreenContext | null>(null);\n\nexport const AppScreenProvider = AppScreenContext.Provider;\n\nexport function useAppScreenContext<T extends boolean | undefined = true>({\n strict = true,\n}: { strict?: T } = {}): T extends false ? UseAppScreenContext | null : UseAppScreenContext {\n const context = useContext(AppScreenContext);\n if (!context && strict) {\n throw new Error(\"useAppScreenContext must be used within a AppScreen\");\n }\n\n return context as UseAppScreenContext;\n}\n", "export {\n AppScreenDim as Dim,\n AppScreenEdge as Edge,\n AppScreenLayer as Layer,\n AppScreenRoot as Root,\n type AppScreenDimProps as DimProps,\n type AppScreenEdgeProps as EdgeProps,\n type AppScreenLayerProps as LayerProps,\n type AppScreenRootProps as RootProps,\n} from \"./AppScreen\";\n", "import { Primitive, type PrimitiveProps } from \"@seed-design/react-primitive\";\nimport { forwardRef } from \"react\";\nimport { useAppBar, type UseAppBarProps } from \"./useAppBar\";\nimport { AppBarProvider, useAppBarContext } from \"./useAppBarContext\";\nimport { mergeProps } from \"@seed-design/dom-utils\";\nimport { composeRefs } from \"@radix-ui/react-compose-refs\";\n\nexport interface AppBarRootProps\n extends PrimitiveProps,\n UseAppBarProps,\n React.HTMLAttributes<HTMLDivElement> {}\n\nexport const AppBarRoot = forwardRef<HTMLDivElement, AppBarRootProps>((props, ref) => {\n const { ...otherProps } = props;\n const api = useAppBar({});\n\n return (\n <AppBarProvider value={api}>\n <Primitive.div\n ref={composeRefs(api.refs.root, ref)}\n {...mergeProps(api.rootProps, otherProps)}\n />\n </AppBarProvider>\n );\n});\nAppBarRoot.displayName = \"AppBarRoot\";\n\nexport interface AppBarLeftProps extends PrimitiveProps, React.HTMLAttributes<HTMLDivElement> {}\n\nexport const AppBarLeft = forwardRef<HTMLDivElement, AppBarLeftProps>((props, ref) => {\n const { refs, stateProps } = useAppBarContext();\n\n return <Primitive.div ref={composeRefs(refs.left, ref)} {...mergeProps(stateProps, props)} />;\n});\nAppBarLeft.displayName = \"AppBarLeft\";\n\nexport interface AppBarRightProps extends PrimitiveProps, React.HTMLAttributes<HTMLDivElement> {}\n\nexport const AppBarRight = forwardRef<HTMLDivElement, AppBarRightProps>((props, ref) => {\n const { refs, stateProps } = useAppBarContext();\n\n return <Primitive.div ref={composeRefs(refs.right, ref)} {...mergeProps(stateProps, props)} />;\n});\nAppBarRight.displayName = \"AppBarRight\";\n\nexport interface AppBarMainProps extends PrimitiveProps, React.HTMLAttributes<HTMLDivElement> {}\n\nexport const AppBarMain = forwardRef<HTMLDivElement, AppBarMainProps>((props, ref) => {\n const { stateProps } = useAppBarContext();\n\n return <Primitive.div ref={ref} {...mergeProps(stateProps, props)} />;\n});\n", "import { elementProps } from \"@seed-design/dom-utils\";\nimport { useMemo, useState } from \"react\";\nimport { useAppScreenContext } from \"../AppScreen\";\nimport { useElementOffset } from \"../private/useElementOffset\";\n\n// biome-ignore lint/suspicious/noEmptyInterface: intentionally empty for future extension\nexport interface UseAppBarProps {}\n\nexport type UseAppBarReturn = ReturnType<typeof useAppBar>;\n\nexport function useAppBar(_props: UseAppBarProps) {\n const { stateProps } = useAppScreenContext();\n\n const [root, rootRef] = useState<HTMLElement | null>(null);\n const [left, leftRef] = useState<HTMLElement | null>(null);\n const [right, rightRef] = useState<HTMLElement | null>(null);\n\n const leftOffset = useElementOffset(left);\n const rightOffset = useElementOffset(right);\n const centeredTitlePaddingX = root\n ? `${Math.max(leftOffset?.fromLeft ?? 0, rightOffset?.fromRight ?? 0)}px`\n : \"initial\";\n\n return useMemo(\n () => ({\n refs: {\n root: rootRef,\n left: leftRef,\n right: rightRef,\n },\n stateProps,\n rootProps: elementProps({\n \"data-part\": \"appBar\",\n ...stateProps,\n style: {\n \"--centered-title-padding-x\": centeredTitlePaddingX,\n } as React.CSSProperties,\n }),\n }),\n [stateProps, centeredTitlePaddingX],\n );\n}\n", "import * as React from \"react\";\n\nconst useLayoutEffect = typeof window !== \"undefined\" ? React.useLayoutEffect : React.useEffect;\n\nexport function useElementOffset(element: HTMLElement | null) {\n const [offset, setOffset] = React.useState<{ fromLeft: number; fromRight: number } | undefined>(\n undefined,\n );\n\n useLayoutEffect(() => {\n if (!element) {\n setOffset(undefined);\n return;\n }\n\n if (element) {\n // provide as early as possible\n setOffset({\n fromLeft: element.offsetLeft + element.offsetWidth,\n fromRight: (element.offsetParent ?? document.body).clientWidth - element.offsetLeft,\n });\n\n const resizeObserver = new ResizeObserver(() => {\n const fromLeft = element.offsetLeft + element.offsetWidth;\n const fromRight = (element.offsetParent ?? document.body).clientWidth - element.offsetLeft;\n\n setOffset({ fromLeft, fromRight });\n });\n\n resizeObserver.observe(element);\n\n return () => resizeObserver.unobserve(element);\n }\n }, [element]);\n\n return offset;\n}\n", "import { createContext, useContext } from \"react\";\nimport type { UseAppBarReturn } from \"./useAppBar\";\n\nexport interface UseAppBarContext extends UseAppBarReturn {}\n\nconst AppBarContext = createContext<UseAppBarContext | null>(null);\n\nexport const AppBarProvider = AppBarContext.Provider;\n\nexport function useAppBarContext<T extends boolean | undefined = true>({\n strict = true,\n}: { strict?: T } = {}): T extends false ? UseAppBarContext | null : UseAppBarContext {\n const context = useContext(AppBarContext);\n if (!context && strict) {\n throw new Error(\"useAppBarContext must be used within a AppBar\");\n }\n\n return context as UseAppBarContext;\n}\n", "export {\n AppBarRoot as Root,\n AppBarMain as Main,\n AppBarLeft as Left,\n AppBarRight as Right,\n type AppBarRootProps as RootProps,\n type AppBarMainProps as MainProps,\n type AppBarLeftProps as LeftProps,\n type AppBarRightProps as RightProps,\n} from \"./AppBar\";\n", "import { composeRefs } from \"@radix-ui/react-compose-refs\";\nimport { mergeProps } from \"@seed-design/dom-utils\";\nimport { Primitive, type PrimitiveProps } from \"@seed-design/react-primitive\";\nimport { forwardRef } from \"react\";\nimport { useGlobalInteraction } from \"./useGlobalInteraction\";\nimport { GlobalInteractionProvider } from \"./useGlobalInteractionContext\";\n\nexport interface GlobalInteractionProps\n extends PrimitiveProps,\n React.HTMLAttributes<HTMLDivElement> {}\n\nexport const GlobalInteraction = forwardRef<HTMLDivElement, GlobalInteractionProps>(\n (props, ref) => {\n const api = useGlobalInteraction();\n return (\n <GlobalInteractionProvider value={api}>\n <Primitive.div\n ref={composeRefs(api.stackRef, ref)}\n {...mergeProps(api.stackProps, props)}\n />\n </GlobalInteractionProvider>\n );\n },\n);\nGlobalInteraction.displayName = \"GlobalInteraction\";\n", "import { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { useCallback, useMemo, useRef, useState } from \"react\";\nimport { useTopActivity } from \"../private/useTopActivity\";\n\nexport type SwipeBackState = \"idle\" | \"swiping\" | \"transitioning\";\n\nexport type UseGlobalInteractionReturn = ReturnType<typeof useGlobalInteraction>;\n\nexport interface SwipeBackContext {\n x0: number;\n t0: number;\n displacement: number;\n displacementRatio: number;\n velocity: number;\n}\n\nexport interface SwipeBackProps {\n /**\n * The threshold to determine whether the swipe back is intentional.\n * @default 0.4\n */\n swipeBackDisplacementRatioThreshold?: number;\n\n /**\n * The threshold to determine whether the swipe back is intentional.\n * @default 1\n */\n swipeBackVelocityThreshold?: number;\n\n onSwipeBackStart?: () => void;\n onSwipeBackMove?: (props: { displacement: number; displacementRatio: number }) => void;\n onSwipeBackEnd?: (props: { swiped: boolean }) => void;\n}\n\nexport interface StartSwipeBackProps {\n x0: number;\n t0: number;\n}\n\nexport interface MoveSwipeBackProps {\n x: number;\n t: number;\n}\n\n// biome-ignore lint/suspicious/noEmptyInterface: intentionally empty for future extension\nexport interface EndSwipeBackProps {}\n\nexport function useGlobalInteraction() {\n const [swipeBackState, setSwipeBackState] = useState<SwipeBackState>(\"idle\");\n\n const swipeBackContextRef = useRef<SwipeBackContext>({\n x0: 0,\n t0: 0,\n displacement: 0,\n displacementRatio: 0,\n velocity: 0,\n });\n const stackRef = useRef<HTMLDivElement>(null);\n\n const setSwipeBackContext = useCallback((ctx: SwipeBackContext) => {\n swipeBackContextRef.current = ctx;\n stackRef.current?.style.setProperty(\n \"--swipe-back-displacement\",\n `${ctx.displacement.toString()}px`,\n );\n stackRef.current?.style.setProperty(\n \"--swipe-back-displacement-ratio\",\n ctx.displacementRatio.toString(),\n );\n }, []);\n\n const getSwipeBackEvents = useCallback(\n (props: SwipeBackProps) => {\n const {\n swipeBackDisplacementRatioThreshold: displacementRatioThreshold = 0.4,\n swipeBackVelocityThreshold: velocityThreshold = 1,\n } = props;\n const onSwipeStart = useCallbackRef(props.onSwipeBackStart);\n const onSwipeMove = useCallbackRef(props.onSwipeBackMove);\n const onSwipeEnd = useCallbackRef(props.onSwipeBackEnd);\n\n const startSwipeBack = useCallback(\n ({ x0, t0 }: StartSwipeBackProps) => {\n setSwipeBackContext({\n x0,\n t0,\n displacement: 0,\n displacementRatio: 0,\n velocity: 0,\n });\n setSwipeBackState(\"swiping\");\n\n onSwipeStart?.();\n },\n [onSwipeStart],\n );\n\n const moveSwipeBack = useCallback(\n ({ x, t }: MoveSwipeBackProps) => {\n const displacement = x - swipeBackContextRef.current.x0;\n const displacementRatio = displacement / window.innerWidth;\n const velocity = displacement / (t - swipeBackContextRef.current.t0);\n setSwipeBackContext({\n ...swipeBackContextRef.current,\n displacement,\n displacementRatio,\n velocity,\n });\n setSwipeBackState(\"swiping\");\n\n onSwipeMove?.({ displacement, displacementRatio });\n },\n [onSwipeMove],\n );\n\n const endSwipeBack = useCallback(\n (_: EndSwipeBackProps) => {\n const swiped =\n swipeBackContextRef.current.displacementRatio > displacementRatioThreshold ||\n swipeBackContextRef.current.velocity > velocityThreshold;\n\n // we intentionally do not reset context here, so that the displacement can be used for exit animation\n setSwipeBackState(\"transitioning\");\n\n onSwipeEnd?.({ swiped });\n },\n [onSwipeEnd, displacementRatioThreshold, velocityThreshold],\n );\n\n const reset = useCallback(() => {\n setSwipeBackContext({\n x0: 0,\n t0: 0,\n displacement: 0,\n displacementRatio: 0,\n velocity: 0,\n });\n setSwipeBackState(\"idle\");\n }, []);\n\n return useMemo(\n () => ({\n startSwipeBack,\n moveSwipeBack,\n endSwipeBack,\n reset,\n }),\n [startSwipeBack, moveSwipeBack, endSwipeBack, reset],\n );\n },\n [setSwipeBackContext],\n );\n\n const topActivity = useTopActivity();\n\n const stackProps = useMemo(\n () => ({\n \"data-swipe-back-state\": swipeBackState,\n \"data-global-transition-state\": topActivity.transitionState,\n \"data-top-activity-type\": topActivity.activityType,\n }),\n [swipeBackState, topActivity.transitionState, topActivity.activityType],\n ) as React.HTMLAttributes<HTMLElement>;\n\n return useMemo(\n () => ({\n stackRef,\n swipeBackContextRef,\n swipeBackState,\n setSwipeBackState,\n setSwipeBackContext,\n getSwipeBackEvents,\n\n stackProps,\n }),\n [swipeBackState, setSwipeBackContext, getSwipeBackEvents, stackProps],\n );\n}\n", "import { useStack } from \"@stackflow/react\";\nimport { useEffect, useState } from \"react\";\n\nexport function useTopActivity() {\n const stack = useStack();\n if (!stack) {\n throw new Error(\n \"useStack is not available in the context. Make sure you are using @stackflow/react >= 1.4.1. (https://github.com/daangn/stackflow/blob/main/integrations/react/CHANGELOG.md#141)\",\n );\n }\n\n const topId = stack.activities.find((activity) => activity.isTop)?.id;\n const topActivity = stack.activities.find((activity) => activity.isTop);\n const transitionState = topActivity?.transitionState ?? \"enter-done\";\n\n // TODO: There should be a better way to handle this. We should not rely on the DOM element to get the activity type.\n const [topEl, setTopEl] = useState<HTMLElement | null>(null);\n const activityType = topEl?.dataset[\"activityType\"];\n\n useEffect(() => {\n if (!topId) return;\n\n const el = document.querySelector<HTMLElement>(`[data-activity-id=\"${topId}\"]`);\n setTopEl(el);\n }, [topId]);\n\n return {\n transitionState,\n activityType,\n };\n}\n", "import clsx from \"clsx\";\nimport { createContext, forwardRef, useContext } from \"react\";\n\ntype Recipe<\n Props extends Record<string, string | boolean | undefined>,\n Classnames extends Record<string, string>,\n> = ((props?: Props) => Classnames) & {\n splitVariantProps: <T extends Props>(props: T) => [Props, Omit<T, keyof Props>];\n};\n\nexport function createStyleContext<\n Props extends Record<string, string | boolean | undefined>,\n Classnames extends Record<string, string>,\n>(recipe: Recipe<Props, Classnames>) {\n const ClassNamesContext = createContext<Classnames | null>(null);\n const PropsContext = createContext<Props | null>(null);\n\n const ClassNamesProvider = ({\n children,\n value,\n }: { children: React.ReactNode; value: Classnames }) => {\n return <ClassNamesContext.Provider value={value}>{children}</ClassNamesContext.Provider>;\n };\n\n const PropsProvider = ({ children, value }: { children: React.ReactNode; value: Props }) => {\n return <PropsContext.Provider value={value}>{children}</PropsContext.Provider>;\n };\n\n function useClassNames() {\n const context = useContext(ClassNamesContext);\n if (context === null) {\n throw new Error(\n \"useClassNames must be used within a ClassNamesProvider. Did you forget to wrap your component in a ClassNamesProvider?\",\n );\n }\n\n return context;\n }\n\n function useProps() {\n return useContext(PropsContext);\n }\n\n const withRootProvider = <P,>(\n Component: React.ElementType<any>,\n options?: {\n defaultProps?: Partial<P>;\n },\n ): React.ForwardRefExoticComponent<React.PropsWithoutRef<P>> => {\n const { defaultProps } = options ?? {};\n\n const StyledComponent = (innerProps: any) => {\n const props = { ...(defaultProps ?? {}), ...useProps(), ...innerProps } as Props &\n React.HTMLAttributes<HTMLElement>;\n const [variantProps, otherProps] = recipe.splitVariantProps(props);\n const classNames = recipe(variantProps); // TODO: should we memoize this?\n\n return (\n <ClassNamesProvider value={classNames}>\n <Component {...otherProps} />\n </ClassNamesProvider>\n );\n };\n\n // @ts-ignore\n StyledComponent.displayName = Component.displayName || Component.name;\n\n return StyledComponent as any;\n };\n\n const withProvider = <T, P>(\n Component: React.ElementType<any>,\n slot: keyof Classnames,\n options?: {\n defaultProps?: Partial<P>;\n },\n ): React.ForwardRefExoticComponent<React.PropsWithoutRef<P> & React.RefAttributes<T>> => {\n const { defaultProps } = options ?? {};\n\n const StyledComponent = forwardRef<any, any>((innerProps, ref) => {\n const props = { ...(defaultProps ?? {}), ...useProps(), ...innerProps } as Props &\n React.HTMLAttributes<HTMLElement>;\n const [variantProps, otherProps] = recipe.splitVariantProps(props);\n const classNames = recipe(variantProps); // TODO: should we memoize this?\n const className = classNames[slot as keyof typeof classNames];\n\n return (\n <ClassNamesProvider value={classNames}>\n <Component ref={ref} {...otherProps} className={clsx(className, props.className)} />\n </ClassNamesProvider>\n );\n });\n\n // @ts-ignore\n StyledComponent.displayName = Component.displayName || Component.name;\n\n return StyledComponent as any;\n };\n\n const withContext = <T, P>(\n Component: React.ElementType<any>,\n slot?: keyof Classnames,\n ): React.ForwardRefExoticComponent<React.PropsWithoutRef<P> & React.RefAttributes<T>> => {\n const StyledComponent = forwardRef<any, React.HTMLAttributes<HTMLElement>>((props, ref) => {\n const classNames = useClassNames();\n const className = classNames?.[slot as keyof typeof classNames];\n\n return <Component ref={ref} {...props} className={clsx(className, props.className)} />;\n });\n\n // @ts-ignore\n StyledComponent.displayName = Component.displayName || Component.name;\n return StyledComponent as any;\n };\n\n return {\n ClassNamesProvider,\n PropsProvider,\n useClassNames,\n useProps,\n withRootProvider,\n withProvider,\n withContext,\n };\n}\n", "import { Slot } from \"@radix-ui/react-slot\";\nimport { mergeProps } from \"@seed-design/dom-utils\";\nimport { Primitive, type PrimitiveProps } from \"@seed-design/react-primitive\";\nimport { type AppBarVariantProps, appBar } from \"@seed-design/css/recipes/app-bar\";\nimport clsx from \"clsx\";\nimport { forwardRef } from \"react\";\nimport { AppBar as AppBarPrimitive } from \"../../primitive\";\nimport { useAppBarContext } from \"../../primitive/AppBar/useAppBarContext\";\nimport { createStyleContext } from \"../../utils/createStyleContext\";\nimport { appBarMain, type AppBarMainVariantProps } from \"@seed-design/css/recipes/app-bar-main\";\n\nconst { PropsProvider, ClassNamesProvider, useProps, withContext, useClassNames } =\n createStyleContext(appBar);\nconst {\n PropsProvider: MainPropsProvider,\n withProvider: withMainProvider,\n withContext: withMainContext,\n} = createStyleContext(appBarMain);\n\nexport const AppBarPropsProvider = PropsProvider;\n\nexport interface AppBarProps extends AppBarVariantProps, AppBarPrimitive.RootProps {}\n\nexport const AppBarRoot = forwardRef<HTMLDivElement, AppBarProps>((props, ref) => {\n const contextProps = useProps();\n const [variantProps, otherProps] = appBar.splitVariantProps({ ...contextProps, ...props });\n\n const classNames = appBar(variantProps);\n\n return (\n <ClassNamesProvider value={classNames}>\n <MainPropsProvider\n value={{\n theme: variantProps.theme,\n transitionStyle: variantProps.transitionStyle,\n tone: variantProps.tone,\n }}\n >\n <AppBarPrimitive.Root\n ref={ref}\n {...mergeProps({ className: classNames.root }, otherProps)}\n />\n </MainPropsProvider>\n </ClassNamesProvider>\n );\n});\nAppBarRoot.displayName = \"AppBarRoot\";\n\nexport interface AppBarLeftProps extends AppBarPrimitive.LeftProps {}\n\nexport const AppBarLeft = withContext<HTMLDivElement, AppBarLeftProps>(\n AppBarPrimitive.Left,\n \"left\",\n);\n\nexport interface AppBarRightProps extends AppBarPrimitive.RightProps {}\n\nexport const AppBarRight = withContext<HTMLDivElement, AppBarRightProps>(\n AppBarPrimitive.Right,\n \"right\",\n);\n\nexport interface AppBarMainProps extends AppBarMainVariantProps, AppBarPrimitive.MainProps {}\n\nexport const AppBarMain = withMainProvider<HTMLDivElement, AppBarMainProps>(\n AppBarPrimitive.Main,\n \"root\",\n);\n\nexport interface AppBarTitleProps extends PrimitiveProps, React.HTMLAttributes<HTMLSpanElement> {}\n\nexport const AppBarTitle = withMainContext<HTMLSpanElement, AppBarTitleProps>(\n Primitive.span,\n \"title\",\n);\n\nexport interface AppBarSubtitleProps\n extends PrimitiveProps,\n React.HTMLAttributes<HTMLSpanElement> {}\n\nexport const AppBarSubtitle = withMainContext<HTMLSpanElement, AppBarSubtitleProps>(\n Primitive.span,\n \"subtitle\",\n);\n\nexport interface AppBarIconButtonProps\n extends PrimitiveProps,\n React.ButtonHTMLAttributes<HTMLButtonElement> {}\n\nexport const AppBarIconButton = forwardRef<HTMLButtonElement, AppBarIconButtonProps>(\n ({ children, className, ...otherProps }, ref) => {\n const { stateProps } = useAppBarContext();\n const classNames = useClassNames();\n\n return (\n <Primitive.button\n ref={ref}\n type=\"button\"\n className={clsx(classNames.iconButton, className)}\n {...mergeProps(stateProps, otherProps)}\n >\n <Slot className={classNames.icon} {...stateProps}>\n {children}\n </Slot>\n </Primitive.button>\n );\n },\n);\nAppBarIconButton.displayName = \"IconButton\";\n", "import type { StackflowReactPlugin } from \"@stackflow/react\";\nimport { AppScreenPropsProvider } from \"./components/AppScreen/AppScreen\";\nimport { GlobalInteraction } from \"./primitive\";\n\nexport interface SeedPluginOptions {\n theme: \"android\" | \"cupertino\";\n}\n\nexport const seedPlugin =\n (options: SeedPluginOptions): StackflowReactPlugin =>\n () => ({\n key: \"seed-design\",\n wrapStack({ stack }) {\n return (\n <AppScreenPropsProvider value={options}>\n <GlobalInteraction>{stack.render()}</GlobalInteraction>\n </AppScreenPropsProvider>\n );\n },\n });\n", "export {\n AppBarIconButton as IconButton,\n AppBarLeft as Left,\n AppBarMain as Main,\n AppBarRight as Right,\n AppBarRoot as Root,\n AppBarSubtitle as Subtitle,\n AppBarTitle as Title,\n} from \"./AppBar\";\n\nexport type {\n AppBarIconButtonProps as IconButtonProps,\n AppBarLeftProps as LeftProps,\n AppBarMainProps as MainProps,\n AppBarRightProps as RightProps,\n AppBarProps as RootProps,\n AppBarSubtitleProps as SubtitleProps,\n AppBarTitleProps as TitleProps,\n} from \"./AppBar\";\n", "export {\n AppScreenDim as Dim,\n AppScreenEdge as Edge,\n AppScreenLayer as Layer,\n AppScreenRoot as Root,\n} from \"./AppScreen\";\n\nexport type {\n AppScreenDimProps as DimProps,\n AppScreenEdgeProps as EdgeProps,\n AppScreenLayerProps as LayerProps,\n AppScreenRootProps as RootProps,\n} from \"./AppScreen\";\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,gBAAAA;AAAA,EAAA;AAAA,oBAAAC;AAAA,EAAA,kBAAAC;AAAA,EAAA,mBAAAC;AAAA,EAAA,kBAAAC;AAAA,EAAA;AAAA;AAAA,mBAAAC;AAAA,EAAA,oBAAAC;AAAA,EAAA,qBAAAC;AAAA,EAAA,sBAAAC;AAAA,EAAA,qBAAAC;AAAA,EAAA;AAAA;AAAA;AAAA;;;ACAA,wBAAsD;AACtD,IAAAC,iBAAoC;;;ACDpC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAC,oBAA2B;AAC3B,6BAA+C;AAC/C,IAAAC,gBAA2B;;;ACF3B,uBAAuC;AACvC,2BAAmD;AACnD,IAAAC,gBAAw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AAC;AACDI,eAAc,cAAc;AAIrB,IAAMC,gBAAeH;AAAA,EAC1B,4BAAmB;AAAA,EACnB;AACF;AAIO,IAAMI,iBAAgBJ;AAAA,EAC3B,4BAAmB;AAAA,EACnB;AACF;AAIO,IAAMK,kBAAiBL;AAAA,EAC5B,4BAAmB;AAAA,EACnB;AACF;;;AkBjDU,IAAAM,sBAAA;AAPH,IAAM,aACX,CAAC,YACD,OAAO;AAAA,EACL,KAAK;AAAA,EACL,UAAU,EAAE,MAAM,GAAG;AACnB,WACE,6CAAC,0BAAuB,OAAO,SAC7B,uDAAC,qBAAmB,gBAAM,OAAO,GAAE,GACrC;AAAA,EAEJ;AACF;;;ACnBF,IAAAC,4BAAA;AAAA,SAAAA,2BAAA;AAAA;AAAA,cAAAC;AAAA,EAAA,YAAAC;AAAA,EAAA,aAAAC;AAAA,EAAA,YAAAC;AAAA,EAAA;AAAA;AAAA;;;ACAA,IAAAC,+BAAA;AAAA,SAAAA,8BAAA;AAAA,aAAAC;AAAA,EAAA,YAAAC;AAAA,EAAA,aAAAC;AAAA,EAAA,YAAAC;AAAA;",
6
- "names": ["AppBar_namespace_exports", "AppBarLeft", "AppBarMain", "AppBarRight", "AppBarRoot", "AppScreen_namespace_exports", "AppScreenDim", "AppScreenEdge", "AppScreenLayer", "AppScreenRoot", "import_react", "import_dom_utils", "import_react", "import_react", "import_react", "import_react", "import_react_primitive", "import_react", "import_dom_utils", "import_react", "useLayoutEffect", "_a", "import_react", "import_dom_utils", "import_jsx_runtime", "import_react_compose_refs", "import_dom_utils", "import_react_primitive", "import_react", "import_react", "import_react", "import_jsx_runtime", "import_react", "import_jsx_runtime", "ClassNamesProvider", "PropsProvider", "useClassNames", "useProps", "clsx", "withContext", "import_dom_utils", "import_react_primitive", "import_clsx", "import_react", "import_jsx_runtime", "AppBarRoot", "AppBarLeft", "AppBarRight", "AppBarMain", "clsx", "import_dom_utils", "import_jsx_runtime", "ClassNamesProvider", "PropsProvider", "withContext", "useProps", "AppScreenRoot", "AppScreenDim", "AppScreenEdge", "AppScreenLayer", "import_jsx_runtime", "AppBar_namespace_exports", "AppBarLeft", "AppBarMain", "AppBarRight", "AppBarRoot", "AppScreen_namespace_exports", "AppScreenDim", "AppScreenEdge", "AppScreenLayer", "AppScreenRoot"]
7
- }