Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/v3' into next
Browse files Browse the repository at this point in the history
  • Loading branch information
weareoutman committed Jun 21, 2024
2 parents d6a883e + a75d360 commit 5788bc6
Show file tree
Hide file tree
Showing 133 changed files with 4,382 additions and 563 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/update-docs-etc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ jobs:
run: |
npx lerna run build --scope @next-core/types || npx lerna run docs:dev --scope @next-core/types
npx lerna run build --scope @next-core/runtime || npx lerna run docs:dev --scope @next-core/runtime
env:
NX_REJECT_UNKNOWN_LOCAL_CACHE: '0'

- name: Git commit and push
run: |
Expand Down
112 changes: 112 additions & 0 deletions bricks/e2e/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,118 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [0.4.10](https://github.com/easyops-cn/next-core/compare/@next-bricks/[email protected]...@next-bricks/[email protected]) (2024-06-21)

**Note:** Version bump only for package @next-bricks/e2e





## [0.4.9](https://github.com/easyops-cn/next-core/compare/@next-bricks/[email protected]...@next-bricks/[email protected]) (2024-06-21)

**Note:** Version bump only for package @next-bricks/e2e





## [0.4.8](https://github.com/easyops-cn/next-core/compare/@next-bricks/[email protected]...@next-bricks/[email protected]) (2024-06-20)

**Note:** Version bump only for package @next-bricks/e2e





## [0.4.7](https://github.com/easyops-cn/next-core/compare/@next-bricks/[email protected]...@next-bricks/[email protected]) (2024-06-19)

**Note:** Version bump only for package @next-bricks/e2e





## [0.4.6](https://github.com/easyops-cn/next-core/compare/@next-bricks/[email protected]...@next-bricks/[email protected]) (2024-06-18)

**Note:** Version bump only for package @next-bricks/e2e





## [0.4.5](https://github.com/easyops-cn/next-core/compare/@next-bricks/[email protected]...@next-bricks/[email protected]) (2024-06-18)

**Note:** Version bump only for package @next-bricks/e2e





## [0.4.4](https://github.com/easyops-cn/next-core/compare/@next-bricks/[email protected]...@next-bricks/[email protected]) (2024-06-18)

**Note:** Version bump only for package @next-bricks/e2e





## [0.4.3](https://github.com/easyops-cn/next-core/compare/@next-bricks/[email protected]...@next-bricks/[email protected]) (2024-06-17)

**Note:** Version bump only for package @next-bricks/e2e





## [0.4.2](https://github.com/easyops-cn/next-core/compare/@next-bricks/[email protected]...@next-bricks/[email protected]) (2024-06-11)

**Note:** Version bump only for package @next-bricks/e2e





## [0.4.1](https://github.com/easyops-cn/next-core/compare/@next-bricks/[email protected]...@next-bricks/[email protected]) (2024-06-07)

**Note:** Version bump only for package @next-bricks/e2e





# [0.4.0](https://github.com/easyops-cn/next-core/compare/@next-bricks/[email protected]...@next-bricks/[email protected]) (2024-06-06)


### Bug Fixes

* add repository directory in package.json ([4610d09](https://github.com/easyops-cn/next-core/commit/4610d0987f98b4cda82aa232e488f375bcfd42a3))


### Features

* support useLazyWrapBrick ([39767cf](https://github.com/easyops-cn/next-core/commit/39767cfd09cce5e9f80c4ab93c81d73a5eac0dc2))





## [0.3.25](https://github.com/easyops-cn/next-core/compare/@next-bricks/[email protected]...@next-bricks/[email protected]) (2024-06-04)

**Note:** Version bump only for package @next-bricks/e2e





## [0.3.24](https://github.com/easyops-cn/next-core/compare/@next-bricks/[email protected]...@next-bricks/[email protected]) (2024-06-03)

**Note:** Version bump only for package @next-bricks/e2e





## [0.3.23](https://github.com/easyops-cn/next-core/compare/@next-bricks/[email protected]...@next-bricks/[email protected]) (2024-05-22)

**Note:** Version bump only for package @next-bricks/e2e
Expand Down
23 changes: 12 additions & 11 deletions bricks/e2e/package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
"name": "@next-bricks/e2e",
"version": "0.3.23",
"version": "0.4.10",
"private": true,
"homepage": "https://github.com/easyops-cn/next-core/tree/v3/bricks/e2e",
"repository": {
"type": "git",
"url": "[email protected]:easyops-cn/next-core.git"
"url": "[email protected]:easyops-cn/next-core.git",
"directory": "bricks/e2e"
},
"license": "GPL-3.0",
"type": "module",
Expand Down Expand Up @@ -35,17 +36,17 @@
"build": "cross-env NODE_ENV=production build-next-bricks"
},
"dependencies": {
"@next-core/element": "^1.2.7",
"@next-core/i18n": "^1.0.47",
"@next-core/react-element": "^1.0.26",
"@next-core/react-runtime": "^1.5.2",
"@next-core/runtime": "^1.44.2",
"@next-core/types": "^1.11.0",
"@next-core/utils": "^1.7.5",
"@next-core/element": "^1.2.9",
"@next-core/i18n": "^1.0.54",
"@next-core/react-element": "^1.0.28",
"@next-core/react-runtime": "^1.6.9",
"@next-core/runtime": "^1.49.5",
"@next-core/types": "^1.11.1",
"@next-core/utils": "^1.7.12",
"react": "0.0.0-experimental-ee8509801-20230117"
},
"devDependencies": {
"@next-core/build-next-bricks": "^1.21.0",
"@next-core/test-next": "^1.1.1"
"@next-core/build-next-bricks": "^1.22.1",
"@next-core/test-next": "^1.1.3"
}
}
13 changes: 13 additions & 0 deletions bricks/e2e/src/async-dep-alt/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import React from "react";
import { createDecorators } from "@next-core/element";
import { ReactNextElement } from "@next-core/react-element";

const { defineElement } = createDecorators();

export
@defineElement("e2e.async-dep-alt")
class AsyncDepAlt extends ReactNextElement {
render() {
return <p>Async Dependency Alternative</p>;
}
}
30 changes: 16 additions & 14 deletions bricks/e2e/src/async-wrap/index.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
import React from "react";
import React, { Suspense, useState } from "react";
import { createDecorators } from "@next-core/element";
import { ReactNextElement } from "@next-core/react-element";
import { asyncWrapBrick } from "@next-core/react-runtime";

const AsyncDep = React.lazy(async () => ({
default: await asyncWrapBrick("e2e.async-dep"),
}));
import { useLazyWrapBrick } from "@next-core/react-runtime";

const { defineElement } = createDecorators();

Expand All @@ -18,17 +14,23 @@ class AsyncWrap extends ReactNextElement {
}

export function AsyncWrapComponent() {
const [showDep, setShowDep] = React.useState(false);
const [dep, setDep] = useState("");

const DepComponent = useLazyWrapBrick(dep || null);

return (
<>
<h2>Async Wrapper</h2>
{showDep ? (
<React.Suspense fallback="Loading...">
<AsyncDep />
</React.Suspense>
) : (
<button onClick={() => setShowDep(true)}>Show Dependency</button>
)}
<p>
<select defaultValue="" onChange={(e) => setDep(e.target.value)}>
<option value="">Dep: none</option>
<option value="e2e.async-dep">Dep: async-dep</option>
<option value="e2e.async-dep-alt">Dep: async-dep-alt</option>
</select>
</p>
<Suspense fallback="Loading...">
{DepComponent && <DepComponent />}
</Suspense>
</>
);
}
1 change: 1 addition & 0 deletions bricks/e2e/src/bootstrap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ import "./list-by-use-brick/index.js";
import "./data-providers/return-by-timeout.js";
import "./async-wrap/index.js";
import "./async-dep/index.js";
import "./async-dep-alt/index.js";
5 changes: 5 additions & 0 deletions declarations/global.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ declare module "*.css" {
export default css;
}

declare module "*.txt" {
const source: string;
export default source;
}

declare module "@ungap/event-target" {
export default EventTarget;
}
Expand Down
40 changes: 36 additions & 4 deletions etc/runtime.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
```ts

import type { default as __2 } from 'lodash';
import { __dev_only_getGlobalExecutionContextStack } from '@next-core/cook';
import type { Action } from 'history';
import type { BatchUpdateContextItem } from '@next-core/types';
import type { BootstrapData } from '@next-core/types';
Expand All @@ -13,9 +15,10 @@ import type { BrickEventHandler } from '@next-core/types';
import type { BrickEventHandlerCallback } from '@next-core/types';
import type { BrickEventsMap } from '@next-core/types';
import type { BrickLifeCycle } from '@next-core/types';
import { BrickPackage } from '@next-core/types';
import type { BrickPackage } from '@next-core/types';
import type { ContextConf } from '@next-core/types';
import type { Contract } from '@next-core/types';
import { cook } from '@next-core/cook';
import type { CustomTemplate } from '@next-core/types';
import type { CustomTemplateConstructor } from '@next-core/types';
import type { CustomTemplateProxy } from '@next-core/types';
Expand All @@ -28,6 +31,7 @@ import { LocationDescriptor } from 'history';
import type { MetaI18n } from '@next-core/types';
import { MicroApp } from '@next-core/types';
import type { PermissionApi_validatePermissions } from '@next-api-sdk/micro-app-sdk';
import { precookFunction } from '@next-core/cook';
import type { ResolveConf } from '@next-core/types';
import type { RouteConf } from '@next-core/types';
import type { RuntimeSnippet } from '@next-core/types';
Expand All @@ -38,6 +42,7 @@ import type { SlotConfOfRoutes } from '@next-core/types';
import type { StaticMenuConf } from '@next-core/types';
import type { Storyboard } from '@next-core/types';
import { StoryboardFunction } from '@next-core/types';
import { supply } from '@next-core/supply';
import type { UseProviderResolveConf } from '@next-core/types';
import type { UseSingleBrickConf } from '@next-core/types';

Expand All @@ -56,9 +61,11 @@ declare namespace __secret_internals {
getAllContextValues,
getBrickPackagesById,
loadBricks,
loadEditors,
getRenderId,
getAddedContracts,
debugDataValue,
getLegalRuntimeValue,
DataValueOption,
RuntimeContext,
symbolForRootRuntimeContext,
Expand Down Expand Up @@ -117,6 +124,11 @@ export interface CreateRootOptions {
// @public (undocumented)
export function createRuntime(options?: RuntimeOptions): Runtime;

// Warning: (ae-forgotten-export) The symbol "CustomEditorRegistry" needs to be exported by the entry point index.d.ts
//
// @public (undocumented)
export const customEditors: CustomEditorRegistry;

// Warning: (ae-forgotten-export) The symbol "CustomProcessorRegistry" needs to be exported by the entry point index.d.ts
//
// @public (undocumented)
Expand All @@ -129,14 +141,16 @@ export const customTemplates: CustomTemplateRegistry;

// @public (undocumented)
interface DataValueOption {
// (undocumented)
routeId?: string;
// (undocumented)
tplStateStoreId?: string;
}

// Warning: (ae-forgotten-export) The symbol "DebugDataValue" needs to be exported by the entry point index.d.ts
//
// @public (undocumented)
function debugDataValue(debugData: DebugDataValue, { tplStateStoreId }: DataValueOption): Promise<any>;
function debugDataValue(debugData: DebugDataValue, { tplStateStoreId, routeId }: DataValueOption): Promise<any>;

// @public (undocumented)
export const Dialog: Readonly<{
Expand Down Expand Up @@ -193,6 +207,12 @@ export function getCurrentTheme(): SiteTheme;
// @public (undocumented)
export const getHistory: () => NextHistory;

// Warning: (ae-forgotten-export) The symbol "RuntimeDataValueOption" needs to be exported by the entry point index.d.ts
// Warning: (ae-forgotten-export) The symbol "RuntimeDataVale" needs to be exported by the entry point index.d.ts
//
// @public (undocumented)
function getLegalRuntimeValue(options?: RuntimeDataValueOption): RuntimeDataVale;

// @public (undocumented)
export function getPageInfo(): PageInfo;

Expand Down Expand Up @@ -236,6 +256,9 @@ function legacyDoTransform(data: unknown, to: unknown, options?: unknown): unkno
// @public
function loadBricks(bricks: string[]): Promise<void>;

// @public
function loadEditors(editors: string[] | Set<string>, brickPackages?: BrickPackage[]): Promise<void>;

// @public @deprecated (undocumented)
export function logout(): unknown;

Expand Down Expand Up @@ -475,10 +498,19 @@ export function setUIVersion(version: string | undefined | null): void;
// Warning: (ae-internal-missing-underscore) The name "StoryboardFunctionRegistryFactory" should be prefixed with an underscore because the declaration is marked as @internal
//
// @internal (undocumented)
export function StoryboardFunctionRegistryFactory({ widgetId, widgetVersion, collectCoverage, }?: {
export function StoryboardFunctionRegistryFactory({ widgetId, widgetVersion, collectCoverage, debuggerOverrides, }?: {
widgetId?: string;
widgetVersion?: string;
collectCoverage?: FunctionCoverageSettings;
debuggerOverrides?: (ctx: {
precookFunction: typeof precookFunction;
cook: typeof cook;
supply: typeof supply;
}) => {
LodashWithStaticFields?: Partial<typeof __2>;
ArrayConstructor?: typeof Array;
ObjectWithStaticFields?: Partial<typeof Object>;
};
}): StoryboardFunctionRegistry;

// @public (undocumented)
Expand Down Expand Up @@ -519,7 +551,7 @@ function updateTemplatePreviewSettings(appId: string, templateId: string, settin
//
// dist/types/Dialog.d.ts:10:5 - (ae-forgotten-export) The symbol "show_2" needs to be exported by the entry point index.d.ts
// dist/types/Notification.d.ts:8:5 - (ae-forgotten-export) The symbol "show" needs to be exported by the entry point index.d.ts
// dist/types/StoryboardFunctionRegistry.d.ts:43:5 - (ae-forgotten-export) The symbol "FunctionCoverageSettings" needs to be exported by the entry point index.d.ts
// dist/types/StoryboardFunctionRegistry.d.ts:47:5 - (ae-forgotten-export) The symbol "FunctionCoverageSettings" needs to be exported by the entry point index.d.ts
// dist/types/internal/Runtime.d.ts:34:9 - (ae-forgotten-export) The symbol "AppForCheck" needs to be exported by the entry point index.d.ts

// (No @packageDocumentation comment for this package)
Expand Down
4 changes: 4 additions & 0 deletions mock-micro-apps/e2e/storyboard.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -841,3 +841,7 @@ routes:
- brick: div
properties:
textContent: Real Other Route

- path: '${APP.homepage}/async-wrap-brick'
bricks:
- brick: e2e.async-wrap
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"cypress": "^13.12.0",
"eslint": "^8.57.0",
"eslint-plugin-react": "^7.34.3",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-hooks": "^4.6.2",
"husky": "^9.0.11",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
Expand Down
Loading

0 comments on commit 5788bc6

Please sign in to comment.