feat: manually mirror opencoze's code from bytedance
Change-Id: I09a73aadda978ad9511264a756b2ce51f5761adf
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
diff --git a/lib/loaders/semi-theme-loader.js b/lib/loaders/semi-theme-loader.js
|
||||
index d43048cc5919b8720f6ebfba37c9313d89ae857c..863954ee319c964188b2272091b19c6e8f21b0b3 100644
|
||||
--- a/lib/loaders/semi-theme-loader.js
|
||||
+++ b/lib/loaders/semi-theme-loader.js
|
||||
@@ -14,12 +14,6 @@ function SemiThemeLoader(source) {
|
||||
// inject once
|
||||
const cssVarStr = `@import "~${theme}/scss/global.scss";\n`;
|
||||
let animationStr = `@import "~${theme}/scss/animation.scss";\n`;
|
||||
- try {
|
||||
- require.resolve(`${theme}/scss/animation.scss`);
|
||||
- }
|
||||
- catch (e) {
|
||||
- animationStr = ''; // fallback to empty string
|
||||
- }
|
||||
const shouldInject = source.includes('semi-base');
|
||||
let fileStr = source;
|
||||
let componentVariables;
|
||||
@@ -0,0 +1,26 @@
|
||||
diff --git a/es/useInfiniteScroll/index.js b/es/useInfiniteScroll/index.js
|
||||
index 55d84ef685df259db1fc3ab0e72f1dd2f9112685..1fb357f6bef8d9d3897b0f029ad0063092fad017 100644
|
||||
--- a/es/useInfiniteScroll/index.js
|
||||
+++ b/es/useInfiniteScroll/index.js
|
||||
@@ -67,7 +67,7 @@ var useInfiniteScroll = function (service, options) {
|
||||
setTimeout(function () {
|
||||
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
||||
scrollMethod();
|
||||
- });
|
||||
+ },10);
|
||||
onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess(d);
|
||||
},
|
||||
onError: function (e) {
|
||||
diff --git a/lib/useInfiniteScroll/index.js b/lib/useInfiniteScroll/index.js
|
||||
index 1316c779812180c4d85b52b226f8b0bf7cb6319e..2da9301551d1a939e94ca032e3bf28c5a061bd30 100644
|
||||
--- a/lib/useInfiniteScroll/index.js
|
||||
+++ b/lib/useInfiniteScroll/index.js
|
||||
@@ -74,7 +74,7 @@ var useInfiniteScroll = function useInfiniteScroll(service, options) {
|
||||
setTimeout(function () {
|
||||
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
||||
scrollMethod();
|
||||
- });
|
||||
+ },10);
|
||||
_onSuccess === null || _onSuccess === void 0 ? void 0 : _onSuccess(d);
|
||||
},
|
||||
onError: function onError(e) {
|
||||
@@ -0,0 +1,53 @@
|
||||
diff --git a/dist/types/polyfill.d.ts b/dist/types/polyfill.d.ts
|
||||
index e44c6635e7579aa8abbd08c6ad3271ebbe60a464..b4bc055b17952a2c148d2e4b8588306099b8fea1 100644
|
||||
--- a/dist/types/polyfill.d.ts
|
||||
+++ b/dist/types/polyfill.d.ts
|
||||
@@ -130,12 +130,12 @@ export declare class ReadableByteStreamController {
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
-export declare class ReadableStream<R = any> {
|
||||
- constructor(underlyingSource: UnderlyingByteSource, strategy?: {
|
||||
+export interface ReadableStream<R = any> {
|
||||
+ new (underlyingSource: UnderlyingByteSource, strategy?: {
|
||||
highWaterMark?: number;
|
||||
size?: undefined;
|
||||
});
|
||||
- constructor(underlyingSource?: UnderlyingSource<R>, strategy?: QueuingStrategy<R>);
|
||||
+ new (underlyingSource?: UnderlyingSource<R>, strategy?: QueuingStrategy<R>);
|
||||
/**
|
||||
* Whether or not the readable stream is locked to a {@link ReadableStreamDefaultReader | reader}.
|
||||
*/
|
||||
@@ -267,11 +267,8 @@ export declare class ReadableStreamBYOBReader {
|
||||
* @public
|
||||
*/
|
||||
export declare type ReadableStreamBYOBReadResult<T extends ArrayBufferView> = {
|
||||
- done: false;
|
||||
+ done: boolean;
|
||||
value: T;
|
||||
-} | {
|
||||
- done: true;
|
||||
- value: T | undefined;
|
||||
};
|
||||
|
||||
/**
|
||||
diff --git a/dist/types/ts3.6/polyfill.d.ts b/dist/types/ts3.6/polyfill.d.ts
|
||||
index c398f7eb0a65382916e2a94490dab5c7f2d2d390..ffc798107af0cf83bb330caf9025838e23dcfcb7 100644
|
||||
--- a/dist/types/ts3.6/polyfill.d.ts
|
||||
+++ b/dist/types/ts3.6/polyfill.d.ts
|
||||
@@ -130,12 +130,12 @@ export declare class ReadableByteStreamController {
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
-export declare class ReadableStream<R = any> {
|
||||
- constructor(underlyingSource: UnderlyingByteSource, strategy?: {
|
||||
+export interface ReadableStream<R = any> {
|
||||
+ new (underlyingSource: UnderlyingByteSource, strategy?: {
|
||||
highWaterMark?: number;
|
||||
size?: undefined;
|
||||
});
|
||||
- constructor(underlyingSource?: UnderlyingSource<R>, strategy?: QueuingStrategy<R>);
|
||||
+ new (underlyingSource?: UnderlyingSource<R>, strategy?: QueuingStrategy<R>);
|
||||
/**
|
||||
* Whether or not the readable stream is locked to a {@link ReadableStreamDefaultReader | reader}.
|
||||
*/
|
||||
@@ -0,0 +1,84 @@
|
||||
diff --git a/dist/types/ponyfill.d.ts b/dist/types/ponyfill.d.ts
|
||||
index f34e6659372d838f8f189f3f453eb664524e11f2..d1e9a9e65c4f95950f214704b3855ec97b861e3c 100644
|
||||
--- a/dist/types/ponyfill.d.ts
|
||||
+++ b/dist/types/ponyfill.d.ts
|
||||
@@ -126,12 +126,12 @@ export declare class ReadableByteStreamController {
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
-export declare class ReadableStream<R = any> {
|
||||
- constructor(underlyingSource: UnderlyingByteSource, strategy?: {
|
||||
+export interface ReadableStream<R = any> {
|
||||
+ new(underlyingSource: UnderlyingByteSource, strategy?: {
|
||||
highWaterMark?: number;
|
||||
size?: undefined;
|
||||
});
|
||||
- constructor(underlyingSource?: UnderlyingSource<R>, strategy?: QueuingStrategy<R>);
|
||||
+ new(underlyingSource?: UnderlyingSource<R>, strategy?: QueuingStrategy<R>);
|
||||
/*
|
||||
* Whether or not the readable stream is locked to a {@link ReadableStreamDefaultReader | reader}.
|
||||
*/
|
||||
@@ -220,7 +220,7 @@ export declare class ReadableStream<R = any> {
|
||||
* This can be used to adapt various kinds of objects into a readable stream,
|
||||
* such as an array, an async generator, or a Node.js readable stream.
|
||||
*/
|
||||
- static from<R>(asyncIterable: Iterable<R> | AsyncIterable<R> | ReadableStreamLike<R>): ReadableStream<R>;
|
||||
+ from<R>(asyncIterable: Iterable<R> | AsyncIterable<R> | ReadableStreamLike<R>): ReadableStream<R>;
|
||||
}
|
||||
/**
|
||||
* An async iterator returned by {@link ReadableStream.values}.
|
||||
@@ -279,11 +279,8 @@ export declare interface ReadableStreamBYOBReaderReadOptions {
|
||||
* @public
|
||||
*/
|
||||
export declare type ReadableStreamBYOBReadResult<T extends ArrayBufferView> = {
|
||||
- done: false;
|
||||
+ done: boolean;
|
||||
value: T;
|
||||
-} | {
|
||||
- done: true;
|
||||
- value: T | undefined;
|
||||
};
|
||||
/**
|
||||
* A pull-into request in a {@link ReadableByteStreamController}.
|
||||
diff --git a/dist/types/ts3.6/ponyfill.d.ts b/dist/types/ts3.6/ponyfill.d.ts
|
||||
index 73058007c661c20662d5c9336cb272cc7b7948fe..02fc82bd0d38b3b50856dff6722c31990eaf3156 100644
|
||||
--- a/dist/types/ts3.6/ponyfill.d.ts
|
||||
+++ b/dist/types/ts3.6/ponyfill.d.ts
|
||||
@@ -134,12 +134,12 @@ export declare class ReadableByteStreamController {
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
-export declare class ReadableStream<R = any> {
|
||||
- constructor(underlyingSource: UnderlyingByteSource, strategy?: {
|
||||
+export interface ReadableStream<R = any> {
|
||||
+ new(underlyingSource: UnderlyingByteSource, strategy?: {
|
||||
highWaterMark?: number;
|
||||
size?: undefined;
|
||||
});
|
||||
- constructor(underlyingSource?: UnderlyingSource<R>, strategy?: QueuingStrategy<R>);
|
||||
+ new(underlyingSource?: UnderlyingSource<R>, strategy?: QueuingStrategy<R>);
|
||||
/**
|
||||
* Whether or not the readable stream is locked to a {@link ReadableStreamDefaultReader | reader}.
|
||||
*/
|
||||
@@ -225,7 +225,7 @@ export declare class ReadableStream<R = any> {
|
||||
* This can be used to adapt various kinds of objects into a readable stream,
|
||||
* such as an array, an async generator, or a Node.js readable stream.
|
||||
*/
|
||||
- static from<R>(asyncIterable: Iterable<R> | AsyncIterable<R> | ReadableStreamLike<R>): ReadableStream<R>;
|
||||
+ from<R>(asyncIterable: Iterable<R> | AsyncIterable<R> | ReadableStreamLike<R>): ReadableStream<R>;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -288,11 +288,8 @@ export declare interface ReadableStreamBYOBReaderReadOptions {
|
||||
* @public
|
||||
*/
|
||||
export declare type ReadableStreamBYOBReadResult<T extends ArrayBufferView> = {
|
||||
- done: false;
|
||||
+ done: boolean;
|
||||
value: T;
|
||||
-} | {
|
||||
- done: true;
|
||||
- value: T | undefined;
|
||||
};
|
||||
|
||||
/**
|
||||
Reference in New Issue
Block a user