|
1 | | -// This file is autogenerated by scripts |
2 | | -// Do NOT modify this file manually |
| 1 | +import {sortObject} from '../utilities.mjs'; |
| 2 | +import esBuiltinGlobals from './builtin.mjs'; |
3 | 3 |
|
4 | | -export default { |
5 | | - AsyncDisposableStack: false, |
6 | | - ByteLengthQueuingStrategy: false, |
7 | | - console: false, |
8 | | - CountQueuingStrategy: false, |
9 | | - CSSImageValue: false, |
10 | | - CSSKeywordValue: false, |
11 | | - CSSMathClamp: false, |
12 | | - CSSMathInvert: false, |
13 | | - CSSMathMax: false, |
14 | | - CSSMathMin: false, |
15 | | - CSSMathNegate: false, |
16 | | - CSSMathProduct: false, |
17 | | - CSSMathSum: false, |
18 | | - CSSMathValue: false, |
19 | | - CSSMatrixComponent: false, |
20 | | - CSSNumericArray: false, |
21 | | - CSSNumericValue: false, |
22 | | - CSSPerspective: false, |
23 | | - CSSPositionValue: false, |
24 | | - CSSRotate: false, |
25 | | - CSSScale: false, |
26 | | - CSSSkew: false, |
27 | | - CSSSkewX: false, |
28 | | - CSSSkewY: false, |
29 | | - CSSStyleValue: false, |
30 | | - CSSTransformComponent: false, |
31 | | - CSSTransformValue: false, |
32 | | - CSSTranslate: false, |
33 | | - CSSUnitValue: false, |
34 | | - CSSUnparsedValue: false, |
35 | | - CSSVariableReferenceValue: false, |
36 | | - devicePixelRatio: false, |
37 | | - DisposableStack: false, |
38 | | - PaintRenderingContext2D: false, |
39 | | - PaintSize: false, |
40 | | - PaintWorkletGlobalScope: false, |
41 | | - Path2D: false, |
42 | | - QuotaExceededError: false, |
43 | | - ReadableByteStreamController: false, |
44 | | - ReadableStream: false, |
45 | | - ReadableStreamBYOBReader: false, |
46 | | - ReadableStreamBYOBRequest: false, |
47 | | - ReadableStreamDefaultController: false, |
48 | | - ReadableStreamDefaultReader: false, |
49 | | - registerPaint: false, |
50 | | - StylePropertyMapReadOnly: false, |
51 | | - SuppressedError: false, |
52 | | - TransformStream: false, |
53 | | - TransformStreamDefaultController: false, |
54 | | - WebAssembly: false, |
55 | | - WorkletGlobalScope: false, |
56 | | - WritableStream: false, |
57 | | - WritableStreamDefaultController: false, |
58 | | - WritableStreamDefaultWriter: false, |
59 | | -}; |
| 4 | +/* |
| 5 | +Steps to update `paintWorklet` globals: |
| 6 | +
|
| 7 | +1. Start `node scripts/browser/start.mjs` |
| 8 | +1. Navigate to `http://127.0.0.1:3000` in browser |
| 9 | +1. Click `Get 'paintWorklet' globals` button |
| 10 | +1. Copy properties from console and paste to `globalProperties` |
| 11 | +1. Run `npm run build` |
| 12 | +*/ |
| 13 | + |
| 14 | +const globalProperties = [ |
| 15 | + 'Object', |
| 16 | + 'Function', |
| 17 | + 'Array', |
| 18 | + 'Number', |
| 19 | + 'parseFloat', |
| 20 | + 'parseInt', |
| 21 | + 'Infinity', |
| 22 | + 'NaN', |
| 23 | + 'undefined', |
| 24 | + 'Boolean', |
| 25 | + 'String', |
| 26 | + 'Symbol', |
| 27 | + 'Date', |
| 28 | + 'Promise', |
| 29 | + 'RegExp', |
| 30 | + 'Error', |
| 31 | + 'AggregateError', |
| 32 | + 'EvalError', |
| 33 | + 'RangeError', |
| 34 | + 'ReferenceError', |
| 35 | + 'SyntaxError', |
| 36 | + 'TypeError', |
| 37 | + 'URIError', |
| 38 | + 'globalThis', |
| 39 | + 'JSON', |
| 40 | + 'Math', |
| 41 | + 'Intl', |
| 42 | + 'ArrayBuffer', |
| 43 | + 'Atomics', |
| 44 | + 'Uint8Array', |
| 45 | + 'Int8Array', |
| 46 | + 'Uint16Array', |
| 47 | + 'Int16Array', |
| 48 | + 'Uint32Array', |
| 49 | + 'Int32Array', |
| 50 | + 'BigUint64Array', |
| 51 | + 'BigInt64Array', |
| 52 | + 'Uint8ClampedArray', |
| 53 | + 'Float32Array', |
| 54 | + 'Float64Array', |
| 55 | + 'DataView', |
| 56 | + 'Map', |
| 57 | + 'BigInt', |
| 58 | + 'Set', |
| 59 | + 'Iterator', |
| 60 | + 'WeakMap', |
| 61 | + 'WeakSet', |
| 62 | + 'Proxy', |
| 63 | + 'Reflect', |
| 64 | + 'FinalizationRegistry', |
| 65 | + 'WeakRef', |
| 66 | + 'decodeURI', |
| 67 | + 'decodeURIComponent', |
| 68 | + 'encodeURI', |
| 69 | + 'encodeURIComponent', |
| 70 | + 'escape', |
| 71 | + 'unescape', |
| 72 | + 'eval', |
| 73 | + 'isFinite', |
| 74 | + 'isNaN', |
| 75 | + 'console', |
| 76 | + 'QuotaExceededError', |
| 77 | + 'WritableStreamDefaultWriter', |
| 78 | + 'WritableStreamDefaultController', |
| 79 | + 'WritableStream', |
| 80 | + 'WorkletGlobalScope', |
| 81 | + 'TransformStreamDefaultController', |
| 82 | + 'TransformStream', |
| 83 | + 'StylePropertyMapReadOnly', |
| 84 | + 'ReadableStreamDefaultReader', |
| 85 | + 'ReadableStreamDefaultController', |
| 86 | + 'ReadableStreamBYOBRequest', |
| 87 | + 'ReadableStreamBYOBReader', |
| 88 | + 'ReadableStream', |
| 89 | + 'ReadableByteStreamController', |
| 90 | + 'Path2D', |
| 91 | + 'PaintWorkletGlobalScope', |
| 92 | + 'PaintSize', |
| 93 | + 'PaintRenderingContext2D', |
| 94 | + 'CountQueuingStrategy', |
| 95 | + 'CSSVariableReferenceValue', |
| 96 | + 'CSSUnparsedValue', |
| 97 | + 'CSSUnitValue', |
| 98 | + 'CSSTranslate', |
| 99 | + 'CSSTransformValue', |
| 100 | + 'CSSTransformComponent', |
| 101 | + 'CSSStyleValue', |
| 102 | + 'CSSSkewY', |
| 103 | + 'CSSSkewX', |
| 104 | + 'CSSSkew', |
| 105 | + 'CSSScale', |
| 106 | + 'CSSRotate', |
| 107 | + 'CSSPositionValue', |
| 108 | + 'CSSPerspective', |
| 109 | + 'CSSNumericValue', |
| 110 | + 'CSSNumericArray', |
| 111 | + 'CSSMatrixComponent', |
| 112 | + 'CSSMathValue', |
| 113 | + 'CSSMathSum', |
| 114 | + 'CSSMathProduct', |
| 115 | + 'CSSMathNegate', |
| 116 | + 'CSSMathMin', |
| 117 | + 'CSSMathMax', |
| 118 | + 'CSSMathInvert', |
| 119 | + 'CSSMathClamp', |
| 120 | + 'CSSKeywordValue', |
| 121 | + 'CSSImageValue', |
| 122 | + 'ByteLengthQueuingStrategy', |
| 123 | + 'devicePixelRatio', |
| 124 | + 'registerPaint', |
| 125 | + 'Temporal', |
| 126 | + 'SuppressedError', |
| 127 | + 'DisposableStack', |
| 128 | + 'AsyncDisposableStack', |
| 129 | + 'Float16Array', |
| 130 | + 'WebAssembly', |
| 131 | +]; |
| 132 | + |
| 133 | +export default sortObject(Object.fromEntries( |
| 134 | + globalProperties |
| 135 | + .filter(name => !Object.hasOwn(esBuiltinGlobals, name)) |
| 136 | + .map(name => [name, false]), |
| 137 | +)); |
0 commit comments