@koine/next 1.1.0 → 1.1.2

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/Favicon.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { FaviconTagsProps } from "@koine/react";
1
+ import { type FaviconTagsProps } from "@koine/react/FaviconTags";
2
2
  export type FaviconProps = FaviconTagsProps;
3
3
  export declare const Favicon: (props: FaviconTagsProps) => JSX.Element;
4
4
  export default Favicon;
package/Favicon.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { __assign } from "tslib";
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import Head from "next/head";
4
- import { FaviconTags } from "@koine/react";
4
+ import FaviconTags from "@koine/react/FaviconTags";
5
5
  export var Favicon = function (props) { return (_jsx(Head, { children: _jsx(FaviconTags, __assign({}, props)) })); };
6
6
  export default Favicon;
package/NextProgress.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { type Simplify } from "@koine/utils";
2
- import { type WithComponents } from "@koine/react";
1
+ import type { Simplify } from "@koine/utils";
2
+ import type { WithComponents } from "@koine/react/helpers";
3
3
  type OwnProps = {
4
4
  /** @default 0.3 */
5
5
  startAt?: number;
@@ -1,6 +1,6 @@
1
1
  import { __assign } from "tslib";
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
- // import { ThemeVanillaProvider, ThemeVanillaValue } from "@koine/react";
3
+ // import { ThemeVanillaProvider, ThemeVanillaValue } from "@koine/react/styles";
4
4
  import { ThemeProvider } from "../../ThemeProvider";
5
5
  /**
6
6
  * App theme with vanilla class based theme (good for `tailwindcss`)
package/app/em/AppMain.js CHANGED
@@ -3,7 +3,7 @@ import { createElement as _createElement } from "react";
3
3
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
4
4
  import { useRouter } from "next/router";
5
5
  import { AnimatePresence, m } from "framer-motion";
6
- import { MotionProvider } from "@koine/react/m";
6
+ import MotionProvider from "@koine/react/m/MotionProvider";
7
7
  import { SeoDefaults } from "../../SeoDefaults";
8
8
  import { NextProgress } from "../../NextProgress";
9
9
  /**
package/config/index.js CHANGED
@@ -213,7 +213,11 @@ export function withKoine(_a) {
213
213
  ignoreDuringBuilds: true, // we have this strict check on each commit
214
214
  }, typescript: {
215
215
  ignoreBuildErrors: true, // we have this strict check on each commit
216
- }, poweredByHeader: false, swcMinify: true, modularizeImports: __assign({ "@koine/api": { transform: "@koine/api/{{member}}" }, "@koine/browser": { transform: "@koine/browser/{{member}}" }, "@koine/dom": { transform: "@koine/dom/{{member}}" }, "@koine/next/?(((\\w*)?/?)*)": { transform: "@koine/next/{{ matches.[1] }}/{{member}}" }, "@koine/react/?(((\\w*)?/?)*)": { transform: "@koine/react/{{ matches.[1] }}/{{member}}" }, "@koine/utils": { transform: "@koine/utils/{{member}}" } }, (custom["modularizeImports"] || {})), experimental: __assign({
216
+ }, poweredByHeader: false, swcMinify: true, modularizeImports: __assign({ "@koine/api": { transform: "@koine/api/{{member}}" }, "@koine/browser": { transform: "@koine/browser/{{member}}" }, "@koine/dom": { transform: "@koine/dom/{{member}}" }, "@koine/next/?(((\\w*)?/?)*)": {
217
+ transform: "@koine/next/{{ matches.[1] }}/{{member}}",
218
+ }, "@koine/react/?(((\\w*)?/?)*)": {
219
+ transform: "@koine/react/{{ matches.[1] }}/{{member}}",
220
+ }, "@koine/utils": { transform: "@koine/utils/{{member}}" } }, (custom["modularizeImports"] || {})), experimental: __assign({
217
221
  // @see https://github.com/vercel/vercel/discussions/5973#discussioncomment-472618
218
222
  // @see critters error https://github.com/vercel/next.js/issues/20742
219
223
  // optimizeCss: true,
@@ -1,7 +1,8 @@
1
1
  import { __assign, __extends } from "tslib";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import NextDocument, { Html, Head, Main, NextScript } from "next/document";
4
- import { Meta, NoJs } from "@koine/react";
4
+ import Meta from "@koine/react/Meta";
5
+ import NoJs from "@koine/react/NoJs";
5
6
  /**
6
7
  * Next Document wrapper for bare projects
7
8
  *
@@ -1,7 +1,8 @@
1
1
  import { __assign, __awaiter, __extends, __generator } from "tslib";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import NextDocument, { Html, Head, Main, NextScript, } from "next/document";
4
- import { Meta, NoJs } from "@koine/react";
4
+ import Meta from "@koine/react/Meta";
5
+ import NoJs from "@koine/react/NoJs";
5
6
  import { getInitialThemeFromRequest } from "@koine/react/sc"; // FIXME: this should be imported from another entrypoint
6
7
  /**
7
8
  * Next Document wrapper for `css/tailwind` based projects
@@ -1,7 +1,8 @@
1
1
  import { __assign, __awaiter, __extends, __generator } from "tslib";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import NextDocument, { Html, Head, Main, NextScript } from "next/document";
4
- import { Meta, NoJs } from "@koine/react";
4
+ import Meta from "@koine/react/Meta";
5
+ import NoJs from "@koine/react/NoJs";
5
6
  import createEmotionServer from "@emotion/server/create-instance";
6
7
  import { createEmotionCache } from "../../createEmotionCache";
7
8
  /**
@@ -3,8 +3,9 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import React from "react";
4
4
  /* ? eslint-disable @next/next/no-document-import-in-page */
5
5
  import NextDocument, { Html, Head, Main, NextScript, } from "next/document";
6
- import { Meta, NoJs } from "@koine/react";
7
6
  import { ServerStyleSheet } from "styled-components";
7
+ import Meta from "@koine/react/Meta";
8
+ import NoJs from "@koine/react/NoJs";
8
9
  /**
9
10
  * Next Document wrapper for `styled-components` based projects
10
11
  *
package/index.d.ts CHANGED
@@ -7,8 +7,6 @@ export * from "./getT";
7
7
  export * from "./Head";
8
8
  export * from "./Link";
9
9
  export * from "./load";
10
- export * from "./NextImg";
11
- export * from "./NextImgSmart";
12
10
  export * from "./NextProgress";
13
11
  export * from "./revalidate";
14
12
  export * from "./Seo";
package/index.js CHANGED
@@ -8,8 +8,6 @@ export * from "./getT";
8
8
  export * from "./Head";
9
9
  export * from "./Link";
10
10
  export * from "./load";
11
- export * from "./NextImg";
12
- export * from "./NextImgSmart";
13
11
  export * from "./NextProgress";
14
12
  export * from "./revalidate";
15
13
  export * from "./Seo";
package/node/Favicon.js CHANGED
@@ -4,7 +4,7 @@ exports.Favicon = void 0;
4
4
  var tslib_1 = require("tslib");
5
5
  var jsx_runtime_1 = require("react/jsx-runtime");
6
6
  var head_1 = tslib_1.__importDefault(require("next/head"));
7
- var react_1 = require("@koine/react");
8
- var Favicon = function (props) { return ((0, jsx_runtime_1.jsx)(head_1.default, { children: (0, jsx_runtime_1.jsx)(react_1.FaviconTags, tslib_1.__assign({}, props)) })); };
7
+ var FaviconTags_1 = tslib_1.__importDefault(require("@koine/react/FaviconTags"));
8
+ var Favicon = function (props) { return ((0, jsx_runtime_1.jsx)(head_1.default, { children: (0, jsx_runtime_1.jsx)(FaviconTags_1.default, tslib_1.__assign({}, props)) })); };
9
9
  exports.Favicon = Favicon;
10
10
  exports.default = exports.Favicon;
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.AppTheme = void 0;
4
4
  var tslib_1 = require("tslib");
5
5
  var jsx_runtime_1 = require("react/jsx-runtime");
6
- // import { ThemeVanillaProvider, ThemeVanillaValue } from "@koine/react";
6
+ // import { ThemeVanillaProvider, ThemeVanillaValue } from "@koine/react/styles";
7
7
  var ThemeProvider_1 = require("../../ThemeProvider");
8
8
  /**
9
9
  * App theme with vanilla class based theme (good for `tailwindcss`)
@@ -6,7 +6,7 @@ var react_1 = require("react");
6
6
  var jsx_runtime_1 = require("react/jsx-runtime");
7
7
  var router_1 = require("next/router");
8
8
  var framer_motion_1 = require("framer-motion");
9
- var m_1 = require("@koine/react/m");
9
+ var MotionProvider_1 = tslib_1.__importDefault(require("@koine/react/m/MotionProvider"));
10
10
  var SeoDefaults_1 = require("../../SeoDefaults");
11
11
  var NextProgress_1 = require("../../NextProgress");
12
12
  /**
@@ -23,7 +23,7 @@ var AppMain = function (_a) {
23
23
  exit: { opacity: 0 },
24
24
  } : _b, pre = _a.pre, post = _a.post;
25
25
  var pathname = (0, router_1.useRouter)().pathname;
26
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(SeoDefaults_1.SeoDefaults, tslib_1.__assign({}, seo)), pre, (0, jsx_runtime_1.jsxs)(m_1.MotionProvider, tslib_1.__assign({ features: motion }, { children: [ProgressOverlay && (0, jsx_runtime_1.jsx)(NextProgress_1.NextProgress, { Overlay: ProgressOverlay }), (0, jsx_runtime_1.jsx)(Layout, { children: (0, jsx_runtime_1.jsx)(framer_motion_1.AnimatePresence, tslib_1.__assign({ exitBeforeEnter: true, initial: false }, { children: (0, jsx_runtime_1.jsx)(framer_motion_1.m.div, tslib_1.__assign({}, transition, { children: (0, react_1.createElement)(Component, tslib_1.__assign({}, pageProps, { key: pathname })) }), pathname) })) })] })), post] }));
26
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(SeoDefaults_1.SeoDefaults, tslib_1.__assign({}, seo)), pre, (0, jsx_runtime_1.jsxs)(MotionProvider_1.default, tslib_1.__assign({ features: motion }, { children: [ProgressOverlay && (0, jsx_runtime_1.jsx)(NextProgress_1.NextProgress, { Overlay: ProgressOverlay }), (0, jsx_runtime_1.jsx)(Layout, { children: (0, jsx_runtime_1.jsx)(framer_motion_1.AnimatePresence, tslib_1.__assign({ exitBeforeEnter: true, initial: false }, { children: (0, jsx_runtime_1.jsx)(framer_motion_1.m.div, tslib_1.__assign({}, transition, { children: (0, react_1.createElement)(Component, tslib_1.__assign({}, pageProps, { key: pathname })) }), pathname) })) })] })), post] }));
27
27
  };
28
28
  exports.AppMain = AppMain;
29
29
  exports.default = exports.AppMain;
@@ -223,7 +223,11 @@ function withKoine(_a) {
223
223
  ignoreDuringBuilds: true, // we have this strict check on each commit
224
224
  }, typescript: {
225
225
  ignoreBuildErrors: true, // we have this strict check on each commit
226
- }, poweredByHeader: false, swcMinify: true, modularizeImports: tslib_1.__assign({ "@koine/api": { transform: "@koine/api/{{member}}" }, "@koine/browser": { transform: "@koine/browser/{{member}}" }, "@koine/dom": { transform: "@koine/dom/{{member}}" }, "@koine/next/?(((\\w*)?/?)*)": { transform: "@koine/next/{{ matches.[1] }}/{{member}}" }, "@koine/react/?(((\\w*)?/?)*)": { transform: "@koine/react/{{ matches.[1] }}/{{member}}" }, "@koine/utils": { transform: "@koine/utils/{{member}}" } }, (custom["modularizeImports"] || {})), experimental: tslib_1.__assign({
226
+ }, poweredByHeader: false, swcMinify: true, modularizeImports: tslib_1.__assign({ "@koine/api": { transform: "@koine/api/{{member}}" }, "@koine/browser": { transform: "@koine/browser/{{member}}" }, "@koine/dom": { transform: "@koine/dom/{{member}}" }, "@koine/next/?(((\\w*)?/?)*)": {
227
+ transform: "@koine/next/{{ matches.[1] }}/{{member}}",
228
+ }, "@koine/react/?(((\\w*)?/?)*)": {
229
+ transform: "@koine/react/{{ matches.[1] }}/{{member}}",
230
+ }, "@koine/utils": { transform: "@koine/utils/{{member}}" } }, (custom["modularizeImports"] || {})), experimental: tslib_1.__assign({
227
231
  // @see https://github.com/vercel/vercel/discussions/5973#discussioncomment-472618
228
232
  // @see critters error https://github.com/vercel/next.js/issues/20742
229
233
  // optimizeCss: true,
@@ -4,7 +4,8 @@ exports.Document = void 0;
4
4
  var tslib_1 = require("tslib");
5
5
  var jsx_runtime_1 = require("react/jsx-runtime");
6
6
  var document_1 = tslib_1.__importStar(require("next/document"));
7
- var react_1 = require("@koine/react");
7
+ var Meta_1 = tslib_1.__importDefault(require("@koine/react/Meta"));
8
+ var NoJs_1 = tslib_1.__importDefault(require("@koine/react/NoJs"));
8
9
  /**
9
10
  * Next Document wrapper for bare projects
10
11
  *
@@ -22,7 +23,7 @@ var Document = /** @class */ (function (_super) {
22
23
  }
23
24
  Document.prototype.render = function () {
24
25
  var _a = this.props.__NEXT_DATA__, locale = _a.locale, defaultLocale = _a.defaultLocale;
25
- return ((0, jsx_runtime_1.jsxs)(document_1.Html, tslib_1.__assign({ lang: locale || defaultLocale, className: "no-js" }, { children: [(0, jsx_runtime_1.jsxs)(document_1.Head, { children: [(0, jsx_runtime_1.jsx)(react_1.Meta, {}), (0, jsx_runtime_1.jsx)(react_1.NoJs, {})] }), (0, jsx_runtime_1.jsxs)("body", { children: [(0, jsx_runtime_1.jsx)(document_1.Main, {}), (0, jsx_runtime_1.jsx)(document_1.NextScript, {})] })] })));
26
+ return ((0, jsx_runtime_1.jsxs)(document_1.Html, tslib_1.__assign({ lang: locale || defaultLocale, className: "no-js" }, { children: [(0, jsx_runtime_1.jsxs)(document_1.Head, { children: [(0, jsx_runtime_1.jsx)(Meta_1.default, {}), (0, jsx_runtime_1.jsx)(NoJs_1.default, {})] }), (0, jsx_runtime_1.jsxs)("body", { children: [(0, jsx_runtime_1.jsx)(document_1.Main, {}), (0, jsx_runtime_1.jsx)(document_1.NextScript, {})] })] })));
26
27
  };
27
28
  return Document;
28
29
  }(document_1.default));
