@uniformdev/canvas-next 20.34.3-alpha.70 → 20.35.1-alpha.188

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/dist/index.esm.js CHANGED
@@ -8,7 +8,7 @@ import {
8
8
  UniformRichTextNode as ReactUniformRichTextNode
9
9
  } from "@uniformdev/canvas-react";
10
10
  import { linkParamValueToHref } from "@uniformdev/richtext";
11
- import NextLink from "next/link.js";
11
+ import NextLink from "next/link";
12
12
  import React, { useCallback } from "react";
13
13
  var NextLinkRichTextNode = ({ children, node }) => {
14
14
  const { link } = node;
package/dist/index.js CHANGED
@@ -44,7 +44,7 @@ module.exports = __toCommonJS(src_exports);
44
44
  // src/components/UniformRichText.tsx
45
45
  var import_canvas_react = require("@uniformdev/canvas-react");
46
46
  var import_richtext = require("@uniformdev/richtext");
47
- var import_link = __toESM(require("next/link.js"));
47
+ var import_link = __toESM(require("next/link"));
48
48
  var import_react = __toESM(require("react"));
49
49
  var NextLinkRichTextNode = ({ children, node }) => {
50
50
  const { link } = node;
package/dist/index.mjs CHANGED
@@ -8,7 +8,7 @@ import {
8
8
  UniformRichTextNode as ReactUniformRichTextNode
9
9
  } from "@uniformdev/canvas-react";
10
10
  import { linkParamValueToHref } from "@uniformdev/richtext";
11
- import NextLink from "next/link.js";
11
+ import NextLink from "next/link";
12
12
  import React, { useCallback } from "react";
13
13
  var NextLinkRichTextNode = ({ children, node }) => {
14
14
  const { link } = node;
@@ -38,6 +38,15 @@ type RouteHandlerOptions<TContext, TResult, TSuccessResult> = {
38
38
  */
39
39
  handleNotFound?: HandleRouteNotFoundFunction<TContext, TResult>;
40
40
  };
41
+ /**
42
+ * Schema that comes out of route API handler in case of a composition route response.
43
+ * Should be used together as UniformAppProps<RouteCompositionResult> in Next.js app.
44
+ */
45
+ type RouteCompositionResult<TData = RootComponentInstance> = {
46
+ matchedRoute: string;
47
+ dynamicInputs: Record<string, string>;
48
+ data: TData;
49
+ };
41
50
 
42
51
  /**
43
52
  * Creates an implementation of `getServerSideProps` using the Uniform Route API.
@@ -124,4 +133,4 @@ declare const getStaticPaths: () => Promise<{
124
133
  fallback: boolean;
125
134
  }>;
126
135
 
127
- export { type HandleRouteCompositionFunction, type HandleRouteNotFoundFunction, type HandleRouteRedirectFunction, type RouteHandlerOptions, getServerSideProps, getStaticPaths, getStaticProps, prependLocale, withUniformGetServerSideProps, withUniformGetStaticPaths, withUniformGetStaticProps };
136
+ export { type HandleRouteCompositionFunction, type HandleRouteNotFoundFunction, type HandleRouteRedirectFunction, type RouteCompositionResult, type RouteHandlerOptions, getServerSideProps, getStaticPaths, getStaticProps, prependLocale, withUniformGetServerSideProps, withUniformGetStaticPaths, withUniformGetStaticProps };
@@ -38,6 +38,15 @@ type RouteHandlerOptions<TContext, TResult, TSuccessResult> = {
38
38
  */
39
39
  handleNotFound?: HandleRouteNotFoundFunction<TContext, TResult>;
40
40
  };
41
+ /**
42
+ * Schema that comes out of route API handler in case of a composition route response.
43
+ * Should be used together as UniformAppProps<RouteCompositionResult> in Next.js app.
44
+ */
45
+ type RouteCompositionResult<TData = RootComponentInstance> = {
46
+ matchedRoute: string;
47
+ dynamicInputs: Record<string, string>;
48
+ data: TData;
49
+ };
41
50
 
42
51
  /**
43
52
  * Creates an implementation of `getServerSideProps` using the Uniform Route API.
@@ -124,4 +133,4 @@ declare const getStaticPaths: () => Promise<{
124
133
  fallback: boolean;
125
134
  }>;
126
135
 
127
- export { type HandleRouteCompositionFunction, type HandleRouteNotFoundFunction, type HandleRouteRedirectFunction, type RouteHandlerOptions, getServerSideProps, getStaticPaths, getStaticProps, prependLocale, withUniformGetServerSideProps, withUniformGetStaticPaths, withUniformGetStaticProps };
136
+ export { type HandleRouteCompositionFunction, type HandleRouteNotFoundFunction, type HandleRouteRedirectFunction, type RouteCompositionResult, type RouteHandlerOptions, getServerSideProps, getStaticPaths, getStaticProps, prependLocale, withUniformGetServerSideProps, withUniformGetStaticPaths, withUniformGetStaticProps };
@@ -267,6 +267,7 @@ function createRouteFetcher(options) {
267
267
  {
268
268
  type: "composition",
269
269
  matchedRoute: "contextual-editing",
270
+ dynamicInputs: {},
270
271
  compositionApiResponse: {
271
272
  composition: {
272
273
  ...import_canvas.EMPTY_COMPOSITION,
@@ -145,6 +145,7 @@ function createRouteFetcher(options) {
145
145
  {
146
146
  type: "composition",
147
147
  matchedRoute: "contextual-editing",
148
+ dynamicInputs: {},
148
149
  compositionApiResponse: {
149
150
  composition: {
150
151
  ...EMPTY_COMPOSITION,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/canvas-next",
3
- "version": "20.34.3-alpha.70+bc3f8ba0f4",
3
+ "version": "20.35.1-alpha.188+c2a5b9c45f",
4
4
  "description": "Next.js SDK for Uniform Canvas",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "./dist/index.js",
@@ -67,12 +67,12 @@
67
67
  "document:prebuild": "api-extractor run --local"
68
68
  },
69
69
  "dependencies": {
70
- "@uniformdev/canvas": "20.34.3-alpha.70+bc3f8ba0f4",
71
- "@uniformdev/canvas-react": "20.34.3-alpha.70+bc3f8ba0f4",
72
- "@uniformdev/context": "20.34.3-alpha.70+bc3f8ba0f4",
73
- "@uniformdev/project-map": "20.34.3-alpha.70+bc3f8ba0f4",
74
- "@uniformdev/redirect": "20.34.3-alpha.70+bc3f8ba0f4",
75
- "@uniformdev/richtext": "20.34.3-alpha.70+bc3f8ba0f4",
70
+ "@uniformdev/canvas": "20.35.1-alpha.188+c2a5b9c45f",
71
+ "@uniformdev/canvas-react": "20.35.1-alpha.188+c2a5b9c45f",
72
+ "@uniformdev/context": "20.35.1-alpha.188+c2a5b9c45f",
73
+ "@uniformdev/project-map": "20.35.1-alpha.188+c2a5b9c45f",
74
+ "@uniformdev/redirect": "20.35.1-alpha.188+c2a5b9c45f",
75
+ "@uniformdev/richtext": "20.35.1-alpha.188+c2a5b9c45f",
76
76
  "colorette": "2.0.20"
77
77
  },
78
78
  "peerDependencies": {
@@ -81,10 +81,10 @@
81
81
  "react-dom": ">=16"
82
82
  },
83
83
  "devDependencies": {
84
- "@types/react": "18.3.24",
85
- "next": "14.2.32",
86
- "react": "18.3.1",
87
- "react-dom": "18.3.1"
84
+ "@types/react": "19.2.2",
85
+ "next": "16.0.0",
86
+ "react": "19.2.0",
87
+ "react-dom": "19.2.0"
88
88
  },
89
89
  "files": [
90
90
  "/dist"
@@ -92,5 +92,5 @@
92
92
  "publishConfig": {
93
93
  "access": "public"
94
94
  },
95
- "gitHead": "bc3f8ba0f4719673f92d9e8c48c3818dc439c364"
95
+ "gitHead": "c2a5b9c45fdbcd3199fba23e38beaf7ca0388c35"
96
96
  }