@okam/next-component 1.3.5 → 1.3.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## 1.3.7 (2026-01-23)
2
+
3
+ ### 🧱 Updated Dependencies
4
+
5
+ - Updated stack-ui to 1.44.6
6
+ - Updated core-lib to 1.17.4
7
+
1
8
  ## 1.3.5 (2026-01-21)
2
9
 
3
10
  ### 🧱 Updated Dependencies
@@ -1,7 +1,7 @@
1
+ import { Ref } from 'react';
1
2
  import { TLinkProps } from './interface';
2
- import type * as React from 'react';
3
3
  declare function Link({ ref, ...props }: TLinkProps & {
4
- ref?: React.Ref<HTMLElement>;
4
+ ref?: Ref<HTMLElement>;
5
5
  }): import("react/jsx-runtime").JSX.Element;
6
6
  declare namespace Link {
7
7
  var displayName: string;
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
4
  const nuqs = require("nuqs");
5
5
  const radashi = require("radashi");
6
- const React = require("react");
6
+ const react = require("react");
7
7
  const reactStately = require("react-stately");
8
8
  const reactUse = require("react-use");
9
9
  function useFilterState(props) {
@@ -19,7 +19,7 @@ function useFilterState(props) {
19
19
  ...rest
20
20
  } = props;
21
21
  const defaultValue = Array.from(defaultSelectedKeysProp).map((key) => key.toString());
22
- const queryStateOptions = React.useMemo(
22
+ const queryStateOptions = react.useMemo(
23
23
  () => parser.withOptions(options ?? {}).withDefault(defaultValue),
24
24
  [parser, options, defaultValue]
25
25
  );
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  "use strict";
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
- const React = require("react");
4
+ const react = require("react");
5
5
  const reactUse = require("react-use");
6
6
  function getHash() {
7
7
  if (typeof window === "undefined")
@@ -10,7 +10,7 @@ function getHash() {
10
10
  }
11
11
  function useHash() {
12
12
  const defaultHash = getHash();
13
- const [hash, setHash] = React.useState(defaultHash);
13
+ const [hash, setHash] = react.useState(defaultHash);
14
14
  const handleHashChangeEvent = ({ newURL }) => {
15
15
  if (!URL.canParse(newURL))
16
16
  return;
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
4
  const navigation = require("next/navigation");
5
- const React = require("react");
5
+ const react = require("react");
6
6
  const reactAria = require("react-aria");
7
7
  const index = require("../useHash/index.js");
8
8
  function scrollToTop(behavior) {
@@ -56,7 +56,7 @@ function useLink(props) {
56
56
  const hash = index.useHash();
57
57
  const isNextScroll = typeof scroll === "boolean";
58
58
  const nextScroll = isNextScroll ? scroll : false;
59
- const handleScroll = React.useCallback(() => {
59
+ const handleScroll = react.useCallback(() => {
60
60
  if (isNextScroll)
61
61
  return;
62
62
  scrollToTop(behavior);
@@ -69,13 +69,13 @@ function useLink(props) {
69
69
  onTouchStart?.(event);
70
70
  handleScroll();
71
71
  };
72
- React.useEffect(() => {
72
+ react.useEffect(() => {
73
73
  onPathnameChange?.(pathname);
74
74
  }, [onPathnameChange, pathname]);
75
- React.useEffect(() => {
75
+ react.useEffect(() => {
76
76
  onSearchParamsChange?.(searchParams);
77
77
  }, [onSearchParamsChange, searchParams]);
78
- React.useEffect(() => {
78
+ react.useEffect(() => {
79
79
  onHashChange?.(hash);
80
80
  }, [onHashChange, hash]);
81
81
  return {
package/index.js CHANGED
@@ -1,22 +1,22 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const index = require("./components/Filter/index.js");
4
- const index$1 = require("./components/Img/index.js");
5
- const index$2 = require("./components/Link/index.js");
6
- const index$3 = require("./hooks/useFilterState/index.js");
7
- const index$4 = require("./hooks/useHash/index.js");
8
- const index$5 = require("./hooks/useLink/index.js");
9
- const index$6 = require("./providers/AdminBar/index.js");
10
- const index$7 = require("./providers/DraftMode/index.js");
11
- const index$8 = require("./theme/index.js");
12
- exports.Filter = index;
13
- exports.Img = index$1;
14
- exports.Link = index$2;
15
- exports.useFilterState = index$3.useFilterState;
16
- exports.useHash = index$4.useHash;
17
- exports.useLink = index$5.useLink;
18
- exports.AdminBarContextProvider = index$6.AdminBarContextProvider;
19
- exports.useAdminBar = index$6.useAdminBar;
20
- exports.DraftModeContextProvider = index$7.DraftModeContextProvider;
21
- exports.useDraftMode = index$7.useDraftMode;
22
- exports.ThemeProvider = index$8;
3
+ const index$2 = require("./components/Filter/index.js");
4
+ const index$3 = require("./components/Img/index.js");
5
+ const index$4 = require("./components/Link/index.js");
6
+ const index$6 = require("./hooks/useFilterState/index.js");
7
+ const index$7 = require("./hooks/useHash/index.js");
8
+ const index$8 = require("./hooks/useLink/index.js");
9
+ const index = require("./providers/AdminBar/index.js");
10
+ const index$1 = require("./providers/DraftMode/index.js");
11
+ const index$5 = require("./theme/index.js");
12
+ exports.Filter = index$2;
13
+ exports.Img = index$3;
14
+ exports.Link = index$4;
15
+ exports.useFilterState = index$6.useFilterState;
16
+ exports.useHash = index$7.useHash;
17
+ exports.useLink = index$8.useLink;
18
+ exports.AdminBarContextProvider = index.AdminBarContextProvider;
19
+ exports.useAdminBar = index.useAdminBar;
20
+ exports.DraftModeContextProvider = index$1.DraftModeContextProvider;
21
+ exports.useDraftMode = index$1.useDraftMode;
22
+ exports.ThemeProvider = index$5;
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const React = require("react");
3
+ const react = require("react");
4
4
  function createServerContext(defaultValue) {
5
- const getRef = React.cache(() => ({ current: defaultValue }));
5
+ const getRef = react.cache(() => ({ current: defaultValue }));
6
6
  const getValue = () => getRef().current;
7
7
  const setValue = (value) => {
8
8
  getRef().current = value;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@okam/next-component",
3
- "version": "1.3.5",
3
+ "version": "1.3.7",
4
4
  "repository": {
5
5
  "url": "https://github.com/OKAMca/stack.git"
6
6
  },
@@ -42,8 +42,8 @@
42
42
  "react-stately": "^3.43.0"
43
43
  },
44
44
  "dependencies": {
45
- "@okam/core-lib": "1.17.2",
46
- "@okam/stack-ui": "1.44.4",
45
+ "@okam/core-lib": "1.17.4",
46
+ "@okam/stack-ui": "1.44.6",
47
47
  "next": "^15.1.0 || ^16.0.0",
48
48
  "nuqs": "^2.4.3",
49
49
  "radashi": "^12.3.0",
@@ -3,14 +3,14 @@
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
4
  const jsxRuntime = require("react/jsx-runtime");
5
5
  const coreLib = require("@okam/core-lib");
6
- const React = require("react");
6
+ const react = require("react");
7
7
  const adminBarCtx = coreLib.createCtx();
8
8
  const useAdminBar = adminBarCtx[0];
9
9
  const AdminBarProvider = adminBarCtx[1];
10
10
  function AdminBarContextProvider(props) {
11
11
  const { children } = props;
12
- const [error, setError] = React.useState();
13
- const value = React.useMemo(() => ({ error, setError }), [error]);
12
+ const [error, setError] = react.useState();
13
+ const value = react.useMemo(() => ({ error, setError }), [error]);
14
14
  return /* @__PURE__ */ jsxRuntime.jsx(AdminBarProvider, { value, children });
15
15
  }
16
16
  exports.AdminBarContextProvider = AdminBarContextProvider;
@@ -3,13 +3,13 @@
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
4
  const jsxRuntime = require("react/jsx-runtime");
5
5
  const coreLib = require("@okam/core-lib");
6
- const React = require("react");
6
+ const react = require("react");
7
7
  const draftModeCtx = coreLib.createCtx();
8
8
  const useDraftMode = draftModeCtx[0];
9
9
  const DraftModeProvider = draftModeCtx[1];
10
10
  function DraftModeContextProvider(props) {
11
11
  const { children, isEnabled } = props;
12
- const value = React.useMemo(() => ({ isEnabled }), [isEnabled]);
12
+ const value = react.useMemo(() => ({ isEnabled }), [isEnabled]);
13
13
  return /* @__PURE__ */ jsxRuntime.jsx(DraftModeProvider, { value, children });
14
14
  }
15
15
  exports.DraftModeContextProvider = DraftModeContextProvider;
package/theme/index.d.ts CHANGED
@@ -1,5 +1,4 @@
1
- import * as React from 'react';
2
- declare const _default: React.MemoExoticComponent<({ children }: {
3
- children: React.ReactNode;
1
+ declare const _default: import('react').MemoExoticComponent<({ children }: {
2
+ children: import('react').ReactNode;
4
3
  }) => import("react/jsx-runtime").JSX.Element>;
5
4
  export default _default;
package/theme/index.js CHANGED
@@ -1,33 +1,16 @@
1
1
  "use client";
2
2
  "use strict";
3
3
  const stackUi = require("@okam/stack-ui");
4
- const React = require("react");
4
+ const react = require("react");
5
5
  const index$1 = require("./AdminBar/index.js");
6
6
  const index$3 = require("./Button/index.js");
7
7
  const index$4 = require("./Filter/index.js");
8
8
  const index$2 = require("./Typography/index.js");
9
- function _interopNamespaceDefault(e) {
10
- const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
11
- if (e) {
12
- for (const k in e) {
13
- if (k !== "default") {
14
- const d = Object.getOwnPropertyDescriptor(e, k);
15
- Object.defineProperty(n, k, d.get ? d : {
16
- enumerable: true,
17
- get: () => e[k]
18
- });
19
- }
20
- }
21
- }
22
- n.default = e;
23
- return Object.freeze(n);
24
- }
25
- const React__namespace = /* @__PURE__ */ _interopNamespaceDefault(React);
26
9
  const BaseTheme = stackUi.makeTheme({
27
10
  filter: index$4,
28
11
  button: index$3,
29
12
  typography: index$2,
30
13
  adminBar: index$1.adminBarTheme
31
14
  });
32
- const index = React__namespace.memo(stackUi.createThemeProvider(BaseTheme));
15
+ const index = react.memo(stackUi.createThemeProvider(BaseTheme));
33
16
  module.exports = index;
package/theme/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import { createThemeProvider, makeTheme } from "@okam/stack-ui";
3
- import * as React from "react";
3
+ import { memo } from "react";
4
4
  import { adminBarTheme } from "./AdminBar/index.mjs";
5
5
  import button from "./Button/index.mjs";
6
6
  import filterTheme from "./Filter/index.mjs";
@@ -11,7 +11,7 @@ const BaseTheme = makeTheme({
11
11
  typography,
12
12
  adminBar: adminBarTheme
13
13
  });
14
- const index = React.memo(createThemeProvider(BaseTheme));
14
+ const index = memo(createThemeProvider(BaseTheme));
15
15
  export {
16
16
  index as default
17
17
  };