@griddo/core 12.12.2 → 12.13.0-rc.0
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/autotypes.mjs +2 -1
- package/dist/autotypes.mjs.map +1 -1
- package/dist/bin-tools/autotypes/index.d.ts +1 -0
- package/dist/bin-tools/autotypes/misc/utils.d.ts +6 -3
- package/dist/bin-tools/autotypes/parser/index.d.ts +1 -1
- package/dist/bin-tools/sync-schemas/index.d.ts +2 -0
- package/dist/bin-tools/sync-schemas/utils.d.ts +76 -0
- package/dist/components/CloudinaryImage/index.d.ts +1 -2
- package/dist/components/GriddoImage/index.d.ts +0 -1
- package/dist/components/GriddoImageExp/utils.d.ts +1 -1
- package/dist/components/GriddoLink/index.d.ts +1 -1
- package/dist/components/Page/index.d.ts +1 -1
- package/dist/contexts/Form/index.d.ts +1 -1
- package/dist/contexts/Navigation/index.d.ts +1 -1
- package/dist/contexts/Site/index.d.ts +1 -1
- package/dist/functions/index.d.ts +2 -2
- package/dist/hooks/index.d.ts +1 -1
- package/dist/hooks/useAiAnswers.d.ts +2 -2
- package/dist/hooks/useAiSearch.d.ts +2 -2
- package/dist/hooks/useReceiveInterests.d.ts +1 -1
- package/dist/index.d.ts +7 -7
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/sync-schemas.mjs +3 -0
- package/dist/sync-schemas.mjs.map +1 -0
- package/dist/types/api-response-fields/index.d.ts +1 -1
- package/dist/types/core/index.d.ts +1 -1
- package/dist/types/global.d.ts +1 -1
- package/dist/types/schema-fields/page-content-type-fields.d.ts +1 -1
- package/dist/types/schema-fields/props.d.ts +1 -1
- package/dist/types/schemas/ContentType.d.ts +1 -1
- package/dist/types/schemas/HeaderFooter.d.ts +1 -1
- package/dist/types/schemas/Menu.d.ts +1 -1
- package/dist/types/schemas/PageContentType.d.ts +2 -2
- package/dist/types/schemas/SimpleContentType.d.ts +2 -2
- package/dist/types/schemas/UI.d.ts +3 -3
- package/dist/types/schemas/base.d.ts +1 -1
- package/dist/types/schemas/props.d.ts +1 -1
- package/dist/types/theme/index.d.ts +1 -1
- package/dist/types/utilities.d.ts +1 -1
- package/dist/utils/index.d.ts +7 -1
- package/dist/vendor/react-aspect-ratio/index.d.ts +15 -0
- package/package.json +41 -78
- package/dist/autotypes.js +0 -2
- package/dist/autotypes.js.map +0 -1
- package/dist/components/GriddoImageExp/GriddoImageExp.stories.d.ts +0 -25
- package/dist/components/GriddoImageExp/GriddoImageExp.test.d.ts +0 -1
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import e from"node:fs";import o from"node:path";import{styleText as n}from"node:util";import{createRequire as t}from"node:module";import{build as r}from"esbuild";function i(e,o,n,t){return new(n||(n=Promise))(function(r,i){function s(e){try{d(t.next(e))}catch(e){i(e)}}function c(e){try{d(t.throw(e))}catch(e){i(e)}}function d(e){var o;e.done?r(e.value):(o=e.value,o instanceof n?o:new n(function(e){e(o)})).then(s,c)}d((t=t.apply(e,o||[])).next())})}"function"==typeof SuppressedError&&SuppressedError;const s=["griddo.config.js","griddo.config.ts"],c=["API_URL","REACT_APP_API_ENDPOINT"],d={config:{menus:[],themes:[],languages:{},menuItems:{},moduleCategories:[],richTextConfig:{}},ui:{components:{},modules:{},templates:{}},contentTypes:{dataPacks:{},dataPacksCategories:{},structuredData:{}},forms:{templates:{},fields:{},categories:[]}};i(void 0,void 0,void 0,function*(){try{!function(n){for(let t=n;;t=o.dirname(t)){const n=o.join(t,".env");if(e.existsSync(n))return process.loadEnvFile(n);if(o.dirname(t)===t)return}}(process.cwd());const a=function(e){if(e.GRIDDO_API_URL)return e.GRIDDO_API_URL;const o=c.find(o=>e[o]);if(!o)throw new Error("Missing the API URL: set GRIDDO_API_URL");return console.log(`${n("yellow","WARNING:")} ${o} is deprecated, use GRIDDO_API_URL`),e[o]}(process.env),{root:u,configFile:f}=function(n){for(let t=n;;t=o.dirname(t)){const r=s.map(e=>o.join(t,e)).find(o=>e.existsSync(o));if(r)return{root:t,configFile:r};if(o.dirname(t)===t)throw new Error(`No griddo.config.js or griddo.config.ts found above ${n}`)}}(process.cwd()),l=yield function(e){return i(this,void 0,void 0,function*(){var n;const{outputFiles:i}=yield r({entryPoints:[e],bundle:!0,platform:"node",format:"cjs",write:!1,loader:{".png":"empty",".jpg":"empty",".jpeg":"empty",".gif":"empty"}}),s={exports:{}};return new Function("module","exports","require","__filename","__dirname",i[0].text)(s,s.exports,t(e),e,o.dirname(e)),null!==(n=s.exports.default)&&void 0!==n?n:s.exports})}(f),{version:p}=JSON.parse(e.readFileSync(o.join(u,"package.json"),"utf-8"));yield function(e,o,n){return i(this,void 0,void 0,function*(){var t;const r=yield fetch(`${e}/schemas`,{method:"PUT",headers:Object.assign({"content-type":"application/json"},o&&{authorization:o}),body:JSON.stringify(n)});if(!r.ok){const e=yield r.json().catch(()=>null);throw new Error(null!==(t=null==e?void 0:e.message)&&void 0!==t?t:`${r.status} ${r.statusText}`)}})}(a,process.env.developerKey,function(e,o){var n,t,r;const{schemas:i}=e,s=Object.values(null!==(t=null===(n=i.contentTypes)||void 0===n?void 0:n.structuredData)&&void 0!==t?t:{});for(const{schema:e}of s)for(const o of null!==(r=null==e?void 0:e.fields)&&void 0!==r?r:[])o.computed&&(o.computed=String(o.computed));return Object.assign(Object.assign({version:o},d),i)}(l,p)),console.log(`${n("green"," ✔")} Schemas`)}catch(e){const{message:o,cause:t}=e,r=t instanceof Error?t.message:o;console.log(`\n${n("red","ERROR:")} ${r}\n`),process.exit(1)}});
|
|
3
|
+
//# sourceMappingURL=sync-schemas.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sync-schemas.mjs","sources":["../../../node_modules/.pnpm/@rollup+plugin-typescript@12.3.0_rollup@4.63.5_tslib@2.8.1_typescript@6.0.3/node_modules/tslib/tslib.es6.js","../src/bin-tools/sync-schemas/utils.ts","../src/bin-tools/sync-schemas/index.ts"],"sourcesContent":["/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.unshift(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.unshift(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n};\r\n\r\nexport function __runInitializers(thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n};\r\n\r\nexport function __propKey(x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n};\r\n\r\nexport function __setFunctionName(f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n};\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\r\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\r\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nvar ownKeys = function(o) {\r\n ownKeys = Object.getOwnPropertyNames || function (o) {\r\n var ar = [];\r\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\r\n return ar;\r\n };\r\n return ownKeys(o);\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n\r\nexport function __addDisposableResource(env, value, async) {\r\n if (value !== null && value !== void 0) {\r\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\r\n var dispose, inner;\r\n if (async) {\r\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\r\n dispose = value[Symbol.asyncDispose];\r\n }\r\n if (dispose === void 0) {\r\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\r\n dispose = value[Symbol.dispose];\r\n if (async) inner = dispose;\r\n }\r\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\r\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\r\n env.stack.push({ value: value, dispose: dispose, async: async });\r\n }\r\n else if (async) {\r\n env.stack.push({ async: true });\r\n }\r\n return value;\r\n\r\n}\r\n\r\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\r\n\r\nexport function __disposeResources(env) {\r\n function fail(e) {\r\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\r\n env.hasError = true;\r\n }\r\n var r, s = 0;\r\n function next() {\r\n while (r = env.stack.pop()) {\r\n try {\r\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\r\n if (r.dispose) {\r\n var result = r.dispose.call(r.value);\r\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\r\n }\r\n else s |= 1;\r\n }\r\n catch (e) {\r\n fail(e);\r\n }\r\n }\r\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\r\n if (env.hasError) throw env.error;\r\n }\r\n return next();\r\n}\r\n\r\nexport function __rewriteRelativeImportExtension(path, preserveJsx) {\r\n if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\r\n return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {\r\n return tsx ? preserveJsx ? \".jsx\" : \".js\" : d && (!ext || !cm) ? m : (d + ext + \".\" + cm.toLowerCase() + \"js\");\r\n });\r\n }\r\n return path;\r\n}\r\n\r\nexport default {\r\n __extends: __extends,\r\n __assign: __assign,\r\n __rest: __rest,\r\n __decorate: __decorate,\r\n __param: __param,\r\n __esDecorate: __esDecorate,\r\n __runInitializers: __runInitializers,\r\n __propKey: __propKey,\r\n __setFunctionName: __setFunctionName,\r\n __metadata: __metadata,\r\n __awaiter: __awaiter,\r\n __generator: __generator,\r\n __createBinding: __createBinding,\r\n __exportStar: __exportStar,\r\n __values: __values,\r\n __read: __read,\r\n __spread: __spread,\r\n __spreadArrays: __spreadArrays,\r\n __spreadArray: __spreadArray,\r\n __await: __await,\r\n __asyncGenerator: __asyncGenerator,\r\n __asyncDelegator: __asyncDelegator,\r\n __asyncValues: __asyncValues,\r\n __makeTemplateObject: __makeTemplateObject,\r\n __importStar: __importStar,\r\n __importDefault: __importDefault,\r\n __classPrivateFieldGet: __classPrivateFieldGet,\r\n __classPrivateFieldSet: __classPrivateFieldSet,\r\n __classPrivateFieldIn: __classPrivateFieldIn,\r\n __addDisposableResource: __addDisposableResource,\r\n __disposeResources: __disposeResources,\r\n __rewriteRelativeImportExtension: __rewriteRelativeImportExtension,\r\n};\r\n","import type { Core } from \"../..\";\n\nimport fs from \"node:fs\";\nimport { createRequire } from \"node:module\";\nimport path from \"node:path\";\nimport { styleText } from \"node:util\";\n\nimport { build } from \"esbuild\";\n\nconst CONFIG_FILES = [\"griddo.config.js\", \"griddo.config.ts\"];\n\n/** Old names of `GRIDDO_API_URL`, still read so that no instance breaks. */\nconst DEPRECATED_API_URL_VARS = [\"API_URL\", \"REACT_APP_API_ENDPOINT\"];\n\n/** Defaults for the schema groups that the instance does not export. */\nconst EMPTY_SCHEMAS = {\n\tconfig: {\n\t\tmenus: [],\n\t\tthemes: [],\n\t\tlanguages: {},\n\t\tmenuItems: {},\n\t\tmoduleCategories: [],\n\t\trichTextConfig: {},\n\t},\n\tui: { components: {}, modules: {}, templates: {} },\n\tcontentTypes: {\n\t\tdataPacks: {},\n\t\tdataPacksCategories: {},\n\t\tstructuredData: {},\n\t},\n\tforms: { templates: {}, fields: {}, categories: [] },\n};\n\n/**\n * Returns the instance root, the closest directory from `cwd` upwards that has\n * a `griddo.config.js|ts`, and that file.\n *\n * Like `griddo-autotypes`, it starts from where the command runs, not from\n * where @griddo/core is installed, so it does not depend on the package\n * manager's layout.\n */\nfunction findInstance(cwd: string) {\n\tfor (let dir = cwd; ; dir = path.dirname(dir)) {\n\t\tconst configFile = CONFIG_FILES.map((name) => path.join(dir, name)).find(\n\t\t\t(file) => fs.existsSync(file),\n\t\t);\n\n\t\tif (configFile) {\n\t\t\treturn { root: dir, configFile };\n\t\t}\n\n\t\tif (path.dirname(dir) === dir) {\n\t\t\tthrow new Error(\n\t\t\t\t`No griddo.config.js or griddo.config.ts found above ${cwd}`,\n\t\t\t);\n\t\t}\n\t}\n}\n\n/**\n * Loads the closest `.env` from `cwd` upwards. The variables that are already\n * set win over the file.\n */\nfunction loadDotEnv(cwd: string) {\n\tfor (let dir = cwd; ; dir = path.dirname(dir)) {\n\t\tconst file = path.join(dir, \".env\");\n\n\t\tif (fs.existsSync(file)) {\n\t\t\treturn process.loadEnvFile(file);\n\t\t}\n\n\t\tif (path.dirname(dir) === dir) {\n\t\t\treturn;\n\t\t}\n\t}\n}\n\n/**\n * Returns the API URL from `GRIDDO_API_URL`. Its old names, `API_URL` and\n * `REACT_APP_API_ENDPOINT`, still work, with a deprecation warning.\n */\nfunction getApiUrl(env: NodeJS.ProcessEnv) {\n\tif (env.GRIDDO_API_URL) {\n\t\treturn env.GRIDDO_API_URL;\n\t}\n\n\tconst deprecated = DEPRECATED_API_URL_VARS.find((name) => env[name]);\n\n\tif (!deprecated) {\n\t\tthrow new Error(\"Missing the API URL: set GRIDDO_API_URL\");\n\t}\n\n\tconsole.log(\n\t\t`${styleText(\"yellow\", \"WARNING:\")} ${deprecated} is deprecated, use GRIDDO_API_URL`,\n\t);\n\n\treturn env[deprecated] as string;\n}\n\n/**\n * Bundles the instance config with esbuild and runs it. As webpack did in the\n * old sync of @griddo/ax, the `paths` of the instance tsconfig/jsconfig are\n * resolved and the images imported by the schemas are left empty.\n *\n * Not loaded with tsx, as autotypes does: tsx adds `__name()` calls inside the\n * functions, and the `computed` functions are sent as text that AX evaluates\n * on its own, where `__name` does not exist.\n */\nasync function loadGriddoConfig(configFile: string) {\n\tconst { outputFiles } = await build({\n\t\tentryPoints: [configFile],\n\t\tbundle: true,\n\t\tplatform: \"node\",\n\t\tformat: \"cjs\",\n\t\twrite: false,\n\t\tloader: {\n\t\t\t\".png\": \"empty\",\n\t\t\t\".jpg\": \"empty\",\n\t\t\t\".jpeg\": \"empty\",\n\t\t\t\".gif\": \"empty\",\n\t\t},\n\t});\n\n\tconst bundle = { exports: {} as { default?: Core.Config } };\n\tnew Function(\n\t\t\"module\",\n\t\t\"exports\",\n\t\t\"require\",\n\t\t\"__filename\",\n\t\t\"__dirname\",\n\t\toutputFiles[0].text,\n\t)(\n\t\tbundle,\n\t\tbundle.exports,\n\t\tcreateRequire(configFile),\n\t\tconfigFile,\n\t\tpath.dirname(configFile),\n\t);\n\n\treturn bundle.exports.default ?? (bundle.exports as Core.Config);\n}\n\n/**\n * The body of `PUT /schemas`: the instance version and its schemas.\n *\n * @mutates the `computed` functions of the structured data become text, or\n * they would be lost in the JSON.\n */\nfunction buildPayload(config: Core.Config, version: string) {\n\tconst { schemas } = config;\n\tconst structuredData = Object.values(\n\t\tschemas.contentTypes?.structuredData ?? {},\n\t) as Array<{ schema?: { fields?: Array<{ computed?: unknown }> } }>;\n\n\tfor (const { schema } of structuredData) {\n\t\tfor (const field of schema?.fields ?? []) {\n\t\t\tif (field.computed) {\n\t\t\t\tfield.computed = String(field.computed);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn { version, ...EMPTY_SCHEMAS, ...schemas };\n}\n\n/** Sends the schemas to the API. Throws with the API message if it rejects them. */\nasync function putSchemas(\n\tapiUrl: string,\n\tdeveloperKey: string | undefined,\n\tpayload: object,\n) {\n\tconst response = await fetch(`${apiUrl}/schemas`, {\n\t\tmethod: \"PUT\",\n\t\theaders: {\n\t\t\t\"content-type\": \"application/json\",\n\t\t\t...(developerKey && { authorization: developerKey }),\n\t\t},\n\t\tbody: JSON.stringify(payload),\n\t});\n\n\tif (!response.ok) {\n\t\tconst body = await response.json().catch(() => null);\n\t\tthrow new Error(\n\t\t\tbody?.message ?? `${response.status} ${response.statusText}`,\n\t\t);\n\t}\n}\n\nexport {\n\tbuildPayload,\n\tfindInstance,\n\tgetApiUrl,\n\tloadDotEnv,\n\tloadGriddoConfig,\n\tputSchemas,\n};\n","#!/usr/bin/env node\nimport fs from \"node:fs\";\nimport path from \"node:path\";\nimport { styleText } from \"node:util\";\n\nimport {\n\tbuildPayload,\n\tfindInstance,\n\tgetApiUrl,\n\tloadDotEnv,\n\tloadGriddoConfig,\n\tputSchemas,\n} from \"./utils\";\n\n/**\n * Sends the instance schemas, exported in its `griddo.config.ts`, to the\n * Griddo API (`PUT /schemas`). Runs from the instance folder, as\n * `griddo-autotypes` does.\n */\n(async () => {\n\ttry {\n\t\tloadDotEnv(process.cwd());\n\n\t\tconst apiUrl = getApiUrl(process.env);\n\t\tconst { root, configFile } = findInstance(process.cwd());\n\t\tconst config = await loadGriddoConfig(configFile);\n\t\tconst { version } = JSON.parse(\n\t\t\tfs.readFileSync(path.join(root, \"package.json\"), \"utf-8\"),\n\t\t);\n\n\t\tawait putSchemas(\n\t\t\tapiUrl,\n\t\t\tprocess.env.developerKey,\n\t\t\tbuildPayload(config, version),\n\t\t);\n\n\t\tconsole.log(`${styleText(\"green\", \" ✔\")} Schemas`);\n\t} catch (err) {\n\t\t// fetch only says \"fetch failed\": the reason, such as ECONNREFUSED, is\n\t\t// in its cause.\n\t\tconst { message, cause } = err as Error;\n\t\tconst reason = cause instanceof Error ? cause.message : message;\n\t\tconsole.log(`\\n${styleText(\"red\", \"ERROR:\")} ${reason}\\n`);\n\t\tprocess.exit(1);\n\t}\n})();\n"],"names":["__awaiter","thisArg","_arguments","P","generator","Promise","resolve","reject","fulfilled","value","step","next","e","rejected","result","done","then","apply","SuppressedError","CONFIG_FILES","DEPRECATED_API_URL_VARS","EMPTY_SCHEMAS","config","menus","themes","languages","menuItems","moduleCategories","richTextConfig","ui","components","modules","templates","contentTypes","dataPacks","dataPacksCategories","structuredData","forms","fields","categories","cwd","dir","path","dirname","file","join","fs","existsSync","process","loadEnvFile","loadDotEnv","apiUrl","env","GRIDDO_API_URL","deprecated","find","name","Error","console","log","styleText","getApiUrl","root","configFile","map","findInstance","outputFiles","build","entryPoints","bundle","platform","format","write","loader","exports","Function","text","createRequire","_a","default","loadGriddoConfig","version","JSON","parse","readFileSync","developerKey","payload","response","fetch","method","headers","Object","assign","authorization","body","stringify","ok","json","catch","message","status","statusText","putSchemas","schemas","values","_b","schema","field","_c","computed","String","buildPayload","err","cause","reason","exit"],"mappings":"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","x_google_ignoreList":[0]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import type __AT__ from "@/autotypes";
|
|
1
2
|
import type { ImagePosition } from "../core";
|
|
2
3
|
import type { FilterItemFromFilterEndPoint, HTMLHeadingTag } from "../global";
|
|
3
|
-
import type __AT__ from "@/autotypes";
|
|
4
4
|
/** Return the `__contentTypeName` if it exists. */
|
|
5
5
|
type ContentTypeName<T> = T extends {
|
|
6
6
|
__contentTypeName: string;
|
|
@@ -499,4 +499,4 @@ interface Config {
|
|
|
499
499
|
};
|
|
500
500
|
};
|
|
501
501
|
}
|
|
502
|
-
export type { BackgroundImageSizesProps, Breadcrumb, CloudinaryDefaults, Config, ContentPresence, ContentTypeRelations, DeprecatedLlmsConfig, FetchPriority, FooterModule, FullPath, GriddoDamDefaults, HeaderModule, ImageCropType, ImageDecoding, ImageFormats, ImageLoading, ImagePosition, ImageTransform, ISOLocale, JsConversionOptions, JsPreprocessingOptions, LibraryComponentProps, ListContentType, LlmsConfig, LlmsImages, LlmsIndexConfig, LlmsMarkdownConfig, Locale, LocaleTranslations, NavigationModule, Page, PageIntegration, PageLanguage, Renderers, ResponsiveImageProps, Site, SiteLanguage, SocialName, TimeZone };
|
|
502
|
+
export type { BackgroundImageSizesProps, Breadcrumb, CloudinaryDefaults, Config, ContentPresence, ContentTypeRelations, DeprecatedLlmsConfig, FetchPriority, FooterModule, FullPath, GriddoDamDefaults, HeaderModule, ImageCropType, ImageDecoding, ImageFormats, ImageLoading, ImagePosition, ImageTransform, ISOLocale, JsConversionOptions, JsPreprocessingOptions, LibraryComponentProps, ListContentType, LlmsConfig, LlmsImages, LlmsIndexConfig, LlmsMarkdownConfig, Locale, LocaleTranslations, NavigationModule, Page, PageIntegration, PageLanguage, Renderers, ResponsiveImageProps, Site, SiteLanguage, SocialName, TimeZone, };
|
package/dist/types/global.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { KeysOfUnion } from "./utilities";
|
|
2
1
|
import type { Fields } from "../index";
|
|
2
|
+
import type { KeysOfUnion } from "./utilities";
|
|
3
3
|
type HTMLHeadingTag = "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
|
|
4
4
|
interface SetQueryProps<ContentType> {
|
|
5
5
|
/** The ReferenceField prop */
|
|
@@ -38,4 +38,4 @@ type Wysiwyg = BaseWysiwyg & Common;
|
|
|
38
38
|
type CommonPageContentTypeFields = AIReferenceField | ArrayFieldGroup | ConditionalField | FieldGroup | AsyncCheckGroup | AsyncSelect | CheckGroup | ColorPicker | ComponentContainer | DateField | FieldsDivider | FileField | HeadingField | ImageField | LinkField | MultiCheckSelect | MultiCheckSelectGroup | NoteField | NumberField | RadioGroup | ReferenceField | RichText | Select | SliderField | TagsField | TextArea | TextField | TimeField | ToggleField | UniqueCheck | UrlField | VisualUniqueSelection | Wysiwyg;
|
|
39
39
|
type PageContentTypeFields = CommonPageContentTypeFields | ComponentArray;
|
|
40
40
|
type PageContentTypeFieldsForArrayFieldGroup = CommonPageContentTypeFields;
|
|
41
|
-
export type { AIReferenceField, ArrayFieldGroup,
|
|
41
|
+
export type { AIReferenceField, ArrayFieldGroup, AsyncCheckGroup, AsyncSelect, CheckGroup, ColorPicker, ComponentArray, ComponentContainer, ConditionalField, DateField, FieldGroup, FieldsDivider, FileField, HeadingField, ImageField, LinkField, MultiCheckSelect, MultiCheckSelectGroup, NoteField, NumberField, PageContentTypeFields, RadioGroup, ReferenceField, RichText, Select, SliderField, TagsField, TextArea, TextField, TimeField, ToggleField, UniqueCheck, UrlField, VisualUniqueSelection, Wysiwyg, };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import type __AT__ from "@/autotypes";
|
|
1
2
|
import type { Core } from "../..";
|
|
2
3
|
import type { SimpleContentType, Source } from "../api-response-fields";
|
|
3
|
-
import type __AT__ from "@/autotypes";
|
|
4
4
|
type WithAuxText = {
|
|
5
5
|
/** Sets a label text to show besides the toggle field control */
|
|
6
6
|
auxText?: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { Categories } from "./Categories";
|
|
2
2
|
import type { PageContentType } from "./PageContentType";
|
|
3
3
|
import type { SimpleContentType } from "./SimpleContentType";
|
|
4
|
-
export type {
|
|
4
|
+
export type { Categories as CategoryContentType, PageContentType, SimpleContentType, };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { BaseContentType } from "./base";
|
|
2
|
-
import type { DataPacks, ExpirationData } from "./props";
|
|
3
1
|
import type { PageContentTypeFields, TextField } from "../schema-fields/page-content-type-fields";
|
|
4
2
|
import type { SearchFrom, WithSearchable } from "../schema-fields/props";
|
|
3
|
+
import type { BaseContentType } from "./base";
|
|
4
|
+
import type { DataPacks, ExpirationData } from "./props";
|
|
5
5
|
type PageContentTypeProp = SearchFrom & {
|
|
6
6
|
/** The name of the Reacttemplates to use with the page type Schema. */
|
|
7
7
|
templates: Array<string>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { BaseContentType } from "./base";
|
|
2
|
-
import type { DataPacks, ExpirationData } from "./props";
|
|
3
1
|
import type { SearchFrom, WithSearchable } from "../schema-fields/props";
|
|
4
2
|
import type { SimpleContentTypeFields, TextField } from "../schema-fields/simple-content-type-fields";
|
|
3
|
+
import type { BaseContentType } from "./base";
|
|
4
|
+
import type { DataPacks, ExpirationData } from "./props";
|
|
5
5
|
type SimpleContentTypeProp<ContentType> = SearchFrom & {
|
|
6
6
|
/** An array of Griddo fields. */
|
|
7
7
|
fields: [
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
+
import type __AT__ from "@/autotypes";
|
|
1
2
|
import type { Fields } from "../..";
|
|
2
3
|
import type { FormFieldArray, Source } from "../api-response-fields";
|
|
4
|
+
import type { UIFormTemplateFields } from "../schema-fields/ui-form-template-fields";
|
|
5
|
+
import type { UITemplateFields } from "../schema-fields/ui-template-fields";
|
|
3
6
|
import type { BaseUI } from "./base";
|
|
4
7
|
import type { FormTemplateCategoryEntry } from "./FormCategories";
|
|
5
8
|
import type { ConfigTabs, Dimension, Thumbnails } from "./props";
|
|
6
|
-
import type { UIFormTemplateFields } from "../schema-fields/ui-form-template-fields";
|
|
7
|
-
import type { UITemplateFields } from "../schema-fields/ui-template-fields";
|
|
8
|
-
import type __AT__ from "@/autotypes";
|
|
9
9
|
interface ComponentAndModuleBase extends BaseUI {
|
|
10
10
|
/** Type of schema. */
|
|
11
11
|
schemaType: "component" | "module" | "template" | "formComponent";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { DataPacks, Thumbnails, _AutoTypes } from "./props";
|
|
2
1
|
import type __AT__ from "@/autotypes";
|
|
2
|
+
import type { _AutoTypes, DataPacks, Thumbnails } from "./props";
|
|
3
3
|
interface BaseContentType extends _AutoTypes {
|
|
4
4
|
/** Title for the Content Type */
|
|
5
5
|
title: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import type __AT__ from "@/autotypes";
|
|
1
2
|
import type { UIFields } from "../schema-fields/ui-fields";
|
|
2
3
|
import type { NonEmptyArray } from "../utilities";
|
|
3
|
-
import type __AT__ from "@/autotypes";
|
|
4
4
|
type DataPacks = {
|
|
5
5
|
/** Sets the Data Packs to which this schema belongs. */
|
|
6
6
|
dataPacks?: NonEmptyArray<__AT__.Datapacks> | null;
|
|
@@ -59,4 +59,4 @@ interface GriddoTheme {
|
|
|
59
59
|
/** Instance themes array */
|
|
60
60
|
themes: Array<Theme>;
|
|
61
61
|
}
|
|
62
|
-
export type {
|
|
62
|
+
export type { BaseTheme, BaseThemeBase, BaseThemeNormal, BaseThemeWithColorScheme, GlobalTheme, GriddoTheme, Primitive, Primitives, PrimitivesObj, Theme, };
|
|
@@ -6,4 +6,4 @@ type ContentTypeNameOfUnion<T> = T extends {
|
|
|
6
6
|
__contentTypeName: string;
|
|
7
7
|
} ? T["__contentTypeName"] : never;
|
|
8
8
|
type Replace<S extends string, From extends string, To extends string> = From extends "" ? S : S extends `${infer Start}${From}${infer Rest}` ? `${Start}${To}${Replace<Rest, From, To>}` : S;
|
|
9
|
-
export type {
|
|
9
|
+
export type { ContentTypeNameOfUnion, DistributiveOmit, KeysOfUnion, NonEmptyArray, PartiallyRequired, Replace, };
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -17,4 +17,10 @@ declare function getLangFromLocalStorage(): number | null;
|
|
|
17
17
|
* @returns a string with the params concatenated
|
|
18
18
|
*/
|
|
19
19
|
declare function concatParams({ baseUrl, params }: ConcatParams): string;
|
|
20
|
-
|
|
20
|
+
/**
|
|
21
|
+
* A v4 UUID. `crypto.randomUUID` only exists in secure contexts (HTTPS or
|
|
22
|
+
* localhost) and in modern browsers, so fall back to `getRandomValues`, which
|
|
23
|
+
* is available everywhere.
|
|
24
|
+
*/
|
|
25
|
+
declare function randomUUID(): string;
|
|
26
|
+
export { concatParams, getLangFromLocalStorage, getSiteID, getToken, isLocalStorageAvailable, randomUUID, };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/*! react-aspect-ratio 1.1.9 | MIT License | Copyright (c) 2017 Roderick Hsiao */
|
|
2
|
+
/**
|
|
3
|
+
* Vendored from react-aspect-ratio 1.1.9 (`AspectRatio`, the React >= 15.6
|
|
4
|
+
* export), MIT © Roderick Hsiao — see ./LICENSE.
|
|
5
|
+
* https://github.com/roderickhsiao/react-aspect-ratio
|
|
6
|
+
*
|
|
7
|
+
* Its 2.x line requires React 19, which core does not support yet.
|
|
8
|
+
*/
|
|
9
|
+
import * as React from "react";
|
|
10
|
+
import "./aspect-ratio.css";
|
|
11
|
+
type AspectRatioProps = React.ComponentProps<"div"> & {
|
|
12
|
+
ratio?: string | number;
|
|
13
|
+
};
|
|
14
|
+
declare const AspectRatio: React.ForwardRefExoticComponent<Omit<AspectRatioProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
15
|
+
export { AspectRatio };
|
package/package.json
CHANGED
|
@@ -1,16 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@griddo/core",
|
|
3
|
-
"description": "
|
|
3
|
+
"description": "Components, hooks and types for Griddo instances",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
|
-
"version": "12.
|
|
6
|
-
"authors": [
|
|
7
|
-
"Álvaro Sánchez' <alvaro.sanches@secuoyas.com>",
|
|
8
|
-
"Diego M. Béjar <diego.bejar@secuoyas.com>",
|
|
9
|
-
"Francis Vega <francis.vega@secuoyas.com>",
|
|
10
|
-
"Gonzalo Hernández <gonzalo.hernandez@secuoyas.com>",
|
|
11
|
-
"Sergio Ródenas <sergio.rodenas@secuoyas.com>",
|
|
12
|
-
"Txema León <txema.leon@secuoyas.com>"
|
|
13
|
-
],
|
|
5
|
+
"version": "12.13.0-rc.0",
|
|
14
6
|
"homepage": "https://griddo.io",
|
|
15
7
|
"repository": {
|
|
16
8
|
"type": "git",
|
|
@@ -19,8 +11,8 @@
|
|
|
19
11
|
"main": "dist/index.js",
|
|
20
12
|
"types": "dist/index.d.ts",
|
|
21
13
|
"bin": {
|
|
22
|
-
"griddo-autotypes
|
|
23
|
-
"griddo-
|
|
14
|
+
"griddo-autotypes": "dist/autotypes.mjs",
|
|
15
|
+
"griddo-sync-schemas": "dist/sync-schemas.mjs"
|
|
24
16
|
},
|
|
25
17
|
"exports": {
|
|
26
18
|
".": {
|
|
@@ -30,94 +22,65 @@
|
|
|
30
22
|
}
|
|
31
23
|
},
|
|
32
24
|
"scripts": {
|
|
33
|
-
"
|
|
34
|
-
"build
|
|
35
|
-
"prepare": "yarn build",
|
|
36
|
-
"// MONOREPO SCRIPTS": "",
|
|
37
|
-
"build": "npm run build:core",
|
|
25
|
+
"prepare": "npm run build",
|
|
26
|
+
"build": "rollup -c --sourcemap --bundleConfigAsCjs",
|
|
38
27
|
"clean": "rm -rf ./dist",
|
|
39
|
-
"// DEV": "",
|
|
40
28
|
"watch": "rollup -cw --bundleConfigAsCjs",
|
|
41
|
-
"// TEST": "",
|
|
42
29
|
"test": "vitest run",
|
|
43
30
|
"test:watch": "vitest",
|
|
44
31
|
"test:coverage": "vitest run --coverage",
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"test:hooks:watch": "vitest src/hooks/__tests__",
|
|
48
|
-
"test:hooks:coverage": "vitest run src/hooks/__tests__ --coverage",
|
|
49
|
-
"// LINTER": "",
|
|
50
|
-
"run:lint": "eslint .",
|
|
51
|
-
"// FORMATTER": "",
|
|
52
|
-
"run:format": "prettier --write ."
|
|
32
|
+
"lint": "biome check --write",
|
|
33
|
+
"format": "biome format --write"
|
|
53
34
|
},
|
|
54
35
|
"dependencies": {
|
|
55
|
-
"
|
|
56
|
-
"prettier": "3.
|
|
57
|
-
"
|
|
58
|
-
"tsx": "4.20.6"
|
|
36
|
+
"esbuild": "0.28.2",
|
|
37
|
+
"prettier": "3.9.9",
|
|
38
|
+
"tsx": "4.23.15"
|
|
59
39
|
},
|
|
60
40
|
"devDependencies": {
|
|
61
|
-
"@
|
|
62
|
-
"@
|
|
63
|
-
"@babel/preset-react": "7.26.3",
|
|
64
|
-
"@eslint/js": "9.30.1",
|
|
65
|
-
"@rollup/plugin-babel": "6.0.4",
|
|
66
|
-
"@rollup/plugin-commonjs": "28.0.1",
|
|
41
|
+
"@biomejs/biome": "2.5.15",
|
|
42
|
+
"@rollup/plugin-commonjs": "29.0.3",
|
|
67
43
|
"@rollup/plugin-json": "6.1.0",
|
|
68
|
-
"@rollup/plugin-node-resolve": "
|
|
69
|
-
"@rollup/plugin-replace": "6.0.
|
|
70
|
-
"@rollup/plugin-terser": "0.
|
|
71
|
-
"@rollup/plugin-typescript": "
|
|
72
|
-
"@testing-library/
|
|
73
|
-
"@testing-library/
|
|
74
|
-
"@
|
|
75
|
-
"@
|
|
76
|
-
"@
|
|
77
|
-
"@
|
|
78
|
-
"
|
|
79
|
-
"
|
|
80
|
-
"
|
|
81
|
-
"
|
|
82
|
-
"
|
|
83
|
-
"
|
|
84
|
-
"eslint": "^9.0.0",
|
|
85
|
-
"eslint-plugin-import": "2.31.0",
|
|
86
|
-
"eslint-plugin-node": "11.1.0",
|
|
87
|
-
"eslint-plugin-react": "7.37.4",
|
|
88
|
-
"eslint-plugin-react-hooks": "^4.6.0",
|
|
89
|
-
"eslint-plugin-testing-library": "^6.2.0",
|
|
90
|
-
"globals": "^16.0.0",
|
|
91
|
-
"jsdom": "^25.0.0",
|
|
92
|
-
"pkg-dir": "6.0.1",
|
|
93
|
-
"postcss": "8.4.49",
|
|
94
|
-
"rollup": "3.29.5",
|
|
95
|
-
"rollup-plugin-local-resolve": "1.0.7",
|
|
44
|
+
"@rollup/plugin-node-resolve": "16.0.3",
|
|
45
|
+
"@rollup/plugin-replace": "6.0.3",
|
|
46
|
+
"@rollup/plugin-terser": "1.0.0",
|
|
47
|
+
"@rollup/plugin-typescript": "12.3.0",
|
|
48
|
+
"@testing-library/dom": "10.4.2",
|
|
49
|
+
"@testing-library/jest-dom": "7.0.1",
|
|
50
|
+
"@testing-library/react": "16.3.3",
|
|
51
|
+
"@types/node": "24.19.0",
|
|
52
|
+
"@types/react": "18.2.79",
|
|
53
|
+
"@types/react-dom": "18.2.25",
|
|
54
|
+
"@vitest/coverage-v8": "5.0.2",
|
|
55
|
+
"jsdom": "29.1.1",
|
|
56
|
+
"postcss": "8.5.28",
|
|
57
|
+
"react": "18.2.0",
|
|
58
|
+
"react-dom": "18.2.0",
|
|
59
|
+
"rollup": "4.63.5",
|
|
96
60
|
"rollup-plugin-postcss": "4.0.2",
|
|
97
|
-
"
|
|
98
|
-
"typescript": "
|
|
99
|
-
"
|
|
100
|
-
"vitest": "
|
|
101
|
-
"vitest-fetch-mock": "
|
|
61
|
+
"tslib": "2.8.1",
|
|
62
|
+
"typescript": "6.0.3",
|
|
63
|
+
"vite": "8.3.1",
|
|
64
|
+
"vitest": "5.0.2",
|
|
65
|
+
"vitest-fetch-mock": "0.4.5"
|
|
102
66
|
},
|
|
103
67
|
"peerDependencies": {
|
|
104
|
-
"@types/react": "
|
|
105
|
-
"@types/react-dom": "
|
|
106
|
-
"react": "
|
|
107
|
-
"react-dom": "
|
|
68
|
+
"@types/react": "18.2.79",
|
|
69
|
+
"@types/react-dom": "18.2.25",
|
|
70
|
+
"react": "18.2.0",
|
|
71
|
+
"react-dom": "18.2.0"
|
|
108
72
|
},
|
|
109
73
|
"engines": {
|
|
110
|
-
"node": ">=
|
|
74
|
+
"node": ">=24.12.0"
|
|
111
75
|
},
|
|
112
76
|
"files": [
|
|
113
77
|
"dist"
|
|
114
78
|
],
|
|
115
79
|
"keywords": [
|
|
116
|
-
"griddo"
|
|
117
|
-
"secuoyas"
|
|
80
|
+
"griddo"
|
|
118
81
|
],
|
|
119
82
|
"publishConfig": {
|
|
120
83
|
"access": "public"
|
|
121
84
|
},
|
|
122
|
-
"gitHead": "
|
|
85
|
+
"gitHead": "df2c1bce4ff38b1d085a89b3d3cbba591200acde"
|
|
123
86
|
}
|
package/dist/autotypes.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import e from"node:fs";import t from"node:path";import{spawn as n}from"node:child_process";import{fileURLToPath as o}from"node:url";import r from"node:process";import i from"prettier";function s(e,t,n,o){return new(n||(n=Promise))(function(r,i){function s(e){try{l(o.next(e))}catch(e){i(e)}}function a(e){try{l(o.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}l((o=o.apply(e,t||[])).next())})}function a(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var l,c;"function"==typeof SuppressedError&&SuppressedError;var p=a(function(){if(c)return l;c=1;const{FORCE_COLOR:e,NODE_DISABLE_COLORS:t,TERM:n}=process.env,o={enabled:!t&&"dumb"!==n&&"0"!==e,reset:i(0,0),bold:i(1,22),dim:i(2,22),italic:i(3,23),underline:i(4,24),inverse:i(7,27),hidden:i(8,28),strikethrough:i(9,29),black:i(30,39),red:i(31,39),green:i(32,39),yellow:i(33,39),blue:i(34,39),magenta:i(35,39),cyan:i(36,39),white:i(37,39),gray:i(90,39),grey:i(90,39),bgBlack:i(40,49),bgRed:i(41,49),bgGreen:i(42,49),bgYellow:i(43,49),bgBlue:i(44,49),bgMagenta:i(45,49),bgCyan:i(46,49),bgWhite:i(47,49)};function r(e,t){let n,o=0,r="",i="";for(;o<e.length;o++)n=e[o],r+=n.open,i+=n.close,t.includes(n.close)&&(t=t.replace(n.rgx,n.close+n.open));return r+t+i}function i(e,t){let n={open:`[${e}m`,close:`[${t}m`,rgx:new RegExp(`\\x1b\\[${t}m`,"g")};return function(t){return void 0!==this&&void 0!==this.has?(this.has.includes(e)||(this.has.push(e),this.keys.push(n)),void 0===t?this:o.enabled?r(this.keys,t+""):t+""):void 0===t?function(e,t){let n={has:e,keys:t};return n.reset=o.reset.bind(n),n.bold=o.bold.bind(n),n.dim=o.dim.bind(n),n.italic=o.italic.bind(n),n.underline=o.underline.bind(n),n.inverse=o.inverse.bind(n),n.hidden=o.hidden.bind(n),n.strikethrough=o.strikethrough.bind(n),n.black=o.black.bind(n),n.red=o.red.bind(n),n.green=o.green.bind(n),n.yellow=o.yellow.bind(n),n.blue=o.blue.bind(n),n.magenta=o.magenta.bind(n),n.cyan=o.cyan.bind(n),n.white=o.white.bind(n),n.gray=o.gray.bind(n),n.grey=o.grey.bind(n),n.bgBlack=o.bgBlack.bind(n),n.bgRed=o.bgRed.bind(n),n.bgGreen=o.bgGreen.bind(n),n.bgYellow=o.bgYellow.bind(n),n.bgBlue=o.bgBlue.bind(n),n.bgMagenta=o.bgMagenta.bind(n),n.bgCyan=o.bgCyan.bind(n),n.bgWhite=o.bgWhite.bind(n),n}([e],[n]):o.enabled?r([n],t+""):t+""}}return l=o}());const u={directory:"isDirectory",file:"isFile"};const d=(e,t)=>t[u[e]]();function m(n,{cwd:i=r.cwd(),type:s="file",allowSymlinks:a=!0}={}){var l;!function(e){if(!Object.hasOwnProperty.call(u,e))throw new Error(`Invalid type specified: ${e}`)}(s),i=(l=i)instanceof URL?o(l):l;const c=a?e.statSync:e.lstatSync;for(const e of n)try{const n=c(t.resolve(i,e),{throwIfNoEntry:!1});if(!n)continue;if(d(s,n))return e}catch{}}const y=Symbol("findUpStop");function f(e,n={}){let r=t.resolve(((i=n.cwd)instanceof URL?o(i):i)||"");var i;const{root:s}=t.parse(r),a=n.stopAt||s,l=n.limit||Number.POSITIVE_INFINITY,c=[e].flat(),p=t=>{if("function"!=typeof e)return m(c,t);const n=e(t.cwd);return"string"==typeof n?m([n],t):n},u=[];for(;;){const e=p({...n,cwd:r});if(e===y)break;if(e&&u.push(t.resolve(r,e)),r===a||u.length>=l)break;r=t.dirname(r)}return u}function g({cwd:e}={}){const n=function(e,t={}){return f(e,{...t,limit:1})[0]}("package.json",{cwd:e});return n&&t.dirname(n)}const h="Props",$="ContentType",b="List",F=(e,t,n)=>`[ WARNING ]\nThe \`${e}\` with \`key: ${t}\` has no default value in the \`${n}\` schema.\nThe \`autotypes.d.ts\` file will be generated with incomplete information.\nPlease check the schema and add a default value for this field.\n`,v=e=>`[ WARNING ]\nThe field \`${e}\` has not been implemented yet.\nPlease check the schema and make sure the field name is correct.\n`,T=t.dirname(o(import.meta.url));function C(e){return{AIReferenceField:"Fields.AIReference",FormCategorySelect:"Fields.FormCategorySelect",FormContainer:"Fields.FormContainer",FormFieldArray:"Fields.FormFieldArray",ArrayFieldGroup:"Fields.ArrayFieldGroup",AsyncCheckGroup:"Fields.AsyncCheckGroup",AsyncSelect:"Fields.AsyncSelect",CheckGroup:"Fields.CheckGroup",ColorPicker:"Fields.ColorPicker",ComponentArray:"Fields.ComponentArray",ComponentContainer:"Fields.ComponentContainer",ConditionalField:"Fields.Conditional",DateField:"Fields.Date",FieldGroup:"Fields.FieldGroup",FieldsDivider:"Fields.FieldsDivider",FileField:"Fields.File",HeadingField:"Fields.Heading",ImageField:"Fields.Image",LinkField:"Fields.Link",MultiCheckSelect:"Fields.MultiCheckSelect",MultiCheckSelectGroup:"Fields.MultiCheckSelectGroup",NoteField:"Fields.Note",NumberField:"Fields.Number",RadioGroup:"Fields.RadioGroup",ReferenceField:"Fields.Reference",RichText:"Fields.RichText",Select:"Fields.Select",SliderField:"Fields.Slider",TagsField:"Fields.Tags",TextArea:"Fields.TextArea",TextField:"Fields.Text",TimeField:"Fields.Time",ToggleField:"Fields.Toggle",UniqueCheck:"Fields.UniqueCheck",UrlField:"Fields.Url",VisualUniqueSelection:"Fields.VisualUniqueSelection",Wysiwyg:"Fields.Wysiwyg"}[e]}function k(e,t){var n;const{returnTypeName:o,generic:r}=t||{},i="hideable"in e&&Boolean(e.hideable),s=r?`<${r}>`:"",a=`${o||C(e.type)}${s}`,l=i?`Hideable<${a}>`:`${a}`;return`\n\t\t${(null===(n=e._autoType)||void 0===n?void 0:n.doc)||""}\n\t\t${`${e.key}?: ${l}`}\n\t`}const P=T.includes("node_modules");function S(e,t,n){var o,r,i,s;const a=(null===(o=n.autotypesConfig)||void 0===o?void 0:o.interfaceSuffix)||h,l=(null===(r=n.autotypesConfig)||void 0===r?void 0:r.contentTypeSuffix)||$;if("FieldsDivider"===e.type)return"// FieldsDivider";if(null===(i=e._autoType)||void 0===i?void 0:i.ignore)return"// Ignored by AutoType.ignore";const{type:c,_autoType:p,key:u}=e,{hasDistributorData:d,getStaticData:m}=n;if(!c||!u)return"\n\t\t\t/** · (ノ-_-)ノ ミ ┴┴ You forgot to write the `type` | `key` or some mandatory prop */\n\t\t";if("DateField"===c||"FileField"===c||"ImageField"===c||"NoteField"===c||"NumberField"===c||"RichText"===c||"SliderField"===c||"TagsField"===c||"TextArea"===c||"TextField"===c||"TimeField"===c||"ToggleField"===c||"UniqueCheck"===c||"UrlField"===c||"Wysiwyg"===c)return k(e);if("MultiCheckSelect"===c){if("pageContentType"===t||"simpleContentType"===t){const t=`${e.source}${l}${a}`;return k(e,{generic:`Relations, FromList, ${t}<false, false>, FromDistributor`})}return k(e,{generic:"true"})}if("AsyncCheckGroup"===c){if("pageContentType"===t||"simpleContentType"===t){const t=`${e.source}${l}${a}`;return k(e,{generic:`Relations, FromList, ${t}<false, false>, FromDistributor`})}return k(e,{generic:"true"})}if("MultiCheckSelectGroup"===c){const t=[e.elements.map(e=>`"${e.key}"`).join("|"),null===(s=e._autoType)||void 0===s?void 0:s.relations].join(",");return k(e,{generic:t})}if("ColorPicker"===c)return e.isThemePalette?k(e,{returnTypeName:"Fields.ColorPickerFixed"}):k(e);if("HeadingField"===c||"RadioGroup"===c||"Select"===c){const{options:t}=e,n=function(e){return e.map(({value:e})=>"string"==typeof e?`"${e}"`:e).join("|")}(t);return k(e,{generic:n})}if("CheckGroup"===c){const{options:t}=e,n=function(e){return e.map(({name:e})=>"string"==typeof e?`"${e}"`:e).join("|")}(t);return k(e,{generic:n})}if("LinkField"===c){const{whiteList:t}=e;let o="";if(t.length>1&&"default"in n.schema){const t=n.schema.default[e.key].modal,r=Object.keys(t).map(e=>`${e}?: ${t[e].component}${a}`).join(",");o=`{${r}}`}else o=`${t[0]}${a}`;return k(e,{generic:o})}if("AsyncSelect"===c){if("entity"in e&&"menu_containers"===e.entity)return`\n${u}?: Menu`;if("pageContentType"===t||"simpleContentType"===t){const t=`${e.source}${l}${a}`;return k(e,{generic:`Relations, FromList, ${t}<false, false>, FromDistributor`})}return`\n${u}?: Fields.AsyncSelect;`}if("FieldGroup"===c)return`\n\t\t\t// << ${c}\n\t\t\t${e.fields.map(e=>S(e,t,n)).join("")}\n\t\t\t// end >>\n\t\t`;if("ArrayFieldGroup"===c){return`\n\t\t\t\n${(null==p?void 0:p.doc)||""}\n${u}?: Fields.ArrayFieldGroup<{${e.fields.map(e=>S(e,t,Object.assign(Object.assign({},n),{_from:"ArrayFieldGroup",_fromKey:u}))).join("")}}>\n\t\t`}if("ConditionalField"===c){const o=e.fields.map(e=>S(e,t,n)),r=(null==p?void 0:p.doc)||"",i="hideable"in e&&e.hideable,s=i?">":"";return`\n\t\t\t// << ${c}\n\t\t\t\n${r}\n${u}?: ${i?"Hideable<":""}${C(c)}<${e.options.map(e=>"string"==typeof e.value?`"${e.value}"`:e.value).join("|")}>${s};\n\t\t\t${o.join("")}\n\t\t\t// end >>\n\t\t`}if("FormFieldArray"===c){const o="template"===t||"pageContentType"===t?"TemplateSection":"formTemplate"===t?"FormFieldArray":"ComponentArray",r="template"===t?"":"?",{key:i,_autoType:s,whiteList:l}=e,c=(null==s?void 0:s.doc)||"",p=(e,t,n)=>e.filter(e=>e&&"schemaType"in e&&"module"===(null==e?void 0:e.schemaType)?(null==e?void 0:e.sectionList)&&!!(null==e?void 0:e.sectionList[t]):void 0).map(e=>({t:null==e?void 0:e.sectionList[t].filter(e=>e===n),m:null==e?void 0:e.component})).filter(e=>{var t;return null===(t=null==e?void 0:e.t)||void 0===t?void 0:t.length}).map(e=>null==e?void 0:e.m).filter(Boolean);let u="";"template"===t&&(u=p(n.moduleSchemas,n.schema.component,i).join("|"));return`\n${c}\n${i}${r}: Fields.${o}<${[...new Set([...u.split("|"),...l])].filter(Boolean).map(e=>`${e}${a}`).join("|")}>;`}if("ComponentArray"===c){const o="template"===t||"pageContentType"===t?"TemplateSection":"ComponentArray",r="template"===t?"":"?",i=e,{key:s,_autoType:l,whiteList:c}=i,p=(null==l?void 0:l.doc)||"",u=(e,t,n)=>e.filter(e=>{if(e&&"schemaType"in e&&"module"===(null==e?void 0:e.schemaType))return(null==e?void 0:e.sectionList)&&!!(null==e?void 0:e.sectionList[t])}).map(e=>({t:null==e?void 0:e.sectionList[t].filter(e=>e===n),m:null==e?void 0:e.component})).filter(e=>{var t;return null===(t=null==e?void 0:e.t)||void 0===t?void 0:t.length}).map(e=>null==e?void 0:e.m).filter(Boolean);let d="";"template"===t&&(d=u(n.moduleSchemas,n.schema.component,s).join("|"));return`\n${p}\n${s}${r}: Fields.${o}<${[...new Set([...d.split("|"),...c])].filter(Boolean).map(e=>`${e}${a}`).join("|")}>;`}if("ComponentContainer"===c&&("object"===t||"component"===t||"module"===t||"template"===t||"pageContentType"===t)){const t=e,{whiteList:o}=t;let r="";if(o.length>1&&"default"in n.schema)if("ArrayFieldGroup"===n._from){const t=n._fromKey;void 0===n.schema.default[t]&&console.warn(F(e.type,e.key,n.schema.component));r="{"+n.schema.default[t].map(t=>t[e.key]?Object.keys(t[e.key]).map(n=>`${n}?:${t[e.key][n].component}${a}`):(console.warn(F(e.type,e.key,n.schema.component)),"")).join("")+"}"}else if(void 0===n.schema.default[e.key])console.warn(F(e.type,e.key,n.schema.component)),r="";else{const t=n.schema.default[e.key],o=Object.keys(t).map(e=>`${e}?: ${t[e].component}${a};`).join("");r=`{${o}}`}else r=`${o[0]}${a}`;return k(e,{generic:r})}if("FormContainer"===c&&("object"===t||"component"===t||"module"===t||"template"===t||"pageContentType"===t)){return`\n${(null==p?void 0:p.doc)||""}\n${u}?: Fields.FormContainer<FormTemplates${a}>;`}if("ReferenceField"===c){const t=e.sources||[{structuredData:void 0}],n=Array.isArray(t)&&t.map(e=>e.structuredData?`${e.structuredData}${l}${a}`:"unknown").join("|")||"";return`\n\t\t \t${k(e,{generic:n})}\n\t\t \t${d||m?`queriedItems?: Fields.QueriedData<${n}>;`:""}\n\t\t `}if("VisualUniqueSelection"===c){const t=e.options[0],n=e.options[0];let o="";if(t.value){o=e.options.map(e=>`"${e.value}"`).join("|")}if(n.theme){o=e.options[0].options.map(e=>`"${e.value}"`).join("|")}return k(e,{generic:o})}return"FormCategorySelect"===c?`${u}?: Fields.FormCategorySelect<FormCategoryLabels>`:"AIReferenceField"===c?`${u}?: Fields.AIReference`:(console.warn(v(e.type)),"")}class j{setParser(e){this.parser=e}parse(e,t){var n;return(null===(n=this.parser)||void 0===n?void 0:n.parse(e,t))||""}}const x={ComponentsNameParser:class{parse(e){const t=Object.keys(e).map(e=>`"${e}"`);return t.length?`export type Components = ${t.join("|")}`:""}},DataPacksCategoryParser:class{parse(e){return e?`export type DatapacksCategories = ${Object.keys(e).map(e=>`"${e}"`).join("|")}`:""}},DataPacksParser:class{parse(e){return e?`export type Datapacks = ${Object.keys(e).map(e=>`"${e}"`).join("|")}`:""}},DataTemplatesNameParser:class{parse(e){const t=Object.keys(e).map(t=>"detail"===e[t].type.mode?`"${t}"`:"").filter(Boolean);return t.length?`export type DetailTemplates = ${t.join("|")}`:""}},FormCategoryNamesParser:class{parse(e){const t=e.map(({value:e})=>`"${e}"`);return t.length?`export type FormCategoryLabels = ${t.join("|")}`:""}},FormFieldsParser:class{parse(e,t){var n;const o=(null===(n=t.autotypes)||void 0===n?void 0:n.interfaceSuffix)||h,r=Object.keys(e).map(e=>`"${e}"`),i=Object.keys(e).map(e=>`${e}${o}`);return r.length?`export type FormFields = ${r.join("|")}\nexport type FormFields${o} = ${i.join("|")}\n`:""}},FormTemplatesParser:class{parse(e,t){var n;const o=(null===(n=t.autotypes)||void 0===n?void 0:n.interfaceSuffix)||h,r=Object.keys(e).map(e=>`"${e}"`),i=Object.keys(e).map(e=>`${e}${o}`);return r.length?`export type FormTemplates = ${r.join("|")}\nexport type FormTemplates${o} = ${i.join("|")}\n`:""}},LanguagesParser:class{parse(e){const t=Object.keys(e);return`\n\t\texport interface SiteLanguage {\n\t\t\tdomain: { id: number; url: string; slug: string };\n\t\t\thome: string;\n\t\t\tid: number;\n\t\t\tisDefault: boolean;\n\t\t\tlabel: ${t.map(t=>{var n;return`"${null===(n=e[t])||void 0===n?void 0:n.label}"`}).join("|")};\n\t\t\tlanguage: ${t.map(t=>{var n;return`"${null===(n=e[t])||void 0===n?void 0:n.name}"`}).join("|")};\n\t\t\tlocale: ${t.map(e=>`"${e}"`).join("|")}\n\t\t\tpath: string;\n\t\t}\n\t`}},MenuItemsParser:class{getMenuItemsProps(e,t){return e?e.map(e=>S(e,"object",{hasDistributorData:!1,getStaticData:!1,moduleSchemas:[],schema:{},allSchemas:{},autotypesConfig:t})).join(""):""}parse(e,t){var n,o;const r=null===(n=null==e?void 0:e.link)||void 0===n?void 0:n.fields,i=null===(o=null==e?void 0:e.group)||void 0===o?void 0:o.fields;return`\n\t\texport interface InstanceMenuItems {\n\t\t\tlink:{\n\t\t\t\t${this.getMenuItemsProps(r,t.autotypes)}\n\t\t\t\tconfig?: {\n\t\t\t\t\theaderStyle?: string;\n\t\t\t\t\tfooterStyle?: string;\n\t\t\t\t\ttype?: "link";\n\t\t\t\t};\n\t\t\t};\n\t\t\tgroup: {\n\t\t\t\turl?: null;\n\t\t\t\t${this.getMenuItemsProps(i,t.autotypes)}\n\t\t\t\tconfig?: {\n\t\t\t\t\theaderStyle?: string;\n\t\t\t\t\tfooterStyle?: string;\n\t\t\t\t\ttype?: "group";\n\t\t\t\t};\n\t\t\t};\n\t\t}\n\t\texport type LinkMenuElement = Fields.BaseLinkElement<InstanceMenuItems> & InstanceMenuItems["link"];\n\t\texport type GroupMenuElement = Fields.BaseLinkElement<InstanceMenuItems> & InstanceMenuItems["group"];\n\t\texport type MenuElement = LinkMenuElement | GroupMenuElement;\n\t\texport type Menu = Fields.Menu<InstanceMenuItems>;\n\t`}},ModuleCateogiresParser:class{parse(e){return e?`export type ModuleCategories = ${e.map(e=>`"${e.value}"`).join("|")}`:""}},ModulesNameParser:class{parse(e){const t=Object.keys(e).map(e=>`"${e}"`);return t.length?`export type Modules = ${t.join("|")}`:""}},PageContentTypeParser:class{parse(e){const t=Object.keys(e).map(e=>`"${e}"`);return t.length?`export type PageContentTypes = ${t.join("|")}`:""}},PageDataPropsParser:class{parse(e,t){var n,o;const r=(null===(n=t.autotypes)||void 0===n?void 0:n.contentTypeSuffix)||$,i=(null===(o=t.autotypes)||void 0===o?void 0:o.interfaceSuffix)||h,s=Object.keys(e).map(e=>`${e}${r}${i}`);return s.length?`export type Page${r}${i} = ${s.join("|")}`:""}},SimpleContentTypeParser:class{parse(e){const t=Object.keys(e).map(e=>`"${e}"`);return t.length?`export type SimpleContentTypes = ${t.join("|")}`:""}},SimpleDataPropsParser:class{parse(e,t){var n,o;const r=(null===(n=t.autotypes)||void 0===n?void 0:n.contentTypeSuffix)||$,i=(null===(o=t.autotypes)||void 0===o?void 0:o.interfaceSuffix)||h,s=Object.keys(e).map(e=>`${e}${r}${i}`);return s.length?`export type Simple${r}${i} = ${s.join("|")}`:""}},SubthemesParser:class{parse(e){return Array.isArray(e)&&e.length?`export type Subthemes = ${e.map(e=>`"${e}"`).join("|")}`:""}},TaxonomyParser:class{parse(e){const t=Object.keys(e).map(e=>`"${e}"`);return t.length?`export type TaxonomyContentTypes = ${t.join("|")}`:""}},TaxonomyPropsParser:class{parse(e,t){var n,o;const r=(null===(n=t.autotypes)||void 0===n?void 0:n.contentTypeSuffix)||$,i=(null===(o=t.autotypes)||void 0===o?void 0:o.interfaceSuffix)||h,s=Object.keys(e).map(e=>`${e}${r}${i}`);return s.length?`export type Taxonomy${r}${i} = ${s.join("|")}`:""}},TemplateSectionListParser:class{parse(e){const t=[];for(const n in e){const o=e[n],r=o.content.filter(e=>"ComponentArray"===e.type).map(({key:e})=>`"${e}"`).filter(Boolean),i=r&&(null==r?void 0:r.length)>0?`${o.component}?: NonEmptyArray<${r.join("|")}>;`:"";t.push(i)}return`\n\t\t\texport type SectionList = { ${t.join("")} }\n\t\t`}},TemplatesNameParser:class{parse(e){const t=Object.keys(e).map(e=>`"${e}"`);return t.length?`export type Templates = ${t.join("|")}`:""}},ThemesParser:class{parse(e){return Array.isArray(e)&&e.length?`export type Themes = ${e.map(e=>`"${e.value}"`).join("|")}`:""}},UIAndDataPropsParser:class{parse(e,t){var n;const o=(r=e,Object.keys(r).map(e=>Object.assign(Object.assign({},r[e]),{component:e})));var r;const i=(null===(n=t.autotypes)||void 0===n?void 0:n.interfaceSuffix)||h,{ARRAY_OF_MODULE_SCHEMAS:s}=function(e){const t=e.map(e=>{if("schemaType"in e&&"module"===e.schemaType)return e}).filter(Boolean);return{ARRAY_OF_MODULE_SCHEMAS:t}}(o);return o.map(e=>{var n;let o={kind:"component",contentTypeSuffixStr:"",contentTypeName:"",contentTypeKind:"",relatedContentTypeNames:"",componentName:"",hasDistributorData:!1,getStaticData:!1,interfaceForPublicAPI:"",relationsGeneric:(null===(n=e._autoType)||void 0===n?void 0:n.relations)?"<Relations = unknown, FromList = unknown, FromDistributor = true>":""};if(function(e){return"fromPage"in e}(e)){const n=function(e,t){var n,o,r;const i=[],s=[],a=[],l=e.fromPage?"pageContentType":"simpleContentType",c=(null===(n=t.autotypes)||void 0===n?void 0:n.contentTypeSuffix)||$,p=(null===(o=t.autotypes)||void 0===o?void 0:o.publicApiSuffix)||b,u=(null===(r=t.autotypes)||void 0===r?void 0:r.interfaceSuffix)||h;"pageContentType"===l&&i.push(`"${e.component}"`);"simpleContentType"!==l||e.taxonomy||s.push(`"${e.component}"`);"simpleContentType"===l&&e.taxonomy&&a.push(`"${e.component}"`);let d="";if("schema"in e){const t=e.schema.fields.map(e=>"source"in e&&(null==e?void 0:e.source)).filter(Boolean);d=t.length?`__relatedContentTypeNames: ${JSON.stringify(t)}`:""}const m="<Relations = unknown, FromList = unknown, FromDistributor = true>",y=`\n\t\t\t\t/** Type to be consumed by public API: useList(), etc.. */\n\t\t\t\texport type ${e.component}${c}${p}${u}<R extends Core.ContentTypeRelations = false> = ${e.component}${c}${u}<R, true>;\n\t\t\t\t`;return{kind:l,componentName:"",contentTypeName:`__contentTypeName: "${e.component}";`,contentTypeKind:`__contentTypeKind: "${l}";`,contentTypeSuffixStr:c,getStaticData:!1,hasDistributorData:!1,relatedContentTypeNames:d,relationsGeneric:m,interfaceForPublicAPI:y}}(e,t);o=Object.assign(Object.assign({},o),n)}if(function(e){return"schemaType"in e}(e)){const t=function(e){return{kind:e.schemaType,componentName:`component: "${e.component}"`,contentTypeName:"",contentTypeKind:"",contentTypeSuffixStr:"",relatedContentTypeNames:"",relationsGeneric:"",interfaceForPublicAPI:"",hasDistributorData:!!e.default.hasDistributorData,getStaticData:!!e.default.getStaticData}}(e);o=Object.assign(Object.assign({},o),t)}const r=function(e,t,n,o,r){return function(e){if("fromPage"in e)return e.taxonomy?[]:e.schema.fields;if("template"===e.schemaType){return[...e.content||[],...e.config||[]]}if("formTemplate"===e.schemaType){return[...e.content||[],...e.config||[]]}if("component"===e.schemaType||"module"===e.schemaType||"formComponent"===e.schemaType)return e.configTabs.flatMap(e=>e.fields);throw new Error(`Wrong schema ${JSON.stringify(e,null,2)}`)}(e).map(i=>S(i,o.kind,{hasDistributorData:o.hasDistributorData,getStaticData:o.getStaticData,moduleSchemas:t,schema:e,allSchemas:n,autotypesConfig:r})).filter(Boolean).join("")}(e,s,e,o,t.autotypes);return`\n\t\t\t\texport interface ${e.component}${o.contentTypeSuffixStr}${i}${o.relationsGeneric} ${function(e){const t=function(e){return"schemaType"in e&&"template"===e.schemaType&&("list"===e.type.mode||"paginated-data"===e.type.mode)}(e)?"Fields.ExtraListTemplateProps":"";return n=[t],n.filter(e=>e.length).length<1?"":`extends ${n.join(", ")}`;var n}(e)} {\n\t\t\t\t\t${o.contentTypeName}\n\t\t\t\t\t${o.contentTypeKind}\n\t\t\t\t\t${o.relatedContentTypeNames}\n\t\t\t\t\t${o.componentName}\n\t\t\t\t\t${r}\n\t\t\t\t\t${function(e){return"fromPage"in e&&!e.fromPage&&!0===e.taxonomy}(e)?"title?: string; code?: string":""}\n\t\t\t\t}\n\t\t\t\t${o.interfaceForPublicAPI}\n\t\t\t`}).join("")}}};s(void 0,void 0,void 0,function*(){try{const r=function(){const e=T,n=P?"../../../":"../griddo-components";return t.resolve(g({cwd:e}),n)}(),a=t.join(r,"griddo.config.ts");let l;try{const e=yield(o=a,new Promise((e,r)=>{const i=t.resolve(o),s=n(process.execPath,["--import","tsx","-e",`import('${i}').then(m => console.log(JSON.stringify(m.default ?? m)))`],{stdio:["ignore","pipe","inherit"]});let a="";s.stdout.on("data",e=>{a+=e}),s.on("error",r),s.on("close",t=>{if(0!==t)return r(new Error(`Config process exited with code ${t}`));try{e(JSON.parse(a))}catch(e){r(e)}})}));l=e&&"object"==typeof e&&"default"in e?e.default:e}catch(e){console.error("Failed to load griddo.config.ts:",e),process.exit(1)}const{schemas:{config:{languages:c,menuItems:u,themes:d,subthemes:m,moduleCategories:y},contentTypes:{dataPacks:f,dataPacksCategories:h,structuredData:$},ui:{components:b,modules:F,templates:v},forms:C}}=l,{categoryContentTypes:k,pageContentTypes:S,simpleContentTypes:_}=function(e){return{categoryContentTypes:function(e){const t={};for(const n in e){const o=e[n];!o.fromPage&&o.taxonomy&&(t[n]=o)}return t}(e),pageContentTypes:function(e){const t={};for(const n in e){const o=e[n];o.fromPage&&(t[n]=o)}return t}(e),simpleContentTypes:function(e){const t={};for(const n in e){const o=e[n];o.fromPage||o.taxonomy||(t[n]=o)}return t}(e)}}(l.schemas.contentTypes.structuredData),A=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},b),F),v),$),(null==C?void 0:C.templates)||{}),(null==C?void 0:C.fields)||{}),D=function(e){const t=new j;return e.map(e=>(t.setParser(new e.parser),t.parse(e.schema,e.config)))}([{schema:u,parser:x.MenuItemsParser,config:l},{schema:c,parser:x.LanguagesParser,config:l},{schema:A,parser:x.UIAndDataPropsParser,config:l},{schema:m||{},parser:x.SubthemesParser,config:l},{schema:S,parser:x.PageContentTypeParser,config:l},{schema:_,parser:x.SimpleContentTypeParser,config:l},{schema:k,parser:x.TaxonomyParser,config:l},{schema:b,parser:x.ComponentsNameParser,config:l},{schema:F,parser:x.ModulesNameParser,config:l},{schema:(null==C?void 0:C.templates)||{},parser:x.FormTemplatesParser,config:l},{schema:(null==C?void 0:C.fields)||{},parser:x.FormFieldsParser,config:l},{schema:(null==C?void 0:C.categories)||[],parser:x.FormCategoryNamesParser,config:l},{schema:v,parser:x.TemplatesNameParser,config:l},{schema:v,parser:x.DataTemplatesNameParser,config:l},{schema:v,parser:x.TemplateSectionListParser,config:l},{schema:y,parser:x.ModuleCateogiresParser,config:l},{schema:f,parser:x.DataPacksParser,config:l},{schema:h,parser:x.DataPacksCategoryParser,config:l},{schema:k,parser:x.TaxonomyPropsParser,config:l},{schema:_,parser:x.SimpleDataPropsParser,config:l},{schema:S,parser:x.PageDataPropsParser,config:l},{schema:d,parser:x.ThemesParser,config:l}]),w=yield function(e){return s(this,void 0,void 0,function*(){return(yield i.format(e,{useTabs:!0,printWidth:120,parser:"typescript"})).replace(/^\s*\n/gm,"")})}(`\n\t\t\t/* eslint-disable @typescript-eslint/ban-types */\n/* eslint-disable @typescript-eslint/no-unused-vars */\n/* eslint-disable no-use-before-define */\n//\n//\n// ' ____\n// /\\ \\\n// º / /\\ \\\n// ' / / \\ _>\n// ' _\\ \\__> \\__\n// ' O ( __;·;______ ) AutoTypes\n// O º, | , , \\ \\\\ ·..~~.·~.·\n// ,,, /| , , /\\ <\\\\\n// \\''\\-' ⎩, <\\/\\ \\ \\\n// \\_/ /\\_____⎩/ > > >\n// '___' <_(_)__> / \\ <\n// / / ´ \\ | \\___//\\\\\n// / / | / > > \\\\\n// · ··~~~~·~·~~~~~~~·~··~~~~~·~·~~·~~~~·~~~~~·· · ·\n//\n// Embrace the beauty of effortless typing by indulging in the benefits of them\n// sans the actual typing!\n//\n// Behold! These dynamically generated types were conjured from the schemas\n// nestled within this repository. However, should you yearn to expand upon\n// these types, kindly abstain from doing so in this file, lest AutoTypes'\n// magic shall smite your changes with each schema modification.\n//\n// Check out the details of Griddo AutoTypes in:\n// https://griddoio.notion.site/Griddo-AutoTypes-e7420867dd2e489c8da34a493b763cd8>\n//\n// Happy magic types!\n//\nimport { Core, Fields, Hideable, NonEmptyArray } from "@griddo/core"\n//\n\n\t\t\t${D.join("\n")}\n\t\t`),O=t.join(r,"autotypes.d.ts");e.writeFileSync(O,w),console.log(`${p.green(" ✔")} AutoTypes`)}catch(e){console.log(`${p.red(" ✘")} AutoTypes`),console.log(e)}var o});
|
|
2
|
-
//# sourceMappingURL=autotypes.js.map
|