@enonic/nextjs-adapter 3.0.0-RC2 → 3.0.0-RC3
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/client/getClientHydratedHtml.d.ts +2 -0
- package/client/getClientHydratedHtml.jsx +9 -0
- package/client/getClientHydratedHtml.jsx.map +1 -0
- package/common/constants.d.ts +1 -1
- package/common/constants.js +1 -2
- package/common/constants.js.map +1 -1
- package/package.json +3 -1
- package/server/getServerRenderedHtml.d.ts +2 -0
- package/server/getServerRenderedHtml.js +4 -0
- package/server/getServerRenderedHtml.js.map +1 -0
- package/src/common/constants.ts +1 -2
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
/// <reference types="react" />
|
|
3
|
+
import { hydrateRoot } from 'react-dom/client';
|
|
4
|
+
export default function getClientHydratedHtml(component) {
|
|
5
|
+
const root = document.createElement('div');
|
|
6
|
+
hydrateRoot(root, component);
|
|
7
|
+
return root.innerHTML;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=getClientHydratedHtml.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getClientHydratedHtml.jsx","sourceRoot":"","sources":["../src/client/getClientHydratedHtml.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;AACb,+BAA+B;AAG/B,OAAO,EAAC,WAAW,EAAC,MAAM,kBAAkB,CAAC;AAG7C,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAAC,SAA0B;IACpE,MAAM,IAAI,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAC3C,WAAW,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;IAC7B,OAAO,IAAI,CAAC,SAAS,CAAC;AAC1B,CAAC"}
|
package/common/constants.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export declare const FRAGMENT_DEFAULT_REGION_NAME = "fragment";
|
|
|
13
13
|
* - media
|
|
14
14
|
* - paths with '/_' in them
|
|
15
15
|
*/
|
|
16
|
-
export declare const GET_STATIC_PATHS_QUERY = "query ($count: Int) {\n guillotine {\n queryDsl(\n first: $count,\n sort: {\n field: \"modifiedTime\",\n direction: DESC\n }\n query: {boolean: {mustNot: [\n {in: {field: \"type\", stringValues: [\"base:
|
|
16
|
+
export declare const GET_STATIC_PATHS_QUERY = "query ($count: Int) {\n guillotine {\n queryDsl(\n first: $count,\n sort: {\n field: \"modifiedTime\",\n direction: DESC\n }\n query: {boolean: {mustNot: [\n {in: {field: \"type\", stringValues: [\"base:shortcut\", \"portal:fragment\", \"portal:template-folder\", \"portal:page-template\"]}}\n {like: {field: \"type\", value: \"media:*\"}}\n ]}}\n ) {\n _name\n _path\n site {_name}\n }\n }\n}";
|
|
17
17
|
export declare enum GUILLOTINE_REQUEST_HEADERS {
|
|
18
18
|
COOKIE = "Cookie",
|
|
19
19
|
LOCALE = "locale",
|
package/common/constants.js
CHANGED
|
@@ -23,9 +23,8 @@ export const GET_STATIC_PATHS_QUERY = `query ($count: Int) {
|
|
|
23
23
|
direction: DESC
|
|
24
24
|
}
|
|
25
25
|
query: {boolean: {mustNot: [
|
|
26
|
-
{in: {field: "type", stringValues: ["base:folder", "
|
|
26
|
+
{in: {field: "type", stringValues: ["base:shortcut", "portal:fragment", "portal:template-folder", "portal:page-template"]}}
|
|
27
27
|
{like: {field: "type", value: "media:*"}}
|
|
28
|
-
{like: {field: "_path", value: "*/_*"}}
|
|
29
28
|
]}}
|
|
30
29
|
) {
|
|
31
30
|
_name
|
package/common/constants.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/common/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,SAAS,GAAG,GAAG,CAAC;AAE7B,MAAM,CAAN,IAAY,QAKX;AALD,WAAY,QAAQ;IAChB,wCAA4B,CAAA;IAC5B,kCAAsB,CAAA;IACtB,wCAA4B,CAAA;IAC5B,kC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,CAAC;AAE1D,MAAM,CAAN,IAAY,WAOX;AAPD,WAAY,WAAW;IACnB,gCAAiB,CAAA;IACjB,4BAAa,CAAA;IACb,kCAAmB,CAAA;IACnB,4BAAa,CAAA;IACb,8BAAe,CAAA;IACf,4BAAa,CAAA,CAAO,mEAAmE;AAC3F,CAAC,EAPW,WAAW,KAAX,WAAW,QAOtB;AAED,MAAM,CAAC,MAAM,kBAAkB,GAAG,qBAAqB,CAAC;AAExD,MAAM,CAAC,MAAM,qBAAqB,GAAG,aAAa,CAAC;AAEnD,oHAAoH;AACpH,MAAM,CAAC,MAAM,kBAAkB,GAAG,WAAW,CAAC;AAE9C,0DAA0D;AAC1D,MAAM,CAAN,IAAY,iBAMX;AAND,WAAY,iBAAiB;IACzB,kCAAa,CAAA;IACb,sCAAiB,CAAA;IACjB,kCAAa,CAAA;IACb,0CAAqB,CAAA;IACrB,kCAAa,CAAA;AACjB,CAAC,EANW,iBAAiB,KAAjB,iBAAiB,QAM5B;AAED,MAAM,CAAN,IAAY,eAIX;AAJD,WAAY,eAAe;IACvB,0CAAuB,CAAA;IACvB,gCAAa,CAAA;IACb,gCAAa,CAAA;AACjB,CAAC,EAJW,eAAe,KAAf,eAAe,QAI1B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@enonic/nextjs-adapter",
|
|
3
|
-
"version": "3.0.0-
|
|
3
|
+
"version": "3.0.0-RC3",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"author": "Pavel Milkevich <pmi@enonic.com>",
|
|
@@ -14,6 +14,8 @@
|
|
|
14
14
|
"client.js",
|
|
15
15
|
"server.js",
|
|
16
16
|
"common",
|
|
17
|
+
"client",
|
|
18
|
+
"server",
|
|
17
19
|
"guillotine",
|
|
18
20
|
"index*",
|
|
19
21
|
"i18n",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getServerRenderedHtml.js","sourceRoot":"","sources":["../src/server/getServerRenderedHtml.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,qBAAqB,CAAC,SAA0B;IAC5D,OAAO,OAAO,CAAC,kBAAkB,CAAC,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC;AACjE,CAAC"}
|
package/src/common/constants.ts
CHANGED
|
@@ -25,9 +25,8 @@ export const GET_STATIC_PATHS_QUERY = `query ($count: Int) {
|
|
|
25
25
|
direction: DESC
|
|
26
26
|
}
|
|
27
27
|
query: {boolean: {mustNot: [
|
|
28
|
-
{in: {field: "type", stringValues: ["base:folder", "
|
|
28
|
+
{in: {field: "type", stringValues: ["base:shortcut", "portal:fragment", "portal:template-folder", "portal:page-template"]}}
|
|
29
29
|
{like: {field: "type", value: "media:*"}}
|
|
30
|
-
{like: {field: "_path", value: "*/_*"}}
|
|
31
30
|
]}}
|
|
32
31
|
) {
|
|
33
32
|
_name
|