@makeswift/runtime 0.24.1 → 0.24.2-canary.1
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/dist/cjs/builder/index.js +3 -1
- package/dist/cjs/builder/index.js.map +1 -1
- package/dist/cjs/builder/unstructured-introspection/__fixtures__/element-containing-resources.js +899 -0
- package/dist/cjs/builder/unstructured-introspection/__fixtures__/element-containing-resources.js.map +1 -0
- package/dist/cjs/builder/unstructured-introspection/__fixtures__/index.js +23 -0
- package/dist/cjs/builder/unstructured-introspection/__fixtures__/index.js.map +1 -0
- package/dist/cjs/builder/unstructured-introspection/index.js +29 -0
- package/dist/cjs/builder/unstructured-introspection/index.js.map +1 -0
- package/dist/cjs/builder/unstructured-introspection/unstructured-introspection.js +85 -0
- package/dist/cjs/builder/unstructured-introspection/unstructured-introspection.js.map +1 -0
- package/dist/cjs/next/api-handler/handlers/manifest.js +1 -1
- package/dist/cjs/next/api-handler/handlers/redirect-preview.js +4 -3
- package/dist/cjs/next/api-handler/handlers/redirect-preview.js.map +1 -1
- package/dist/esm/builder/index.js +1 -0
- package/dist/esm/builder/index.js.map +1 -1
- package/dist/esm/builder/unstructured-introspection/__fixtures__/element-containing-resources.js +875 -0
- package/dist/esm/builder/unstructured-introspection/__fixtures__/element-containing-resources.js.map +1 -0
- package/dist/esm/builder/unstructured-introspection/__fixtures__/index.js +2 -0
- package/dist/esm/builder/unstructured-introspection/__fixtures__/index.js.map +1 -0
- package/dist/esm/builder/unstructured-introspection/index.js +5 -0
- package/dist/esm/builder/unstructured-introspection/index.js.map +1 -0
- package/dist/esm/builder/unstructured-introspection/unstructured-introspection.js +61 -0
- package/dist/esm/builder/unstructured-introspection/unstructured-introspection.js.map +1 -0
- package/dist/esm/next/api-handler/handlers/manifest.js +1 -1
- package/dist/esm/next/api-handler/handlers/redirect-preview.js +4 -3
- package/dist/esm/next/api-handler/handlers/redirect-preview.js.map +1 -1
- package/dist/types/builder/index.d.ts +1 -0
- package/dist/types/builder/index.d.ts.map +1 -1
- package/dist/types/builder/unstructured-introspection/__fixtures__/element-containing-resources.d.ts +3 -0
- package/dist/types/builder/unstructured-introspection/__fixtures__/element-containing-resources.d.ts.map +1 -0
- package/dist/types/builder/unstructured-introspection/__fixtures__/index.d.ts +2 -0
- package/dist/types/builder/unstructured-introspection/__fixtures__/index.d.ts.map +1 -0
- package/dist/types/builder/unstructured-introspection/index.d.ts +2 -0
- package/dist/types/builder/unstructured-introspection/index.d.ts.map +1 -0
- package/dist/types/builder/unstructured-introspection/unstructured-introspection.d.ts +10 -0
- package/dist/types/builder/unstructured-introspection/unstructured-introspection.d.ts.map +1 -0
- package/dist/types/builder/unstructured-introspection/unstructured-introspection.test.d.ts +2 -0
- package/dist/types/builder/unstructured-introspection/unstructured-introspection.test.d.ts.map +1 -0
- package/package.json +2 -1
package/dist/esm/builder/unstructured-introspection/__fixtures__/element-containing-resources.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/builder/unstructured-introspection/__fixtures__/element-containing-resources.ts"],"sourcesContent":["import { Element } from '@makeswift/controls'\n\n/*\n Below is a fairly minimal example of an Element containing one of each:\n - Swatch\n - File\n - Typography\n - Global Element\n - Page Link (called 'Page' in APIResourceType)\n - Table\n*/\nexport const elementContainingResources: Element = {\n key: '2c5e9ffc-dbcf-486a-ac62-8ac9efa539f0',\n props: {\n children: {\n '@@makeswift/type': 'prop-controllers::grid::v1',\n value: {\n columns: [\n {\n deviceId: 'desktop',\n value: {\n spans: [[12], [12], [12], [12], [12], [12]],\n count: 12,\n },\n },\n ],\n elements: [\n {\n key: 'cb66f6cb-0656-4424-81d7-0d03b27c45de',\n props: {\n children: {\n '@@makeswift/type': 'prop-controllers::grid::v1',\n value: {\n columns: [\n {\n deviceId: 'desktop',\n value: {\n count: 12,\n spans: [[12]],\n },\n },\n ],\n elements: [\n {\n key: '0f56d678-341a-4b05-bc9c-3a9f5bd7251e',\n props: {\n margin: [\n {\n deviceId: 'desktop',\n value: {\n marginBottom: {\n unit: 'px',\n value: 20,\n },\n marginLeft: 'auto',\n marginRight: 'auto',\n marginTop: null,\n },\n },\n ],\n text: {\n descendants: [\n {\n children: [\n {\n text: 'Resource: swatch only',\n typography: {\n style: [\n {\n deviceId: 'mobile',\n value: {\n fontSize: {\n unit: 'px',\n value: 16,\n },\n },\n },\n {\n deviceId: 'desktop',\n value: {\n color: {\n alpha: 1,\n swatchId:\n 'U3dhdGNoOmQ1ZWU3MmY1LThmMTQtNDQzZC05YmQ1LTJiMDA1MTIyYTA5NQ==',\n },\n fontSize: {\n unit: 'px',\n value: 18,\n },\n fontWeight: 400,\n lineHeight: 1.5,\n },\n },\n ],\n },\n },\n ],\n type: 'default',\n },\n ],\n key: 'c632090b-2269-40c9-8924-0ecc5effa651',\n type: 'makeswift::controls::rich-text-v2',\n version: 2,\n },\n width: [\n {\n deviceId: 'desktop',\n value: {\n unit: 'px',\n value: 700,\n },\n },\n ],\n },\n type: './components/Text/index.js',\n },\n ],\n },\n },\n padding: [\n {\n deviceId: 'desktop',\n value: {\n paddingBottom: {\n unit: 'px',\n value: 10,\n },\n paddingLeft: {\n unit: 'px',\n value: 10,\n },\n paddingRight: {\n unit: 'px',\n value: 10,\n },\n paddingTop: {\n unit: 'px',\n value: 10,\n },\n },\n },\n ],\n },\n type: './components/Box/index.js',\n },\n {\n key: 'cf3e1cd1-e1bb-4420-8644-34d780b5465b',\n props: {\n children: {\n '@@makeswift/type': 'prop-controllers::grid::v1',\n value: {\n columns: [\n {\n deviceId: 'desktop',\n value: {\n count: 12,\n spans: [[6, 6]],\n },\n },\n ],\n elements: [\n {\n key: 'c42ddde2-b9ff-4787-909f-d23866ca9130',\n props: {\n file: {\n '@@makeswift/type': 'prop-controllers::image::v2',\n value: {\n id: 'RmlsZTpjNzc2MjI3ZC1iNmZjLTQ3MGYtYTY1OC00NWQ4NzA2NDVkMDM=',\n type: 'makeswift-file',\n version: 1,\n },\n },\n margin: {\n '@@makeswift/type': 'prop-controllers::margin::v1',\n value: [\n {\n deviceId: 'desktop',\n value: {\n marginLeft: {\n unit: 'px',\n value: 270,\n },\n marginRight: 'auto',\n },\n },\n ],\n },\n width: {\n '@@makeswift/type': 'prop-controllers::width::v1',\n value: [\n {\n deviceId: 'desktop',\n value: {\n unit: '%',\n value: 15,\n },\n },\n ],\n },\n },\n type: './components/Image/index.js',\n },\n {\n key: 'ce4edb81-8832-4266-a152-4e506e1e754d',\n props: {\n margin: {\n '@@makeswift/type': 'prop-controllers::margin::v1',\n value: [\n {\n deviceId: 'desktop',\n value: {\n marginBottom: {\n unit: 'px',\n value: 20,\n },\n marginLeft: 'auto',\n marginRight: 'auto',\n marginTop: null,\n },\n },\n ],\n },\n text: {\n descendants: [\n {\n children: [\n {\n text: 'Resource: File only',\n typography: {\n style: [\n {\n deviceId: 'desktop',\n value: {\n fontSize: {\n unit: 'px',\n value: 18,\n },\n fontWeight: 400,\n lineHeight: 1.5,\n },\n },\n {\n deviceId: 'mobile',\n value: {\n fontSize: {\n unit: 'px',\n value: 16,\n },\n },\n },\n ],\n },\n },\n ],\n type: 'default',\n },\n ],\n key: '061f43b1-72aa-46b6-b429-c4a55eac09c5',\n type: 'makeswift::controls::rich-text-v2',\n version: 2,\n },\n width: [\n {\n deviceId: 'desktop',\n value: {\n unit: 'px',\n value: 700,\n },\n },\n ],\n },\n type: './components/Text/index.js',\n },\n ],\n },\n },\n padding: [\n {\n deviceId: 'desktop',\n value: {\n paddingBottom: {\n unit: 'px',\n value: 10,\n },\n paddingLeft: {\n unit: 'px',\n value: 10,\n },\n paddingRight: {\n unit: 'px',\n value: 10,\n },\n paddingTop: {\n unit: 'px',\n value: 10,\n },\n },\n },\n ],\n },\n type: './components/Box/index.js',\n },\n {\n key: 'ceebe1f0-31c1-4314-b387-df463d076751',\n props: {\n children: {\n '@@makeswift/type': 'prop-controllers::grid::v1',\n value: {\n columns: [\n {\n deviceId: 'desktop',\n value: {\n count: 12,\n spans: [[12]],\n },\n },\n ],\n elements: [\n {\n key: '87ab03ef-3a10-49d9-b596-719834f894dd',\n props: {\n margin: {\n '@@makeswift/type': 'prop-controllers::margin::v1',\n value: [\n {\n deviceId: 'desktop',\n value: {\n marginBottom: {\n unit: 'px',\n value: 20,\n },\n marginLeft: 'auto',\n marginRight: 'auto',\n marginTop: null,\n },\n },\n ],\n },\n text: {\n descendants: [\n {\n children: [\n {\n text: 'Resource: typography only',\n typography: {\n id: 'VHlwb2dyYXBoeTo1ODVkMGE1ZS0zYmUyLTQyNzEtOTczYS1mNWNjN2UzMzk4ODg=',\n style: [],\n },\n },\n ],\n type: 'default',\n },\n ],\n key: '9c7f5fa6-7f15-4e60-91fd-778827ab3449',\n type: 'makeswift::controls::rich-text-v2',\n version: 2,\n },\n width: [\n {\n deviceId: 'desktop',\n value: {\n unit: 'px',\n value: 700,\n },\n },\n ],\n },\n type: './components/Text/index.js',\n },\n ],\n },\n },\n padding: [\n {\n deviceId: 'desktop',\n value: {\n paddingBottom: {\n unit: 'px',\n value: 10,\n },\n paddingLeft: {\n unit: 'px',\n value: 10,\n },\n paddingRight: {\n unit: 'px',\n value: 10,\n },\n paddingTop: {\n unit: 'px',\n value: 10,\n },\n },\n },\n ],\n },\n type: './components/Box/index.js',\n },\n {\n key: '6f2a2437-f690-4644-84d6-14073f1404d4',\n props: {\n children: {\n '@@makeswift/type': 'prop-controllers::grid::v1',\n value: {\n columns: [\n {\n deviceId: 'desktop',\n value: {\n count: 12,\n spans: [[6, 6]],\n },\n },\n ],\n elements: [\n {\n key: '42a6048c-ea36-41a4-9783-9c28f58fa3e6',\n props: {\n margin: [\n {\n deviceId: 'desktop',\n value: {\n marginBottom: {\n unit: 'px',\n value: 20,\n },\n marginLeft: 'auto',\n marginRight: 'auto',\n marginTop: null,\n },\n },\n ],\n text: {\n descendants: [\n {\n children: [\n {\n text: 'Resource: Global Element only',\n typography: {\n style: [\n {\n deviceId: 'desktop',\n value: {\n fontSize: {\n unit: 'px',\n value: 18,\n },\n fontWeight: 400,\n lineHeight: 1.5,\n },\n },\n {\n deviceId: 'mobile',\n value: {\n fontSize: {\n unit: 'px',\n value: 16,\n },\n },\n },\n ],\n },\n },\n ],\n type: 'default',\n },\n ],\n key: '09c570fa-7d82-4886-8c33-ad418202d562',\n type: 'makeswift::controls::rich-text-v2',\n version: 2,\n },\n width: [\n {\n deviceId: 'desktop',\n value: {\n unit: 'px',\n value: 700,\n },\n },\n ],\n },\n type: './components/Text/index.js',\n },\n {\n key: '229fc932-2fdf-46eb-8ff6-ad31d3660d0a',\n type: 'reference',\n value: 'R2xvYmFsRWxlbWVudDphOTRjYjM3ZS02OWM2LTQ1OGQtODIxNS1mZTA2NGQ3OWZmNjI=',\n },\n ],\n },\n },\n padding: [\n {\n deviceId: 'desktop',\n value: {\n paddingBottom: {\n unit: 'px',\n value: 10,\n },\n paddingLeft: {\n unit: 'px',\n value: 10,\n },\n paddingRight: {\n unit: 'px',\n value: 10,\n },\n paddingTop: {\n unit: 'px',\n value: 10,\n },\n },\n },\n ],\n },\n type: './components/Box/index.js',\n },\n {\n key: '3c83ae93-7cc9-47b1-8599-4efbd5bbd331',\n props: {\n children: {\n '@@makeswift/type': 'prop-controllers::grid::v1',\n value: {\n columns: [\n {\n deviceId: 'desktop',\n value: {\n count: 12,\n spans: [[6, 6]],\n },\n },\n ],\n elements: [\n {\n key: 'f1ee5bf3-ebec-4398-b4e1-73b13c8050dd',\n props: {\n margin: [\n {\n deviceId: 'desktop',\n value: {\n marginBottom: {\n unit: 'px',\n value: 20,\n },\n marginLeft: 'auto',\n marginRight: 'auto',\n marginTop: null,\n },\n },\n ],\n text: {\n descendants: [\n {\n children: [\n {\n text: 'Resource: Page Link only',\n typography: {\n style: [\n {\n deviceId: 'desktop',\n value: {\n fontSize: {\n unit: 'px',\n value: 18,\n },\n fontWeight: 400,\n lineHeight: 1.5,\n },\n },\n {\n deviceId: 'mobile',\n value: {\n fontSize: {\n unit: 'px',\n value: 16,\n },\n },\n },\n ],\n },\n },\n ],\n type: 'default',\n },\n ],\n key: 'f3b4e0db-8141-4500-8b0d-19978cfcd664',\n type: 'makeswift::controls::rich-text-v2',\n version: 2,\n },\n width: [\n {\n deviceId: 'desktop',\n value: {\n unit: 'px',\n value: 700,\n },\n },\n ],\n },\n type: './components/Text/index.js',\n },\n {\n key: '0ca675bf-a128-4a22-9cda-b4f07ad7b52e',\n props: {\n margin: [\n {\n deviceId: 'desktop',\n value: {\n marginBottom: {\n unit: 'px',\n value: 20,\n },\n marginLeft: 'auto',\n marginRight: 'auto',\n marginTop: null,\n },\n },\n ],\n text: {\n descendants: [\n {\n children: [\n {\n text: '',\n },\n {\n children: [\n {\n text: 'Sample Link to Page A',\n typography: {\n style: [\n {\n deviceId: 'desktop',\n value: {\n fontSize: {\n unit: 'px',\n value: 18,\n },\n fontWeight: 400,\n lineHeight: 1.5,\n },\n },\n {\n deviceId: 'mobile',\n value: {\n fontSize: {\n unit: 'px',\n value: 16,\n },\n },\n },\n ],\n },\n },\n ],\n link: {\n payload: {\n openInNewTab: false,\n pageId:\n 'UGFnZToxZWU1YmNjNi1mMGI1LTQxMGUtOWIzMy0wZTJjZTNkYTIwMzE=',\n },\n type: 'OPEN_PAGE',\n },\n type: 'link',\n },\n {\n text: '',\n },\n ],\n type: 'default',\n },\n ],\n key: '878ec264-dbb5-4b14-8dc3-651133ba9a8e',\n type: 'makeswift::controls::rich-text-v2',\n version: 2,\n },\n width: [\n {\n deviceId: 'desktop',\n value: {\n unit: 'px',\n value: 700,\n },\n },\n ],\n },\n type: './components/Text/index.js',\n },\n ],\n },\n },\n padding: [\n {\n deviceId: 'desktop',\n value: {\n paddingBottom: {\n unit: 'px',\n value: 10,\n },\n paddingLeft: {\n unit: 'px',\n value: 10,\n },\n paddingRight: {\n unit: 'px',\n value: 10,\n },\n paddingTop: {\n unit: 'px',\n value: 10,\n },\n },\n },\n ],\n },\n type: './components/Box/index.js',\n },\n {\n key: 'fac5fb69-c058-49a8-8b07-0917b2beddc8',\n props: {\n padding: [\n {\n deviceId: 'desktop',\n value: {\n paddingBottom: {\n unit: 'px',\n value: 10,\n },\n paddingLeft: {\n unit: 'px',\n value: 10,\n },\n paddingRight: {\n unit: 'px',\n value: 10,\n },\n paddingTop: {\n unit: 'px',\n value: 10,\n },\n },\n },\n ],\n children: {\n '@@makeswift/type': 'prop-controllers::grid::v1',\n value: {\n columns: [\n {\n deviceId: 'desktop',\n value: {\n spans: [[6, 6]],\n count: 12,\n },\n },\n ],\n elements: [\n {\n key: '9274acff-aa56-4f04-b4f2-04e8106dc3a0',\n props: {\n margin: {\n '@@makeswift/type': 'prop-controllers::margin::v1',\n value: [\n {\n deviceId: 'desktop',\n value: {\n marginBottom: {\n unit: 'px',\n value: 20,\n },\n marginLeft: {\n unit: 'px',\n value: 0,\n },\n marginRight: 'auto',\n marginTop: null,\n },\n },\n ],\n },\n width: [\n {\n deviceId: 'desktop',\n value: {\n unit: 'px',\n value: 700,\n },\n },\n ],\n text: {\n type: 'makeswift::controls::rich-text-v2',\n version: 2,\n descendants: [\n {\n children: [\n {\n text: 'Resource: table',\n typography: {\n style: [\n {\n deviceId: 'desktop',\n value: {\n fontSize: {\n unit: 'px',\n value: 18,\n },\n fontWeight: 400,\n lineHeight: 1.5,\n },\n },\n {\n deviceId: 'mobile',\n value: {\n fontSize: {\n unit: 'px',\n value: 16,\n },\n },\n },\n ],\n },\n },\n ],\n type: 'default',\n },\n ],\n key: '78307876-10bc-4240-a01d-071cd395a586',\n },\n },\n type: './components/Text/index.js',\n },\n {\n key: 'f5fbb12a-948b-414d-8267-b571713cbf60',\n type: './components/Form/index.js',\n props: {\n gap: [\n {\n deviceId: 'desktop',\n value: {\n value: 10,\n unit: 'px',\n },\n },\n ],\n width: [\n {\n deviceId: 'desktop',\n value: {\n value: 550,\n unit: 'px',\n },\n },\n ],\n tableId: {\n '@@makeswift/type': 'prop-controllers::table::v1',\n value: 'VGFibGU6MDI2OTUwMDQtOThkMi00NDU1LThjNDAtYmFiMDU5YTY3NDQy',\n },\n fields: {\n '@@makeswift/type': 'prop-controllers::table-form-fields::v1',\n value: {\n fields: [],\n grid: [\n {\n deviceId: 'desktop',\n value: {\n count: 12,\n spans: [[12]],\n },\n },\n ],\n },\n },\n },\n },\n ],\n },\n },\n },\n type: './components/Box/index.js',\n },\n ],\n },\n },\n },\n type: './components/Root/index.js',\n}\n"],"mappings":"AAWO,MAAM,6BAAsC;AAAA,EACjD,KAAK;AAAA,EACL,OAAO;AAAA,IACL,UAAU;AAAA,MACR,oBAAoB;AAAA,MACpB,OAAO;AAAA,QACL,SAAS;AAAA,UACP;AAAA,YACE,UAAU;AAAA,YACV,OAAO;AAAA,cACL,OAAO,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,GAAG,CAAC,EAAE,GAAG,CAAC,EAAE,GAAG,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC;AAAA,cAC1C,OAAO;AAAA,YACT;AAAA,UACF;AAAA,QACF;AAAA,QACA,UAAU;AAAA,UACR;AAAA,YACE,KAAK;AAAA,YACL,OAAO;AAAA,cACL,UAAU;AAAA,gBACR,oBAAoB;AAAA,gBACpB,OAAO;AAAA,kBACL,SAAS;AAAA,oBACP;AAAA,sBACE,UAAU;AAAA,sBACV,OAAO;AAAA,wBACL,OAAO;AAAA,wBACP,OAAO,CAAC,CAAC,EAAE,CAAC;AAAA,sBACd;AAAA,oBACF;AAAA,kBACF;AAAA,kBACA,UAAU;AAAA,oBACR;AAAA,sBACE,KAAK;AAAA,sBACL,OAAO;AAAA,wBACL,QAAQ;AAAA,0BACN;AAAA,4BACE,UAAU;AAAA,4BACV,OAAO;AAAA,8BACL,cAAc;AAAA,gCACZ,MAAM;AAAA,gCACN,OAAO;AAAA,8BACT;AAAA,8BACA,YAAY;AAAA,8BACZ,aAAa;AAAA,8BACb,WAAW;AAAA,4BACb;AAAA,0BACF;AAAA,wBACF;AAAA,wBACA,MAAM;AAAA,0BACJ,aAAa;AAAA,4BACX;AAAA,8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AO;AAAA,8BACL,OAAO;AAAA,8BACP,MAAM;AAAA,4BACR;AAAA,0BACF;AAAA,wBACF;AAAA,wBACA,SAAS;AAAA,0BACP,oBAAoB;AAAA,0BACpB,OAAO;AAAA,wBACT;AAAA,wBACA,QAAQ;AAAA,0BACN,oBAAoB;AAAA,0BACpB,OAAO;AAAA,4BACL,QAAQ,CAAC;AAAA,4BACT,MAAM;AAAA,8BACJ;AAAA,gCACE,UAAU;AAAA,gCACV,OAAO;AAAA,kCACL,OAAO;AAAA,kCACP,OAAO,CAAC,CAAC,EAAE,CAAC;AAAA,gCACd;AAAA,8BACF;AAAA,4BACF;AAAA,0BACF;AAAA,wBACF;AAAA,sBACF;AAAA,oBACF;AAAA,kBACF;AAAA,gBACF;AAAA,cACF;AAAA,YACF;AAAA,YACA,MAAM;AAAA,UACR;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAAA,EACA,MAAM;AACR;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/builder/unstructured-introspection/__fixtures__/index.ts"],"sourcesContent":["export * from './element-containing-resources'\n"],"mappings":"AAAA,cAAc;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/builder/unstructured-introspection/index.ts"],"sourcesContent":["export { unstructuredIntrospection } from './unstructured-introspection'\n"],"mappings":"AAAA,SAAS,iCAAiC;","names":[]}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { Base64 } from "js-base64";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { APIResourceType } from "../../api";
|
|
4
|
+
function isAPIResourceType(val) {
|
|
5
|
+
return APIResourceType[val] != null;
|
|
6
|
+
}
|
|
7
|
+
const parseResourceIdSchema = z.string().transform((val, ctx) => {
|
|
8
|
+
try {
|
|
9
|
+
const match = Base64.decode(val).match(/^([^:]+):([^:]+)$/);
|
|
10
|
+
if (!match)
|
|
11
|
+
throw new TypeError(`NodeID cannot represent value: ${String(val)}`);
|
|
12
|
+
const [, typeName, key] = match;
|
|
13
|
+
if (isAPIResourceType(typeName)) {
|
|
14
|
+
return { key, typeName };
|
|
15
|
+
}
|
|
16
|
+
throw new TypeError(`decoded type '${typeName}' is not a valid APIResourceType`);
|
|
17
|
+
} catch (error) {
|
|
18
|
+
ctx.addIssue({
|
|
19
|
+
code: z.ZodIssueCode.custom,
|
|
20
|
+
message: `${String(val)} is not a valid node resource ID`
|
|
21
|
+
});
|
|
22
|
+
return z.NEVER;
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
function unstructuredIntrospection(element) {
|
|
26
|
+
const typeIdsToFound = /* @__PURE__ */ new Map();
|
|
27
|
+
Object.values(APIResourceType).forEach((resourceType) => {
|
|
28
|
+
typeIdsToFound.set(resourceType, /* @__PURE__ */ new Set());
|
|
29
|
+
});
|
|
30
|
+
function findResourceIds(curr) {
|
|
31
|
+
if (typeof curr === "string") {
|
|
32
|
+
const parseResourceResult = parseResourceIdSchema.safeParse(curr);
|
|
33
|
+
if (parseResourceResult.success) {
|
|
34
|
+
typeIdsToFound.get(parseResourceResult.data.typeName)?.add(curr);
|
|
35
|
+
}
|
|
36
|
+
} else if (Array.isArray(curr)) {
|
|
37
|
+
for (const item of curr) {
|
|
38
|
+
findResourceIds(item);
|
|
39
|
+
}
|
|
40
|
+
} else if (curr != null && typeof curr === "object") {
|
|
41
|
+
for (const key in curr) {
|
|
42
|
+
if (Object.prototype.hasOwnProperty.call(curr, key)) {
|
|
43
|
+
findResourceIds(curr[key]);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
findResourceIds(element);
|
|
49
|
+
return {
|
|
50
|
+
swatchIds: typeIdsToFound.get(APIResourceType.Swatch) ?? /* @__PURE__ */ new Set(),
|
|
51
|
+
typographyIds: typeIdsToFound.get(APIResourceType.Typography) ?? /* @__PURE__ */ new Set(),
|
|
52
|
+
fileIds: typeIdsToFound.get(APIResourceType.File) ?? /* @__PURE__ */ new Set(),
|
|
53
|
+
tableIds: typeIdsToFound.get(APIResourceType.Table) ?? /* @__PURE__ */ new Set(),
|
|
54
|
+
pageIds: typeIdsToFound.get(APIResourceType.Page) ?? /* @__PURE__ */ new Set(),
|
|
55
|
+
globalElementIds: typeIdsToFound.get(APIResourceType.GlobalElement) ?? /* @__PURE__ */ new Set()
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
export {
|
|
59
|
+
unstructuredIntrospection
|
|
60
|
+
};
|
|
61
|
+
//# sourceMappingURL=unstructured-introspection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/builder/unstructured-introspection/unstructured-introspection.ts"],"sourcesContent":["import { Base64 } from 'js-base64'\nimport { Element } from '@makeswift/controls'\n\nimport { z } from 'zod'\nimport { APIResourceType } from '../../api'\n\nfunction isAPIResourceType(val: string): val is APIResourceType {\n return APIResourceType[val as keyof typeof APIResourceType] != null\n}\n\nconst parseResourceIdSchema = z.string().transform((val, ctx) => {\n try {\n const match = Base64.decode(val).match(/^([^:]+):([^:]+)$/)\n if (!match) throw new TypeError(`NodeID cannot represent value: ${String(val)}`)\n const [, typeName, key] = match\n if (isAPIResourceType(typeName)) {\n return { key, typeName }\n }\n throw new TypeError(`decoded type '${typeName}' is not a valid APIResourceType`)\n } catch (error) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: `${String(val)} is not a valid node resource ID`,\n })\n return z.NEVER\n }\n})\n\nexport function unstructuredIntrospection(element: Element): {\n swatchIds: Set<string>\n typographyIds: Set<string>\n fileIds: Set<string>\n tableIds: Set<string>\n pageIds: Set<string>\n globalElementIds: Set<string>\n} {\n const typeIdsToFound: Map<APIResourceType, Set<string>> = new Map()\n Object.values(APIResourceType).forEach(resourceType => {\n typeIdsToFound.set(resourceType, new Set())\n })\n function findResourceIds(curr: unknown): void {\n if (typeof curr === 'string') {\n const parseResourceResult = parseResourceIdSchema.safeParse(curr)\n if (parseResourceResult.success) {\n typeIdsToFound.get(parseResourceResult.data.typeName)?.add(curr)\n }\n } else if (Array.isArray(curr)) {\n for (const item of curr) {\n findResourceIds(item)\n }\n } else if (curr != null && typeof curr === 'object') {\n for (const key in curr) {\n if (Object.prototype.hasOwnProperty.call(curr, key)) {\n findResourceIds(curr[key as keyof typeof curr])\n }\n }\n }\n }\n\n findResourceIds(element)\n return {\n swatchIds: typeIdsToFound.get(APIResourceType.Swatch) ?? new Set(),\n typographyIds: typeIdsToFound.get(APIResourceType.Typography) ?? new Set(),\n fileIds: typeIdsToFound.get(APIResourceType.File) ?? new Set(),\n tableIds: typeIdsToFound.get(APIResourceType.Table) ?? new Set(),\n pageIds: typeIdsToFound.get(APIResourceType.Page) ?? new Set(),\n globalElementIds: typeIdsToFound.get(APIResourceType.GlobalElement) ?? new Set(),\n }\n}\n"],"mappings":"AAAA,SAAS,cAAc;AAGvB,SAAS,SAAS;AAClB,SAAS,uBAAuB;AAEhC,SAAS,kBAAkB,KAAqC;AAC9D,SAAO,gBAAgB,GAAmC,KAAK;AACjE;AAEA,MAAM,wBAAwB,EAAE,OAAO,EAAE,UAAU,CAAC,KAAK,QAAQ;AAC/D,MAAI;AACF,UAAM,QAAQ,OAAO,OAAO,GAAG,EAAE,MAAM,mBAAmB;AAC1D,QAAI,CAAC;AAAO,YAAM,IAAI,UAAU,kCAAkC,OAAO,GAAG,CAAC,EAAE;AAC/E,UAAM,CAAC,EAAE,UAAU,GAAG,IAAI;AAC1B,QAAI,kBAAkB,QAAQ,GAAG;AAC/B,aAAO,EAAE,KAAK,SAAS;AAAA,IACzB;AACA,UAAM,IAAI,UAAU,iBAAiB,QAAQ,kCAAkC;AAAA,EACjF,SAAS,OAAO;AACd,QAAI,SAAS;AAAA,MACX,MAAM,EAAE,aAAa;AAAA,MACrB,SAAS,GAAG,OAAO,GAAG,CAAC;AAAA,IACzB,CAAC;AACD,WAAO,EAAE;AAAA,EACX;AACF,CAAC;AAEM,SAAS,0BAA0B,SAOxC;AACA,QAAM,iBAAoD,oBAAI,IAAI;AAClE,SAAO,OAAO,eAAe,EAAE,QAAQ,kBAAgB;AACrD,mBAAe,IAAI,cAAc,oBAAI,IAAI,CAAC;AAAA,EAC5C,CAAC;AACD,WAAS,gBAAgB,MAAqB;AAC5C,QAAI,OAAO,SAAS,UAAU;AAC5B,YAAM,sBAAsB,sBAAsB,UAAU,IAAI;AAChE,UAAI,oBAAoB,SAAS;AAC/B,uBAAe,IAAI,oBAAoB,KAAK,QAAQ,GAAG,IAAI,IAAI;AAAA,MACjE;AAAA,IACF,WAAW,MAAM,QAAQ,IAAI,GAAG;AAC9B,iBAAW,QAAQ,MAAM;AACvB,wBAAgB,IAAI;AAAA,MACtB;AAAA,IACF,WAAW,QAAQ,QAAQ,OAAO,SAAS,UAAU;AACnD,iBAAW,OAAO,MAAM;AACtB,YAAI,OAAO,UAAU,eAAe,KAAK,MAAM,GAAG,GAAG;AACnD,0BAAgB,KAAK,GAAwB,CAAC;AAAA,QAChD;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAEA,kBAAgB,OAAO;AACvB,SAAO;AAAA,IACL,WAAW,eAAe,IAAI,gBAAgB,MAAM,KAAK,oBAAI,IAAI;AAAA,IACjE,eAAe,eAAe,IAAI,gBAAgB,UAAU,KAAK,oBAAI,IAAI;AAAA,IACzE,SAAS,eAAe,IAAI,gBAAgB,IAAI,KAAK,oBAAI,IAAI;AAAA,IAC7D,UAAU,eAAe,IAAI,gBAAgB,KAAK,KAAK,oBAAI,IAAI;AAAA,IAC/D,SAAS,eAAe,IAAI,gBAAgB,IAAI,KAAK,oBAAI,IAAI;AAAA,IAC7D,kBAAkB,eAAe,IAAI,gBAAgB,aAAa,KAAK,oBAAI,IAAI;AAAA,EACjF;AACF;","names":[]}
|
|
@@ -14,7 +14,7 @@ async function handler(...args) {
|
|
|
14
14
|
const supportsDraftMode = match(args).with(routeHandlerPattern, () => true).with(apiRoutePattern, () => false).exhaustive();
|
|
15
15
|
const supportsWebhook = match(args).with(routeHandlerPattern, () => true).with(apiRoutePattern, () => false).exhaustive();
|
|
16
16
|
const body = {
|
|
17
|
-
version: "0.24.1",
|
|
17
|
+
version: "0.24.2-canary.1",
|
|
18
18
|
previewMode: supportsPreviewMode,
|
|
19
19
|
draftMode: supportsDraftMode,
|
|
20
20
|
interactionMode: true,
|
|
@@ -22,14 +22,15 @@ async function redirectPreviewRouteHandler(_request, _context, {}) {
|
|
|
22
22
|
}
|
|
23
23
|
async function redirectPreviewApiRouteHandler(req, res, { apiKey }) {
|
|
24
24
|
const secret = req.query[SearchParams.PreviewMode];
|
|
25
|
+
const pathname = req.query.path;
|
|
25
26
|
if (secret == null) {
|
|
26
27
|
return res.status(401).send("Unauthorized to enable preview mode: no secret provided");
|
|
27
28
|
}
|
|
28
29
|
if (secret !== apiKey) {
|
|
29
30
|
return res.status(401).send("Unauthorized to enable preview mode: secret is incorrect");
|
|
30
31
|
}
|
|
31
|
-
if (
|
|
32
|
-
return res.status(400).send("Bad request: incoming request does not have
|
|
32
|
+
if (pathname == null) {
|
|
33
|
+
return res.status(400).send("Bad request: incoming request does not have an associated pathname");
|
|
33
34
|
}
|
|
34
35
|
const setCookie = res.setPreviewData({ makeswift: true, siteVersion: MakeswiftSiteVersion.Working }).getHeader(SET_COOKIE_HEADER);
|
|
35
36
|
res.removeHeader(SET_COOKIE_HEADER);
|
|
@@ -43,7 +44,7 @@ async function redirectPreviewApiRouteHandler(req, res, { apiKey }) {
|
|
|
43
44
|
return serializeCookie(name, value, { ...cookieSettingOptions });
|
|
44
45
|
});
|
|
45
46
|
res.setHeader(SET_COOKIE_HEADER, patchedCookies);
|
|
46
|
-
const destinationUrl = new URL(
|
|
47
|
+
const destinationUrl = new URL(pathname, "http://test.com");
|
|
47
48
|
destinationUrl.searchParams.delete(SearchParams.PreviewMode);
|
|
48
49
|
res.redirect(`${destinationUrl.pathname}?${destinationUrl.searchParams.toString()}`);
|
|
49
50
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/next/api-handler/handlers/redirect-preview.ts"],"sourcesContent":["import { NextApiRequest, NextApiResponse } from 'next'\nimport { NextRequest, NextResponse } from 'next/server'\nimport { P, match } from 'ts-pattern'\n\nimport { parse as parseSetCookie } from 'set-cookie-parser'\nimport { serialize as serializeCookie } from 'cookie'\n\nimport { MakeswiftSiteVersion } from '../../../api/site-version'\nimport {\n cookieSettingOptions,\n PRERENDER_BYPASS_COOKIE,\n PREVIEW_DATA_COOKIE,\n SearchParams,\n SET_COOKIE_HEADER,\n} from './utils/draft'\n\ntype Context = { params: { [key: string]: string | string[] } }\n\ntype RedirectPreviewError = string\n\ntype Response = unknown\n\nexport type RedirectPreviewResponse = RedirectPreviewError | Response\n\ntype RedirectPreviewHandlerArgs =\n | [request: NextRequest, context: Context, params: { apiKey: string }]\n | [req: NextApiRequest, res: NextApiResponse<RedirectPreviewResponse>, params: { apiKey: string }]\n\nconst routeHandlerPattern = [P.instanceOf(Request), P.any, P.any] as const\nconst apiRoutePattern = [P.any, P.any, P.any] as const\n\nexport default async function redirectPreviewHandler(\n request: NextRequest,\n context: Context,\n { apiKey }: { apiKey: string },\n): Promise<NextResponse<RedirectPreviewResponse>>\nexport default async function redirectPreviewHandler(\n req: NextApiRequest,\n res: NextApiResponse<RedirectPreviewResponse>,\n { apiKey }: { apiKey: string },\n): Promise<void>\nexport default async function redirectPreviewHandler(\n ...args: RedirectPreviewHandlerArgs\n): Promise<NextResponse<RedirectPreviewResponse> | void> {\n return match(args)\n .with(routeHandlerPattern, args => redirectPreviewRouteHandler(...args))\n .with(apiRoutePattern, args => redirectPreviewApiRouteHandler(...args))\n .exhaustive()\n}\n\nasync function redirectPreviewRouteHandler(\n _request: NextRequest,\n _context: Context,\n {}: { apiKey: string },\n): Promise<NextResponse<RedirectPreviewResponse>> {\n const message =\n 'Cannot request preview endpoint from an API handler registered in `app`. Move your Makeswift API handler to the `pages/api` directory'\n console.error(message)\n return NextResponse.json(message, { status: 500 })\n}\n\nasync function redirectPreviewApiRouteHandler(\n req: NextApiRequest,\n res: NextApiResponse<RedirectPreviewResponse>,\n { apiKey }: { apiKey: string },\n): Promise<void> {\n const secret = req.query[SearchParams.PreviewMode]\n\n if (secret == null) {\n return res.status(401).send('Unauthorized to enable preview mode: no secret provided')\n }\n if (secret !== apiKey) {\n return res.status(401).send('Unauthorized to enable preview mode: secret is incorrect')\n }\n\n if (
|
|
1
|
+
{"version":3,"sources":["../../../../../src/next/api-handler/handlers/redirect-preview.ts"],"sourcesContent":["import { NextApiRequest, NextApiResponse } from 'next'\nimport { NextRequest, NextResponse } from 'next/server'\nimport { P, match } from 'ts-pattern'\n\nimport { parse as parseSetCookie } from 'set-cookie-parser'\nimport { serialize as serializeCookie } from 'cookie'\n\nimport { MakeswiftSiteVersion } from '../../../api/site-version'\nimport {\n cookieSettingOptions,\n PRERENDER_BYPASS_COOKIE,\n PREVIEW_DATA_COOKIE,\n SearchParams,\n SET_COOKIE_HEADER,\n} from './utils/draft'\n\ntype Context = { params: { [key: string]: string | string[] } }\n\ntype RedirectPreviewError = string\n\ntype Response = unknown\n\nexport type RedirectPreviewResponse = RedirectPreviewError | Response\n\ntype RedirectPreviewHandlerArgs =\n | [request: NextRequest, context: Context, params: { apiKey: string }]\n | [req: NextApiRequest, res: NextApiResponse<RedirectPreviewResponse>, params: { apiKey: string }]\n\nconst routeHandlerPattern = [P.instanceOf(Request), P.any, P.any] as const\nconst apiRoutePattern = [P.any, P.any, P.any] as const\n\nexport default async function redirectPreviewHandler(\n request: NextRequest,\n context: Context,\n { apiKey }: { apiKey: string },\n): Promise<NextResponse<RedirectPreviewResponse>>\nexport default async function redirectPreviewHandler(\n req: NextApiRequest,\n res: NextApiResponse<RedirectPreviewResponse>,\n { apiKey }: { apiKey: string },\n): Promise<void>\nexport default async function redirectPreviewHandler(\n ...args: RedirectPreviewHandlerArgs\n): Promise<NextResponse<RedirectPreviewResponse> | void> {\n return match(args)\n .with(routeHandlerPattern, args => redirectPreviewRouteHandler(...args))\n .with(apiRoutePattern, args => redirectPreviewApiRouteHandler(...args))\n .exhaustive()\n}\n\nasync function redirectPreviewRouteHandler(\n _request: NextRequest,\n _context: Context,\n { }: { apiKey: string },\n): Promise<NextResponse<RedirectPreviewResponse>> {\n const message =\n 'Cannot request preview endpoint from an API handler registered in `app`. Move your Makeswift API handler to the `pages/api` directory'\n console.error(message)\n return NextResponse.json(message, { status: 500 })\n}\n\n\nasync function redirectPreviewApiRouteHandler(\n req: NextApiRequest,\n res: NextApiResponse<RedirectPreviewResponse>,\n { apiKey }: { apiKey: string },\n): Promise<void> {\n const secret = req.query[SearchParams.PreviewMode]\n // Next.js automatically strips the locale prefix from rewritten request's URL, even when the\n // rewrite's `locale` option is set to `false`: https://github.com/vercel/next.js/discussions/21798.\n // At the same time, it also maps rewrite's URL segments (e.g. `:path`) to query parameters\n // on the rewritten request, so we use `query.path` to recover the original request path.\n const pathname = req.query.path as string | undefined\n\n if (secret == null) {\n return res.status(401).send('Unauthorized to enable preview mode: no secret provided')\n }\n\n if (secret !== apiKey) {\n return res.status(401).send('Unauthorized to enable preview mode: secret is incorrect')\n }\n\n if (pathname == null) {\n return res.status(400).send('Bad request: incoming request does not have an associated pathname')\n }\n\n const setCookie = res\n // Eventually, we can make the preview data value dynamic using the request\n .setPreviewData({ makeswift: true, siteVersion: MakeswiftSiteVersion.Working })\n .getHeader(SET_COOKIE_HEADER)\n\n res.removeHeader(SET_COOKIE_HEADER)\n\n const parsedCookies = parseSetCookie(Array.isArray(setCookie) ? setCookie : '')\n\n const prerenderBypassCookie = parsedCookies.find(c => c.name === PRERENDER_BYPASS_COOKIE)\n const previewDataCookie = parsedCookies.find(c => c.name === PREVIEW_DATA_COOKIE)\n\n if (prerenderBypassCookie?.value == null || previewDataCookie?.value == null) {\n return res.status(500).send('Could not retrieve preview mode cookies')\n }\n\n const patchedCookies = [prerenderBypassCookie, previewDataCookie].map(({ name, value }) => {\n return serializeCookie(name, value, { ...cookieSettingOptions })\n })\n\n res.setHeader(SET_COOKIE_HEADER, patchedCookies)\n\n const destinationUrl = new URL(pathname, 'http://test.com')\n destinationUrl.searchParams.delete(SearchParams.PreviewMode)\n\n res.redirect(`${destinationUrl.pathname}?${destinationUrl.searchParams.toString()}`)\n}\n"],"mappings":"AACA,SAAsB,oBAAoB;AAC1C,SAAS,GAAG,aAAa;AAEzB,SAAS,SAAS,sBAAsB;AACxC,SAAS,aAAa,uBAAuB;AAE7C,SAAS,4BAA4B;AACrC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAcP,MAAM,sBAAsB,CAAC,EAAE,WAAW,OAAO,GAAG,EAAE,KAAK,EAAE,GAAG;AAChE,MAAM,kBAAkB,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG;AAY5C,eAAO,0BACF,MACoD;AACvD,SAAO,MAAM,IAAI,EACd,KAAK,qBAAqB,CAAAA,UAAQ,4BAA4B,GAAGA,KAAI,CAAC,EACtE,KAAK,iBAAiB,CAAAA,UAAQ,+BAA+B,GAAGA,KAAI,CAAC,EACrE,WAAW;AAChB;AAEA,eAAe,4BACb,UACA,UACA,CAAE,GAC8C;AAChD,QAAM,UACJ;AACF,UAAQ,MAAM,OAAO;AACrB,SAAO,aAAa,KAAK,SAAS,EAAE,QAAQ,IAAI,CAAC;AACnD;AAGA,eAAe,+BACb,KACA,KACA,EAAE,OAAO,GACM;AACf,QAAM,SAAS,IAAI,MAAM,aAAa,WAAW;AAKjD,QAAM,WAAW,IAAI,MAAM;AAE3B,MAAI,UAAU,MAAM;AAClB,WAAO,IAAI,OAAO,GAAG,EAAE,KAAK,yDAAyD;AAAA,EACvF;AAEA,MAAI,WAAW,QAAQ;AACrB,WAAO,IAAI,OAAO,GAAG,EAAE,KAAK,0DAA0D;AAAA,EACxF;AAEA,MAAI,YAAY,MAAM;AACpB,WAAO,IAAI,OAAO,GAAG,EAAE,KAAK,oEAAoE;AAAA,EAClG;AAEA,QAAM,YAAY,IAEf,eAAe,EAAE,WAAW,MAAM,aAAa,qBAAqB,QAAQ,CAAC,EAC7E,UAAU,iBAAiB;AAE9B,MAAI,aAAa,iBAAiB;AAElC,QAAM,gBAAgB,eAAe,MAAM,QAAQ,SAAS,IAAI,YAAY,EAAE;AAE9E,QAAM,wBAAwB,cAAc,KAAK,OAAK,EAAE,SAAS,uBAAuB;AACxF,QAAM,oBAAoB,cAAc,KAAK,OAAK,EAAE,SAAS,mBAAmB;AAEhF,MAAI,uBAAuB,SAAS,QAAQ,mBAAmB,SAAS,MAAM;AAC5E,WAAO,IAAI,OAAO,GAAG,EAAE,KAAK,yCAAyC;AAAA,EACvE;AAEA,QAAM,iBAAiB,CAAC,uBAAuB,iBAAiB,EAAE,IAAI,CAAC,EAAE,MAAM,MAAM,MAAM;AACzF,WAAO,gBAAgB,MAAM,OAAO,EAAE,GAAG,qBAAqB,CAAC;AAAA,EACjE,CAAC;AAED,MAAI,UAAU,mBAAmB,cAAc;AAE/C,QAAM,iBAAiB,IAAI,IAAI,UAAU,iBAAiB;AAC1D,iBAAe,aAAa,OAAO,aAAa,WAAW;AAE3D,MAAI,SAAS,GAAG,eAAe,QAAQ,IAAI,eAAe,aAAa,SAAS,CAAC,EAAE;AACrF;","names":["args"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/builder/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/builder/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,8BAA8B,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"element-containing-resources.d.ts","sourceRoot":"","sources":["../../../../../src/builder/unstructured-introspection/__fixtures__/element-containing-resources.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAW7C,eAAO,MAAM,0BAA0B,EAAE,OAw2BxC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/builder/unstructured-introspection/__fixtures__/index.ts"],"names":[],"mappings":"AAAA,cAAc,gCAAgC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/builder/unstructured-introspection/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,8BAA8B,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Element } from '@makeswift/controls';
|
|
2
|
+
export declare function unstructuredIntrospection(element: Element): {
|
|
3
|
+
swatchIds: Set<string>;
|
|
4
|
+
typographyIds: Set<string>;
|
|
5
|
+
fileIds: Set<string>;
|
|
6
|
+
tableIds: Set<string>;
|
|
7
|
+
pageIds: Set<string>;
|
|
8
|
+
globalElementIds: Set<string>;
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=unstructured-introspection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unstructured-introspection.d.ts","sourceRoot":"","sources":["../../../../src/builder/unstructured-introspection/unstructured-introspection.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AA2B7C,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,OAAO,GAAG;IAC3D,SAAS,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IACtB,aAAa,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAC1B,OAAO,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IACpB,QAAQ,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IACrB,OAAO,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IACpB,gBAAgB,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;CAC9B,CAiCA"}
|
package/dist/types/builder/unstructured-introspection/unstructured-introspection.test.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unstructured-introspection.test.d.ts","sourceRoot":"","sources":["../../../../src/builder/unstructured-introspection/unstructured-introspection.test.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@makeswift/runtime",
|
|
3
|
-
"version": "0.24.1",
|
|
3
|
+
"version": "0.24.2-canary.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -146,6 +146,7 @@
|
|
|
146
146
|
"html-react-parser": "^5.0.10",
|
|
147
147
|
"immutable": "^4.0.0-rc.12",
|
|
148
148
|
"is-hotkey": "^0.1.4",
|
|
149
|
+
"js-base64": "^3.7.7",
|
|
149
150
|
"ot-json0": "^1.1.0",
|
|
150
151
|
"parse5": "^7.1.2",
|
|
151
152
|
"path-to-regexp": "^6.2.1",
|