Comparing version 1.0.0-alpha.19 to 1.0.0-alpha.20
@@ -10,2 +10,3 @@ "use client"; | ||
export function SelectionProvider({ children, ...rest }) { | ||
throw new Error("<SelectionProvider/> moved from 'codehike/utils' to 'codehike/utils/selection'"); | ||
const [selectedIndex, selectIndex] = React.useState(0); | ||
@@ -18,2 +19,3 @@ return (_jsx("div", { "data-selected-index": selectedIndex, ...rest, children: _jsx(Scroller, { onIndexChange: selectIndex, children: _jsx(StepsContext.Provider, { value: { | ||
export function Selectable({ index, selectOn = ["click"], ...rest }) { | ||
throw new Error("<Selectable/> moved from 'codehike/utils' to 'codehike/utils/selection'"); | ||
const { selectedIndex, selectIndex } = React.useContext(StepsContext); | ||
@@ -38,2 +40,3 @@ const eventHandlers = React.useMemo(() => { | ||
export function Selection({ from }) { | ||
throw new Error("<Selection/> moved from 'codehike/utils' to 'codehike/utils/selection'"); | ||
const { selectedIndex } = React.useContext(StepsContext); | ||
@@ -40,0 +43,0 @@ return from[selectedIndex]; |
{ | ||
"name": "codehike", | ||
"version": "1.0.0-alpha.19", | ||
"version": "1.0.0-alpha.20", | ||
"type": "module", | ||
@@ -18,3 +18,5 @@ "sideEffects": false, | ||
"./utils": "./dist/utils.js", | ||
"./utils/token-transitions": "./dist/utils/token-transitions.js" | ||
"./utils/token-transitions": "./dist/utils/token-transitions.js", | ||
"./utils/static-fallback": "./dist/utils/static-fallback.js", | ||
"./utils/selection": "./dist/utils/selection.js" | ||
}, | ||
@@ -21,0 +23,0 @@ "files": [ |
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
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
259181
181
6057
2