feature: vor und nachteile

This commit is contained in:
Hikyu
2026-05-31 13:54:31 +02:00
parent 552a947a1c
commit e3dad17446
23270 changed files with 3024794 additions and 200 deletions
@@ -0,0 +1,2 @@
export declare function namespace(name: string): string;
export declare function registerCustomProperties(): void;
+41
View File
@@ -0,0 +1,41 @@
const transforms = [
{
name: 'translate',
syntax: 'length-percentage',
initial: '0px'
},
{
name: 'scale',
syntax: 'number',
initial: 1
},
{
name: 'rotate',
syntax: 'angle',
initial: '0deg'
}
];
const axes = ['x', 'y', 'z'];
const customProperties = [];
transforms.forEach(({ name, syntax, initial }) => {
customProperties.push({ name, syntax, initial });
axes.forEach(axis => customProperties.push({
name: `${name}-${axis}`,
syntax,
initial
}));
});
export function namespace(name) {
return `--pm-${name}`;
}
export function registerCustomProperties() {
customProperties.forEach(({ name, syntax, initial }) => {
CSS.registerProperty({
name: namespace(name),
syntax: `<${syntax}>`,
inherits: false,
initialValue: initial
});
});
}
//# sourceMappingURL=custom-properties.js.map
+2
View File
@@ -0,0 +1,2 @@
export declare function whenWorkletReady(): Promise<void>;
export declare function workletReady(): void;
+20
View File
@@ -0,0 +1,20 @@
import { __awaiter } from "tslib";
let isReady = false;
const awaitingReady = [];
export function whenWorkletReady() {
return __awaiter(this, void 0, void 0, function* () {
if (!isReady) {
return new Promise((resolve) => {
awaitingReady.push(resolve);
});
}
});
}
function flushAwaiting() {
awaitingReady.forEach((resolve) => resolve());
}
export function workletReady() {
isReady = true;
flushAwaiting();
}
//# sourceMappingURL=load-worklet.js.map