@stackflow/react
Advanced tools
Comparing version 1.2.0-canary.2 to 1.2.0-canary.3
{ | ||
"name": "@stackflow/react", | ||
"version": "1.2.0-canary.2", | ||
"version": "1.2.0-canary.3", | ||
"repository": { | ||
@@ -12,17 +12,20 @@ "type": "git", | ||
".": { | ||
"types": "./dist/index.d.ts", | ||
"import": "./dist/index.js" | ||
"types": "./dist/esm/index.d.ts", | ||
"require": "./dist/cjs/index.js", | ||
"import": "./dist/esm/index.mjs" | ||
}, | ||
"./stable": { | ||
"types": "./dist/stable/index.d.ts", | ||
"import": "./dist/stable/index.js" | ||
"types": "./dist/esm/stable/index.d.ts", | ||
"require": "./dist/cjs/stable/index.js", | ||
"import": "./dist/esm/stable/index.mjs" | ||
}, | ||
"./future": { | ||
"types": "./dist/future/index.d.ts", | ||
"import": "./dist/future/index.js" | ||
"types": "./dist/esm/future/index.d.ts", | ||
"require": "./dist/cjs/future/index.js", | ||
"import": "./dist/esm/future/index.mjs" | ||
} | ||
}, | ||
"main": "./dist/index.js", | ||
"module": "./dist/index.js", | ||
"types": "./dist/index.d.ts", | ||
"main": "./dist/cjs/index.js", | ||
"module": "./dist/esm/index.mjs", | ||
"types": "./dist/esm/index.d.ts", | ||
"files": [ | ||
@@ -35,3 +38,3 @@ "dist", | ||
"build": "yarn build:js && yarn build:dts", | ||
"build:dts": "tsc --emitDeclarationOnly", | ||
"build:dts": "tsc --emitDeclarationOnly --outDir dist/esm && tsc --emitDeclarationOnly --outDir dist/cjs", | ||
"build:js": "node ./esbuild.config.js", | ||
@@ -53,2 +56,3 @@ "clean": "rimraf dist", | ||
"esbuild": "^0.23.0", | ||
"esbuild-plugin-file-path-extensions": "^2.1.2", | ||
"react": "^18.3.1", | ||
@@ -55,0 +59,0 @@ "rimraf": "^3.0.2", |
@@ -1,11 +0,23 @@ | ||
export * from "../__internal__/activity/useActivity"; | ||
export * from "../__internal__/stack/useStack"; | ||
/** | ||
* Stack | ||
*/ | ||
export * from "./stack"; | ||
/** | ||
* Types | ||
*/ | ||
export * from "../__internal__/StackflowReactPlugin"; | ||
export * from "./ActivityComponentType"; | ||
export * from "./stack"; | ||
export * from "./makeActions"; | ||
export * from "./makeStepActions"; | ||
export * from "./StackComponentType"; | ||
export * from "./Actions"; | ||
export * from "./StepActions"; | ||
/** | ||
* Hooks | ||
*/ | ||
export * from "../__internal__/stack/useStack"; | ||
export * from "../__internal__/activity/useActivity"; | ||
export * from "./useActivityParams"; | ||
export * from "./loader/useLoaderData"; | ||
export * from "./useActivityParams"; | ||
export * from "./useFlow"; | ||
export * from "./useStepFlow"; |
@@ -1,7 +0,4 @@ | ||
import type { | ||
InferActivityParams, | ||
RegisteredActivityParamTypes, | ||
} from "@stackflow/config"; | ||
import type { CoreStore } from "@stackflow/core"; | ||
import { makeActivityId } from "../__internal__/activity"; | ||
import type { Actions } from "./Actions"; | ||
@@ -22,27 +19,2 @@ function parseActionOptions(options?: { animate?: boolean }) { | ||
export type Actions = { | ||
push<K extends Extract<keyof RegisteredActivityParamTypes, string>>( | ||
activityName: K, | ||
activityParams: InferActivityParams<K>, | ||
options?: { | ||
animate?: boolean; | ||
}, | ||
): { | ||
activityId: string; | ||
}; | ||
replace<K extends Extract<keyof RegisteredActivityParamTypes, string>>( | ||
activityName: K, | ||
activityParams: InferActivityParams<K>, | ||
options?: { | ||
animate?: boolean; | ||
activityId?: string; | ||
}, | ||
): { | ||
activityId: string; | ||
}; | ||
pop(): void; | ||
pop(options: { animate?: boolean }): void; | ||
pop(count: number, options?: { animate?: boolean }): void; | ||
}; | ||
export function makeActions( | ||
@@ -49,0 +21,0 @@ getCoreActions: () => CoreStore["actions"] | undefined, |
import type { ActivityBaseParams } from "@stackflow/config"; | ||
import type { CoreStore } from "@stackflow/core"; | ||
import { makeStepId } from "../__internal__/activity"; | ||
import type { StepActions } from "./StepActions"; | ||
export type StepActions<ActivityParams> = { | ||
pushStep: (params: ActivityParams, options?: {}) => void; | ||
replaceStep: (params: ActivityParams, options?: {}) => void; | ||
popStep: (options?: {}) => void; | ||
}; | ||
export function makeStepActions( | ||
@@ -12,0 +7,0 @@ getCoreActions: () => CoreStore["actions"] | undefined, |
import { useCoreActions } from "../__internal__/core"; | ||
import { type Actions, makeActions } from "./makeActions"; | ||
import type { Actions } from "./Actions"; | ||
import { makeActions } from "./makeActions"; | ||
@@ -4,0 +5,0 @@ export type FlowOutput = { |
@@ -6,3 +6,4 @@ import type { | ||
import { useCoreActions } from "../__internal__/core"; | ||
import { type StepActions, makeStepActions } from "./makeStepActions"; | ||
import type { StepActions } from "./StepActions"; | ||
import { makeStepActions } from "./makeStepActions"; | ||
@@ -9,0 +10,0 @@ export function useStepFlow< |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
249032
380
5491
9
1