fix(products): fix breadcrumbs and product filtering (backport from main)
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled

This commit is contained in:
2026-02-24 16:04:21 +01:00
parent 915eb61613
commit 5397309103
43805 changed files with 4324295 additions and 3 deletions

View File

@@ -0,0 +1,609 @@
'use client';
import { c as _c } from "react/compiler-runtime";
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
import { useModal } from '@faceless-ui/modal';
import { getTranslation } from '@payloadcms/translations';
import { extractID } from 'payload/shared';
import React from 'react';
import { useAuth } from '../../../../providers/Auth/index.js';
import { FolderProvider, useFolder } from '../../../../providers/Folders/index.js';
import { useRouteCache } from '../../../../providers/RouteCache/index.js';
import { useServerFunctions } from '../../../../providers/ServerFunctions/index.js';
import { useTranslation } from '../../../../providers/Translation/index.js';
import { Button } from '../../../Button/index.js';
import { ConfirmationModal } from '../../../ConfirmationModal/index.js';
import { useDocumentDrawer } from '../../../DocumentDrawer/index.js';
import { Drawer } from '../../../Drawer/index.js';
import { DrawerActionHeader } from '../../../DrawerActionHeader/index.js';
import { DrawerContentContainer } from '../../../DrawerContentContainer/index.js';
import { ListCreateNewDocInFolderButton } from '../../../ListHeader/TitleActions/ListCreateNewDocInFolderButton.js';
import { LoadingOverlay } from '../../../Loading/index.js';
import { NoListResults } from '../../../NoListResults/index.js';
import { Translation } from '../../../Translation/index.js';
import { FolderBreadcrumbs } from '../../Breadcrumbs/index.js';
import { ColoredFolderIcon } from '../../ColoredFolderIcon/index.js';
import './index.scss';
const baseClass = 'move-folder-drawer';
const baseModalSlug = 'move-folder-drawer';
const confirmModalSlug = `${baseModalSlug}-confirm-move`;
export function MoveItemsToFolderDrawer(props) {
return /*#__PURE__*/_jsx(Drawer, {
gutter: false,
Header: null,
slug: props.drawerSlug,
children: /*#__PURE__*/_jsx(LoadFolderData, {
...props
})
});
}
function LoadFolderData(props) {
const {
permissions
} = useAuth();
const [subfolders, setSubfolders] = React.useState([]);
const [documents, setDocuments] = React.useState([]);
const [breadcrumbs, setBreadcrumbs] = React.useState([]);
const [FolderResultsComponent, setFolderResultsComponent] = React.useState(null);
const [hasLoaded, setHasLoaded] = React.useState(false);
const [folderID, setFolderID] = React.useState(props.fromFolderID || null);
const hasLoadedRef = React.useRef(false);
const {
getFolderResultsComponentAndData
} = useServerFunctions();
const populateMoveToFolderDrawer = React.useCallback(async folderIDToPopulate => {
try {
const result = await getFolderResultsComponentAndData({
browseByFolder: false,
collectionsToDisplay: [props.folderCollectionSlug],
displayAs: 'grid',
// todo: should be able to pass undefined, empty array or null and get all folders. Need to look at API for this in the server function
folderAssignedCollections: props.folderAssignedCollections,
folderID: folderIDToPopulate,
sort: 'name'
});
setBreadcrumbs(result.breadcrumbs || []);
setSubfolders(result?.subfolders || []);
setDocuments(result?.documents || []);
setFolderResultsComponent(result.FolderResultsComponent || null);
setFolderID(folderIDToPopulate);
setHasLoaded(true);
} catch (e) {
setBreadcrumbs([]);
setSubfolders([]);
setDocuments([]);
}
hasLoadedRef.current = true;
}, [getFolderResultsComponentAndData, props.folderAssignedCollections, props.folderCollectionSlug]);
React.useEffect(() => {
if (!hasLoadedRef.current) {
void populateMoveToFolderDrawer(props.fromFolderID);
}
}, [populateMoveToFolderDrawer, props.fromFolderID]);
if (!hasLoaded) {
return /*#__PURE__*/_jsx(LoadingOverlay, {});
}
return /*#__PURE__*/_jsx(FolderProvider, {
allCollectionFolderSlugs: [props.folderCollectionSlug],
allowCreateCollectionSlugs: permissions.collections[props.folderCollectionSlug]?.create ? [props.folderCollectionSlug] : [],
allowMultiSelection: false,
breadcrumbs: breadcrumbs,
documents: documents,
folderFieldName: props.folderFieldName,
folderID: folderID,
FolderResultsComponent: FolderResultsComponent,
onItemClick: async item => {
await populateMoveToFolderDrawer(item.value.id);
},
subfolders: subfolders,
children: /*#__PURE__*/_jsx(Content, {
...props,
populateMoveToFolderDrawer: populateMoveToFolderDrawer
})
}, folderID);
}
function Content(t0) {
const $ = _c(34);
const {
drawerSlug,
fromFolderID,
fromFolderName,
itemsToMove,
onConfirm,
populateMoveToFolderDrawer,
skipConfirmModal,
...props
} = t0;
const {
clearRouteCache
} = useRouteCache();
const {
closeModal,
isModalOpen,
openModal
} = useModal();
let t1;
if ($[0] !== itemsToMove) {
t1 = () => itemsToMove.length;
$[0] = itemsToMove;
$[1] = t1;
} else {
t1 = $[1];
}
const [count] = React.useState(t1);
const [folderAddedToUnderlyingFolder, setFolderAddedToUnderlyingFolder] = React.useState(false);
const {
i18n,
t
} = useTranslation();
const {
breadcrumbs,
folderCollectionConfig,
folderCollectionSlug,
folderFieldName,
folderID,
FolderResultsComponent,
folderType,
getSelectedItems,
subfolders
} = useFolder();
let t2;
if ($[2] !== folderCollectionSlug) {
t2 = {
collectionSlug: folderCollectionSlug
};
$[2] = folderCollectionSlug;
$[3] = t2;
} else {
t2 = $[3];
}
const [FolderDocumentDrawer,, t3] = useDocumentDrawer(t2);
const {
closeDrawer: closeFolderDrawer,
openDrawer: openFolderDrawer
} = t3;
let t4;
if ($[4] !== breadcrumbs || $[5] !== getSelectedItems) {
t4 = () => {
const selected = getSelectedItems();
if (selected.length === 0) {
const lastCrumb = breadcrumbs?.[breadcrumbs.length - 1];
return {
id: lastCrumb?.id || null,
name: lastCrumb?.name || null
};
} else {
return {
id: selected[0].value.id,
name: selected[0].value._folderOrDocumentTitle
};
}
};
$[4] = breadcrumbs;
$[5] = getSelectedItems;
$[6] = t4;
} else {
t4 = $[6];
}
const getSelectedFolder = t4;
let t5;
if ($[7] !== folderCollectionSlug || $[8] !== folderID || $[9] !== fromFolderID || $[10] !== populateMoveToFolderDrawer) {
t5 = async t6 => {
const {
collectionSlug,
doc
} = t6;
await populateMoveToFolderDrawer(folderID);
if (collectionSlug === folderCollectionSlug && (doc?.folder && fromFolderID === extractID(doc?.folder) || !fromFolderID && !doc?.folder)) {
setFolderAddedToUnderlyingFolder(true);
}
};
$[7] = folderCollectionSlug;
$[8] = folderID;
$[9] = fromFolderID;
$[10] = populateMoveToFolderDrawer;
$[11] = t5;
} else {
t5 = $[11];
}
const onCreateSuccess = t5;
let t6;
if ($[12] !== getSelectedFolder || $[13] !== onConfirm) {
t6 = () => {
if (typeof onConfirm === "function") {
onConfirm(getSelectedFolder());
}
};
$[12] = getSelectedFolder;
$[13] = onConfirm;
$[14] = t6;
} else {
t6 = $[14];
}
const onConfirmMove = t6;
let t7;
let t8;
if ($[15] !== clearRouteCache || $[16] !== drawerSlug || $[17] !== folderAddedToUnderlyingFolder || $[18] !== isModalOpen) {
t7 = () => {
if (!isModalOpen(drawerSlug) && folderAddedToUnderlyingFolder) {
setFolderAddedToUnderlyingFolder(false);
clearRouteCache();
}
};
t8 = [drawerSlug, isModalOpen, clearRouteCache, folderAddedToUnderlyingFolder];
$[15] = clearRouteCache;
$[16] = drawerSlug;
$[17] = folderAddedToUnderlyingFolder;
$[18] = isModalOpen;
$[19] = t7;
$[20] = t8;
} else {
t7 = $[19];
t8 = $[20];
}
React.useEffect(t7, t8);
let t9;
if ($[21] !== closeModal || $[22] !== drawerSlug) {
t9 = () => {
closeModal(drawerSlug);
};
$[21] = closeModal;
$[22] = drawerSlug;
$[23] = t9;
} else {
t9 = $[23];
}
let t10;
if ($[24] !== onConfirmMove || $[25] !== openModal || $[26] !== skipConfirmModal) {
t10 = () => {
if (skipConfirmModal) {
onConfirmMove();
} else {
openModal(confirmModalSlug);
}
};
$[24] = onConfirmMove;
$[25] = openModal;
$[26] = skipConfirmModal;
$[27] = t10;
} else {
t10 = $[27];
}
let t11;
if ($[28] !== breadcrumbs.length || $[29] !== populateMoveToFolderDrawer) {
t11 = breadcrumbs.length ? () => {
populateMoveToFolderDrawer(null);
} : undefined;
$[28] = breadcrumbs.length;
$[29] = populateMoveToFolderDrawer;
$[30] = t11;
} else {
t11 = $[30];
}
let t12;
if ($[31] !== breadcrumbs.length || $[32] !== populateMoveToFolderDrawer) {
t12 = (crumb, index) => ({
id: crumb.id,
name: crumb.name,
onClick: index !== breadcrumbs.length - 1 ? () => {
populateMoveToFolderDrawer(crumb.id);
} : undefined
});
$[31] = breadcrumbs.length;
$[32] = populateMoveToFolderDrawer;
$[33] = t12;
} else {
t12 = $[33];
}
return _jsxs("div", {
className: baseClass,
children: [_jsx(DrawerActionHeader, {
onCancel: t9,
onSave: t10,
saveLabel: t("general:select"),
title: _jsx(DrawerHeading, {
action: props.action,
count,
fromFolderName: fromFolderID ? fromFolderName : undefined,
title: props.action === "moveItemToFolder" ? props.title : undefined
})
}), _jsxs("div", {
className: `${baseClass}__breadcrumbs-section`,
children: [_jsx(FolderBreadcrumbs, {
breadcrumbs: [{
id: null,
name: _jsxs("span", {
className: `${baseClass}__folder-breadcrumbs-root`,
children: [_jsx(ColoredFolderIcon, {}), t("folder:folders")]
}),
onClick: t11
}, ...breadcrumbs.map(t12)]
}), subfolders.length > 0 && _jsxs(_Fragment, {
children: [_jsx(Button, {
buttonStyle: "pill",
className: `${baseClass}__add-folder-button`,
margin: false,
onClick: () => {
openFolderDrawer();
},
children: t("fields:addLabel", {
label: getTranslation(folderCollectionConfig.labels?.singular, i18n)
})
}), _jsx(FolderDocumentDrawer, {
initialData: {
[folderFieldName]: folderID,
folderType
},
onSave: result => {
onCreateSuccess({
collectionSlug: folderCollectionConfig.slug,
doc: result.doc
});
closeFolderDrawer();
},
redirectAfterCreate: false
})]
})]
}), _jsx(DrawerContentContainer, {
className: `${baseClass}__body-section`,
children: subfolders.length > 0 ? FolderResultsComponent : _jsx(NoListResults, {
Actions: [_jsx(ListCreateNewDocInFolderButton, {
buttonLabel: `${t("general:create")} ${getTranslation(folderCollectionConfig.labels?.singular, i18n).toLowerCase()}`,
buttonSize: "medium",
buttonStyle: "primary",
collectionSlugs: [folderCollectionSlug],
folderAssignedCollections: props.folderAssignedCollections,
onCreateSuccess,
slugPrefix: "create-new-folder-from-drawer--no-results"
}, "create-folder")],
Message: _jsxs(_Fragment, {
children: [_jsx("h3", {
children: i18n.t("general:noResultsFound")
}), _jsx("p", {
children: i18n.t("general:noResultsDescription")
})]
})
})
}), !skipConfirmModal && _jsx(ConfirmationModal, {
body: _jsx(ConfirmationMessage, {
action: props.action,
count,
fromFolderName,
title: props.action === "moveItemToFolder" ? props.title : undefined,
toFolderName: getSelectedFolder().name
}),
confirmingLabel: t("general:moving"),
confirmLabel: t("general:move"),
heading: t("general:confirmMove"),
modalSlug: confirmModalSlug,
onConfirm: onConfirmMove
})]
});
}
function DrawerHeading(props) {
const $ = _c(14);
const {
t
} = useTranslation();
switch (props.action) {
case "moveItemToFolder":
{
if (props.fromFolderName) {
let t0;
if ($[0] !== props.fromFolderName || $[1] !== props.title || $[2] !== t) {
t0 = t("folder:movingFromFolder", {
fromFolder: props.fromFolderName,
title: props.title
});
$[0] = props.fromFolderName;
$[1] = props.title;
$[2] = t;
$[3] = t0;
} else {
t0 = $[3];
}
return t0;
} else {
let t0;
if ($[4] !== props.title || $[5] !== t) {
t0 = t("folder:selectFolderForItem", {
title: props.title
});
$[4] = props.title;
$[5] = t;
$[6] = t0;
} else {
t0 = $[6];
}
return t0;
}
}
case "moveItemsToFolder":
{
if (props.fromFolderName) {
const t0 = `${props.count} ${props.count > 1 ? t("general:items") : t("general:item")}`;
let t1;
if ($[7] !== props.fromFolderName || $[8] !== t || $[9] !== t0) {
t1 = t("folder:movingFromFolder", {
fromFolder: props.fromFolderName,
title: t0
});
$[7] = props.fromFolderName;
$[8] = t;
$[9] = t0;
$[10] = t1;
} else {
t1 = $[10];
}
return t1;
} else {
const t0 = `${props.count} ${props.count > 1 ? t("general:items") : t("general:item")}`;
let t1;
if ($[11] !== t || $[12] !== t0) {
t1 = t("folder:selectFolderForItem", {
title: t0
});
$[11] = t;
$[12] = t0;
$[13] = t1;
} else {
t1 = $[13];
}
return t1;
}
}
}
}
function ConfirmationMessage(props) {
const $ = _c(14);
const {
t
} = useTranslation();
switch (props.action) {
case "moveItemToFolder":
{
if (props.toFolderName) {
let t0;
if ($[0] !== props.title || $[1] !== props.toFolderName || $[2] !== t) {
t0 = _jsx(Translation, {
elements: {
1: _temp,
2: _temp2
},
i18nKey: "folder:moveItemToFolderConfirmation",
t,
variables: {
title: props.title,
toFolder: props.toFolderName
}
});
$[0] = props.title;
$[1] = props.toFolderName;
$[2] = t;
$[3] = t0;
} else {
t0 = $[3];
}
return t0;
} else {
let t0;
if ($[4] !== props.title || $[5] !== t) {
t0 = _jsx(Translation, {
elements: {
1: _temp3
},
i18nKey: "folder:moveItemToRootConfirmation",
t,
variables: {
title: props.title
}
});
$[4] = props.title;
$[5] = t;
$[6] = t0;
} else {
t0 = $[6];
}
return t0;
}
}
case "moveItemsToFolder":
{
if (props.toFolderName) {
let t0;
if ($[7] !== props.count || $[8] !== props.toFolderName || $[9] !== t) {
t0 = _jsx(Translation, {
elements: {
1: _temp4,
2: _temp5
},
i18nKey: "folder:moveItemsToFolderConfirmation",
t,
variables: {
count: props.count,
label: props.count > 1 ? t("general:items") : t("general:item"),
toFolder: props.toFolderName
}
});
$[7] = props.count;
$[8] = props.toFolderName;
$[9] = t;
$[10] = t0;
} else {
t0 = $[10];
}
return t0;
} else {
let t0;
if ($[11] !== props.count || $[12] !== t) {
t0 = _jsx(Translation, {
elements: {
1: _temp6
},
i18nKey: "folder:moveItemsToRootConfirmation",
t,
variables: {
count: props.count,
label: props.count > 1 ? t("general:items") : t("general:item")
}
});
$[11] = props.count;
$[12] = t;
$[13] = t0;
} else {
t0 = $[13];
}
return t0;
}
}
}
}
function _temp6(t0) {
const {
children: children_1
} = t0;
return _jsx("strong", {
children: children_1
});
}
function _temp5(t0) {
const {
children: children_0
} = t0;
return _jsx("strong", {
children: children_0
});
}
function _temp4(t0) {
const {
children
} = t0;
return _jsx("strong", {
children
});
}
function _temp3(t0) {
const {
children: children_4
} = t0;
return _jsx("strong", {
children: children_4
});
}
function _temp2(t0) {
const {
children: children_3
} = t0;
return _jsx("strong", {
children: children_3
});
}
function _temp(t0) {
const {
children: children_2
} = t0;
return _jsx("strong", {
children: children_2
});
}
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1,10 @@
import uuid from './dist/index.js';
export const v1 = uuid.v1;
export const v3 = uuid.v3;
export const v4 = uuid.v4;
export const v5 = uuid.v5;
export const NIL = uuid.NIL;
export const version = uuid.version;
export const validate = uuid.validate;
export const stringify = uuid.stringify;
export const parse = uuid.parse;

View File

@@ -0,0 +1,8 @@
// This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
import { parse as fn } from "../parse.mjs";
import { convertToFP } from "./_lib/convertToFP.mjs";
export const parseWithOptions = convertToFP(fn, 4);
// Fallback for modularized imports:
export default parseWithOptions;

View File

@@ -0,0 +1 @@
{"version":3,"file":"types_internal.js","sourceRoot":"","sources":["../../src/types_internal.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { TracerProvider, MeterProvider } from '@opentelemetry/api';\nimport { Instrumentation } from './types';\nimport { LoggerProvider } from '@opentelemetry/api-logs';\n\nexport interface AutoLoaderResult {\n instrumentations: Instrumentation[];\n}\n\nexport interface AutoLoaderOptions {\n instrumentations?: (Instrumentation | Instrumentation[])[];\n tracerProvider?: TracerProvider;\n meterProvider?: MeterProvider;\n loggerProvider?: LoggerProvider;\n}\n"]}

View File

@@ -0,0 +1,11 @@
var toArray = Function.prototype.bind.call(Function.prototype.call, [].slice);
/**
* Runs `querySelectorAll` on a given element.
*
* @param element the element
* @param selector the selector
*/
export default function qsa(element, selector) {
return toArray(element.querySelectorAll(selector));
}

View File

@@ -0,0 +1,7 @@
{
"name": "dom-helpers/matches",
"private": true,
"main": "../cjs/matches.js",
"module": "../esm/matches.js",
"types": "../esm/matches.d.ts"
}

View File

@@ -0,0 +1,7 @@
"use strict";
exports.isValid = void 0;
var _index = require("../isValid.cjs");
var _index2 = require("./_lib/convertToFP.cjs"); // This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
const isValid = (exports.isValid = (0, _index2.convertToFP)(_index.isValid, 1));

View File

