@contember/react-multipass-rendering
Advanced tools
Comparing version 2.0.0-alpha.6 to 2.0.0-alpha.8
@@ -1,5 +0,5 @@ | ||
import { ChildrenAnalyzer } from "./ChildrenAnalyzer.js"; | ||
import { ChildrenAnalyzerError } from "./ChildrenAnalyzerError.js"; | ||
import { BranchNode } from "./nodeSpecs/BranchNode.js"; | ||
import { Leaf } from "./nodeSpecs/Leaf.js"; | ||
import { ChildrenAnalyzer } from "./src/ChildrenAnalyzer.js"; | ||
import { ChildrenAnalyzerError } from "./src/ChildrenAnalyzerError.js"; | ||
import { BranchNode } from "./src/nodeSpecs/BranchNode.js"; | ||
import { Leaf } from "./src/nodeSpecs/Leaf.js"; | ||
export { | ||
@@ -6,0 +6,0 @@ BranchNode, |
@@ -1,5 +0,5 @@ | ||
import { ChildrenAnalyzer } from "./ChildrenAnalyzer.js"; | ||
import { ChildrenAnalyzerError } from "./ChildrenAnalyzerError.js"; | ||
import { BranchNode } from "./nodeSpecs/BranchNode.js"; | ||
import { Leaf } from "./nodeSpecs/Leaf.js"; | ||
import { ChildrenAnalyzer } from "./src/ChildrenAnalyzer.js"; | ||
import { ChildrenAnalyzerError } from "./src/ChildrenAnalyzerError.js"; | ||
import { BranchNode } from "./src/nodeSpecs/BranchNode.js"; | ||
import { Leaf } from "./src/nodeSpecs/Leaf.js"; | ||
export { | ||
@@ -6,0 +6,0 @@ BranchNode, |
{ | ||
"name": "@contember/react-multipass-rendering", | ||
"license": "Apache-2.0", | ||
"version": "2.0.0-alpha.6", | ||
"version": "2.0.0-alpha.8", | ||
"type": "module", | ||
@@ -20,2 +20,3 @@ "sideEffects": false, | ||
"production": "./dist/production/index.cjs", | ||
"typescript": "./src/index.ts", | ||
"default": "./dist/production/index.cjs" | ||
@@ -25,22 +26,13 @@ } | ||
}, | ||
"files": [ | ||
"dist/", | ||
"src/" | ||
], | ||
"typings": "./dist/types/index.d.ts", | ||
"scripts": { | ||
"build": "yarn build:js:dev && yarn build:js:prod", | ||
"build:js:dev": "NODE_ENV=development vite build --mode development", | ||
"build:js:prod": "vite build --mode production", | ||
"ae:build": "api-extractor run --local", | ||
"ae:test": "api-extractor run", | ||
"test": "vitest" | ||
"ae:test": "api-extractor run" | ||
}, | ||
"dependencies": { | ||
"@contember/utilities": "2.0.0-alpha.6" | ||
"@contember/utilities": "2.0.0-alpha.8" | ||
}, | ||
"peerDependencies": { | ||
"react": "^18 || ^19" | ||
}, | ||
"stableVersion": "0.0.0" | ||
} | ||
} |
@@ -154,9 +154,9 @@ import { assertNever } from '@contember/utilities' | ||
const treeNode = node.type as ElementType & | ||
{ | ||
[staticMethod in ValidFactoryName]: | ||
| StaticContextFactory<any, StaticContext> | ||
| SyntheticChildrenFactory<any, StaticContext> | ||
| UnconstrainedLeafRepresentationFactory<any, AllLeavesRepresentation, StaticContext> | ||
| DeclarationSiteNodeRepresentationFactory<any, unknown, AllBranchNodesRepresentation, StaticContext> | ||
} | ||
{ | ||
[staticMethod in ValidFactoryName]: | ||
| StaticContextFactory<any, StaticContext> | ||
| SyntheticChildrenFactory<any, StaticContext> | ||
| UnconstrainedLeafRepresentationFactory<any, AllLeavesRepresentation, StaticContext> | ||
| DeclarationSiteNodeRepresentationFactory<any, unknown, AllBranchNodesRepresentation, StaticContext> | ||
} | ||
@@ -163,0 +163,0 @@ componentPath = [...componentPath, node] |
export class ChildrenAnalyzerError extends Error { | ||
public details?: string | ||
constructor(message: string, options?: { cause: Error, details?: string }) { | ||
constructor(message: string, options?: { cause: Error; details?: string }) { | ||
super(message, options) | ||
@@ -6,0 +6,0 @@ this.details = options?.details |
@@ -19,10 +19,10 @@ import React, { ReactElement } from 'react' | ||
const valuePrinted = JSON.stringify(value, (key, value) => { | ||
if (typeof value === 'function') { | ||
return '(function)' | ||
} | ||
if (React.isValidElement(value)) { | ||
return '(react element)' | ||
} | ||
return value | ||
}, | ||
if (typeof value === 'function') { | ||
return '(function)' | ||
} | ||
if (React.isValidElement(value)) { | ||
return '(react element)' | ||
} | ||
return value | ||
}, | ||
) | ||
@@ -29,0 +29,0 @@ result += ` ${key}=${valuePrinted}` |
@@ -89,5 +89,5 @@ import type { ElementType } from 'react' | ||
| { | ||
type: 'declarationSite' | ||
factoryMethodName: FactoryMethodName | ||
childrenRepresentationReducer: ChildrenRepresentationReducer< | ||
type: 'declarationSite' | ||
factoryMethodName: FactoryMethodName | ||
childrenRepresentationReducer: ChildrenRepresentationReducer< | ||
ChildrenRepresentation, | ||
@@ -98,5 +98,5 @@ ReducedChildrenRepresentation | ||
| { | ||
type: 'useSite' | ||
factory: UseSiteBranchNodeRepresentationFactory<Props, ChildrenRepresentation, Representation, StaticContext> | ||
ComponentType?: ElementType<Props> | ||
type: 'useSite' | ||
factory: UseSiteBranchNodeRepresentationFactory<Props, ChildrenRepresentation, Representation, StaticContext> | ||
ComponentType?: ElementType<Props> | ||
} | ||
@@ -103,0 +103,0 @@ } |
@@ -49,9 +49,9 @@ import type { ElementType } from 'react' | ||
| { | ||
type: 'declarationSite' | ||
factoryMethodName: FactoryMethodName | ||
type: 'declarationSite' | ||
factoryMethodName: FactoryMethodName | ||
} | ||
| { | ||
type: 'useSite' | ||
factory: UnconstrainedLeafRepresentationFactory<Props, Representation, StaticContext> | ||
ComponentType?: ElementType<Props> | ||
type: 'useSite' | ||
factory: UnconstrainedLeafRepresentationFactory<Props, Representation, StaticContext> | ||
ComponentType?: ElementType<Props> | ||
} | ||
@@ -58,0 +58,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
249288
139
2139
1
+ Added@contember/utilities@2.0.0-alpha.8(transitive)
- Removed@contember/utilities@2.0.0-alpha.6(transitive)