@@ -4,7 +4,8 @@ exports.Document = void 0;
4
4
  var tslib_1 = require("tslib");
5
5
  var jsx_runtime_1 = require("react/jsx-runtime");
6
6
  var document_1 = tslib_1.__importStar(require("next/document"));
7
- var react_1 = require("@koine/react");
7
+ var Meta_1 = tslib_1.__importDefault(require("@koine/react/Meta"));
8
+ var NoJs_1 = tslib_1.__importDefault(require("@koine/react/NoJs"));
8
9
  var sc_1 = require("@koine/react/sc"); // FIXME: this should be imported from another entrypoint
9
10
  /**
10
11
  * Next Document wrapper for `css/tailwind` based projects
@@ -39,7 +40,7 @@ var Document = /** @class */ (function (_super) {
39
40
  };
40
41
  Document.prototype.render = function () {
41
42
  var _a = this.props.__NEXT_DATA__, locale = _a.locale, defaultLocale = _a.defaultLocale;
42
- return ((0, jsx_runtime_1.jsxs)(document_1.Html, tslib_1.__assign({ lang: locale || defaultLocale, className: "no-js" }, { children: [(0, jsx_runtime_1.jsxs)(document_1.Head, { children: [(0, jsx_runtime_1.jsx)(react_1.Meta, {}), (0, jsx_runtime_1.jsx)(react_1.NoJs, {})] }), (0, jsx_runtime_1.jsxs)("body", { children: [(0, jsx_runtime_1.jsx)(document_1.Main, {}), (0, jsx_runtime_1.jsx)(document_1.NextScript, {})] })] })));
43
+ return ((0, jsx_runtime_1.jsxs)(document_1.Html, tslib_1.__assign({ lang: locale || defaultLocale, className: "no-js" }, { children: [(0, jsx_runtime_1.jsxs)(document_1.Head, { children: [(0, jsx_runtime_1.jsx)(Meta_1.default, {}), (0, jsx_runtime_1.jsx)(NoJs_1.default, {})] }), (0, jsx_runtime_1.jsxs)("body", { children: [(0, jsx_runtime_1.jsx)(document_1.Main, {}), (0, jsx_runtime_1.jsx)(document_1.NextScript, {})] })] })));
43
44
  };
44
45
  return Document;
45
46
  }(document_1.default));
