@griddo/core 11.0.18 → 11.0.19
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-legacy.js +2 -0
- package/dist/autotypes-legacy.js.map +1 -0
- package/dist/autotypes.js +1 -1
- package/dist/autotypes.js.map +1 -1
- package/dist/functions/autotypes/factories/index.d.ts +18 -0
- package/dist/functions/autotypes/factories/names/getComponents.d.ts +2 -0
- package/dist/functions/autotypes/factories/names/getDetailTemplates.d.ts +2 -0
- package/dist/functions/autotypes/factories/names/getModules.d.ts +2 -0
- package/dist/functions/autotypes/factories/names/getPageData.d.ts +2 -0
- package/dist/functions/autotypes/factories/names/getSimpleData.d.ts +2 -0
- package/dist/functions/autotypes/factories/names/getTaxonomy.d.ts +2 -0
- package/dist/functions/autotypes/factories/names/getTemplates.d.ts +2 -0
- package/dist/functions/autotypes/factories/props/getPageData.d.ts +2 -0
- package/dist/functions/autotypes/factories/props/getSectionList.d.ts +8 -0
- package/dist/functions/autotypes/factories/props/getSimpleData.d.ts +2 -0
- package/dist/functions/autotypes/factories/props/getTaxonomyData.d.ts +2 -0
- package/dist/functions/autotypes/factories/props/getTypeFromField/index.d.ts +22 -0
- package/dist/functions/autotypes/factories/props/getTypeFromField/utils.d.ts +41 -0
- package/dist/functions/autotypes/factories/props/getUIAndData/index.d.ts +2 -0
- package/dist/functions/autotypes/factories/props/getUIAndData/utils.d.ts +39 -0
- package/dist/functions/autotypes/factories/schemas/getDataPacks.d.ts +5 -0
- package/dist/functions/autotypes/factories/schemas/getLanguages.d.ts +2 -0
- package/dist/functions/autotypes/factories/schemas/getMenuItems/index.d.ts +2 -0
- package/dist/functions/autotypes/factories/schemas/getMenuItems/utils.d.ts +3 -0
- package/dist/functions/autotypes/factories/schemas/getModuleCategories.d.ts +14 -0
- package/dist/functions/autotypes/factories/schemas/getThemes.d.ts +5 -0
- package/dist/functions/autotypes/index.d.ts +2 -1
- package/dist/functions/autotypes/misc/ascii.d.ts +3 -0
- package/dist/functions/autotypes/misc/types.d.ts +55 -0
- package/dist/functions/autotypes/misc/utils.d.ts +17 -0
- package/dist/functions/autotypes-legacy/index.d.ts +1 -0
- package/dist/functions/react-svg-library/utils.d.ts +5 -0
- package/dist/react-svg-library.js.map +1 -1
- package/dist/types/core/index.d.ts +1 -1
- package/dist/types/schemas/AutoTypes.d.ts +3 -3
- package/dist/types/schemas/HeaderFooter.d.ts +4 -4
- package/dist/types/schemas/UI.d.ts +8 -8
- package/dist/types/schemas/base.d.ts +1 -1
- package/dist/types/schemas/index.d.ts +2 -2
- package/package.json +3 -2
- /package/dist/functions/{autotypes → autotypes-legacy}/ascii.d.ts +0 -0
- /package/dist/functions/{autotypes → autotypes-legacy}/constants.d.ts +0 -0
- /package/dist/functions/{autotypes → autotypes-legacy}/getMenuItemsProps.d.ts +0 -0
- /package/dist/functions/{autotypes → autotypes-legacy}/getTypeFromField.d.ts +0 -0
- /package/dist/functions/{autotypes → autotypes-legacy}/getTypesFromSchemas.d.ts +0 -0
- /package/dist/functions/{autotypes → autotypes-legacy}/index.cjs.d.ts +0 -0
- /package/dist/functions/{autotypes → autotypes-legacy}/main.d.ts +0 -0
- /package/dist/functions/{autotypes → autotypes-legacy}/types.d.ts +0 -0
- /package/dist/functions/{autotypes → autotypes-legacy}/utils.d.ts +0 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { PageContentTypeFields } from "../../../../../types/schema-fields/page-content-type-fields";
|
|
2
|
+
import type { SimpleContentTypeFields } from "../../../../../types/schema-fields/simple-content-type-fields";
|
|
3
|
+
import type { UIFields } from "../../../../../types/schema-fields/ui-fields";
|
|
4
|
+
import type { UITemplateFields } from "../../../../../types/schema-fields/ui-template-fields";
|
|
5
|
+
import type { KindSchema, SchemaTypeWithComponentProp } from "../../../misc/types";
|
|
6
|
+
import type { Module } from "@schema-types";
|
|
7
|
+
/**
|
|
8
|
+
* Return a property with a Griddo type (serialized) based on a schema field.
|
|
9
|
+
*
|
|
10
|
+
* @param field A Griddo field object
|
|
11
|
+
* @param kind Schema type in order to later do some operations with fields
|
|
12
|
+
* @param options Object options
|
|
13
|
+
* @example
|
|
14
|
+
* { type: 'TextField', key: 'name' } => "name?: Fields.Text"
|
|
15
|
+
* { type: 'UrlField', key: 'image' } => "name?: Fields.Url"
|
|
16
|
+
*/
|
|
17
|
+
export declare function getTypeFromField(field: UIFields | UITemplateFields | SimpleContentTypeFields | PageContentTypeFields, kind: KindSchema, options: {
|
|
18
|
+
hasDistributorData: boolean;
|
|
19
|
+
getStaticData: boolean;
|
|
20
|
+
moduleSchemas: Array<Module | undefined>;
|
|
21
|
+
schema: SchemaTypeWithComponentProp;
|
|
22
|
+
}): string | undefined;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { FieldReturnTypes, Fields, SchemaFieldTypes } from "../../../misc/types";
|
|
2
|
+
/** Build a interface prop based on the field from the schema.
|
|
3
|
+
* Optionally it can receives a custom value for the type and a generic string to use as generic value
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* getGriddoFieldPropType(TextFieldObjectFromSchema)
|
|
7
|
+
* // -> TextFieldObjectFromSchema.key: Fields.TextField
|
|
8
|
+
* getGriddoFieldPropType(TextFieldObjectFromSchema, 'MyCustomValue', 'foo')
|
|
9
|
+
* // -> TextFieldObjectFromSchema.key: MyCustomValue<foo>
|
|
10
|
+
*/
|
|
11
|
+
type GetInterfacePropTypeOptions = {
|
|
12
|
+
returnTypeName?: FieldReturnTypes;
|
|
13
|
+
generic?: string;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Return a serialized type from a Griddo schema field.
|
|
17
|
+
*
|
|
18
|
+
* @param Fields A Griddo field object
|
|
19
|
+
* @param options An options object
|
|
20
|
+
* @returns A string that represent a interface prop type.
|
|
21
|
+
* @example
|
|
22
|
+
* interface SomeInterface {
|
|
23
|
+
* prop: boolean; // this function returns a string for this: `prop: boolean`
|
|
24
|
+
* }
|
|
25
|
+
*/
|
|
26
|
+
declare function getGriddoFieldPropType(field: Fields, options?: GetInterfacePropTypeOptions): string;
|
|
27
|
+
/**
|
|
28
|
+
* Return a string separated by the pipe char "|" using the `value` from object array.
|
|
29
|
+
*/
|
|
30
|
+
declare function getGenericFromOptions<T = unknown>(options: Array<{
|
|
31
|
+
value: T;
|
|
32
|
+
}>): string;
|
|
33
|
+
/**
|
|
34
|
+
* Return a string separated by the pipe char "|" using the `name` from object array.
|
|
35
|
+
*/
|
|
36
|
+
declare function getGenericFromCheckBoxOptions<T>(options: Array<{
|
|
37
|
+
name: T;
|
|
38
|
+
}>): string;
|
|
39
|
+
declare function getGenericFromWhitelist(whiteList: Array<string>): string;
|
|
40
|
+
declare function returnType(type: SchemaFieldTypes): FieldReturnTypes;
|
|
41
|
+
export { getGenericFromCheckBoxOptions, getGenericFromOptions, getGenericFromWhitelist, getGriddoFieldPropType, returnType, };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { GlobalState, SchemaType, SchemaTypeWithComponentProp } from "../../../misc/types";
|
|
2
|
+
import type { Schema } from "@core-types";
|
|
3
|
+
declare function getExtra(schema: SchemaTypeWithComponentProp): string;
|
|
4
|
+
declare function isUISchema(schema: SchemaTypeWithComponentProp): schema is Schema.Component | Schema.ContentTypeModule | Schema.MultiPageModule | Schema.Module | Schema.Template | Schema.ListTemplate;
|
|
5
|
+
declare function isContentTypeSchema(schema: SchemaTypeWithComponentProp): schema is (Schema.SimpleContentType & {
|
|
6
|
+
component: string;
|
|
7
|
+
}) | (Schema.PageContentType & {
|
|
8
|
+
component: string;
|
|
9
|
+
});
|
|
10
|
+
declare function isCategoryInterface(schema: SchemaTypeWithComponentProp): boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Convert an object of schemas into an array of objects of these schemas.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* input:
|
|
16
|
+
* `schemas` is an object of schemas like so:
|
|
17
|
+
* {
|
|
18
|
+
* BasicContent: {
|
|
19
|
+
* component: "BasicContent",
|
|
20
|
+
* ...
|
|
21
|
+
* },
|
|
22
|
+
* ...
|
|
23
|
+
* }
|
|
24
|
+
*
|
|
25
|
+
* output:
|
|
26
|
+
* [ {component: "BasicContent"}, {component: "NewsTemplate"}, ... ]
|
|
27
|
+
*/
|
|
28
|
+
declare function convertSchemasObjectsToArray(objectSchemas: Record<string, SchemaType>): Array<SchemaTypeWithComponentProp>;
|
|
29
|
+
declare function processContentTypeSchema(schema: (Schema.SimpleContentType & {
|
|
30
|
+
component: string;
|
|
31
|
+
}) | (Schema.PageContentType & {
|
|
32
|
+
component: string;
|
|
33
|
+
})): GlobalState;
|
|
34
|
+
declare function processUISchema(schema: Schema.Component | Schema.ContentTypeModule | Schema.MultiPageModule | Schema.Module | Schema.Template | Schema.ListTemplate): GlobalState;
|
|
35
|
+
declare function getPropsFromFields(schema: SchemaTypeWithComponentProp, arrayOfSchemaModules: Array<Schema.Module | undefined>, GS: GlobalState): string;
|
|
36
|
+
declare function getModuleSchemas(schemas: Array<SchemaTypeWithComponentProp>): {
|
|
37
|
+
ARRAY_OF_MODULE_SCHEMAS: (Schema.Module<unknown> | undefined)[];
|
|
38
|
+
};
|
|
39
|
+
export { convertSchemasObjectsToArray, getExtra, getModuleSchemas, getPropsFromFields, isCategoryInterface, isContentTypeSchema, isUISchema, processContentTypeSchema, processUISchema, };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ModuleCategories } from "@schema-types";
|
|
2
|
+
/**
|
|
3
|
+
* Returns a string with the module categories type definition
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* type ModuleCategories =
|
|
7
|
+
* | "spacers"
|
|
8
|
+
* | "heros"
|
|
9
|
+
* | "basic"
|
|
10
|
+
* | "distributors"
|
|
11
|
+
* | ...
|
|
12
|
+
* @returns (see example above)
|
|
13
|
+
*/
|
|
14
|
+
export declare function getModuleCategoriesType(schema: ModuleCategories): string;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import type { MainAutotypesProps } from "./misc/types";
|
|
2
|
+
export declare function main(props: MainAutotypesProps): Promise<void>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const HEAD_DESIGN = "/* 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// \u00BA / /\\ \\\n// ' / / \\ _>\n// ' _\\ \\__> \\__\n// ' O ( __;\u00B7;______ ) AutoTypes\n// O \u00BA, | , , \\ \\\\ \u00B7..~~.\u00B7~.\u00B7\n// ,,, /| , , /\\ <\\\\\n// \\''\\-' \u23A9, <\\/\\ \\ \\\n// \\_/ /\\_____\u23A9/ > > >\n// '___' <_(_)__> / \\ <\n// / / \u00B4 \\ | \\___//\\\\\n// / / | / > > \\\\\n// \u00B7 \u00B7\u00B7~~~~\u00B7~\u00B7~~~~~~~\u00B7~\u00B7\u00B7~~~~~\u00B7~\u00B7~~\u00B7~~~~\u00B7~~~~~\u00B7\u00B7 \u00B7 \u00B7\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";
|
|
2
|
+
declare const SUCCESS: string;
|
|
3
|
+
export { HEAD_DESIGN, SUCCESS };
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { Core, Schema } from "../../..";
|
|
2
|
+
import type * as PageContentType_Fields from "../../../types/schema-fields/page-content-type-fields";
|
|
3
|
+
import type * as SimpleContentType_Fields from "../../../types/schema-fields/simple-content-type-fields";
|
|
4
|
+
import type * as UI_Fields from "../../../types/schema-fields/ui-fields";
|
|
5
|
+
import type * as UITemplate_Fields from "../../../types/schema-fields/ui-template-fields";
|
|
6
|
+
import type { AutoTypesConfig, DataPack, DataPackCategory, ModuleCategories } from "../../../types/schemas";
|
|
7
|
+
import type { ThemeEntry } from "../../../types/schemas/Themes";
|
|
8
|
+
type SchemaFieldTypes = "ArrayFieldGroup" | "AsyncCheckGroup" | "AsyncSelect" | "AsyncSelect" | "CheckGroup" | "ColorPicker" | "ComponentArray" | "ComponentContainer" | "ConditionalField" | "DateField" | "FieldGroup" | "FieldsDivider" | "FileField" | "HeadingField" | "ImageField" | "LinkField" | "MultiCheckSelect" | "MultiCheckSelectGroup" | "NoteField" | "NumberField" | "RadioGroup" | "ReferenceField" | "RichText" | "Select" | "SliderField" | "TagsField" | "TextArea" | "TextField" | "TimeField" | "ToggleField" | "UniqueCheck" | "UrlField" | "VisualUniqueSelection" | "Wysiwyg";
|
|
9
|
+
type FieldReturnTypes = "Fields.ArrayFieldGroup" | "Fields.AsyncCheckGroup" | "Fields.AsyncSelect" | "Fields.CheckGroup" | "Fields.ColorPicker" | "Fields.ColorPickerFixed" | "Fields.ComponentArray" | "Fields.ComponentContainer" | "Fields.Conditional" | "Fields.Date" | "Fields.FieldGroup" | "Fields.FieldsDivider" | "Fields.File" | "Fields.Heading" | "Fields.Image" | "Fields.Link" | "Fields.MultiCheckSelect" | "Fields.MultiCheckSelectGroup" | "Fields.Note" | "Fields.Number" | "Fields.RadioGroup" | "Fields.Reference" | "Fields.RichText" | "Fields.Select" | "Fields.Slider" | "Fields.Tags" | "Fields.TextArea" | "Fields.Text" | "Fields.Time" | "Fields.Toggle" | "Fields.UniqueCheck" | "Fields.Url" | "Fields.VisualUniqueSelection" | "Fields.Wysiwyg";
|
|
10
|
+
type SchemaType = Schema.Component | Schema.ContentTypeModule | Schema.MultiPageModule | Schema.Module | Schema.Template | Schema.ListTemplate | Schema.SimpleContentType | Schema.PageContentType;
|
|
11
|
+
type SchemaTypeWithComponentProp = Schema.Component | Schema.ContentTypeModule | Schema.MultiPageModule | Schema.Module | Schema.Template | Schema.ListTemplate | (Schema.SimpleContentType & {
|
|
12
|
+
component: string;
|
|
13
|
+
}) | (Schema.PageContentType & {
|
|
14
|
+
component: string;
|
|
15
|
+
});
|
|
16
|
+
type Fields = UI_Fields.UIFields | UITemplate_Fields.UITemplateFields | SimpleContentType_Fields.SimpleContentTypeFields | PageContentType_Fields.PageContentTypeFields;
|
|
17
|
+
type KindSchema = "object" | "component" | "module" | "template" | "simpleContentType" | "pageContentType";
|
|
18
|
+
interface MenuItemsSchema {
|
|
19
|
+
link: Record<string, SchemaType>;
|
|
20
|
+
group: Record<string, SchemaType>;
|
|
21
|
+
}
|
|
22
|
+
type LanguagesSchema = Record<Core.Locale, {
|
|
23
|
+
name: string;
|
|
24
|
+
label: string;
|
|
25
|
+
}>;
|
|
26
|
+
type GlobalState = {
|
|
27
|
+
kind: KindSchema;
|
|
28
|
+
contentTypeSuffixStr: string;
|
|
29
|
+
contentTypeName: string;
|
|
30
|
+
contentTypeKind: string;
|
|
31
|
+
relatedContentTypeNames: string;
|
|
32
|
+
componentName: string;
|
|
33
|
+
hasDistributorData: boolean;
|
|
34
|
+
getStaticData: boolean;
|
|
35
|
+
interfaceForPublicAPI: string;
|
|
36
|
+
relationsGeneric: string;
|
|
37
|
+
};
|
|
38
|
+
export type { FieldReturnTypes, Fields, GlobalState, KindSchema, LanguagesSchema, MenuItemsSchema, SchemaFieldTypes, SchemaType, SchemaTypeWithComponentProp, };
|
|
39
|
+
export interface MainAutotypesProps {
|
|
40
|
+
categoryContentTypes: Record<string, Schema.SimpleContentType>;
|
|
41
|
+
pageContentTypes: Record<string, Schema.PageContentType>;
|
|
42
|
+
simpleContentTypes: Record<string, Schema.SimpleContentType>;
|
|
43
|
+
componentsSchema: Record<string, Schema.Component>;
|
|
44
|
+
modulesSchema: Record<string, Schema.Module>;
|
|
45
|
+
templatesSchema: Record<string, Schema.Template | Schema.ListTemplate | Schema.PaginatedDataTemplate>;
|
|
46
|
+
structuredDataSchema: Record<string, SchemaType>;
|
|
47
|
+
menuItemsSchemas: MenuItemsSchema;
|
|
48
|
+
languagesSchemas: LanguagesSchema;
|
|
49
|
+
moduleCategoriesSchema: ModuleCategories;
|
|
50
|
+
datapacksSchema: Record<string, DataPack>;
|
|
51
|
+
datapacksCategoriesSchema: Record<string, DataPackCategory>;
|
|
52
|
+
themesSchema: Array<ThemeEntry>;
|
|
53
|
+
subthemesSchema: Array<string>;
|
|
54
|
+
config?: AutoTypesConfig;
|
|
55
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { AutoTypesConfig } from "@schema-types";
|
|
2
|
+
import { Schema } from "../../..";
|
|
3
|
+
declare function prettify(input: string): Promise<string>;
|
|
4
|
+
/**
|
|
5
|
+
* Returns the instance or monorepo paths.
|
|
6
|
+
*
|
|
7
|
+
* @param customPath The path for the instance components
|
|
8
|
+
*/
|
|
9
|
+
declare function resolveComponentsPath(): string;
|
|
10
|
+
declare function extractSchemasFromConfig(configFile: any): {
|
|
11
|
+
categoryContentTypes: Record<string, Schema.SimpleContentType<unknown>>;
|
|
12
|
+
pageContentTypes: Record<string, Schema.PageContentType>;
|
|
13
|
+
simpleContentTypes: Record<string, Schema.SimpleContentType<unknown>>;
|
|
14
|
+
componentsSchema: Record<string, Schema.Component<unknown>>;
|
|
15
|
+
};
|
|
16
|
+
declare function readConfig(): AutoTypesConfig;
|
|
17
|
+
export { extractSchemasFromConfig, prettify, readConfig, resolveComponentsPath, };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react-svg-library.js","sources":["../../../node_modules/tslib/tslib.es6.js","../node_modules/camelcase/index.js","../node_modules/locate-path/index.js","../node_modules/find-up/index.js","../src/functions/autotypes/utils.ts","../src/functions/react-svg-library/index.ts","../node_modules/pkg-dir/index.js"],"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 */\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.push(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.push(_);\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;\r\n return g = { next: verb(0), \"throw\": verb(1), \"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 = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\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\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\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","const UPPERCASE = /[\\p{Lu}]/u;\nconst LOWERCASE = /[\\p{Ll}]/u;\nconst LEADING_CAPITAL = /^[\\p{Lu}](?![\\p{Lu}])/gu;\nconst IDENTIFIER = /([\\p{Alpha}\\p{N}_]|$)/u;\nconst SEPARATORS = /[_.\\- ]+/;\n\nconst LEADING_SEPARATORS = new RegExp('^' + SEPARATORS.source);\nconst SEPARATORS_AND_IDENTIFIER = new RegExp(SEPARATORS.source + IDENTIFIER.source, 'gu');\nconst NUMBERS_AND_IDENTIFIER = new RegExp('\\\\d+' + IDENTIFIER.source, 'gu');\n\nconst preserveCamelCase = (string, toLowerCase, toUpperCase, preserveConsecutiveUppercase) => {\n\tlet isLastCharLower = false;\n\tlet isLastCharUpper = false;\n\tlet isLastLastCharUpper = false;\n\tlet isLastLastCharPreserved = false;\n\n\tfor (let index = 0; index < string.length; index++) {\n\t\tconst character = string[index];\n\t\tisLastLastCharPreserved = index > 2 ? string[index - 3] === '-' : true;\n\n\t\tif (isLastCharLower && UPPERCASE.test(character)) {\n\t\t\tstring = string.slice(0, index) + '-' + string.slice(index);\n\t\t\tisLastCharLower = false;\n\t\t\tisLastLastCharUpper = isLastCharUpper;\n\t\t\tisLastCharUpper = true;\n\t\t\tindex++;\n\t\t} else if (isLastCharUpper && isLastLastCharUpper && LOWERCASE.test(character) && (!isLastLastCharPreserved || preserveConsecutiveUppercase)) {\n\t\t\tstring = string.slice(0, index - 1) + '-' + string.slice(index - 1);\n\t\t\tisLastLastCharUpper = isLastCharUpper;\n\t\t\tisLastCharUpper = false;\n\t\t\tisLastCharLower = true;\n\t\t} else {\n\t\t\tisLastCharLower = toLowerCase(character) === character && toUpperCase(character) !== character;\n\t\t\tisLastLastCharUpper = isLastCharUpper;\n\t\t\tisLastCharUpper = toUpperCase(character) === character && toLowerCase(character) !== character;\n\t\t}\n\t}\n\n\treturn string;\n};\n\nconst preserveConsecutiveUppercase = (input, toLowerCase) => {\n\tLEADING_CAPITAL.lastIndex = 0;\n\n\treturn input.replaceAll(LEADING_CAPITAL, match => toLowerCase(match));\n};\n\nconst postProcess = (input, toUpperCase) => {\n\tSEPARATORS_AND_IDENTIFIER.lastIndex = 0;\n\tNUMBERS_AND_IDENTIFIER.lastIndex = 0;\n\n\treturn input\n\t\t.replaceAll(NUMBERS_AND_IDENTIFIER, (match, pattern, offset) => ['_', '-'].includes(input.charAt(offset + match.length)) ? match : toUpperCase(match))\n\t\t.replaceAll(SEPARATORS_AND_IDENTIFIER, (_, identifier) => toUpperCase(identifier));\n};\n\nexport default function camelCase(input, options) {\n\tif (!(typeof input === 'string' || Array.isArray(input))) {\n\t\tthrow new TypeError('Expected the input to be `string | string[]`');\n\t}\n\n\toptions = {\n\t\tpascalCase: false,\n\t\tpreserveConsecutiveUppercase: false,\n\t\t...options,\n\t};\n\n\tif (Array.isArray(input)) {\n\t\tinput = input.map(x => x.trim())\n\t\t\t.filter(x => x.length)\n\t\t\t.join('-');\n\t} else {\n\t\tinput = input.trim();\n\t}\n\n\tif (input.length === 0) {\n\t\treturn '';\n\t}\n\n\tconst toLowerCase = options.locale === false\n\t\t? string => string.toLowerCase()\n\t\t: string => string.toLocaleLowerCase(options.locale);\n\n\tconst toUpperCase = options.locale === false\n\t\t? string => string.toUpperCase()\n\t\t: string => string.toLocaleUpperCase(options.locale);\n\n\tif (input.length === 1) {\n\t\tif (SEPARATORS.test(input)) {\n\t\t\treturn '';\n\t\t}\n\n\t\treturn options.pascalCase ? toUpperCase(input) : toLowerCase(input);\n\t}\n\n\tconst hasUpperCase = input !== toLowerCase(input);\n\n\tif (hasUpperCase) {\n\t\tinput = preserveCamelCase(input, toLowerCase, toUpperCase, options.preserveConsecutiveUppercase);\n\t}\n\n\tinput = input.replace(LEADING_SEPARATORS, '');\n\tinput = options.preserveConsecutiveUppercase ? preserveConsecutiveUppercase(input, toLowerCase) : toLowerCase(input);\n\n\tif (options.pascalCase) {\n\t\tinput = toUpperCase(input.charAt(0)) + input.slice(1);\n\t}\n\n\treturn postProcess(input, toUpperCase);\n}\n","import process from 'node:process';\nimport path from 'node:path';\nimport fs, {promises as fsPromises} from 'node:fs';\nimport {fileURLToPath} from 'node:url';\nimport pLocate from 'p-locate';\n\nconst typeMappings = {\n\tdirectory: 'isDirectory',\n\tfile: 'isFile',\n};\n\nfunction checkType(type) {\n\tif (Object.hasOwnProperty.call(typeMappings, type)) {\n\t\treturn;\n\t}\n\n\tthrow new Error(`Invalid type specified: ${type}`);\n}\n\nconst matchType = (type, stat) => stat[typeMappings[type]]();\n\nconst toPath = urlOrPath => urlOrPath instanceof URL ? fileURLToPath(urlOrPath) : urlOrPath;\n\nexport async function locatePath(\n\tpaths,\n\t{\n\t\tcwd = process.cwd(),\n\t\ttype = 'file',\n\t\tallowSymlinks = true,\n\t\tconcurrency,\n\t\tpreserveOrder,\n\t} = {},\n) {\n\tcheckType(type);\n\tcwd = toPath(cwd);\n\n\tconst statFunction = allowSymlinks ? fsPromises.stat : fsPromises.lstat;\n\n\treturn pLocate(paths, async path_ => {\n\t\ttry {\n\t\t\tconst stat = await statFunction(path.resolve(cwd, path_));\n\t\t\treturn matchType(type, stat);\n\t\t} catch {\n\t\t\treturn false;\n\t\t}\n\t}, {concurrency, preserveOrder});\n}\n\nexport function locatePathSync(\n\tpaths,\n\t{\n\t\tcwd = process.cwd(),\n\t\ttype = 'file',\n\t\tallowSymlinks = true,\n\t} = {},\n) {\n\tcheckType(type);\n\tcwd = toPath(cwd);\n\n\tconst statFunction = allowSymlinks ? fs.statSync : fs.lstatSync;\n\n\tfor (const path_ of paths) {\n\t\ttry {\n\t\t\tconst stat = statFunction(path.resolve(cwd, path_), {\n\t\t\t\tthrowIfNoEntry: false,\n\t\t\t});\n\n\t\t\tif (!stat) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (matchType(type, stat)) {\n\t\t\t\treturn path_;\n\t\t\t}\n\t\t} catch {}\n\t}\n}\n","import path from 'node:path';\nimport {fileURLToPath} from 'node:url';\nimport {locatePath, locatePathSync} from 'locate-path';\n\nconst toPath = urlOrPath => urlOrPath instanceof URL ? fileURLToPath(urlOrPath) : urlOrPath;\n\nexport const findUpStop = Symbol('findUpStop');\n\nexport async function findUpMultiple(name, options = {}) {\n\tlet directory = path.resolve(toPath(options.cwd) || '');\n\tconst {root} = path.parse(directory);\n\tconst stopAt = path.resolve(directory, options.stopAt || root);\n\tconst limit = options.limit || Number.POSITIVE_INFINITY;\n\tconst paths = [name].flat();\n\n\tconst runMatcher = async locateOptions => {\n\t\tif (typeof name !== 'function') {\n\t\t\treturn locatePath(paths, locateOptions);\n\t\t}\n\n\t\tconst foundPath = await name(locateOptions.cwd);\n\t\tif (typeof foundPath === 'string') {\n\t\t\treturn locatePath([foundPath], locateOptions);\n\t\t}\n\n\t\treturn foundPath;\n\t};\n\n\tconst matches = [];\n\t// eslint-disable-next-line no-constant-condition\n\twhile (true) {\n\t\t// eslint-disable-next-line no-await-in-loop\n\t\tconst foundPath = await runMatcher({...options, cwd: directory});\n\n\t\tif (foundPath === findUpStop) {\n\t\t\tbreak;\n\t\t}\n\n\t\tif (foundPath) {\n\t\t\tmatches.push(path.resolve(directory, foundPath));\n\t\t}\n\n\t\tif (directory === stopAt || matches.length >= limit) {\n\t\t\tbreak;\n\t\t}\n\n\t\tdirectory = path.dirname(directory);\n\t}\n\n\treturn matches;\n}\n\nexport function findUpMultipleSync(name, options = {}) {\n\tlet directory = path.resolve(toPath(options.cwd) || '');\n\tconst {root} = path.parse(directory);\n\tconst stopAt = options.stopAt || root;\n\tconst limit = options.limit || Number.POSITIVE_INFINITY;\n\tconst paths = [name].flat();\n\n\tconst runMatcher = locateOptions => {\n\t\tif (typeof name !== 'function') {\n\t\t\treturn locatePathSync(paths, locateOptions);\n\t\t}\n\n\t\tconst foundPath = name(locateOptions.cwd);\n\t\tif (typeof foundPath === 'string') {\n\t\t\treturn locatePathSync([foundPath], locateOptions);\n\t\t}\n\n\t\treturn foundPath;\n\t};\n\n\tconst matches = [];\n\t// eslint-disable-next-line no-constant-condition\n\twhile (true) {\n\t\tconst foundPath = runMatcher({...options, cwd: directory});\n\n\t\tif (foundPath === findUpStop) {\n\t\t\tbreak;\n\t\t}\n\n\t\tif (foundPath) {\n\t\t\tmatches.push(path.resolve(directory, foundPath));\n\t\t}\n\n\t\tif (directory === stopAt || matches.length >= limit) {\n\t\t\tbreak;\n\t\t}\n\n\t\tdirectory = path.dirname(directory);\n\t}\n\n\treturn matches;\n}\n\nexport async function findUp(name, options = {}) {\n\tconst matches = await findUpMultiple(name, {...options, limit: 1});\n\treturn matches[0];\n}\n\nexport function findUpSync(name, options = {}) {\n\tconst matches = findUpMultipleSync(name, {...options, limit: 1});\n\treturn matches[0];\n}\n\nexport {\n\tpathExists,\n\tpathExistsSync,\n} from 'path-exists';\n","import type {\n\tFieldReturnTypes,\n\tFields,\n\tSchemaFieldTypes,\n\tSchemaType,\n\tSchemaTypeWithComponentProp,\n} from \"./types\";\nimport type { Schema } from \"../..\";\nimport type { UITemplateFields } from \"../../types/schema-fields/ui-template-fields\";\nimport type { AutoTypesConfig } from \"../../types/schemas/AutoTypes\";\n\nimport path from \"path\";\n\nimport camelcase from \"camelcase\";\nimport { packageDirectorySync } from \"pkg-dir\";\n\nimport { INTERFACE_SUFFIX } from \"./constants\";\n\n/** Get all fields from one schema */\nfunction getAllFields(schema: SchemaType) {\n\t// ContentType\n\t// Simple, Page\n\tif (\"fromPage\" in schema) {\n\t\t// AutoTypes doesn't generate types from categories\n\t\tif (!schema.taxonomy) {\n\t\t\treturn schema.schema.fields;\n\t\t}\n\t\t// hack???\n\t\treturn [];\n\t}\n\n\t// Templates\n\tif (schema.schemaType === \"template\") {\n\t\tconst content = (schema.content as Array<UITemplateFields>) || [];\n\t\tconst config = (schema.config as Array<UITemplateFields>) || [];\n\t\treturn [...content, ...config];\n\t}\n\n\t// Objects, components and modules\n\tif (schema.schemaType === \"component\" || schema.schemaType === \"module\") {\n\t\treturn schema.configTabs.flatMap((tab) => tab.fields);\n\t}\n\n\tthrow new Error(`Wrong schema ${JSON.stringify(schema, null, 2)}`);\n}\n\n/** Build a interface prop based on the field from the schema.\n * Optionally it can receives a custom value for the type and a generic string to use as generic value\n *\n * @example\n * getInterfacePropType(TextFieldObjectFromSchema)\n * // -> TextFieldObjectFromSchema.key: Fields.TextField\n * getInterfacePropType(TextFieldObjectFromSchema, 'MyCustomValue', 'foo')\n * // -> TextFieldObjectFromSchema.key: MyCustomValue<foo>\n */\ntype GetInterfacePropTypeOptions = {\n\treturnTypeName?: FieldReturnTypes;\n\tgeneric?: string;\n};\n\n/**\n * Return a serialized type from a Griddo schema field.\n *\n * @param Fields A Griddo field object\n * @param options An options object\n * @returns A string that represent a interface prop type.\n * @example\n * interface SomeInterface {\n * \tprop: boolean; // this function returns a string for this: `prop: boolean`\n * }\n */\nfunction getInterfacePropType(\n\tfield: Fields,\n\toptions?: GetInterfacePropTypeOptions,\n) {\n\tconst { returnTypeName, generic } = options || {};\n\n\t// The field has `hideable: true`\n\tconst hasHideable = \"hideable\" in field ? Boolean(field.hideable) : false;\n\t// Generic part\n\tconst genericStr = generic ? `<${generic}>` : \"\";\n\t// The field type is from field.type prop or custom\n\tconst returnTypeNameStr = returnTypeName || returnType(field.type);\n\t// Field type with generic: field<generic>\n\tconst returnTypeNameWithGeneriStr = `${returnTypeNameStr}${genericStr}`;\n\t// Field type wrapped in Hideable helper type: Hideable<field<generic>>\n\tconst typeWrappedWithHideable = hasHideable\n\t\t? `Hideable<${returnTypeNameWithGeneriStr}>`\n\t\t: `${returnTypeNameWithGeneriStr}`;\n\n\t// JSDoc\n\tconst jsDocString = field._autoType?.doc || \"\";\n\t// prop?: Type\n\tconst typeString = `${field.key}?: ${typeWrappedWithHideable}`;\n\n\treturn `\n\t\t${jsDocString}\n\t\t${typeString}\n\t`;\n}\n\n/**\n * Return a string separated by the pipe char \"|\" using the `value` from object array.\n */\nfunction getGenericFromOptions<T = unknown>(options: Array<{ value: T }>) {\n\treturn options\n\t\t.map(({ value }) => (typeof value === \"string\" ? `\"${value}\"` : value))\n\t\t.join(\"|\");\n}\n\n/**\n * Return a string separated by the pipe char \"|\" using the `name` from object array.\n */\nfunction getGenericFromCheckBoxOptions<T>(options: Array<{ name: T }>) {\n\treturn options\n\t\t.map(({ name }) => (typeof name === \"string\" ? `\"${name}\"` : name))\n\t\t.join(\"|\");\n}\n\n// for components containers\n// whitelist.length = 1\n// whitelist.length > 1\nfunction getGenericFromWhitelist(\n\twhiteList: Array<string>,\n\tconfig?: AutoTypesConfig,\n) {\n\t// Config\n\tconst interfaceSuffix = config?.interfaceSuffix || INTERFACE_SUFFIX;\n\n\tif (whiteList.length > 1) {\n\t\treturn `{\n\t\t\t${whiteList\n\t\t\t\t.map((whiteListItem) => {\n\t\t\t\t\treturn `${camelcase(\n\t\t\t\t\t\twhiteListItem,\n\t\t\t\t\t)}?: ${whiteListItem}${interfaceSuffix}`;\n\t\t\t\t})\n\t\t\t\t.join(\",\")}\n\t\t\t}`;\n\t}\n\n\t// Si solo hay un elemento\n\treturn whiteList.map((item) => `${item}${interfaceSuffix}`).join(\"\");\n}\n\n/**\n * Convert an object of schemas into an array of objects of these schemas.\n *\n * @example\n * input:\n * `schemas` is an object of schemas like so:\n *\t{\n *\t\tBasicContent: {\n *\t\t\tcomponent: \"BasicContent\",\n *\t\t\t...\n *\t\t},\n *\t\t...\n *\t}\n *\n * output:\n * [ {component: \"BasicContent\"}, {component: \"NewsTemplate\"}, ... ]\n */\nfunction schemasToArray(\n\tobjectSchemas: Record<string, SchemaType>,\n): Array<SchemaTypeWithComponentProp> {\n\treturn (Object.keys(objectSchemas) as Array<Capitalize<string>>).map(\n\t\t(componentName) => ({\n\t\t\t// This component prop is for the ContentType schemas,\n\t\t\t// ui schemas have already one.\n\t\t\t...objectSchemas[componentName],\n\t\t\tcomponent: componentName,\n\t\t}),\n\t);\n}\n\nfunction returnType(type: SchemaFieldTypes) {\n\tconst typeObj: Record<SchemaFieldTypes, FieldReturnTypes> = {\n\t\tArrayFieldGroup: \"Fields.ArrayFieldGroup\",\n\t\tAsyncCheckGroup: \"Fields.AsyncCheckGroup\",\n\t\tAsyncSelect: \"Fields.AsyncSelect\",\n\t\tCheckGroup: \"Fields.CheckGroup\",\n\t\tColorPicker: \"Fields.ColorPicker\",\n\t\tComponentArray: \"Fields.ComponentArray\",\n\t\tComponentContainer: \"Fields.ComponentContainer\",\n\t\tConditionalField: \"Fields.Conditional\",\n\t\tDateField: \"Fields.Date\",\n\t\tFieldGroup: \"Fields.FieldGroup\",\n\t\tFieldsDivider: \"Fields.FieldsDivider\",\n\t\tFileField: \"Fields.File\",\n\t\tHeadingField: \"Fields.Heading\",\n\t\tImageField: \"Fields.Image\",\n\t\tLinkField: \"Fields.Link\",\n\t\tMultiCheckSelect: \"Fields.MultiCheckSelect\",\n\t\tMultiCheckSelectGroup: \"Fields.MultiCheckSelectGroup\",\n\t\tNoteField: \"Fields.Note\",\n\t\tNumberField: \"Fields.Number\",\n\t\tRadioGroup: \"Fields.RadioGroup\",\n\t\tReferenceField: \"Fields.Reference\",\n\t\tRichText: \"Fields.RichText\",\n\t\tSelect: \"Fields.Select\",\n\t\tSliderField: \"Fields.Slider\",\n\t\tTagsField: \"Fields.Tags\",\n\t\tTextArea: \"Fields.TextArea\",\n\t\tTextField: \"Fields.Text\",\n\t\tTimeField: \"Fields.Time\",\n\t\tToggleField: \"Fields.Toggle\",\n\t\tUniqueCheck: \"Fields.UniqueCheck\",\n\t\tUrlField: \"Fields.Url\",\n\t\tVisualUniqueSelection: \"Fields.VisualUniqueSelection\",\n\t\tWysiwyg: \"Fields.Wysiwyg\",\n\t};\n\treturn typeObj[type];\n}\n\nfunction extendsType(types: Array<string>) {\n\treturn types.filter((typeStr) => typeStr.length).length < 1\n\t\t? \"\"\n\t\t: `extends ${types.join(\", \")}`;\n}\n\nfunction getPageContentTypesUnionType(\n\tschemas: Array<SchemaTypeWithComponentProp>,\n) {\n\treturn schemas\n\t\t.map((schema) => {\n\t\t\tif (\"fromPage\" in schema && schema.fromPage) {\n\t\t\t\treturn `${schema.component || \"\"}ContentTypeProps`;\n\t\t\t}\n\t\t\treturn undefined;\n\t\t})\n\t\t.filter(Boolean)\n\t\t.join(\"|\");\n}\n\nfunction getSimpleContentTypeUnionProps(\n\tschemas: Array<SchemaTypeWithComponentProp>,\n) {\n\treturn schemas\n\t\t.map((schema) => {\n\t\t\tif (\"fromPage\" in schema && !schema.fromPage && !schema.taxonomy) {\n\t\t\t\treturn `${schema.component || \"\"}ContentTypeProps`;\n\t\t\t}\n\t\t\treturn undefined;\n\t\t})\n\t\t.filter(Boolean)\n\t\t.join(\"|\");\n}\n\nfunction getTaxonomyContentTypesUnionType(\n\tschemas: Array<SchemaTypeWithComponentProp>,\n) {\n\treturn schemas\n\t\t.map((schema) => {\n\t\t\tif (\"taxonomy\" in schema && schema.taxonomy) {\n\t\t\t\treturn `${schema.component || \"\"}ContentTypeProps`;\n\t\t\t}\n\t\t\treturn undefined;\n\t\t})\n\t\t.filter(Boolean)\n\t\t.join(\"|\");\n}\n\n/**\n * Get union types for components, modules and tempaltes like so:\n *\n * @example\n * type Components = \"ComponentA\" | \"ComponentB\"\n * type Modules = \"ModuleA\" | \"ModuleB\"\n * type Templates = \"TemplateA\" | \"TemplateB\"\n */\nfunction getElementsUnionType(schemas: Array<SchemaType>) {\n\tconst unionOfComponents = [];\n\tconst unionOfModules = [];\n\tconst unionOfTemplates = [];\n\tconst detailTemplates = [];\n\tfor (let length = schemas.length, i = 0; i < length; ++i) {\n\t\tconst schema = schemas[i];\n\t\t// `in` to narrow only schemas with `component` prop\n\t\tif (\"component\" in schema) {\n\t\t\tconst componentName = schema.component;\n\t\t\tif (schema.schemaType === \"component\") {\n\t\t\t\tunionOfComponents.push(`\"${componentName}\"`);\n\t\t\t}\n\t\t\tif (schema.schemaType === \"module\") {\n\t\t\t\tunionOfModules.push(`\"${componentName}\"`);\n\t\t\t}\n\t\t\tif (schema.schemaType === \"template\") {\n\t\t\t\tunionOfTemplates.push(`\"${componentName}\"`);\n\t\t\t\tif (schema.type.mode === \"detail\") {\n\t\t\t\t\tdetailTemplates.push(`\"${componentName}\"`);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tconst ComponentsUnion = `\n\t\texport type Components =\n\t\t\t${unionOfComponents.join(\"|\")}\n\t`;\n\n\tconst ModulesUnion = `\n\t\texport type Modules =\n\t\t\t${unionOfModules.join(\"|\")}\n\t`;\n\n\tconst TemplatesUnion = `\n\t\texport type Templates =\n\t\t\t${unionOfTemplates.join(\"|\")}\n\t`;\n\n\tconst DetailTemplatesUnion = `\n\t\texport type DetailTemplates =\n\t\t\t${detailTemplates.join(\"|\")}\n\t`;\n\n\treturn `\n\t\t${ComponentsUnion}\n\t\t${ModulesUnion}\n\t\t${TemplatesUnion}\n\t\t${DetailTemplatesUnion}\n\t`;\n}\n\n/**\n * Lista de templates y sus secciones\n * Esto es algo que se usa en los schemas de Griddo. Es como el inverso a un\n * whitelist donde indicamos en qué secciones de qué templates puede\n * aparecer un módulo.\n */\nfunction getSectionList(schemas: Array<SchemaType>) {\n\tconst names = schemas\n\t\t.filter((schema) => {\n\t\t\tif (\"schemaType\" in schema) {\n\t\t\t\treturn schema.schemaType === \"template\";\n\t\t\t}\n\t\t\treturn false;\n\t\t})\n\t\t.map((schema) => {\n\t\t\tconst templateSchema = schema as Schema.Template;\n\t\t\tconst sectionNames = templateSchema.content\n\t\t\t\t.filter((field) => field.type === \"ComponentArray\")\n\t\t\t\t.map(({ key }) => `\"${key}\"`)\n\t\t\t\t.filter(Boolean);\n\t\t\treturn sectionNames && sectionNames?.length > 0\n\t\t\t\t? `${templateSchema.component}?: NonEmptyArray<${sectionNames.join(\n\t\t\t\t\t\t\"|\",\n\t\t\t\t\t)}>;`\n\t\t\t\t: \"\";\n\t\t})\n\t\t.join(\"\");\n\n\treturn `export type SectionList = { ${names} }`;\n}\n\nconst IS_COMPONENT_LIBRARY = __dirname.includes(\"node_modules\");\n\n/**\n * Returns the instance or monorepo paths.\n *\n * @param customPath The path for the instance components\n */\nfunction resolveComponentsPath() {\n\tconst cwd = __dirname;\n\tconst componentsPath = IS_COMPONENT_LIBRARY\n\t\t? \"../../../\"\n\t\t: \"../griddo-components\";\n\n\treturn path.resolve(packageDirectorySync({ cwd }), componentsPath);\n}\n\nexport {\n\textendsType,\n\tgetAllFields,\n\tgetElementsUnionType,\n\tgetGenericFromCheckBoxOptions,\n\tgetGenericFromOptions,\n\tgetGenericFromWhitelist,\n\tgetInterfacePropType,\n\tgetPageContentTypesUnionType,\n\tgetSectionList,\n\tgetSimpleContentTypeUnionProps,\n\tgetTaxonomyContentTypesUnionType,\n\tresolveComponentsPath,\n\treturnType,\n\tschemasToArray,\n};\n","import { execSync } from \"child_process\";\nimport fs from \"node:fs\";\nimport path from \"node:path\";\n\nimport camelCase from \"camelcase\";\nimport prettier from \"prettier\";\n\nimport { resolveComponentsPath } from \"../autotypes/utils\";\n\nconst args = process.argv.splice(2);\n\nif (args.length !== 1) {\n\tconsole.error(\"No arguments provided or too many arguments.\");\n\tprocess.exit(1);\n}\n\nconst SVG_SRC = args[0];\nconst SVG_DEST = `${path.dirname(SVG_SRC)}/.svgs`;\nconst SVGO_BIN = \"./node_modules/.bin/svgo\";\nconst SVG_CONFIG = path.join(resolveComponentsPath(), \"svgo.config.js\");\nconst HAS_CONFIG_FILE = fs.existsSync(SVG_CONFIG);\nconst USE_CONFIG_FILE = HAS_CONFIG_FILE ? `--config ${SVG_CONFIG}` : \"\";\n\nif (!HAS_CONFIG_FILE) {\n\tconsole.warn(`\\nsvgo.config.js file not found. Continuing without it.\nYou can create a svgo.config.js file in the root of the project with the\nfollowing content to start:`);\n\n\tconsole.log(`\n/** @type {import(\"svgo\").Config} */\nmodule.exports = {\n plugins: [\n {\n name: \"preset-default\",\n params: {\n overrides: {\n cleanupIds: false,\n removeTitle: false,\n removeDesc: false,\n },\n },\n },\n \"removeDimensions\",\n \"removeXMLNS\",\n ],\n};\n`);\n}\n\n// check if the src path exists\nif (!fs.existsSync(SVG_SRC)) {\n\tconsole.error(\"Source path does not exist.\");\n\tprocess.exit(1);\n}\n\nconst walk = (dir: string) => {\n\tlet results: Array<string> = [];\n\tconst list = fs.readdirSync(dir);\n\tlist.forEach((file) => {\n\t\tconst newLocalFile = `${dir}/${file}`;\n\t\tconst stat = fs.statSync(newLocalFile);\n\t\tif (stat && stat.isDirectory()) {\n\t\t\tresults = results.concat(walk(newLocalFile));\n\t\t} else {\n\t\t\tresults.push(newLocalFile);\n\t\t}\n\t});\n\treturn results;\n};\n\nconst isSvgFile = (file: string) => path.extname(file) === \".svg\";\nconst relativePath = (file: string) => path.relative(SVG_SRC, file);\nconst baseName = (file: string) => path.basename(file, path.extname(file));\n\nconst svgs = walk(SVG_SRC).filter(isSvgFile);\nconst svgsRelativePath = svgs.map(relativePath);\nconst svgsBaseName = svgs.map(baseName);\nconst svgsCamelCase = svgsBaseName.map((name) => camelCase(name));\n\nasync function main() {\n\t// Get prettier options from config file\n\tconst prettierOptions = await prettier.resolveConfig(\".prettierrc.json\");\n\n\texecSync(\n\t\t`${SVGO_BIN} -q -r ${USE_CONFIG_FILE} --folder ${SVG_SRC} --output ${SVG_DEST}`,\n\t);\n\n\tconst imports = `${svgsCamelCase\n\t\t.map(\n\t\t\t(svg, idx) =>\n\t\t\t\t`const ${svg} = React.lazy(() => import('./${svgsRelativePath[idx]}'))`,\n\t\t)\n\t\t.join(\";\")}`;\n\n\tconst exports = `export {\n\t${svgsCamelCase.map((svg) => `${svg}`).join(\",\")}\n}`;\n\n\tconst indexFile = `import * as React from 'react'\n\n${imports}\n\n${exports}\n`;\n\n\t// .svg folder\n\tif (!fs.existsSync(SVG_DEST)) {\n\t\tfs.mkdirSync(SVG_DEST);\n\t}\n\n\tfs.writeFile(\n\t\t`${SVG_DEST}/index.tsx`,\n\t\tawait prettier.format(indexFile, {\n\t\t\t...prettierOptions,\n\t\t\tparser: \"typescript\",\n\t\t}),\n\t\t(err) => {\n\t\t\tif (err) {\n\t\t\t\tthrow err;\n\t\t\t}\n\t\t},\n\t);\n\n\t// eslint-disable-next-line no-console\n\tconsole.log(\"🦄 Icons ✓\");\n}\n\nmain();\n","import path from 'node:path';\nimport {findUp, findUpSync} from 'find-up';\n\nexport async function packageDirectory({cwd} = {}) {\n\tconst filePath = await findUp('package.json', {cwd});\n\treturn filePath && path.dirname(filePath);\n}\n\nexport function packageDirectorySync({cwd} = {}) {\n\tconst filePath = findUpSync('package.json', {cwd});\n\treturn filePath && path.dirname(filePath);\n}\n"],"names":["__awaiter","thisArg","_arguments","P","generator","Promise","resolve","reject","fulfilled","value","step","next","e","rejected","result","done","then","apply","UPPERCASE","LOWERCASE","LEADING_CAPITAL","IDENTIFIER","SEPARATORS","LEADING_SEPARATORS","RegExp","source","SEPARATORS_AND_IDENTIFIER","NUMBERS_AND_IDENTIFIER","preserveCamelCase","string","toLowerCase","toUpperCase","preserveConsecutiveUppercase","isLastCharLower","isLastCharUpper","isLastLastCharUpper","isLastLastCharPreserved","index","length","character","test","slice","input","lastIndex","replaceAll","match","postProcess","pattern","offset","includes","charAt","_","identifier","typeMappings","directory","file","matchType","type","stat","toPath","urlOrPath","URL","fileURLToPath","locatePathSync","paths","cwd","process","allowSymlinks","Object","hasOwnProperty","call","Error","checkType","statFunction","fs","statSync","lstatSync","path_","path","throwIfNoEntry","findUpStop","Symbol","findUpSync","name","options","matches","root","parse","stopAt","limit","Number","POSITIVE_INFINITY","flat","runMatcher","locateOptions","foundPath","push","dirname","findUpMultipleSync","IS_COMPONENT_LIBRARY","__dirname","args","argv","splice","console","error","exit","SVG_SRC","SVG_DEST","SVGO_BIN","SVG_CONFIG","join","componentsPath","filePath","packageDirectorySync","resolveComponentsPath","HAS_CONFIG_FILE","existsSync","USE_CONFIG_FILE","warn","log","walk","dir","results","readdirSync","forEach","newLocalFile","isDirectory","concat","svgs","filter","extname","svgsRelativePath","map","relative","svgsCamelCase","basename","Array","isArray","TypeError","pascalCase","x","trim","locale","toLocaleLowerCase","toLocaleUpperCase","replace","camelCase","prettierOptions","prettier","resolveConfig","execSync","indexFile","svg","idx","mkdirSync","writeFile","format","assign","parser","err","main"],"mappings":"0MAkHO,SAASA,EAAUC,EAASC,EAAYC,EAAGC,GAE9C,OAAO,IAAK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A,EAAOmH,kBAAkB5D,EAAQ2D,QAExChH,GAAiC,IAAnBqD,EAAQ2D,OACzBlH,GAAUA,EAAOE,cACjBF,GAAUA,EAAOoH,kBAAkB7D,EAAQ2D,QAE9C,OAAqB,IAAjBrG,EAAMJ,OACLhB,EAAWkB,KAAKE,GACZ,GAGD0C,EAAQwD,WAAa7G,EAAYW,GAASZ,EAAYY,IAGzCA,IAAUZ,EAAYY,KAG1CA,EAAQd,EAAkBc,EAAOZ,EAAaC,EAAaqD,EAAQpD,+BAGpEU,EAAQA,EAAMwG,QAAQ3H,EAAoB,IAC1CmB,EAAQ0C,EAAQpD,6BAA+BA,EAA6BU,EAAOZ,GAAeA,EAAYY,GAE1G0C,EAAQwD,aACXlG,EAAQX,EAAYW,EAAMQ,OAAO,IAAMR,EAAMD,MAAM,IAG7CK,EAAYJ,EAAOX,GAC3B,CIhCiDoH,CAAUhE,MAE3D,6CAEC,MAAMiE,QAAwBC,EAASC,cAAc,oBAErDC,EACC,GAAG1C,WAAkBS,cAA4BX,cAAoBC,KAGtE,MAWM4C,EAAY,qCAXF,GAAGjB,EACjBF,KACA,CAACoB,EAAKC,IACL,SAASD,kCAAoCrB,EAAiBsB,UAE/D3C,KAAK,aAES,eACdwB,EAAcF,KAAKoB,GAAQ,GAAGA,MAAO1C,KAAK,cAWvCrC,EAAG2C,WAAWT,IAClBlC,EAAGiF,UAAU/C,GAGdlC,EAAGkF,UACF,GAAGhD,oBACGyC,EAASQ,OAAOL,EAClBpF,OAAA0F,OAAA1F,OAAA0F,OAAA,CAAA,EAAAV,GACH,CAAAW,OAAQ,iBAERC,IACA,GAAIA,EACH,MAAMA,CACN,IAKHxD,QAAQgB,IAAI,gBACZ,CAEDyC","x_google_ignoreList":[0,1,2,3,6]}
|
|
1
|
+
{"version":3,"file":"react-svg-library.js","sources":["../../../node_modules/tslib/tslib.es6.js","../node_modules/camelcase/index.js","../node_modules/locate-path/index.js","../node_modules/find-up/index.js","../src/functions/react-svg-library/utils.ts","../src/functions/react-svg-library/index.ts","../node_modules/pkg-dir/index.js"],"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 */\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.push(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.push(_);\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;\r\n return g = { next: verb(0), \"throw\": verb(1), \"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 = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\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\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\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","const UPPERCASE = /[\\p{Lu}]/u;\nconst LOWERCASE = /[\\p{Ll}]/u;\nconst LEADING_CAPITAL = /^[\\p{Lu}](?![\\p{Lu}])/gu;\nconst IDENTIFIER = /([\\p{Alpha}\\p{N}_]|$)/u;\nconst SEPARATORS = /[_.\\- ]+/;\n\nconst LEADING_SEPARATORS = new RegExp('^' + SEPARATORS.source);\nconst SEPARATORS_AND_IDENTIFIER = new RegExp(SEPARATORS.source + IDENTIFIER.source, 'gu');\nconst NUMBERS_AND_IDENTIFIER = new RegExp('\\\\d+' + IDENTIFIER.source, 'gu');\n\nconst preserveCamelCase = (string, toLowerCase, toUpperCase, preserveConsecutiveUppercase) => {\n\tlet isLastCharLower = false;\n\tlet isLastCharUpper = false;\n\tlet isLastLastCharUpper = false;\n\tlet isLastLastCharPreserved = false;\n\n\tfor (let index = 0; index < string.length; index++) {\n\t\tconst character = string[index];\n\t\tisLastLastCharPreserved = index > 2 ? string[index - 3] === '-' : true;\n\n\t\tif (isLastCharLower && UPPERCASE.test(character)) {\n\t\t\tstring = string.slice(0, index) + '-' + string.slice(index);\n\t\t\tisLastCharLower = false;\n\t\t\tisLastLastCharUpper = isLastCharUpper;\n\t\t\tisLastCharUpper = true;\n\t\t\tindex++;\n\t\t} else if (isLastCharUpper && isLastLastCharUpper && LOWERCASE.test(character) && (!isLastLastCharPreserved || preserveConsecutiveUppercase)) {\n\t\t\tstring = string.slice(0, index - 1) + '-' + string.slice(index - 1);\n\t\t\tisLastLastCharUpper = isLastCharUpper;\n\t\t\tisLastCharUpper = false;\n\t\t\tisLastCharLower = true;\n\t\t} else {\n\t\t\tisLastCharLower = toLowerCase(character) === character && toUpperCase(character) !== character;\n\t\t\tisLastLastCharUpper = isLastCharUpper;\n\t\t\tisLastCharUpper = toUpperCase(character) === character && toLowerCase(character) !== character;\n\t\t}\n\t}\n\n\treturn string;\n};\n\nconst preserveConsecutiveUppercase = (input, toLowerCase) => {\n\tLEADING_CAPITAL.lastIndex = 0;\n\n\treturn input.replaceAll(LEADING_CAPITAL, match => toLowerCase(match));\n};\n\nconst postProcess = (input, toUpperCase) => {\n\tSEPARATORS_AND_IDENTIFIER.lastIndex = 0;\n\tNUMBERS_AND_IDENTIFIER.lastIndex = 0;\n\n\treturn input\n\t\t.replaceAll(NUMBERS_AND_IDENTIFIER, (match, pattern, offset) => ['_', '-'].includes(input.charAt(offset + match.length)) ? match : toUpperCase(match))\n\t\t.replaceAll(SEPARATORS_AND_IDENTIFIER, (_, identifier) => toUpperCase(identifier));\n};\n\nexport default function camelCase(input, options) {\n\tif (!(typeof input === 'string' || Array.isArray(input))) {\n\t\tthrow new TypeError('Expected the input to be `string | string[]`');\n\t}\n\n\toptions = {\n\t\tpascalCase: false,\n\t\tpreserveConsecutiveUppercase: false,\n\t\t...options,\n\t};\n\n\tif (Array.isArray(input)) {\n\t\tinput = input.map(x => x.trim())\n\t\t\t.filter(x => x.length)\n\t\t\t.join('-');\n\t} else {\n\t\tinput = input.trim();\n\t}\n\n\tif (input.length === 0) {\n\t\treturn '';\n\t}\n\n\tconst toLowerCase = options.locale === false\n\t\t? string => string.toLowerCase()\n\t\t: string => string.toLocaleLowerCase(options.locale);\n\n\tconst toUpperCase = options.locale === false\n\t\t? string => string.toUpperCase()\n\t\t: string => string.toLocaleUpperCase(options.locale);\n\n\tif (input.length === 1) {\n\t\tif (SEPARATORS.test(input)) {\n\t\t\treturn '';\n\t\t}\n\n\t\treturn options.pascalCase ? toUpperCase(input) : toLowerCase(input);\n\t}\n\n\tconst hasUpperCase = input !== toLowerCase(input);\n\n\tif (hasUpperCase) {\n\t\tinput = preserveCamelCase(input, toLowerCase, toUpperCase, options.preserveConsecutiveUppercase);\n\t}\n\n\tinput = input.replace(LEADING_SEPARATORS, '');\n\tinput = options.preserveConsecutiveUppercase ? preserveConsecutiveUppercase(input, toLowerCase) : toLowerCase(input);\n\n\tif (options.pascalCase) {\n\t\tinput = toUpperCase(input.charAt(0)) + input.slice(1);\n\t}\n\n\treturn postProcess(input, toUpperCase);\n}\n","import process from 'node:process';\nimport path from 'node:path';\nimport fs, {promises as fsPromises} from 'node:fs';\nimport {fileURLToPath} from 'node:url';\nimport pLocate from 'p-locate';\n\nconst typeMappings = {\n\tdirectory: 'isDirectory',\n\tfile: 'isFile',\n};\n\nfunction checkType(type) {\n\tif (Object.hasOwnProperty.call(typeMappings, type)) {\n\t\treturn;\n\t}\n\n\tthrow new Error(`Invalid type specified: ${type}`);\n}\n\nconst matchType = (type, stat) => stat[typeMappings[type]]();\n\nconst toPath = urlOrPath => urlOrPath instanceof URL ? fileURLToPath(urlOrPath) : urlOrPath;\n\nexport async function locatePath(\n\tpaths,\n\t{\n\t\tcwd = process.cwd(),\n\t\ttype = 'file',\n\t\tallowSymlinks = true,\n\t\tconcurrency,\n\t\tpreserveOrder,\n\t} = {},\n) {\n\tcheckType(type);\n\tcwd = toPath(cwd);\n\n\tconst statFunction = allowSymlinks ? fsPromises.stat : fsPromises.lstat;\n\n\treturn pLocate(paths, async path_ => {\n\t\ttry {\n\t\t\tconst stat = await statFunction(path.resolve(cwd, path_));\n\t\t\treturn matchType(type, stat);\n\t\t} catch {\n\t\t\treturn false;\n\t\t}\n\t}, {concurrency, preserveOrder});\n}\n\nexport function locatePathSync(\n\tpaths,\n\t{\n\t\tcwd = process.cwd(),\n\t\ttype = 'file',\n\t\tallowSymlinks = true,\n\t} = {},\n) {\n\tcheckType(type);\n\tcwd = toPath(cwd);\n\n\tconst statFunction = allowSymlinks ? fs.statSync : fs.lstatSync;\n\n\tfor (const path_ of paths) {\n\t\ttry {\n\t\t\tconst stat = statFunction(path.resolve(cwd, path_), {\n\t\t\t\tthrowIfNoEntry: false,\n\t\t\t});\n\n\t\t\tif (!stat) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (matchType(type, stat)) {\n\t\t\t\treturn path_;\n\t\t\t}\n\t\t} catch {}\n\t}\n}\n","import path from 'node:path';\nimport {fileURLToPath} from 'node:url';\nimport {locatePath, locatePathSync} from 'locate-path';\n\nconst toPath = urlOrPath => urlOrPath instanceof URL ? fileURLToPath(urlOrPath) : urlOrPath;\n\nexport const findUpStop = Symbol('findUpStop');\n\nexport async function findUpMultiple(name, options = {}) {\n\tlet directory = path.resolve(toPath(options.cwd) || '');\n\tconst {root} = path.parse(directory);\n\tconst stopAt = path.resolve(directory, options.stopAt || root);\n\tconst limit = options.limit || Number.POSITIVE_INFINITY;\n\tconst paths = [name].flat();\n\n\tconst runMatcher = async locateOptions => {\n\t\tif (typeof name !== 'function') {\n\t\t\treturn locatePath(paths, locateOptions);\n\t\t}\n\n\t\tconst foundPath = await name(locateOptions.cwd);\n\t\tif (typeof foundPath === 'string') {\n\t\t\treturn locatePath([foundPath], locateOptions);\n\t\t}\n\n\t\treturn foundPath;\n\t};\n\n\tconst matches = [];\n\t// eslint-disable-next-line no-constant-condition\n\twhile (true) {\n\t\t// eslint-disable-next-line no-await-in-loop\n\t\tconst foundPath = await runMatcher({...options, cwd: directory});\n\n\t\tif (foundPath === findUpStop) {\n\t\t\tbreak;\n\t\t}\n\n\t\tif (foundPath) {\n\t\t\tmatches.push(path.resolve(directory, foundPath));\n\t\t}\n\n\t\tif (directory === stopAt || matches.length >= limit) {\n\t\t\tbreak;\n\t\t}\n\n\t\tdirectory = path.dirname(directory);\n\t}\n\n\treturn matches;\n}\n\nexport function findUpMultipleSync(name, options = {}) {\n\tlet directory = path.resolve(toPath(options.cwd) || '');\n\tconst {root} = path.parse(directory);\n\tconst stopAt = options.stopAt || root;\n\tconst limit = options.limit || Number.POSITIVE_INFINITY;\n\tconst paths = [name].flat();\n\n\tconst runMatcher = locateOptions => {\n\t\tif (typeof name !== 'function') {\n\t\t\treturn locatePathSync(paths, locateOptions);\n\t\t}\n\n\t\tconst foundPath = name(locateOptions.cwd);\n\t\tif (typeof foundPath === 'string') {\n\t\t\treturn locatePathSync([foundPath], locateOptions);\n\t\t}\n\n\t\treturn foundPath;\n\t};\n\n\tconst matches = [];\n\t// eslint-disable-next-line no-constant-condition\n\twhile (true) {\n\t\tconst foundPath = runMatcher({...options, cwd: directory});\n\n\t\tif (foundPath === findUpStop) {\n\t\t\tbreak;\n\t\t}\n\n\t\tif (foundPath) {\n\t\t\tmatches.push(path.resolve(directory, foundPath));\n\t\t}\n\n\t\tif (directory === stopAt || matches.length >= limit) {\n\t\t\tbreak;\n\t\t}\n\n\t\tdirectory = path.dirname(directory);\n\t}\n\n\treturn matches;\n}\n\nexport async function findUp(name, options = {}) {\n\tconst matches = await findUpMultiple(name, {...options, limit: 1});\n\treturn matches[0];\n}\n\nexport function findUpSync(name, options = {}) {\n\tconst matches = findUpMultipleSync(name, {...options, limit: 1});\n\treturn matches[0];\n}\n\nexport {\n\tpathExists,\n\tpathExistsSync,\n} from 'path-exists';\n","import path from \"path\";\n\nimport { packageDirectorySync } from \"pkg-dir\";\n\nconst IS_COMPONENT_LIBRARY = __dirname.includes(\"node_modules\");\n\n/**\n * Returns the instance or monorepo paths.\n */\nfunction resolveComponentsPath() {\n\tconst cwd = __dirname;\n\tconst componentsPath = IS_COMPONENT_LIBRARY\n\t\t? \"../../../\"\n\t\t: \"../griddo-components\";\n\n\treturn path.resolve(packageDirectorySync({ cwd }), componentsPath);\n}\n\nexport { resolveComponentsPath };\n","import { execSync } from \"child_process\";\nimport fs from \"node:fs\";\nimport path from \"node:path\";\n\nimport camelCase from \"camelcase\";\nimport prettier from \"prettier\";\n\nimport { resolveComponentsPath } from \"./utils\";\n\nconst args = process.argv.splice(2);\n\nif (args.length !== 1) {\n\tconsole.error(\"No arguments provided or too many arguments.\");\n\tprocess.exit(1);\n}\n\nconst SVG_SRC = args[0];\nconst SVG_DEST = `${path.dirname(SVG_SRC)}/.svgs`;\nconst SVGO_BIN = \"./node_modules/.bin/svgo\";\nconst SVG_CONFIG = path.join(resolveComponentsPath(), \"svgo.config.js\");\nconst HAS_CONFIG_FILE = fs.existsSync(SVG_CONFIG);\nconst USE_CONFIG_FILE = HAS_CONFIG_FILE ? `--config ${SVG_CONFIG}` : \"\";\n\nif (!HAS_CONFIG_FILE) {\n\tconsole.warn(`\\nsvgo.config.js file not found. Continuing without it.\nYou can create a svgo.config.js file in the root of the project with the\nfollowing content to start:`);\n\n\tconsole.log(`\n/** @type {import(\"svgo\").Config} */\nmodule.exports = {\n plugins: [\n {\n name: \"preset-default\",\n params: {\n overrides: {\n cleanupIds: false,\n removeTitle: false,\n removeDesc: false,\n },\n },\n },\n \"removeDimensions\",\n \"removeXMLNS\",\n ],\n};\n`);\n}\n\n// check if the src path exists\nif (!fs.existsSync(SVG_SRC)) {\n\tconsole.error(\"Source path does not exist.\");\n\tprocess.exit(1);\n}\n\nconst walk = (dir: string) => {\n\tlet results: Array<string> = [];\n\tconst list = fs.readdirSync(dir);\n\tlist.forEach((file) => {\n\t\tconst newLocalFile = `${dir}/${file}`;\n\t\tconst stat = fs.statSync(newLocalFile);\n\t\tif (stat && stat.isDirectory()) {\n\t\t\tresults = results.concat(walk(newLocalFile));\n\t\t} else {\n\t\t\tresults.push(newLocalFile);\n\t\t}\n\t});\n\treturn results;\n};\n\nconst isSvgFile = (file: string) => path.extname(file) === \".svg\";\nconst relativePath = (file: string) => path.relative(SVG_SRC, file);\nconst baseName = (file: string) => path.basename(file, path.extname(file));\n\nconst svgs = walk(SVG_SRC).filter(isSvgFile);\nconst svgsRelativePath = svgs.map(relativePath);\nconst svgsBaseName = svgs.map(baseName);\nconst svgsCamelCase = svgsBaseName.map((name) => camelCase(name));\n\nasync function main() {\n\t// Get prettier options from config file\n\tconst prettierOptions = await prettier.resolveConfig(\".prettierrc.json\");\n\n\texecSync(\n\t\t`${SVGO_BIN} -q -r ${USE_CONFIG_FILE} --folder ${SVG_SRC} --output ${SVG_DEST}`,\n\t);\n\n\tconst imports = `${svgsCamelCase\n\t\t.map(\n\t\t\t(svg, idx) =>\n\t\t\t\t`const ${svg} = React.lazy(() => import('./${svgsRelativePath[idx]}'))`,\n\t\t)\n\t\t.join(\";\")}`;\n\n\tconst exports = `export {\n\t${svgsCamelCase.map((svg) => `${svg}`).join(\",\")}\n}`;\n\n\tconst indexFile = `import * as React from 'react'\n\n${imports}\n\n${exports}\n`;\n\n\t// .svg folder\n\tif (!fs.existsSync(SVG_DEST)) {\n\t\tfs.mkdirSync(SVG_DEST);\n\t}\n\n\tfs.writeFile(\n\t\t`${SVG_DEST}/index.tsx`,\n\t\tawait prettier.format(indexFile, {\n\t\t\t...prettierOptions,\n\t\t\tparser: \"typescript\",\n\t\t}),\n\t\t(err) => {\n\t\t\tif (err) {\n\t\t\t\tthrow err;\n\t\t\t}\n\t\t},\n\t);\n\n\t// eslint-disable-next-line no-console\n\tconsole.log(\"🦄 Icons ✓\");\n}\n\nmain();\n","import path from 'node:path';\nimport {findUp, findUpSync} from 'find-up';\n\nexport async function packageDirectory({cwd} = {}) {\n\tconst filePath = await findUp('package.json', {cwd});\n\treturn filePath && path.dirname(filePath);\n}\n\nexport function packageDirectorySync({cwd} = {}) {\n\tconst filePath = findUpSync('package.json', {cwd});\n\treturn filePath && path.dirname(filePath);\n}\n"],"names":["__awaiter","thisArg","_arguments","P","generator","Promise","resolve","reject","fulfilled","value","step","next","e","rejected","result","done","then","apply","UPPERCASE","LOWERCASE","LEADING_CAPITAL","IDENTIFIER","SEPARATORS","LEADING_SEPARATORS","RegExp","source","SEPARATORS_AND_IDENTIFIER","NUMBERS_AND_IDENTIFIER","preserveCamelCase","string","toLowerCase","toUpperCase","preserveConsecutiveUppercase","isLastCharLower","isLastCharUpper","isLastLastCharUpper","isLastLastCharPreserved","index","length","character","test","slice","input","lastIndex","replaceAll","match","postProcess","pattern","offset","includes","charAt","_","identifier","typeMappings","directory","file","matchType","type","stat","toPath","urlOrPath","URL","fileURLToPath","locatePathSync","paths","cwd","process","allowSymlinks","Object","hasOwnProperty","call","Error","checkType","statFunction","fs","statSync","lstatSync","path_","path","throwIfNoEntry","findUpStop","Symbol","findUpSync","name","options","matches","root","parse","stopAt","limit","Number","POSITIVE_INFINITY","flat","runMatcher","locateOptions","foundPath","push","dirname","findUpMultipleSync","IS_COMPONENT_LIBRARY","__dirname","args","argv","splice","console","error","exit","SVG_SRC","SVG_DEST","SVGO_BIN","SVG_CONFIG","join","componentsPath","filePath","packageDirectorySync","resolveComponentsPath","HAS_CONFIG_FILE","existsSync","USE_CONFIG_FILE","warn","log","walk","dir","results","readdirSync","forEach","newLocalFile","isDirectory","concat","svgs","filter","extname","svgsRelativePath","map","relative","svgsCamelCase","basename","Array","isArray","TypeError","pascalCase","x","trim","locale","toLocaleLowerCase","toLocaleUpperCase","replace","camelCase","prettierOptions","prettier","resolveConfig","execSync","indexFile","svg","idx","mkdirSync","writeFile","format","assign","parser","err","main"],"mappings":"0MAkHO,SAASA,EAAUC,EAASC,EAAYC,EAAGC,GAE9C,OAAO,IAAKD,IAAMA,EAAIE,WAAU,SAAUC,EAASC,GAC/C,SAASC,EAAUC,GAAS,IAAMC,EAAKN,EAAUO,KAAKF,GAAU,CAAC,MAAOG,GAAKL,EAAOK,EAAI,CAAE,CAC1F,SAASC,EAASJ,GAAS,IAAMC,EAAKN,EAAiB,MAAEK,GAAU,CAAC,MAAOG,GAAKL,EAAOK,EAAI,CAAE,CAC7F,SAASF,EAAKI,GAJlB,IAAeL,EAIaK,EAAOC,KAAOT,EAAQQ,EAAOL,QAJ1CA,EAIyDK,EAAOL,MAJhDA,aAAiBN,EAAIM,EAAQ,IAAIN,GAAE,SAAUG,GAAWA,EAAQG,EAAQ,KAIjBO,KAAKR,EAAWK,EAAW,CAC7GH,GAAMN,EAAYA,EAAUa,MAAMhB,EAASC,GAAc,KAAKS,OAClE,GACJ,CC1HA,MAAMO,EAAY,YACZC,EAAY,YACZC,EAAkB,0BAClBC,EAAa,yBACbC,EAAa,WAEbC,EAAqB,IAAIC,OAAO,IAAMF,EAAWG,QACjDC,EAA4B,IAAIF,OAAOF,EAAWG,OAASJ,EAAWI,OAAQ,MAC9EE,EAAyB,IAAIH,OAAO,OAASH,EAAWI,OAAQ,MAEhEG,EAAoB,CAACC,EAAQC,EAAaC,EAAaC,KAC5D,IAAIC,GAAkB,EAClBC,GAAkB,EAClBC,GAAsB,EACtBC,GAA0B,EAE9B,IAAK,IAAIC,EA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dlC,EAAGkF,UACF,GAAGhD,oBACGyC,EAASQ,OAAOL,EAClBpF,OAAA0F,OAAA1F,OAAA0F,OAAA,CAAA,EAAAV,GACH,CAAAW,OAAQ,iBAERC,IACA,GAAIA,EACH,MAAMA,CACN,IAKHxD,QAAQgB,IAAI,gBACZ,CAEDyC","x_google_ignoreList":[0,1,2,3,6]}
|
|
@@ -267,7 +267,7 @@ type BackgroundImageSizesProps = {
|
|
|
267
267
|
type ImagePosition = "attention" | "bottom" | "center" | "entropy" | "left-bottom" | "left-top" | "left" | "right-bottom" | "right-top" | "right" | "top";
|
|
268
268
|
/** Type definition for a Griddo component or a module */
|
|
269
269
|
interface LibraryComponentProps {
|
|
270
|
-
component:
|
|
270
|
+
component: string;
|
|
271
271
|
[key: string]: unknown;
|
|
272
272
|
}
|
|
273
273
|
/** Custom object with value/keys containing static translations */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
interface AutoTypesConfig {
|
|
2
|
-
interfaceSuffix
|
|
3
|
-
contentTypeSuffix
|
|
4
|
-
publicApiSuffix
|
|
2
|
+
interfaceSuffix: string;
|
|
3
|
+
contentTypeSuffix: string;
|
|
4
|
+
publicApiSuffix: string;
|
|
5
5
|
}
|
|
6
6
|
export type { AutoTypesConfig };
|
|
@@ -4,7 +4,7 @@ interface HeaderFooter {
|
|
|
4
4
|
/** Indicates whether a module is treated as footer or header. If specified, it will be mandatory to specify if it is the default module with the `defaultNavigation` prop. */
|
|
5
5
|
type: "footer" | "header";
|
|
6
6
|
/** Name of the React component for the schema. */
|
|
7
|
-
component:
|
|
7
|
+
component: string;
|
|
8
8
|
/** If true, set this module as default navigation module. */
|
|
9
9
|
defaultNavigation?: boolean;
|
|
10
10
|
/** Name to represent the component, module or template in the Griddo editor interface. */
|
|
@@ -21,14 +21,14 @@ interface HeaderFooter {
|
|
|
21
21
|
};
|
|
22
22
|
}
|
|
23
23
|
type TypedOrNotHeaderFooterDefault<T> = T extends {
|
|
24
|
-
component:
|
|
24
|
+
component: string;
|
|
25
25
|
} ? T : Record<string, unknown>;
|
|
26
26
|
type Header<T = unknown> = HeaderFooter & {
|
|
27
27
|
type: "header";
|
|
28
28
|
/** Object to set default values for schema keys. */
|
|
29
29
|
default: {
|
|
30
30
|
/** Name of the component or module of this schema. */
|
|
31
|
-
component:
|
|
31
|
+
component: string;
|
|
32
32
|
/** Internal type id */
|
|
33
33
|
type: "header";
|
|
34
34
|
} & TypedOrNotHeaderFooterDefault<T>;
|
|
@@ -38,7 +38,7 @@ type Footer<T = unknown> = HeaderFooter & {
|
|
|
38
38
|
/** Object to set default values for schema keys. */
|
|
39
39
|
default: {
|
|
40
40
|
/** Name of the component or module of this schema. */
|
|
41
|
-
component:
|
|
41
|
+
component: string;
|
|
42
42
|
/** Internal type id */
|
|
43
43
|
type: "footer";
|
|
44
44
|
} & TypedOrNotHeaderFooterDefault<T>;
|
|
@@ -12,7 +12,7 @@ interface ComponentAndModuleBase extends BaseUI {
|
|
|
12
12
|
interface Component<ComponentProps = unknown> extends ComponentAndModuleBase {
|
|
13
13
|
schemaType: "component";
|
|
14
14
|
default: {
|
|
15
|
-
component:
|
|
15
|
+
component: string;
|
|
16
16
|
[key: string]: any;
|
|
17
17
|
} & ComponentProps;
|
|
18
18
|
}
|
|
@@ -20,7 +20,7 @@ interface MultiPageComponent<MultiPageComponentProps = unknown> extends Componen
|
|
|
20
20
|
schemaType: "component";
|
|
21
21
|
default: {
|
|
22
22
|
/** Component or module name of this schema. */
|
|
23
|
-
component:
|
|
23
|
+
component: string;
|
|
24
24
|
/** ComponentArray required prop for Multipage Modules */
|
|
25
25
|
title: Fields.Text;
|
|
26
26
|
sectionSlug: Fields.Text;
|
|
@@ -32,7 +32,7 @@ interface MultiPageComponent<MultiPageComponentProps = unknown> extends Componen
|
|
|
32
32
|
interface Module<ModuleProps = unknown> extends ComponentAndModuleBase {
|
|
33
33
|
schemaType: "module";
|
|
34
34
|
default: {
|
|
35
|
-
component:
|
|
35
|
+
component: string;
|
|
36
36
|
[key: string]: any;
|
|
37
37
|
} & ModuleProps;
|
|
38
38
|
}
|
|
@@ -40,7 +40,7 @@ interface MultiPageModule<MultiPageModuleProps = unknown> extends ComponentAndMo
|
|
|
40
40
|
schemaType: "module";
|
|
41
41
|
default: {
|
|
42
42
|
/** Component or module name of this schema. */
|
|
43
|
-
component:
|
|
43
|
+
component: string;
|
|
44
44
|
/** Required prop as `true` for MultiPage Modules */
|
|
45
45
|
hasGriddoMultiPage: true;
|
|
46
46
|
/** ComponentArray required prop for Multipage Modules */
|
|
@@ -62,7 +62,7 @@ interface ContentTypeModule<ContentTypeModuleProps = unknown> extends ComponentA
|
|
|
62
62
|
schemaType: "module";
|
|
63
63
|
default: {
|
|
64
64
|
/** Component or module name of this schema. */
|
|
65
|
-
component:
|
|
65
|
+
component: string;
|
|
66
66
|
/** `data` prop for ContentType modules */
|
|
67
67
|
data?: ContentTypeModuleProps extends {
|
|
68
68
|
data?: any;
|
|
@@ -98,7 +98,7 @@ interface Template<TemplateProps = any> extends TemplateBase {
|
|
|
98
98
|
default: {
|
|
99
99
|
type: "template";
|
|
100
100
|
templateType: TemplateProps extends {
|
|
101
|
-
component:
|
|
101
|
+
component: string;
|
|
102
102
|
} ? TemplateProps["component"] : string;
|
|
103
103
|
[key: string]: any;
|
|
104
104
|
} & Omit<TemplateProps, "component">;
|
|
@@ -117,7 +117,7 @@ interface ListTemplate<TemplateProps = any> extends TemplateBase {
|
|
|
117
117
|
default: {
|
|
118
118
|
type: "template";
|
|
119
119
|
templateType: TemplateProps extends {
|
|
120
|
-
component:
|
|
120
|
+
component: string;
|
|
121
121
|
} ? TemplateProps["component"] : string;
|
|
122
122
|
itemsPerPage: number;
|
|
123
123
|
activePage: number;
|
|
@@ -138,7 +138,7 @@ interface PaginatedDataTemplate<TemplateProps = any> extends TemplateBase {
|
|
|
138
138
|
default: {
|
|
139
139
|
type: "template";
|
|
140
140
|
templateType: TemplateProps extends {
|
|
141
|
-
component:
|
|
141
|
+
component: string;
|
|
142
142
|
} ? TemplateProps["component"] : string;
|
|
143
143
|
itemsPerPage: number;
|
|
144
144
|
activePage: number;
|
|
@@ -36,7 +36,7 @@ interface BaseUI extends DataPacks, _AutoTypes {
|
|
|
36
36
|
/** If `true` it will only be possible to create one page of this type of template. */
|
|
37
37
|
singleInstance?: boolean;
|
|
38
38
|
/** React component name for the schema. */
|
|
39
|
-
component:
|
|
39
|
+
component: string;
|
|
40
40
|
/** Category name previously exported as `moduleCategories` for Griddo. Categories are used to distribute and sort modules in the Griddo editor interface. */
|
|
41
41
|
category?: __AT__.ModuleCategories;
|
|
42
42
|
/** Name to represent the component, module or template in the Griddo editor interface. */
|
|
@@ -8,7 +8,7 @@ import type { Languages } from "./Languages";
|
|
|
8
8
|
import type { Menu, MenuItem } from "./Menu";
|
|
9
9
|
import type { ModuleCategories } from "./ModuleCategories";
|
|
10
10
|
import type { RichTextConfig } from "./RichTextConfig";
|
|
11
|
-
import type { Themes } from "./Themes";
|
|
11
|
+
import type { ThemeEntry, Themes } from "./Themes";
|
|
12
12
|
import type { Translations } from "./Translations";
|
|
13
13
|
import type { Component, ContentTypeModule, ListTemplate, Module, MultiPageComponent, MultiPageModule, PaginatedDataTemplate, Template } from "./UI";
|
|
14
|
-
export type { AutoTypesConfig, CategoryContentType, Component, ContentTypeModule, DamDefaults, DataPack, DataPackCategory, Footer, Header, Languages, ListTemplate, Menu, MenuItem, Module, ModuleCategories, MultiPageComponent, MultiPageModule, PageContentType, PaginatedDataTemplate, RichTextConfig, SimpleContentType, Template, Themes, Translations, };
|
|
14
|
+
export type { AutoTypesConfig, CategoryContentType, Component, ContentTypeModule, DamDefaults, DataPack, DataPackCategory, Footer, Header, Languages, ListTemplate, Menu, MenuItem, Module, ModuleCategories, MultiPageComponent, MultiPageModule, PageContentType, PaginatedDataTemplate, RichTextConfig, SimpleContentType, Template, Themes, Translations, ThemeEntry, };
|