@koine/next 1.0.3 → 1.0.8

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 (118) hide show
  1. package/Analytics/AnalyticsGoogle.d.ts +5 -6
  2. package/Analytics/AnalyticsGoogle.js +37 -0
  3. package/Analytics/index.d.ts +1 -1
  4. package/Analytics/index.js +1 -0
  5. package/Auth/helpers.d.ts +17 -17
  6. package/Auth/helpers.js +21 -0
  7. package/Auth/index.d.ts +4 -4
  8. package/Auth/index.js +4 -0
  9. package/Auth/useLogin.d.ts +7 -7
  10. package/Auth/useLogin.js +47 -0
  11. package/Auth/useLoginUrl.d.ts +1 -1
  12. package/Auth/useLoginUrl.js +11 -0
  13. package/Auth/useLogout.d.ts +6 -6
  14. package/Auth/useLogout.js +52 -0
  15. package/Favicon/Favicon.d.ts +3 -4
  16. package/Favicon/Favicon.js +4 -0
  17. package/Favicon/index.d.ts +1 -1
  18. package/Favicon/index.js +1 -0
  19. package/Forms/index.d.ts +2 -2
  20. package/Forms/index.js +2 -0
  21. package/Forms/useForm.d.ts +32 -32
  22. package/Forms/useForm.js +33 -0
  23. package/Forms/useSubmit.d.ts +24 -24
  24. package/Forms/useSubmit.js +20 -0
  25. package/Head/Head.d.ts +1 -1
  26. package/Head/Head.js +1 -0
  27. package/Head/index.d.ts +1 -1
  28. package/Head/index.js +1 -0
  29. package/I18n/I18n.d.ts +48 -48
  30. package/I18n/I18n.js +86 -0
  31. package/I18n/index.d.ts +1 -1
  32. package/I18n/index.js +1 -0
  33. package/Img/Img.d.ts +21 -21
  34. package/Img/Img.js +30 -0
  35. package/Img/index.d.ts +1 -1
  36. package/Img/index.js +1 -0
  37. package/Link/Link.d.ts +8 -8
  38. package/Link/Link.js +12 -0
  39. package/Link/index.d.ts +1 -1
  40. package/Link/index.js +1 -0
  41. package/NextProgress/NextProgress.d.ts +13 -14
  42. package/NextProgress/NextProgress.js +38 -0
  43. package/NextProgress/index.d.ts +1 -1
  44. package/NextProgress/index.js +1 -0
  45. package/Seo/Seo.d.ts +3 -3
  46. package/Seo/Seo.js +8 -0
  47. package/Seo/SeoDefaults.d.ts +3 -3
  48. package/Seo/SeoDefaults.js +12 -0
  49. package/Seo/helpers.d.ts +48 -48
  50. package/Seo/helpers.js +113 -0
  51. package/Seo/index.d.ts +12 -12
  52. package/Seo/index.js +12 -0
  53. package/Theme/Theme.d.ts +46 -46
  54. package/Theme/Theme.js +235 -0
  55. package/Theme/index.d.ts +1 -1
  56. package/Theme/index.js +1 -0
  57. package/app/App--emotion.d.ts +10 -10
  58. package/app/App--emotion.js +11 -0
  59. package/app/App--sc.d.ts +10 -10
  60. package/app/App--sc.js +11 -0
  61. package/app/App--vanilla.d.ts +10 -10
  62. package/app/App--vanilla.js +11 -0
  63. package/app/AppAuth--emotion.d.ts +10 -10
  64. package/app/AppAuth--emotion.js +12 -0
  65. package/app/AppAuth--sc.d.ts +10 -10
  66. package/app/AppAuth--sc.js +12 -0
  67. package/app/AppHead.d.ts +3 -3
  68. package/app/AppHead.js +5 -0
  69. package/app/{AppMain.d.ts → AppMain--emotion.d.ts} +34 -34
  70. package/app/AppMain--emotion.js +27 -0
  71. package/app/AppMain--sc.d.ts +34 -0
  72. package/app/AppMain--sc.js +27 -0
  73. package/app/AppMain--vanilla.d.ts +27 -27
  74. package/app/AppMain--vanilla.js +11 -0
  75. package/app/AppTheme--emotion.d.ts +15 -15
  76. package/app/AppTheme--emotion.js +17 -0
  77. package/app/AppTheme--sc.d.ts +13 -13
  78. package/app/AppTheme--sc.js +9 -0
  79. package/app/AppTheme--vanilla.d.ts +10 -10
  80. package/app/AppTheme--vanilla.js +12 -0
  81. package/app/index.d.ts +11 -11
  82. package/app/index.js +11 -0
  83. package/app/motion-features.d.ts +2 -2
  84. package/app/motion-features.js +2 -0
  85. package/config/index.d.ts +58 -58
  86. package/config/index.js +144 -0
  87. package/document/Document--emotion.d.ts +5 -5
  88. package/document/Document--emotion.js +55 -0
  89. package/document/Document--sc.d.ts +11 -11
  90. package/document/Document--sc.js +33 -0
  91. package/document/Document--vanilla.d.ts +11 -11
  92. package/document/Document--vanilla.js +20 -0
  93. package/document/Document.d.ts +10 -10
  94. package/document/Document.js +14 -0
  95. package/document/index.d.ts +4 -4
  96. package/document/index.js +4 -0
  97. package/index.d.ts +15 -12
  98. package/index.js +15 -743
  99. package/index.umd.js +2061 -78
  100. package/package.json +27 -21
  101. package/{types.d.ts → typings.d.ts} +0 -0
  102. package/utils/api.d.ts +55 -55
  103. package/utils/api.js +33 -0
  104. package/{document/emotion.d.ts → utils/emotion-cache.d.ts} +5 -5
  105. package/utils/emotion-cache.js +8 -0
  106. package/utils/index.d.ts +20 -19
  107. package/utils/index.js +27 -0
  108. package/Theme.js +0 -1905
  109. package/_tslib.js +0 -41
  110. package/app.js +0 -250
  111. package/config.js +0 -183
  112. package/document.js +0 -207
  113. package/emotion.js +0 -1329
  114. package/es.object.assign.js +0 -1074
  115. package/es.string.replace.js +0 -785
  116. package/es.string.split.js +0 -201
  117. package/index.esm.js +0 -4600
  118. package/motion-features.js +0 -10