@@ -4,7 +4,8 @@ exports.Document = void 0;
4
4
  var tslib_1 = require("tslib");
5
5
  var jsx_runtime_1 = require("react/jsx-runtime");
6
6
  var document_1 = tslib_1.__importStar(require("next/document"));
7
- var react_1 = require("@koine/react");
7
+ var Meta_1 = tslib_1.__importDefault(require("@koine/react/Meta"));
8
+ var NoJs_1 = tslib_1.__importDefault(require("@koine/react/NoJs"));
8
9
  var create_instance_1 = tslib_1.__importDefault(require("@emotion/server/create-instance"));
9
10
  var createEmotionCache_1 = require("../../createEmotionCache");
10
11
  /**
@@ -24,7 +25,7 @@ var Document = /** @class */ (function (_super) {
24
25
  }
25
26
  Document.prototype.render = function () {
26
27
  var _a = this.props.__NEXT_DATA__, locale = _a.locale, defaultLocale = _a.defaultLocale;
27
- return ((0, jsx_runtime_1.jsxs)(document_1.Html, tslib_1.__assign({ lang: locale || defaultLocale, className: "no-js" }, { children: [(0, jsx_runtime_1.jsxs)(document_1.Head, { children: [(0, jsx_runtime_1.jsx)(react_1.Meta, {}), (0, jsx_runtime_1.jsx)(react_1.NoJs, {}), this.props.emotionStyleTags] }), (0, jsx_runtime_1.jsxs)("body", { children: [(0, jsx_runtime_1.jsx)(document_1.Main, {}), (0, jsx_runtime_1.jsx)(document_1.NextScript, {})] })] })));
28
+ return ((0, jsx_runtime_1.jsxs)(document_1.Html, tslib_1.__assign({ lang: locale || defaultLocale, className: "no-js" }, { children: [(0, jsx_runtime_1.jsxs)(document_1.Head, { children: [(0, jsx_runtime_1.jsx)(Meta_1.default, {}), (0, jsx_runtime_1.jsx)(NoJs_1.default, {}), this.props.emotionStyleTags] }), (0, jsx_runtime_1.jsxs)("body", { children: [(0, jsx_runtime_1.jsx)(document_1.Main, {}), (0, jsx_runtime_1.jsx)(document_1.NextScript, {})] })] })));
28
29
  };
29
30
  return Document;
30
31
  }(document_1.default));
