@teleporthq/teleport-shared 0.43.46 → 0.43.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/__tests__/utils/js-identifiers.ts +147 -0
- package/dist/cjs/index.d.ts +4 -1
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +7 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/tsconfig.tsbuildinfo +1 -1
- package/dist/cjs/utils/js-identifiers.d.ts +89 -0
- package/dist/cjs/utils/js-identifiers.d.ts.map +1 -0
- package/dist/cjs/utils/js-identifiers.js +208 -0
- package/dist/cjs/utils/js-identifiers.js.map +1 -0
- package/dist/cjs/utils/layout-topology.d.ts +50 -0
- package/dist/cjs/utils/layout-topology.d.ts.map +1 -0
- package/dist/cjs/utils/layout-topology.js +78 -0
- package/dist/cjs/utils/layout-topology.js.map +1 -0
- package/dist/cjs/utils/route-paths.d.ts +45 -0
- package/dist/cjs/utils/route-paths.d.ts.map +1 -0
- package/dist/cjs/utils/route-paths.js +86 -0
- package/dist/cjs/utils/route-paths.js.map +1 -0
- package/dist/cjs/utils/string-utils.d.ts +18 -0
- package/dist/cjs/utils/string-utils.d.ts.map +1 -1
- package/dist/cjs/utils/string-utils.js +24 -2
- package/dist/cjs/utils/string-utils.js.map +1 -1
- package/dist/esm/index.d.ts +4 -1
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +4 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/tsconfig.tsbuildinfo +1 -1
- package/dist/esm/utils/js-identifiers.d.ts +89 -0
- package/dist/esm/utils/js-identifiers.d.ts.map +1 -0
- package/dist/esm/utils/js-identifiers.js +200 -0
- package/dist/esm/utils/js-identifiers.js.map +1 -0
- package/dist/esm/utils/layout-topology.d.ts +50 -0
- package/dist/esm/utils/layout-topology.d.ts.map +1 -0
- package/dist/esm/utils/layout-topology.js +71 -0
- package/dist/esm/utils/layout-topology.js.map +1 -0
- package/dist/esm/utils/route-paths.d.ts +45 -0
- package/dist/esm/utils/route-paths.d.ts.map +1 -0
- package/dist/esm/utils/route-paths.js +81 -0
- package/dist/esm/utils/route-paths.js.map +1 -0
- package/dist/esm/utils/string-utils.d.ts +18 -0
- package/dist/esm/utils/string-utils.d.ts.map +1 -1
- package/dist/esm/utils/string-utils.js +22 -1
- package/dist/esm/utils/string-utils.js.map +1 -1
- package/package.json +3 -3
- package/src/index.ts +12 -1
- package/src/utils/js-identifiers.ts +214 -0
- package/src/utils/layout-topology.ts +91 -0
- package/src/utils/route-paths.ts +87 -0
- package/src/utils/string-utils.ts +24 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"program":{"fileNames":["../../../../node_modules/typescript/lib/lib.es5.d.ts","../../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../../node_modules/typescript/lib/lib.es2020.d.ts","../../../../node_modules/typescript/lib/lib.dom.d.ts","../../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../../teleport-types/dist/cjs/helper.d.ts","../../../teleport-types/dist/cjs/uidl.d.ts","../../../../node_modules/@babel/types/lib/index.d.ts","../../../teleport-types/dist/cjs/generators.d.ts","../../../teleport-types/dist/cjs/errors.d.ts","../../../teleport-types/dist/cjs/vuidl.d.ts","../../../teleport-types/dist/cjs/index.d.ts","../../src/constants/index.ts","../../src/utils/string-utils.ts","../../src/utils/uidl-utils.ts","../../src/utils/generic.ts","../../src/index.ts","../../../../node_modules/@types/node/assert.d.ts","../../../../node_modules/@types/node/assert/strict.d.ts","../../../../node_modules/buffer/index.d.ts","../../../../node_modules/undici-types/header.d.ts","../../../../node_modules/undici-types/readable.d.ts","../../../../node_modules/undici-types/file.d.ts","../../../../node_modules/undici-types/fetch.d.ts","../../../../node_modules/undici-types/formdata.d.ts","../../../../node_modules/undici-types/connector.d.ts","../../../../node_modules/undici-types/client.d.ts","../../../../node_modules/undici-types/errors.d.ts","../../../../node_modules/undici-types/dispatcher.d.ts","../../../../node_modules/undici-types/global-dispatcher.d.ts","../../../../node_modules/undici-types/global-origin.d.ts","../../../../node_modules/undici-types/pool-stats.d.ts","../../../../node_modules/undici-types/pool.d.ts","../../../../node_modules/undici-types/handlers.d.ts","../../../../node_modules/undici-types/balanced-pool.d.ts","../../../../node_modules/undici-types/agent.d.ts","../../../../node_modules/undici-types/mock-interceptor.d.ts","../../../../node_modules/undici-types/mock-agent.d.ts","../../../../node_modules/undici-types/mock-client.d.ts","../../../../node_modules/undici-types/mock-pool.d.ts","../../../../node_modules/undici-types/mock-errors.d.ts","../../../../node_modules/undici-types/proxy-agent.d.ts","../../../../node_modules/undici-types/api.d.ts","../../../../node_modules/undici-types/cookies.d.ts","../../../../node_modules/undici-types/patch.d.ts","../../../../node_modules/undici-types/filereader.d.ts","../../../../node_modules/undici-types/diagnostics-channel.d.ts","../../../../node_modules/undici-types/websocket.d.ts","../../../../node_modules/undici-types/content-type.d.ts","../../../../node_modules/undici-types/cache.d.ts","../../../../node_modules/undici-types/interceptors.d.ts","../../../../node_modules/undici-types/index.d.ts","../../../../node_modules/@types/node/globals.d.ts","../../../../node_modules/@types/node/async_hooks.d.ts","../../../../node_modules/@types/node/buffer.d.ts","../../../../node_modules/@types/node/child_process.d.ts","../../../../node_modules/@types/node/cluster.d.ts","../../../../node_modules/@types/node/console.d.ts","../../../../node_modules/@types/node/constants.d.ts","../../../../node_modules/@types/node/crypto.d.ts","../../../../node_modules/@types/node/dgram.d.ts","../../../../node_modules/@types/node/diagnostics_channel.d.ts","../../../../node_modules/@types/node/dns.d.ts","../../../../node_modules/@types/node/dns/promises.d.ts","../../../../node_modules/@types/node/domain.d.ts","../../../../node_modules/@types/node/dom-events.d.ts","../../../../node_modules/@types/node/events.d.ts","../../../../node_modules/@types/node/fs.d.ts","../../../../node_modules/@types/node/fs/promises.d.ts","../../../../node_modules/@types/node/http.d.ts","../../../../node_modules/@types/node/http2.d.ts","../../../../node_modules/@types/node/https.d.ts","../../../../node_modules/@types/node/inspector.d.ts","../../../../node_modules/@types/node/module.d.ts","../../../../node_modules/@types/node/net.d.ts","../../../../node_modules/@types/node/os.d.ts","../../../../node_modules/@types/node/path.d.ts","../../../../node_modules/@types/node/perf_hooks.d.ts","../../../../node_modules/@types/node/process.d.ts","../../../../node_modules/@types/node/punycode.d.ts","../../../../node_modules/@types/node/querystring.d.ts","../../../../node_modules/@types/node/readline.d.ts","../../../../node_modules/@types/node/readline/promises.d.ts","../../../../node_modules/@types/node/repl.d.ts","../../../../node_modules/@types/node/stream.d.ts","../../../../node_modules/@types/node/stream/promises.d.ts","../../../../node_modules/@types/node/stream/consumers.d.ts","../../../../node_modules/@types/node/stream/web.d.ts","../../../../node_modules/@types/node/string_decoder.d.ts","../../../../node_modules/@types/node/test.d.ts","../../../../node_modules/@types/node/timers.d.ts","../../../../node_modules/@types/node/timers/promises.d.ts","../../../../node_modules/@types/node/tls.d.ts","../../../../node_modules/@types/node/trace_events.d.ts","../../../../node_modules/@types/node/tty.d.ts","../../../../node_modules/@types/node/url.d.ts","../../../../node_modules/@types/node/util.d.ts","../../../../node_modules/@types/node/v8.d.ts","../../../../node_modules/@types/node/vm.d.ts","../../../../node_modules/@types/node/wasi.d.ts","../../../../node_modules/@types/node/worker_threads.d.ts","../../../../node_modules/@types/node/zlib.d.ts","../../../../node_modules/@types/node/globals.global.d.ts","../../../../node_modules/@types/node/index.d.ts","../../../../node_modules/@types/jest/node_modules/jest-diff/build/cleanupSemantic.d.ts","../../../../node_modules/@types/jest/node_modules/jest-diff/build/types.d.ts","../../../../node_modules/@types/jest/node_modules/jest-diff/build/diffLines.d.ts","../../../../node_modules/@types/jest/node_modules/jest-diff/build/printDiffs.d.ts","../../../../node_modules/@types/jest/node_modules/jest-diff/build/index.d.ts","../../../../node_modules/@types/jest/node_modules/pretty-format/build/types.d.ts","../../../../node_modules/@types/jest/node_modules/pretty-format/build/index.d.ts","../../../../node_modules/@types/jest/index.d.ts","../../../../node_modules/@types/jest/ts3.2/index.d.ts"],"fileInfos":[{"version":"8730f4bf322026ff5229336391a18bcaa1f94d4f82416c8b2f3954e2ccaae2ba","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","4b421cbfb3a38a27c279dec1e9112c3d1da296f77a1a85ddadf7e7a425d45d18","1fc5ab7a764205c68fa10d381b08417795fc73111d6dd16b5b1ed36badb743d9",{"version":"3aafcb693fe5b5c3bd277bd4c3a617b53db474fe498fc5df067c5603b1eebde7","affectsGlobalScope":true},{"version":"adb996790133eb33b33aadb9c09f15c2c575e71fb57a62de8bf74dbf59ec7dfb","affectsGlobalScope":true},{"version":"8cc8c5a3bac513368b0157f3d8b31cfdcfe78b56d3724f30f80ed9715e404af8","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"c5c05907c02476e4bde6b7e76a79ffcd948aedd14b6a8f56e4674221b0417398","affectsGlobalScope":true},{"version":"5f406584aef28a331c36523df688ca3650288d14f39c5d2e555c95f0d2ff8f6f","affectsGlobalScope":true},{"version":"22f230e544b35349cfb3bd9110b6ef37b41c6d6c43c3314a31bd0d9652fcec72","affectsGlobalScope":true},{"version":"7ea0b55f6b315cf9ac2ad622b0a7813315bb6e97bf4bb3fbf8f8affbca7dc695","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"eb26de841c52236d8222f87e9e6a235332e0788af8c87a71e9e210314300410a","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"81cac4cbc92c0c839c70f8ffb94eb61e2d32dc1c3cf6d95844ca099463cf37ea","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"6e7997ef61de3132e4d4b2250e75343f487903ddf5370e7ce33cf1b9db9a63ed","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"5e5e095c4470c8bab227dbbc61374878ecead104c74ab9960d3adcccfee23205","affectsGlobalScope":true},{"version":"09aa50414b80c023553090e2f53827f007a301bc34b0495bfb2c3c08ab9ad1eb","affectsGlobalScope":true},{"version":"d7f680a43f8cd12a6b6122c07c54ba40952b0c8aa140dcfcf32eb9e6cb028596","affectsGlobalScope":true},{"version":"3787b83e297de7c315d55d4a7c546ae28e5f6c0a361b7a1dcec1f1f50a54ef11","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"2768ef564cfc0689a1b76106c421a2909bdff0acbe87da010785adab80efdd5c","affectsGlobalScope":true},{"version":"b248e32ca52e8f5571390a4142558ae4f203ae2f94d5bac38a3084d529ef4e58","affectsGlobalScope":true},{"version":"52d1bb7ab7a3306fd0375c8bff560feed26ed676a5b0457fa8027b563aecb9a4","affectsGlobalScope":true},"14fc7efae8b184b18019a5906c6f6de752823b44ff1acf7924bbdc8877ded21b","fafadaaef1d249d0d9289b3fa2bdd1c24092e25517aadfb3055ab448b3d534b2","8d27e5f73b75340198b2df36f39326f693743e64006bd7b88a925a5f285df628","343127c4427e6beba0b34b9b691494eb4d38c017c298869da90f51cf82a7311d","71a689048584cde03cb508408ae7c3b04ad8f10af887865e8b65c27ed9d91488","d9118ed71b9968fea213b070209081a1b1c378b55ddcd026fb1ae8a7f52c15b7","6ba1631f84ef4507073189c4ada06d6de8bac89375ea3b49e34e49006cc44a3f",{"version":"11650c5bddaa406f3d38215ee50e9b7ef974a4cd547c232d318e440ec9765b6b","signature":"950376ec316f431002898dc46c9e712d4df602735e79710032f82ff7cb0ff639"},{"version":"a0ff81983a6a9cfcf3359d125ee20c8f1958c7798365e380202c2de07ac13d5f","signature":"086b69074f964c64686b99d8bb3f81f7e6080e9fe2ea342546954d9bbf7cf8a0"},{"version":"304b541f8854265cf52a16085ac5e11ac88ca9edbe7d0d60a976f28cb00a44fd","signature":"729d5c65551763c2b8695f063f7f0bb664f52ffe92de90d29952acad385d0657"},{"version":"30d0676ca3e94d7aa946f0fa8af9ae45bb19fdbb59e52a7ba2fbb8e2bc62dc10","signature":"1dbc4b17192bd937f32da8936dab292a56b4fc94bd88244131d9b2a7853d2cdf"},{"version":"2885c526ef525d258ad4d903295d1ee36520f989f2eadda8d16d54bb3f44c7c7","signature":"5d8f2d03d5dcb0a81f56558369ccde36d85b822f43c9f97520438e17830dd8e8"},"0b4bc32128fda7bb0752cf284730dd3a817aae04a3d7f92e3b2d54bd61362fe1","7394959e5a741b185456e1ef5d64599c36c60a323207450991e7a42e08911419","4967529644e391115ca5592184d4b63980569adf60ee685f968fd59ab1557188","5929864ce17fba74232584d90cb721a89b7ad277220627cc97054ba15a98ea8f","7180c03fd3cb6e22f911ce9ba0f8a7008b1a6ddbe88ccf16a9c8140ef9ac1686","25c8056edf4314820382a5fdb4bb7816999acdcb929c8f75e3f39473b87e85bc","54cb85a47d760da1c13c00add10d26b5118280d44d58e6908d8e89abbd9d7725","3e4825171442666d31c845aeb47fcd34b62e14041bb353ae2b874285d78482aa","c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","a967bfe3ad4e62243eb604bf956101e4c740f5921277c60debaf325c1320bf88","e9775e97ac4877aebf963a0289c81abe76d1ec9a2a7778dbe637e5151f25c5f3","471e1da5a78350bc55ef8cef24eb3aca6174143c281b8b214ca2beda51f5e04a","cadc8aced301244057c4e7e73fbcae534b0f5b12a37b150d80e5a45aa4bebcbd","385aab901643aa54e1c36f5ef3107913b10d1b5bb8cbcd933d4263b80a0d7f20","9670d44354bab9d9982eca21945686b5c24a3f893db73c0dae0fd74217a4c219","db3435f3525cd785bf21ec6769bf8da7e8a776be1a99e2e7efb5f244a2ef5fee","c3b170c45fc031db31f782e612adf7314b167e60439d304b49e704010e7bafe5","40383ebef22b943d503c6ce2cb2e060282936b952a01bea5f9f493d5fb487cc7","4893a895ea92c85345017a04ed427cbd6a1710453338df26881a6019432febdd","3a84b7cb891141824bd00ef8a50b6a44596aded4075da937f180c90e362fe5f6","13f6f39e12b1518c6650bbb220c8985999020fe0f21d818e28f512b7771d00f9","9b5369969f6e7175740bf51223112ff209f94ba43ecd3bb09eefff9fd675624a","4fe9e626e7164748e8769bbf74b538e09607f07ed17c2f20af8d680ee49fc1da","24515859bc0b836719105bb6cc3d68255042a9f02a6022b3187948b204946bd2","33203609eba548914dc83ddf6cadbc0bcb6e8ef89f6d648ca0908ae887f9fcc5","0db18c6e78ea846316c012478888f33c11ffadab9efd1cc8bcc12daded7a60b6","89167d696a849fce5ca508032aabfe901c0868f833a8625d5a9c6e861ef935d2","e53a3c2a9f624d90f24bf4588aacd223e7bec1b9d0d479b68d2f4a9e6011147f","339dc5265ee5ed92e536a93a04c4ebbc2128f45eeec6ed29f379e0085283542c","9f0a92164925aa37d4a5d9dd3e0134cff8177208dba55fd2310cd74beea40ee2","8bfdb79bf1a9d435ec48d9372dc93291161f152c0865b81fc0b2694aedb4578d","2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","d32275be3546f252e3ad33976caf8c5e842c09cb87d468cb40d5f4cf092d1acc","4a0c3504813a3289f7fb1115db13967c8e004aa8e4f8a9021b95285502221bd1",{"version":"5f290ea7efbe9d8431e10df12c0d5672b67988e7c171c2d356749fac70347a55","affectsGlobalScope":true},"39b1a50d543770780b0409a4caacb87f3ff1d510aedfeb7dc06ed44188256f89",{"version":"49c89f8fa09d21c161e6a367448639e032f42d77cc2ec8ab54ecb8fa9a3ad59f","affectsGlobalScope":true},"e4b50850c2a62c7750428e452ee24b167180104d514d5e5c0ca691753365f610","304504c854c47a55ab4a89111a27a2daf8a3614740bd787cc1f2c51e5574239c",{"version":"95f9129a37dcace36e17b061a8484952586ecfe928c9c8ce526de1a2f4aaefa7","affectsGlobalScope":true},"a40826e8476694e90da94aa008283a7de50d1dafd37beada623863f1901cb7fb","0f9061846236850a872cb44097d071631e93c8749a8b16c191fe3c2a48faede4","e46fa644658c2d6e5c85e954ea76b92c97d63f0851d3ccdab8c2a80d5962aaa9","1c611ff373ce1958aafc40b328048ac2540ba5c7f373cf2897e0d9aeaabe90a0","a307d22a0130ac94c1a17fffa6d57ac272deb5838cb966a9420911d259cdf1be","d2e415abf6cb81ac9e2700b4db5ea7be76b997e812285b8e5e1e414eb2750b6e","09d6cebdced6aa1181ac1523c8f22a133f5ed80589678b64051f0602f0518374",{"version":"ee1ee365d88c4c6c0c0a5a5701d66ebc27ccd0bcfcfaa482c6e2e7fe7b98edf7","affectsGlobalScope":true},{"version":"7c35691dc3972ff1507d8dd279d833f540973d0917bde22e191cf7a8feaac29f","affectsGlobalScope":true},"62662d7a886e5cfa870685720fd27b763743ca4d2cf29326f75d76606a64eadd","b8c670688bd228d3cc9c169690b09b687188c50ff263a94df63b207701105ad9","d8e16905907111390d5a943816306ae997dfe56476f14142166f8b13ee322eea","8068c911a1c40bc6c5ffc58c625b21d807778f6aa6d63a73e6f04f88bcac5b79","a1dbce56ad5f3a37caafb9033c9d190a199217d673f5fa099c8968d471a2fdaa","c6f77efcc19f51c8759779b6b6ee0d88046c15c15dadac8ffed729a6620daf39",{"version":"089867511b37a534ae71f3d9bc97acc0b925b7f5dbec113f98c4b49224c694eb","affectsGlobalScope":true},"269d0ea3202820c29a32c1f2a357837a4f1918426844f7e7c90af15ec40d1dc1","66432f885e30cf471573de22a5af5eca9ab46b37b122aec98beadf77e9b7df24","323506ce173f7f865f42f493885ee3dacd18db6359ea1141d57676d3781ce10c",{"version":"034e635df3c014df1d6b1110b724ca0c4d2d324b45a84974c7d6931f9cf95ea7","affectsGlobalScope":true},{"version":"87f9456115554cb0f78f098ddbd585096871c19d2d05274c1b1b4ade3151da78","affectsGlobalScope":true},"ea3ab3727cd6c222d94003ecafa30e8550c61eadcdabbf59514aee76e86211a5","d3cdd41693c5ed6bec4f1a1c399d9501372b14bd341bc46eedacf2854c5df5a7","2de7a21c92226fb8abbeed7a0a9bd8aa6d37e4c68a8c7ff7938c644267e9fcc1","6d6070c5c81ba0bfe58988c69e3ba3149fc86421fd383f253aeb071cbf29cd41","da618f0ea09d95c3b51514de43bf97dab008c85bede58aa57cf95e4984c7c957","48a35b181ecf47dbbc0a7ab4b5ba778d91eaa838ba42bf4aaaead42be77ef39a","269929a24b2816343a178008ac9ae9248304d92a8ba8e233055e0ed6dbe6ef71","93452d394fdd1dc551ec62f5042366f011a00d342d36d50793b3529bfc9bd633","5195aeb0de306d1c5ca8033457fbcab5987657112fa6d4971cfeb7644493a369","c5dbf0003bc9f0f643e54cd00a3868d1afe85497fecb56be6f2373dc85102924",{"version":"ce73eb199c4bf96c015f069aac161488ed73ebeaea3d87b6d5aa9a968a7b38d4","affectsGlobalScope":true},{"version":"300f8e9de0b0c3482be3e749462b6ebc3dab8a316801f1da0def94aed0cd2018","affectsGlobalScope":true},"4e228e78c1e9b0a75c70588d59288f63a6258e8b1fe4a67b0c53fe03461421d9","962f105729d5b888c8b70e193f6020ee92c6c8144c827de40f80d65dd188ad7f","ac74e2b754fba690036f8221d978f6debb867462b87af254f24e924b677395d0","80858f6de9af22e53aff221fe3590215ea544c2aeb2cc60cf8e08a9c785c8fef",{"version":"068b8ee5c2cd90d7a50f2efadbbe353cb10196a41189a48bf4b2a867363012b4","affectsGlobalScope":true},{"version":"340659b96782f5813aad6c1f89ea1b83b2f3fa993115c7b30366375d9bae5a4e","affectsGlobalScope":true},"6f44a190351ab5e1811abebe007cf60518044772ccc08244f9f241706afa767f","fecdf44bec4ee9c5188e5f2f58c292c9689c02520900dceaaa6e76594de6da90","cf45d0510b661f1da461479851ff902f188edb111777c37055eff12fa986a23a",{"version":"895ca532c15c77cbb6a871af1870b57bcd0ca4f38a1bd69669dd0e95bb58565a","affectsGlobalScope":true},"f2b9440f98d6f94c8105883a2b65aee2fce0248f71f41beafd0a80636f3a565d",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"b510d0a18e3db42ac9765d26711083ec1e8b4e21caaca6dc4d25ae6e8623f447","e222104af6cb9415238ad358488b74d76eceeff238c1268ec6e85655b05341da","69da61a7b5093dac77fa3bec8be95dcf9a74c95a0e9161edb98bb24e30e439d2","eba230221317c985ab1953ccc3edc517f248b37db4fef7875cb2c8d08aff7be7","b83e796810e475da3564c6515bc0ae9577070596a33d89299b7d99f94ecfd921","b4439890c168d646357928431100daac5cbdee1d345a34e6bf6eca9f3abe22bc","5d72971a459517c44c1379dab9ed248e87a61ba0a1e0f25c9d67e1e640cd9a09","02d734976af36f4273d930bea88b3e62adf6b078cf120c1c63d49aa8d8427c5c",{"version":"f624e578325b8c58e55b30c998b1f4c3ec1b61a9fa66373da4250c89b7880d44","affectsGlobalScope":true},{"version":"d3002f620eab4bf6476c9da5c0efb2041d46f7df8b3032a5631bd206abef2c75","affectsGlobalScope":true}],"options":{"allowSyntheticDefaultImports":true,"declaration":true,"declarationMap":true,"emitDecoratorMetadata":true,"esModuleInterop":true,"experimentalDecorators":true,"module":99,"noImplicitAny":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","sourceMap":true,"target":1},"fileIdsList":[[146,148],[142,143],[142,143,144,145],[147],[149],[55],[91],[92,97,125],[93,104,105,112,122,133],[93,94,104,112],[95,134],[96,97,105,113],[97,122,130],[98,100,104,112],[91,99],[100,101],[104],[102,104],[91,104],[104,105,106,122,133],[104,105,106,119,122,125],[89,138],[100,104,107,112,122,133],[104,105,107,108,112,122,130,133],[107,109,122,130,133],[55,56,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140],[104,110],[111,133,138],[100,104,112,122],[113],[114],[91,115],[116,132,138],[117],[118],[104,119,120],[119,121,134,136],[92,104,122,123,124,125],[92,122,124],[122,123],[125],[126],[91,122],[104,128,129],[128,129],[97,112,122,130],[131],[112,132],[92,107,118,133],[97,134],[122,135],[111,136],[137],[92,97,104,106,115,122,133,136,138],[122,139],[66,70,133],[66,122,133],[61],[63,66,130,133],[112,130],[141],[61,141],[63,66,112,133],[58,59,62,65,92,104,122,133],[58,64],[62,66,92,125,133,141],[92,141],[82,92,141],[60,61,141],[66],[60,61,62,63,64,65,66,67,68,70,71,72,73,74,75,76,77,78,79,80,81,83,84,85,86,87,88],[66,73,74],[64,66,74,75],[65],[58,61,66],[66,70,74,75],[70],[64,66,69,133],[58,63,64,66,70,73],[92,122],[61,66,82,92,138,141],[49],[50,51,52,53],[49,114],[49,51,54,114],[44,45],[44,46,47,48],[43],[43,44]],"referencedMap":[[149,1],[144,2],[146,3],[145,2],[148,4],[150,5],[55,6],[56,6],[91,7],[92,8],[93,9],[94,10],[95,11],[96,12],[97,13],[98,14],[99,15],[100,16],[101,16],[103,17],[102,18],[104,19],[105,20],[106,21],[90,22],[107,23],[108,24],[109,25],[141,26],[110,27],[111,28],[112,29],[113,30],[114,31],[115,32],[116,33],[117,34],[118,35],[119,36],[120,36],[121,37],[122,38],[124,39],[123,40],[125,41],[126,42],[127,43],[128,44],[129,45],[130,46],[131,47],[132,48],[133,49],[134,50],[135,51],[136,52],[137,53],[138,54],[139,55],[73,56],[80,57],[72,56],[87,58],[64,59],[63,60],[86,61],[81,62],[84,63],[66,64],[65,65],[61,66],[60,67],[83,68],[62,69],[67,70],[71,70],[89,71],[88,70],[75,72],[76,73],[78,74],[74,75],[77,76],[82,61],[69,77],[70,78],[79,79],[59,80],[85,81],[50,82],[54,83],[53,84],[52,85],[46,86],[49,87],[44,88],[48,89]],"exportedModulesMap":[[149,1],[144,2],[146,3],[145,2],[148,4],[150,5],[55,6],[56,6],[91,7],[92,8],[93,9],[94,10],[95,11],[96,12],[97,13],[98,14],[99,15],[100,16],[101,16],[103,17],[102,18],[104,19],[105,20],[106,21],[90,22],[107,23],[108,24],[109,25],[141,26],[110,27],[111,28],[112,29],[113,30],[114,31],[115,32],[116,33],[117,34],[118,35],[119,36],[120,36],[121,37],[122,38],[124,39],[123,40],[125,41],[126,42],[127,43],[128,44],[129,45],[130,46],[131,47],[132,48],[133,49],[134,50],[135,51],[136,52],[137,53],[138,54],[139,55],[73,56],[80,57],[72,56],[87,58],[64,59],[63,60],[86,61],[81,62],[84,63],[66,64],[65,65],[61,66],[60,67],[83,68],[62,69],[67,70],[71,70],[89,71],[88,70],[75,72],[76,73],[78,74],[74,75],[77,76],[82,61],[69,77],[70,78],[79,79],[59,80],[85,81],[50,82],[54,83],[53,82],[52,82],[46,86],[49,87],[44,88],[48,89]],"semanticDiagnosticsPerFile":[45,149,142,144,146,145,143,148,147,150,55,56,91,92,93,94,95,96,97,98,99,100,101,103,102,104,105,106,90,140,107,108,109,141,110,111,112,113,114,115,116,117,118,119,120,121,122,124,123,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,57,8,10,9,2,11,12,13,14,15,16,17,18,3,4,22,19,20,21,23,24,25,5,26,27,28,29,6,33,30,31,32,34,7,35,40,41,36,37,38,39,1,42,73,80,72,87,64,63,86,81,84,66,65,61,60,83,62,67,68,71,58,89,88,75,76,78,74,77,82,69,70,79,59,85,50,54,53,51,52,47,46,43,49,44,48]},"version":"4.9.5"}
|
|
1
|
+
{"program":{"fileNames":["../../../../node_modules/typescript/lib/lib.es5.d.ts","../../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../../node_modules/typescript/lib/lib.es2020.d.ts","../../../../node_modules/typescript/lib/lib.dom.d.ts","../../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../../teleport-types/dist/cjs/helper.d.ts","../../../teleport-types/dist/cjs/uidl.d.ts","../../../../node_modules/@babel/types/lib/index.d.ts","../../../teleport-types/dist/cjs/generators.d.ts","../../../teleport-types/dist/cjs/errors.d.ts","../../../teleport-types/dist/cjs/vuidl.d.ts","../../../teleport-types/dist/cjs/index.d.ts","../../src/constants/index.ts","../../src/utils/js-identifiers.ts","../../src/utils/string-utils.ts","../../src/utils/uidl-utils.ts","../../src/utils/generic.ts","../../src/utils/route-paths.ts","../../src/utils/layout-topology.ts","../../src/index.ts","../../../../node_modules/@types/node/assert.d.ts","../../../../node_modules/@types/node/assert/strict.d.ts","../../../../node_modules/buffer/index.d.ts","../../../../node_modules/undici-types/header.d.ts","../../../../node_modules/undici-types/readable.d.ts","../../../../node_modules/undici-types/file.d.ts","../../../../node_modules/undici-types/fetch.d.ts","../../../../node_modules/undici-types/formdata.d.ts","../../../../node_modules/undici-types/connector.d.ts","../../../../node_modules/undici-types/client.d.ts","../../../../node_modules/undici-types/errors.d.ts","../../../../node_modules/undici-types/dispatcher.d.ts","../../../../node_modules/undici-types/global-dispatcher.d.ts","../../../../node_modules/undici-types/global-origin.d.ts","../../../../node_modules/undici-types/pool-stats.d.ts","../../../../node_modules/undici-types/pool.d.ts","../../../../node_modules/undici-types/handlers.d.ts","../../../../node_modules/undici-types/balanced-pool.d.ts","../../../../node_modules/undici-types/agent.d.ts","../../../../node_modules/undici-types/mock-interceptor.d.ts","../../../../node_modules/undici-types/mock-agent.d.ts","../../../../node_modules/undici-types/mock-client.d.ts","../../../../node_modules/undici-types/mock-pool.d.ts","../../../../node_modules/undici-types/mock-errors.d.ts","../../../../node_modules/undici-types/proxy-agent.d.ts","../../../../node_modules/undici-types/api.d.ts","../../../../node_modules/undici-types/cookies.d.ts","../../../../node_modules/undici-types/patch.d.ts","../../../../node_modules/undici-types/filereader.d.ts","../../../../node_modules/undici-types/diagnostics-channel.d.ts","../../../../node_modules/undici-types/websocket.d.ts","../../../../node_modules/undici-types/content-type.d.ts","../../../../node_modules/undici-types/cache.d.ts","../../../../node_modules/undici-types/interceptors.d.ts","../../../../node_modules/undici-types/index.d.ts","../../../../node_modules/@types/node/globals.d.ts","../../../../node_modules/@types/node/async_hooks.d.ts","../../../../node_modules/@types/node/buffer.d.ts","../../../../node_modules/@types/node/child_process.d.ts","../../../../node_modules/@types/node/cluster.d.ts","../../../../node_modules/@types/node/console.d.ts","../../../../node_modules/@types/node/constants.d.ts","../../../../node_modules/@types/node/crypto.d.ts","../../../../node_modules/@types/node/dgram.d.ts","../../../../node_modules/@types/node/diagnostics_channel.d.ts","../../../../node_modules/@types/node/dns.d.ts","../../../../node_modules/@types/node/dns/promises.d.ts","../../../../node_modules/@types/node/domain.d.ts","../../../../node_modules/@types/node/dom-events.d.ts","../../../../node_modules/@types/node/events.d.ts","../../../../node_modules/@types/node/fs.d.ts","../../../../node_modules/@types/node/fs/promises.d.ts","../../../../node_modules/@types/node/http.d.ts","../../../../node_modules/@types/node/http2.d.ts","../../../../node_modules/@types/node/https.d.ts","../../../../node_modules/@types/node/inspector.d.ts","../../../../node_modules/@types/node/module.d.ts","../../../../node_modules/@types/node/net.d.ts","../../../../node_modules/@types/node/os.d.ts","../../../../node_modules/@types/node/path.d.ts","../../../../node_modules/@types/node/perf_hooks.d.ts","../../../../node_modules/@types/node/process.d.ts","../../../../node_modules/@types/node/punycode.d.ts","../../../../node_modules/@types/node/querystring.d.ts","../../../../node_modules/@types/node/readline.d.ts","../../../../node_modules/@types/node/readline/promises.d.ts","../../../../node_modules/@types/node/repl.d.ts","../../../../node_modules/@types/node/stream.d.ts","../../../../node_modules/@types/node/stream/promises.d.ts","../../../../node_modules/@types/node/stream/consumers.d.ts","../../../../node_modules/@types/node/stream/web.d.ts","../../../../node_modules/@types/node/string_decoder.d.ts","../../../../node_modules/@types/node/test.d.ts","../../../../node_modules/@types/node/timers.d.ts","../../../../node_modules/@types/node/timers/promises.d.ts","../../../../node_modules/@types/node/tls.d.ts","../../../../node_modules/@types/node/trace_events.d.ts","../../../../node_modules/@types/node/tty.d.ts","../../../../node_modules/@types/node/url.d.ts","../../../../node_modules/@types/node/util.d.ts","../../../../node_modules/@types/node/v8.d.ts","../../../../node_modules/@types/node/vm.d.ts","../../../../node_modules/@types/node/wasi.d.ts","../../../../node_modules/@types/node/worker_threads.d.ts","../../../../node_modules/@types/node/zlib.d.ts","../../../../node_modules/@types/node/globals.global.d.ts","../../../../node_modules/@types/node/index.d.ts","../../../../node_modules/@types/jest/node_modules/jest-diff/build/cleanupSemantic.d.ts","../../../../node_modules/@types/jest/node_modules/jest-diff/build/types.d.ts","../../../../node_modules/@types/jest/node_modules/jest-diff/build/diffLines.d.ts","../../../../node_modules/@types/jest/node_modules/jest-diff/build/printDiffs.d.ts","../../../../node_modules/@types/jest/node_modules/jest-diff/build/index.d.ts","../../../../node_modules/@types/jest/node_modules/pretty-format/build/types.d.ts","../../../../node_modules/@types/jest/node_modules/pretty-format/build/index.d.ts","../../../../node_modules/@types/jest/index.d.ts","../../../../node_modules/@types/jest/ts3.2/index.d.ts"],"fileInfos":[{"version":"8730f4bf322026ff5229336391a18bcaa1f94d4f82416c8b2f3954e2ccaae2ba","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","4b421cbfb3a38a27c279dec1e9112c3d1da296f77a1a85ddadf7e7a425d45d18","1fc5ab7a764205c68fa10d381b08417795fc73111d6dd16b5b1ed36badb743d9",{"version":"3aafcb693fe5b5c3bd277bd4c3a617b53db474fe498fc5df067c5603b1eebde7","affectsGlobalScope":true},{"version":"adb996790133eb33b33aadb9c09f15c2c575e71fb57a62de8bf74dbf59ec7dfb","affectsGlobalScope":true},{"version":"8cc8c5a3bac513368b0157f3d8b31cfdcfe78b56d3724f30f80ed9715e404af8","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"c5c05907c02476e4bde6b7e76a79ffcd948aedd14b6a8f56e4674221b0417398","affectsGlobalScope":true},{"version":"5f406584aef28a331c36523df688ca3650288d14f39c5d2e555c95f0d2ff8f6f","affectsGlobalScope":true},{"version":"22f230e544b35349cfb3bd9110b6ef37b41c6d6c43c3314a31bd0d9652fcec72","affectsGlobalScope":true},{"version":"7ea0b55f6b315cf9ac2ad622b0a7813315bb6e97bf4bb3fbf8f8affbca7dc695","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"eb26de841c52236d8222f87e9e6a235332e0788af8c87a71e9e210314300410a","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"81cac4cbc92c0c839c70f8ffb94eb61e2d32dc1c3cf6d95844ca099463cf37ea","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"6e7997ef61de3132e4d4b2250e75343f487903ddf5370e7ce33cf1b9db9a63ed","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"5e5e095c4470c8bab227dbbc61374878ecead104c74ab9960d3adcccfee23205","affectsGlobalScope":true},{"version":"09aa50414b80c023553090e2f53827f007a301bc34b0495bfb2c3c08ab9ad1eb","affectsGlobalScope":true},{"version":"d7f680a43f8cd12a6b6122c07c54ba40952b0c8aa140dcfcf32eb9e6cb028596","affectsGlobalScope":true},{"version":"3787b83e297de7c315d55d4a7c546ae28e5f6c0a361b7a1dcec1f1f50a54ef11","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"2768ef564cfc0689a1b76106c421a2909bdff0acbe87da010785adab80efdd5c","affectsGlobalScope":true},{"version":"b248e32ca52e8f5571390a4142558ae4f203ae2f94d5bac38a3084d529ef4e58","affectsGlobalScope":true},{"version":"52d1bb7ab7a3306fd0375c8bff560feed26ed676a5b0457fa8027b563aecb9a4","affectsGlobalScope":true},"14fc7efae8b184b18019a5906c6f6de752823b44ff1acf7924bbdc8877ded21b","8a87d03ff5ffbe36957c9ee1213da7a92ee73eb4c59a8157bb1175516d01a001","8d27e5f73b75340198b2df36f39326f693743e64006bd7b88a925a5f285df628","343127c4427e6beba0b34b9b691494eb4d38c017c298869da90f51cf82a7311d","71a689048584cde03cb508408ae7c3b04ad8f10af887865e8b65c27ed9d91488","d9118ed71b9968fea213b070209081a1b1c378b55ddcd026fb1ae8a7f52c15b7","6ba1631f84ef4507073189c4ada06d6de8bac89375ea3b49e34e49006cc44a3f",{"version":"11650c5bddaa406f3d38215ee50e9b7ef974a4cd547c232d318e440ec9765b6b","signature":"950376ec316f431002898dc46c9e712d4df602735e79710032f82ff7cb0ff639"},{"version":"a3a7229dea45fec3b66fb3db95ea86b6f79456d53b01124be574234b855e7f33","signature":"9ea2bd139a31e4bcccbaaf18a67b1ffce16768d35396263d271deb29da1d6f3d"},{"version":"68ab2c8431d98d2050e4acff729c2a2fc9d780d7be4aa0c48137abdb041e9495","signature":"14d523b4f4e24eabea630afb714c74ba52c0683bec00fee1b5341b6a5e650178"},{"version":"304b541f8854265cf52a16085ac5e11ac88ca9edbe7d0d60a976f28cb00a44fd","signature":"729d5c65551763c2b8695f063f7f0bb664f52ffe92de90d29952acad385d0657"},{"version":"30d0676ca3e94d7aa946f0fa8af9ae45bb19fdbb59e52a7ba2fbb8e2bc62dc10","signature":"1dbc4b17192bd937f32da8936dab292a56b4fc94bd88244131d9b2a7853d2cdf"},{"version":"4f2a8b9949619452c5ddcca481a9bbe9169b3ab43e5b70a7a632744392a8795a","signature":"4f46c6901a41824695e81fd7521b3004c00157233c8468e92d743f4d97566516"},{"version":"ec521fde10cc9bbb583b13eb7d9f426c715290c9766554e331040bbc208b688e","signature":"d00b4720674bd31c264f1add708dfeedcb80432a76541c91e38f867b434e0331"},{"version":"34dc514c947b9d4bb6a816916a9436bdb159392f42a0ceee4f479b41bac357b8","signature":"cf62a9efea7d4049614c371db441da2cad703b064e972727a110eeaffa757538"},"0b4bc32128fda7bb0752cf284730dd3a817aae04a3d7f92e3b2d54bd61362fe1","7394959e5a741b185456e1ef5d64599c36c60a323207450991e7a42e08911419","4967529644e391115ca5592184d4b63980569adf60ee685f968fd59ab1557188","5929864ce17fba74232584d90cb721a89b7ad277220627cc97054ba15a98ea8f","7180c03fd3cb6e22f911ce9ba0f8a7008b1a6ddbe88ccf16a9c8140ef9ac1686","25c8056edf4314820382a5fdb4bb7816999acdcb929c8f75e3f39473b87e85bc","54cb85a47d760da1c13c00add10d26b5118280d44d58e6908d8e89abbd9d7725","3e4825171442666d31c845aeb47fcd34b62e14041bb353ae2b874285d78482aa","c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","a967bfe3ad4e62243eb604bf956101e4c740f5921277c60debaf325c1320bf88","e9775e97ac4877aebf963a0289c81abe76d1ec9a2a7778dbe637e5151f25c5f3","471e1da5a78350bc55ef8cef24eb3aca6174143c281b8b214ca2beda51f5e04a","cadc8aced301244057c4e7e73fbcae534b0f5b12a37b150d80e5a45aa4bebcbd","385aab901643aa54e1c36f5ef3107913b10d1b5bb8cbcd933d4263b80a0d7f20","9670d44354bab9d9982eca21945686b5c24a3f893db73c0dae0fd74217a4c219","db3435f3525cd785bf21ec6769bf8da7e8a776be1a99e2e7efb5f244a2ef5fee","c3b170c45fc031db31f782e612adf7314b167e60439d304b49e704010e7bafe5","40383ebef22b943d503c6ce2cb2e060282936b952a01bea5f9f493d5fb487cc7","4893a895ea92c85345017a04ed427cbd6a1710453338df26881a6019432febdd","3a84b7cb891141824bd00ef8a50b6a44596aded4075da937f180c90e362fe5f6","13f6f39e12b1518c6650bbb220c8985999020fe0f21d818e28f512b7771d00f9","9b5369969f6e7175740bf51223112ff209f94ba43ecd3bb09eefff9fd675624a","4fe9e626e7164748e8769bbf74b538e09607f07ed17c2f20af8d680ee49fc1da","24515859bc0b836719105bb6cc3d68255042a9f02a6022b3187948b204946bd2","33203609eba548914dc83ddf6cadbc0bcb6e8ef89f6d648ca0908ae887f9fcc5","0db18c6e78ea846316c012478888f33c11ffadab9efd1cc8bcc12daded7a60b6","89167d696a849fce5ca508032aabfe901c0868f833a8625d5a9c6e861ef935d2","e53a3c2a9f624d90f24bf4588aacd223e7bec1b9d0d479b68d2f4a9e6011147f","339dc5265ee5ed92e536a93a04c4ebbc2128f45eeec6ed29f379e0085283542c","9f0a92164925aa37d4a5d9dd3e0134cff8177208dba55fd2310cd74beea40ee2","8bfdb79bf1a9d435ec48d9372dc93291161f152c0865b81fc0b2694aedb4578d","2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","d32275be3546f252e3ad33976caf8c5e842c09cb87d468cb40d5f4cf092d1acc","4a0c3504813a3289f7fb1115db13967c8e004aa8e4f8a9021b95285502221bd1",{"version":"5f290ea7efbe9d8431e10df12c0d5672b67988e7c171c2d356749fac70347a55","affectsGlobalScope":true},"39b1a50d543770780b0409a4caacb87f3ff1d510aedfeb7dc06ed44188256f89",{"version":"49c89f8fa09d21c161e6a367448639e032f42d77cc2ec8ab54ecb8fa9a3ad59f","affectsGlobalScope":true},"e4b50850c2a62c7750428e452ee24b167180104d514d5e5c0ca691753365f610","304504c854c47a55ab4a89111a27a2daf8a3614740bd787cc1f2c51e5574239c",{"version":"95f9129a37dcace36e17b061a8484952586ecfe928c9c8ce526de1a2f4aaefa7","affectsGlobalScope":true},"a40826e8476694e90da94aa008283a7de50d1dafd37beada623863f1901cb7fb","0f9061846236850a872cb44097d071631e93c8749a8b16c191fe3c2a48faede4","e46fa644658c2d6e5c85e954ea76b92c97d63f0851d3ccdab8c2a80d5962aaa9","1c611ff373ce1958aafc40b328048ac2540ba5c7f373cf2897e0d9aeaabe90a0","a307d22a0130ac94c1a17fffa6d57ac272deb5838cb966a9420911d259cdf1be","d2e415abf6cb81ac9e2700b4db5ea7be76b997e812285b8e5e1e414eb2750b6e","09d6cebdced6aa1181ac1523c8f22a133f5ed80589678b64051f0602f0518374",{"version":"ee1ee365d88c4c6c0c0a5a5701d66ebc27ccd0bcfcfaa482c6e2e7fe7b98edf7","affectsGlobalScope":true},{"version":"7c35691dc3972ff1507d8dd279d833f540973d0917bde22e191cf7a8feaac29f","affectsGlobalScope":true},"62662d7a886e5cfa870685720fd27b763743ca4d2cf29326f75d76606a64eadd","b8c670688bd228d3cc9c169690b09b687188c50ff263a94df63b207701105ad9","d8e16905907111390d5a943816306ae997dfe56476f14142166f8b13ee322eea","8068c911a1c40bc6c5ffc58c625b21d807778f6aa6d63a73e6f04f88bcac5b79","a1dbce56ad5f3a37caafb9033c9d190a199217d673f5fa099c8968d471a2fdaa","c6f77efcc19f51c8759779b6b6ee0d88046c15c15dadac8ffed729a6620daf39",{"version":"089867511b37a534ae71f3d9bc97acc0b925b7f5dbec113f98c4b49224c694eb","affectsGlobalScope":true},"269d0ea3202820c29a32c1f2a357837a4f1918426844f7e7c90af15ec40d1dc1","66432f885e30cf471573de22a5af5eca9ab46b37b122aec98beadf77e9b7df24","323506ce173f7f865f42f493885ee3dacd18db6359ea1141d57676d3781ce10c",{"version":"034e635df3c014df1d6b1110b724ca0c4d2d324b45a84974c7d6931f9cf95ea7","affectsGlobalScope":true},{"version":"87f9456115554cb0f78f098ddbd585096871c19d2d05274c1b1b4ade3151da78","affectsGlobalScope":true},"ea3ab3727cd6c222d94003ecafa30e8550c61eadcdabbf59514aee76e86211a5","d3cdd41693c5ed6bec4f1a1c399d9501372b14bd341bc46eedacf2854c5df5a7","2de7a21c92226fb8abbeed7a0a9bd8aa6d37e4c68a8c7ff7938c644267e9fcc1","6d6070c5c81ba0bfe58988c69e3ba3149fc86421fd383f253aeb071cbf29cd41","da618f0ea09d95c3b51514de43bf97dab008c85bede58aa57cf95e4984c7c957","48a35b181ecf47dbbc0a7ab4b5ba778d91eaa838ba42bf4aaaead42be77ef39a","269929a24b2816343a178008ac9ae9248304d92a8ba8e233055e0ed6dbe6ef71","93452d394fdd1dc551ec62f5042366f011a00d342d36d50793b3529bfc9bd633","5195aeb0de306d1c5ca8033457fbcab5987657112fa6d4971cfeb7644493a369","c5dbf0003bc9f0f643e54cd00a3868d1afe85497fecb56be6f2373dc85102924",{"version":"ce73eb199c4bf96c015f069aac161488ed73ebeaea3d87b6d5aa9a968a7b38d4","affectsGlobalScope":true},{"version":"300f8e9de0b0c3482be3e749462b6ebc3dab8a316801f1da0def94aed0cd2018","affectsGlobalScope":true},"4e228e78c1e9b0a75c70588d59288f63a6258e8b1fe4a67b0c53fe03461421d9","962f105729d5b888c8b70e193f6020ee92c6c8144c827de40f80d65dd188ad7f","ac74e2b754fba690036f8221d978f6debb867462b87af254f24e924b677395d0","80858f6de9af22e53aff221fe3590215ea544c2aeb2cc60cf8e08a9c785c8fef",{"version":"068b8ee5c2cd90d7a50f2efadbbe353cb10196a41189a48bf4b2a867363012b4","affectsGlobalScope":true},{"version":"340659b96782f5813aad6c1f89ea1b83b2f3fa993115c7b30366375d9bae5a4e","affectsGlobalScope":true},"6f44a190351ab5e1811abebe007cf60518044772ccc08244f9f241706afa767f","fecdf44bec4ee9c5188e5f2f58c292c9689c02520900dceaaa6e76594de6da90","cf45d0510b661f1da461479851ff902f188edb111777c37055eff12fa986a23a",{"version":"895ca532c15c77cbb6a871af1870b57bcd0ca4f38a1bd69669dd0e95bb58565a","affectsGlobalScope":true},"f2b9440f98d6f94c8105883a2b65aee2fce0248f71f41beafd0a80636f3a565d",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"b510d0a18e3db42ac9765d26711083ec1e8b4e21caaca6dc4d25ae6e8623f447","e222104af6cb9415238ad358488b74d76eceeff238c1268ec6e85655b05341da","69da61a7b5093dac77fa3bec8be95dcf9a74c95a0e9161edb98bb24e30e439d2","eba230221317c985ab1953ccc3edc517f248b37db4fef7875cb2c8d08aff7be7","b83e796810e475da3564c6515bc0ae9577070596a33d89299b7d99f94ecfd921","b4439890c168d646357928431100daac5cbdee1d345a34e6bf6eca9f3abe22bc","5d72971a459517c44c1379dab9ed248e87a61ba0a1e0f25c9d67e1e640cd9a09","02d734976af36f4273d930bea88b3e62adf6b078cf120c1c63d49aa8d8427c5c",{"version":"f624e578325b8c58e55b30c998b1f4c3ec1b61a9fa66373da4250c89b7880d44","affectsGlobalScope":true},{"version":"d3002f620eab4bf6476c9da5c0efb2041d46f7df8b3032a5631bd206abef2c75","affectsGlobalScope":true}],"options":{"allowSyntheticDefaultImports":true,"declaration":true,"declarationMap":true,"emitDecoratorMetadata":true,"esModuleInterop":true,"experimentalDecorators":true,"module":99,"noImplicitAny":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","sourceMap":true,"target":1},"fileIdsList":[[149,151],[145,146],[145,146,147,148],[150],[152],[58],[94],[95,100,128],[96,107,108,115,125,136],[96,97,107,115],[98,137],[99,100,108,116],[100,125,133],[101,103,107,115],[94,102],[103,104],[107],[105,107],[94,107],[107,108,109,125,136],[107,108,109,122,125,128],[92,141],[103,107,110,115,125,136],[107,108,110,111,115,125,133,136],[110,112,125,133,136],[58,59,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143],[107,113],[114,136,141],[103,107,115,125],[116],[117],[94,118],[119,135,141],[120],[121],[107,122,123],[122,124,137,139],[95,107,125,126,127,128],[95,125,127],[125,126],[128],[129],[94,125],[107,131,132],[131,132],[100,115,125,133],[134],[115,135],[95,110,121,136],[100,137],[125,138],[114,139],[140],[95,100,107,109,118,125,136,139,141],[125,142],[69,73,136],[69,125,136],[64],[66,69,133,136],[115,133],[144],[64,144],[66,69,115,136],[61,62,65,68,95,107,125,136],[61,67],[65,69,95,128,136,144],[95,144],[85,95,144],[63,64,144],[69],[63,64,65,66,67,68,69,70,71,73,74,75,76,77,78,79,80,81,82,83,84,86,87,88,89,90,91],[69,76,77],[67,69,77,78],[68],[61,64,69],[69,73,77,78],[73],[67,69,72,136],[61,66,67,69,73,76],[95,125],[64,69,85,95,141,144],[49],[50,51,52,53,54,55,56],[49,117],[51],[49,52,57,117],[44,45],[44,46,47,48],[43],[43,44]],"referencedMap":[[152,1],[147,2],[149,3],[148,2],[151,4],[153,5],[58,6],[59,6],[94,7],[95,8],[96,9],[97,10],[98,11],[99,12],[100,13],[101,14],[102,15],[103,16],[104,16],[106,17],[105,18],[107,19],[108,20],[109,21],[93,22],[110,23],[111,24],[112,25],[144,26],[113,27],[114,28],[115,29],[116,30],[117,31],[118,32],[119,33],[120,34],[121,35],[122,36],[123,36],[124,37],[125,38],[127,39],[126,40],[128,41],[129,42],[130,43],[131,44],[132,45],[133,46],[134,47],[135,48],[136,49],[137,50],[138,51],[139,52],[140,53],[141,54],[142,55],[76,56],[83,57],[75,56],[90,58],[67,59],[66,60],[89,61],[84,62],[87,63],[69,64],[68,65],[64,66],[63,67],[86,68],[65,69],[70,70],[74,70],[92,71],[91,70],[78,72],[79,73],[81,74],[77,75],[80,76],[85,61],[72,77],[73,78],[82,79],[62,80],[88,81],[50,82],[57,83],[54,84],[56,82],[52,85],[53,86],[46,87],[49,88],[44,89],[48,90]],"exportedModulesMap":[[152,1],[147,2],[149,3],[148,2],[151,4],[153,5],[58,6],[59,6],[94,7],[95,8],[96,9],[97,10],[98,11],[99,12],[100,13],[101,14],[102,15],[103,16],[104,16],[106,17],[105,18],[107,19],[108,20],[109,21],[93,22],[110,23],[111,24],[112,25],[144,26],[113,27],[114,28],[115,29],[116,30],[117,31],[118,32],[119,33],[120,34],[121,35],[122,36],[123,36],[124,37],[125,38],[127,39],[126,40],[128,41],[129,42],[130,43],[131,44],[132,45],[133,46],[134,47],[135,48],[136,49],[137,50],[138,51],[139,52],[140,53],[141,54],[142,55],[76,56],[83,57],[75,56],[90,58],[67,59],[66,60],[89,61],[84,62],[87,63],[69,64],[68,65],[64,66],[63,67],[86,68],[65,69],[70,70],[74,70],[92,71],[91,70],[78,72],[79,73],[81,74],[77,75],[80,76],[85,61],[72,77],[73,78],[82,79],[62,80],[88,81],[50,82],[57,83],[54,82],[56,82],[53,82],[46,87],[49,88],[44,89],[48,90]],"semanticDiagnosticsPerFile":[45,152,145,147,149,148,146,151,150,153,58,59,94,95,96,97,98,99,100,101,102,103,104,106,105,107,108,109,93,143,110,111,112,144,113,114,115,116,117,118,119,120,121,122,123,124,125,127,126,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,60,8,10,9,2,11,12,13,14,15,16,17,18,3,4,22,19,20,21,23,24,25,5,26,27,28,29,6,33,30,31,32,34,7,35,40,41,36,37,38,39,1,42,76,83,75,90,67,66,89,84,87,69,68,64,63,86,65,70,71,74,61,92,91,78,79,81,77,80,85,72,73,82,62,88,50,57,54,51,56,55,52,53,47,46,43,49,44,48]},"version":"4.9.5"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* JavaScript identifier safety for names that originate in the UIDL.
|
|
3
|
+
*
|
|
4
|
+
* A UIDL state / prop / global-state name is DATA. It is routinely derived from
|
|
5
|
+
* a database column or a form field, so it can legally be any string — a WoW
|
|
6
|
+
* character sheet really does have a column called `class`. The generators, on
|
|
7
|
+
* the other hand, turn those names into JavaScript BINDINGS
|
|
8
|
+
* (`const [class, setClass] = useState("")`), and `class` is a reserved word:
|
|
9
|
+
* the emitted page does not parse, prettier throws
|
|
10
|
+
* `SyntaxError: Unexpected token, expected "{"`, and the whole project build
|
|
11
|
+
* dies before a single file is written.
|
|
12
|
+
*
|
|
13
|
+
* This module is the single place that maps "a name from the UIDL" to "a name
|
|
14
|
+
* that is legal in identifier position".
|
|
15
|
+
*
|
|
16
|
+
* ## What is deliberately NOT renamed
|
|
17
|
+
*
|
|
18
|
+
* Only IDENTIFIER positions are sanitised. Everywhere a name is a STRING — the
|
|
19
|
+
* `stateSetters` / `stateTypes` / `__stateValues` map keys the workflow runtime
|
|
20
|
+
* looks up by `config.property`, an object-literal key, a `props.<name>` member
|
|
21
|
+
* access — the original name is kept verbatim. Renaming those would silently
|
|
22
|
+
* break every workflow binding written against the original name (the runtime
|
|
23
|
+
* would log `no setter for "class"` and skip the update), which is a far worse
|
|
24
|
+
* failure than the build error this module exists to prevent.
|
|
25
|
+
*
|
|
26
|
+
* ## Why a trailing underscore is collision-free
|
|
27
|
+
*
|
|
28
|
+
* Every state / prop name reaches the generators through
|
|
29
|
+
* `StringUtils.createStateOrPropStoringValue`, i.e. `dashCaseToCamelCase`,
|
|
30
|
+
* whose `/[-_]+(.)?/g` replacement removes EVERY underscore. So a normalised
|
|
31
|
+
* name can never itself end in `_`, and `class` -> `class_` cannot collide with
|
|
32
|
+
* a sibling name.
|
|
33
|
+
*/
|
|
34
|
+
/**
|
|
35
|
+
* Words that may never be used as a binding name in the code we emit.
|
|
36
|
+
*
|
|
37
|
+
* Generated components are ES modules and therefore always strict mode, so the
|
|
38
|
+
* strict-mode-only reserved words are as fatal as the unconditional ones.
|
|
39
|
+
*
|
|
40
|
+
* `undefined` is not a reserved word, but binding it shadows the value the
|
|
41
|
+
* generators emit for "no value" (`t.identifier('undefined')`) throughout the
|
|
42
|
+
* output, so it is treated as reserved here as well.
|
|
43
|
+
*/
|
|
44
|
+
export declare const RESERVED_JS_IDENTIFIERS: ReadonlySet<string>;
|
|
45
|
+
/** Used when a name sanitises down to nothing at all (e.g. `"***"`). */
|
|
46
|
+
export declare const FALLBACK_JS_IDENTIFIER = "_value";
|
|
47
|
+
/** True when `name` is a reserved word that cannot be used as a binding. */
|
|
48
|
+
export declare const isReservedJSIdentifier: (name: string) => boolean;
|
|
49
|
+
/**
|
|
50
|
+
* True when `name` can be emitted verbatim in identifier position — i.e. it is
|
|
51
|
+
* a syntactically valid identifier AND not a reserved word.
|
|
52
|
+
*/
|
|
53
|
+
export declare const isValidJSIdentifierName: (name: string) => boolean;
|
|
54
|
+
/**
|
|
55
|
+
* True when `name` can be an UNQUOTED object-literal key or a member access
|
|
56
|
+
* after a dot. Reserved words qualify — `{ class: x }` and `props.class` are
|
|
57
|
+
* both legal — so this is deliberately laxer than
|
|
58
|
+
* {@link isValidJSIdentifierName}; only the identifier SYNTAX matters here.
|
|
59
|
+
*/
|
|
60
|
+
export declare const isValidPropertyKeyName: (name: string) => boolean;
|
|
61
|
+
/**
|
|
62
|
+
* Map any UIDL-supplied name onto a name that is legal in binding position.
|
|
63
|
+
*
|
|
64
|
+
* Valid, non-reserved names are returned UNCHANGED, so this is a no-op for
|
|
65
|
+
* every name the generators have ever produced — the emitted output only
|
|
66
|
+
* differs for names that would not have compiled at all.
|
|
67
|
+
*
|
|
68
|
+
* Not injective in the general case (`a-b` and `a_b` both sanitise to `a_b`),
|
|
69
|
+
* which is safe here because state / prop names are normalised through
|
|
70
|
+
* `createStateOrPropStoringValue` first and therefore contain neither
|
|
71
|
+
* character by the time a generator sees them.
|
|
72
|
+
*/
|
|
73
|
+
export declare const createSafeJSIdentifier: (name: string, fallback?: string) => string;
|
|
74
|
+
/**
|
|
75
|
+
* Sanitise ONLY the leading identifier of an id that may already carry a
|
|
76
|
+
* property path, leaving the path untouched:
|
|
77
|
+
*
|
|
78
|
+
* `class` -> `class_`
|
|
79
|
+
* `class?.['spec']` -> `class_?.['spec']`
|
|
80
|
+
* `fields.name` -> `fields.name` (already legal — unchanged)
|
|
81
|
+
* `typeof x === 'y'` -> `typeof x === 'y'` (an expression — untouched)
|
|
82
|
+
*
|
|
83
|
+
* `UIDLUtils.generateIdWithRefPath` produces exactly the first three shapes,
|
|
84
|
+
* and the JSX generators hand the whole string to `t.identifier(...)` and rely
|
|
85
|
+
* on babel printing it verbatim. Only the head is a binding; the rest is member
|
|
86
|
+
* access against real data keys and must keep its original spelling.
|
|
87
|
+
*/
|
|
88
|
+
export declare const createSafeJSIdentifierPath: (idWithPath: string) => string;
|
|
89
|
+
//# sourceMappingURL=js-identifiers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"js-identifiers.d.ts","sourceRoot":"","sources":["../../../src/utils/js-identifiers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH;;;;;;;;;GASG;AACH,eAAO,MAAM,uBAAuB,EAAE,WAAW,CAAC,MAAM,CAqDtD,CAAA;AAWF,wEAAwE;AACxE,eAAO,MAAM,sBAAsB,WAAW,CAAA;AAE9C,4EAA4E;AAC5E,eAAO,MAAM,sBAAsB,SAAU,MAAM,KAAG,OACS,CAAA;AAE/D;;;GAGG;AACH,eAAO,MAAM,uBAAuB,SAAU,MAAM,KAAG,OAC2C,CAAA;AAElG;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,SAAU,MAAM,KAAG,OACM,CAAA;AAE5D;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,sBAAsB,SAC3B,MAAM,aACF,MAAM,KACf,MAqBF,CAAA;AAWD;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,0BAA0B,eAAgB,MAAM,KAAG,MAqB/D,CAAA"}
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* JavaScript identifier safety for names that originate in the UIDL.
|
|
3
|
+
*
|
|
4
|
+
* A UIDL state / prop / global-state name is DATA. It is routinely derived from
|
|
5
|
+
* a database column or a form field, so it can legally be any string — a WoW
|
|
6
|
+
* character sheet really does have a column called `class`. The generators, on
|
|
7
|
+
* the other hand, turn those names into JavaScript BINDINGS
|
|
8
|
+
* (`const [class, setClass] = useState("")`), and `class` is a reserved word:
|
|
9
|
+
* the emitted page does not parse, prettier throws
|
|
10
|
+
* `SyntaxError: Unexpected token, expected "{"`, and the whole project build
|
|
11
|
+
* dies before a single file is written.
|
|
12
|
+
*
|
|
13
|
+
* This module is the single place that maps "a name from the UIDL" to "a name
|
|
14
|
+
* that is legal in identifier position".
|
|
15
|
+
*
|
|
16
|
+
* ## What is deliberately NOT renamed
|
|
17
|
+
*
|
|
18
|
+
* Only IDENTIFIER positions are sanitised. Everywhere a name is a STRING — the
|
|
19
|
+
* `stateSetters` / `stateTypes` / `__stateValues` map keys the workflow runtime
|
|
20
|
+
* looks up by `config.property`, an object-literal key, a `props.<name>` member
|
|
21
|
+
* access — the original name is kept verbatim. Renaming those would silently
|
|
22
|
+
* break every workflow binding written against the original name (the runtime
|
|
23
|
+
* would log `no setter for "class"` and skip the update), which is a far worse
|
|
24
|
+
* failure than the build error this module exists to prevent.
|
|
25
|
+
*
|
|
26
|
+
* ## Why a trailing underscore is collision-free
|
|
27
|
+
*
|
|
28
|
+
* Every state / prop name reaches the generators through
|
|
29
|
+
* `StringUtils.createStateOrPropStoringValue`, i.e. `dashCaseToCamelCase`,
|
|
30
|
+
* whose `/[-_]+(.)?/g` replacement removes EVERY underscore. So a normalised
|
|
31
|
+
* name can never itself end in `_`, and `class` -> `class_` cannot collide with
|
|
32
|
+
* a sibling name.
|
|
33
|
+
*/
|
|
34
|
+
/**
|
|
35
|
+
* Words that may never be used as a binding name in the code we emit.
|
|
36
|
+
*
|
|
37
|
+
* Generated components are ES modules and therefore always strict mode, so the
|
|
38
|
+
* strict-mode-only reserved words are as fatal as the unconditional ones.
|
|
39
|
+
*
|
|
40
|
+
* `undefined` is not a reserved word, but binding it shadows the value the
|
|
41
|
+
* generators emit for "no value" (`t.identifier('undefined')`) throughout the
|
|
42
|
+
* output, so it is treated as reserved here as well.
|
|
43
|
+
*/
|
|
44
|
+
export var RESERVED_JS_IDENTIFIERS = new Set([
|
|
45
|
+
// Reserved in every context.
|
|
46
|
+
'break',
|
|
47
|
+
'case',
|
|
48
|
+
'catch',
|
|
49
|
+
'class',
|
|
50
|
+
'const',
|
|
51
|
+
'continue',
|
|
52
|
+
'debugger',
|
|
53
|
+
'default',
|
|
54
|
+
'delete',
|
|
55
|
+
'do',
|
|
56
|
+
'else',
|
|
57
|
+
'enum',
|
|
58
|
+
'export',
|
|
59
|
+
'extends',
|
|
60
|
+
'false',
|
|
61
|
+
'finally',
|
|
62
|
+
'for',
|
|
63
|
+
'function',
|
|
64
|
+
'if',
|
|
65
|
+
'import',
|
|
66
|
+
'in',
|
|
67
|
+
'instanceof',
|
|
68
|
+
'new',
|
|
69
|
+
'null',
|
|
70
|
+
'return',
|
|
71
|
+
'super',
|
|
72
|
+
'switch',
|
|
73
|
+
'this',
|
|
74
|
+
'throw',
|
|
75
|
+
'true',
|
|
76
|
+
'try',
|
|
77
|
+
'typeof',
|
|
78
|
+
'var',
|
|
79
|
+
'void',
|
|
80
|
+
'while',
|
|
81
|
+
'with',
|
|
82
|
+
// Reserved in strict mode / modules — which is all generated output.
|
|
83
|
+
'arguments',
|
|
84
|
+
'await',
|
|
85
|
+
'eval',
|
|
86
|
+
'implements',
|
|
87
|
+
'interface',
|
|
88
|
+
'let',
|
|
89
|
+
'package',
|
|
90
|
+
'private',
|
|
91
|
+
'protected',
|
|
92
|
+
'public',
|
|
93
|
+
'static',
|
|
94
|
+
'yield',
|
|
95
|
+
// Not reserved, but binding it breaks the generators' own emissions.
|
|
96
|
+
'undefined',
|
|
97
|
+
]);
|
|
98
|
+
/** Matches a complete, syntactically valid ECMAScript identifier (ASCII subset). */
|
|
99
|
+
var VALID_IDENTIFIER_RE = /^[A-Za-z_$][A-Za-z0-9_$]*$/;
|
|
100
|
+
/** Matches the leading identifier of an id such as `class?.['spec']` or `fields.name`. */
|
|
101
|
+
var LEADING_IDENTIFIER_RE = /^[A-Za-z_$][A-Za-z0-9_$]*/;
|
|
102
|
+
/** Every character that is illegal anywhere inside an identifier. */
|
|
103
|
+
var ILLEGAL_IDENTIFIER_CHARS_RE = /[^A-Za-z0-9_$]/g;
|
|
104
|
+
/** Used when a name sanitises down to nothing at all (e.g. `"***"`). */
|
|
105
|
+
export var FALLBACK_JS_IDENTIFIER = '_value';
|
|
106
|
+
/** True when `name` is a reserved word that cannot be used as a binding. */
|
|
107
|
+
export var isReservedJSIdentifier = function (name) {
|
|
108
|
+
return typeof name === 'string' && RESERVED_JS_IDENTIFIERS.has(name);
|
|
109
|
+
};
|
|
110
|
+
/**
|
|
111
|
+
* True when `name` can be emitted verbatim in identifier position — i.e. it is
|
|
112
|
+
* a syntactically valid identifier AND not a reserved word.
|
|
113
|
+
*/
|
|
114
|
+
export var isValidJSIdentifierName = function (name) {
|
|
115
|
+
return typeof name === 'string' && VALID_IDENTIFIER_RE.test(name) && !RESERVED_JS_IDENTIFIERS.has(name);
|
|
116
|
+
};
|
|
117
|
+
/**
|
|
118
|
+
* True when `name` can be an UNQUOTED object-literal key or a member access
|
|
119
|
+
* after a dot. Reserved words qualify — `{ class: x }` and `props.class` are
|
|
120
|
+
* both legal — so this is deliberately laxer than
|
|
121
|
+
* {@link isValidJSIdentifierName}; only the identifier SYNTAX matters here.
|
|
122
|
+
*/
|
|
123
|
+
export var isValidPropertyKeyName = function (name) {
|
|
124
|
+
return typeof name === 'string' && VALID_IDENTIFIER_RE.test(name);
|
|
125
|
+
};
|
|
126
|
+
/**
|
|
127
|
+
* Map any UIDL-supplied name onto a name that is legal in binding position.
|
|
128
|
+
*
|
|
129
|
+
* Valid, non-reserved names are returned UNCHANGED, so this is a no-op for
|
|
130
|
+
* every name the generators have ever produced — the emitted output only
|
|
131
|
+
* differs for names that would not have compiled at all.
|
|
132
|
+
*
|
|
133
|
+
* Not injective in the general case (`a-b` and `a_b` both sanitise to `a_b`),
|
|
134
|
+
* which is safe here because state / prop names are normalised through
|
|
135
|
+
* `createStateOrPropStoringValue` first and therefore contain neither
|
|
136
|
+
* character by the time a generator sees them.
|
|
137
|
+
*/
|
|
138
|
+
export var createSafeJSIdentifier = function (name, fallback) {
|
|
139
|
+
if (fallback === void 0) { fallback = FALLBACK_JS_IDENTIFIER; }
|
|
140
|
+
if (typeof name !== 'string' || name === '') {
|
|
141
|
+
return fallback;
|
|
142
|
+
}
|
|
143
|
+
if (isValidJSIdentifierName(name)) {
|
|
144
|
+
return name;
|
|
145
|
+
}
|
|
146
|
+
var safe = name.replace(ILLEGAL_IDENTIFIER_CHARS_RE, '_');
|
|
147
|
+
if (/^[0-9]/.test(safe)) {
|
|
148
|
+
safe = "_".concat(safe);
|
|
149
|
+
}
|
|
150
|
+
// `"***"` collapses to `"___"`, which is a legal identifier, so the only way
|
|
151
|
+
// to reach an empty string here is an empty input — already handled above.
|
|
152
|
+
if (safe === '') {
|
|
153
|
+
return fallback;
|
|
154
|
+
}
|
|
155
|
+
// Re-check AFTER the character pass: `"class"` survives it untouched, and
|
|
156
|
+
// `"my class"` becomes `"my_class"` which is no longer reserved.
|
|
157
|
+
return RESERVED_JS_IDENTIFIERS.has(safe) ? "".concat(safe, "_") : safe;
|
|
158
|
+
};
|
|
159
|
+
/**
|
|
160
|
+
* A property path is all that may follow the binding: optional chaining,
|
|
161
|
+
* dotted access, or a bracket lookup. Anything else (a space, an operator, a
|
|
162
|
+
* call) means the string is a hand-written EXPRESSION rather than a reference,
|
|
163
|
+
* and rewriting its first word would corrupt it — `typeof x === 'string'` must
|
|
164
|
+
* never become `typeof_ x === 'string'`.
|
|
165
|
+
*/
|
|
166
|
+
var PROPERTY_PATH_TAIL_RE = /^(\?\.|\.|\[)/;
|
|
167
|
+
/**
|
|
168
|
+
* Sanitise ONLY the leading identifier of an id that may already carry a
|
|
169
|
+
* property path, leaving the path untouched:
|
|
170
|
+
*
|
|
171
|
+
* `class` -> `class_`
|
|
172
|
+
* `class?.['spec']` -> `class_?.['spec']`
|
|
173
|
+
* `fields.name` -> `fields.name` (already legal — unchanged)
|
|
174
|
+
* `typeof x === 'y'` -> `typeof x === 'y'` (an expression — untouched)
|
|
175
|
+
*
|
|
176
|
+
* `UIDLUtils.generateIdWithRefPath` produces exactly the first three shapes,
|
|
177
|
+
* and the JSX generators hand the whole string to `t.identifier(...)` and rely
|
|
178
|
+
* on babel printing it verbatim. Only the head is a binding; the rest is member
|
|
179
|
+
* access against real data keys and must keep its original spelling.
|
|
180
|
+
*/
|
|
181
|
+
export var createSafeJSIdentifierPath = function (idWithPath) {
|
|
182
|
+
if (typeof idWithPath !== 'string' || idWithPath === '') {
|
|
183
|
+
return idWithPath;
|
|
184
|
+
}
|
|
185
|
+
var match = LEADING_IDENTIFIER_RE.exec(idWithPath);
|
|
186
|
+
if (!match) {
|
|
187
|
+
// Does not start with an identifier at all (e.g. a numeric or empty head).
|
|
188
|
+
// There is nothing safe to rewrite, so leave it for the caller's own
|
|
189
|
+
// validation rather than inventing a binding.
|
|
190
|
+
return idWithPath;
|
|
191
|
+
}
|
|
192
|
+
var head = match[0];
|
|
193
|
+
var tail = idWithPath.slice(head.length);
|
|
194
|
+
if (tail !== '' && !PROPERTY_PATH_TAIL_RE.test(tail)) {
|
|
195
|
+
return idWithPath;
|
|
196
|
+
}
|
|
197
|
+
var safeHead = createSafeJSIdentifier(head);
|
|
198
|
+
return safeHead === head ? idWithPath : "".concat(safeHead).concat(tail);
|
|
199
|
+
};
|
|
200
|
+
//# sourceMappingURL=js-identifiers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"js-identifiers.js","sourceRoot":"","sources":["../../../src/utils/js-identifiers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH;;;;;;;;;GASG;AACH,MAAM,CAAC,IAAM,uBAAuB,GAAwB,IAAI,GAAG,CAAS;IAC1E,6BAA6B;IAC7B,OAAO;IACP,MAAM;IACN,OAAO;IACP,OAAO;IACP,OAAO;IACP,UAAU;IACV,UAAU;IACV,SAAS;IACT,QAAQ;IACR,IAAI;IACJ,MAAM;IACN,MAAM;IACN,QAAQ;IACR,SAAS;IACT,OAAO;IACP,SAAS;IACT,KAAK;IACL,UAAU;IACV,IAAI;IACJ,QAAQ;IACR,IAAI;IACJ,YAAY;IACZ,KAAK;IACL,MAAM;IACN,QAAQ;IACR,OAAO;IACP,QAAQ;IACR,MAAM;IACN,OAAO;IACP,MAAM;IACN,KAAK;IACL,QAAQ;IACR,KAAK;IACL,MAAM;IACN,OAAO;IACP,MAAM;IACN,qEAAqE;IACrE,WAAW;IACX,OAAO;IACP,MAAM;IACN,YAAY;IACZ,WAAW;IACX,KAAK;IACL,SAAS;IACT,SAAS;IACT,WAAW;IACX,QAAQ;IACR,QAAQ;IACR,OAAO;IACP,qEAAqE;IACrE,WAAW;CACZ,CAAC,CAAA;AAEF,oFAAoF;AACpF,IAAM,mBAAmB,GAAG,4BAA4B,CAAA;AAExD,0FAA0F;AAC1F,IAAM,qBAAqB,GAAG,2BAA2B,CAAA;AAEzD,qEAAqE;AACrE,IAAM,2BAA2B,GAAG,iBAAiB,CAAA;AAErD,wEAAwE;AACxE,MAAM,CAAC,IAAM,sBAAsB,GAAG,QAAQ,CAAA;AAE9C,4EAA4E;AAC5E,MAAM,CAAC,IAAM,sBAAsB,GAAG,UAAC,IAAY;IACjD,OAAA,OAAO,IAAI,KAAK,QAAQ,IAAI,uBAAuB,CAAC,GAAG,CAAC,IAAI,CAAC;AAA7D,CAA6D,CAAA;AAE/D;;;GAGG;AACH,MAAM,CAAC,IAAM,uBAAuB,GAAG,UAAC,IAAY;IAClD,OAAA,OAAO,IAAI,KAAK,QAAQ,IAAI,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,uBAAuB,CAAC,GAAG,CAAC,IAAI,CAAC;AAAhG,CAAgG,CAAA;AAElG;;;;;GAKG;AACH,MAAM,CAAC,IAAM,sBAAsB,GAAG,UAAC,IAAY;IACjD,OAAA,OAAO,IAAI,KAAK,QAAQ,IAAI,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC;AAA1D,CAA0D,CAAA;AAE5D;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,IAAM,sBAAsB,GAAG,UACpC,IAAY,EACZ,QAAyC;IAAzC,yBAAA,EAAA,iCAAyC;IAEzC,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,EAAE,EAAE;QAC3C,OAAO,QAAQ,CAAA;KAChB;IAED,IAAI,uBAAuB,CAAC,IAAI,CAAC,EAAE;QACjC,OAAO,IAAI,CAAA;KACZ;IAED,IAAI,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,2BAA2B,EAAE,GAAG,CAAC,CAAA;IACzD,IAAI,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;QACvB,IAAI,GAAG,WAAI,IAAI,CAAE,CAAA;KAClB;IACD,6EAA6E;IAC7E,2EAA2E;IAC3E,IAAI,IAAI,KAAK,EAAE,EAAE;QACf,OAAO,QAAQ,CAAA;KAChB;IACD,0EAA0E;IAC1E,iEAAiE;IACjE,OAAO,uBAAuB,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,UAAG,IAAI,MAAG,CAAC,CAAC,CAAC,IAAI,CAAA;AAC9D,CAAC,CAAA;AAED;;;;;;GAMG;AACH,IAAM,qBAAqB,GAAG,eAAe,CAAA;AAE7C;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,IAAM,0BAA0B,GAAG,UAAC,UAAkB;IAC3D,IAAI,OAAO,UAAU,KAAK,QAAQ,IAAI,UAAU,KAAK,EAAE,EAAE;QACvD,OAAO,UAAU,CAAA;KAClB;IAED,IAAM,KAAK,GAAG,qBAAqB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA;IACpD,IAAI,CAAC,KAAK,EAAE;QACV,2EAA2E;QAC3E,qEAAqE;QACrE,8CAA8C;QAC9C,OAAO,UAAU,CAAA;KAClB;IAED,IAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAA;IACrB,IAAM,IAAI,GAAG,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IAC1C,IAAI,IAAI,KAAK,EAAE,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;QACpD,OAAO,UAAU,CAAA;KAClB;IAED,IAAM,QAAQ,GAAG,sBAAsB,CAAC,IAAI,CAAC,CAAA;IAC7C,OAAO,QAAQ,KAAK,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,UAAG,QAAQ,SAAG,IAAI,CAAE,CAAA;AAC9D,CAAC,CAAA"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { UIDLElementNode, UIDLStyleSetDefinition, UIDLStyleSheetContent, UIDLStyleValue } from '@teleporthq/teleport-types';
|
|
2
|
+
/**
|
|
3
|
+
* Which UIDL nodes actually generate a layout box — and therefore which node is
|
|
4
|
+
* a given element's REAL parent for layout purposes.
|
|
5
|
+
*
|
|
6
|
+
* This exists because the same defect keeps reappearing: a generator inserts a
|
|
7
|
+
* wrapper (a link anchor, an animation wrapper, a repeater shell) between a
|
|
8
|
+
* flex/grid container and its styled children. The wrapper becomes the flex/grid
|
|
9
|
+
* item, the child's `flex`/`grid-area`/`align-self` silently stop applying — a
|
|
10
|
+
* `flex: 0 0 340px` card collapses to content width — and the published site
|
|
11
|
+
* stops matching what the editor showed. The editor never renders those
|
|
12
|
+
* wrappers at all, so "what you see is what you get" quietly breaks.
|
|
13
|
+
*
|
|
14
|
+
* The subtle half is the ancestor walk, not the wrapper. UIDL trees are full of
|
|
15
|
+
* nodes that render NOTHING: fragments, repeaters, data providers, conditional
|
|
16
|
+
* shells. Asking "is my parent a flex container?" of the immediate UIDL parent
|
|
17
|
+
* gets the wrong answer whenever one of those sits in between — and it usually
|
|
18
|
+
* does, because cards live inside repeaters. Ask `resolveLayoutParent` instead
|
|
19
|
+
* and the question is asked of the node that actually draws the box.
|
|
20
|
+
*
|
|
21
|
+
* Add new box-less element types HERE, once, rather than at each call site.
|
|
22
|
+
*/
|
|
23
|
+
/**
|
|
24
|
+
* Element types that never produce a layout box. `fragment` renders as a React
|
|
25
|
+
* `<Fragment>` on JSX targets and as a `div { display: contents }` on the HTML
|
|
26
|
+
* target — either way it generates no box, so it can never be a layout parent.
|
|
27
|
+
*/
|
|
28
|
+
export declare const LAYOUT_TRANSPARENT_ELEMENT_TYPES: Set<string>;
|
|
29
|
+
export declare const isLayoutTransparentElement: (node?: UIDLElementNode) => boolean;
|
|
30
|
+
/**
|
|
31
|
+
* The layout parent to hand to `node`'s children.
|
|
32
|
+
*
|
|
33
|
+
* Thread this through a recursive walk instead of passing the current node:
|
|
34
|
+
* a box-less node passes its own layout parent straight through, so a chain of
|
|
35
|
+
* fragments/repeaters collapses to the nearest ancestor that really draws a box.
|
|
36
|
+
*/
|
|
37
|
+
export declare const resolveLayoutParent: (node: UIDLElementNode, currentLayoutParent?: UIDLElementNode) => UIDLElementNode | undefined;
|
|
38
|
+
/** Display values that make a node lay its direct children out as items. */
|
|
39
|
+
export declare const FLEX_OR_GRID_DISPLAYS: Set<string>;
|
|
40
|
+
export declare const isStaticFlexOrGridDisplay: (display: UIDLStyleValue | UIDLStyleSheetContent | undefined) => boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Does this node lay its children out as flex/grid items?
|
|
43
|
+
*
|
|
44
|
+
* The display can come from an inline style or — far more common in generated
|
|
45
|
+
* projects — from a project-referenced style class. Abilities are resolved
|
|
46
|
+
* before referenced styles are flattened, so the style set has to be consulted
|
|
47
|
+
* directly; pass `options.projectStyleSet?.styleSetDefinitions`.
|
|
48
|
+
*/
|
|
49
|
+
export declare const isFlexOrGridContainer: (node: UIDLElementNode | undefined, styleSetDefinitions?: Record<string, UIDLStyleSetDefinition>) => boolean;
|
|
50
|
+
//# sourceMappingURL=layout-topology.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layout-topology.d.ts","sourceRoot":"","sources":["../../../src/utils/layout-topology.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,sBAAsB,EACtB,qBAAqB,EACrB,cAAc,EACf,MAAM,4BAA4B,CAAA;AAEnC;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH;;;;GAIG;AACH,eAAO,MAAM,gCAAgC,aAAwB,CAAA;AAErE,eAAO,MAAM,0BAA0B,UAAW,eAAe,KAAG,OACM,CAAA;AAE1E;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,SACxB,eAAe,wBACC,eAAe,KACpC,eAAe,GAAG,SAA4E,CAAA;AAEjG,4EAA4E;AAC5E,eAAO,MAAM,qBAAqB,aAA0D,CAAA;AAE5F,eAAO,MAAM,yBAAyB,YAC3B,cAAc,GAAG,qBAAqB,GAAG,SAAS,KAC1D,OAA2F,CAAA;AAE9F;;;;;;;GAOG;AACH,eAAO,MAAM,qBAAqB,SAC1B,eAAe,GAAG,SAAS,wBACX,OAAO,MAAM,EAAE,sBAAsB,CAAC,KAC3D,OAqBF,CAAA"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Which UIDL nodes actually generate a layout box — and therefore which node is
|
|
3
|
+
* a given element's REAL parent for layout purposes.
|
|
4
|
+
*
|
|
5
|
+
* This exists because the same defect keeps reappearing: a generator inserts a
|
|
6
|
+
* wrapper (a link anchor, an animation wrapper, a repeater shell) between a
|
|
7
|
+
* flex/grid container and its styled children. The wrapper becomes the flex/grid
|
|
8
|
+
* item, the child's `flex`/`grid-area`/`align-self` silently stop applying — a
|
|
9
|
+
* `flex: 0 0 340px` card collapses to content width — and the published site
|
|
10
|
+
* stops matching what the editor showed. The editor never renders those
|
|
11
|
+
* wrappers at all, so "what you see is what you get" quietly breaks.
|
|
12
|
+
*
|
|
13
|
+
* The subtle half is the ancestor walk, not the wrapper. UIDL trees are full of
|
|
14
|
+
* nodes that render NOTHING: fragments, repeaters, data providers, conditional
|
|
15
|
+
* shells. Asking "is my parent a flex container?" of the immediate UIDL parent
|
|
16
|
+
* gets the wrong answer whenever one of those sits in between — and it usually
|
|
17
|
+
* does, because cards live inside repeaters. Ask `resolveLayoutParent` instead
|
|
18
|
+
* and the question is asked of the node that actually draws the box.
|
|
19
|
+
*
|
|
20
|
+
* Add new box-less element types HERE, once, rather than at each call site.
|
|
21
|
+
*/
|
|
22
|
+
/**
|
|
23
|
+
* Element types that never produce a layout box. `fragment` renders as a React
|
|
24
|
+
* `<Fragment>` on JSX targets and as a `div { display: contents }` on the HTML
|
|
25
|
+
* target — either way it generates no box, so it can never be a layout parent.
|
|
26
|
+
*/
|
|
27
|
+
export var LAYOUT_TRANSPARENT_ELEMENT_TYPES = new Set(['fragment']);
|
|
28
|
+
export var isLayoutTransparentElement = function (node) {
|
|
29
|
+
return !!node && LAYOUT_TRANSPARENT_ELEMENT_TYPES.has(node.content.elementType);
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* The layout parent to hand to `node`'s children.
|
|
33
|
+
*
|
|
34
|
+
* Thread this through a recursive walk instead of passing the current node:
|
|
35
|
+
* a box-less node passes its own layout parent straight through, so a chain of
|
|
36
|
+
* fragments/repeaters collapses to the nearest ancestor that really draws a box.
|
|
37
|
+
*/
|
|
38
|
+
export var resolveLayoutParent = function (node, currentLayoutParent) { return (isLayoutTransparentElement(node) ? currentLayoutParent : node); };
|
|
39
|
+
/** Display values that make a node lay its direct children out as items. */
|
|
40
|
+
export var FLEX_OR_GRID_DISPLAYS = new Set(['flex', 'inline-flex', 'grid', 'inline-grid']);
|
|
41
|
+
export var isStaticFlexOrGridDisplay = function (display) { return (display === null || display === void 0 ? void 0 : display.type) === 'static' && FLEX_OR_GRID_DISPLAYS.has(String(display.content)); };
|
|
42
|
+
/**
|
|
43
|
+
* Does this node lay its children out as flex/grid items?
|
|
44
|
+
*
|
|
45
|
+
* The display can come from an inline style or — far more common in generated
|
|
46
|
+
* projects — from a project-referenced style class. Abilities are resolved
|
|
47
|
+
* before referenced styles are flattened, so the style set has to be consulted
|
|
48
|
+
* directly; pass `options.projectStyleSet?.styleSetDefinitions`.
|
|
49
|
+
*/
|
|
50
|
+
export var isFlexOrGridContainer = function (node, styleSetDefinitions) {
|
|
51
|
+
var _a;
|
|
52
|
+
if (!node) {
|
|
53
|
+
return false;
|
|
54
|
+
}
|
|
55
|
+
if (isStaticFlexOrGridDisplay((_a = node.content.style) === null || _a === void 0 ? void 0 : _a.display)) {
|
|
56
|
+
return true;
|
|
57
|
+
}
|
|
58
|
+
var referencedStyles = node.content.referencedStyles;
|
|
59
|
+
if (!referencedStyles || !styleSetDefinitions) {
|
|
60
|
+
return false;
|
|
61
|
+
}
|
|
62
|
+
return Object.values(referencedStyles).some(function (referencedStyle) {
|
|
63
|
+
var _a;
|
|
64
|
+
if (referencedStyle.content.mapType !== 'project-referenced') {
|
|
65
|
+
return false;
|
|
66
|
+
}
|
|
67
|
+
var styleSet = styleSetDefinitions[referencedStyle.content.referenceId];
|
|
68
|
+
return isStaticFlexOrGridDisplay((_a = styleSet === null || styleSet === void 0 ? void 0 : styleSet.content) === null || _a === void 0 ? void 0 : _a.display);
|
|
69
|
+
});
|
|
70
|
+
};
|
|
71
|
+
//# sourceMappingURL=layout-topology.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layout-topology.js","sourceRoot":"","sources":["../../../src/utils/layout-topology.ts"],"names":[],"mappings":"AAOA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH;;;;GAIG;AACH,MAAM,CAAC,IAAM,gCAAgC,GAAG,IAAI,GAAG,CAAC,CAAC,UAAU,CAAC,CAAC,CAAA;AAErE,MAAM,CAAC,IAAM,0BAA0B,GAAG,UAAC,IAAsB;IAC/D,OAAA,CAAC,CAAC,IAAI,IAAI,gCAAgC,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC;AAAxE,CAAwE,CAAA;AAE1E;;;;;;GAMG;AACH,MAAM,CAAC,IAAM,mBAAmB,GAAG,UACjC,IAAqB,EACrB,mBAAqC,IACL,OAAA,CAAC,0BAA0B,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,IAAI,CAAC,EAA/D,CAA+D,CAAA;AAEjG,4EAA4E;AAC5E,MAAM,CAAC,IAAM,qBAAqB,GAAG,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,aAAa,CAAC,CAAC,CAAA;AAE5F,MAAM,CAAC,IAAM,yBAAyB,GAAG,UACvC,OAA2D,IAC/C,OAAA,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,IAAI,MAAK,QAAQ,IAAI,qBAAqB,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,EAAhF,CAAgF,CAAA;AAE9F;;;;;;;GAOG;AACH,MAAM,CAAC,IAAM,qBAAqB,GAAG,UACnC,IAAiC,EACjC,mBAA4D;;IAE5D,IAAI,CAAC,IAAI,EAAE;QACT,OAAO,KAAK,CAAA;KACb;IAED,IAAI,yBAAyB,CAAC,MAAA,IAAI,CAAC,OAAO,CAAC,KAAK,0CAAE,OAAO,CAAC,EAAE;QAC1D,OAAO,IAAI,CAAA;KACZ;IAED,IAAM,gBAAgB,GAAG,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAA;IACtD,IAAI,CAAC,gBAAgB,IAAI,CAAC,mBAAmB,EAAE;QAC7C,OAAO,KAAK,CAAA;KACb;IAED,OAAO,MAAM,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC,IAAI,CAAC,UAAC,eAAe;;QAC1D,IAAI,eAAe,CAAC,OAAO,CAAC,OAAO,KAAK,oBAAoB,EAAE;YAC5D,OAAO,KAAK,CAAA;SACb;QACD,IAAM,QAAQ,GAAG,mBAAmB,CAAC,eAAe,CAAC,OAAO,CAAC,WAAW,CAAC,CAAA;QACzE,OAAO,yBAAyB,CAAC,MAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,OAAO,0CAAE,OAAO,CAAC,CAAA;IAC9D,CAAC,CAAC,CAAA;AACJ,CAAC,CAAA"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reading Next.js dynamic route templates.
|
|
3
|
+
*
|
|
4
|
+
* A details page's route is a TEMPLATE, not a URL: `/event-details/[id]`. Two
|
|
5
|
+
* different consumers have to understand that, and both got it wrong in
|
|
6
|
+
* different ways — the SEO head plugin emitted the template verbatim into
|
|
7
|
+
* `<link rel="canonical">`, `og:url` and the sitemap, and the navlink resolver
|
|
8
|
+
* handed out the bare prefix (`/event-details`) as if it were a real route.
|
|
9
|
+
* Both produce a URL that 404s.
|
|
10
|
+
*
|
|
11
|
+
* Lives in teleport-shared because the two callers sit in packages that do not
|
|
12
|
+
* (and should not) depend on each other.
|
|
13
|
+
*
|
|
14
|
+
* Pure; never throws.
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* True when `path` contains at least one Next.js dynamic segment (`/[id]`).
|
|
18
|
+
*
|
|
19
|
+
* The string form of `isDynamicRoute`, for callers that hold a URL or a
|
|
20
|
+
* `navLink` rather than a component's `outputOptions`.
|
|
21
|
+
*/
|
|
22
|
+
export declare const pathHasDynamicSegment: (path: string) => boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Split a URL or path into the literal text around its parameters, plus the
|
|
25
|
+
* parameter names in order — so a caller can rebuild it as a template literal.
|
|
26
|
+
*
|
|
27
|
+
* Recognises BOTH spellings a canonical/`navLink` value can arrive in:
|
|
28
|
+
* - `${id}` — the template-literal form;
|
|
29
|
+
* - `[id]` — the Next.js route form, which is what a details page's
|
|
30
|
+
* `navLink` actually carries (`/event-details/[id]`).
|
|
31
|
+
*
|
|
32
|
+
* Only the `${...}` form was understood before, so every details page shipped
|
|
33
|
+
* its canonical URL, `og:url` and sitemap entry containing the literal text
|
|
34
|
+
* `[id]` — a URL that 404s for every crawler and every shared link.
|
|
35
|
+
*
|
|
36
|
+
* `staticParts` always has exactly `paramNames.length + 1` entries, so
|
|
37
|
+
* `staticParts[i]` precedes `paramNames[i]`. With no parameters the result is
|
|
38
|
+
* `{ staticParts: [str], paramNames: [] }`, which callers use to keep emitting
|
|
39
|
+
* a plain string attribute.
|
|
40
|
+
*/
|
|
41
|
+
export declare const parseDynamicPathSegments: (str: string) => {
|
|
42
|
+
staticParts: string[];
|
|
43
|
+
paramNames: string[];
|
|
44
|
+
};
|
|
45
|
+
//# sourceMappingURL=route-paths.d.ts.map
|