@@ -0,0 +1 @@
{"version":3,"file":"createPerformanceSpans.d.ts","sourceRoot":"","sources":["../../../../src/util/createPerformanceSpans.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAEtG;;GAEG;AACH,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,eAAe,EACvB,OAAO,EAAE,sBAAsB,CAAC,YAAY,CAAC,EAAE,GAC9C,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC,EAAE,CAoBlC"}

View File

@@ -0,0 +1,4 @@
{
"main": "../../cjs/_non_iterable_spread.cjs",
"module": "../../esm/_non_iterable_spread.js"
}

View File

@@ -0,0 +1,5 @@
var convert = require('./convert'),
func = convert('invokeMap', require('../invokeMap'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -0,0 +1,4 @@
import type { DateFieldDiffClientComponent } from 'payload';
import './index.scss';
export declare const DateDiffComponent: DateFieldDiffClientComponent;
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1,31 @@
import type { ClientTab } from '../admin/types.js';
import type { ClientField, Field, Tab, TabAsFieldClient } from './config/types.js';
type Args = {
field: ClientField | ClientTab | Field | Tab | TabAsFieldClient;
index: number;
parentIndexPath: string;
/**
* Needed to generate data paths. Omit if you only need schema paths, e.g. within field schema maps.
*/
parentPath?: string;
parentSchemaPath: string;
};
type FieldPaths = {
/**
* A string of '-' separated indexes representing where
* to find this field in a given field schema array.
* It will always be complete and accurate.
*/
indexPath: string;
/**
* Path for this field relative to its position in the data.
*/
path: string;
/**
* Path for this field relative to its position in the schema.
*/
schemaPath: string;
};
export declare function getFieldPaths({ field, index, parentIndexPath, parentPath, parentSchemaPath, }: Args): FieldPaths;
export {};
//# sourceMappingURL=getFieldPaths.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"package-check.js","sources":["../../../src/icons/package-check.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name PackageCheck\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJtMTYgMTYgMiAyIDQtNCIgLz4KICA8cGF0aCBkPSJNMjEgMTBWOGEyIDIgMCAwIDAtMS0xLjczbC03LTRhMiAyIDAgMCAwLTIgMGwtNyA0QTIgMiAwIDAgMCAzIDh2OGEyIDIgMCAwIDAgMSAxLjczbDcgNGEyIDIgMCAwIDAgMiAwbDItMS4xNCIgLz4KICA8cGF0aCBkPSJtNy41IDQuMjcgOSA1LjE1IiAvPgogIDxwb2x5bGluZSBwb2ludHM9IjMuMjkgNyAxMiAxMiAyMC43MSA3IiAvPgogIDxsaW5lIHgxPSIxMiIgeDI9IjEyIiB5MT0iMjIiIHkyPSIxMiIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/package-check\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst PackageCheck = createLucideIcon('PackageCheck', [\n ['path', { d: 'm16 16 2 2 4-4', key: 'gfu2re' }],\n [\n 'path',\n {\n d: 'M21 10V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l2-1.14',\n key: 'e7tb2h',\n },\n ],\n ['path', { d: 'm7.5 4.27 9 5.15', key: '1c824w' }],\n ['polyline', { points: '3.29 7 12 12 20.71 7', key: 'ousv84' }],\n ['line', { x1: '12', x2: '12', y1: '22', y2: '12', key: 'a4e8g8' }],\n]);\n\nexport default PackageCheck;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAe,iBAAiB,cAAgB,CAAA,CAAA,CAAA;AAAA,CAAA,CACpD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAkB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAC/C,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACH,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACP,CAAA,CAAA,CAAA,CAAA;AAAA,CACF,CAAA,CAAA,CAAA;AAAA,CAAA,CACA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAoB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACjD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAY,CAAA,CAAA,CAAA,CAAE,QAAQ,CAAwB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAC9D,CAAA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAE,CAAA,CAAA,CAAA,EAAI,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AACpE,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,968 @@
// Copied from `@types/prettier`
// https://github.com/DefinitelyTyped/DefinitelyTyped/blob/5bb07fc4b087cb7ee91084afa6fe750551a7bbb1/types/prettier/index.d.ts
// Minimum TypeScript Version: 4.2
// Add `export {}` here to shut off automatic exporting from index.d.ts. There
// are quite a few utility types here that don't need to be shipped with the
// exported module.
export {};
import { builders, printer, utils } from "./doc.js";
export namespace doc {
export { builders, printer, utils };
}
// This utility is here to handle the case where you have an explicit union
// between string literals and the generic string type. It would normally
// resolve out to just the string type, but this generic LiteralUnion maintains
// the intellisense of the original union.
//
// It comes from this issue: microsoft/TypeScript#29729:
// https://github.com/microsoft/TypeScript/issues/29729#issuecomment-700527227
export type LiteralUnion<T extends U, U = string> =
| T
| (Pick<U, never> & { _?: never | undefined });
export type AST = any;
export type Doc = doc.builders.Doc;
// The type of elements that make up the given array T.
type ArrayElement<T> = T extends Array<infer E> ? E : never;
// A union of the properties of the given object that are arrays.
type ArrayProperties<T> = {
[K in keyof T]: NonNullable<T[K]> extends readonly any[] ? K : never;
}[keyof T];
// A union of the properties of the given array T that can be used to index it.
// If the array is a tuple, then that's going to be the explicit indices of the
// array, otherwise it's going to just be number.
type IndexProperties<T extends { length: number }> =
IsTuple<T> extends true ? Exclude<Partial<T>["length"], T["length"]> : number;
// Effectively performing T[P], except that it's telling TypeScript that it's
// safe to do this for tuples, arrays, or objects.
type IndexValue<T, P> = T extends any[]
? P extends number
? T[P]
: never
: P extends keyof T
? T[P]
: never;
// Determines if an object T is an array like string[] (in which case this
// evaluates to false) or a tuple like [string] (in which case this evaluates to
// true).
// eslint-disable-next-line @typescript-eslint/no-unused-vars
type IsTuple<T> = T extends []
? true
: T extends [infer First, ...infer Remain]
? IsTuple<Remain>
: false;
type CallProperties<T> = T extends any[] ? IndexProperties<T> : keyof T;
type IterProperties<T> = T extends any[]
? IndexProperties<T>
: ArrayProperties<T>;
type CallCallback<T, U> = (path: AstPath<T>, index: number, value: any) => U;
type EachCallback<T> = (
path: AstPath<ArrayElement<T>>,
index: number,
value: any,
) => void;
type MapCallback<T, U> = (
path: AstPath<ArrayElement<T>>,
index: number,
value: any,
) => U;
// https://github.com/prettier/prettier/blob/next/src/common/ast-path.js
export class AstPath<T = any> {
constructor(value: T);
get key(): string | null;
get index(): number | null;
get node(): T;
get parent(): T | null;
get grandparent(): T | null;
get isInArray(): boolean;
get siblings(): T[] | null;
get next(): T | null;
get previous(): T | null;
get isFirst(): boolean;
get isLast(): boolean;
get isRoot(): boolean;
get root(): T;
get ancestors(): T[];
stack: T[];
callParent<U>(callback: (path: this) => U, count?: number): U;
/**
* @deprecated Please use `AstPath#key` or `AstPath#index`
*/
getName(): PropertyKey | null;
/**
* @deprecated Please use `AstPath#node` or `AstPath#siblings`
*/
getValue(): T;
getNode(count?: number): T | null;
getParentNode(count?: number): T | null;
match(
...predicates: Array<
(node: any, name: string | null, number: number | null) => boolean
>
): boolean;
// For each of the tree walk functions (call, each, and map) this provides 5
// strict type signatures, along with a fallback at the end if you end up
// calling more than 5 properties deep. This helps a lot with typing because
// for the majority of cases you're calling fewer than 5 properties, so the
// tree walk functions have a clearer understanding of what you're doing.
//
// Note that resolving these types is somewhat complicated, and it wasn't
// even supported until TypeScript 4.2 (before it would just say that the
// type instantiation was excessively deep and possibly infinite).
call<U>(callback: CallCallback<T, U>): U;
call<U, P1 extends CallProperties<T>>(
callback: CallCallback<IndexValue<T, P1>, U>,
prop1: P1,
): U;
call<U, P1 extends keyof T, P2 extends CallProperties<T[P1]>>(
callback: CallCallback<IndexValue<IndexValue<T, P1>, P2>, U>,
prop1: P1,
prop2: P2,
): U;
call<
U,
P1 extends keyof T,
P2 extends CallProperties<T[P1]>,
P3 extends CallProperties<IndexValue<T[P1], P2>>,
>(
callback: CallCallback<
IndexValue<IndexValue<IndexValue<T, P1>, P2>, P3>,
U
>,
prop1: P1,
prop2: P2,
prop3: P3,
): U;
call<
U,
P1 extends keyof T,
P2 extends CallProperties<T[P1]>,
P3 extends CallProperties<IndexValue<T[P1], P2>>,
P4 extends CallProperties<IndexValue<IndexValue<T[P1], P2>, P3>>,
>(
callback: CallCallback<
IndexValue<IndexValue<IndexValue<IndexValue<T, P1>, P2>, P3>, P4>,
U
>,
prop1: P1,
prop2: P2,
prop3: P3,
prop4: P4,
): U;
call<U, P extends PropertyKey>(
callback: CallCallback<any, U>,
prop1: P,
prop2: P,
prop3: P,
prop4: P,
...props: P[]
): U;
each(callback: EachCallback<T>): void;
each<P1 extends IterProperties<T>>(
callback: EachCallback<IndexValue<T, P1>>,
prop1: P1,
): void;
each<P1 extends keyof T, P2 extends IterProperties<T[P1]>>(
callback: EachCallback<IndexValue<IndexValue<T, P1>, P2>>,
prop1: P1,
prop2: P2,
): void;
each<
P1 extends keyof T,
P2 extends IterProperties<T[P1]>,
P3 extends IterProperties<IndexValue<T[P1], P2>>,
>(
callback: EachCallback<IndexValue<IndexValue<IndexValue<T, P1>, P2>, P3>>,
prop1: P1,
prop2: P2,
prop3: P3,
): void;
each<
P1 extends keyof T,
P2 extends IterProperties<T[P1]>,
P3 extends IterProperties<IndexValue<T[P1], P2>>,
P4 extends IterProperties<IndexValue<IndexValue<T[P1], P2>, P3>>,
>(
callback: EachCallback<
IndexValue<IndexValue<IndexValue<IndexValue<T, P1>, P2>, P3>, P4>
>,
prop1: P1,
prop2: P2,
prop3: P3,
prop4: P4,
): void;
each(
callback: EachCallback<any[]>,
prop1: PropertyKey,
prop2: PropertyKey,
prop3: PropertyKey,
prop4: PropertyKey,
...props: PropertyKey[]
): void;
map<U>(callback: MapCallback<T, U>): U[];
map<U, P1 extends IterProperties<T>>(
callback: MapCallback<IndexValue<T, P1>, U>,
prop1: P1,
): U[];
map<U, P1 extends keyof T, P2 extends IterProperties<T[P1]>>(
callback: MapCallback<IndexValue<IndexValue<T, P1>, P2>, U>,
prop1: P1,
prop2: P2,
): U[];
map<
U,
P1 extends keyof T,
P2 extends IterProperties<T[P1]>,
P3 extends IterProperties<IndexValue<T[P1], P2>>,
>(
callback: MapCallback<IndexValue<IndexValue<IndexValue<T, P1>, P2>, P3>, U>,
prop1: P1,
prop2: P2,
prop3: P3,
): U[];
map<
U,
P1 extends keyof T,
P2 extends IterProperties<T[P1]>,
P3 extends IterProperties<IndexValue<T[P1], P2>>,
P4 extends IterProperties<IndexValue<IndexValue<T[P1], P2>, P3>>,
>(
callback: MapCallback<
IndexValue<IndexValue<IndexValue<IndexValue<T, P1>, P2>, P3>, P4>,
U
>,
prop1: P1,
prop2: P2,
prop3: P3,
prop4: P4,
): U[];
map<U>(
callback: MapCallback<any[], U>,
prop1: PropertyKey,
prop2: PropertyKey,
prop3: PropertyKey,
prop4: PropertyKey,
...props: PropertyKey[]
): U[];
}
/** @deprecated `FastPath` was renamed to `AstPath` */
export type FastPath<T = any> = AstPath<T>;
export type BuiltInParser = (text: string, options?: any) => AST;
export type BuiltInParserName =
| "acorn"
| "angular"
| "babel-flow"
| "babel-ts"
| "babel"
| "css"
| "espree"
| "flow"
| "glimmer"
| "graphql"
| "html"
| "json-stringify"
| "json"
| "json5"
| "jsonc"
| "less"
| "lwc"
| "markdown"
| "mdx"
| "meriyah"
| "mjml"
| "scss"
| "typescript"
| "vue"
| "yaml";
export type BuiltInParsers = Record<BuiltInParserName, BuiltInParser>;
/**
* For use in `.prettierrc.js`, `.prettierrc.ts`, `.prettierrc.cjs`, `.prettierrc.cts`, `prettierrc.mjs`, `prettierrc.mts`, `prettier.config.js`, `prettier.config.ts`, `prettier.config.cjs`, `prettier.config.cts`, `prettier.config.mjs`, `prettier.config.mts`
*/
export interface Config extends Options {
overrides?: Array<{
files: string | string[];
excludeFiles?: string | string[];
options?: Options;
}>;
}
export interface Options extends Partial<RequiredOptions> {}
export interface RequiredOptions extends doc.printer.Options {
/**
* Print semicolons at the ends of statements.
* @default true
*/
semi: boolean;
/**
* Use single quotes instead of double quotes.
* @default false
*/
singleQuote: boolean;
/**
* Use single quotes in JSX.
* @default false
*/
jsxSingleQuote: boolean;
/**
* Print trailing commas wherever possible.
* @default "all"
*/
trailingComma: "none" | "es5" | "all";
/**
* Print spaces between brackets in object literals.
* @default true
*/
bracketSpacing: boolean;
/**
* How to wrap object literals.
* @default "preserve"
*/
objectWrap: "preserve" | "collapse";
/**
* Put the `>` of a multi-line HTML (HTML, JSX, Vue, Angular) element at the end of the last line instead of being
* alone on the next line (does not apply to self closing elements).
* @default false
*/
bracketSameLine: boolean;
/**
* Format only a segment of a file.
* @default 0
*/
rangeStart: number;
/**
* Format only a segment of a file.
* @default Number.POSITIVE_INFINITY
*/
rangeEnd: number;
/**
* Specify which parser to use.
*/
parser: LiteralUnion<BuiltInParserName>;
/**
* Specify the input filepath. This will be used to do parser inference.
*/
filepath: string;
/**
* Prettier can restrict itself to only format files that contain a special comment, called a pragma, at the top of the file.
* This is very useful when gradually transitioning large, unformatted codebases to prettier.
* @default false
*/
requirePragma: boolean;
/**
* Prettier can insert a special @format marker at the top of files specifying that
* the file has been formatted with prettier. This works well when used in tandem with
* the --require-pragma option. If there is already a docblock at the top of
* the file then this option will add a newline to it with the @format marker.
* @default false
*/
insertPragma: boolean;
/**
* Prettier can allow individual files to opt out of formatting if they contain a special comment, called a pragma, at the top of the file.
* @default false
*/
checkIgnorePragma: boolean;
/**
* By default, Prettier will wrap markdown text as-is since some services use a linebreak-sensitive renderer.
* In some cases you may want to rely on editor/viewer soft wrapping instead, so this option allows you to opt out.
* @default "preserve"
*/
proseWrap: "always" | "never" | "preserve";
/**
* Include parentheses around a sole arrow function parameter.
* @default "always"
*/
arrowParens: "avoid" | "always";
/**
* Provide ability to support new languages to prettier.
*/
plugins: Array<string | URL | Plugin>;
/**
* How to handle whitespaces in HTML.
* @default "css"
*/
htmlWhitespaceSensitivity: "css" | "strict" | "ignore";
/**
* Which end of line characters to apply.
* @default "lf"
*/
endOfLine: "auto" | "lf" | "crlf" | "cr";
/**
* Change when properties in objects are quoted.
* @default "as-needed"
*/
quoteProps: "as-needed" | "consistent" | "preserve";
/**
* Whether or not to indent the code inside <script> and <style> tags in Vue files.
* @default false
*/
vueIndentScriptAndStyle: boolean;
/**
* Control whether Prettier formats quoted code embedded in the file.
* @default "auto"
*/
embeddedLanguageFormatting: "auto" | "off";
/**
* Enforce single attribute per line in HTML, Vue and JSX.
* @default false
*/
singleAttributePerLine: boolean;
/**
* Where to print operators when binary expressions wrap lines.
* @default "end"
*/
experimentalOperatorPosition: "start" | "end";
/**
* Use curious ternaries, with the question mark after the condition, instead
* of on the same line as the consequent.
* @default false
*/
experimentalTernaries: boolean;
/**
* Put the `>` of a multi-line JSX element at the end of the last line instead of being alone on the next line.
* @default false
* @deprecated use bracketSameLine instead
*/
jsxBracketSameLine?: boolean;
/**
* Arbitrary additional values on an options object are always allowed.
*/
[_: string]: unknown;
}
export interface ParserOptions<T = any> extends RequiredOptions {
locStart: (node: T) => number;
locEnd: (node: T) => number;
originalText: string;
}
export interface Plugin<T = any> {
languages?: SupportLanguage[] | undefined;
parsers?: { [parserName: string]: Parser<T> } | undefined;
printers?: { [astFormat: string]: Printer<T> } | undefined;
options?: SupportOptions | undefined;
defaultOptions?: Partial<RequiredOptions> | undefined;
}
export interface Parser<T = any> {
parse: (text: string, options: ParserOptions<T>) => T | Promise<T>;
astFormat: string;
hasPragma?: ((text: string) => boolean) | undefined;
hasIgnorePragma?: ((text: string) => boolean) | undefined;
locStart: (node: T) => number;
locEnd: (node: T) => number;
preprocess?:
| ((text: string, options: ParserOptions<T>) => string | Promise<string>)
| undefined;
}
export interface Printer<T = any> {
print(
path: AstPath<T>,
options: ParserOptions<T>,
print: (path: AstPath<T>) => Doc,
args?: unknown,
): Doc;
printPrettierIgnored?(
path: AstPath<T>,
options: ParserOptions<T>,
print: (path: AstPath<T>) => Doc,
args?: unknown,
): Doc;
embed?:
| ((
path: AstPath,
options: Options,
) =>
| ((
textToDoc: (text: string, options: Options) => Promise<Doc>,
print: (
selector?: string | number | Array<string | number> | AstPath,
) => Doc,
path: AstPath,
options: Options,
) => Promise<Doc | undefined> | Doc | undefined)
| Doc
| null)
| undefined;
preprocess?:
| ((ast: T, options: ParserOptions<T>) => T | Promise<T>)
| undefined;
insertPragma?: (text: string) => string;
/**
* @returns `null` if you want to remove this node
* @returns `void` if you want to use modified `cloned`
* @returns anything if you want to replace the node with it
*/
massageAstNode?:
| ((original: any, cloned: any, parent: any) => any)
| undefined;
hasPrettierIgnore?: ((path: AstPath<T>) => boolean) | undefined;
canAttachComment?: ((node: T, ancestors: T[]) => boolean) | undefined;
isBlockComment?: ((node: T) => boolean) | undefined;
willPrintOwnComments?: ((path: AstPath<T>) => boolean) | undefined;
printComment?:
| ((commentPath: AstPath<T>, options: ParserOptions<T>) => Doc)
| undefined;
/**
* By default, Prettier searches all object properties (except for a few predefined ones) of each node recursively.
* This function can be provided to override that behavior.
* @param node The node whose children should be returned.
* @param options Current options.
* @returns `[]` if the node has no children or `undefined` to fall back on the default behavior.
*/
getCommentChildNodes?:
| ((node: T, options: ParserOptions<T>) => T[] | undefined)
| undefined;
handleComments?:
| {
ownLine?:
| ((
commentNode: any,
text: string,
options: ParserOptions<T>,
ast: T,
isLastComment: boolean,
) => boolean)
| undefined;
endOfLine?:
| ((
commentNode: any,
text: string,
options: ParserOptions<T>,
ast: T,
isLastComment: boolean,
) => boolean)
| undefined;
remaining?:
| ((
commentNode: any,
text: string,
options: ParserOptions<T>,
ast: T,
isLastComment: boolean,
) => boolean)
| undefined;
}
| undefined;
getVisitorKeys?:
| ((node: T, nonTraversableKeys: Set<string>) => string[])
| undefined;
}
export interface CursorOptions extends Options {
/**
* Specify where the cursor is.
*/
cursorOffset: number;
}
export interface CursorResult {
formatted: string;
cursorOffset: number;
}
/**
* `format` is used to format text using Prettier. [Options](https://prettier.io/docs/options) may be provided to override the defaults.
*/
export function format(source: string, options?: Options): Promise<string>;
/**
* `check` checks to see if the file has been formatted with Prettier given those options and returns a `Boolean`.
* This is similar to the `--list-different` parameter in the CLI and is useful for running Prettier in CI scenarios.
*/
export function check(source: string, options?: Options): Promise<boolean>;
/**
* `formatWithCursor` both formats the code, and translates a cursor position from unformatted code to formatted code.
* This is useful for editor integrations, to prevent the cursor from moving when code is formatted.
*
* The `cursorOffset` option should be provided, to specify where the cursor is.
*/
export function formatWithCursor(
source: string,
options: CursorOptions,
): Promise<CursorResult>;
export interface ResolveConfigOptions {
/**
* If set to `false`, all caching will be bypassed.
*/
useCache?: boolean | undefined;
/**
* Pass directly the path of the config file if you don't wish to search for it.
*/
config?: string | URL | undefined;
/**
* If set to `true` and an `.editorconfig` file is in your project,
* Prettier will parse it and convert its properties to the corresponding prettier configuration.
* This configuration will be overridden by `.prettierrc`, etc. Currently,
* the following EditorConfig properties are supported:
* - indent_style
* - indent_size/tab_width
* - max_line_length
*/
editorconfig?: boolean | undefined;
}
/**
* `resolveConfig` can be used to resolve configuration for a given source file,
* passing its path or url as the first argument. The config search will start at
* the directory of the file location and continue to search up the directory.
*
* A promise is returned which will resolve to:
*
* - An options object, providing a [config file](https://prettier.io/docs/configuration) was found.
* - `null`, if no file was found.
*
* The promise will be rejected if there was an error parsing the configuration file.
*/
export function resolveConfig(
fileUrlOrPath: string | URL,
options?: ResolveConfigOptions,
): Promise<Options | null>;
/**
* `resolveConfigFile` can be used to find the path of the Prettier configuration file,
* that will be used when resolving the config (i.e. when calling `resolveConfig`).
*
* A promise is returned which will resolve to:
*
* - The path of the configuration file.
* - `null`, if no file was found.
*
* The promise will be rejected if there was an error parsing the configuration file.
*/
export function resolveConfigFile(
fileUrlOrPath?: string | URL,
): Promise<string | null>;
/**
* As you repeatedly call `resolveConfig`, the file system structure will be cached for performance. This function will clear the cache.
* Generally this is only needed for editor integrations that know that the file system has changed since the last format took place.
*/
export function clearConfigCache(): Promise<void>;
export interface SupportLanguage {
name: string;
parsers: BuiltInParserName[] | string[];
group?: string | undefined;
tmScope?: string | undefined;
aceMode?: string | undefined;
codemirrorMode?: string | undefined;
codemirrorMimeType?: string | undefined;
aliases?: string[] | undefined;
extensions?: string[] | undefined;
filenames?: string[] | undefined;
linguistLanguageId?: number | undefined;
vscodeLanguageIds?: string[] | undefined;
interpreters?: string[] | undefined;
isSupported?: ((options: { filepath: string }) => boolean) | undefined;
}
export interface SupportOptionRange {
start: number;
end: number;
step: number;
}
export type SupportOptionType =
| "int"
| "string"
| "boolean"
| "choice"
| "path";
export type CoreCategoryType =
| "Config"
| "Editor"
| "Format"
| "Other"
| "Output"
| "Global"
| "Special";
export interface BaseSupportOption<Type extends SupportOptionType> {
readonly name?: string | undefined;
/**
* Usually you can use {@link CoreCategoryType}
*/
category: string;
/**
* The type of the option.
*
* When passing a type other than the ones listed below, the option is
* treated as taking any string as argument, and `--option <${type}>` will
* be displayed in --help.
*/
type: Type;
/**
* Indicate that the option is deprecated.
*
* Use a string to add an extra message to --help for the option,
* for example to suggest a replacement option.
*/
deprecated?: true | string | undefined;
/**
* Description to be displayed in --help. If omitted, the option won't be
* shown at all in --help.
*/
description?: string | undefined;
}
export interface IntSupportOption extends BaseSupportOption<"int"> {
default?: number | undefined;
array?: false | undefined;
range?: SupportOptionRange | undefined;
}
export interface IntArraySupportOption extends BaseSupportOption<"int"> {
default?: Array<{ value: number[] }> | undefined;
array: true;
}
export interface StringSupportOption extends BaseSupportOption<"string"> {
default?: string | undefined;
array?: false | undefined;
}
export interface StringArraySupportOption extends BaseSupportOption<"string"> {
default?: Array<{ value: string[] }> | undefined;
array: true;
}
export interface BooleanSupportOption extends BaseSupportOption<"boolean"> {
default?: boolean | undefined;
array?: false | undefined;
description: string;
oppositeDescription?: string | undefined;
}
export interface BooleanArraySupportOption extends BaseSupportOption<"boolean"> {
default?: Array<{ value: boolean[] }> | undefined;
array: true;
}
export interface ChoiceSupportOption<
Value = any,
> extends BaseSupportOption<"choice"> {
default?: Value | Array<{ value: Value }> | undefined;
description: string;
choices: Array<{
value: Value;
description: string;
}>;
}
export interface PathSupportOption extends BaseSupportOption<"path"> {
default?: string | undefined;
array?: false | undefined;
}
export interface PathArraySupportOption extends BaseSupportOption<"path"> {
default?: Array<{ value: string[] }> | undefined;
array: true;
}
export type SupportOption =
| IntSupportOption
| IntArraySupportOption
| StringSupportOption
| StringArraySupportOption
| BooleanSupportOption
| BooleanArraySupportOption
| ChoiceSupportOption
| PathSupportOption
| PathArraySupportOption;
export interface SupportOptions extends Record<string, SupportOption> {}
export interface SupportInfo {
languages: SupportLanguage[];
options: SupportOption[];
}
export interface FileInfoOptions {
ignorePath?: string | URL | (string | URL)[] | undefined;
withNodeModules?: boolean | undefined;
plugins?: Array<string | URL | Plugin> | undefined;
resolveConfig?: boolean | undefined;
}
export interface FileInfoResult {
ignored: boolean;
inferredParser: string | null;
}
export function getFileInfo(
file: string | URL,
options?: FileInfoOptions,
): Promise<FileInfoResult>;
export interface SupportInfoOptions {
plugins?: Array<string | URL | Plugin> | undefined;
showDeprecated?: boolean | undefined;
}
/**
* Returns an object representing the parsers, languages and file types Prettier supports for the current version.
*/
export function getSupportInfo(
options?: SupportInfoOptions,
): Promise<SupportInfo>;
/**
* `version` field in `package.json`
*/
export const version: string;
// https://github.com/prettier/prettier/blob/main/src/utilities/public.js
export namespace util {
interface SkipOptions {
backwards?: boolean | undefined;
}
type Quote = "'" | '"';
function getMaxContinuousCount(text: string, searchString: string): number;
function getStringWidth(text: string): number;
function getAlignmentSize(
text: string,
tabWidth: number,
startIndex?: number | undefined,
): number;
function getIndentSize(value: string, tabWidth: number): number;
function skipNewline(
text: string,
startIndex: number | false,
options?: SkipOptions | undefined,
): number | false;
function skipInlineComment(
text: string,
startIndex: number | false,
): number | false;
function skipTrailingComment(
text: string,
startIndex: number | false,
): number | false;
function skipTrailingComment(
text: string,
startIndex: number | false,
): number | false;
function hasNewline(
text: string,
startIndex: number,
options?: SkipOptions | undefined,
): boolean;
function hasNewlineInRange(
text: string,
startIndex: number,
endIndex: number,
): boolean;
function hasSpaces(
text: string,
startIndex: number,
options?: SkipOptions | undefined,
): boolean;
function getNextNonSpaceNonCommentCharacterIndex(
text: string,
startIndex: number,
): number | false;
function getNextNonSpaceNonCommentCharacter(
text: string,
startIndex: number,
): string;
function isNextLineEmpty(text: string, startIndex: number): boolean;
function isPreviousLineEmpty(text: string, startIndex: number): boolean;
function makeString(
rawText: string,
enclosingQuote: Quote,
unescapeUnnecessaryEscapes?: boolean | undefined,
): string;
function skip(
characters: string | RegExp,
): (
text: string,
startIndex: number | false,
options?: SkipOptions,
) => number | false;
const skipWhitespace: (
text: string,
startIndex: number | false,
options?: SkipOptions,
) => number | false;
const skipSpaces: (
text: string,
startIndex: number | false,
options?: SkipOptions,
) => number | false;
const skipToLineEnd: (
text: string,
startIndex: number | false,
options?: SkipOptions,
) => number | false;
const skipEverythingButNewLine: (
text: string,
startIndex: number | false,
options?: SkipOptions,
) => number | false;
function addLeadingComment(node: any, comment: any): void;
function addDanglingComment(node: any, comment: any, marker: any): void;
function addTrailingComment(node: any, comment: any): void;
function getPreferredQuote(
text: string,
preferredQuoteOrPreferSingleQuote: Quote | boolean,
): Quote;
}

View File

@@ -0,0 +1,22 @@
import { Parser } from "../Parser.mjs";
import { parseNDigitsSigned } from "../utils.mjs";
export class ExtendedYearParser extends Parser {
priority = 130;
parse(dateString, token) {
if (token === "u") {
return parseNDigitsSigned(4, dateString);
}
return parseNDigitsSigned(token.length, dateString);
}
set(date, _flags, value) {
date.setFullYear(value, 0, 1);
date.setHours(0, 0, 0, 0);
return date;
}
incompatibleTokens = ["G", "y", "Y", "R", "w", "I", "i", "e", "c", "t", "T"];
}

View File

@@ -0,0 +1,2 @@
import { GraphQLScalarType } from 'graphql';
export declare const GraphQLPostalCode: GraphQLScalarType<string, string>;

View File

@@ -0,0 +1,82 @@
'use client';
import { c as _c } from "react/compiler-runtime";
import { jsx as _jsx } from "react/jsx-runtime";
import { useModal } from '@faceless-ui/modal';
import { useRouter } from 'next/navigation.js';
import React from 'react';
import { useBulkUpload } from '../../../elements/BulkUpload/index.js';
import { useTranslation } from '../../../providers/Translation/index.js';
import { Button } from '../../Button/index.js';
export function ListBulkUploadButton(t0) {
const $ = _c(12);
const {
collectionSlug,
hasCreatePermission,
isBulkUploadEnabled,
onBulkUploadSuccess,
openBulkUpload: openBulkUploadFromProps
} = t0;
const {
drawerSlug: bulkUploadDrawerSlug,
setCollectionSlug,
setOnSuccess
} = useBulkUpload();
const {
t
} = useTranslation();
const {
openModal
} = useModal();
const router = useRouter();
let t1;
if ($[0] !== bulkUploadDrawerSlug || $[1] !== collectionSlug || $[2] !== onBulkUploadSuccess || $[3] !== openBulkUploadFromProps || $[4] !== openModal || $[5] !== router || $[6] !== setCollectionSlug || $[7] !== setOnSuccess) {
t1 = () => {
if (typeof openBulkUploadFromProps === "function") {
openBulkUploadFromProps();
} else {
setCollectionSlug(collectionSlug);
openModal(bulkUploadDrawerSlug);
setOnSuccess(() => {
if (typeof onBulkUploadSuccess === "function") {
onBulkUploadSuccess();
} else {
router.refresh();
}
});
}
};
$[0] = bulkUploadDrawerSlug;
$[1] = collectionSlug;
$[2] = onBulkUploadSuccess;
$[3] = openBulkUploadFromProps;
$[4] = openModal;
$[5] = router;
$[6] = setCollectionSlug;
$[7] = setOnSuccess;
$[8] = t1;
} else {
t1 = $[8];
}
const openBulkUpload = t1;
if (!hasCreatePermission || !isBulkUploadEnabled) {
return null;
}
let t2;
if ($[9] !== openBulkUpload || $[10] !== t) {
t2 = _jsx(Button, {
"aria-label": t("upload:bulkUpload"),
buttonStyle: "pill",
onClick: openBulkUpload,
size: "small",
children: t("upload:bulkUpload")
}, "bulk-upload-button");
$[9] = openBulkUpload;
$[10] = t;
$[11] = t2;
} else {
t2 = $[11];
}
return t2;
}
//# sourceMappingURL=ListBulkUploadButton.js.map

View File

@@ -0,0 +1,10 @@
"use strict";
exports.formatRelative = void 0;
var _index = require("../formatRelative.cjs");
var _index2 = require("./_lib/convertToFP.cjs"); // This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
const formatRelative = (exports.formatRelative = (0, _index2.convertToFP)(
_index.formatRelative,
2,
));

View File

@@ -0,0 +1,17 @@
@import '../../../../scss/styles';
@layer payload-default {
.query-preset-group-by-field {
.field-label {
margin-bottom: calc(var(--base) / 2);
}
.value-wrapper {
background-color: var(--theme-elevation-50);
padding: var(--base);
display: flex;
flex-wrap: wrap;
gap: calc(var(--base) / 2);
}
}
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"appRouterRoutingInstrumentation.d.ts","sourceRoot":"","sources":["../../../../src/client/routing/appRouterRoutingInstrumentation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAQ,MAAM,cAAc,CAAC;AAWjD,eAAO,MAAM,sDAAsD,sCAAsC,CAAC;AAwB1G,wDAAwD;AACxD,wBAAgB,2BAA2B,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAahE;AAyCD,yDAAyD;AACzD,wBAAgB,6BAA6B,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAwFlE;AAsED;;GAEG;AACH,wBAAgB,4BAA4B,CAAC,IAAI,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,IAAI,CAIvF"}

View File

@@ -0,0 +1,6 @@
export declare const subHoursWithOptions: import("./types.js").FPFn3<
Date,
import("../subHours.js").SubHoursOptions<Date> | undefined,
number,
import("../fp.js").DateArg<Date>
>;

View File

@@ -0,0 +1,124 @@
"use strict";
exports.formatDistance = void 0;
const formatDistanceLocale = {
lessThanXSeconds: {
one: "mindre än en sekund",
other: "mindre än {{count}} sekunder",
},
xSeconds: {
one: "en sekund",
other: "{{count}} sekunder",
},
halfAMinute: "en halv minut",
lessThanXMinutes: {
one: "mindre än en minut",
other: "mindre än {{count}} minuter",
},
xMinutes: {
one: "en minut",
other: "{{count}} minuter",
},
aboutXHours: {
one: "ungefär en timme",
other: "ungefär {{count}} timmar",
},
xHours: {
one: "en timme",
other: "{{count}} timmar",
},
xDays: {
one: "en dag",
other: "{{count}} dagar",
},
aboutXWeeks: {
one: "ungefär en vecka",
other: "ungefär {{count}} veckor",
},
xWeeks: {
one: "en vecka",
other: "{{count}} veckor",
},
aboutXMonths: {
one: "ungefär en månad",
other: "ungefär {{count}} månader",
},
xMonths: {
one: "en månad",
other: "{{count}} månader",
},
aboutXYears: {
one: "ungefär ett år",
other: "ungefär {{count}} år",
},
xYears: {
one: "ett år",
other: "{{count}} år",
},
overXYears: {
one: "över ett år",
other: "över {{count}} år",
},
almostXYears: {
one: "nästan ett år",
other: "nästan {{count}} år",
},
};
const wordMapping = [
"noll",
"en",
"två",
"tre",
"fyra",
"fem",
"sex",
"sju",
"åtta",
"nio",
"tio",
"elva",
"tolv",
];
const formatDistance = (token, count, options) => {
let result;
const tokenValue = formatDistanceLocale[token];
if (typeof tokenValue === "string") {
result = tokenValue;
} else if (count === 1) {
result = tokenValue.one;
} else {
result = tokenValue.other.replace(
"{{count}}",
count < 13 ? wordMapping[count] : String(count),
);
}
if (options?.addSuffix) {
if (options.comparison && options.comparison > 0) {
return "om " + result;
} else {
return result + " sedan";
}
}
return result;
};
exports.formatDistance = formatDistance;

View File

@@ -0,0 +1,449 @@
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global = global || self, global.hoistNonReactStatics = factory());
}(this, (function () { 'use strict';
function unwrapExports (x) {
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
}
function createCommonjsModule(fn, module) {
return module = { exports: {} }, fn(module, module.exports), module.exports;
}
var reactIs_production_min = createCommonjsModule(function (module, exports) {
Object.defineProperty(exports,"__esModule",{value:!0});
var b="function"===typeof Symbol&&Symbol.for,c=b?Symbol.for("react.element"):60103,d=b?Symbol.for("react.portal"):60106,e=b?Symbol.for("react.fragment"):60107,f=b?Symbol.for("react.strict_mode"):60108,g=b?Symbol.for("react.profiler"):60114,h=b?Symbol.for("react.provider"):60109,k=b?Symbol.for("react.context"):60110,l=b?Symbol.for("react.async_mode"):60111,m=b?Symbol.for("react.concurrent_mode"):60111,n=b?Symbol.for("react.forward_ref"):60112,p=b?Symbol.for("react.suspense"):60113,q=b?Symbol.for("react.suspense_list"):
60120,r=b?Symbol.for("react.memo"):60115,t=b?Symbol.for("react.lazy"):60116,v=b?Symbol.for("react.fundamental"):60117,w=b?Symbol.for("react.responder"):60118,x=b?Symbol.for("react.scope"):60119;function y(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function z(a){return y(a)===m}
exports.typeOf=y;exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;exports.Fragment=e;exports.Lazy=t;exports.Memo=r;exports.Portal=d;exports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;
exports.isValidElementType=function(a){return "string"===typeof a||"function"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||"object"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===v||a.$$typeof===w||a.$$typeof===x)};exports.isAsyncMode=function(a){return z(a)||y(a)===l};exports.isConcurrentMode=z;exports.isContextConsumer=function(a){return y(a)===k};exports.isContextProvider=function(a){return y(a)===h};
exports.isElement=function(a){return "object"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return y(a)===n};exports.isFragment=function(a){return y(a)===e};exports.isLazy=function(a){return y(a)===t};exports.isMemo=function(a){return y(a)===r};exports.isPortal=function(a){return y(a)===d};exports.isProfiler=function(a){return y(a)===g};exports.isStrictMode=function(a){return y(a)===f};exports.isSuspense=function(a){return y(a)===p};
});
unwrapExports(reactIs_production_min);
var reactIs_production_min_1 = reactIs_production_min.typeOf;
var reactIs_production_min_2 = reactIs_production_min.AsyncMode;
var reactIs_production_min_3 = reactIs_production_min.ConcurrentMode;
var reactIs_production_min_4 = reactIs_production_min.ContextConsumer;
var reactIs_production_min_5 = reactIs_production_min.ContextProvider;
var reactIs_production_min_6 = reactIs_production_min.Element;
var reactIs_production_min_7 = reactIs_production_min.ForwardRef;
var reactIs_production_min_8 = reactIs_production_min.Fragment;
var reactIs_production_min_9 = reactIs_production_min.Lazy;
var reactIs_production_min_10 = reactIs_production_min.Memo;
var reactIs_production_min_11 = reactIs_production_min.Portal;
var reactIs_production_min_12 = reactIs_production_min.Profiler;
var reactIs_production_min_13 = reactIs_production_min.StrictMode;
var reactIs_production_min_14 = reactIs_production_min.Suspense;
var reactIs_production_min_15 = reactIs_production_min.isValidElementType;
var reactIs_production_min_16 = reactIs_production_min.isAsyncMode;
var reactIs_production_min_17 = reactIs_production_min.isConcurrentMode;
var reactIs_production_min_18 = reactIs_production_min.isContextConsumer;
var reactIs_production_min_19 = reactIs_production_min.isContextProvider;
var reactIs_production_min_20 = reactIs_production_min.isElement;
var reactIs_production_min_21 = reactIs_production_min.isForwardRef;
var reactIs_production_min_22 = reactIs_production_min.isFragment;
var reactIs_production_min_23 = reactIs_production_min.isLazy;
var reactIs_production_min_24 = reactIs_production_min.isMemo;
var reactIs_production_min_25 = reactIs_production_min.isPortal;
var reactIs_production_min_26 = reactIs_production_min.isProfiler;
var reactIs_production_min_27 = reactIs_production_min.isStrictMode;
var reactIs_production_min_28 = reactIs_production_min.isSuspense;
var reactIs_development = createCommonjsModule(function (module, exports) {
if (process.env.NODE_ENV !== "production") {
(function() {
Object.defineProperty(exports, '__esModule', { value: true });
// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
// nor polyfill, then a plain number is used for performance.
var hasSymbol = typeof Symbol === 'function' && Symbol.for;
var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
// (unstable) APIs that have been removed. Can we remove the symbols?
var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
function isValidElementType(type) {
return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE);
}
/**
* Forked from fbjs/warning:
* https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js
*
* Only change is we use console.warn instead of console.error,
* and do nothing when 'console' is not supported.
* This really simplifies the code.
* ---
* Similar to invariant but only logs a warning if the condition is not met.
* This can be used to log issues in development environments in critical
* paths. Removing the logging code for production environments will keep the
* same logic and follow the same code paths.
*/
var lowPriorityWarningWithoutStack = function () {};
{
var printWarning = function (format) {
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
args[_key - 1] = arguments[_key];
}
var argIndex = 0;
var message = 'Warning: ' + format.replace(/%s/g, function () {
return args[argIndex++];
});
if (typeof console !== 'undefined') {
console.warn(message);
}
try {
// --- Welcome to debugging React ---
// This error was thrown as a convenience so that you can use this stack
// to find the callsite that caused this warning to fire.
throw new Error(message);
} catch (x) {}
};
lowPriorityWarningWithoutStack = function (condition, format) {
if (format === undefined) {
throw new Error('`lowPriorityWarningWithoutStack(condition, format, ...args)` requires a warning ' + 'message argument');
}
if (!condition) {
for (var _len2 = arguments.length, args = new Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
args[_key2 - 2] = arguments[_key2];
}
printWarning.apply(void 0, [format].concat(args));
}
};
}
var lowPriorityWarningWithoutStack$1 = lowPriorityWarningWithoutStack;
function typeOf(object) {
if (typeof object === 'object' && object !== null) {
var $$typeof = object.$$typeof;
switch ($$typeof) {
case REACT_ELEMENT_TYPE:
var type = object.type;
switch (type) {
case REACT_ASYNC_MODE_TYPE:
case REACT_CONCURRENT_MODE_TYPE:
case REACT_FRAGMENT_TYPE:
case REACT_PROFILER_TYPE:
case REACT_STRICT_MODE_TYPE:
case REACT_SUSPENSE_TYPE:
return type;
default:
var $$typeofType = type && type.$$typeof;
switch ($$typeofType) {
case REACT_CONTEXT_TYPE:
case REACT_FORWARD_REF_TYPE:
case REACT_LAZY_TYPE:
case REACT_MEMO_TYPE:
case REACT_PROVIDER_TYPE:
return $$typeofType;
default:
return $$typeof;
}
}
case REACT_PORTAL_TYPE:
return $$typeof;
}
}
return undefined;
} // AsyncMode is deprecated along with isAsyncMode
var AsyncMode = REACT_ASYNC_MODE_TYPE;
var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
var ContextConsumer = REACT_CONTEXT_TYPE;
var ContextProvider = REACT_PROVIDER_TYPE;
var Element = REACT_ELEMENT_TYPE;
var ForwardRef = REACT_FORWARD_REF_TYPE;
var Fragment = REACT_FRAGMENT_TYPE;
var Lazy = REACT_LAZY_TYPE;
var Memo = REACT_MEMO_TYPE;
var Portal = REACT_PORTAL_TYPE;
var Profiler = REACT_PROFILER_TYPE;
var StrictMode = REACT_STRICT_MODE_TYPE;
var Suspense = REACT_SUSPENSE_TYPE;
var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated
function isAsyncMode(object) {
{
if (!hasWarnedAboutDeprecatedIsAsyncMode) {
hasWarnedAboutDeprecatedIsAsyncMode = true;
lowPriorityWarningWithoutStack$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');
}
}
return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
}
function isConcurrentMode(object) {
return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
}
function isContextConsumer(object) {
return typeOf(object) === REACT_CONTEXT_TYPE;
}
function isContextProvider(object) {
return typeOf(object) === REACT_PROVIDER_TYPE;
}
function isElement(object) {
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
}
function isForwardRef(object) {
return typeOf(object) === REACT_FORWARD_REF_TYPE;
}
function isFragment(object) {
return typeOf(object) === REACT_FRAGMENT_TYPE;
}
function isLazy(object) {
return typeOf(object) === REACT_LAZY_TYPE;
}
function isMemo(object) {
return typeOf(object) === REACT_MEMO_TYPE;
}
function isPortal(object) {
return typeOf(object) === REACT_PORTAL_TYPE;
}
function isProfiler(object) {
return typeOf(object) === REACT_PROFILER_TYPE;
}
function isStrictMode(object) {
return typeOf(object) === REACT_STRICT_MODE_TYPE;
}
function isSuspense(object) {
return typeOf(object) === REACT_SUSPENSE_TYPE;
}
exports.typeOf = typeOf;
exports.AsyncMode = AsyncMode;
exports.ConcurrentMode = ConcurrentMode;
exports.ContextConsumer = ContextConsumer;
exports.ContextProvider = ContextProvider;
exports.Element = Element;
exports.ForwardRef = ForwardRef;
exports.Fragment = Fragment;
exports.Lazy = Lazy;
exports.Memo = Memo;
exports.Portal = Portal;
exports.Profiler = Profiler;
exports.StrictMode = StrictMode;
exports.Suspense = Suspense;
exports.isValidElementType = isValidElementType;
exports.isAsyncMode = isAsyncMode;
exports.isConcurrentMode = isConcurrentMode;
exports.isContextConsumer = isContextConsumer;
exports.isContextProvider = isContextProvider;
exports.isElement = isElement;
exports.isForwardRef = isForwardRef;
exports.isFragment = isFragment;
exports.isLazy = isLazy;
exports.isMemo = isMemo;
exports.isPortal = isPortal;
exports.isProfiler = isProfiler;
exports.isStrictMode = isStrictMode;
exports.isSuspense = isSuspense;
})();
}
});
unwrapExports(reactIs_development);
var reactIs_development_1 = reactIs_development.typeOf;
var reactIs_development_2 = reactIs_development.AsyncMode;
var reactIs_development_3 = reactIs_development.ConcurrentMode;
var reactIs_development_4 = reactIs_development.ContextConsumer;
var reactIs_development_5 = reactIs_development.ContextProvider;
var reactIs_development_6 = reactIs_development.Element;
var reactIs_development_7 = reactIs_development.ForwardRef;
var reactIs_development_8 = reactIs_development.Fragment;
var reactIs_development_9 = reactIs_development.Lazy;
var reactIs_development_10 = reactIs_development.Memo;
var reactIs_development_11 = reactIs_development.Portal;
var reactIs_development_12 = reactIs_development.Profiler;
var reactIs_development_13 = reactIs_development.StrictMode;
var reactIs_development_14 = reactIs_development.Suspense;
var reactIs_development_15 = reactIs_development.isValidElementType;
var reactIs_development_16 = reactIs_development.isAsyncMode;
var reactIs_development_17 = reactIs_development.isConcurrentMode;
var reactIs_development_18 = reactIs_development.isContextConsumer;
var reactIs_development_19 = reactIs_development.isContextProvider;
var reactIs_development_20 = reactIs_development.isElement;
var reactIs_development_21 = reactIs_development.isForwardRef;
var reactIs_development_22 = reactIs_development.isFragment;
var reactIs_development_23 = reactIs_development.isLazy;
var reactIs_development_24 = reactIs_development.isMemo;
var reactIs_development_25 = reactIs_development.isPortal;
var reactIs_development_26 = reactIs_development.isProfiler;
var reactIs_development_27 = reactIs_development.isStrictMode;
var reactIs_development_28 = reactIs_development.isSuspense;
var reactIs = createCommonjsModule(function (module) {
if (process.env.NODE_ENV === 'production') {
module.exports = reactIs_production_min;
} else {
module.exports = reactIs_development;
}
});
var reactIs_1 = reactIs.typeOf;
var reactIs_2 = reactIs.AsyncMode;
var reactIs_3 = reactIs.ConcurrentMode;
var reactIs_4 = reactIs.ContextConsumer;
var reactIs_5 = reactIs.ContextProvider;
var reactIs_6 = reactIs.Element;
var reactIs_7 = reactIs.ForwardRef;
var reactIs_8 = reactIs.Fragment;
var reactIs_9 = reactIs.Lazy;
var reactIs_10 = reactIs.Memo;
var reactIs_11 = reactIs.Portal;
var reactIs_12 = reactIs.Profiler;
var reactIs_13 = reactIs.StrictMode;
var reactIs_14 = reactIs.Suspense;
var reactIs_15 = reactIs.isValidElementType;
var reactIs_16 = reactIs.isAsyncMode;
var reactIs_17 = reactIs.isConcurrentMode;
var reactIs_18 = reactIs.isContextConsumer;
var reactIs_19 = reactIs.isContextProvider;
var reactIs_20 = reactIs.isElement;
var reactIs_21 = reactIs.isForwardRef;
var reactIs_22 = reactIs.isFragment;
var reactIs_23 = reactIs.isLazy;
var reactIs_24 = reactIs.isMemo;
var reactIs_25 = reactIs.isPortal;
var reactIs_26 = reactIs.isProfiler;
var reactIs_27 = reactIs.isStrictMode;
var reactIs_28 = reactIs.isSuspense;
/**
* Copyright 2015, Yahoo! Inc.
* Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
*/
var REACT_STATICS = {
childContextTypes: true,
contextType: true,
contextTypes: true,
defaultProps: true,
displayName: true,
getDefaultProps: true,
getDerivedStateFromError: true,
getDerivedStateFromProps: true,
mixins: true,
propTypes: true,
type: true
};
var KNOWN_STATICS = {
name: true,
length: true,
prototype: true,
caller: true,
callee: true,
arguments: true,
arity: true
};
var FORWARD_REF_STATICS = {
'$$typeof': true,
render: true,
defaultProps: true,
displayName: true,
propTypes: true
};
var MEMO_STATICS = {
'$$typeof': true,
compare: true,
defaultProps: true,
displayName: true,
propTypes: true,
type: true
};
var TYPE_STATICS = {};
TYPE_STATICS[reactIs_7] = FORWARD_REF_STATICS;
TYPE_STATICS[reactIs_10] = MEMO_STATICS;
function getStatics(component) {
// React v16.11 and below
if (reactIs_24(component)) {
return MEMO_STATICS;
} // React v16.12 and above
return TYPE_STATICS[component['$$typeof']] || REACT_STATICS;
}
var defineProperty = Object.defineProperty;
var getOwnPropertyNames = Object.getOwnPropertyNames;
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
var getPrototypeOf = Object.getPrototypeOf;
var objectPrototype = Object.prototype;
function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {
if (typeof sourceComponent !== 'string') {
// don't hoist over string (html) components
if (objectPrototype) {
var inheritedComponent = getPrototypeOf(sourceComponent);
if (inheritedComponent && inheritedComponent !== objectPrototype) {
hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);
}
}
var keys = getOwnPropertyNames(sourceComponent);
if (getOwnPropertySymbols) {
keys = keys.concat(getOwnPropertySymbols(sourceComponent));
}
var targetStatics = getStatics(targetComponent);
var sourceStatics = getStatics(sourceComponent);
for (var i = 0; i < keys.length; ++i) {
var key = keys[i];
if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {
var descriptor = getOwnPropertyDescriptor(sourceComponent, key);
try {
// Avoid failures from read-only properties
defineProperty(targetComponent, key, descriptor);
} catch (e) {}
}
}
}
return targetComponent;
}
return hoistNonReactStatics;
})));