@@ -6,8 +6,9 @@ var jsx_runtime_1 = require("react/jsx-runtime");
6
6
  var react_1 = tslib_1.__importDefault(require("react"));
7
7
  /* ? eslint-disable @next/next/no-document-import-in-page */
8
8
  var document_1 = tslib_1.__importStar(require("next/document"));
9
- var react_2 = require("@koine/react");
10
9
  var styled_components_1 = require("styled-components");
10
+ var Meta_1 = tslib_1.__importDefault(require("@koine/react/Meta"));
11
+ var NoJs_1 = tslib_1.__importDefault(require("@koine/react/NoJs"));
11
12
  /**
12
13
  * Next Document wrapper for `styled-components` based projects
13
14
  *
@@ -58,7 +59,7 @@ var Document = /** @class */ (function (_super) {
58
59
  };
59
60
  Document.prototype.render = function () {
60
61
  var _a = this.props.__NEXT_DATA__, locale = _a.locale, defaultLocale = _a.defaultLocale;
61
- return ((0, jsx_runtime_1.jsxs)(document_1.Html, tslib_1.__assign({ lang: locale || defaultLocale, className: "no-js" }, { children: [(0, jsx_runtime_1.jsxs)(document_1.Head, { children: [(0, jsx_runtime_1.jsx)(react_2.Meta, {}), (0, jsx_runtime_1.jsx)(react_2.NoJs, {})] }), (0, jsx_runtime_1.jsxs)("body", { children: [(0, jsx_runtime_1.jsx)(document_1.Main, {}), (0, jsx_runtime_1.jsx)(document_1.NextScript, {})] })] })));
62
+ return ((0, jsx_runtime_1.jsxs)(document_1.Html, tslib_1.__assign({ lang: locale || defaultLocale, className: "no-js" }, { children: [(0, jsx_runtime_1.jsxs)(document_1.Head, { children: [(0, jsx_runtime_1.jsx)(Meta_1.default, {}), (0, jsx_runtime_1.jsx)(NoJs_1.default, {})] }), (0, jsx_runtime_1.jsxs)("body", { children: [(0, jsx_runtime_1.jsx)(document_1.Main, {}), (0, jsx_runtime_1.jsx)(document_1.NextScript, {})] })] })));
62
63
  };
63
64
  return Document;
64
65
  }(document_1.default));