@@ -1,11 +1,11 @@
1
- /// <reference types="react" />
2
- import NextDocument, { DocumentContext, DocumentInitialProps } from "next/document";
3
- import { ThemeVanillaValue } from "@koine/react";
4
- /**
5
- */
6
- export declare class DocumentVanilla extends NextDocument {
7
- static getInitialProps(ctx: DocumentContext): Promise<DocumentInitialProps & {
8
- theme: ThemeVanillaValue;
9
- }>;
10
- render(): JSX.Element;
11
- }
1
+ /// <reference types="react" />
2
+ import NextDocument, { DocumentContext, DocumentInitialProps } from "next/document";
3
+ import { ThemeVanillaValue } from "@koine/react";
4
+ /**
5
+ */
6
+ export declare class DocumentVanilla extends NextDocument {
7
+ static getInitialProps(ctx: DocumentContext): Promise<DocumentInitialProps & {
8
+ theme: ThemeVanillaValue;
9
+ }>;
10
+ render(): JSX.Element;
11
+ }
@@ -0,0 +1,20 @@
1
+ import { __awaiter } from "tslib";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ /* ? eslint-disable @next/next/no-document-import-in-page */
4
+ import NextDocument, { Html, Head, Main, NextScript, } from "next/document";
5
+ import { Meta, NoJs, getInitialThemeFromRequest, } from "@koine/react";
6
+ /**
7
+ */
8
+ export class DocumentVanilla extends NextDocument {
9
+ static getInitialProps(ctx) {
10
+ var _a;
11
+ return __awaiter(this, void 0, void 0, function* () {
12
+ const initialProps = yield NextDocument.getInitialProps(ctx);
13
+ return Object.assign(Object.assign({}, initialProps), { theme: getInitialThemeFromRequest(((_a = ctx.req) === null || _a === void 0 ? void 0 : _a.headers.cookie /* || document?.cookie */) || "") });
14
+ });
15
+ }
16
+ render() {
17
+ const { locale, defaultLocale } = this.props.__NEXT_DATA__;
18
+ return (_jsxs(Html, Object.assign({ lang: locale || defaultLocale, className: "no-js" }, { children: [_jsxs(Head, { children: [_jsx(Meta, {}), _jsx(NoJs, {})] }), _jsxs("body", { children: [_jsx(Main, {}), _jsx(NextScript, {})] })] })));
19
+ }
20
+ }
@@ -1,10 +1,10 @@
1
- /// <reference types="react" />
2
- import NextDocument from "next/document";
3
- /**
4
- * For typescript safety of this component
5
- *
6
- * @see https://bit.ly/3ceuF8m
7
- */
8
- export declare class Document extends NextDocument {
9
- render(): JSX.Element;
10
- }
1
+ /// <reference types="react" />
2
+ import NextDocument from "next/document";
3
+ /**
4
+ * For typescript safety of this component
5
+ *
6
+ * @see https://bit.ly/3ceuF8m
7
+ */
8
+ export declare class Document extends NextDocument {
9
+ render(): JSX.Element;
10
+ }
@@ -0,0 +1,14 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import NextDocument, { Html, Head, Main, NextScript } from "next/document";
3
+ import { Meta, NoJs } from "@koine/react";
4
+ /**
5
+ * For typescript safety of this component
6
+ *
7
+ * @see https://bit.ly/3ceuF8m
8
+ */
9
+ export class Document extends NextDocument {
10
+ render() {
11
+ const { locale, defaultLocale } = this.props.__NEXT_DATA__;
12
+ return (_jsxs(Html, Object.assign({ lang: locale || defaultLocale, className: "no-js" }, { children: [_jsxs(Head, { children: [_jsx(Meta, {}), _jsx(NoJs, {})] }), _jsxs("body", { children: [_jsx(Main, {}), _jsx(NextScript, {})] })] })));
13
+ }
14
+ }
@@ -1,4 +1,4 @@
1
- export * from "./Document";
2
- export * from "./Document--emotion";
3
- export * from "./Document--sc";
4
- export * from "./Document--vanilla";
1
+ export * from "./Document";
2
+ export * from "./Document--emotion";
3
+ export * from "./Document--sc";
4
+ export * from "./Document--vanilla";
@@ -0,0 +1,4 @@
1
+ export * from "./Document";
2
+ export * from "./Document--emotion";
3
+ export * from "./Document--sc";
4
+ export * from "./Document--vanilla";
package/index.d.ts CHANGED
@@ -1,12 +1,15 @@
1
- export * from "./Analytics";
2
- export * from "./Auth";
3
- export * from "./Favicon";
4
- export * from "./Forms";
5
- export * from "./Head";
6
- export * from "./I18n";
7
- export * from "./Img";
8
- export * from "./Link";
9
- export * from "./NextProgress";
10
- export * from "./Seo";
11
- export * from "./Theme";
12
- export * from "./utils";
1
+ export * from "./Analytics";
2
+ export * from "./Auth";
3
+ export * from "./Favicon";
4
+ export * from "./Forms";
5
+ export * from "./Head";
6
+ export * from "./I18n";
7
+ export * from "./Img";
8
+ export * from "./Link";
9
+ export * from "./NextProgress";
10
+ export * from "./Seo";
11
+ export * from "./Theme";
12
+ export * from "./utils";
13
+ export * from "./app";
14
+ export * from "./config";
15
+ export * from "./document";