View File

@@ -0,0 +1 @@
{"version":3,"file":"at-sign.js","sources":["../../../src/icons/at-sign.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name AtSign\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8Y2lyY2xlIGN4PSIxMiIgY3k9IjEyIiByPSI0IiAvPgogIDxwYXRoIGQ9Ik0xNiA4djVhMyAzIDAgMCAwIDYgMHYtMWExMCAxMCAwIDEgMC00IDgiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/at-sign\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst AtSign = createLucideIcon('AtSign', [\n ['circle', { cx: '12', cy: '12', r: '4', key: '4exip2' }],\n ['path', { d: 'M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-4 8', key: '7n84p3' }],\n]);\n\nexport default AtSign;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAS,iBAAiB,QAAU,CAAA,CAAA,CAAA;AAAA,CACxC,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,IAAA,CAAM,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CAAA,CACxD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA4C,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC3E,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,7 @@
import { browserTracingIntegrationShim, consoleLoggingIntegrationShim, loggerShim, replayIntegrationShim } from '@sentry-internal/integration-shims';
import { feedbackAsyncIntegration } from './feedbackAsync';
export * from './index.bundle.base';
export { consoleLoggingIntegrationShim as consoleLoggingIntegration, loggerShim as logger };
export { getFeedback, sendFeedback } from '@sentry-internal/feedback';
export { browserTracingIntegrationShim as browserTracingIntegration, feedbackAsyncIntegration as feedbackAsyncIntegration, feedbackAsyncIntegration as feedbackIntegration, replayIntegrationShim as replayIntegration, };
//# sourceMappingURL=index.bundle.feedback.d.ts.map

View File

@@ -0,0 +1,6 @@
{
"name": "react-transition-group/config",
"private": true,
"main": "../cjs/config.js",
"module": "../esm/config.js"
}

View File

@@ -0,0 +1,15 @@
import { Decimal } from "decimal.js";
import { memoize } from "@formatjs/fast-memoize";
/**
* Cached function to compute powers of 10 for Decimal.js operations.
* This cache significantly reduces overhead in ComputeExponent and ToRawFixed
* by memoizing expensive Decimal.pow(10, n) calculations.
*
* Common exponents (e.g., -20 to 20) are used repeatedly in number formatting,
* so caching provides substantial performance benefits.
*
* @param exponent - Can be a number or Decimal. If Decimal, it will be converted to string for cache key.
*/
export const getPowerOf10 = memoize((exponent) => {
return Decimal.pow(10, exponent);
});

View File

@@ -0,0 +1,195 @@
import { balanced } from 'balanced-match';
const escSlash = '\0SLASH' + Math.random() + '\0';
const escOpen = '\0OPEN' + Math.random() + '\0';
const escClose = '\0CLOSE' + Math.random() + '\0';
const escComma = '\0COMMA' + Math.random() + '\0';
const escPeriod = '\0PERIOD' + Math.random() + '\0';
const escSlashPattern = new RegExp(escSlash, 'g');
const escOpenPattern = new RegExp(escOpen, 'g');
const escClosePattern = new RegExp(escClose, 'g');
const escCommaPattern = new RegExp(escComma, 'g');
const escPeriodPattern = new RegExp(escPeriod, 'g');
const slashPattern = /\\\\/g;
const openPattern = /\\{/g;
const closePattern = /\\}/g;
const commaPattern = /\\,/g;
const periodPattern = /\\./g;
export const EXPANSION_MAX = 100_000;
function numeric(str) {
return !isNaN(str) ? parseInt(str, 10) : str.charCodeAt(0);
}
function escapeBraces(str) {
return str
.replace(slashPattern, escSlash)
.replace(openPattern, escOpen)
.replace(closePattern, escClose)
.replace(commaPattern, escComma)
.replace(periodPattern, escPeriod);
}
function unescapeBraces(str) {
return str
.replace(escSlashPattern, '\\')
.replace(escOpenPattern, '{')
.replace(escClosePattern, '}')
.replace(escCommaPattern, ',')
.replace(escPeriodPattern, '.');
}
/**
* Basically just str.split(","), but handling cases
* where we have nested braced sections, which should be
* treated as individual members, like {a,{b,c},d}
*/
function parseCommaParts(str) {
if (!str) {
return [''];
}
const parts = [];
const m = balanced('{', '}', str);
if (!m) {
return str.split(',');
}
const { pre, body, post } = m;
const p = pre.split(',');
p[p.length - 1] += '{' + body + '}';
const postParts = parseCommaParts(post);
if (post.length) {
;
p[p.length - 1] += postParts.shift();
p.push.apply(p, postParts);
}
parts.push.apply(parts, p);
return parts;
}
export function expand(str, options = {}) {
if (!str) {
return [];
}
const { max = EXPANSION_MAX } = options;
// I don't know why Bash 4.3 does this, but it does.
// Anything starting with {} will have the first two bytes preserved
// but *only* at the top level, so {},a}b will not expand to anything,
// but a{},b}c will be expanded to [a}c,abc].
// One could argue that this is a bug in Bash, but since the goal of
// this module is to match Bash's rules, we escape a leading {}
if (str.slice(0, 2) === '{}') {
str = '\\{\\}' + str.slice(2);
}
return expand_(escapeBraces(str), max, true).map(unescapeBraces);
}
function embrace(str) {
return '{' + str + '}';
}
function isPadded(el) {
return /^-?0\d/.test(el);
}
function lte(i, y) {
return i <= y;
}
function gte(i, y) {
return i >= y;
}
function expand_(str, max, isTop) {
/** @type {string[]} */
const expansions = [];
const m = balanced('{', '}', str);
if (!m)
return [str];
// no need to expand pre, since it is guaranteed to be free of brace-sets
const pre = m.pre;
const post = m.post.length ? expand_(m.post, max, false) : [''];
if (/\$$/.test(m.pre)) {
for (let k = 0; k < post.length && k < max; k++) {
const expansion = pre + '{' + m.body + '}' + post[k];
expansions.push(expansion);
}
}
else {
const isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
const isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
const isSequence = isNumericSequence || isAlphaSequence;
const isOptions = m.body.indexOf(',') >= 0;
if (!isSequence && !isOptions) {
// {a},b}
if (m.post.match(/,(?!,).*\}/)) {
str = m.pre + '{' + m.body + escClose + m.post;
return expand_(str, max, true);
}
return [str];
}
let n;
if (isSequence) {
n = m.body.split(/\.\./);
}
else {
n = parseCommaParts(m.body);
if (n.length === 1 && n[0] !== undefined) {
// x{{a,b}}y ==> x{a}y x{b}y
n = expand_(n[0], max, false).map(embrace);
//XXX is this necessary? Can't seem to hit it in tests.
/* c8 ignore start */
if (n.length === 1) {
return post.map(p => m.pre + n[0] + p);
}
/* c8 ignore stop */
}
}
// at this point, n is the parts, and we know it's not a comma set
// with a single entry.
let N;
if (isSequence && n[0] !== undefined && n[1] !== undefined) {
const x = numeric(n[0]);
const y = numeric(n[1]);
const width = Math.max(n[0].length, n[1].length);
let incr = n.length === 3 && n[2] !== undefined ? Math.abs(numeric(n[2])) : 1;
let test = lte;
const reverse = y < x;
if (reverse) {
incr *= -1;
test = gte;
}
const pad = n.some(isPadded);
N = [];
for (let i = x; test(i, y); i += incr) {
let c;
if (isAlphaSequence) {
c = String.fromCharCode(i);
if (c === '\\') {
c = '';
}
}
else {
c = String(i);
if (pad) {
const need = width - c.length;
if (need > 0) {
const z = new Array(need + 1).join('0');
if (i < 0) {
c = '-' + z + c.slice(1);
}
else {
c = z + c;
}
}
}
}
N.push(c);
}
}
else {
N = [];
for (let j = 0; j < n.length; j++) {
N.push.apply(N, expand_(n[j], max, false));
}
}
for (let j = 0; j < N.length; j++) {
for (let k = 0; k < post.length && expansions.length < max; k++) {
const expansion = pre + N[j] + post[k];
if (!isTop || isSequence || expansion) {
expansions.push(expansion);
}
}
}
}
return expansions;
}
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1,84 @@
/// <reference types="node" />
import type { Middleware, ParameterizedContext, Response } from 'koa';
import type { IncomingMessage } from 'http';
import { HandlerOptions as RawHandlerOptions, OperationContext } from '../handler';
import { RequestParams } from '../common';
/**
* The context in the request for the handler.
*
* @category Server/koa
*/
export interface RequestContext {
res: Response;
}
/**
* The GraphQL over HTTP spec compliant request parser for an incoming GraphQL request.
*
* If the HTTP request _is not_ a [well-formatted GraphQL over HTTP request](https://graphql.github.io/graphql-over-http/draft/#sec-Request), the function will respond
* on Koa's `ParameterizedContext` response and return `null`.
*
* If the HTTP request _is_ a [well-formatted GraphQL over HTTP request](https://graphql.github.io/graphql-over-http/draft/#sec-Request), but is invalid or malformed,
* the function will throw an error and it is up to the user to handle and respond as they see fit.
*
* ```js
* import Koa from 'koa'; // yarn add koa
* import mount from 'koa-mount'; // yarn add koa-mount
* import { parseRequestParams } from 'graphql-http/lib/use/koa';
*
* const app = new Koa();
* app.use(
* mount('/', async (ctx) => {
* try {
* const maybeParams = await parseRequestParams(ctx);
* if (!maybeParams) {
* // not a well-formatted GraphQL over HTTP request,
* // parser responded and there's nothing else to do
* return;
* }
*
* // well-formatted GraphQL over HTTP request,
* // with valid parameters
* ctx.response.status = 200;
* ctx.body = JSON.stringify(maybeParams, null, ' ');
* } catch (err) {
* // well-formatted GraphQL over HTTP request,
* // but with invalid parameters
* ctx.response.status = 400;
* ctx.body = err.message;
* }
* }),
* );
*
* app.listen({ port: 4000 });
* console.log('Listening to port 4000');
* ```
*
* @category Server/koa
*/
export declare function parseRequestParams(ctx: ParameterizedContext): Promise<RequestParams | null>;
/**
* Handler options when using the koa adapter.
*
* @category Server/koa
*/
export type HandlerOptions<Context extends OperationContext = undefined> = RawHandlerOptions<IncomingMessage, RequestContext, Context>;
/**
* Create a GraphQL over HTTP spec compliant request handler for
* the Koa framework.
*
* ```js
* import Koa from 'koa'; // yarn add koa
* import mount from 'koa-mount'; // yarn add koa-mount
* import { createHandler } from 'graphql-http/lib/use/koa';
* import { schema } from './my-graphql-schema';
*
* const app = new Koa();
* app.use(mount('/', createHandler({ schema })));
*
* app.listen({ port: 4000 });
* console.log('Listening to port 4000');
* ```
*
* @category Server/koa
*/
export declare function createHandler<Context extends OperationContext = undefined>(options: HandlerOptions<Context>): Middleware;

View File

@@ -0,0 +1,113 @@
import type { Scope } from '../scope';
import type { Metric } from '../types-hoist/metric';
/**
* Options for capturing a metric.
*/
export interface MetricOptions {
/**
* The unit of the metric value.
*/
unit?: string;
/**
* Arbitrary structured data that stores information about the metric.
*/
attributes?: Metric['attributes'];
/**
* The scope to capture the metric with.
*/
scope?: Scope;
}
/**
* @summary Increment a counter metric.
*
* @param name - The name of the counter metric.
* @param value - The value to increment by (defaults to 1).
* @param options - Options for capturing the metric.
*
* @example
*
* ```
* Sentry.metrics.count('api.requests', 1, {
* attributes: {
* endpoint: '/api/users',
* method: 'GET',
* status: 200
* }
* });
* ```
*
* @example With custom value
*
* ```
* Sentry.metrics.count('items.processed', 5, {
* attributes: {
* processor: 'batch-processor',
* queue: 'high-priority'
* }
* });
* ```
*/
export declare function count(name: string, value?: number, options?: MetricOptions): void;
/**
* @summary Set a gauge metric to a specific value.
*
* @param name - The name of the gauge metric.
* @param value - The current value of the gauge.
* @param options - Options for capturing the metric.
*
* @example
*
* ```
* Sentry.metrics.gauge('memory.usage', 1024, {
* unit: 'megabyte',
* attributes: {
* process: 'web-server',
* region: 'us-east-1'
* }
* });
* ```
*
* @example Without unit
*
* ```
* Sentry.metrics.gauge('active.connections', 42, {
* attributes: {
* server: 'api-1',
* protocol: 'websocket'
* }
* });
* ```
*/
export declare function gauge(name: string, value: number, options?: MetricOptions): void;
/**
* @summary Record a value in a distribution metric.
*
* @param name - The name of the distribution metric.
* @param value - The value to record in the distribution.
* @param options - Options for capturing the metric.
*
* @example
*
* ```
* Sentry.metrics.distribution('task.duration', 500, {
* unit: 'millisecond',
* attributes: {
* task: 'data-processing',
* priority: 'high'
* }
* });
* ```
*
* @example Without unit
*
* ```
* Sentry.metrics.distribution('batch.size', 100, {
* attributes: {
* processor: 'batch-1',
* type: 'async'
* }
* });
* ```
*/
export declare function distribution(name: string, value: number, options?: MetricOptions): void;
//# sourceMappingURL=public-api.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/pg-core/columns/int.common.ts"],"sourcesContent":["import type { ColumnBuilderBaseConfig, ColumnDataType, GeneratedIdentityConfig, IsIdentity } from '~/column-builder.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { PgSequenceOptions } from '../sequence.ts';\nimport { PgColumnBuilder } from './common.ts';\n\nexport abstract class PgIntColumnBaseBuilder<\n\tT extends ColumnBuilderBaseConfig<ColumnDataType, string>,\n> extends PgColumnBuilder<\n\tT,\n\t{ generatedIdentity: GeneratedIdentityConfig }\n> {\n\tstatic override readonly [entityKind]: string = 'PgIntColumnBaseBuilder';\n\n\tgeneratedAlwaysAsIdentity(\n\t\tsequence?: PgSequenceOptions & { name?: string },\n\t): IsIdentity<this, 'always'> {\n\t\tif (sequence) {\n\t\t\tconst { name, ...options } = sequence;\n\t\t\tthis.config.generatedIdentity = {\n\t\t\t\ttype: 'always',\n\t\t\t\tsequenceName: name,\n\t\t\t\tsequenceOptions: options,\n\t\t\t};\n\t\t} else {\n\t\t\tthis.config.generatedIdentity = {\n\t\t\t\ttype: 'always',\n\t\t\t};\n\t\t}\n\n\t\tthis.config.hasDefault = true;\n\t\tthis.config.notNull = true;\n\n\t\treturn this as IsIdentity<this, 'always'>;\n\t}\n\n\tgeneratedByDefaultAsIdentity(\n\t\tsequence?: PgSequenceOptions & { name?: string },\n\t): IsIdentity<this, 'byDefault'> {\n\t\tif (sequence) {\n\t\t\tconst { name, ...options } = sequence;\n\t\t\tthis.config.generatedIdentity = {\n\t\t\t\ttype: 'byDefault',\n\t\t\t\tsequenceName: name,\n\t\t\t\tsequenceOptions: options,\n\t\t\t};\n\t\t} else {\n\t\t\tthis.config.generatedIdentity = {\n\t\t\t\ttype: 'byDefault',\n\t\t\t};\n\t\t}\n\n\t\tthis.config.hasDefault = true;\n\t\tthis.config.notNull = true;\n\n\t\treturn this as IsIdentity<this, 'byDefault'>;\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,oBAA2B;AAE3B,oBAAgC;AAEzB,MAAe,+BAEZ,8BAGR;AAAA,EACD,QAA0B,wBAAU,IAAY;AAAA,EAEhD,0BACC,UAC6B;AAC7B,QAAI,UAAU;AACb,YAAM,EAAE,MAAM,GAAG,QAAQ,IAAI;AAC7B,WAAK,OAAO,oBAAoB;AAAA,QAC/B,MAAM;AAAA,QACN,cAAc;AAAA,QACd,iBAAiB;AAAA,MAClB;AAAA,IACD,OAAO;AACN,WAAK,OAAO,oBAAoB;AAAA,QAC/B,MAAM;AAAA,MACP;AAAA,IACD;AAEA,SAAK,OAAO,aAAa;AACzB,SAAK,OAAO,UAAU;AAEtB,WAAO;AAAA,EACR;AAAA,EAEA,6BACC,UACgC;AAChC,QAAI,UAAU;AACb,YAAM,EAAE,MAAM,GAAG,QAAQ,IAAI;AAC7B,WAAK,OAAO,oBAAoB;AAAA,QAC/B,MAAM;AAAA,QACN,cAAc;AAAA,QACd,iBAAiB;AAAA,MAClB;AAAA,IACD,OAAO;AACN,WAAK,OAAO,oBAAoB;AAAA,QAC/B,MAAM;AAAA,MACP;AAAA,IACD;AAEA,SAAK,OAAO,aAAa;AACzB,SAAK,OAAO,UAAU;AAEtB,WAAO;AAAA,EACR;AACD;","names":[]}

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../src/upsert.ts"],"sourcesContent":["import type { Upsert } from 'payload'\n\nimport type { DrizzleAdapter } from './types.js'\n\nexport const upsert: Upsert = async function upsert(\n this: DrizzleAdapter,\n { collection, data, joins, locale, req, returning, select, where },\n) {\n return this.updateOne({\n collection,\n data,\n joins,\n locale,\n options: { upsert: true },\n req,\n returning,\n select,\n where,\n })\n}\n"],"names":["upsert","collection","data","joins","locale","req","returning","select","where","updateOne","options"],"mappings":"AAIA,OAAO,MAAMA,SAAiB,eAAeA,OAE3C,EAAEC,UAAU,EAAEC,IAAI,EAAEC,KAAK,EAAEC,MAAM,EAAEC,GAAG,EAAEC,SAAS,EAAEC,MAAM,EAAEC,KAAK,EAAE;IAElE,OAAO,IAAI,CAACC,SAAS,CAAC;QACpBR;QACAC;QACAC;QACAC;QACAM,SAAS;YAAEV,QAAQ;QAAK;QACxBK;QACAC;QACAC;QACAC;IACF;AACF,EAAC"}

View File

@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=fetchPreferences.d.ts.map

View File

@@ -0,0 +1,267 @@
"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __defProps = Object.defineProperties;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __propIsEnum = Object.prototype.propertyIsEnumerable;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __spreadValues = (a, b) => {
for (var prop in b || (b = {}))
if (__hasOwnProp.call(b, prop))
__defNormalProp(a, prop, b[prop]);
if (__getOwnPropSymbols)
for (var prop of __getOwnPropSymbols(b)) {
if (__propIsEnum.call(b, prop))
__defNormalProp(a, prop, b[prop]);
}
return a;
};
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var __async = (__this, __arguments, generator) => {
return new Promise((resolve, reject) => {
var fulfilled = (value) => {
try {
step(generator.next(value));
} catch (e) {
reject(e);
}
};
var rejected = (value) => {
try {
step(generator.throw(value));
} catch (e) {
reject(e);
}
};
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
step((generator = generator.apply(__this, __arguments)).next());
});
};
// src/node/index.ts
var node_exports = {};
__export(node_exports, {
plainTextSelectors: () => plainTextSelectors,
render: () => render,
renderAsync: () => renderAsync
});
module.exports = __toCommonJS(node_exports);
// src/node/render.tsx
var import_html_to_text = require("html-to-text");
var import_react = require("react");
// src/shared/plain-text-selectors.ts
var plainTextSelectors = [
{ selector: "img", format: "skip" },
{ selector: "#__react-email-preview", format: "skip" },
{
selector: "a",
options: { linkBrackets: false }
}
];
// src/shared/utils/pretty.ts
var import_html = __toESM(require("prettier/plugins/html"));
var import_standalone = require("prettier/standalone");
function recursivelyMapDoc(doc, callback) {
if (Array.isArray(doc)) {
return doc.map((innerDoc) => recursivelyMapDoc(innerDoc, callback));
}
if (typeof doc === "object") {
if (doc.type === "group") {
return __spreadProps(__spreadValues({}, doc), {
contents: recursivelyMapDoc(doc.contents, callback),
expandedStates: recursivelyMapDoc(
doc.expandedStates,
callback
)
});
}
if ("contents" in doc) {
return __spreadProps(__spreadValues({}, doc), {
contents: recursivelyMapDoc(doc.contents, callback)
});
}
if ("parts" in doc) {
return __spreadProps(__spreadValues({}, doc), {
parts: recursivelyMapDoc(doc.parts, callback)
});
}
if (doc.type === "if-break") {
return __spreadProps(__spreadValues({}, doc), {
breakContents: recursivelyMapDoc(doc.breakContents, callback),
flatContents: recursivelyMapDoc(doc.flatContents, callback)
});
}
}
return callback(doc);
}
var modifiedHtml = __spreadValues({}, import_html.default);
if (modifiedHtml.printers) {
const previousPrint = modifiedHtml.printers.html.print;
modifiedHtml.printers.html.print = (path, options, print, args) => {
const node = path.getNode();
const rawPrintingResult = previousPrint(path, options, print, args);
if (node.type === "ieConditionalComment") {
const printingResult = recursivelyMapDoc(rawPrintingResult, (doc) => {
if (typeof doc === "object" && doc.type === "line") {
return doc.soft ? "" : " ";
}
return doc;
});
return printingResult;
}
return rawPrintingResult;
};
}
var defaults = {
endOfLine: "lf",
tabWidth: 2,
plugins: [modifiedHtml],
bracketSameLine: true,
parser: "html"
};
var pretty = (str, options = {}) => {
return (0, import_standalone.format)(str.replaceAll("\0", ""), __spreadValues(__spreadValues({}, defaults), options));
};
// src/node/read-stream.ts
var import_node_stream = require("stream");
var decoder = new TextDecoder("utf-8");
var readStream = (stream) => __async(void 0, null, function* () {
let result = "";
if ("pipeTo" in stream) {
const writableStream = new WritableStream({
write(chunk) {
result += decoder.decode(chunk);
}
});
yield stream.pipeTo(writableStream);
} else {
const writable = new import_node_stream.Writable({
write(chunk, _encoding, callback) {
result += decoder.decode(chunk);
callback();
}
});
stream.pipe(writable);
yield new Promise((resolve, reject) => {
writable.on("error", reject);
writable.on("close", () => {
resolve();
});
});
}
return result;
});
// src/node/render.tsx
var import_jsx_runtime = require("react/jsx-runtime");
var render = (element, options) => __async(void 0, null, function* () {
const suspendedElement = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react.Suspense, { children: element });
const reactDOMServer = yield import("react-dom/server");
let html2;
if (Object.hasOwn(reactDOMServer, "renderToReadableStream")) {
html2 = yield readStream(
yield reactDOMServer.renderToReadableStream(suspendedElement)
);
} else {
yield new Promise((resolve, reject) => {
const stream = reactDOMServer.renderToPipeableStream(suspendedElement, {
onAllReady() {
return __async(this, null, function* () {
html2 = yield readStream(stream);
resolve();
});
},
onError(error) {
reject(error);
}
});
});
}
if (options == null ? void 0 : options.plainText) {
return (0, import_html_to_text.convert)(html2, __spreadValues({
selectors: plainTextSelectors
}, options.htmlToTextOptions));
}
const doctype = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';
const document = `${doctype}${html2.replace(/<!DOCTYPE.*?>/, "")}`;
if (options == null ? void 0 : options.pretty) {
return pretty(document);
}
return document;
});
// src/node/render-async.tsx
var import_html_to_text2 = require("html-to-text");
var import_react2 = require("react");
var import_jsx_runtime2 = require("react/jsx-runtime");
var renderAsync = (element, options) => __async(void 0, null, function* () {
const suspendedElement = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react2.Suspense, { children: element });
const reactDOMServer = yield import("react-dom/server");
let html2;
if (Object.hasOwn(reactDOMServer, "renderToReadableStream")) {
html2 = yield readStream(
yield reactDOMServer.renderToReadableStream(suspendedElement)
);
} else {
yield new Promise((resolve, reject) => {
const stream = reactDOMServer.renderToPipeableStream(suspendedElement, {
onAllReady() {
return __async(this, null, function* () {
html2 = yield readStream(stream);
resolve();
});
},
onError(error) {
reject(error);
}
});
});
}
if (options == null ? void 0 : options.plainText) {
return (0, import_html_to_text2.convert)(html2, __spreadValues({
selectors: plainTextSelectors
}, options.htmlToTextOptions));
}
const doctype = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';
const document = `${doctype}${html2.replace(/<!DOCTYPE.*?>/, "")}`;
if (options == null ? void 0 : options.pretty) {
return pretty(document);
}
return document;
});
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
plainTextSelectors,
render,
renderAsync
});