package/node/index.js CHANGED
@@ -11,8 +11,6 @@ tslib_1.__exportStar(require("./getT"), exports);
11
11
  tslib_1.__exportStar(require("./Head"), exports);
12
12
  tslib_1.__exportStar(require("./Link"), exports);
13
13
  tslib_1.__exportStar(require("./load"), exports);
14
- tslib_1.__exportStar(require("./NextImg"), exports);
15
- tslib_1.__exportStar(require("./NextImgSmart"), exports);
16
14
  tslib_1.__exportStar(require("./NextProgress"), exports);
17
15
  tslib_1.__exportStar(require("./revalidate"), exports);
18
16
  tslib_1.__exportStar(require("./Seo"), exports);
@@ -5,7 +5,7 @@ var tslib_1 = require("tslib");
5
5
  var react_1 = require("react");
6
6
  var router_1 = require("next/router");
7
7
  var format_1 = tslib_1.__importDefault(require("date-fns/format"));
8
- var react_2 = require("@koine/react");
8
+ var useDateLocale_1 = tslib_1.__importDefault(require("@koine/react/hooks/useDateLocale"));
9
9
  /**
10
10
  * Automatically returns the `date-fns/format` function with the right locale
11
11
  * passed as option (grabbed from next router value).
@@ -21,7 +21,7 @@ var useDateFormat = function () {
21
21
  };
22
22
  }), formatter = _a[0], setFormatter = _a[1];
23
23
  var router = (0, router_1.useRouter)();
24
- var locale = (0, react_2.useDateLocale)(router.locale);
24
+ var locale = (0, useDateLocale_1.default)(router.locale);
25
25
  (0, react_1.useEffect)(function () {
26
26
  if (locale) {
27
27
  var newFormatter_1 = function (date, _format, options) { return (0, format_1.default)(date, _format, tslib_1.__assign(tslib_1.__assign({}, (options || {})), { locale: locale })); };
package/package.json CHANGED
@@ -2,6 +2,15 @@
2
2
  "name": "@koine/next",
3
3
  "sideEffects": false,
4
4
  "peerDependenciesMeta": {
5
+ "@hookform/resolvers": {
6
+ "optional": true
7
+ },
8
+ "@kuus/yup": {
9
+ "optional": true
10
+ },
11
+ "@mui/base": {
12
+ "optional": true
13
+ },
5
14
  "@mui/material": {
6
15
  "optional": true
7
16
  },
@@ -14,15 +23,36 @@
14
23
  "@emotion/styled": {
15
24
  "optional": true
16
25
  },
26
+ "@tiptap/react": {
27
+ "optional": true
28
+ },
29
+ "@tiptap/starter-kit": {
30
+ "optional": true
31
+ },
32
+ "date-fns": {
33
+ "optional": true
34
+ },
17
35
  "framer-motion": {
18
36
  "optional": true
19
37
  },
20
38
  "next-auth": {
21
39
  "optional": true
22
40
  },
41
+ "react-hook-form": {
42
+ "optional": true
43
+ },
44
+ "react-icons": {
45
+ "optional": true
46
+ },
23
47
  "react-is": {
24
48
  "optional": true
25
49
  },
50
+ "react-popper": {
51
+ "optional": true
52
+ },
53
+ "react-swipeable": {
54
+ "optional": true
55
+ },
26
56
  "styled-components": {
27
57
  "optional": true
28
58
  }
@@ -33,11 +63,11 @@
33
63
  "peerDependencies": {
34
64
  "react": "18.2.0",
35
65
  "next": "13.1.6",
36
- "@koine/browser": "1.1.0",
37
- "@koine/utils": "1.1.0",
66
+ "@koine/browser": "1.1.2",
67
+ "@koine/utils": "1.1.2",
38
68
  "ts-debounce": "4.0.0",
39
69
  "type-fest": "3.5.3",
40
- "@koine/dom": "1.1.0",
70
+ "@koine/dom": "1.1.2",
41
71
  "date-fns-tz": "1.3.7",
42
72
  "framer-motion": "7.10.3",
43
73
  "next-auth": "4.19.0",
@@ -45,20 +75,14 @@
45
75
  "@emotion/react": "11.10.5",
46
76
  "styled-components": "5.3.6",
47
77
  "react-hook-form": "7.42.1",
48
- "@mui/base": "5.0.0-alpha.115",
49
- "react-icons": "4.7.1",
50
- "date-fns": "2.29.3",
51
- "react-swipeable": "7.0.0",
52
- "@tiptap/react": "2.0.0-beta.209",
53
- "@tiptap/starter-kit": "2.0.0-beta.209",
54
- "@kuus/yup": "1.0.0-beta.7",
55
- "react-popper": "2.3.0",
56
- "tslib": "2.5.0",
57
78
  "@emotion/server": "11.10.0",
58
79
  "next-translate": "1.6.0",
59
80
  "next-seo": "5.15.0",
60
- "@hookform/resolvers": "2.9.10"
81
+ "date-fns": "2.29.3",
82
+ "@kuus/yup": "1.0.0-beta.7",
83
+ "@hookform/resolvers": "2.9.10",
84
+ "tslib": "2.5.0"
61
85
  },
62
- "version": "1.1.0",
86
+ "version": "1.1.2",
63
87
  "module": "./index.js"
64
88
  }
@@ -1,3 +1,3 @@
1
- import type { Option } from "@koine/react";
1
+ import type { Option } from "@koine/react/types";
2
2
  import type { TranslateLoose } from "./types-i18n";
3
3
  export declare function translationAsOptions(t: TranslateLoose, i18nKey: string): Option[];
package/useDateFormat.js CHANGED
@@ -2,7 +2,7 @@ import { __assign } from "tslib";
2
2
  import { useEffect, useState } from "react";
3
3
  import { useRouter } from "next/router";
4
4
  import format from "date-fns/format";
5
- import { useDateLocale } from "@koine/react";
5
+ import useDateLocale from "@koine/react/hooks/useDateLocale";
6
6
  /**
7
7
  * Automatically returns the `date-fns/format` function with the right locale
8
8
  * passed as option (grabbed from next router value).
package/node/NextImg.js DELETED
@@ -1,24 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getNextImgProps = void 0;
4
- var tslib_1 = require("tslib");
5
- function getNextImgProps(_a) {
6
- var src = _a.src, alt = _a.alt, layout = _a.layout, blurDataURL = _a.blurDataURL, width = _a.width, height = _a.height, priority = _a.priority, objectFit = _a.objectFit, objectPosition = _a.objectPosition, restProps = tslib_1.__rest(_a, ["src", "alt", "layout", "blurDataURL", "width", "height", "priority", "objectFit", "objectPosition"]);
7
- var nextImgProps = {
8
- src: src,
9
- alt: alt,
10
- layout: layout,
11
- blurDataURL: blurDataURL,
12
- width: width,
13
- height: height,
14
- priority: priority,
15
- objectFit: objectFit,
16
- objectPosition: objectPosition,
17
- };
18
- return {
19
- nextImgProps: nextImgProps,
20
- restProps: restProps,
21
- };
22
- }
23
- exports.getNextImgProps = getNextImgProps;
24
- exports.default = getNextImgProps;
@@ -1,17 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.NextImgSmart = void 0;
4
- var tslib_1 = require("tslib");
5
- var jsx_runtime_1 = require("react/jsx-runtime");
6
- var react_1 = require("react");
7
- var image_1 = tslib_1.__importDefault(require("next/image"));
8
- var NextImg_1 = require("./NextImg");
9
- var NextImgSmart = function (props) {
10
- var _a = (0, react_1.useState)(false), $loaded = _a[0], setLoaded = _a[1];
11
- var _b = (0, react_1.useState)(false), $error = _b[0], setError = _b[1];
12
- var _c = (0, NextImg_1.getNextImgProps)(props), nextImgProps = _c.nextImgProps, restProps = _c.restProps;
13
- var Wrap = restProps.Wrap;
14
- return nextImgProps.priority ? ((0, jsx_runtime_1.jsx)(image_1.default, tslib_1.__assign({}, nextImgProps))) : ((0, jsx_runtime_1.jsx)(Wrap, tslib_1.__assign({}, restProps, { "$loaded": $loaded, "$error": $error }, { children: (0, jsx_runtime_1.jsx)(image_1.default, tslib_1.__assign({}, nextImgProps, { onLoadingComplete: function () { return setLoaded(true); }, onError: function () { return setError(true); } })) })));
15
- };
16
- exports.NextImgSmart = NextImgSmart;
17
- exports.default = exports.NextImgSmart;