View File

@@ -0,0 +1,5 @@
var convert = require('./convert'),
func = convert('stubObject', require('../stubObject'), require('./_falseOptions'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -0,0 +1,153 @@
// lib/utils/bit-reader.ts
var BitReader = class {
constructor(input, endianness) {
this.input = input;
this.endianness = endianness;
// Skip the first 16 bits (2 bytes) of signature
this.byteOffset = 2;
this.bitOffset = 0;
}
/** Reads a specified number of bits, and move the offset */
getBits(length = 1) {
let result = 0;
let bitsRead = 0;
while (bitsRead < length) {
if (this.byteOffset >= this.input.length) {
throw new Error("Reached end of input");
}
const currentByte = this.input[this.byteOffset];
const bitsLeft = 8 - this.bitOffset;
const bitsToRead = Math.min(length - bitsRead, bitsLeft);
if (this.endianness === "little-endian") {
const mask = (1 << bitsToRead) - 1;
const bits = currentByte >> this.bitOffset & mask;
result |= bits << bitsRead;
} else {
const mask = (1 << bitsToRead) - 1 << 8 - this.bitOffset - bitsToRead;
const bits = (currentByte & mask) >> 8 - this.bitOffset - bitsToRead;
result = result << bitsToRead | bits;
}
bitsRead += bitsToRead;
this.bitOffset += bitsToRead;
if (this.bitOffset === 8) {
this.byteOffset++;
this.bitOffset = 0;
}
}
return result;
}
};
// lib/types/utils.ts
var decoder = new TextDecoder();
var toUTF8String = (input, start = 0, end = input.length) => decoder.decode(input.slice(start, end));
var toHexString = (input, start = 0, end = input.length) => input.slice(start, end).reduce((memo, i) => memo + `0${i.toString(16)}`.slice(-2), "");
var getView = (input, offset) => new DataView(input.buffer, input.byteOffset + offset);
var readUInt32BE = (input, offset = 0) => getView(input, offset).getUint32(0, false);
function readBox(input, offset) {
if (input.length - offset < 4) return;
const boxSize = readUInt32BE(input, offset);
if (input.length - offset < boxSize) return;
return {
name: toUTF8String(input, 4 + offset, 8 + offset),
offset,
size: boxSize
};
}
function findBox(input, boxName, currentOffset) {
while (currentOffset < input.length) {
const box = readBox(input, currentOffset);
if (!box) break;
if (box.name === boxName) return box;
currentOffset += box.size > 0 ? box.size : 8;
}
}
// lib/types/jxl-stream.ts
function calculateImageDimension(reader, isSmallImage) {
if (isSmallImage) {
return 8 * (1 + reader.getBits(5));
}
const sizeClass = reader.getBits(2);
const extraBits = [9, 13, 18, 30][sizeClass];
return 1 + reader.getBits(extraBits);
}
function calculateImageWidth(reader, isSmallImage, widthMode, height) {
if (isSmallImage && widthMode === 0) {
return 8 * (1 + reader.getBits(5));
}
if (widthMode === 0) {
return calculateImageDimension(reader, false);
}
const aspectRatios = [1, 1.2, 4 / 3, 1.5, 16 / 9, 5 / 4, 2];
return Math.floor(height * aspectRatios[widthMode - 1]);
}
var JXLStream = {
validate: (input) => {
return toHexString(input, 0, 2) === "ff0a";
},
calculate(input) {
const reader = new BitReader(input, "little-endian");
const isSmallImage = reader.getBits(1) === 1;
const height = calculateImageDimension(reader, isSmallImage);
const widthMode = reader.getBits(3);
const width = calculateImageWidth(reader, isSmallImage, widthMode, height);
return { width, height };
}
};
// lib/types/jxl.ts
function extractCodestream(input) {
const jxlcBox = findBox(input, "jxlc", 0);
if (jxlcBox) {
return input.slice(jxlcBox.offset + 8, jxlcBox.offset + jxlcBox.size);
}
const partialStreams = extractPartialStreams(input);
if (partialStreams.length > 0) {
return concatenateCodestreams(partialStreams);
}
return void 0;
}
function extractPartialStreams(input) {
const partialStreams = [];
let offset = 0;
while (offset < input.length) {
const jxlpBox = findBox(input, "jxlp", offset);
if (!jxlpBox) break;
partialStreams.push(
input.slice(jxlpBox.offset + 12, jxlpBox.offset + jxlpBox.size)
);
offset = jxlpBox.offset + jxlpBox.size;
}
return partialStreams;
}
function concatenateCodestreams(partialCodestreams) {
const totalLength = partialCodestreams.reduce(
(acc, curr) => acc + curr.length,
0
);
const codestream = new Uint8Array(totalLength);
let position = 0;
for (const partial of partialCodestreams) {
codestream.set(partial, position);
position += partial.length;
}
return codestream;
}
var JXL = {
validate: (input) => {
const boxType = toUTF8String(input, 4, 8);
if (boxType !== "JXL ") return false;
const ftypBox = findBox(input, "ftyp", 0);
if (!ftypBox) return false;
const brand = toUTF8String(input, ftypBox.offset + 8, ftypBox.offset + 12);
return brand === "jxl ";
},
calculate(input) {
const codestream = extractCodestream(input);
if (codestream) return JXLStream.calculate(codestream);
throw new Error("No codestream found in JXL container");
}
};
export { JXL };

View File

@@ -0,0 +1,9 @@
// This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
import { endOfMinute as fn } from "../endOfMinute.js";
import { convertToFP } from "./_lib/convertToFP.js";
export const endOfMinute = convertToFP(fn, 1);
// Fallback for modularized imports:
export default endOfMinute;

View File

@@ -0,0 +1,157 @@
import { getClient, shouldPropagateTraceForUrl, getTraceData, getBreadcrumbLogLevelFromHttpStatusCode, addBreadcrumb, parseUrl, getSanitizedUrlString } from '@sentry/core';
import { mergeBaggageHeaders } from './baggage.js';
const SENTRY_TRACE_HEADER = 'sentry-trace';
const SENTRY_BAGGAGE_HEADER = 'baggage';
// For baggage, we make sure to merge this into a possibly existing header
const BAGGAGE_HEADER_REGEX = /baggage: (.*)\r\n/;
/**
* Add trace propagation headers to an outgoing fetch/undici request.
*
* Checks if the request URL matches trace propagation targets,
* then injects sentry-trace, traceparent, and baggage headers.
*/
// eslint-disable-next-line complexity
function addTracePropagationHeadersToFetchRequest(
request,
propagationDecisionMap,
) {
const url = getAbsoluteUrl(request.origin, request.path);
// Manually add the trace headers, if it applies
// Note: We do not use `propagation.inject()` here, because our propagator relies on an active span
// Which we do not have in this case
// The propagator _may_ overwrite this, but this should be fine as it is the same data
const { tracePropagationTargets, propagateTraceparent } = getClient()?.getOptions() || {};
const addedHeaders = shouldPropagateTraceForUrl(url, tracePropagationTargets, propagationDecisionMap)
? getTraceData({ propagateTraceparent })
: undefined;
if (!addedHeaders) {
return;
}
const { 'sentry-trace': sentryTrace, baggage, traceparent } = addedHeaders;
// We do not want to overwrite existing headers here
// If the core UndiciInstrumentation is registered, it will already have set the headers
// We do not want to add any then
if (Array.isArray(request.headers)) {
const requestHeaders = request.headers;
// We do not want to overwrite existing header here, if it was already set
if (sentryTrace && !requestHeaders.includes(SENTRY_TRACE_HEADER)) {
requestHeaders.push(SENTRY_TRACE_HEADER, sentryTrace);
}
if (traceparent && !requestHeaders.includes('traceparent')) {
requestHeaders.push('traceparent', traceparent);
}
// For baggage, we make sure to merge this into a possibly existing header
const existingBaggagePos = requestHeaders.findIndex(header => header === SENTRY_BAGGAGE_HEADER);
if (baggage && existingBaggagePos === -1) {
requestHeaders.push(SENTRY_BAGGAGE_HEADER, baggage);
} else if (baggage) {
const existingBaggage = requestHeaders[existingBaggagePos + 1];
const merged = mergeBaggageHeaders(existingBaggage, baggage);
if (merged) {
requestHeaders[existingBaggagePos + 1] = merged;
}
}
} else {
const requestHeaders = request.headers;
// We do not want to overwrite existing header here, if it was already set
if (sentryTrace && !requestHeaders.includes(`${SENTRY_TRACE_HEADER}:`)) {
request.headers += `${SENTRY_TRACE_HEADER}: ${sentryTrace}\r\n`;
}
if (traceparent && !requestHeaders.includes('traceparent:')) {
request.headers += `traceparent: ${traceparent}\r\n`;
}
const existingBaggage = request.headers.match(BAGGAGE_HEADER_REGEX)?.[1];
if (baggage && !existingBaggage) {
request.headers += `${SENTRY_BAGGAGE_HEADER}: ${baggage}\r\n`;
} else if (baggage) {
const merged = mergeBaggageHeaders(existingBaggage, baggage);
if (merged) {
request.headers = request.headers.replace(BAGGAGE_HEADER_REGEX, `baggage: ${merged}\r\n`);
}
}
}
}
/** Add a breadcrumb for an outgoing fetch/undici request. */
function addFetchRequestBreadcrumb(request, response) {
const data = getBreadcrumbData(request);
const statusCode = response.statusCode;
const level = getBreadcrumbLogLevelFromHttpStatusCode(statusCode);
addBreadcrumb(
{
category: 'http',
data: {
status_code: statusCode,
...data,
},
type: 'http',
level,
},
{
event: 'response',
request,
response,
},
);
}
function getBreadcrumbData(request) {
try {
const url = getAbsoluteUrl(request.origin, request.path);
const parsedUrl = parseUrl(url);
const data = {
url: getSanitizedUrlString(parsedUrl),
'http.method': request.method || 'GET',
};
if (parsedUrl.search) {
data['http.query'] = parsedUrl.search;
}
if (parsedUrl.hash) {
data['http.fragment'] = parsedUrl.hash;
}
return data;
} catch {
return {};
}
}
/** Get the absolute URL from an origin and path. */
function getAbsoluteUrl(origin, path = '/') {
try {
const url = new URL(path, origin);
return url.toString();
} catch {
// fallback: Construct it on our own
const url = `${origin}`;
if (url.endsWith('/') && path.startsWith('/')) {
return `${url}${path.slice(1)}`;
}
if (!url.endsWith('/') && !path.startsWith('/')) {
return `${url}/${path}`;
}
return `${url}${path}`;
}
}
export { addFetchRequestBreadcrumb, addTracePropagationHeadersToFetchRequest, getAbsoluteUrl };
//# sourceMappingURL=outgoingFetchRequest.js.map

View File

@@ -0,0 +1,31 @@
{
"name": "@esbuild-kit/esm-loader",
"version": "2.6.5",
"publishConfig": {
"access": "public"
},
"description": "Node.js loader for compiling TypeScript modules to ESM",
"keywords": [
"esbuild",
"loader",
"node",
"esm",
"typescript"
],
"license": "MIT",
"repository": "esbuild-kit/esm-loader",
"author": {
"name": "Hiroki Osame",
"email": "hiroki.osame@gmail.com"
},
"type": "module",
"files": [
"dist"
],
"main": "./dist/index.js",
"exports": "./dist/index.js",
"dependencies": {
"@esbuild-kit/core-utils": "^3.3.2",
"get-tsconfig": "^4.7.0"
}
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"debug-build.js","sources":["../../src/debug-build.ts"],"sourcesContent":["declare const __DEBUG_BUILD__: boolean;\n\n/**\n * This serves as a build time flag that will be true by default, but false in non-debug builds or if users replace `__SENTRY_DEBUG__` in their generated code.\n *\n * ATTENTION: This constant must never cross package boundaries (i.e. be exported) to guarantee that it can be used for tree shaking.\n */\nexport const DEBUG_BUILD = __DEBUG_BUILD__;\n"],"names":[],"mappings":";;AAEA;AACA;AACA;AACA;AACA;AACO,MAAM,WAAA,IAAc,OAAA,gBAAA,KAAA,WAAA,IAAA,gBAAA;;;;"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"egg.js","sources":["../../../src/icons/egg.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Egg\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTIgMjJjNi4yMy0uMDUgNy44Ny01LjU3IDcuNS0xMC0uMzYtNC4zNC0zLjk1LTkuOTYtNy41LTEwLTMuNTUuMDQtNy4xNCA1LjY2LTcuNSAxMC0uMzcgNC40MyAxLjI3IDkuOTUgNy41IDEweiIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/egg\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Egg = createLucideIcon('Egg', [\n [\n 'path',\n {\n d: 'M12 22c6.23-.05 7.87-5.57 7.5-10-.36-4.34-3.95-9.96-7.5-10-3.55.04-7.14 5.66-7.5 10-.37 4.43 1.27 9.95 7.5 10z',\n key: '1c39pg',\n },\n ],\n]);\n\nexport default Egg;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,iBAAiB,KAAO,CAAA,CAAA,CAAA;AAAA,CAClC,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACH,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACP,CAAA,CAAA,CAAA,CAAA;AAAA,CACF,CAAA,CAAA;AACF,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,44 @@
import { Client } from '../client';
import { Event, EventHint } from './event';
/** Integration interface */
export interface Integration {
/**
* The name of the integration.
*/
name: string;
/**
* This hook is only called once, even if multiple clients are created.
* It does not receives any arguments, and should only use for e.g. global monkey patching and similar things.
*/
setupOnce?(): void;
/**
* Set up an integration for the given client.
* Receives the client as argument.
*
* Whenever possible, prefer this over `setupOnce`, as that is only run for the first client,
* whereas `setup` runs for each client. Only truly global things (e.g. registering global handlers)
* should be done in `setupOnce`.
*/
setup?(client: Client): void;
/**
* This hook is triggered after `setupOnce()` and `setup()` have been called for all integrations.
* You can use it if it is important that all other integrations have been run before.
*/
afterAllSetup?(client: Client): void;
/**
* An optional hook that allows to preprocess an event _before_ it is passed to all other event processors.
*/
preprocessEvent?(event: Event, hint: EventHint | undefined, client: Client): void;
/**
* An optional hook that allows to process an event.
* Return `null` to drop the event, or mutate the event & return it.
* This receives the client that the integration was installed for as third argument.
*/
processEvent?(event: Event, hint: EventHint, client: Client): Event | null | PromiseLike<Event | null>;
}
/**
* An integration in function form.
* This is expected to return an integration.
*/
export type IntegrationFn<IntegrationType = Integration> = (...rest: any[]) => IntegrationType;
//# sourceMappingURL=integration.d.ts.map

View File

@@ -0,0 +1,8 @@
/**
* Collects the text content of a given element.
*
* @param node the element
* @param trim whether to remove trailing whitespace chars
* @param singleSpaces whether to convert multiple whitespace chars into a single space character
*/
export default function text(node: HTMLElement | null, trim?: boolean, singleSpaces?: boolean): string;

View File

@@ -0,0 +1,28 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Drama = createLucideIcon("Drama", [
["path", { d: "M10 11h.01", key: "d2at3l" }],
["path", { d: "M14 6h.01", key: "k028ub" }],
["path", { d: "M18 6h.01", key: "1v4wsw" }],
["path", { d: "M6.5 13.1h.01", key: "1748ia" }],
["path", { d: "M22 5c0 9-4 12-6 12s-6-3-6-12c0-2 2-3 6-3s6 1 6 3", key: "172yzv" }],
["path", { d: "M17.4 9.9c-.8.8-2 .8-2.8 0", key: "1obv0w" }],
[
"path",
{
d: "M10.1 7.1C9 7.2 7.7 7.7 6 8.6c-3.5 2-4.7 3.9-3.7 5.6 4.5 7.8 9.5 8.4 11.2 7.4.9-.5 1.9-2.1 1.9-4.7",
key: "rqjl8i"
}
],
["path", { d: "M9.1 16.5c.3-1.1 1.4-1.7 2.4-1.4", key: "1mr6wy" }]
]);
export { Drama as default };
//# sourceMappingURL=drama.js.map

View File

@@ -0,0 +1,11 @@
import { entityKind } from "../entity.js";
import type { SQL, SQLWrapper } from "../sql/index.js";
export declare abstract class TypedQueryBuilder<TSelection, TResult = unknown, TConfig = unknown> implements SQLWrapper {
static readonly [entityKind]: string;
_: {
selectedFields: TSelection;
result: TResult;
config?: TConfig;
};
abstract getSQL(): SQL;
}

View File

@@ -0,0 +1,199 @@
import {List, ValueObject} from 'immutable';
import {SassBoolean} from './boolean';
import {SassCalculation} from './calculation';
import {SassColor} from './color';
import {SassFunction} from './function';
import {ListSeparator} from './list';
import {SassMap} from './map';
import {SassMixin} from './mixin';
import {SassNumber} from './number';
import {SassString} from './string';
export {SassArgumentList} from './argument_list';
export {SassBoolean, sassTrue, sassFalse} from './boolean';
export {
SassCalculation,
CalculationValue,
CalculationOperator,
CalculationOperation,
CalculationInterpolation,
} from './calculation';
export {SassColor} from './color';
export {SassFunction} from './function';
export {SassList, ListSeparator} from './list';
export {SassMap} from './map';
export {SassMixin} from './mixin';
export {SassNumber} from './number';
export {SassString} from './string';
/**
* Sass's [`null` value](https://sass-lang.com/documentation/values/null).
*
* @category Custom Function
*/
export const sassNull: Value;
/**
* The abstract base class of Sass's value types.
*
* This is passed to and returned by {@link CustomFunction}s, which are passed
* into the Sass implementation using {@link Options.functions}.
*
* @category Custom Function
*/
export abstract class Value implements ValueObject {
protected constructor();
/**
* This value as a list.
*
* All SassScript values can be used as lists. Maps count as lists of pairs,
* and all other values count as single-value lists.
*
* @returns An immutable {@link List} from the [`immutable`
* package](https://immutable-js.com/).
*/
get asList(): List<Value>;
/**
* Whether this value as a list has brackets.
*
* All SassScript values can be used as lists. Maps count as lists of pairs,
* and all other values count as single-value lists.
*/
get hasBrackets(): boolean;
/**
* Whether the value counts as `true` in an `@if` statement and other
* contexts.
*/
get isTruthy(): boolean;
/**
* Returns JavaScript's `null` value if this is {@link sassNull}, and returns
* `this` otherwise.
*/
get realNull(): null | Value;
/**
* The separator for this value as a list.
*
* All SassScript values can be used as lists. Maps count as lists of pairs,
* and all other values count as single-value lists.
*/
get separator(): ListSeparator;
/**
* Converts `sassIndex` into a JavaScript-style index into the list returned
* by {@link asList}.
*
* Sass indexes are one-based, while JavaScript indexes are zero-based. Sass
* indexes may also be negative in order to index from the end of the list.
*
* @param sassIndex - The Sass-style index into this as a list.
* @param name - The name of the function argument `sassIndex` came from
* (without the `$`) if it came from an argument. Used for error reporting.
* @throws `Error` If `sassIndex` isn't a number, if that number isn't an
* integer, or if that integer isn't a valid index for {@link asList}.
*/
sassIndexToListIndex(sassIndex: Value, name?: string): number;
/**
* Returns the value at index `index` in this value as a list, or `undefined`
* if `index` isn't valid for this list.
*
* All SassScript values can be used as lists. Maps count as lists of pairs,
* and all other values count as single-value lists.
*
* This is a shorthand for `this.asList.get(index)`, although it may be more
* efficient in some cases.
*
* **Heads up!** This method uses the same indexing conventions as the
* `immutable` package: unlike Sass the index of the first element is 0, but
* like Sass negative numbers index from the end of the list.
*/
get(index: number): Value | undefined;
/**
* Throws if `this` isn't a {@link SassBoolean}.
*
* **Heads up!** Functions should generally use {@link isTruthy} rather than
* requiring a literal boolean.
*
* @param name - The name of the function argument `this` came from (without
* the `$`) if it came from an argument. Used for error reporting.
*/
assertBoolean(name?: string): SassBoolean;
/**
* Throws if `this` isn't a {@link SassCalculation}.
*
* @param name - The name of the function argument `this` came from (without
* the `$`) if it came from an argument. Used for error reporting.
*/
assertCalculation(name?: string): SassCalculation;
/**
* Throws if `this` isn't a {@link SassColor}.
*
* @param name - The name of the function argument `this` came from (without
* the `$`) if it came from an argument. Used for error reporting.
*/
assertColor(name?: string): SassColor;
/**
* Throws if `this` isn't a {@link SassFunction}.
*
* @param name - The name of the function argument `this` came from (without
* the `$`) if it came from an argument. Used for error reporting.
*/
assertFunction(name?: string): SassFunction;
/**
* Throws if `this` isn't a {@link SassMap}.
*
* @param name - The name of the function argument `this` came from (without
* the `$`) if it came from an argument. Used for error reporting.
*/
assertMap(name?: string): SassMap;
/**
* Throws if `this` isn't a {@link SassMixin}.
*
* @param name - The name of the function argument `this` came from (without
* the `$`) if it came from an argument. Used for error reporting.
*/
assertMixin(name?: string): SassMixin;
/**
* Throws if `this` isn't a {@link SassNumber}.
*
* @param name - The name of the function argument `this` came from (without
* the `$`) if it came from an argument. Used for error reporting.
*/
assertNumber(name?: string): SassNumber;
/**
* Throws if `this` isn't a {@link SassString}.
*
* @param name - The name of the function argument `this` came from (without
* the `$`) if it came from an argument. Used for error reporting.
*/
assertString(name?: string): SassString;
/**
* Returns `this` as a map if it counts as one (empty lists count as empty
* maps) or `null` if it doesn't.
*/
tryMap(): SassMap | null;
/** Returns whether `this` represents the same value as `other`. */
equals(other: Value): boolean;
/** Returns a hash code that can be used to store `this` in a hash map. */
hashCode(): number;
/** @hidden */
toString(): string;
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/elements/WhereBuilder/Condition/Relationship/index.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAuD,MAAM,OAAO,CAAA;AAG3E,OAAO,KAAK,EAAE,uBAAuB,IAAI,KAAK,EAAqB,MAAM,YAAY,CAAA;AAQrF,OAAO,cAAc,CAAA;AAOrB,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAwZ9C,CAAA"}

View File

@@ -0,0 +1 @@
!function(){if("undefined"!=typeof Prism){var r={tab:/\t/,crlf:/\r\n/,lf:/\n/,cr:/\r/,space:/ /};Prism.hooks.add("before-highlight",(function(r){i(r.grammar)}))}function e(r,a){var n=r[a];switch(Prism.util.type(n)){case"RegExp":var t={};r[a]={pattern:n,inside:t},i(t);break;case"Array":for(var f=0,s=n.length;f<s;f++)e(n,f);break;default:i(t=n.inside||(n.inside={}))}}function i(a){if(a&&!a.tab){for(var n in r)r.hasOwnProperty(n)&&(a[n]=r[n]);for(var n in a)a.hasOwnProperty(n)&&!r[n]&&("rest"===n?i(a.rest):e(a,n))}}}();

View File

@@ -0,0 +1,4 @@
{
"main": "../../cjs/_read_only_error.cjs",
"module": "../../esm/_read_only_error.js"
}

View File

@@ -0,0 +1,59 @@
import type { JoinQuery, PopulateType, SelectType, Where } from '../../types/index.js';
import type { JoinParams } from '../sanitizeJoinParams.js';
type RawParams = {
[key: string]: unknown;
autosave?: string;
data?: string;
depth?: string;
draft?: string;
field?: string;
flattenLocales?: string;
joins?: JoinParams;
limit?: string;
overrideLock?: string;
page?: string;
pagination?: string;
populate?: unknown;
publishAllLocales?: string;
publishSpecificLocale?: string;
select?: unknown;
selectedLocales?: string;
sort?: string | string[];
trash?: string;
unpublishAllLocales?: string;
where?: Where;
};
type ParsedParams = {
autosave?: boolean;
data?: Record<string, unknown>;
depth?: number;
draft?: boolean;
field?: string;
flattenLocales?: boolean;
joins?: JoinQuery;
limit?: number;
overrideLock?: boolean;
page?: number;
pagination?: boolean;
populate?: PopulateType;
publishAllLocales?: boolean;
publishSpecificLocale?: string;
select?: SelectType;
selectedLocales?: string[];
sort?: string[];
trash?: boolean;
unpublishAllLocales?: boolean;
where?: Where;
} & Record<string, unknown>;
export declare const booleanParams: string[];
export declare const numberParams: string[];
/**
* Takes raw query parameters and parses them into the correct types that Payload expects.
* Examples:
* a. `draft` provided as a string of "true" is converted to a boolean
* b. `depth` provided as a string of "0" is converted to a number
* c. `sort` provided as a comma-separated string or array is converted to an array of strings
*/
export declare const parseParams: (params: RawParams) => ParsedParams;
export {};
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1,294 @@
import * as net from 'node:net';
import { SpanKind, context, trace, diag } from '@opentelemetry/api';
import { InstrumentationNodeModuleDefinition, InstrumentationNodeModuleFile, isWrapped, safeExecuteInTheMiddle } from '@opentelemetry/instrumentation';
import { ATTR_DB_OPERATION_NAME, ATTR_DB_NAMESPACE, ATTR_DB_COLLECTION_NAME, ATTR_DB_SYSTEM_NAME, ATTR_SERVER_ADDRESS, ATTR_SERVER_PORT } from '@opentelemetry/semantic-conventions';
// Inline minimal types used from `shimmer` to avoid importing shimmer's types directly.
// We only need the shape for `wrap` and `unwrap` used in this file.
// eslint-disable-next-line @typescript-eslint/no-explicit-any
/**
*
* @param tracer - Opentelemetry Tracer
* @param firestoreSupportedVersions - supported version of firebase/firestore
* @param wrap - reference to native instrumentation wrap function
* @param unwrap - reference to native instrumentation wrap function
*/
function patchFirestore(
tracer,
firestoreSupportedVersions,
wrap,
unwrap,
config,
) {
const defaultFirestoreSpanCreationHook = () => {};
let firestoreSpanCreationHook = defaultFirestoreSpanCreationHook;
const configFirestoreSpanCreationHook = config.firestoreSpanCreationHook;
if (typeof configFirestoreSpanCreationHook === 'function') {
firestoreSpanCreationHook = (span) => {
safeExecuteInTheMiddle(
() => configFirestoreSpanCreationHook(span),
error => {
if (!error) {
return;
}
diag.error(error?.message);
},
true,
);
};
}
const moduleFirestoreCJS = new InstrumentationNodeModuleDefinition(
'@firebase/firestore',
firestoreSupportedVersions,
// eslint-disable-next-line @typescript-eslint/no-explicit-any
(moduleExports) => wrapMethods(moduleExports, wrap, unwrap, tracer, firestoreSpanCreationHook),
);
const files = [
'@firebase/firestore/dist/lite/index.node.cjs.js',
'@firebase/firestore/dist/lite/index.node.mjs.js',
'@firebase/firestore/dist/lite/index.rn.esm2017.js',
'@firebase/firestore/dist/lite/index.cjs.js',
];
for (const file of files) {
moduleFirestoreCJS.files.push(
new InstrumentationNodeModuleFile(
file,
firestoreSupportedVersions,
moduleExports => wrapMethods(moduleExports, wrap, unwrap, tracer, firestoreSpanCreationHook),
moduleExports => unwrapMethods(moduleExports, unwrap),
),
);
}
return moduleFirestoreCJS;
}
function wrapMethods(
// eslint-disable-next-line @typescript-eslint/no-explicit-any
moduleExports,
wrap,
unwrap,
tracer,
firestoreSpanCreationHook,
// eslint-disable-next-line @typescript-eslint/no-explicit-any
) {
unwrapMethods(moduleExports, unwrap);
wrap(moduleExports, 'addDoc', patchAddDoc(tracer, firestoreSpanCreationHook));
wrap(moduleExports, 'getDocs', patchGetDocs(tracer, firestoreSpanCreationHook));
wrap(moduleExports, 'setDoc', patchSetDoc(tracer, firestoreSpanCreationHook));
wrap(moduleExports, 'deleteDoc', patchDeleteDoc(tracer, firestoreSpanCreationHook));
return moduleExports;
}
function unwrapMethods(
// eslint-disable-next-line @typescript-eslint/no-explicit-any
moduleExports,
unwrap,
// eslint-disable-next-line @typescript-eslint/no-explicit-any
) {
for (const method of ['addDoc', 'getDocs', 'setDoc', 'deleteDoc']) {
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
if (isWrapped(moduleExports[method])) {
unwrap(moduleExports, method);
}
}
return moduleExports;
}
function patchAddDoc(
tracer,
firestoreSpanCreationHook,
)
{
return function addDoc(original) {
return function (
reference,
data,
) {
const span = startDBSpan(tracer, 'addDoc', reference);
firestoreSpanCreationHook(span);
return executeContextWithSpan(span, () => {
return original(reference, data);
});
};
};
}
function patchDeleteDoc(
tracer,
firestoreSpanCreationHook,
)
{
return function deleteDoc(original) {
return function (reference) {
const span = startDBSpan(tracer, 'deleteDoc', reference.parent || reference);
firestoreSpanCreationHook(span);
return executeContextWithSpan(span, () => {
return original(reference);
});
};
};
}
function patchGetDocs(
tracer,
firestoreSpanCreationHook,
)
{
return function getDocs(original) {
return function (
reference,
) {
const span = startDBSpan(tracer, 'getDocs', reference);
firestoreSpanCreationHook(span);
return executeContextWithSpan(span, () => {
return original(reference);
});
};
};
}
function patchSetDoc(
tracer,
firestoreSpanCreationHook,
)
{
return function setDoc(original) {
return function (
reference,
data,
options,
) {
const span = startDBSpan(tracer, 'setDoc', reference.parent || reference);
firestoreSpanCreationHook(span);
return executeContextWithSpan(span, () => {
return typeof options !== 'undefined' ? original(reference, data, options) : original(reference, data);
});
};
};
}
function executeContextWithSpan(span, callback) {
return context.with(trace.setSpan(context.active(), span), () => {
return safeExecuteInTheMiddle(
() => {
return callback();
},
err => {
if (err) {
span.recordException(err);
}
span.end();
},
true,
);
});
}
function startDBSpan(
tracer,
spanName,
reference,
) {
const span = tracer.startSpan(`${spanName} ${reference.path}`, { kind: SpanKind.CLIENT });
addAttributes(span, reference);
span.setAttribute(ATTR_DB_OPERATION_NAME, spanName);
return span;
}
/**
* Gets the server address and port attributes from the Firestore settings.
* It's best effort to extract the address and port from the settings, especially for IPv6.
* @param span - The span to set attributes on.
* @param settings - The Firestore settings containing host information.
*/
function getPortAndAddress(settings)
{
let address;
let port;
if (typeof settings.host === 'string') {
if (settings.host.startsWith('[')) {
// IPv6 addresses can be enclosed in square brackets, e.g., [2001:db8::1]:8080
if (settings.host.endsWith(']')) {
// IPv6 with square brackets without port
address = settings.host.replace(/^\[|\]$/g, '');
} else if (settings.host.includes(']:')) {
// IPv6 with square brackets with port
const lastColonIndex = settings.host.lastIndexOf(':');
if (lastColonIndex !== -1) {
address = settings.host.slice(1, lastColonIndex).replace(/^\[|\]$/g, '');
port = settings.host.slice(lastColonIndex + 1);
}
}
} else {
// IPv4 or IPv6 without square brackets
// If it's an IPv6 address without square brackets, we assume it does not have a port.
if (net.isIPv6(settings.host)) {
address = settings.host;
}
// If it's an IPv4 address, we can extract the port if it exists.
else {
const lastColonIndex = settings.host.lastIndexOf(':');
if (lastColonIndex !== -1) {
address = settings.host.slice(0, lastColonIndex);
port = settings.host.slice(lastColonIndex + 1);
} else {
address = settings.host;
}
}
}
}
return {
address: address,
port: port ? parseInt(port, 10) : undefined,
};
}
function addAttributes(
span,
reference,
) {
const firestoreApp = reference.firestore.app;
const firestoreOptions = firestoreApp.options;
const json = reference.firestore.toJSON() || {};
const settings = json.settings || {};
const attributes = {
[ATTR_DB_COLLECTION_NAME]: reference.path,
[ATTR_DB_NAMESPACE]: firestoreApp.name,
[ATTR_DB_SYSTEM_NAME]: 'firebase.firestore',
'firebase.firestore.type': reference.type,
'firebase.firestore.options.projectId': firestoreOptions.projectId,
'firebase.firestore.options.appId': firestoreOptions.appId,
'firebase.firestore.options.messagingSenderId': firestoreOptions.messagingSenderId,
'firebase.firestore.options.storageBucket': firestoreOptions.storageBucket,
};
const { address, port } = getPortAndAddress(settings);
if (address) {
attributes[ATTR_SERVER_ADDRESS] = address;
}
if (port) {
attributes[ATTR_SERVER_PORT] = port;
}
span.setAttributes(attributes);
}
export { getPortAndAddress, patchFirestore };
//# sourceMappingURL=firestore.js.map

View File

@@ -0,0 +1,9 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
export { default } from './square-arrow-down-right.js';
//# sourceMappingURL=arrow-down-right-square.js.map

View File

@@ -0,0 +1,213 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var common_exports = {};
__export(common_exports, {
GelArray: () => GelArray,
GelArrayBuilder: () => GelArrayBuilder,
GelColumn: () => GelColumn,
GelColumnBuilder: () => GelColumnBuilder,
GelExtraConfigColumn: () => GelExtraConfigColumn,
IndexedColumn: () => IndexedColumn
});
module.exports = __toCommonJS(common_exports);
var import_column_builder = require("../../column-builder.cjs");
var import_column = require("../../column.cjs");
var import_entity = require("../../entity.cjs");
var import_foreign_keys = require("../foreign-keys.cjs");
var import_tracing_utils = require("../../tracing-utils.cjs");
var import_unique_constraint = require("../unique-constraint.cjs");
class GelColumnBuilder extends import_column_builder.ColumnBuilder {
foreignKeyConfigs = [];
static [import_entity.entityKind] = "GelColumnBuilder";
array(size) {
return new GelArrayBuilder(this.config.name, this, size);
}
references(ref, actions = {}) {
this.foreignKeyConfigs.push({ ref, actions });
return this;
}
unique(name, config) {
this.config.isUnique = true;
this.config.uniqueName = name;
this.config.uniqueType = config?.nulls;
return this;
}
generatedAlwaysAs(as) {
this.config.generated = {
as,
type: "always",
mode: "stored"
};
return this;
}
/** @internal */
buildForeignKeys(column, table) {
return this.foreignKeyConfigs.map(({ ref, actions }) => {
return (0, import_tracing_utils.iife)(
(ref2, actions2) => {
const builder = new import_foreign_keys.ForeignKeyBuilder(() => {
const foreignColumn = ref2();
return { columns: [column], foreignColumns: [foreignColumn] };
});
if (actions2.onUpdate) {
builder.onUpdate(actions2.onUpdate);
}
if (actions2.onDelete) {
builder.onDelete(actions2.onDelete);
}
return builder.build(table);
},
ref,
actions
);
});
}
/** @internal */
buildExtraConfigColumn(table) {
return new GelExtraConfigColumn(table, this.config);
}
}
class GelColumn extends import_column.Column {
constructor(table, config) {
if (!config.uniqueName) {
config.uniqueName = (0, import_unique_constraint.uniqueKeyName)(table, [config.name]);
}
super(table, config);
this.table = table;
}
static [import_entity.entityKind] = "GelColumn";
}
class GelExtraConfigColumn extends GelColumn {
static [import_entity.entityKind] = "GelExtraConfigColumn";
getSQLType() {
return this.getSQLType();
}
indexConfig = {
order: this.config.order ?? "asc",
nulls: this.config.nulls ?? "last",
opClass: this.config.opClass
};
defaultConfig = {
order: "asc",
nulls: "last",
opClass: void 0
};
asc() {
this.indexConfig.order = "asc";
return this;
}
desc() {
this.indexConfig.order = "desc";
return this;
}
nullsFirst() {
this.indexConfig.nulls = "first";
return this;
}
nullsLast() {
this.indexConfig.nulls = "last";
return this;
}
/**
* ### PostgreSQL documentation quote
*
* > An operator class with optional parameters can be specified for each column of an index.
* The operator class identifies the operators to be used by the index for that column.
* For example, a B-tree index on four-byte integers would use the int4_ops class;
* this operator class includes comparison functions for four-byte integers.
* In practice the default operator class for the column's data type is usually sufficient.
* The main point of having operator classes is that for some data types, there could be more than one meaningful ordering.
* For example, we might want to sort a complex-number data type either by absolute value or by real part.
* We could do this by defining two operator classes for the data type and then selecting the proper class when creating an index.
* More information about operator classes check:
*
* ### Useful links
* https://www.postgresql.org/docs/current/sql-createindex.html
*
* https://www.postgresql.org/docs/current/indexes-opclass.html
*
* https://www.postgresql.org/docs/current/xindex.html
*
* ### Additional types
* If you have the `Gel_vector` extension installed in your database, you can use the
* `vector_l2_ops`, `vector_ip_ops`, `vector_cosine_ops`, `vector_l1_ops`, `bit_hamming_ops`, `bit_jaccard_ops`, `halfvec_l2_ops`, `sparsevec_l2_ops` options, which are predefined types.
*
* **You can always specify any string you want in the operator class, in case Drizzle doesn't have it natively in its types**
*
* @param opClass
* @returns
*/
op(opClass) {
this.indexConfig.opClass = opClass;
return this;
}
}
class IndexedColumn {
static [import_entity.entityKind] = "IndexedColumn";
constructor(name, keyAsName, type, indexConfig) {
this.name = name;
this.keyAsName = keyAsName;
this.type = type;
this.indexConfig = indexConfig;
}
name;
keyAsName;
type;
indexConfig;
}
class GelArrayBuilder extends GelColumnBuilder {
static [import_entity.entityKind] = "GelArrayBuilder";
constructor(name, baseBuilder, size) {
super(name, "array", "GelArray");
this.config.baseBuilder = baseBuilder;
this.config.size = size;
}
/** @internal */
build(table) {
const baseColumn = this.config.baseBuilder.build(table);
return new GelArray(
table,
this.config,
baseColumn
);
}
}
class GelArray extends GelColumn {
constructor(table, config, baseColumn, range) {
super(table, config);
this.baseColumn = baseColumn;
this.range = range;
this.size = config.size;
}
size;
static [import_entity.entityKind] = "GelArray";
getSQLType() {
return `${this.baseColumn.getSQLType()}[${typeof this.size === "number" ? this.size : ""}]`;
}
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
GelArray,
GelArrayBuilder,
GelColumn,
GelColumnBuilder,
GelExtraConfigColumn,
IndexedColumn
});
//# sourceMappingURL=common.cjs.map

View File

@@ -0,0 +1,5 @@
var convert = require('./convert'),
func = convert('spreadFrom', require('../spread'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -0,0 +1,59 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const isBuild = require('../utils/isBuild.js');
const wrapperUtils = require('../utils/wrapperUtils.js');
/**
* Create a wrapped version of the user's exported `getServerSideProps` function
*
* @param origGetServerSideProps The user's `getServerSideProps` function
* @param parameterizedRoute The page's parameterized route
* @returns A wrapped version of the function
*/
function wrapGetServerSidePropsWithSentry(
origGetServerSideProps,
parameterizedRoute,
) {
return new Proxy(origGetServerSideProps, {
apply: async (wrappingTarget, thisArg, args) => {
if (isBuild.isBuild()) {
return wrappingTarget.apply(thisArg, args);
}
const [context] = args;
const { req, res } = context;
const errorWrappedGetServerSideProps = wrapperUtils.withErrorInstrumentation(wrappingTarget);
const tracedGetServerSideProps = wrapperUtils.withTracedServerSideDataFetcher(errorWrappedGetServerSideProps, req, res, {
dataFetcherRouteName: parameterizedRoute,
requestedRouteName: parameterizedRoute,
dataFetchingMethodName: 'getServerSideProps',
});
const {
data: serverSideProps,
baggage,
sentryTrace,
}
= await (tracedGetServerSideProps.apply(thisArg, args) );
if (typeof serverSideProps === 'object' && serverSideProps !== null && 'props' in serverSideProps) {
// The Next.js serializer throws on undefined values so we need to guard for it (#12102)
if (sentryTrace) {
(serverSideProps.props )._sentryTraceData = sentryTrace;
}
// The Next.js serializer throws on undefined values so we need to guard for it (#12102)
if (baggage) {
(serverSideProps.props )._sentryBaggage = baggage;
}
}
return serverSideProps;
},
});
}
exports.wrapGetServerSidePropsWithSentry = wrapGetServerSidePropsWithSentry;
//# sourceMappingURL=wrapGetServerSidePropsWithSentry.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/config/orderable/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAoB,gBAAgB,EAAE,MAAM,mCAAmC,CAAA;AAE3F,OAAO,KAAK,EAA4B,eAAe,EAAE,MAAM,aAAa,CAAA;AAU5E;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc,WAAY,eAAe,SAuDrD,CAAA;AAED,eAAO,MAAM,yBAAyB,eACxB,gBAAgB,uBACP,MAAM,EAAE,SAgE9B,CAAA;AAED;;;GAGG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC,cAAc,EAAE,MAAM,CAAA;IACtB,UAAU,EAAE,MAAM,EAAE,CAAA;IACpB,YAAY,EAAE,SAAS,GAAG,MAAM,CAAA;IAChC,kBAAkB,EAAE,MAAM,CAAA;IAC1B,MAAM,EAAE;QACN,EAAE,EAAE,MAAM,CAAA;QACV,GAAG,EAAE,MAAM,CAAA;KACZ,CAAA;CACF,CAAA;AAED,eAAO,MAAM,oBAAoB,WAAY,eAAe,SAkL3D,CAAA"}

View File

@@ -0,0 +1,9 @@
{
'targets': [
{
'target_name': 'nothing',
'type': 'static_library',
'sources': [ 'nothing.c' ]
}
]
}

View File

@@ -0,0 +1,25 @@
import type { QueryPromise, SQL } from 'drizzle-orm';
import type { SQLiteSelect } from 'drizzle-orm/sqlite-core';
import type { DrizzleAdapter, DrizzleTransaction, GenericColumn } from '../types.js';
import type { BuildQueryJoinAliases } from './buildQuery.js';
type Args = {
adapter: DrizzleAdapter;
db: DrizzleAdapter['drizzle'] | DrizzleTransaction;
forceRun?: boolean;
hasAggregates?: boolean;
joins: BuildQueryJoinAliases;
query?: (args: {
query: SQLiteSelect;
}) => SQLiteSelect;
selectFields: Record<string, GenericColumn>;
tableName: string;
where: SQL;
};
/**
* Selects distinct records from a table only if there are joins that need to be used, otherwise return null
*/
export declare const selectDistinct: ({ adapter, db, forceRun, hasAggregates, joins, query: queryModifier, selectFields, tableName, where, }: Args) => QueryPromise<{
id: number | string;
}[] & Record<string, GenericColumn>>;
export {};
//# sourceMappingURL=selectDistinct.d.ts.map

View File

@@ -0,0 +1,297 @@
import { GraphQLBoolean, GraphQLEnumType, GraphQLFloat, GraphQLInputObjectType, GraphQLInt, GraphQLList, GraphQLString } from 'graphql';
import { DateTimeResolver, EmailAddressResolver } from 'graphql-scalars';
import { optionIsObject } from 'payload/shared';
import { GraphQLJSON } from '../packages/graphql-type-json/index.js';
import { combineParentName } from '../utilities/combineParentName.js';
import { formatName } from '../utilities/formatName.js';
import { operators } from './operators.js';
const GeoJSONObject = new GraphQLInputObjectType({
name: 'GeoJSONObject',
fields: {
type: {
type: GraphQLString
},
coordinates: {
type: GraphQLJSON
}
}
});
const defaults = {
checkbox: {
operators: [
...operators.equality.map((operator)=>({
name: operator,
type: GraphQLBoolean
}))
]
},
code: {
operators: [
...[
...operators.equality,
...operators.partial
].map((operator)=>({
name: operator,
type: GraphQLString
}))
]
},
date: {
operators: [
...[
...operators.equality,
...operators.comparison,
'like'
].map((operator)=>({
name: operator,
type: DateTimeResolver
}))
]
},
email: {
operators: [
...[
...operators.equality,
...operators.partial,
...operators.contains
].map((operator)=>({
name: operator,
type: EmailAddressResolver
}))
]
},
json: {
operators: [
...[
...operators.equality,
...operators.partial,
...operators.geojson
].map((operator)=>({
name: operator,
type: GraphQLJSON
}))
]
},
number: {
operators: [
...[
...operators.equality,
...operators.comparison
].map((operator)=>({
name: operator,
type: (field)=>{
return field?.name === 'id' ? GraphQLInt : GraphQLFloat;
}
}))
]
},
point: {
operators: [
...[
...operators.equality,
...operators.comparison,
...operators.geo
].map((operator)=>({
name: operator,
type: new GraphQLList(GraphQLFloat)
})),
...operators.geojson.map((operator)=>({
name: operator,
/**
* @example:
* within: {
* type: "Polygon",
* coordinates: [[
* [0.0, 0.0],
* [1.0, 1.0],
* [1.0, 0.0],
* [0.0, 0.0],
* ]],
* }
* @example
* intersects: {
* type: "Point",
* coordinates: [ 0.5, 0.5 ]
* }
*/ type: GeoJSONObject
}))
]
},
radio: {
operators: [
...[
...operators.equality,
...operators.partial
].map((operator)=>({
name: operator,
type: (field, parentName)=>new GraphQLEnumType({
name: `${combineParentName(parentName, field.name)}_Input`,
values: field.options.reduce((values, option)=>{
if (optionIsObject(option)) {
return {
...values,
[formatName(option.value)]: {
value: option.value
}
};
}
return {
...values,
[formatName(option)]: {
value: option
}
};
}, {})
})
}))
]
},
relationship: {
operators: [
...[
...operators.equality,
...operators.contains
].map((operator)=>({
name: operator,
type: GraphQLJSON
}))
]
},
richText: {
operators: [
...[
...operators.equality,
...operators.partial
].map((operator)=>({
name: operator,
type: GraphQLJSON
}))
]
},
select: {
operators: [
...[
...operators.equality,
...operators.contains
].map((operator)=>({
name: operator,
type: (field, parentName)=>new GraphQLEnumType({
name: `${combineParentName(parentName, field.name)}_Input`,
values: field.options.reduce((values, option)=>{
if (optionIsObject(option)) {
return {
...values,
[formatName(option.value)]: {
value: option.value
}
};
}
return {
...values,
[formatName(option)]: {
value: option
}
};
}, {})
})
}))
]
},
text: {
operators: [
...[
...operators.equality,
...operators.partial,
...operators.contains
].map((operator)=>({
name: operator,
type: GraphQLString
}))
]
},
textarea: {
operators: [
...[
...operators.equality,
...operators.partial
].map((operator)=>({
name: operator,
type: GraphQLString
}))
]
},
upload: {
operators: [
...[
...operators.equality,
...operators.contains
].map((operator)=>({
name: operator,
type: GraphQLJSON
}))
]
}
};
const listOperators = [
'in',
'not_in',
'all'
];
const gqlTypeCache = {};
/**
* In GraphQL, you can use "where" as an argument to filter a collection. Example:
* { Posts(where: { title: { equals: "Hello" } }) { text } }
* This function defines the operators for a field's condition in the "where" argument of the collection (it thus gets called for every field).
* For example, in the example above, it would control that
* - "equals" is a valid operator for the "title" field
* - the accepted type of the "equals" argument has to be a string.
*
* @param field the field for which their valid operators inside a "where" argument is being defined
* @param parentName the name of the parent field (if any)
* @returns all the operators (including their types) which can be used as a condition for a given field inside a where
*/ export const withOperators = (field, parentName)=>{
if (!defaults?.[field.type]) {
throw new Error(`Error: ${field.type} has no defaults configured.`);
}
const name = `${combineParentName(parentName, field.name)}_operator`;
// Get the default operators for the field type which are hard-coded above
const fieldOperators = [
...defaults[field.type].operators
];
if (!('required' in field) || !field.required) {
fieldOperators.push({
name: 'exists',
type: fieldOperators[0].type
});
}
return new GraphQLInputObjectType({
name,
fields: fieldOperators.reduce((objectTypeFields, operator)=>{
// Get the type of the operator. It can be either static, or dynamic (=> a function)
let gqlType = typeof operator.type === 'function' ? operator.type(field, parentName) : operator.type;
// GraphQL does not allow types with duplicate names, so we use this cache to avoid that.
// Without this, select and radio fields would have the same name, and GraphQL would throw an error
// This usually only happens if a custom type is returned from the operator.type function
if (typeof operator.type === 'function' && 'name' in gqlType) {
if (gqlTypeCache[gqlType.name]) {
gqlType = gqlTypeCache[gqlType.name];
} else {
gqlTypeCache[gqlType.name] = gqlType;
}
}
if (listOperators.includes(operator.name)) {
gqlType = new GraphQLList(gqlType);
} else if (operator.name === 'exists') {
gqlType = GraphQLBoolean;
}
return {
...objectTypeFields,
[operator.name]: {
type: gqlType
}
};
}, {})
});
};
//# sourceMappingURL=withOperators.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"cloud-cog.js","sources":["../../../src/icons/cloud-cog.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name CloudCog\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8Y2lyY2xlIGN4PSIxMiIgY3k9IjE3IiByPSIzIiAvPgogIDxwYXRoIGQ9Ik00LjIgMTUuMUE3IDcgMCAxIDEgMTUuNzEgOGgxLjc5YTQuNSA0LjUgMCAwIDEgMi41IDguMiIgLz4KICA8cGF0aCBkPSJtMTUuNyAxOC40LS45LS4zIiAvPgogIDxwYXRoIGQ9Im05LjIgMTUuOS0uOS0uMyIgLz4KICA8cGF0aCBkPSJtMTAuNiAyMC43LjMtLjkiIC8+CiAgPHBhdGggZD0ibTEzLjEgMTQuMi4zLS45IiAvPgogIDxwYXRoIGQ9Im0xMy42IDIwLjctLjQtMSIgLz4KICA8cGF0aCBkPSJtMTAuOCAxNC4zLS40LTEiIC8+CiAgPHBhdGggZD0ibTguMyAxOC42IDEtLjQiIC8+CiAgPHBhdGggZD0ibTE0LjcgMTUuOCAxLS40IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/cloud-cog\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst CloudCog = createLucideIcon('CloudCog', [\n ['circle', { cx: '12', cy: '17', r: '3', key: '1spfwm' }],\n ['path', { d: 'M4.2 15.1A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.2', key: 'zaobp' }],\n ['path', { d: 'm15.7 18.4-.9-.3', key: '4qxpbn' }],\n ['path', { d: 'm9.2 15.9-.9-.3', key: '17q7o2' }],\n ['path', { d: 'm10.6 20.7.3-.9', key: '1pf4s2' }],\n ['path', { d: 'm13.1 14.2.3-.9', key: '1mnuqm' }],\n ['path', { d: 'm13.6 20.7-.4-1', key: '1jpd1m' }],\n ['path', { d: 'm10.8 14.3-.4-1', key: '17ugyy' }],\n ['path', { d: 'm8.3 18.6 1-.4', key: 's42vdx' }],\n ['path', { d: 'm14.7 15.8 1-.4', key: '2wizun' }],\n]);\n\nexport default CloudCog;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAW,iBAAiB,UAAY,CAAA,CAAA,CAAA;AAAA,CAC5C,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,IAAA,CAAM,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CAAA,CACxD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA0D,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,SAAS,CAAA,CAAA;AAAA,CAAA,CACtF,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAoB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACjD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAmB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAChD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAmB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAChD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAmB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAChD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAmB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAChD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAmB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAChD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAkB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC/C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAmB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAClD,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,97 @@
export {};
interface AddEventListenerOptions extends EventListenerOptions {
once?: boolean;
passive?: boolean;
signal?: AbortSignal;
}
type _CustomEvent<T = any> = typeof globalThis extends { onmessage: any } ? {} : CustomEvent<T>;
interface CustomEvent<T = any> extends Event {
readonly detail: T;
}
interface CustomEventInit<T = any> extends EventInit {
detail?: T;
}
type _Event = typeof globalThis extends { onmessage: any } ? {} : Event;
interface Event {
readonly bubbles: boolean;
cancelBubble: boolean;
readonly cancelable: boolean;
readonly composed: boolean;
readonly currentTarget: EventTarget | null;
readonly defaultPrevented: boolean;
readonly eventPhase: 0 | 2;
readonly isTrusted: boolean;
returnValue: boolean;
readonly srcElement: EventTarget | null;
readonly target: EventTarget | null;
readonly timeStamp: number;
readonly type: string;
composedPath(): [EventTarget?];
initEvent(type: string, bubbles?: boolean, cancelable?: boolean): void;
preventDefault(): void;
stopImmediatePropagation(): void;
stopPropagation(): void;
}
interface EventInit {
bubbles?: boolean;
cancelable?: boolean;
composed?: boolean;
}
interface EventListener {
(evt: Event): void;
}
interface EventListenerObject {
handleEvent(object: Event): void;
}
type _EventListenerOptions = typeof globalThis extends { onmessage: any } ? {} : EventListenerOptions;
interface EventListenerOptions {
capture?: boolean;
}
type _EventTarget = typeof globalThis extends { onmessage: any } ? {} : EventTarget;
interface EventTarget {
addEventListener(
type: string,
listener: EventListener | EventListenerObject,
options?: AddEventListenerOptions | boolean,
): void;
dispatchEvent(event: Event): boolean;
removeEventListener(
type: string,
listener: EventListener | EventListenerObject,
options?: EventListenerOptions | boolean,
): void;
}
declare global {
interface CustomEvent<T = any> extends _CustomEvent<T> {}
var CustomEvent: typeof globalThis extends { onmessage: any; CustomEvent: infer T } ? T
: {
prototype: CustomEvent;
new<T>(type: string, eventInitDict?: CustomEventInit<T>): CustomEvent<T>;
};
interface Event extends _Event {}
var Event: typeof globalThis extends { onmessage: any; Event: infer T } ? T
: {
prototype: Event;
new(type: string, eventInitDict?: EventInit): Event;
};
interface EventListenerOptions extends _EventListenerOptions {}
interface EventTarget extends _EventTarget {}
var EventTarget: typeof globalThis extends { onmessage: any; EventTarget: infer T } ? T
: {
prototype: EventTarget;
new(): EventTarget;
};
}

View File

@@ -0,0 +1,8 @@
"use strict";
exports.differenceInCalendarWeeks = void 0;
var _index = require("../differenceInCalendarWeeks.cjs");
var _index2 = require("./_lib/convertToFP.cjs"); // This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
const differenceInCalendarWeeks = (exports.differenceInCalendarWeeks = (0,
_index2.convertToFP)(_index.differenceInCalendarWeeks, 2));

View File

@@ -0,0 +1,62 @@
(function (Prism) {
// Pascaligo is a layer 2 smart contract language for the tezos blockchain
var braces = /\((?:[^()]|\((?:[^()]|\([^()]*\))*\))*\)/.source;
var type = /(?:\b\w+(?:<braces>)?|<braces>)/.source.replace(/<braces>/g, function () { return braces; });
var pascaligo = Prism.languages.pascaligo = {
'comment': /\(\*[\s\S]+?\*\)|\/\/.*/,
'string': {
pattern: /(["'`])(?:\\[\s\S]|(?!\1)[^\\])*\1|\^[a-z]/i,
greedy: true
},
'class-name': [
{
pattern: RegExp(/(\btype\s+\w+\s+is\s+)<type>/.source.replace(/<type>/g, function () { return type; }), 'i'),
lookbehind: true,
inside: null // see below
},
{
pattern: RegExp(/<type>(?=\s+is\b)/.source.replace(/<type>/g, function () { return type; }), 'i'),
inside: null // see below
},
{
pattern: RegExp(/(:\s*)<type>/.source.replace(/<type>/g, function () { return type; })),
lookbehind: true,
inside: null // see below
}
],
'keyword': {
pattern: /(^|[^&])\b(?:begin|block|case|const|else|end|fail|for|from|function|if|is|nil|of|remove|return|skip|then|type|var|while|with)\b/i,
lookbehind: true
},
'boolean': {
pattern: /(^|[^&])\b(?:False|True)\b/i,
lookbehind: true
},
'builtin': {
pattern: /(^|[^&])\b(?:bool|int|list|map|nat|record|string|unit)\b/i,
lookbehind: true
},
'function': /\b\w+(?=\s*\()/,
'number': [
// Hexadecimal, octal and binary
/%[01]+|&[0-7]+|\$[a-f\d]+/i,
// Decimal
/\b\d+(?:\.\d+)?(?:e[+-]?\d+)?(?:mtz|n)?/i
],
'operator': /->|=\/=|\.\.|\*\*|:=|<[<=>]?|>[>=]?|[+\-*\/]=?|[@^=|]|\b(?:and|mod|or)\b/,
'punctuation': /\(\.|\.\)|[()\[\]:;,.{}]/
};
var classNameInside = ['comment', 'keyword', 'builtin', 'operator', 'punctuation'].reduce(function (accum, key) {
accum[key] = pascaligo[key];
return accum;
}, {});
pascaligo['class-name'].forEach(function (p) {
p.inside = classNameInside;
});
}(Prism));

View File

@@ -0,0 +1 @@
{"version":3,"file":"spanTypes.d.ts","sourceRoot":"","sources":["../../../src/utils/spanTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC9E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAG7C;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,SAAS,YAAY,EAC7D,IAAI,EAAE,QAAQ,GACb,IAAI,IAAI,QAAQ,GAAG;IAAE,UAAU,EAAE,YAAY,CAAC,YAAY,CAAC,CAAA;CAAE,CAG/D;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,QAAQ,SAAS,YAAY,EAAE,IAAI,EAAE,QAAQ,GAAG,IAAI,IAAI,QAAQ,GAAG;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,CAGhH;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,QAAQ,SAAS,YAAY,EACzD,IAAI,EAAE,QAAQ,GACb,IAAI,IAAI,QAAQ,GAAG;IAAE,MAAM,EAAE,UAAU,CAAA;CAAE,CAG3C;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,QAAQ,SAAS,YAAY,EAAE,IAAI,EAAE,QAAQ,GAAG,IAAI,IAAI,QAAQ,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAG9G;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,QAAQ,SAAS,YAAY,EAC3D,IAAI,EAAE,QAAQ,GACb,IAAI,IAAI,QAAQ,GAAG;IAAE,YAAY,EAAE,MAAM,CAAA;CAAE,CAG7C;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,QAAQ,SAAS,YAAY,EACzD,IAAI,EAAE,QAAQ,GACb,IAAI,IAAI,QAAQ,GAAG;IAAE,MAAM,EAAE,UAAU,EAAE,CAAA;CAAE,CAG7C"}

View File

@@ -0,0 +1,31 @@
"use strict";
exports.lastDayOfYear = lastDayOfYear;
var _index = require("./toDate.js");
/**
* @name lastDayOfYear
* @category Year Helpers
* @summary Return the last day of a year for the given date.
*
* @description
* Return the last day of a year for the given date.
* The result will be in the local timezone.
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
*
* @param date - The original date
*
* @returns The last day of a year
*
* @example
* // The last day of a year for 2 September 2014 11:55:00:
* const result = lastDayOfYear(new Date(2014, 8, 2, 11, 55, 00))
* //=> Wed Dec 31 2014 00:00:00
*/
function lastDayOfYear(date) {
const _date = (0, _index.toDate)(date);
const year = _date.getFullYear();
_date.setFullYear(year + 1, 0, 0);
_date.setHours(0, 0, 0, 0);
return _date;
}

View File

@@ -0,0 +1,11 @@
"use strict";
var _to_primitive = require("./_to_primitive.cjs");
var _type_of = require("./_type_of.cjs");
function _to_property_key(arg) {
var key = _to_primitive._(arg, "string");
return _type_of._(key) === "symbol" ? key : String(key);
}
exports._ = _to_property_key;

View File

@@ -0,0 +1 @@
{"version":3,"file":"radical.js","sources":["../../../src/icons/radical.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Radical\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMyAxMmgzLjI4YTEgMSAwIDAgMSAuOTQ4LjY4NGwyLjI5OCA3LjkzNGEuNS41IDAgMCAwIC45Ni0uMDQ0TDEzLjgyIDQuNzcxQTEgMSAwIDAgMSAxNC43OTIgNEgyMSIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/radical\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Radical = createLucideIcon('Radical', [\n [\n 'path',\n {\n d: 'M3 12h3.28a1 1 0 0 1 .948.684l2.298 7.934a.5.5 0 0 0 .96-.044L13.82 4.771A1 1 0 0 1 14.792 4H21',\n key: '1mqj8i',\n },\n ],\n]);\n\nexport default Radical;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAU,iBAAiB,SAAW,CAAA,CAAA,CAAA;AAAA,CAC1C,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACH,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACP,CAAA,CAAA,CAAA,CAAA;AAAA,CACF,CAAA,CAAA;AACF,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"fieldHasChanges.spec.js","names":["describe","it","expect","fieldHasChanges","a","b","toBe","key","undefined"],"sources":["../../../../../src/views/Version/RenderFieldsToDiff/utilities/fieldHasChanges.spec.ts"],"sourcesContent":["import { describe, it, expect } from 'vitest'\n\nimport { fieldHasChanges } from './fieldHasChanges.js'\n\ndescribe('hasChanges', () => {\n it('should return false for identical values', () => {\n const a = 'value'\n const b = 'value'\n expect(fieldHasChanges(a, b)).toBe(false)\n })\n it('should return true for different values', () => {\n const a = 1\n const b = 2\n expect(fieldHasChanges(a, b)).toBe(true)\n })\n\n it('should return false for identical objects', () => {\n const a = { key: 'value' }\n const b = { key: 'value' }\n expect(fieldHasChanges(a, b)).toBe(false)\n })\n\n it('should return true for different objects', () => {\n const a = { key: 'value' }\n const b = { key: 'differentValue' }\n expect(fieldHasChanges(a, b)).toBe(true)\n })\n\n it('should handle undefined values', () => {\n const a = { key: 'value' }\n const b = undefined\n expect(fieldHasChanges(a, b)).toBe(true)\n })\n\n it('should handle null values', () => {\n const a = { key: 'value' }\n const b = null\n expect(fieldHasChanges(a, b)).toBe(true)\n })\n})\n"],"mappings":"AAAA,SAASA,QAAQ,EAAEC,EAAE,EAAEC,MAAM,QAAQ;AAErC,SAASC,eAAe,QAAQ;AAEhCH,QAAA,CAAS,cAAc;EACrBC,EAAA,CAAG,4CAA4C;IAC7C,MAAMG,CAAA,GAAI;IACV,MAAMC,CAAA,GAAI;IACVH,MAAA,CAAOC,eAAA,CAAgBC,CAAA,EAAGC,CAAA,GAAIC,IAAI,CAAC;EACrC;EACAL,EAAA,CAAG,2CAA2C;IAC5C,MAAMG,CAAA,GAAI;IACV,MAAMC,CAAA,GAAI;IACVH,MAAA,CAAOC,eAAA,CAAgBC,CAAA,EAAGC,CAAA,GAAIC,IAAI,CAAC;EACrC;EAEAL,EAAA,CAAG,6CAA6C;IAC9C,MAAMG,CAAA,GAAI;MAAEG,GAAA,EAAK;IAAQ;IACzB,MAAMF,CAAA,GAAI;MAAEE,GAAA,EAAK;IAAQ;IACzBL,MAAA,CAAOC,eAAA,CAAgBC,CAAA,EAAGC,CAAA,GAAIC,IAAI,CAAC;EACrC;EAEAL,EAAA,CAAG,4CAA4C;IAC7C,MAAMG,CAAA,GAAI;MAAEG,GAAA,EAAK;IAAQ;IACzB,MAAMF,CAAA,GAAI;MAAEE,GAAA,EAAK;IAAiB;IAClCL,MAAA,CAAOC,eAAA,CAAgBC,CAAA,EAAGC,CAAA,GAAIC,IAAI,CAAC;EACrC;EAEAL,EAAA,CAAG,kCAAkC;IACnC,MAAMG,CAAA,GAAI;MAAEG,GAAA,EAAK;IAAQ;IACzB,MAAMF,CAAA,GAAIG,SAAA;IACVN,MAAA,CAAOC,eAAA,CAAgBC,CAAA,EAAGC,CAAA,GAAIC,IAAI,CAAC;EACrC;EAEAL,EAAA,CAAG,6BAA6B;IAC9B,MAAMG,CAAA,GAAI;MAAEG,GAAA,EAAK;IAAQ;IACzB,MAAMF,CAAA,GAAI;IACVH,MAAA,CAAOC,eAAA,CAAgBC,CAAA,EAAGC,CAAA,GAAIC,IAAI,CAAC;EACrC;AACF","ignoreList":[]}

View File

@@ -0,0 +1,190 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = default_1;
const util = __importStar(require("../core/util.cjs"));
function getBelarusianPlural(count, one, few, many) {
const absCount = Math.abs(count);
const lastDigit = absCount % 10;
const lastTwoDigits = absCount % 100;
if (lastTwoDigits >= 11 && lastTwoDigits <= 19) {
return many;
}
if (lastDigit === 1) {
return one;
}
if (lastDigit >= 2 && lastDigit <= 4) {
return few;
}
return many;
}
const error = () => {
const Sizable = {
string: {
unit: {
one: "сімвал",
few: "сімвалы",
many: "сімвалаў",
},
verb: "мець",
},
array: {
unit: {
one: "элемент",
few: "элементы",
many: "элементаў",
},
verb: "мець",
},
set: {
unit: {
one: "элемент",
few: "элементы",
many: "элементаў",
},
verb: "мець",
},
file: {
unit: {
one: "байт",
few: "байты",
many: "байтаў",
},
verb: "мець",
},
};
function getSizing(origin) {
return Sizable[origin] ?? null;
}
const parsedType = (data) => {
const t = typeof data;
switch (t) {
case "number": {
return Number.isNaN(data) ? "NaN" : "лік";
}
case "object": {
if (Array.isArray(data)) {
return "масіў";
}
if (data === null) {
return "null";
}
if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
return data.constructor.name;
}
}
}
return t;
};
const Nouns = {
regex: "увод",
email: "email адрас",
url: "URL",
emoji: "эмодзі",
uuid: "UUID",
uuidv4: "UUIDv4",
uuidv6: "UUIDv6",
nanoid: "nanoid",
guid: "GUID",
cuid: "cuid",
cuid2: "cuid2",
ulid: "ULID",
xid: "XID",
ksuid: "KSUID",
datetime: "ISO дата і час",
date: "ISO дата",
time: "ISO час",
duration: "ISO працягласць",
ipv4: "IPv4 адрас",
ipv6: "IPv6 адрас",
cidrv4: "IPv4 дыяпазон",
cidrv6: "IPv6 дыяпазон",
base64: "радок у фармаце base64",
base64url: "радок у фармаце base64url",
json_string: "JSON радок",
e164: "нумар E.164",
jwt: "JWT",
template_literal: "увод",
};
return (issue) => {
switch (issue.code) {
case "invalid_type":
return `Няправільны ўвод: чакаўся ${issue.expected}, атрымана ${parsedType(issue.input)}`;
case "invalid_value":
if (issue.values.length === 1)
return `Няправільны ўвод: чакалася ${util.stringifyPrimitive(issue.values[0])}`;
return `Няправільны варыянт: чакаўся адзін з ${util.joinValues(issue.values, "|")}`;
case "too_big": {
const adj = issue.inclusive ? "<=" : "<";
const sizing = getSizing(issue.origin);
if (sizing) {
const maxValue = Number(issue.maximum);
const unit = getBelarusianPlural(maxValue, sizing.unit.one, sizing.unit.few, sizing.unit.many);
return `Занадта вялікі: чакалася, што ${issue.origin ?? "значэнне"} павінна ${sizing.verb} ${adj}${issue.maximum.toString()} ${unit}`;
}
return `Занадта вялікі: чакалася, што ${issue.origin ?? "значэнне"} павінна быць ${adj}${issue.maximum.toString()}`;
}
case "too_small": {
const adj = issue.inclusive ? ">=" : ">";
const sizing = getSizing(issue.origin);
if (sizing) {
const minValue = Number(issue.minimum);
const unit = getBelarusianPlural(minValue, sizing.unit.one, sizing.unit.few, sizing.unit.many);
return `Занадта малы: чакалася, што ${issue.origin} павінна ${sizing.verb} ${adj}${issue.minimum.toString()} ${unit}`;
}
return `Занадта малы: чакалася, што ${issue.origin} павінна быць ${adj}${issue.minimum.toString()}`;
}
case "invalid_format": {
const _issue = issue;
if (_issue.format === "starts_with")
return `Няправільны радок: павінен пачынацца з "${_issue.prefix}"`;
if (_issue.format === "ends_with")
return `Няправільны радок: павінен заканчвацца на "${_issue.suffix}"`;
if (_issue.format === "includes")
return `Няправільны радок: павінен змяшчаць "${_issue.includes}"`;
if (_issue.format === "regex")
return `Няправільны радок: павінен адпавядаць шаблону ${_issue.pattern}`;
return `Няправільны ${Nouns[_issue.format] ?? issue.format}`;
}
case "not_multiple_of":
return `Няправільны лік: павінен быць кратным ${issue.divisor}`;
case "unrecognized_keys":
return `Нераспазнаны ${issue.keys.length > 1 ? "ключы" : "ключ"}: ${util.joinValues(issue.keys, ", ")}`;
case "invalid_key":
return `Няправільны ключ у ${issue.origin}`;
case "invalid_union":
return "Няправільны ўвод";
case "invalid_element":
return `Няправільнае значэнне ў ${issue.origin}`;
default:
return `Няправільны ўвод`;
}
};
};
function default_1() {
return {
localeError: error(),
};
}

View File

@@ -0,0 +1 @@
export{default as useLocale}from"./react-server/useLocale.js";export{default as useTranslations}from"./react-server/useTranslations.js";export{default as useFormatter}from"./react-server/useFormatter.js";export{default as useNow}from"./react-server/useNow.js";export{default as useTimeZone}from"./react-server/useTimeZone.js";export{default as useMessages}from"./react-server/useMessages.js";export{default as NextIntlClientProvider}from"./react-server/NextIntlClientProviderServer.js";export{default as useExtracted}from"./react-server/useExtracted.js";export*from"use-intl/core";

View File

@@ -0,0 +1,32 @@
{
'targets': [
{
'target_name': 'node_addon_api',
'type': 'none',
'sources': [ 'napi.h', 'napi-inl.h' ],
'direct_dependent_settings': {
'include_dirs': [ '.' ],
'includes': ['noexcept.gypi'],
}
},
{
'target_name': 'node_addon_api_except',
'type': 'none',
'sources': [ 'napi.h', 'napi-inl.h' ],
'direct_dependent_settings': {
'include_dirs': [ '.' ],
'includes': ['except.gypi'],
}
},
{
'target_name': 'node_addon_api_maybe',
'type': 'none',
'sources': [ 'napi.h', 'napi-inl.h' ],
'direct_dependent_settings': {
'include_dirs': [ '.' ],
'includes': ['noexcept.gypi'],
'defines': ['NODE_ADDON_API_ENABLE_MAYBE']
}
},
]
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"undo.js","sources":["../../../src/icons/undo.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Undo\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMyA3djZoNiIgLz4KICA8cGF0aCBkPSJNMjEgMTdhOSA5IDAgMCAwLTktOSA5IDkgMCAwIDAtNiAyLjNMMyAxMyIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/undo\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Undo = createLucideIcon('Undo', [\n ['path', { d: 'M3 7v6h6', key: '1v2h90' }],\n ['path', { d: 'M21 17a9 9 0 0 0-9-9 9 9 0 0 0-6 2.3L3 13', key: '1r6uu6' }],\n]);\n\nexport default Undo;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,iBAAiB,MAAQ,CAAA,CAAA,CAAA;AAAA,CAAA,CACpC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA6C,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC5E,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,64 @@
import { GraphQLError } from '../../error/GraphQLError.mjs';
/**
* Unique operation types
*
* A GraphQL document is only valid if it has only one type per operation.
*/
export function UniqueOperationTypesRule(context) {
const schema = context.getSchema();
const definedOperationTypes = Object.create(null);
const existingOperationTypes = schema
? {
query: schema.getQueryType(),
mutation: schema.getMutationType(),
subscription: schema.getSubscriptionType(),
}
: {};
return {
SchemaDefinition: checkOperationTypes,
SchemaExtension: checkOperationTypes,
};
function checkOperationTypes(node) {
var _node$operationTypes;
// See: https://github.com/graphql/graphql-js/issues/2203
/* c8 ignore next */
const operationTypesNodes =
(_node$operationTypes = node.operationTypes) !== null &&
_node$operationTypes !== void 0
? _node$operationTypes
: [];
for (const operationType of operationTypesNodes) {
const operation = operationType.operation;
const alreadyDefinedOperationType = definedOperationTypes[operation];
if (existingOperationTypes[operation]) {
context.reportError(
new GraphQLError(
`Type for ${operation} already defined in the schema. It cannot be redefined.`,
{
nodes: operationType,
},
),
);
} else if (alreadyDefinedOperationType) {
context.reportError(
new GraphQLError(
`There can be only one ${operation} type in schema.`,
{
nodes: [alreadyDefinedOperationType, operationType],
},
),
);
} else {
definedOperationTypes[operation] = operationType;
}
}
return false;
}
}

View File

@@ -0,0 +1,112 @@
import { addUniqueItem, removeItem } from '../../utils/array.mjs';
class NodeStack {
constructor() {
this.members = [];
}
add(node) {
addUniqueItem(this.members, node);
node.scheduleRender();
}
remove(node) {
removeItem(this.members, node);
if (node === this.prevLead) {
this.prevLead = undefined;
}
if (node === this.lead) {
const prevLead = this.members[this.members.length - 1];
if (prevLead) {
this.promote(prevLead);
}
}
}
relegate(node) {
const indexOfNode = this.members.findIndex((member) => node === member);
if (indexOfNode === 0)
return false;
/**
* Find the next projection node that is present
*/
let prevLead;
for (let i = indexOfNode; i >= 0; i--) {
const member = this.members[i];
if (member.isPresent !== false) {
prevLead = member;
break;
}
}
if (prevLead) {
this.promote(prevLead);
return true;
}
else {
return false;
}
}
promote(node, preserveFollowOpacity) {
const prevLead = this.lead;
if (node === prevLead)
return;
this.prevLead = prevLead;
this.lead = node;
node.show();
if (prevLead) {
prevLead.instance && prevLead.scheduleRender();
node.scheduleRender();
node.resumeFrom = prevLead;
if (preserveFollowOpacity) {
node.resumeFrom.preserveOpacity = true;
}
if (prevLead.snapshot) {
node.snapshot = prevLead.snapshot;
node.snapshot.latestValues =
prevLead.animationValues || prevLead.latestValues;
}
if (node.root && node.root.isUpdating) {
node.isLayoutDirty = true;
}
const { crossfade } = node.options;
if (crossfade === false) {
prevLead.hide();
}
/**
* TODO:
* - Test border radius when previous node was deleted
* - boxShadow mixing
* - Shared between element A in scrolled container and element B (scroll stays the same or changes)
* - Shared between element A in transformed container and element B (transform stays the same or changes)
* - Shared between element A in scrolled page and element B (scroll stays the same or changes)
* ---
* - Crossfade opacity of root nodes
* - layoutId changes after animation
* - layoutId changes mid animation
*/
}
}
exitAnimationComplete() {
this.members.forEach((node) => {
const { options, resumingFrom } = node;
options.onExitComplete && options.onExitComplete();
if (resumingFrom) {
resumingFrom.options.onExitComplete &&
resumingFrom.options.onExitComplete();
}
});
}
scheduleRender() {
this.members.forEach((node) => {
node.instance && node.scheduleRender(false);
});
}
/**
* Clear any leads that have been removed this render to prevent them from being
* used in future animations and to prevent memory leaks
*/
removeLeadSnapshot() {
if (this.lead && this.lead.snapshot) {
this.lead.snapshot = undefined;
}
}
}
export { NodeStack };

View File

@@ -0,0 +1,11 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
'use strict'
const LexicalUtils = process.env.NODE_ENV !== 'production' ? require('./LexicalUtils.dev.js') : require('./LexicalUtils.prod.js');
module.exports = LexicalUtils;

View File

@@ -0,0 +1 @@
{"version":3,"file":"deleteExistingArrayRows.d.ts","sourceRoot":"","sources":["../../src/upsertRow/deleteExistingArrayRows.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAErE,KAAK,IAAI,GAAG;IACV,OAAO,EAAE,cAAc,CAAA;IACvB,EAAE,EAAE,cAAc,CAAC,SAAS,CAAC,GAAG,kBAAkB,CAAA;IAClD,QAAQ,EAAE,OAAO,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,eAAO,MAAM,uBAAuB,0CAKjC,IAAI,KAAG,OAAO,CAAC,IAAI,CAUrB,CAAA"}

View File

@@ -0,0 +1 @@
export { _ as default } from "../esm/_class_apply_descriptor_set.js";

View File

@@ -0,0 +1,14 @@
{
"$schema": "https://json-schema.org/draft/2019-09/schema",
"$id": "https://json-schema.org/draft/2019-09/meta/format",
"$vocabulary": {
"https://json-schema.org/draft/2019-09/vocab/format": true
},
"$recursiveAnchor": true,
"title": "Format vocabulary meta-schema",
"type": ["object", "boolean"],
"properties": {
"format": {"type": "string"}
}
}

View File

@@ -0,0 +1,73 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.merge = merge;
exports.normalizeReplacements = normalizeReplacements;
exports.validate = validate;
const _excluded = ["placeholderWhitelist", "placeholderPattern", "preserveComments", "syntacticPlaceholders"];
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
function merge(a, b) {
const {
placeholderWhitelist = a.placeholderWhitelist,
placeholderPattern = a.placeholderPattern,
preserveComments = a.preserveComments,
syntacticPlaceholders = a.syntacticPlaceholders
} = b;
return {
parser: Object.assign({}, a.parser, b.parser),
placeholderWhitelist,
placeholderPattern,
preserveComments,
syntacticPlaceholders
};
}
function validate(opts) {
if (opts != null && typeof opts !== "object") {
throw new Error("Unknown template options.");
}
const _ref = opts || {},
{
placeholderWhitelist,
placeholderPattern,
preserveComments,
syntacticPlaceholders
} = _ref,
parser = _objectWithoutPropertiesLoose(_ref, _excluded);
if (placeholderWhitelist != null && !(placeholderWhitelist instanceof Set)) {
throw new Error("'.placeholderWhitelist' must be a Set, null, or undefined");
}
if (placeholderPattern != null && !(placeholderPattern instanceof RegExp) && placeholderPattern !== false) {
throw new Error("'.placeholderPattern' must be a RegExp, false, null, or undefined");
}
if (preserveComments != null && typeof preserveComments !== "boolean") {
throw new Error("'.preserveComments' must be a boolean, null, or undefined");
}
if (syntacticPlaceholders != null && typeof syntacticPlaceholders !== "boolean") {
throw new Error("'.syntacticPlaceholders' must be a boolean, null, or undefined");
}
if (syntacticPlaceholders === true && (placeholderWhitelist != null || placeholderPattern != null)) {
throw new Error("'.placeholderWhitelist' and '.placeholderPattern' aren't compatible" + " with '.syntacticPlaceholders: true'");
}
return {
parser,
placeholderWhitelist: placeholderWhitelist || undefined,
placeholderPattern: placeholderPattern == null ? undefined : placeholderPattern,
preserveComments: preserveComments == null ? undefined : preserveComments,
syntacticPlaceholders: syntacticPlaceholders == null ? undefined : syntacticPlaceholders
};
}
function normalizeReplacements(replacements) {
if (Array.isArray(replacements)) {
return replacements.reduce((acc, replacement, i) => {
acc["$" + i] = replacement;
return acc;
}, {});
} else if (typeof replacements === "object" || replacements == null) {
return replacements || undefined;
}
throw new Error("Template replacements must be an array, object, null, or undefined");
}
//# sourceMappingURL=options.js.map

View File

@@ -0,0 +1,9 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var index = require('./loader/index.js');
exports.default = index.default;

View File

@@ -0,0 +1 @@
{"version":3,"file":"source-map-tree.d.ts","sourceRoot":"","sources":["../src/source-map-tree.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAgD,MAAM,yBAAyB,CAAC;AAGnG,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAE1D,MAAM,MAAM,sBAAsB,GAAG;IACnC,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,MAAM,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,GAAG,EAAE,IAAI,CAAC;IACV,OAAO,EAAE,OAAO,EAAE,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,MAAM,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG;IACtB,GAAG,EAAE,QAAQ,CAAC;IACd,OAAO,EAAE,OAAO,EAAE,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,IAAI,CAAC;IACd,MAAM,EAAE,KAAK,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,OAAO,GAAG,cAAc,GAAG,SAAS,CAAC;AA8CjD;;;GAGG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,SAAS,CAEtE;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,GAAG,IAAI,EACtB,MAAM,EAAE,OAAO,GACd,cAAc,CAEhB;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,SAAS,GAAG,UAAU,CAyCzD;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,OAAO,EACf,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,GACX,sBAAsB,GAAG,IAAI,CAmB/B"}

View File

@@ -0,0 +1,10 @@
"use strict";
exports.endOfISOWeek = void 0;
var _index = require("../endOfISOWeek.js");
var _index2 = require("./_lib/convertToFP.js"); // This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
const endOfISOWeek = (exports.endOfISOWeek = (0, _index2.convertToFP)(
_index.endOfISOWeek,
1,
));

View File

@@ -0,0 +1 @@
{"version":3,"file":"environment.js","sourceRoot":"","sources":["../../../../src/platform/browser/environment.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,SAAgB,gBAAgB,CAAC,CAAS;IACxC,OAAO,SAAS,CAAC;AACnB,CAAC;AAFD,4CAEC;AAED,SAAgB,iBAAiB,CAAC,CAAS;IACzC,OAAO,SAAS,CAAC;AACnB,CAAC;AAFD,8CAEC;AAED,SAAgB,gBAAgB,CAAC,CAAS;IACxC,OAAO,SAAS,CAAC;AACnB,CAAC;AAFD,4CAEC;AAED,SAAgB,oBAAoB,CAAC,CAAS;IAC5C,OAAO,SAAS,CAAC;AACnB,CAAC;AAFD,oDAEC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function getStringFromEnv(_: string): string | undefined {\n return undefined;\n}\n\nexport function getBooleanFromEnv(_: string): boolean | undefined {\n return undefined;\n}\n\nexport function getNumberFromEnv(_: string): number | undefined {\n return undefined;\n}\n\nexport function getStringListFromEnv(_: string): string[] | undefined {\n return undefined;\n}\n"]}

View File

@@ -0,0 +1,2 @@
// Todo (Babel 8): remove this file, in Babel 8 users import the .json directly
module.exports = require("./data/plugins.json");

View File

@@ -0,0 +1,206 @@
import { buildLocalizeFn } from "../../_lib/buildLocalizeFn.js";
const eraValues = {
narrow: ["e.ə", "b.e"],
abbreviated: ["e.ə", "b.e"],
wide: ["eramızdan əvvəl", "bizim era"],
};
const quarterValues = {
narrow: ["1", "2", "3", "4"],
abbreviated: ["K1", "K2", "K3", "K4"],
wide: ["1ci kvartal", "2ci kvartal", "3cü kvartal", "4cü kvartal"],
};
const monthValues = {
narrow: ["Y", "F", "M", "A", "M", "İ", "İ", "A", "S", "O", "N", "D"],
abbreviated: [
"Yan",
"Fev",
"Mar",
"Apr",
"May",
"İyun",
"İyul",
"Avq",
"Sen",
"Okt",
"Noy",
"Dek",
],
wide: [
"Yanvar",
"Fevral",
"Mart",
"Aprel",
"May",
"İyun",
"İyul",
"Avqust",
"Sentyabr",
"Oktyabr",
"Noyabr",
"Dekabr",
],
};
const dayValues = {
narrow: ["B.", "B.e", "Ç.a", "Ç.", "C.a", "C.", "Ş."],
short: ["B.", "B.e", "Ç.a", "Ç.", "C.a", "C.", "Ş."],
abbreviated: ["Baz", "Baz.e", "Çər.a", "Çər", "Cüm.a", "Cüm", "Şə"],
wide: [
"Bazar",
"Bazar ertəsi",
"Çərşənbə axşamı",
"Çərşənbə",
"Cümə axşamı",
"Cümə",
"Şənbə",
],
};
const dayPeriodValues = {
narrow: {
am: "am",
pm: "pm",
midnight: "gecəyarı",
noon: "gün",
morning: "səhər",
afternoon: "gündüz",
evening: "axşam",
night: "gecə",
},
abbreviated: {
am: "AM",
pm: "PM",
midnight: "gecəyarı",
noon: "gün",
morning: "səhər",
afternoon: "gündüz",
evening: "axşam",
night: "gecə",
},
wide: {
am: "a.m.",
pm: "p.m.",
midnight: "gecəyarı",
noon: "gün",
morning: "səhər",
afternoon: "gündüz",
evening: "axşam",
night: "gecə",
},
};
const formattingDayPeriodValues = {
narrow: {
am: "a",
pm: "p",
midnight: "gecəyarı",
noon: "gün",
morning: "səhər",
afternoon: "gündüz",
evening: "axşam",
night: "gecə",
},
abbreviated: {
am: "AM",
pm: "PM",
midnight: "gecəyarı",
noon: "gün",
morning: "səhər",
afternoon: "gündüz",
evening: "axşam",
night: "gecə",
},
wide: {
am: "a.m.",
pm: "p.m.",
midnight: "gecəyarı",
noon: "gün",
morning: "səhər",
afternoon: "gündüz",
evening: "axşam",
night: "gecə",
},
};
const suffixes = {
1: "-inci",
5: "-inci",
8: "-inci",
70: "-inci",
80: "-inci",
2: "-nci",
7: "-nci",
20: "-nci",
50: "-nci",
3: "-üncü",
4: "-üncü",
100: "-üncü",
6: "-ncı",
9: "-uncu",
10: "-uncu",
30: "-uncu",
60: "-ıncı",
90: "-ıncı",
};
const getSuffix = (number) => {
if (number === 0) {
// special case for zero
return number + "-ıncı";
}
const a = number % 10;
const b = (number % 100) - a;
const c = number >= 100 ? 100 : null;
if (suffixes[a]) {
return suffixes[a];
} else if (suffixes[b]) {
return suffixes[b];
} else if (c !== null) {
return suffixes[c];
}
return "";
};
const ordinalNumber = (dirtyNumber, _options) => {
const number = Number(dirtyNumber);
const suffix = getSuffix(number);
return number + suffix;
};
export const localize = {
ordinalNumber,
era: buildLocalizeFn({
values: eraValues,
defaultWidth: "wide",
}),
quarter: buildLocalizeFn({
values: quarterValues,
defaultWidth: "wide",
argumentCallback: (quarter) => quarter - 1,
}),
month: buildLocalizeFn({
values: monthValues,
defaultWidth: "wide",
}),
day: buildLocalizeFn({
values: dayValues,
defaultWidth: "wide",
}),
dayPeriod: buildLocalizeFn({
values: dayPeriodValues,
defaultWidth: "wide",
formattingValues: formattingDayPeriodValues,
defaultFormattingWidth: "wide",
}),
};

View File

@@ -0,0 +1,28 @@
export function getDocumentViewInfo(segments) {
const [tabSegment, versionSegment] = segments;
if (versionSegment) {
if (tabSegment === 'versions') {
return {
documentSubViewType: 'version',
viewType: 'version'
};
}
} else {
if (tabSegment === 'versions') {
return {
documentSubViewType: 'versions',
viewType: 'document'
};
} else if (tabSegment === 'api') {
return {
documentSubViewType: 'api',
viewType: 'document'
};
}
}
return {
documentSubViewType: 'default',
viewType: 'document'
};
}
//# sourceMappingURL=getDocumentViewInfo.js.map

View File

@@ -0,0 +1,455 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
*/
"use strict";
const { SyncWaterfallHook } = require("tapable");
const Compilation = require("../Compilation");
const RuntimeGlobals = require("../RuntimeGlobals");
const RuntimeModule = require("../RuntimeModule");
const Template = require("../Template");
const {
generateJavascriptHMR
} = require("../hmr/JavascriptHotModuleReplacementHelper");
const chunkHasJs = require("../javascript/JavascriptModulesPlugin").chunkHasJs;
const { getInitialChunkIds } = require("../javascript/StartupHelpers");
const compileBooleanMatcher = require("../util/compileBooleanMatcher");
/** @typedef {import("../Chunk")} Chunk */
/** @typedef {import("../ChunkGraph")} ChunkGraph */
/** @typedef {import("../Module").ReadOnlyRuntimeRequirements} ReadOnlyRuntimeRequirements */
/**
* @typedef {object} JsonpCompilationPluginHooks
* @property {SyncWaterfallHook<[string, Chunk]>} linkPreload
* @property {SyncWaterfallHook<[string, Chunk]>} linkPrefetch
*/
/** @type {WeakMap<Compilation, JsonpCompilationPluginHooks>} */
const compilationHooksMap = new WeakMap();
class JsonpChunkLoadingRuntimeModule extends RuntimeModule {
/**
* @param {Compilation} compilation the compilation
* @returns {JsonpCompilationPluginHooks} hooks
*/
static getCompilationHooks(compilation) {
if (!(compilation instanceof Compilation)) {
throw new TypeError(
"The 'compilation' argument must be an instance of Compilation"
);
}
let hooks = compilationHooksMap.get(compilation);
if (hooks === undefined) {
hooks = {
linkPreload: new SyncWaterfallHook(["source", "chunk"]),
linkPrefetch: new SyncWaterfallHook(["source", "chunk"])
};
compilationHooksMap.set(compilation, hooks);
}
return hooks;
}
/**
* @param {ReadOnlyRuntimeRequirements} runtimeRequirements runtime requirements
*/
constructor(runtimeRequirements) {
super("jsonp chunk loading", RuntimeModule.STAGE_ATTACH);
/** @type {ReadOnlyRuntimeRequirements} */
this._runtimeRequirements = runtimeRequirements;
}
/**
* @private
* @param {Chunk} chunk chunk
* @returns {string} generated code
*/
_generateBaseUri(chunk) {
const options = chunk.getEntryOptions();
if (options && options.baseUri) {
return `${RuntimeGlobals.baseURI} = ${JSON.stringify(options.baseUri)};`;
}
return `${RuntimeGlobals.baseURI} = (typeof document !== 'undefined' && document.baseURI) || self.location.href;`;
}
/**
* @returns {string | null} runtime code
*/
generate() {
const compilation = /** @type {Compilation} */ (this.compilation);
const {
runtimeTemplate,
outputOptions: {
chunkLoadingGlobal,
hotUpdateGlobal,
crossOriginLoading,
scriptType,
charset
}
} = compilation;
const globalObject = runtimeTemplate.globalObject;
const { linkPreload, linkPrefetch } =
JsonpChunkLoadingRuntimeModule.getCompilationHooks(compilation);
const fn = RuntimeGlobals.ensureChunkHandlers;
const withBaseURI = this._runtimeRequirements.has(RuntimeGlobals.baseURI);
const withLoading = this._runtimeRequirements.has(
RuntimeGlobals.ensureChunkHandlers
);
const withCallback = this._runtimeRequirements.has(
RuntimeGlobals.chunkCallback
);
const withOnChunkLoad = this._runtimeRequirements.has(
RuntimeGlobals.onChunksLoaded
);
const withHmr = this._runtimeRequirements.has(
RuntimeGlobals.hmrDownloadUpdateHandlers
);
const withHmrManifest = this._runtimeRequirements.has(
RuntimeGlobals.hmrDownloadManifest
);
const withFetchPriority = this._runtimeRequirements.has(
RuntimeGlobals.hasFetchPriority
);
const chunkLoadingGlobalExpr = `${globalObject}[${JSON.stringify(
chunkLoadingGlobal
)}]`;
const chunkGraph = /** @type {ChunkGraph} */ (this.chunkGraph);
const chunk = /** @type {Chunk} */ (this.chunk);
const withPrefetch =
this._runtimeRequirements.has(RuntimeGlobals.prefetchChunkHandlers) &&
chunk.hasChildByOrder(chunkGraph, "prefetch", true, chunkHasJs);
const withPreload =
this._runtimeRequirements.has(RuntimeGlobals.preloadChunkHandlers) &&
chunk.hasChildByOrder(chunkGraph, "preload", true, chunkHasJs);
const conditionMap = chunkGraph.getChunkConditionMap(chunk, chunkHasJs);
const hasJsMatcher = compileBooleanMatcher(conditionMap);
const initialChunkIds = getInitialChunkIds(chunk, chunkGraph, chunkHasJs);
const stateExpression = withHmr
? `${RuntimeGlobals.hmrRuntimeStatePrefix}_jsonp`
: undefined;
return Template.asString([
withBaseURI ? this._generateBaseUri(chunk) : "// no baseURI",
"",
"// object to store loaded and loading chunks",
"// undefined = chunk not loaded, null = chunk preloaded/prefetched",
"// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded",
`var installedChunks = ${
stateExpression ? `${stateExpression} = ${stateExpression} || ` : ""
}{`,
Template.indent(
Array.from(initialChunkIds, (id) => `${JSON.stringify(id)}: 0`).join(
",\n"
)
),
"};",
"",
withLoading
? Template.asString([
`${fn}.j = ${runtimeTemplate.basicFunction(
`chunkId, promises${withFetchPriority ? ", fetchPriority" : ""}`,
hasJsMatcher !== false
? Template.indent([
"// JSONP chunk loading for javascript",
`var installedChunkData = ${RuntimeGlobals.hasOwnProperty}(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;`,
'if(installedChunkData !== 0) { // 0 means "already installed".',
Template.indent([
"",
'// a Promise means "currently loading".',
"if(installedChunkData) {",
Template.indent([
"promises.push(installedChunkData[2]);"
]),
"} else {",
Template.indent([
hasJsMatcher === true
? "if(true) { // all chunks have JS"
: `if(${hasJsMatcher("chunkId")}) {`,
Template.indent([
"// setup Promise in chunk cache",
`var promise = new Promise(${runtimeTemplate.expressionFunction(
"installedChunkData = installedChunks[chunkId] = [resolve, reject]",
"resolve, reject"
)});`,
"promises.push(installedChunkData[2] = promise);",
"",
"// start chunk loading",
`var url = ${RuntimeGlobals.publicPath} + ${RuntimeGlobals.getChunkScriptFilename}(chunkId);`,
"// create error before stack unwound to get useful stacktrace later",
"var error = new Error();",
`var loadingEnded = ${runtimeTemplate.basicFunction(
"event",
[
`if(${RuntimeGlobals.hasOwnProperty}(installedChunks, chunkId)) {`,
Template.indent([
"installedChunkData = installedChunks[chunkId];",
"if(installedChunkData !== 0) installedChunks[chunkId] = undefined;",
"if(installedChunkData) {",
Template.indent([
"var errorType = event && (event.type === 'load' ? 'missing' : event.type);",
"var realSrc = event && event.target && event.target.src;",
"error.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';",
"error.name = 'ChunkLoadError';",
"error.type = errorType;",
"error.request = realSrc;",
"installedChunkData[1](error);"
]),
"}"
]),
"}"
]
)};`,
`${
RuntimeGlobals.loadScript
}(url, loadingEnded, "chunk-" + chunkId, chunkId${
withFetchPriority ? ", fetchPriority" : ""
});`
]),
hasJsMatcher === true
? "}"
: "} else installedChunks[chunkId] = 0;"
]),
"}"
]),
"}"
])
: Template.indent(["installedChunks[chunkId] = 0;"])
)};`
])
: "// no chunk on demand loading",
"",
withPrefetch && hasJsMatcher !== false
? `${
RuntimeGlobals.prefetchChunkHandlers
}.j = ${runtimeTemplate.basicFunction("chunkId", [
`if((!${
RuntimeGlobals.hasOwnProperty
}(installedChunks, chunkId) || installedChunks[chunkId] === undefined) && ${
hasJsMatcher === true ? "true" : hasJsMatcher("chunkId")
}) {`,
Template.indent([
"installedChunks[chunkId] = null;",
linkPrefetch.call(
Template.asString([
"var link = document.createElement('link');",
charset ? "link.charset = 'utf-8';" : "",
crossOriginLoading
? `link.crossOrigin = ${JSON.stringify(
crossOriginLoading
)};`
: "",
`if (${RuntimeGlobals.scriptNonce}) {`,
Template.indent(
`link.setAttribute("nonce", ${RuntimeGlobals.scriptNonce});`
),
"}",
'link.rel = "prefetch";',
'link.as = "script";',
`link.href = ${RuntimeGlobals.publicPath} + ${RuntimeGlobals.getChunkScriptFilename}(chunkId);`
]),
chunk
),
"document.head.appendChild(link);"
]),
"}"
])};`
: "// no prefetching",
"",
withPreload && hasJsMatcher !== false
? `${
RuntimeGlobals.preloadChunkHandlers
}.j = ${runtimeTemplate.basicFunction("chunkId", [
`if((!${
RuntimeGlobals.hasOwnProperty
}(installedChunks, chunkId) || installedChunks[chunkId] === undefined) && ${
hasJsMatcher === true ? "true" : hasJsMatcher("chunkId")
}) {`,
Template.indent([
"installedChunks[chunkId] = null;",
linkPreload.call(
Template.asString([
"var link = document.createElement('link');",
scriptType && scriptType !== "module"
? `link.type = ${JSON.stringify(scriptType)};`
: "",
charset ? "link.charset = 'utf-8';" : "",
`if (${RuntimeGlobals.scriptNonce}) {`,
Template.indent(
`link.setAttribute("nonce", ${RuntimeGlobals.scriptNonce});`
),
"}",
scriptType === "module"
? 'link.rel = "modulepreload";'
: 'link.rel = "preload";',
scriptType === "module" ? "" : 'link.as = "script";',
`link.href = ${RuntimeGlobals.publicPath} + ${RuntimeGlobals.getChunkScriptFilename}(chunkId);`,
crossOriginLoading
? crossOriginLoading === "use-credentials"
? 'link.crossOrigin = "use-credentials";'
: Template.asString([
"if (link.href.indexOf(window.location.origin + '/') !== 0) {",
Template.indent(
`link.crossOrigin = ${JSON.stringify(
crossOriginLoading
)};`
),
"}"
])
: ""
]),
chunk
),
"document.head.appendChild(link);"
]),
"}"
])};`
: "// no preloaded",
"",
withHmr
? Template.asString([
"var currentUpdatedModulesList;",
"var waitingUpdateResolves = {};",
"function loadUpdateChunk(chunkId, updatedModulesList) {",
Template.indent([
"currentUpdatedModulesList = updatedModulesList;",
`return new Promise(${runtimeTemplate.basicFunction(
"resolve, reject",
[
"waitingUpdateResolves[chunkId] = resolve;",
"// start update chunk loading",
`var url = ${RuntimeGlobals.publicPath} + ${RuntimeGlobals.getChunkUpdateScriptFilename}(chunkId);`,
"// create error before stack unwound to get useful stacktrace later",
"var error = new Error();",
`var loadingEnded = ${runtimeTemplate.basicFunction("event", [
"if(waitingUpdateResolves[chunkId]) {",
Template.indent([
"waitingUpdateResolves[chunkId] = undefined",
"var errorType = event && (event.type === 'load' ? 'missing' : event.type);",
"var realSrc = event && event.target && event.target.src;",
"error.message = 'Loading hot update chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';",
"error.name = 'ChunkLoadError';",
"error.type = errorType;",
"error.request = realSrc;",
"reject(error);"
]),
"}"
])};`,
`${RuntimeGlobals.loadScript}(url, loadingEnded);`
]
)});`
]),
"}",
"",
`${globalObject}[${JSON.stringify(
hotUpdateGlobal
)}] = ${runtimeTemplate.basicFunction(
"chunkId, moreModules, runtime",
[
"for(var moduleId in moreModules) {",
Template.indent([
`if(${RuntimeGlobals.hasOwnProperty}(moreModules, moduleId)) {`,
Template.indent([
"currentUpdate[moduleId] = moreModules[moduleId];",
"if(currentUpdatedModulesList) currentUpdatedModulesList.push(moduleId);"
]),
"}"
]),
"}",
"if(runtime) currentUpdateRuntime.push(runtime);",
"if(waitingUpdateResolves[chunkId]) {",
Template.indent([
"waitingUpdateResolves[chunkId]();",
"waitingUpdateResolves[chunkId] = undefined;"
]),
"}"
]
)};`,
"",
generateJavascriptHMR("jsonp")
])
: "// no HMR",
"",
withHmrManifest
? Template.asString([
`${
RuntimeGlobals.hmrDownloadManifest
} = ${runtimeTemplate.basicFunction("", [
'if (typeof fetch === "undefined") throw new Error("No browser support: need fetch API");',
`return fetch(${RuntimeGlobals.publicPath} + ${
RuntimeGlobals.getUpdateManifestFilename
}()).then(${runtimeTemplate.basicFunction("response", [
"if(response.status === 404) return; // no update available",
'if(!response.ok) throw new Error("Failed to fetch update manifest " + response.statusText);',
"return response.json();"
])});`
])};`
])
: "// no HMR manifest",
"",
withOnChunkLoad
? `${
RuntimeGlobals.onChunksLoaded
}.j = ${runtimeTemplate.returningFunction(
"installedChunks[chunkId] === 0",
"chunkId"
)};`
: "// no on chunks loaded",
"",
withCallback || withLoading
? Template.asString([
"// install a JSONP callback for chunk loading",
`var webpackJsonpCallback = ${runtimeTemplate.basicFunction(
"parentChunkLoadingFunction, data",
[
runtimeTemplate.destructureArray(
["chunkIds", "moreModules", "runtime"],
"data"
),
'// add "moreModules" to the modules object,',
'// then flag all "chunkIds" as loaded and fire callback',
"var moduleId, chunkId, i = 0;",
`if(chunkIds.some(${runtimeTemplate.returningFunction(
"installedChunks[id] !== 0",
"id"
)})) {`,
Template.indent([
"for(moduleId in moreModules) {",
Template.indent([
`if(${RuntimeGlobals.hasOwnProperty}(moreModules, moduleId)) {`,
Template.indent(
`${RuntimeGlobals.moduleFactories}[moduleId] = moreModules[moduleId];`
),
"}"
]),
"}",
`if(runtime) var result = runtime(${RuntimeGlobals.require});`
]),
"}",
"if(parentChunkLoadingFunction) parentChunkLoadingFunction(data);",
"for(;i < chunkIds.length; i++) {",
Template.indent([
"chunkId = chunkIds[i];",
`if(${RuntimeGlobals.hasOwnProperty}(installedChunks, chunkId) && installedChunks[chunkId]) {`,
Template.indent("installedChunks[chunkId][0]();"),
"}",
"installedChunks[chunkId] = 0;"
]),
"}",
withOnChunkLoad
? `return ${RuntimeGlobals.onChunksLoaded}(result);`
: ""
]
)}`,
"",
`var chunkLoadingGlobal = ${chunkLoadingGlobalExpr} = ${chunkLoadingGlobalExpr} || [];`,
"chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));",
"chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));"
])
: "// no jsonp function"
]);
}
}
module.exports = JsonpChunkLoadingRuntimeModule;

View File

@@ -0,0 +1,3 @@
'use strict';
module.exports = require('./async').series;

Some files were not shown because too many files have changed in this diff Show More