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 @@
{"version":3,"file":"columnToCodeConverter.d.ts","sourceRoot":"","sources":["../../src/postgres/columnToCodeConverter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAA;AACxD,eAAO,MAAM,qBAAqB,EAAE,qBA4GnC,CAAA"}

View File

@@ -0,0 +1 @@
export declare function devAssert(condition: unknown, message: string): void;

View File

@@ -0,0 +1,135 @@
"use strict";
exports.match = void 0;
var _index = require("../../_lib/buildMatchFn.js");
var _index2 = require("../../_lib/buildMatchPatternFn.js");
const matchOrdinalNumberPattern = /^(\d+)(-rë|-të|t|)?/i;
const parseOrdinalNumberPattern = /\d+/i;
const matchEraPatterns = {
narrow: /^(p|m)/i,
abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
wide: /^(para krishtit|mbas krishtit)/i,
};
const parseEraPatterns = {
any: [/^b/i, /^(p|m)/i],
};
const matchQuarterPatterns = {
narrow: /^[1234]/i,
abbreviated: /^q[1234]/i,
wide: /^[1234]-mujori (i{1,3}|iv)/i,
};
const parseQuarterPatterns = {
any: [/1/i, /2/i, /3/i, /4/i],
};
const matchMonthPatterns = {
narrow: /^[jsmpqkftnd]/i,
abbreviated: /^(jan|shk|mar|pri|maj|qer|kor|gus|sht|tet|nën|dhj)/i,
wide: /^(janar|shkurt|mars|prill|maj|qershor|korrik|gusht|shtator|tetor|nëntor|dhjetor)/i,
};
const parseMonthPatterns = {
narrow: [
/^j/i,
/^s/i,
/^m/i,
/^p/i,
/^m/i,
/^q/i,
/^k/i,
/^g/i,
/^s/i,
/^t/i,
/^n/i,
/^d/i,
],
any: [
/^ja/i,
/^shk/i,
/^mar/i,
/^pri/i,
/^maj/i,
/^qer/i,
/^kor/i,
/^gu/i,
/^sht/i,
/^tet/i,
/^n/i,
/^d/i,
],
};
const matchDayPatterns = {
narrow: /^[dhmeps]/i,
short: /^(di|hë|ma|më|en|pr|sh)/i,
abbreviated: /^(die|hën|mar|mër|enj|pre|sht)/i,
wide: /^(dielë|hënë|martë|mërkurë|enjte|premte|shtunë)/i,
};
const parseDayPatterns = {
narrow: [/^d/i, /^h/i, /^m/i, /^m/i, /^e/i, /^p/i, /^s/i],
any: [/^d/i, /^h/i, /^ma/i, /^më/i, /^e/i, /^p/i, /^s/i],
};
const matchDayPeriodPatterns = {
narrow: /^(p|m|me|në (mëngjes|mbasdite|mbrëmje|mesnatë))/i,
any: /^([pm]\.?\s?d\.?|drek|në (mëngjes|mbasdite|mbrëmje|mesnatë))/i,
};
const parseDayPeriodPatterns = {
any: {
am: /^p/i,
pm: /^m/i,
midnight: /^me/i,
noon: /^dr/i,
morning: /mëngjes/i,
afternoon: /mbasdite/i,
evening: /mbrëmje/i,
night: /natë/i,
},
};
const match = (exports.match = {
ordinalNumber: (0, _index2.buildMatchPatternFn)({
matchPattern: matchOrdinalNumberPattern,
parsePattern: parseOrdinalNumberPattern,
valueCallback: (value) => parseInt(value, 10),
}),
era: (0, _index.buildMatchFn)({
matchPatterns: matchEraPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseEraPatterns,
defaultParseWidth: "any",
}),
quarter: (0, _index.buildMatchFn)({
matchPatterns: matchQuarterPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseQuarterPatterns,
defaultParseWidth: "any",
valueCallback: (index) => index + 1,
}),
month: (0, _index.buildMatchFn)({
matchPatterns: matchMonthPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseMonthPatterns,
defaultParseWidth: "any",
}),
day: (0, _index.buildMatchFn)({
matchPatterns: matchDayPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseDayPatterns,
defaultParseWidth: "any",
}),
dayPeriod: (0, _index.buildMatchFn)({
matchPatterns: matchDayPeriodPatterns,
defaultMatchWidth: "any",
parsePatterns: parseDayPeriodPatterns,
defaultParseWidth: "any",
}),
});

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../src/utilities/groupOrTabHasRequiredSubfield.ts"],"sourcesContent":["import type { Field, Tab } from 'payload'\n\nimport { fieldAffectsData } from 'payload/shared'\n\nexport const groupOrTabHasRequiredSubfield = (entity: Field | Tab): boolean => {\n if ('type' in entity && entity.type === 'group') {\n return entity.fields.some((subField) => {\n return (\n (fieldAffectsData(subField) && 'required' in subField && subField.required) ||\n groupOrTabHasRequiredSubfield(subField)\n )\n })\n }\n\n if ('fields' in entity && 'name' in entity) {\n return (entity as Tab).fields.some((subField) => groupOrTabHasRequiredSubfield(subField))\n }\n\n return false\n}\n"],"names":["fieldAffectsData","groupOrTabHasRequiredSubfield","entity","type","fields","some","subField","required"],"mappings":"AAEA,SAASA,gBAAgB,QAAQ,iBAAgB;AAEjD,OAAO,MAAMC,gCAAgC,CAACC;IAC5C,IAAI,UAAUA,UAAUA,OAAOC,IAAI,KAAK,SAAS;QAC/C,OAAOD,OAAOE,MAAM,CAACC,IAAI,CAAC,CAACC;YACzB,OACE,AAACN,iBAAiBM,aAAa,cAAcA,YAAYA,SAASC,QAAQ,IAC1EN,8BAA8BK;QAElC;IACF;IAEA,IAAI,YAAYJ,UAAU,UAAUA,QAAQ;QAC1C,OAAO,AAACA,OAAeE,MAAM,CAACC,IAAI,CAAC,CAACC,WAAaL,8BAA8BK;IACjF;IAEA,OAAO;AACT,EAAC"}

View File

@@ -0,0 +1,47 @@
{
"name": "nodemailer",
"version": "7.0.12",
"description": "Easy as cake e-mail sending from your Node.js applications",
"main": "lib/nodemailer.js",
"scripts": {
"test": "node --test --test-concurrency=1 test/**/*.test.js test/**/*-test.js",
"test:coverage": "c8 node --test --test-concurrency=1 test/**/*.test.js test/**/*-test.js",
"format": "prettier --write \"**/*.{js,json,md}\"",
"format:check": "prettier --check \"**/*.{js,json,md}\"",
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"update": "rm -rf node_modules/ package-lock.json && ncu -u && npm install"
},
"repository": {
"type": "git",
"url": "https://github.com/nodemailer/nodemailer.git"
},
"keywords": [
"Nodemailer"
],
"author": "Andris Reinman",
"license": "MIT-0",
"bugs": {
"url": "https://github.com/nodemailer/nodemailer/issues"
},
"homepage": "https://nodemailer.com/",
"devDependencies": {
"@aws-sdk/client-sesv2": "3.940.0",
"bunyan": "1.8.15",
"c8": "10.1.3",
"eslint": "9.39.1",
"eslint-config-prettier": "10.1.8",
"globals": "16.5.0",
"libbase64": "1.3.0",
"libmime": "5.3.7",
"libqp": "2.1.1",
"nodemailer-ntlm-auth": "1.0.4",
"prettier": "3.6.2",
"proxy": "1.0.2",
"proxy-test-server": "1.0.0",
"smtp-server": "3.16.1"
},
"engines": {
"node": ">=6.0.0"
}
}

View File

@@ -0,0 +1,25 @@
@import '../../scss/styles.scss';
@layer payload-default {
.restore-button {
@include blur-bg;
display: flex;
align-items: center;
justify-content: center;
height: 100%;
&__toggle {
@extend %btn-reset;
}
&__checkbox {
padding: calc(var(--base) * 0.5) 0;
.checkbox-input {
label {
padding-bottom: 0;
}
}
}
}
}

View File

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

View File

@@ -0,0 +1,17 @@
import type { PopupProps } from '../Popup/index.js';
import './index.scss';
type CheckboxPopupProps = {
Button: React.ReactNode;
onChange: (args: {
close: () => void;
selectedValues: string[];
}) => void;
options: {
label: string;
value: string;
}[];
selectedValues: string[];
} & Omit<PopupProps, 'button' | 'render'>;
export declare function CheckboxPopup({ Button, className, onChange, options, selectedValues, ...popupProps }: CheckboxPopupProps): import("react").JSX.Element;
export {};
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1,31 @@
@import '../../../scss/styles.scss';
@layer payload-default {
.file-meta {
&__url {
display: flex;
gap: base(0.4);
a {
font-weight: 600;
text-decoration: none;
&:hover,
&:focus-visible {
text-decoration: underline;
}
}
}
&__size-type,
&__url a {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
&__edit {
position: relative;
}
}
}

View File

@@ -0,0 +1,11 @@
import type {
FirstWeekContainsDateOptions,
Locale,
LocalizedOptions,
WeekOptions,
} from "../types.js";
export type DefaultOptions = LocalizedOptions<keyof Locale> &
WeekOptions &
FirstWeekContainsDateOptions;
export declare function getDefaultOptions(): DefaultOptions;
export declare function setDefaultOptions(newOptions: DefaultOptions): void;

View File

@@ -0,0 +1,15 @@
"use strict";
exports.formatRelative = void 0;
const formatRelativeLocale = {
lastWeek: "'afgelopen' eeee 'om' p",
yesterday: "'gisteren om' p",
today: "'vandaag om' p",
tomorrow: "'morgen om' p",
nextWeek: "eeee 'om' p",
other: "P",
};
const formatRelative = (token, _date, _baseDate, _options) =>
formatRelativeLocale[token];
exports.formatRelative = formatRelative;

View File

@@ -0,0 +1,23 @@
/**
* @name millisecondsToHours
* @category Conversion Helpers
* @summary Convert milliseconds to hours.
*
* @description
* Convert a number of milliseconds to a full number of hours.
*
* @param milliseconds - The number of milliseconds to be converted
*
* @returns The number of milliseconds converted in hours
*
* @example
* // Convert 7200000 milliseconds to hours:
* const result = millisecondsToHours(7200000)
* //=> 2
*
* @example
* // It uses floor rounding:
* const result = millisecondsToHours(7199999)
* //=> 1
*/
export declare function millisecondsToHours(milliseconds: number): number;

View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2021 Parmesh Krishen
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@@ -0,0 +1,187 @@
'use client';
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import './index.scss';
import { DragOverlay } from '@dnd-kit/core';
import { formatAdminURL } from 'payload/shared';
import React, { useEffect, useState } from 'react';
import { toast } from 'sonner';
import { useConfig } from '../../providers/Config/index.js';
import { useListQuery } from '../../providers/ListQuery/index.js';
import { useLocale } from '../../providers/Locale/index.js';
import { DraggableSortableItem } from '../DraggableSortable/DraggableSortableItem/index.js';
import { DraggableSortable } from '../DraggableSortable/index.js';
import { OrderableRow } from './OrderableRow.js';
import { OrderableRowDragPreview } from './OrderableRowDragPreview.js';
const baseClass = 'table';
export const OrderableTable = ({
appearance = 'default',
BeforeTable,
collection,
columns,
data: initialData
}) => {
const {
config
} = useConfig();
const {
data: listQueryData,
orderableFieldName,
query
} = useListQuery();
const {
code: localeCode
} = useLocale();
// Use the data from ListQueryProvider if available, otherwise use the props
const serverData = listQueryData?.docs || initialData;
// Local state to track the current order of rows
const [localData, setLocalData] = useState(serverData);
// id -> index for each column
const [cellMap, setCellMap] = useState({});
const [dragActiveRowId, setDragActiveRowId] = useState();
// Update local data when server data changes
useEffect(() => {
setLocalData(serverData);
setCellMap(Object.fromEntries(serverData.map((item, index) => [String(item.id ?? item._id), index])));
}, [serverData]);
const activeColumns = columns?.filter(col => col?.active);
if (!activeColumns || activeColumns.filter(col_0 => !['_dragHandle', '_select'].includes(col_0.accessor)).length === 0) {
return /*#__PURE__*/_jsx("div", {
children: "No columns selected"
});
}
const handleDragEnd = async ({
moveFromIndex,
moveToIndex
}) => {
if (query.sort !== orderableFieldName && query.sort !== `-${orderableFieldName}`) {
toast.warning('To reorder the rows you must first sort them by the "Order" column');
setDragActiveRowId(undefined);
return;
}
if (moveFromIndex === moveToIndex) {
setDragActiveRowId(undefined);
return;
}
const movedId = localData[moveFromIndex].id ?? localData[moveFromIndex]._id;
const newBeforeRow = moveToIndex > moveFromIndex ? localData[moveToIndex] : localData[moveToIndex - 1];
const newAfterRow = moveToIndex > moveFromIndex ? localData[moveToIndex + 1] : localData[moveToIndex];
// Store the original data for rollback
const previousData = [...localData];
// Optimisitc update of local state to reorder the rows
setLocalData(currentData => {
const newData = [...currentData];
// Update the rendered cell for the moved row to show "pending"
newData[moveFromIndex][orderableFieldName] = `pending`;
// Move the item in the array
newData.splice(moveToIndex, 0, newData.splice(moveFromIndex, 1)[0]);
return newData;
});
try {
const target = newBeforeRow ? {
id: newBeforeRow.id ?? newBeforeRow._id,
key: newBeforeRow[orderableFieldName]
} : {
id: newAfterRow.id ?? newAfterRow._id,
key: newAfterRow[orderableFieldName]
};
const newKeyWillBe = newBeforeRow && query.sort === orderableFieldName || !newBeforeRow && query.sort === `-${orderableFieldName}` ? 'greater' : 'less';
const jsonBody = {
collectionSlug: collection.slug,
docsToMove: [movedId],
newKeyWillBe,
orderableFieldName,
target
};
const response = await fetch(formatAdminURL({
apiRoute: config.routes.api,
path: `/reorder?locale=${localeCode}`
}), {
body: JSON.stringify(jsonBody),
credentials: 'include',
headers: {
'Content-Type': 'application/json'
},
method: 'POST'
});
if (response.status === 403) {
throw new Error('You do not have permission to reorder these rows');
}
if (!response.ok) {
throw new Error('Failed to reorder. This can happen if you reorder several rows too quickly. Please try again.');
}
if (response.status === 200 && (await response.json())['message'] === 'initial migration') {
throw new Error('You have enabled "orderable" on a collection with existing documents' + 'and this is the first time you have sorted documents. We have run an automatic migration ' + 'to add an initial order to the documents. Please refresh the page and try again.');
}
} catch (err) {
const error = err instanceof Error ? err.message : String(err);
// Rollback to previous state if the request fails
setLocalData(previousData);
toast.error(error);
} finally {
setDragActiveRowId(undefined);
}
};
const handleDragStart = ({
id
}) => {
setDragActiveRowId(id);
};
const rowIds = localData.map(row => row.id ?? row._id);
return /*#__PURE__*/_jsxs("div", {
className: [baseClass, appearance && `${baseClass}--appearance-${appearance}`].filter(Boolean).join(' '),
children: [BeforeTable, /*#__PURE__*/_jsxs(DraggableSortable, {
ids: rowIds,
onDragEnd: handleDragEnd,
onDragStart: handleDragStart,
children: [/*#__PURE__*/_jsxs("table", {
cellPadding: "0",
cellSpacing: "0",
children: [/*#__PURE__*/_jsx("thead", {
children: /*#__PURE__*/_jsx("tr", {
children: activeColumns.map((col_1, i) => /*#__PURE__*/_jsx("th", {
id: `heading-${col_1.accessor}`,
children: col_1.Heading
}, i))
})
}), /*#__PURE__*/_jsx("tbody", {
children: localData.map((row_0, rowIndex) => /*#__PURE__*/_jsx(DraggableSortableItem, {
id: rowIds[rowIndex],
children: ({
attributes,
isDragging,
listeners,
setNodeRef,
transform,
transition
}) => /*#__PURE__*/_jsx(OrderableRow, {
cellMap: cellMap,
className: `row-${rowIndex + 1}`,
columns: activeColumns,
dragAttributes: attributes,
dragListeners: listeners,
ref: setNodeRef,
rowId: row_0.id ?? row_0._id,
style: {
opacity: isDragging ? 0 : 1,
transform,
transition
}
})
}, rowIds[rowIndex]))
})]
}), /*#__PURE__*/_jsx(DragOverlay, {
children: /*#__PURE__*/_jsx(OrderableRowDragPreview, {
className: [baseClass, `${baseClass}--drag-preview`].join(' '),
rowId: dragActiveRowId,
children: /*#__PURE__*/_jsx(OrderableRow, {
cellMap: cellMap,
columns: activeColumns,
rowId: dragActiveRowId
})
})
})]
})]
});
};
//# sourceMappingURL=OrderableTable.js.map

View File

@@ -0,0 +1,50 @@
import { status as httpStatus } from 'http-status';
import { getRequestGlobal } from '../../utilities/getRequestEntity.js';
import { headersWithCors } from '../../utilities/headersWithCors.js';
import { isNumber } from '../../utilities/isNumber.js';
import { sanitizePopulateParam } from '../../utilities/sanitizePopulateParam.js';
import { sanitizeSelectParam } from '../../utilities/sanitizeSelectParam.js';
import { updateOperation } from '../operations/update.js';
export const updateHandler = async (req)=>{
const globalConfig = getRequestGlobal(req);
const { searchParams } = req;
const depth = searchParams.get('depth');
const draft = searchParams.get('draft') === 'true';
const autosave = searchParams.get('autosave') === 'true';
const publishSpecificLocale = req.query.publishSpecificLocale;
const publishAllLocales = searchParams.get('publishAllLocales') === 'true';
const unpublishAllLocales = searchParams.get('unpublishAllLocales') === 'true';
const result = await updateOperation({
slug: globalConfig.slug,
autosave,
data: req.data,
depth: isNumber(depth) ? Number(depth) : undefined,
draft,
globalConfig,
populate: sanitizePopulateParam(req.query.populate),
publishAllLocales,
publishSpecificLocale,
req,
select: sanitizeSelectParam(req.query.select),
unpublishAllLocales
});
let message = req.t('general:updatedSuccessfully');
if (draft) {
message = req.t('version:draftSavedSuccessfully');
}
if (autosave) {
message = req.t('version:autosavedSuccessfully');
}
return Response.json({
message,
result
}, {
headers: headersWithCors({
headers: new Headers(),
req
}),
status: httpStatus.OK
});
};
//# sourceMappingURL=update.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"validOperators.js","names":["getOperatorValueTypes","fieldType","all","contains","equals","exists","greater_than","greater_than_equal","in","intersects","less_than","less_than_equal","like","near","not_equals","not_in","not_like","within"],"sources":["../../../../src/elements/WhereBuilder/Condition/validOperators.ts"],"sourcesContent":["export const getOperatorValueTypes = (fieldType) => {\n return {\n all: 'any',\n contains: 'string',\n equals: 'any',\n /*\n * exists:\n * The expected value is boolean, but it's passed as a string ('true' or 'false').\n * Need to additionally check if the value is strictly 'true' or 'false' as a string,\n * rather than using a direct typeof comparison.\n * This is handled as:\n * validOperatorValue === 'boolean' && (value === 'true' || value === 'false')\n */\n exists: 'boolean',\n /*\n * greater_than, greater_than_equal, less_than, less_than_equal:\n * Used for number and date fields:\n * - For date fields, the value is an object (e.g., Mon Feb 17 2025 12:00:00 GMT+0000).\n * - For number fields, the value is a string representing the number.\n */\n greater_than: fieldType === 'date' ? 'object' : 'string',\n greater_than_equal: fieldType === 'date' ? 'object' : 'string',\n in: 'any',\n intersects: 'any',\n less_than: fieldType === 'date' ? 'object' : 'string',\n less_than_equal: fieldType === 'date' ? 'object' : 'string',\n like: 'string',\n near: 'any',\n not_equals: 'any',\n not_in: 'any',\n not_like: 'string',\n within: 'any',\n }\n}\n"],"mappings":"AAAA,OAAO,MAAMA,qBAAA,GAAyBC,SAAA;EACpC,OAAO;IACLC,GAAA,EAAK;IACLC,QAAA,EAAU;IACVC,MAAA,EAAQ;IACR;;;;;;;;IAQAC,MAAA,EAAQ;IACR;;;;;;IAMAC,YAAA,EAAcL,SAAA,KAAc,SAAS,WAAW;IAChDM,kBAAA,EAAoBN,SAAA,KAAc,SAAS,WAAW;IACtDO,EAAA,EAAI;IACJC,UAAA,EAAY;IACZC,SAAA,EAAWT,SAAA,KAAc,SAAS,WAAW;IAC7CU,eAAA,EAAiBV,SAAA,KAAc,SAAS,WAAW;IACnDW,IAAA,EAAM;IACNC,IAAA,EAAM;IACNC,UAAA,EAAY;IACZC,MAAA,EAAQ;IACRC,QAAA,EAAU;IACVC,MAAA,EAAQ;EACV;AACF","ignoreList":[]}

View File

@@ -0,0 +1,35 @@
interface Options {
/**
* Keys that have been provided in the Sentry bundler plugin via the the `applicationKey` option, identifying your bundles.
*
* - Webpack plugin: https://www.npmjs.com/package/@sentry/webpack-plugin#applicationkey
* - Vite plugin: https://www.npmjs.com/package/@sentry/vite-plugin#applicationkey
* - Esbuild plugin: https://www.npmjs.com/package/@sentry/esbuild-plugin#applicationkey
* - Rollup plugin: https://www.npmjs.com/package/@sentry/rollup-plugin#applicationkey
*/
filterKeys: string[];
/**
* Defines how the integration should behave. "Third-Party Stack Frames" are stack frames that did not come from files marked with a matching bundle key.
*
* You can define the behaviour with one of 4 modes:
* - `drop-error-if-contains-third-party-frames`: Drop error events that contain at least one third-party stack frame.
* - `drop-error-if-exclusively-contains-third-party-frames`: Drop error events that exclusively contain third-party stack frames.
* - `apply-tag-if-contains-third-party-frames`: Keep all error events, but apply a `third_party_code: true` tag in case the error contains at least one third-party stack frame.
* - `apply-tag-if-exclusively-contains-third-party-frames`: Keep all error events, but apply a `third_party_code: true` tag in case the error contains exclusively third-party stack frames.
*
* If you chose the mode to only apply tags, the tags can then be used in Sentry to filter your issue stream by entering `!third_party_code:True` in the search bar.
*/
behaviour: 'drop-error-if-contains-third-party-frames' | 'drop-error-if-exclusively-contains-third-party-frames' | 'apply-tag-if-contains-third-party-frames' | 'apply-tag-if-exclusively-contains-third-party-frames';
/**
* @experimental
* If set to true, the integration will ignore frames that are internal to the Sentry SDK from the third-party frame detection.
* Note that enabling this option might lead to errors being misclassified as third-party errors.
*/
ignoreSentryInternalFrames?: boolean;
}
/**
* This integration allows you to filter out, or tag error events that do not come from user code marked with a bundle key via the Sentry bundler plugins.
*/
export declare const thirdPartyErrorFilterIntegration: (options: Options) => import("..").Integration;
export {};
//# sourceMappingURL=third-party-errors-filter.d.ts.map

View File

@@ -0,0 +1,27 @@
import { CSSInterpolation } from '@emotion/serialize'
import css from './css'
type Keyframes = {
name: string
styles: string
anim: 1
toString: () => string
} & string
export function keyframes(
template: TemplateStringsArray,
...args: CSSInterpolation[]
): Keyframes
export function keyframes(...args: CSSInterpolation[]): Keyframes
export function keyframes(...args: CSSInterpolation[]) {
let insertable = css(...args)
const name = `animation-${insertable.name}`
return {
name,
styles: `@keyframes ${name}{${insertable.styles}}`,
anim: 1,
toString() {
return `_EMO_${this.name}_${this.styles}_EMO_`
}
}
}

View File

@@ -0,0 +1,17 @@
/**
* @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 SeparatorHorizontal = createLucideIcon("SeparatorHorizontal", [
["line", { x1: "3", x2: "21", y1: "12", y2: "12", key: "10d38w" }],
["polyline", { points: "8 8 12 4 16 8", key: "zo8t4w" }],
["polyline", { points: "16 16 12 20 8 16", key: "1oyrid" }]
]);
export { SeparatorHorizontal as default };
//# sourceMappingURL=separator-horizontal.js.map

View File

@@ -0,0 +1,150 @@
import { defineIntegration, debug, getActiveSpan, getRootSpan, hasSpansEnabled } from '@sentry/core';
import { DEBUG_BUILD } from '../debug-build.js';
import { WINDOW } from '../helpers.js';
import { startProfileForSpan } from './startProfileForSpan.js';
import { UIProfiler } from './UIProfiler.js';
import { attachProfiledThreadToEvent, hasLegacyProfiling, isAutomatedPageLoadSpan, shouldProfileSpanLegacy, getActiveProfilesCount, findProfiledTransactionsFromEnvelope, takeProfileFromGlobalCache, createProfilingEvent, addProfilesToEnvelope } from './utils.js';
const INTEGRATION_NAME = 'BrowserProfiling';
const _browserProfilingIntegration = (() => {
return {
name: INTEGRATION_NAME,
setup(client) {
const options = client.getOptions() ;
const profiler = new UIProfiler();
if (!hasLegacyProfiling(options) && !options.profileLifecycle) {
// Set default lifecycle mode
options.profileLifecycle = 'manual';
}
// eslint-disable-next-line deprecation/deprecation
if (hasLegacyProfiling(options) && !options.profilesSampleRate) {
DEBUG_BUILD && debug.log('[Profiling] Profiling disabled, no profiling options found.');
return;
}
const activeSpan = getActiveSpan();
const rootSpan = activeSpan && getRootSpan(activeSpan);
if (hasLegacyProfiling(options) && options.profileSessionSampleRate !== undefined) {
DEBUG_BUILD &&
debug.warn(
'[Profiling] Both legacy profiling (`profilesSampleRate`) and UI profiling settings are defined. `profileSessionSampleRate` has no effect when legacy profiling is enabled.',
);
}
// UI PROFILING (Profiling V2)
if (!hasLegacyProfiling(options)) {
const lifecycleMode = options.profileLifecycle;
// Registering hooks in all lifecycle modes to be able to notify users in case they want to start/stop the profiler manually in `trace` mode
client.on('startUIProfiler', () => profiler.start());
client.on('stopUIProfiler', () => profiler.stop());
if (lifecycleMode === 'manual') {
profiler.initialize(client);
} else if (lifecycleMode === 'trace') {
if (!hasSpansEnabled(options)) {
DEBUG_BUILD &&
debug.warn(
"[Profiling] `profileLifecycle` is 'trace' but tracing is disabled. Set a `tracesSampleRate` or `tracesSampler` to enable span tracing.",
);
return;
}
profiler.initialize(client);
// If there is an active, sampled root span already, notify the profiler
if (rootSpan) {
profiler.notifyRootSpanActive(rootSpan);
}
// In case rootSpan is created slightly after setup -> schedule microtask to re-check and notify.
WINDOW.setTimeout(() => {
const laterActiveSpan = getActiveSpan();
const laterRootSpan = laterActiveSpan && getRootSpan(laterActiveSpan);
if (laterRootSpan) {
profiler.notifyRootSpanActive(laterRootSpan);
}
}, 0);
}
} else {
// LEGACY PROFILING (v1)
if (rootSpan && isAutomatedPageLoadSpan(rootSpan)) {
if (shouldProfileSpanLegacy(rootSpan)) {
startProfileForSpan(rootSpan);
}
}
client.on('spanStart', (span) => {
if (span === getRootSpan(span) && shouldProfileSpanLegacy(span)) {
startProfileForSpan(span);
}
});
client.on('beforeEnvelope', (envelope) => {
// if not profiles are in queue, there is nothing to add to the envelope.
if (!getActiveProfilesCount()) {
return;
}
const profiledTransactionEvents = findProfiledTransactionsFromEnvelope(envelope);
if (!profiledTransactionEvents.length) {
return;
}
const profilesToAddToEnvelope = [];
for (const profiledTransaction of profiledTransactionEvents) {
const context = profiledTransaction?.contexts;
const profile_id = context?.profile?.['profile_id'];
const start_timestamp = context?.profile?.['start_timestamp'];
if (typeof profile_id !== 'string') {
DEBUG_BUILD && debug.log('[Profiling] cannot find profile for a span without a profile context');
continue;
}
if (!profile_id) {
DEBUG_BUILD && debug.log('[Profiling] cannot find profile for a span without a profile context');
continue;
}
// Remove the profile from the span context before sending, relay will take care of the rest.
if (context?.profile) {
delete context.profile;
}
const profile = takeProfileFromGlobalCache(profile_id);
if (!profile) {
DEBUG_BUILD && debug.log(`[Profiling] Could not retrieve profile for span: ${profile_id}`);
continue;
}
const profileEvent = createProfilingEvent(
profile_id,
start_timestamp ,
profile,
profiledTransaction ,
);
if (profileEvent) {
profilesToAddToEnvelope.push(profileEvent);
}
}
addProfilesToEnvelope(envelope , profilesToAddToEnvelope);
});
}
},
processEvent(event) {
return attachProfiledThreadToEvent(event);
},
};
}) ;
const browserProfilingIntegration = defineIntegration(_browserProfilingIntegration);
export { browserProfilingIntegration };
//# sourceMappingURL=integration.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"url.js","sourceRoot":"","sources":["../../../src/utils/url.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,UAAU,CAAC,GAAW,EAAE,UAA2B;IACjE,IAAI,OAAO,UAAU,KAAK,QAAQ,EAAE;QAClC,OAAO,GAAG,KAAK,UAAU,CAAC;KAC3B;SAAM;QACL,OAAO,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;KAChC;AACH,CAAC;AACD;;;;GAIG;AACH,MAAM,UAAU,YAAY,CAC1B,GAAW,EACX,WAAoC;IAEpC,IAAI,CAAC,WAAW,EAAE;QAChB,OAAO,KAAK,CAAC;KACd;IAED,KAAK,MAAM,SAAS,IAAI,WAAW,EAAE;QACnC,IAAI,UAAU,CAAC,GAAG,EAAE,SAAS,CAAC,EAAE;YAC9B,OAAO,IAAI,CAAC;SACb;KACF;IACD,OAAO,KAAK,CAAC;AACf,CAAC","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 */\nexport function urlMatches(url: string, urlToMatch: string | RegExp): boolean {\n if (typeof urlToMatch === 'string') {\n return url === urlToMatch;\n } else {\n return !!url.match(urlToMatch);\n }\n}\n/**\n * Check if {@param url} should be ignored when comparing against {@param ignoredUrls}\n * @param url\n * @param ignoredUrls\n */\nexport function isUrlIgnored(\n url: string,\n ignoredUrls?: Array<string | RegExp>\n): boolean {\n if (!ignoredUrls) {\n return false;\n }\n\n for (const ignoreUrl of ignoredUrls) {\n if (urlMatches(url, ignoreUrl)) {\n return true;\n }\n }\n return false;\n}\n"]}

View File

@@ -0,0 +1,462 @@
/**
* 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.
*
*/
import { $generateHtmlFromNodes, $generateNodesFromDOM } from '@lexical/html';
import { $addNodeStyle, $sliceSelectedTextNodeContent } from '@lexical/selection';
import { objectKlassEquals } from '@lexical/utils';
import { $isRangeSelection, $getSelection, $createTabNode, SELECTION_INSERT_CLIPBOARD_NODES_COMMAND, $caretFromPoint, $isTextPointCaret, $getCaretRange, $getChildCaret, $getRoot, $isTextNode, $isElementNode, $parseSerializedNode, getDOMSelection, COPY_COMMAND, COMMAND_PRIORITY_CRITICAL, isSelectionWithinEditor, $getEditor, $cloneWithProperties } from 'lexical';
/**
* 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.
*
*/
// Do not require this module directly! Use normal `invariant` calls.
function formatDevErrorMessage(message) {
throw new Error(message);
}
/**
* Returns the *currently selected* Lexical content as an HTML string, relying on the
* logic defined in the exportDOM methods on the LexicalNode classes. Note that
* this will not return the HTML content of the entire editor (unless all the content is included
* in the current selection).
*
* @param editor - LexicalEditor instance to get HTML content from
* @param selection - The selection to use (default is $getSelection())
* @returns a string of HTML content
*/
function $getHtmlContent(editor, selection = $getSelection()) {
if (selection == null) {
{
formatDevErrorMessage(`Expected valid LexicalSelection`);
}
}
// If we haven't selected anything
if ($isRangeSelection(selection) && selection.isCollapsed() || selection.getNodes().length === 0) {
return '';
}
return $generateHtmlFromNodes(editor, selection);
}
/**
* Returns the *currently selected* Lexical content as a JSON string, relying on the
* logic defined in the exportJSON methods on the LexicalNode classes. Note that
* this will not return the JSON content of the entire editor (unless all the content is included
* in the current selection).
*
* @param editor - LexicalEditor instance to get the JSON content from
* @param selection - The selection to use (default is $getSelection())
* @returns
*/
function $getLexicalContent(editor, selection = $getSelection()) {
if (selection == null) {
{
formatDevErrorMessage(`Expected valid LexicalSelection`);
}
}
// If we haven't selected anything
if ($isRangeSelection(selection) && selection.isCollapsed() || selection.getNodes().length === 0) {
return null;
}
return JSON.stringify($generateJSONFromSelectedNodes(editor, selection));
}
/**
* Attempts to insert content of the mime-types text/plain or text/uri-list from
* the provided DataTransfer object into the editor at the provided selection.
* text/uri-list is only used if text/plain is not also provided.
*
* @param dataTransfer an object conforming to the [DataTransfer interface] (https://html.spec.whatwg.org/multipage/dnd.html#the-datatransfer-interface)
* @param selection the selection to use as the insertion point for the content in the DataTransfer object
*/
function $insertDataTransferForPlainText(dataTransfer, selection) {
const text = dataTransfer.getData('text/plain') || dataTransfer.getData('text/uri-list');
if (text != null) {
selection.insertRawText(text);
}
}
/**
* Attempts to insert content of the mime-types application/x-lexical-editor, text/html,
* text/plain, or text/uri-list (in descending order of priority) from the provided DataTransfer
* object into the editor at the provided selection.
*
* @param dataTransfer an object conforming to the [DataTransfer interface] (https://html.spec.whatwg.org/multipage/dnd.html#the-datatransfer-interface)
* @param selection the selection to use as the insertion point for the content in the DataTransfer object
* @param editor the LexicalEditor the content is being inserted into.
*/
function $insertDataTransferForRichText(dataTransfer, selection, editor) {
const lexicalString = dataTransfer.getData('application/x-lexical-editor');
if (lexicalString) {
try {
const payload = JSON.parse(lexicalString);
if (payload.namespace === editor._config.namespace && Array.isArray(payload.nodes)) {
const nodes = $generateNodesFromSerializedNodes(payload.nodes);
return $insertGeneratedNodes(editor, nodes, selection);
}
} catch (_unused) {
// Fail silently.
}
}
const htmlString = dataTransfer.getData('text/html');
const plainString = dataTransfer.getData('text/plain');
// Skip HTML handling if it matches the plain text representation.
// This avoids unnecessary processing for plain text strings created by
// iOS Safari autocorrect, which incorrectly includes a `text/html` type.
if (htmlString && plainString !== htmlString) {
try {
const parser = new DOMParser();
const dom = parser.parseFromString(trustHTML(htmlString), 'text/html');
const nodes = $generateNodesFromDOM(editor, dom);
return $insertGeneratedNodes(editor, nodes, selection);
} catch (_unused2) {
// Fail silently.
}
}
// Multi-line plain text in rich text mode pasted as separate paragraphs
// instead of single paragraph with linebreaks.
// Webkit-specific: Supports read 'text/uri-list' in clipboard.
const text = plainString || dataTransfer.getData('text/uri-list');
if (text != null) {
if ($isRangeSelection(selection)) {
const parts = text.split(/(\r?\n|\t)/);
if (parts[parts.length - 1] === '') {
parts.pop();
}
for (let i = 0; i < parts.length; i++) {
const currentSelection = $getSelection();
if ($isRangeSelection(currentSelection)) {
const part = parts[i];
if (part === '\n' || part === '\r\n') {
currentSelection.insertParagraph();
} else if (part === '\t') {
currentSelection.insertNodes([$createTabNode()]);
} else {
currentSelection.insertText(part);
}
}
}
} else {
selection.insertRawText(text);
}
}
}
function trustHTML(html) {
if (window.trustedTypes && window.trustedTypes.createPolicy) {
const policy = window.trustedTypes.createPolicy('lexical', {
createHTML: input => input
});
return policy.createHTML(html);
}
return html;
}
/**
* Inserts Lexical nodes into the editor using different strategies depending on
* some simple selection-based heuristics. If you're looking for a generic way to
* to insert nodes into the editor at a specific selection point, you probably want
* {@link lexical.$insertNodes}
*
* @param editor LexicalEditor instance to insert the nodes into.
* @param nodes The nodes to insert.
* @param selection The selection to insert the nodes into.
*/
function $insertGeneratedNodes(editor, nodes, selection) {
if (!editor.dispatchCommand(SELECTION_INSERT_CLIPBOARD_NODES_COMMAND, {
nodes,
selection
})) {
selection.insertNodes(nodes);
$updateSelectionOnInsert(selection);
}
return;
}
function $updateSelectionOnInsert(selection) {
if ($isRangeSelection(selection) && selection.isCollapsed()) {
const anchor = selection.anchor;
let nodeToInspect = null;
const anchorCaret = $caretFromPoint(anchor, 'previous');
if (anchorCaret) {
if ($isTextPointCaret(anchorCaret)) {
nodeToInspect = anchorCaret.origin;
} else {
const range = $getCaretRange(anchorCaret, $getChildCaret($getRoot(), 'next').getFlipped());
for (const caret of range) {
if ($isTextNode(caret.origin)) {
nodeToInspect = caret.origin;
break;
} else if ($isElementNode(caret.origin) && !caret.origin.isInline()) {
break;
}
}
}
}
if (nodeToInspect && $isTextNode(nodeToInspect)) {
const newFormat = nodeToInspect.getFormat();
const newStyle = nodeToInspect.getStyle();
if (selection.format !== newFormat || selection.style !== newStyle) {
selection.format = newFormat;
selection.style = newStyle;
selection.dirty = true;
}
}
}
}
function exportNodeToJSON(node) {
const serializedNode = node.exportJSON();
const nodeClass = node.constructor;
if (serializedNode.type !== nodeClass.getType()) {
{
formatDevErrorMessage(`LexicalNode: Node ${nodeClass.name} does not implement .exportJSON().`);
}
}
if ($isElementNode(node)) {
const serializedChildren = serializedNode.children;
if (!Array.isArray(serializedChildren)) {
{
formatDevErrorMessage(`LexicalNode: Node ${nodeClass.name} is an element but .exportJSON() does not have a children array.`);
}
}
}
return serializedNode;
}
function $appendNodesToJSON(editor, selection, currentNode, targetArray = []) {
let shouldInclude = selection !== null ? currentNode.isSelected(selection) : true;
const shouldExclude = $isElementNode(currentNode) && currentNode.excludeFromCopy('html');
let target = currentNode;
if (selection !== null) {
let clone = $cloneWithProperties(currentNode);
clone = $isTextNode(clone) && selection !== null ? $sliceSelectedTextNodeContent(selection, clone) : clone;
target = clone;
}
const children = $isElementNode(target) ? target.getChildren() : [];
const serializedNode = exportNodeToJSON(target);
// TODO: TextNode calls getTextContent() (NOT node.__text) within its exportJSON method
// which uses getLatest() to get the text from the original node with the same key.
// This is a deeper issue with the word "clone" here, it's still a reference to the
// same node as far as the LexicalEditor is concerned since it shares a key.
// We need a way to create a clone of a Node in memory with its own key, but
// until then this hack will work for the selected text extract use case.
if ($isTextNode(target)) {
const text = target.__text;
// If an uncollapsed selection ends or starts at the end of a line of specialized,
// TextNodes, such as code tokens, we will get a 'blank' TextNode here, i.e., one
// with text of length 0. We don't want this, it makes a confusing mess. Reset!
if (text.length > 0) {
serializedNode.text = text;
} else {
shouldInclude = false;
}
}
for (let i = 0; i < children.length; i++) {
const childNode = children[i];
const shouldIncludeChild = $appendNodesToJSON(editor, selection, childNode, serializedNode.children);
if (!shouldInclude && $isElementNode(currentNode) && shouldIncludeChild && currentNode.extractWithChild(childNode, selection, 'clone')) {
shouldInclude = true;
}
}
if (shouldInclude && !shouldExclude) {
targetArray.push(serializedNode);
} else if (Array.isArray(serializedNode.children)) {
for (let i = 0; i < serializedNode.children.length; i++) {
const serializedChildNode = serializedNode.children[i];
targetArray.push(serializedChildNode);
}
}
return shouldInclude;
}
// TODO why $ function with Editor instance?
/**
* Gets the Lexical JSON of the nodes inside the provided Selection.
*
* @param editor LexicalEditor to get the JSON content from.
* @param selection Selection to get the JSON content from.
* @returns an object with the editor namespace and a list of serializable nodes as JavaScript objects.
*/
function $generateJSONFromSelectedNodes(editor, selection) {
const nodes = [];
const root = $getRoot();
const topLevelChildren = root.getChildren();
for (let i = 0; i < topLevelChildren.length; i++) {
const topLevelNode = topLevelChildren[i];
$appendNodesToJSON(editor, selection, topLevelNode, nodes);
}
return {
namespace: editor._config.namespace,
nodes
};
}
/**
* This method takes an array of objects conforming to the BaseSerializedNode interface and returns
* an Array containing instances of the corresponding LexicalNode classes registered on the editor.
* Normally, you'd get an Array of BaseSerialized nodes from {@link $generateJSONFromSelectedNodes}
*
* @param serializedNodes an Array of objects conforming to the BaseSerializedNode interface.
* @returns an Array of Lexical Node objects.
*/
function $generateNodesFromSerializedNodes(serializedNodes) {
const nodes = [];
for (let i = 0; i < serializedNodes.length; i++) {
const serializedNode = serializedNodes[i];
const node = $parseSerializedNode(serializedNode);
if ($isTextNode(node)) {
$addNodeStyle(node);
}
nodes.push(node);
}
return nodes;
}
const EVENT_LATENCY = 50;
let clipboardEventTimeout = null;
// TODO custom selection
// TODO potentially have a node customizable version for plain text
/**
* Copies the content of the current selection to the clipboard in
* text/plain, text/html, and application/x-lexical-editor (Lexical JSON)
* formats.
*
* @param editor the LexicalEditor instance to copy content from
* @param event the native browser ClipboardEvent to add the content to.
* @returns
*/
async function copyToClipboard(editor, event, data) {
if (clipboardEventTimeout !== null) {
// Prevent weird race conditions that can happen when this function is run multiple times
// synchronously. In the future, we can do better, we can cancel/override the previously running job.
return false;
}
if (event !== null) {
return new Promise((resolve, reject) => {
editor.update(() => {
resolve($copyToClipboardEvent(editor, event, data));
});
});
}
const rootElement = editor.getRootElement();
const editorWindow = editor._window || window;
const windowDocument = window.document;
const domSelection = getDOMSelection(editorWindow);
if (rootElement === null || domSelection === null) {
return false;
}
const element = windowDocument.createElement('span');
element.style.cssText = 'position: fixed; top: -1000px;';
element.append(windowDocument.createTextNode('#'));
rootElement.append(element);
const range = new Range();
range.setStart(element, 0);
range.setEnd(element, 1);
domSelection.removeAllRanges();
domSelection.addRange(range);
return new Promise((resolve, reject) => {
const removeListener = editor.registerCommand(COPY_COMMAND, secondEvent => {
if (objectKlassEquals(secondEvent, ClipboardEvent)) {
removeListener();
if (clipboardEventTimeout !== null) {
window.clearTimeout(clipboardEventTimeout);
clipboardEventTimeout = null;
}
resolve($copyToClipboardEvent(editor, secondEvent, data));
}
// Block the entire copy flow while we wait for the next ClipboardEvent
return true;
}, COMMAND_PRIORITY_CRITICAL);
// If the above hack execCommand hack works, this timeout code should never fire. Otherwise,
// the listener will be quickly freed so that the user can reuse it again
clipboardEventTimeout = window.setTimeout(() => {
removeListener();
clipboardEventTimeout = null;
resolve(false);
}, EVENT_LATENCY);
windowDocument.execCommand('copy');
element.remove();
});
}
// TODO shouldn't pass editor (pass namespace directly)
function $copyToClipboardEvent(editor, event, data) {
if (data === undefined) {
const domSelection = getDOMSelection(editor._window);
if (!domSelection) {
return false;
}
const anchorDOM = domSelection.anchorNode;
const focusDOM = domSelection.focusNode;
if (anchorDOM !== null && focusDOM !== null && !isSelectionWithinEditor(editor, anchorDOM, focusDOM)) {
return false;
}
const selection = $getSelection();
if (selection === null) {
return false;
}
data = $getClipboardDataFromSelection(selection);
}
event.preventDefault();
const clipboardData = event.clipboardData;
if (clipboardData === null) {
return false;
}
setLexicalClipboardDataTransfer(clipboardData, data);
return true;
}
const clipboardDataFunctions = [['text/html', $getHtmlContent], ['application/x-lexical-editor', $getLexicalContent]];
/**
* Serialize the content of the current selection to strings in
* text/plain, text/html, and application/x-lexical-editor (Lexical JSON)
* formats (as available).
*
* @param selection the selection to serialize (defaults to $getSelection())
* @returns LexicalClipboardData
*/
function $getClipboardDataFromSelection(selection = $getSelection()) {
const clipboardData = {
'text/plain': selection ? selection.getTextContent() : ''
};
if (selection) {
const editor = $getEditor();
for (const [mimeType, $editorFn] of clipboardDataFunctions) {
const v = $editorFn(editor, selection);
if (v !== null) {
clipboardData[mimeType] = v;
}
}
}
return clipboardData;
}
/**
* Call setData on the given clipboardData for each MIME type present
* in the given data (from {@link $getClipboardDataFromSelection})
*
* @param clipboardData the event.clipboardData to populate from data
* @param data The lexical data
*/
function setLexicalClipboardDataTransfer(clipboardData, data) {
for (const k in data) {
const v = data[k];
if (v !== undefined) {
clipboardData.setData(k, v);
}
}
}
export { $generateJSONFromSelectedNodes, $generateNodesFromSerializedNodes, $getClipboardDataFromSelection, $getHtmlContent, $getLexicalContent, $insertDataTransferForPlainText, $insertDataTransferForRichText, $insertGeneratedNodes, copyToClipboard, setLexicalClipboardDataTransfer };

View File

@@ -0,0 +1,52 @@
var arrayFilter = require('./_arrayFilter'),
baseFilter = require('./_baseFilter'),
baseIteratee = require('./_baseIteratee'),
isArray = require('./isArray');
/**
* Iterates over elements of `collection`, returning an array of all elements
* `predicate` returns truthy for. The predicate is invoked with three
* arguments: (value, index|key, collection).
*
* **Note:** Unlike `_.remove`, this method returns a new array.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Collection
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} [predicate=_.identity] The function invoked per iteration.
* @returns {Array} Returns the new filtered array.
* @see _.reject
* @example
*
* var users = [
* { 'user': 'barney', 'age': 36, 'active': true },
* { 'user': 'fred', 'age': 40, 'active': false }
* ];
*
* _.filter(users, function(o) { return !o.active; });
* // => objects for ['fred']
*
* // The `_.matches` iteratee shorthand.
* _.filter(users, { 'age': 36, 'active': true });
* // => objects for ['barney']
*
* // The `_.matchesProperty` iteratee shorthand.
* _.filter(users, ['active', false]);
* // => objects for ['fred']
*
* // The `_.property` iteratee shorthand.
* _.filter(users, 'active');
* // => objects for ['barney']
*
* // Combining several predicates using `_.overEvery` or `_.overSome`.
* _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]]));
* // => objects for ['fred', 'barney']
*/
function filter(collection, predicate) {
var func = isArray(collection) ? arrayFilter : baseFilter;
return func(collection, baseIteratee(predicate, 3));
}
module.exports = filter;

View File

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

View File

@@ -0,0 +1 @@
{"version":3,"file":"suppressTracing.d.ts","sourceRoot":"","sources":["../../../src/utils/suppressTracing.ts"],"names":[],"mappings":"AAGA,4FAA4F;AAC5F,wBAAgB,eAAe,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,CAAC,GAAG,CAAC,CAGvD"}

View File

@@ -0,0 +1,54 @@
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true,
});
exports.UniqueInputFieldNamesRule = UniqueInputFieldNamesRule;
var _invariant = require('../../jsutils/invariant.js');
var _GraphQLError = require('../../error/GraphQLError.js');
/**
* Unique input field names
*
* A GraphQL input object value is only valid if all supplied fields are
* uniquely named.
*
* See https://spec.graphql.org/draft/#sec-Input-Object-Field-Uniqueness
*/
function UniqueInputFieldNamesRule(context) {
const knownNameStack = [];
let knownNames = Object.create(null);
return {
ObjectValue: {
enter() {
knownNameStack.push(knownNames);
knownNames = Object.create(null);
},
leave() {
const prevKnownNames = knownNameStack.pop();
prevKnownNames || (0, _invariant.invariant)(false);
knownNames = prevKnownNames;
},
},
ObjectField(node) {
const fieldName = node.name.value;
if (knownNames[fieldName]) {
context.reportError(
new _GraphQLError.GraphQLError(
`There can be only one input field named "${fieldName}".`,
{
nodes: [knownNames[fieldName], node.name],
},
),
);
} else {
knownNames[fieldName] = node.name;
}
},
};
}

View File

@@ -0,0 +1,15 @@
"use strict";
exports.formatRelative = void 0;
const formatRelativeLocale = {
lastWeek: "eeee 'שעבר בשעה' p",
yesterday: "'אתמול בשעה' p",
today: "'היום בשעה' p",
tomorrow: "'מחר בשעה' p",
nextWeek: "eeee 'בשעה' p",
other: "P",
};
const formatRelative = (token, _date, _baseDate, _options) =>
formatRelativeLocale[token];
exports.formatRelative = formatRelative;

View File

@@ -0,0 +1,9 @@
import type { ClientCollectionConfig, ViewTypes } from 'payload';
import React from 'react';
import './index.scss';
export type Props = {
collection: ClientCollectionConfig;
viewType?: ViewTypes;
};
export declare const RestoreMany: React.FC<Props>;
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1,27 @@
// @ts-ignore TS6133
import { expect, test } from "vitest";
import * as z from "zod/v3";
const stringSchema = z.string();
test("safeparse fail", () => {
const safe = stringSchema.safeParse(12);
expect(safe.success).toEqual(false);
expect(safe.error).toBeInstanceOf(z.ZodError);
});
test("safeparse pass", () => {
const safe = stringSchema.safeParse("12");
expect(safe.success).toEqual(true);
expect(safe.data).toEqual("12");
});
test("safeparse unexpected error", () => {
expect(() =>
stringSchema
.refine((data) => {
throw new Error(data);
})
.safeParse("12")
).toThrow();
});

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 './braces.js';
//# sourceMappingURL=curly-braces.js.map

View File

@@ -0,0 +1,3 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=jtd-schema.js.map

View File

@@ -0,0 +1,149 @@
import type { Client } from '../client';
import type { DebugImage } from './debugMeta';
import type { Integration } from './integration';
import type { MeasurementUnit } from './measurement';
export interface ContinuousProfiler<T extends Client> {
initialize(client: T): void;
start(): void;
stop(): void;
}
export interface ProfilingIntegration<T extends Client = Client> extends Integration {
_profiler: ContinuousProfiler<T>;
}
export interface Profiler {
/**
* Starts the profiler.
*/
startProfiler(): void;
/**
* Stops the profiler.
*/
stopProfiler(): void;
}
export type ThreadId = string;
export type FrameId = number;
export type StackId = number;
export interface ThreadCpuSample {
stack_id: StackId;
thread_id: ThreadId;
queue_address?: string;
elapsed_since_start_ns: string;
}
export interface ContinuousThreadCpuSample {
stack_id: StackId;
thread_id: ThreadId;
queue_address?: string;
timestamp: number;
}
export type ThreadCpuStack = FrameId[];
export type ThreadCpuFrame = {
function?: string;
file?: string;
lineno?: number;
colno?: number;
abs_path?: string;
platform?: string;
instruction_addr?: string;
module?: string;
in_app?: boolean;
};
export interface ThreadCpuProfile {
samples: ThreadCpuSample[];
stacks: ThreadCpuStack[];
frames: ThreadCpuFrame[];
thread_metadata: Record<ThreadId, {
name?: string;
priority?: number;
}>;
queue_metadata?: Record<string, {
label: string;
}>;
}
export interface ContinuousThreadCpuProfile {
samples: ContinuousThreadCpuSample[];
stacks: ThreadCpuStack[];
frames: ThreadCpuFrame[];
thread_metadata: Record<ThreadId, {
name?: string;
priority?: number;
}>;
queue_metadata?: Record<string, {
label: string;
}>;
}
interface BaseProfile<T> {
version: string;
release: string;
environment: string;
platform: string;
profile: T;
debug_meta?: {
images: DebugImage[];
};
measurements?: Record<string, {
unit: MeasurementUnit;
values: {
elapsed_since_start_ns: number;
value: number;
}[];
}>;
}
export interface Profile extends BaseProfile<ThreadCpuProfile> {
event_id: string;
version: string;
os: {
name: string;
version: string;
build_number?: string;
};
runtime: {
name: string;
version: string;
};
device: {
architecture: string;
is_emulator: boolean;
locale: string;
manufacturer: string;
model: string;
};
timestamp: string;
release: string;
environment: string;
platform: string;
profile: ThreadCpuProfile;
debug_meta?: {
images: DebugImage[];
};
transaction?: {
name: string;
id: string;
trace_id: string;
active_thread_id: string;
};
transactions?: {
name: string;
id: string;
trace_id: string;
active_thread_id: string;
relative_start_ns: string;
relative_end_ns: string;
}[];
measurements?: Record<string, {
unit: MeasurementUnit;
values: {
elapsed_since_start_ns: number;
value: number;
}[];
}>;
}
export interface ProfileChunk extends BaseProfile<ContinuousThreadCpuProfile> {
chunk_id: string;
profiler_id: string;
client_sdk: {
name: string;
version: string;
};
}
export {};
//# sourceMappingURL=profiling.d.ts.map

View File

@@ -0,0 +1 @@
module.exports={A:{A:{"1":"F A B","2":"K D E zC"},B:{"1":"0 1 2 3 4 5 6 7 8 C L M G N O P Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB I"},C:{"1":"0 1 2 3 4 5 6 7 8 9 J bB K D E F A B C L M G N O P cB AB BB CB DB EB FB GB HB IB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B WC 6B XC 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC MC NC Q H R YC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB I ZC aC OC 1C 2C 3C 5C","2":"0C VC 4C"},D:{"1":"0 1 2 3 4 5 6 7 8 9 bB K D E F A B C L M G N O P cB AB BB CB DB EB FB GB HB IB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B WC 6B XC 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC MC NC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB I ZC aC OC","2":"J"},E:{"1":"K D E F A B C L M G 7C 8C 9C AD cC PC QC BD CD DD dC eC RC ED SC fC gC hC iC jC FD TC kC lC mC nC oC GD UC pC qC rC sC HD tC uC vC wC ID","2":"J bB 6C bC"},F:{"1":"0 1 2 3 4 5 6 7 8 9 C G N O P cB AB BB CB DB EB FB GB HB IB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC MC NC Q H R YC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z PC xC ND QC","2":"F B JD KD LD MD"},G:{"1":"E PD QD RD SD TD UD VD WD XD YD ZD aD bD cD dD eD fD gD hD dC eC RC iD SC fC gC hC iC jC jD TC kC lC mC nC oC kD UC pC qC rC sC lD tC uC vC wC","2":"bC OD yC"},H:{"2":"mD"},I:{"1":"I rD sD","2":"VC nD oD pD qD yC","130":"J"},J:{"1":"D A"},K:{"1":"B C H PC xC QC","2":"A"},L:{"1":"I"},M:{"1":"OC"},N:{"1":"A B"},O:{"1":"RC"},P:{"1":"9 J AB BB CB DB EB FB GB HB IB tD uD vD wD xD cC yD zD 0D 1D 2D SC TC UC 3D"},Q:{"1":"4D"},R:{"1":"5D"},S:{"1":"6D 7D"}},B:2,C:"WOFF - Web Open Font Format",D:true};

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/admin/elements/DatePicker.ts"],"sourcesContent":["import type { DatePickerProps } from 'react-datepicker'\n\nexport type SharedProps = {\n displayFormat?: string\n overrides?: DatePickerProps\n pickerAppearance?: 'dayAndTime' | 'dayOnly' | 'default' | 'monthOnly' | 'timeOnly'\n}\n\nexport type TimePickerProps = {\n maxTime?: Date\n minTime?: Date\n timeFormat?: string\n timeIntervals?: number\n}\n\nexport type DayPickerProps = {\n maxDate?: Date\n minDate?: Date\n monthsToShow?: 1 | 2\n}\n\nexport type MonthPickerProps = {\n maxDate?: Date\n minDate?: Date\n}\n\nexport type ConditionalDateProps =\n | ({\n pickerAppearance: 'dayOnly'\n } & DayPickerProps &\n SharedProps)\n | ({\n pickerAppearance: 'monthOnly'\n } & MonthPickerProps &\n SharedProps)\n | ({\n pickerAppearance: 'timeOnly'\n } & SharedProps &\n TimePickerProps)\n | ({\n pickerAppearance?: 'dayAndTime'\n } & DayPickerProps &\n SharedProps &\n TimePickerProps)\n | ({\n pickerAppearance?: 'default'\n } & SharedProps)\n"],"names":[],"mappings":"AA0BA,WAoBoB"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"asterisk-square.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}

View File

@@ -0,0 +1,22 @@
import type {AnySchemaObject} from "../../types"
import type {SchemaObjCxt} from ".."
import type {JSONType, RuleGroup, Rule} from "../rules"
export function schemaHasRulesForType(
{schema, self}: SchemaObjCxt,
type: JSONType
): boolean | undefined {
const group = self.RULES.types[type]
return group && group !== true && shouldUseGroup(schema, group)
}
export function shouldUseGroup(schema: AnySchemaObject, group: RuleGroup): boolean {
return group.rules.some((rule) => shouldUseRule(schema, rule))
}
export function shouldUseRule(schema: AnySchemaObject, rule: Rule): boolean | undefined {
return (
schema[rule.keyword] !== undefined ||
rule.definition.implements?.some((kwd) => schema[kwd] !== undefined)
)
}

View File

@@ -0,0 +1,125 @@
import { getAsyncContextStrategy } from './asyncContext/index.js';
import { getMainCarrier, getGlobalSingleton } from './carrier.js';
import { Scope } from './scope.js';
import { generateSpanId } from './utils/propagationContext.js';
/**
* Get the currently active scope.
*/
function getCurrentScope() {
const carrier = getMainCarrier();
const acs = getAsyncContextStrategy(carrier);
return acs.getCurrentScope();
}
/**
* Get the currently active isolation scope.
* The isolation scope is active for the current execution context.
*/
function getIsolationScope() {
const carrier = getMainCarrier();
const acs = getAsyncContextStrategy(carrier);
return acs.getIsolationScope();
}
/**
* Get the global scope.
* This scope is applied to _all_ events.
*/
function getGlobalScope() {
return getGlobalSingleton('globalScope', () => new Scope());
}
/**
* Creates a new scope with and executes the given operation within.
* The scope is automatically removed once the operation
* finishes or throws.
*/
/**
* Either creates a new active scope, or sets the given scope as active scope in the given callback.
*/
function withScope(
...rest
) {
const carrier = getMainCarrier();
const acs = getAsyncContextStrategy(carrier);
// If a scope is defined, we want to make this the active scope instead of the default one
if (rest.length === 2) {
const [scope, callback] = rest;
if (!scope) {
return acs.withScope(callback);
}
return acs.withSetScope(scope, callback);
}
return acs.withScope(rest[0]);
}
/**
* Attempts to fork the current isolation scope and the current scope based on the current async context strategy. If no
* async context strategy is set, the isolation scope and the current scope will not be forked (this is currently the
* case, for example, in the browser).
*
* Usage of this function in environments without async context strategy is discouraged and may lead to unexpected behaviour.
*
* This function is intended for Sentry SDK and SDK integration development. It is not recommended to be used in "normal"
* applications directly because it comes with pitfalls. Use at your own risk!
*/
/**
* Either creates a new active isolation scope, or sets the given isolation scope as active scope in the given callback.
*/
function withIsolationScope(
...rest
) {
const carrier = getMainCarrier();
const acs = getAsyncContextStrategy(carrier);
// If a scope is defined, we want to make this the active scope instead of the default one
if (rest.length === 2) {
const [isolationScope, callback] = rest;
if (!isolationScope) {
return acs.withIsolationScope(callback);
}
return acs.withSetIsolationScope(isolationScope, callback);
}
return acs.withIsolationScope(rest[0]);
}
/**
* Get the currently active client.
*/
function getClient() {
return getCurrentScope().getClient();
}
/**
* Get a trace context for the given scope.
*/
function getTraceContextFromScope(scope) {
const propagationContext = scope.getPropagationContext();
const { traceId, parentSpanId, propagationSpanId } = propagationContext;
const traceContext = {
trace_id: traceId,
span_id: propagationSpanId || generateSpanId(),
};
if (parentSpanId) {
traceContext.parent_span_id = parentSpanId;
}
return traceContext;
}
export { getClient, getCurrentScope, getGlobalScope, getIsolationScope, getTraceContextFromScope, withIsolationScope, withScope };
//# sourceMappingURL=currentScopes.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"sampler.d.ts","sourceRoot":"","sources":["../../src/sampler.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAA2C,MAAM,oBAAoB,CAAC;AAC3F,OAAO,EAAsB,QAAQ,EAAS,MAAM,oBAAoB,CAAC;AAEzE,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC7E,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAOjE,OAAO,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAwB3D;;GAEG;AACH,qBAAa,aAAc,YAAW,OAAO;IAC3C,OAAO,CAAC,OAAO,CAAS;gBAEL,MAAM,EAAE,MAAM;IAKjC,kBAAkB;IACX,YAAY,CACjB,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,QAAQ,EAClB,cAAc,EAAE,cAAc,EAC9B,MAAM,EAAE,OAAO,GACd,cAAc;IAwHjB,4EAA4E;IACrE,QAAQ,IAAI,MAAM;CAG1B;AAuBD;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,EACnC,QAAQ,EACR,OAAO,EACP,cAAc,EACd,UAAU,EACV,yBAAyB,GAC1B,EAAE;IACD,QAAQ,EAAE,gBAAgB,GAAG,SAAS,CAAC;IACvC,OAAO,EAAE,OAAO,CAAC;IACjB,cAAc,EAAE,cAAc,CAAC;IAC/B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,yBAAyB,CAAC,EAAE,MAAM,CAAC;CACpC,GAAG,cAAc,CA0BjB"}

View File

@@ -0,0 +1,6 @@
import type { MultiValueProps } from 'react-select';
import React from 'react';
import type { Option } from '../types.js';
import './index.scss';
export declare const MultiValueLabel: React.FC<MultiValueProps<Option>>;
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1,23 @@
import type { DateArg } from "./types.js";
/**
* @name isBefore
* @category Common Helpers
* @summary Is the first date before the second one?
*
* @description
* Is the first date before the second one?
*
* @param date - The date that should be before the other one to return true
* @param dateToCompare - The date to compare with
*
* @returns The first date is before the second date
*
* @example
* // Is 10 July 1989 before 11 February 1987?
* const result = isBefore(new Date(1989, 6, 10), new Date(1987, 1, 11))
* //=> false
*/
export declare function isBefore(
date: DateArg<Date> & {},
dateToCompare: DateArg<Date> & {},
): boolean;

View File

@@ -0,0 +1,12 @@
import { Sampler, SamplingResult } from '../Sampler';
/** Sampler that samples a given fraction of traces based of trace id deterministically. */
export declare class TraceIdRatioBasedSampler implements Sampler {
private readonly _ratio;
private _upperBound;
constructor(ratio?: number);
shouldSample(context: unknown, traceId: string): SamplingResult;
toString(): string;
private _normalize;
private _accumulate;
}
//# sourceMappingURL=TraceIdRatioBasedSampler.d.ts.map

View File

@@ -0,0 +1,18 @@
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Event name definitions
export const ExceptionEventName = 'exception';
//# sourceMappingURL=enums.js.map

View File

@@ -0,0 +1,34 @@
import { addMilliseconds } from "./addMilliseconds.js";
/**
* The {@link addSeconds} function options.
*/
/**
* @name addSeconds
* @category Second Helpers
* @summary Add the specified number of seconds to the given date.
*
* @description
* Add the specified number of seconds to the given date.
*
* @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).
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
*
* @param date - The date to be changed
* @param amount - The amount of seconds to be added.
* @param options - An object with options
*
* @returns The new date with the seconds added
*
* @example
* // Add 30 seconds to 10 July 2014 12:45:00:
* const result = addSeconds(new Date(2014, 6, 10, 12, 45, 0), 30)
* //=> Thu Jul 10 2014 12:45:30
*/
export function addSeconds(date, amount, options) {
return addMilliseconds(date, amount * 1000, options);
}
// Fallback for modularized imports:
export default addSeconds;

View File

@@ -0,0 +1,42 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
const RuntimeGlobals = require("../RuntimeGlobals");
const RuntimeModule = require("../RuntimeModule");
const Template = require("../Template");
class HotModuleReplacementRuntimeModule extends RuntimeModule {
constructor() {
super("hot module replacement", RuntimeModule.STAGE_BASIC);
}
/**
* @returns {string | null} runtime code
*/
generate() {
return Template.getFunctionContent(
require("./HotModuleReplacement.runtime")
)
.replace(
/\$interceptModuleExecution\$/g,
RuntimeGlobals.interceptModuleExecution
)
.replace(/\$moduleCache\$/g, RuntimeGlobals.moduleCache)
.replace(/\$hmrModuleData\$/g, RuntimeGlobals.hmrModuleData)
.replace(/\$hmrDownloadManifest\$/g, RuntimeGlobals.hmrDownloadManifest)
.replace(
/\$hmrInvalidateModuleHandlers\$/g,
RuntimeGlobals.hmrInvalidateModuleHandlers
)
.replace(
/\$hmrDownloadUpdateHandlers\$/g,
RuntimeGlobals.hmrDownloadUpdateHandlers
);
}
}
module.exports = HotModuleReplacementRuntimeModule;

View File

@@ -0,0 +1 @@
{"version":3,"file":"apiKey.d.ts","sourceRoot":"","sources":["../../../src/auth/baseFields/apiKey.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAa,MAAM,8BAA8B,CAAA;AAOpE,eAAO,MAAM,YAAY,EAoDpB,KAAK,EAAE,CAAA"}

View File

@@ -0,0 +1,218 @@
# @jridgewell/remapping
> Remap sequential sourcemaps through transformations to point at the original source code
Remapping allows you to take the sourcemaps generated through transforming your code and "remap"
them to the original source locations. Think "my minified code, transformed with babel and bundled
with webpack", all pointing to the correct location in your original source code.
With remapping, none of your source code transformations need to be aware of the input's sourcemap,
they only need to generate an output sourcemap. This greatly simplifies building custom
transformations (think a find-and-replace).
## Installation
```sh
npm install @jridgewell/remapping
```
## Usage
```typescript
function remapping(
map: SourceMap | SourceMap[],
loader: (file: string, ctx: LoaderContext) => (SourceMap | null | undefined),
options?: { excludeContent: boolean, decodedMappings: boolean }
): SourceMap;
// LoaderContext gives the loader the importing sourcemap, tree depth, the ability to override the
// "source" location (where child sources are resolved relative to, or the location of original
// source), and the ability to override the "content" of an original source for inclusion in the
// output sourcemap.
type LoaderContext = {
readonly importer: string;
readonly depth: number;
source: string;
content: string | null | undefined;
}
```
`remapping` takes the final output sourcemap, and a `loader` function. For every source file pointer
in the sourcemap, the `loader` will be called with the resolved path. If the path itself represents
a transformed file (it has a sourcmap associated with it), then the `loader` should return that
sourcemap. If not, the path will be treated as an original, untransformed source code.
```js
// Babel transformed "helloworld.js" into "transformed.js"
const transformedMap = JSON.stringify({
file: 'transformed.js',
// 1st column of 2nd line of output file translates into the 1st source
// file, line 3, column 2
mappings: ';CAEE',
sources: ['helloworld.js'],
version: 3,
});
// Uglify minified "transformed.js" into "transformed.min.js"
const minifiedTransformedMap = JSON.stringify({
file: 'transformed.min.js',
// 0th column of 1st line of output file translates into the 1st source
// file, line 2, column 1.
mappings: 'AACC',
names: [],
sources: ['transformed.js'],
version: 3,
});
const remapped = remapping(
minifiedTransformedMap,
(file, ctx) => {
// The "transformed.js" file is an transformed file.
if (file === 'transformed.js') {
// The root importer is empty.
console.assert(ctx.importer === '');
// The depth in the sourcemap tree we're currently loading.
// The root `minifiedTransformedMap` is depth 0, and its source children are depth 1, etc.
console.assert(ctx.depth === 1);
return transformedMap;
}
// Loader will be called to load transformedMap's source file pointers as well.
console.assert(file === 'helloworld.js');
// `transformed.js`'s sourcemap points into `helloworld.js`.
console.assert(ctx.importer === 'transformed.js');
// This is a source child of `transformed`, which is a source child of `minifiedTransformedMap`.
console.assert(ctx.depth === 2);
return null;
}
);
console.log(remapped);
// {
// file: 'transpiled.min.js',
// mappings: 'AAEE',
// sources: ['helloworld.js'],
// version: 3,
// };
```
In this example, `loader` will be called twice:
1. `"transformed.js"`, the first source file pointer in the `minifiedTransformedMap`. We return the
associated sourcemap for it (its a transformed file, after all) so that sourcemap locations can
be traced through it into the source files it represents.
2. `"helloworld.js"`, our original, unmodified source code. This file does not have a sourcemap, so
we return `null`.
The `remapped` sourcemap now points from `transformed.min.js` into locations in `helloworld.js`. If
you were to read the `mappings`, it says "0th column of the first line output line points to the 1st
column of the 2nd line of the file `helloworld.js`".
### Multiple transformations of a file
As a convenience, if you have multiple single-source transformations of a file, you may pass an
array of sourcemap files in the order of most-recent transformation sourcemap first. Note that this
changes the `importer` and `depth` of each call to our loader. So our above example could have been
written as:
```js
const remapped = remapping(
[minifiedTransformedMap, transformedMap],
() => null
);
console.log(remapped);
// {
// file: 'transpiled.min.js',
// mappings: 'AAEE',
// sources: ['helloworld.js'],
// version: 3,
// };
```
### Advanced control of the loading graph
#### `source`
The `source` property can overridden to any value to change the location of the current load. Eg,
for an original source file, it allows us to change the location to the original source regardless
of what the sourcemap source entry says. And for transformed files, it allows us to change the
relative resolving location for child sources of the loaded sourcemap.
```js
const remapped = remapping(
minifiedTransformedMap,
(file, ctx) => {
if (file === 'transformed.js') {
// We pretend the transformed.js file actually exists in the 'src/' directory. When the nested
// source files are loaded, they will now be relative to `src/`.
ctx.source = 'src/transformed.js';
return transformedMap;
}
console.assert(file === 'src/helloworld.js');
// We could futher change the source of this original file, eg, to be inside a nested directory
// itself. This will be reflected in the remapped sourcemap.
ctx.source = 'src/nested/transformed.js';
return null;
}
);
console.log(remapped);
// {
// …,
// sources: ['src/nested/helloworld.js'],
// };
```
#### `content`
The `content` property can be overridden when we encounter an original source file. Eg, this allows
you to manually provide the source content of the original file regardless of whether the
`sourcesContent` field is present in the parent sourcemap. It can also be set to `null` to remove
the source content.
```js
const remapped = remapping(
minifiedTransformedMap,
(file, ctx) => {
if (file === 'transformed.js') {
// transformedMap does not include a `sourcesContent` field, so usually the remapped sourcemap
// would not include any `sourcesContent` values.
return transformedMap;
}
console.assert(file === 'helloworld.js');
// We can read the file to provide the source content.
ctx.content = fs.readFileSync(file, 'utf8');
return null;
}
);
console.log(remapped);
// {
// …,
// sourcesContent: [
// 'console.log("Hello world!")',
// ],
// };
```
### Options
#### excludeContent
By default, `excludeContent` is `false`. Passing `{ excludeContent: true }` will exclude the
`sourcesContent` field from the returned sourcemap. This is mainly useful when you want to reduce
the size out the sourcemap.
#### decodedMappings
By default, `decodedMappings` is `false`. Passing `{ decodedMappings: true }` will leave the
`mappings` field in a [decoded state](https://github.com/rich-harris/sourcemap-codec) instead of
encoding into a VLQ string.

View File

@@ -0,0 +1 @@
{"version":3,"file":"MeterProvider.js","sourceRoot":"","sources":["../../../src/metrics/MeterProvider.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 { Meter, MeterOptions } from './Meter';\n\n/**\n * A registry for creating named {@link Meter}s.\n */\nexport interface MeterProvider {\n /**\n * Returns a Meter, creating one if one with the given name, version, and\n * schemaUrl pair is not already created.\n *\n * @param name The name of the meter or instrumentation library.\n * @param version The version of the meter or instrumentation library.\n * @param options The options of the meter or instrumentation library.\n * @returns Meter A Meter with the given name and version\n */\n getMeter(name: string, version?: string, options?: MeterOptions): Meter;\n}\n"]}

View File

@@ -0,0 +1,37 @@
# 3.3.2 (January 22, 2020)
- Fix `React.memo` for v16.12+ (#93)
# 3.3.1 (November 14, 2019)
- Fix for UMD bundle (#85)
- Tooling changes (#83, #84, #87)
# 3.3.0 (January 23, 2019)
- Prevent hoisting of React.memo statics (#73)
# 3.2.1 (December 3, 2018)
- Fixed `defaultProps`, `displayName` and `propTypes` being hoisted from `React.forwardRef` to `React.forwardRef`. ([#71])
# 3.2.0 (November 26, 2018)
- Added support for `getDerivedStateFromError`. ([#68])
- Added support for React versions less than 0.14. ([#69])
# 3.1.0 (October 30, 2018)
- Added support for `contextType`. ([#62])
- Reduced bundle size. ([e89c7a6])
- Removed TypeScript definitions. ([#61])
# 3.0.1 (July 28, 2018)
- Fixed prop-types warnings. ([e0846fe])
# 3.0.0 (July 27, 2018)
- Dropped support for React versions less than 0.14. ([#55])
- Added support for `React.forwardRef` components. ([#55])
[#55]: https://github.com/mridgway/hoist-non-react-statics/pull/55
[#61]: https://github.com/mridgway/hoist-non-react-statics/pull/61
[#62]: https://github.com/mridgway/hoist-non-react-statics/pull/62
[#68]: https://github.com/mridgway/hoist-non-react-statics/pull/68
[#69]: https://github.com/mridgway/hoist-non-react-statics/pull/69
[#71]: https://github.com/mridgway/hoist-non-react-statics/pull/71
[e0846fe]: https://github.com/mridgway/hoist-non-react-statics/commit/e0846feefbad8b34d300de9966ffd607aacb81a3
[e89c7a6]: https://github.com/mridgway/hoist-non-react-statics/commit/e89c7a6168edc19eeadb2d149e600b888e8b0446

View File

@@ -0,0 +1,18 @@
"use strict";
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=span_context.js.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../src/sqlite-proxy/index.ts"],"sourcesContent":["export * from './driver.ts';\nexport * from './session.ts';\n"],"mappings":"AAAA,cAAc;AACd,cAAc;","names":[]}

View File

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

View File

@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F A B zC"},B:{"1":"0 1 2 3 4 5 6 7 8 f g h i j k l m n o p q r s t u v w x y z JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB I","2":"C L M G N O P Q H R S T U V W X Y Z a b c d e"},C:{"1":"0 1 2 3 4 5 6 7 8 Q H R YC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB I ZC aC OC 1C 2C 3C","2":"9 0C VC J bB K D E F A B C L M G N O P cB AB BB CB DB EB FB GB HB IB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B WC 6B XC 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC MC NC 4C 5C"},D:{"1":"0 1 2 3 4 5 6 7 8 f g h i j k l m n o p q r s t u v w x y z JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB I ZC aC OC","2":"9 J bB K D E F A B C L M G N O P cB AB BB CB DB EB FB GB HB IB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B WC 6B XC 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC MC NC Q H R S T U V W X Y Z a b c d e"},E:{"1":"G DD dC eC RC ED SC fC gC hC iC jC FD TC kC lC mC nC oC GD UC pC qC rC sC HD tC uC vC wC ID","2":"J bB K D E F A B C L M 6C bC 7C 8C 9C AD cC PC QC BD CD"},F:{"1":"0 1 2 3 4 5 6 7 8 YC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z","2":"9 F B C G N O P cB AB BB CB DB EB FB GB HB IB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC MC NC Q H R JD KD LD MD PC xC ND QC"},G:{"1":"hD dC eC RC iD SC fC gC hC iC jC jD TC kC lC mC nC oC kD UC pC qC rC sC lD tC uC vC wC","2":"E bC OD yC PD QD RD SD TD UD VD WD XD YD ZD aD bD cD dD eD fD gD"},H:{"2":"mD"},I:{"1":"I","2":"VC J nD oD pD qD yC rD sD"},J:{"2":"D A"},K:{"1":"H","2":"A B C PC xC QC"},L:{"1":"I"},M:{"1":"OC"},N:{"2":"A B"},O:{"1":"RC"},P:{"1":"9 AB BB CB DB EB FB GB HB IB TC UC 3D","2":"J tD uD vD wD xD cC yD zD 0D 1D 2D SC"},Q:{"16":"4D"},R:{"16":"5D"},S:{"2":"6D","16":"7D"}},B:5,C:"WebAssembly Reference Types",D:true};

View File

@@ -0,0 +1,24 @@
'use strict'
const { test } = require('tap')
const { join } = require('path')
const { once } = require('events')
const { MessageChannel } = require('worker_threads')
const ThreadStream = require('..')
test('message events emitted on the stream are posted to the worker', async function (t) {
t.plan(1)
const { port1, port2 } = new MessageChannel()
const stream = new ThreadStream({
filename: join(__dirname, 'on-message.js'),
sync: false
})
t.teardown(() => {
stream.end()
})
stream.emit('message', { text: 'hello', takeThisPortPlease: port1 }, [port1])
const [confirmation] = await once(port2, 'message')
t.equal(confirmation, 'received: hello')
})

View File

@@ -0,0 +1 @@
{"version":3,"file":"id.d.ts","sourceRoot":"","sources":["../../src/languages/id.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAEtE,eAAO,MAAM,cAAc,EAAE,yBA+nB5B,CAAA;AAED,eAAO,MAAM,EAAE,EAAE,QAGhB,CAAA"}

View File

@@ -0,0 +1,2 @@
const e=require(`../../utils/throw-if-empty.cjs`),t=t=>()=>(e.throwIfEmpty(t,`Keys cannot be empty`),{path:`/users`,body:JSON.stringify(t),method:`DELETE`}),n=t=>()=>(e.throwIfEmpty(String(t),`Key cannot be empty`),{path:`/users/${t}`,method:`DELETE`});exports.deleteUser=n,exports.deleteUsers=t;
//# sourceMappingURL=users.cjs.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"assert-valid-pattern.js","sourceRoot":"","sources":["../../src/assert-valid-pattern.ts"],"names":[],"mappings":";;;AAAA,MAAM,kBAAkB,GAAG,IAAI,GAAG,EAAE,CAAA;AAC7B,MAAM,kBAAkB,GAA2B,CACxD,OAAY,EACe,EAAE;IAC7B,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,CAAC;QAChC,MAAM,IAAI,SAAS,CAAC,iBAAiB,CAAC,CAAA;IACxC,CAAC;IAED,IAAI,OAAO,CAAC,MAAM,GAAG,kBAAkB,EAAE,CAAC;QACxC,MAAM,IAAI,SAAS,CAAC,qBAAqB,CAAC,CAAA;IAC5C,CAAC;AACH,CAAC,CAAA;AAVY,QAAA,kBAAkB,sBAU9B","sourcesContent":["const MAX_PATTERN_LENGTH = 1024 * 64\nexport const assertValidPattern: (pattern: any) => void = (\n pattern: any,\n): asserts pattern is string => {\n if (typeof pattern !== 'string') {\n throw new TypeError('invalid pattern')\n }\n\n if (pattern.length > MAX_PATTERN_LENGTH) {\n throw new TypeError('pattern is too long')\n }\n}\n"]}

View File

@@ -0,0 +1,50 @@
import type { Instrumentation } from '@opentelemetry/instrumentation';
import { PrismaInstrumentation } from '@prisma/instrumentation';
interface PrismaOptions {
/**
* @deprecated This is no longer used, v5 works out of the box.
*/
prismaInstrumentation?: Instrumentation;
/**
* Configuration passed through to the {@link PrismaInstrumentation} constructor.
*/
instrumentationConfig?: ConstructorParameters<typeof PrismaInstrumentation>[0];
}
export declare const instrumentPrisma: ((options?: PrismaOptions | undefined) => Instrumentation<import("@opentelemetry/instrumentation").InstrumentationConfig>) & {
id: string;
};
/**
* Adds Sentry tracing instrumentation for the [prisma](https://www.npmjs.com/package/prisma) library.
* For more information, see the [`prismaIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/prisma/).
*
* NOTE: By default, this integration works with Prisma version 6.
* To get performance instrumentation for other Prisma versions,
* 1. Install the `@prisma/instrumentation` package with the desired version.
* 1. Pass a `new PrismaInstrumentation()` instance as exported from `@prisma/instrumentation` to the `prismaInstrumentation` option of this integration:
*
* ```js
* import { PrismaInstrumentation } from '@prisma/instrumentation'
*
* Sentry.init({
* integrations: [
* prismaIntegration({
* // Override the default instrumentation that Sentry uses
* prismaInstrumentation: new PrismaInstrumentation()
* })
* ]
* })
* ```
*
* The passed instrumentation instance will override the default instrumentation instance the integration would use, while the `prismaIntegration` will still ensure data compatibility for the various Prisma versions.
* 1. Depending on your Prisma version (prior to version 6), add `previewFeatures = ["tracing"]` to the client generator block of your Prisma schema:
*
* ```
* generator client {
* provider = "prisma-client-js"
* previewFeatures = ["tracing"]
* }
* ```
*/
export declare const prismaIntegration: (options?: PrismaOptions | undefined) => import("@sentry/core").Integration;
export {};
//# sourceMappingURL=prisma.d.ts.map

View File

@@ -0,0 +1,35 @@
// @ts-check
import { SyncWalker } from './sync.js';
import { AsyncWalker } from './async.js';
/** @typedef { import('estree').BaseNode} BaseNode */
/** @typedef { import('./sync.js').SyncHandler} SyncHandler */
/** @typedef { import('./async.js').AsyncHandler} AsyncHandler */
/**
*
* @param {BaseNode} ast
* @param {{
* enter?: SyncHandler
* leave?: SyncHandler
* }} walker
* @returns {BaseNode}
*/
export function walk(ast, { enter, leave }) {
const instance = new SyncWalker(enter, leave);
return instance.visit(ast, null);
}
/**
*
* @param {BaseNode} ast
* @param {{
* enter?: AsyncHandler
* leave?: AsyncHandler
* }} walker
* @returns {Promise<BaseNode>}
*/
export async function asyncWalk(ast, { enter, leave }) {
const instance = new AsyncWalker(enter, leave);
return await instance.visit(ast, null);
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"span.d.ts","sourceRoot":"","sources":["../../../src/types-hoist/span.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AACrD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAEvD,KAAK,cAAc,GAAG,QAAQ,GAAG,MAAM,CAAC;AACxC,KAAK,kBAAkB,GAAG,MAAM,CAAC;AACjC,KAAK,yBAAyB,GAAG,MAAM,CAAC;AACxC,KAAK,yBAAyB,GAAG,MAAM,CAAC;AACxC,MAAM,MAAM,UAAU,GAClB,cAAc,GACd,GAAG,cAAc,IAAI,kBAAkB,EAAE,GACzC,GAAG,cAAc,IAAI,kBAAkB,IAAI,yBAAyB,EAAE,GACtE,GAAG,cAAc,IAAI,kBAAkB,IAAI,yBAAyB,IAAI,yBAAyB,EAAE,CAAC;AAGxG,MAAM,MAAM,kBAAkB,GAC1B,MAAM,GACN,MAAM,GACN,OAAO,GACP,KAAK,CAAC,IAAI,GAAG,SAAS,GAAG,MAAM,CAAC,GAChC,KAAK,CAAC,IAAI,GAAG,SAAS,GAAG,MAAM,CAAC,GAChC,KAAK,CAAC,IAAI,GAAG,SAAS,GAAG,OAAO,CAAC,CAAC;AAEtC,MAAM,MAAM,cAAc,GAAG,OAAO,CAAC;IACnC,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,iBAAiB,CAAC;IACnC,oBAAoB,EAAE,MAAM,CAAC;CAC9B,CAAC,GACA,MAAM,CAAC,MAAM,EAAE,kBAAkB,GAAG,SAAS,CAAC,CAAC;AAEjD,kEAAkE;AAClE,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;AAEnD,uCAAuC;AACvC,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,cAAc,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,eAAe,EAAE,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,YAAY,EAAE,CAAC;CACxB;AAGD,KAAK,aAAa,GAAG,CAAC,CAAC;AACvB,KAAK,gBAAgB,GAAG,CAAC,CAAC;AAC1B,MAAM,MAAM,SAAS,GAAG,aAAa,GAAG,gBAAgB,CAAC;AAEzD,MAAM,WAAW,UAAU;IACzB;;;;;;;OAOG;IACH,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,UAAU,CAAC;IAC5C;;;;;OAKG;IACH,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,CAAC;IAC/B;;;;;;;OAOG;IACH,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IACrC;;;;;;;;OAQG;IACH,SAAS,IAAI,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,eAAe;IAC9B;;;;;OAKG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;;OAIG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAE/B;;;;;;;OAOG;IACH,UAAU,EAAE,SAAS,GAAG,MAAM,CAAC;IAE/B,oGAAoG;IACpG,UAAU,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;CACrC;AAED;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAE1B;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAExB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAElC;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAE9B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAE5B;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAE7B;;OAEG;IACH,UAAU,CAAC,EAAE,cAAc,CAAC;IAE5B;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAEpC;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAElC;;;OAGG;IACH,KAAK,CAAC,EAAE,QAAQ,EAAE,CAAC;IAEnB;;;;;;OAMG;IACH,YAAY,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CACpC;AAED;;GAEG;AACH,MAAM,WAAW,IAAI;IACnB;;;OAGG;IACH,WAAW,IAAI,eAAe,CAAC;IAE/B;;OAEG;IACH,GAAG,CAAC,YAAY,CAAC,EAAE,aAAa,GAAG,IAAI,CAAC;IAExC;;;OAGG;IACH,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,kBAAkB,GAAG,SAAS,GAAG,IAAI,CAAC;IAEvE;;;OAGG;IACH,aAAa,CAAC,UAAU,EAAE,cAAc,GAAG,IAAI,CAAC;IAEhD;;OAEG;IACH,SAAS,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI,CAAC;IAEpC;;;;;;;;;;;;OAYG;IACH,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAE/B;;;OAGG;IACH,WAAW,IAAI,OAAO,CAAC;IAEvB;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,qBAAqB,CAAC,EAAE,cAAc,GAAG,aAAa,EAAE,SAAS,CAAC,EAAE,aAAa,GAAG,IAAI,CAAC;IAEhH;;;;;;OAMG;IACH,OAAO,CAAC,IAAI,EAAE,QAAQ,GAAG,IAAI,CAAC;IAE9B;;;;;OAKG;IACH,QAAQ,CAAC,KAAK,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC;IAElC;;OAEG;IACH,eAAe,CAAC,SAAS,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1D"}

View File

@@ -0,0 +1,11 @@
import { TaggedEventHandler } from './addEventListener';
/**
* A `removeEventListener` ponyfill
*
* @param node the element
* @param eventName the event name
* @param handle the handler
* @param options event options
*/
declare function removeEventListener<K extends keyof HTMLElementEventMap>(node: HTMLElement, eventName: K, handler: TaggedEventHandler<K>, options?: boolean | EventListenerOptions): void;
export default removeEventListener;

View File

@@ -0,0 +1,4 @@
import v35 from './v35.js';
import sha1 from './sha1.js';
var v5 = v35('v5', 0x50, sha1);
export default v5;

View File

@@ -0,0 +1,36 @@
import { buildFormatLongFn } from "../../_lib/buildFormatLongFn.js";
const dateFormats = {
full: "EEEE, dd MMMM yyyy",
long: "dd MMMM yyyy",
medium: "dd MMM yyyy",
short: "dd/MM/yyyy",
};
const timeFormats = {
full: "HH:mm:ss zzzz",
long: "HH:mm:ss z",
medium: "HH:mm:ss",
short: "H:mm",
};
const dateTimeFormats = {
any: "{{date}} {{time}}",
};
export const formatLong = {
date: buildFormatLongFn({
formats: dateFormats,
defaultWidth: "full",
}),
time: buildFormatLongFn({
formats: timeFormats,
defaultWidth: "full",
}),
dateTime: buildFormatLongFn({
formats: dateTimeFormats,
defaultWidth: "any",
}),
};

View File

@@ -0,0 +1 @@
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH;;;;;GAKG;AACH,SAAgB,WAAW,CACzB,SAAiB,EACjB,EAAsB,EACtB,GAAuB,EACvB,aAAiC;IAEjC,IAAI,SAAS,KAAK,cAAc,IAAI,aAAa,IAAI,EAAE,EAAE;QACvD,OAAO,GAAG,SAAS,IAAI,aAAa,IAAI,EAAE,EAAE,CAAC;KAC9C;IACD,IAAI,SAAS,KAAK,eAAe,EAAE;QACjC,sDAAsD;QACtD,IAAI,EAAE,EAAE;YACN,OAAO,GAAG,SAAS,IAAI,GAAG,IAAI,EAAE,EAAE,CAAC;SACpC;QACD,OAAO,GAAG,SAAS,IAAI,GAAG,EAAE,CAAC;KAC9B;IACD,+DAA+D;IAC/D,IAAI,EAAE,EAAE;QACN,OAAO,GAAG,SAAS,IAAI,EAAE,EAAE,CAAC;KAC7B;IACD,OAAO,GAAG,SAAS,EAAE,CAAC;AACxB,CAAC;AArBD,kCAqBC;AAEM,MAAM,IAAI,GAAG,CAAC,EAAY,EAAE,EAAE;IACnC,IAAI,MAAM,GAAG,KAAK,CAAC;IACnB,OAAO,CAAC,GAAG,IAAe,EAAE,EAAE;QAC5B,IAAI,MAAM;YAAE,OAAO;QACnB,MAAM,GAAG,IAAI,CAAC;QACd,OAAO,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC;IACrB,CAAC,CAAC;AACJ,CAAC,CAAC;AAPW,QAAA,IAAI,QAOf","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\n/**\n * The span name SHOULD be set to a low cardinality value\n * representing the statement executed on the database.\n *\n * @returns Operation executed on Tedious Connection. Does not map to SQL statement in any way.\n */\nexport function getSpanName(\n operation: string,\n db: string | undefined,\n sql: string | undefined,\n bulkLoadTable: string | undefined\n): string {\n if (operation === 'execBulkLoad' && bulkLoadTable && db) {\n return `${operation} ${bulkLoadTable} ${db}`;\n }\n if (operation === 'callProcedure') {\n // `sql` refers to procedure name with `callProcedure`\n if (db) {\n return `${operation} ${sql} ${db}`;\n }\n return `${operation} ${sql}`;\n }\n // do not use `sql` in general case because of high-cardinality\n if (db) {\n return `${operation} ${db}`;\n }\n return `${operation}`;\n}\n\nexport const once = (fn: Function) => {\n let called = false;\n return (...args: unknown[]) => {\n if (called) return;\n called = true;\n return fn(...args);\n };\n};\n"]}

View File

@@ -0,0 +1,52 @@
![React Email text cover](https://react.email/static/covers/text.png)
<div align="center"><strong>@react-email/text</strong></div>
<div align="center">A block of text separated by blank spaces.</div>
<br />
<div align="center">
<a href="https://react.email">Website</a>
<span> · </span>
<a href="https://github.com/resend/react-email">GitHub</a>
<span> · </span>
<a href="https://react.email/discord">Discord</a>
</div>
## Install
Install component from your command line.
#### With yarn
```sh
yarn add @react-email/text -E
```
#### With npm
```sh
npm install @react-email/text -E
```
## Getting started
Add the component to your email template. Include styles where needed.
```jsx
import { Text } from "@react-email/text";
const Email = () => {
return <Text>Lorem ipsum</Text>;
};
```
## Support
This component was tested using the most popular email clients.
| <img src="https://react.email/static/icons/gmail.svg" width="48px" height="48px" alt="Gmail logo"> | <img src="https://react.email/static/icons/apple-mail.svg" width="48px" height="48px" alt="Apple Mail"> | <img src="https://react.email/static/icons/outlook.svg" width="48px" height="48px" alt="Outlook logo"> | <img src="https://react.email/static/icons/yahoo-mail.svg" width="48px" height="48px" alt="Yahoo! Mail logo"> | <img src="https://react.email/static/icons/hey.svg" width="48px" height="48px" alt="HEY logo"> | <img src="https://react.email/static/icons/superhuman.svg" width="48px" height="48px" alt="Superhuman logo"> |
| -------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ |
| Gmail ✔ | Apple Mail ✔ | Outlook ✔ | Yahoo! Mail ✔ | HEY ✔ | Superhuman ✔ |
## License
MIT License

View File

@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F A B zC"},B:{"1":"Q H R S T U V W X Y Z","2":"C L M G","194":"N O P","513":"0 1 2 3 4 5 6 7 8 a b c d e f g h i j k l m n o p q r s t u v w x y z JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB I"},C:{"2":"9 0C VC J bB K D E F A B C L M G N O P cB AB BB CB DB EB FB GB HB IB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4C 5C","194":"4B 5B WC 6B XC 7B 8B 9B AC BC CC DC EC FC GC HC IC","450":"JC KC LC MC NC","513":"0 1 2 3 4 5 6 7 8 Q H R YC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB I ZC aC OC 1C 2C 3C"},D:{"1":"DC EC FC GC HC IC JC KC LC MC NC Q H R S T U V W X Y Z","2":"9 J bB K D E F A B C L M G N O P cB AB BB CB DB EB FB GB HB IB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B WC","194":"6B XC 7B 8B 9B AC BC CC","513":"0 1 2 3 4 5 6 7 8 a b c d e f g h i j k l m n o p q r s t u v w x y z JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB I ZC aC OC"},E:{"2":"J bB K D E F A 6C bC 7C 8C 9C AD","194":"B C L M G cC PC QC BD CD DD","513":"dC eC RC ED SC fC gC hC iC jC FD TC kC lC mC nC oC GD UC pC qC rC sC HD tC uC vC wC ID"},F:{"1":"9B AC BC CC DC EC FC GC HC IC JC KC LC MC","2":"9 F B C G N O P cB AB BB CB DB EB FB GB HB IB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB JD KD LD MD PC xC ND QC","194":"uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B","513":"0 1 2 3 4 5 6 7 8 NC Q H R YC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z"},G:{"2":"E bC OD yC PD QD RD SD TD UD VD","194":"WD XD YD ZD aD bD cD dD eD fD gD hD","513":"dC eC RC iD SC fC gC hC iC jC jD TC kC lC mC nC oC kD UC pC qC rC sC lD tC uC vC wC"},H:{"2":"mD"},I:{"2":"VC J I nD oD pD qD yC rD sD"},J:{"2":"D A"},K:{"2":"A B C PC xC QC","513":"H"},L:{"513":"I"},M:{"513":"OC"},N:{"2":"A B"},O:{"1":"RC"},P:{"2":"J tD uD vD wD xD cC yD zD 0D 1D","513":"9 AB BB CB DB EB FB GB HB IB 2D SC TC UC 3D"},Q:{"2":"4D"},R:{"513":"5D"},S:{"2":"6D","513":"7D"}},B:6,C:"Shared Array Buffer",D:true};

View File

@@ -0,0 +1,31 @@
import type { ContextOptions, DateArg } from "./types.js";
/**
* The {@link nextFriday} function options.
*/
export interface NextFridayOptions<DateType extends Date = Date>
extends ContextOptions<DateType> {}
/**
* @name nextFriday
* @category Weekday Helpers
* @summary When is the next Friday?
*
* @description
* When is the next Friday?
*
* @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).
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
*
* @param date - The date to start counting from
* @param options - An object with options
*
* @returns The next Friday
*
* @example
* // When is the next Friday after Mar, 22, 2020?
* const result = nextFriday(new Date(2020, 2, 22))
* //=> Fri Mar 27 2020 00:00:00
*/
export declare function nextFriday<
DateType extends Date,
ResultDate extends Date = DateType,
>(date: DateArg<DateType>, options?: NextFridayOptions<ResultDate>): ResultDate;

View File

@@ -0,0 +1,57 @@
import type { SanitizedCollectionConfig } from '../../../collections/config/types.js';
import type { SanitizedGlobalConfig } from '../../../globals/config/types.js';
import type { RequestContext, TypedFallbackLocale } from '../../../index.js';
import type { JsonObject, PayloadRequest, PopulateType, SelectMode, SelectType } from '../../../types/index.js';
import type { Field, TabAsField } from '../../config/types.js';
import type { AfterReadArgs } from './index.js';
type Args = {
/**
* Data of the nearest parent block. If no parent block exists, this will be the `undefined`
*/
blockData?: JsonObject;
collection: null | SanitizedCollectionConfig;
context: RequestContext;
currentDepth: number;
depth: number;
doc: JsonObject;
draft: boolean;
fallbackLocale: TypedFallbackLocale;
field: Field | TabAsField;
/**
* The depth of the current field being processed.
* Fields without names (i.e. rows, collapsibles, unnamed groups)
* simply pass this value through
*
* @default 0
*/
fieldDepth: number;
fieldIndex: number;
/**
* fieldPromises are used for things like field hooks. They should be awaited before awaiting populationPromises
*/
fieldPromises: Promise<void>[];
findMany: boolean;
global: null | SanitizedGlobalConfig;
locale: null | string;
overrideAccess: boolean;
parentIndexPath: string;
/**
* @todo make required in v4.0
*/
parentIsLocalized?: boolean;
parentPath: string;
parentSchemaPath: string;
populate?: PopulateType;
populationPromises: Promise<void>[];
req: PayloadRequest;
select?: SelectType;
selectMode?: SelectMode;
showHiddenFields: boolean;
siblingDoc: JsonObject;
siblingFields?: (Field | TabAsField)[];
triggerAccessControl?: boolean;
triggerHooks?: boolean;
} & Required<Pick<AfterReadArgs<JsonObject>, 'flattenLocales'>>;
export declare const promise: ({ blockData, collection, context, currentDepth, depth, doc, draft, fallbackLocale, field, fieldDepth, fieldIndex, fieldPromises, findMany, flattenLocales, global, locale, overrideAccess, parentIndexPath, parentIsLocalized, parentPath, parentSchemaPath, populate, populationPromises, req, select, selectMode, showHiddenFields, siblingDoc, siblingFields, triggerAccessControl, triggerHooks, }: Args) => Promise<void>;
export {};
//# sourceMappingURL=promise.d.ts.map

View File

@@ -0,0 +1,21 @@
var eq = require('./eq');
/**
* Gets the index at which the `key` is found in `array` of key-value pairs.
*
* @private
* @param {Array} array The array to inspect.
* @param {*} key The key to search for.
* @returns {number} Returns the index of the matched value, else `-1`.
*/
function assocIndexOf(array, key) {
var length = array.length;
while (length--) {
if (eq(array[length][0], key)) {
return length;
}
}
return -1;
}
module.exports = assocIndexOf;

View File

@@ -0,0 +1,65 @@
"use strict";
exports.DayParser = void 0;
var _index = require("../../../setDay.js");
var _Parser = require("../Parser.js");
// Day of week
class DayParser extends _Parser.Parser {
priority = 90;
parse(dateString, token, match) {
switch (token) {
// Tue
case "E":
case "EE":
case "EEE":
return (
match.day(dateString, {
width: "abbreviated",
context: "formatting",
}) ||
match.day(dateString, { width: "short", context: "formatting" }) ||
match.day(dateString, { width: "narrow", context: "formatting" })
);
// T
case "EEEEE":
return match.day(dateString, {
width: "narrow",
context: "formatting",
});
// Tu
case "EEEEEE":
return (
match.day(dateString, { width: "short", context: "formatting" }) ||
match.day(dateString, { width: "narrow", context: "formatting" })
);
// Tuesday
case "EEEE":
default:
return (
match.day(dateString, { width: "wide", context: "formatting" }) ||
match.day(dateString, {
width: "abbreviated",
context: "formatting",
}) ||
match.day(dateString, { width: "short", context: "formatting" }) ||
match.day(dateString, { width: "narrow", context: "formatting" })
);
}
}
validate(_date, value) {
return value >= 0 && value <= 6;
}
set(date, _flags, value, options) {
date = (0, _index.setDay)(date, value, options);
date.setHours(0, 0, 0, 0);
return date;
}
incompatibleTokens = ["D", "i", "e", "c", "t", "T"];
}
exports.DayParser = DayParser;

View File

@@ -0,0 +1,2 @@
import { IPropertyTypeValueDescriptor } from '../IPropertyDescriptor';
export declare const fontSize: IPropertyTypeValueDescriptor;

View File

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

View File

@@ -0,0 +1,151 @@
"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 insert_exports = {};
__export(insert_exports, {
SingleStoreInsertBase: () => SingleStoreInsertBase,
SingleStoreInsertBuilder: () => SingleStoreInsertBuilder
});
module.exports = __toCommonJS(insert_exports);
var import_entity = require("../../entity.cjs");
var import_query_promise = require("../../query-promise.cjs");
var import_sql = require("../../sql/sql.cjs");
var import_table = require("../../table.cjs");
var import_utils = require("../../utils.cjs");
var import_utils2 = require("../utils.cjs");
class SingleStoreInsertBuilder {
constructor(table, session, dialect) {
this.table = table;
this.session = session;
this.dialect = dialect;
}
static [import_entity.entityKind] = "SingleStoreInsertBuilder";
shouldIgnore = false;
ignore() {
this.shouldIgnore = true;
return this;
}
values(values) {
values = Array.isArray(values) ? values : [values];
if (values.length === 0) {
throw new Error("values() must be called with at least one value");
}
const mappedValues = values.map((entry) => {
const result = {};
const cols = this.table[import_table.Table.Symbol.Columns];
for (const colKey of Object.keys(entry)) {
const colValue = entry[colKey];
result[colKey] = (0, import_entity.is)(colValue, import_sql.SQL) ? colValue : new import_sql.Param(colValue, cols[colKey]);
}
return result;
});
return new SingleStoreInsertBase(this.table, mappedValues, this.shouldIgnore, this.session, this.dialect);
}
}
class SingleStoreInsertBase extends import_query_promise.QueryPromise {
constructor(table, values, ignore, session, dialect) {
super();
this.session = session;
this.dialect = dialect;
this.config = { table, values, ignore };
}
static [import_entity.entityKind] = "SingleStoreInsert";
config;
/**
* Adds an `on duplicate key update` clause to the query.
*
* Calling this method will update update the row if any unique index conflicts. MySQL will automatically determine the conflict target based on the primary key and unique indexes.
*
* See docs: {@link https://orm.drizzle.team/docs/insert#on-duplicate-key-update}
*
* @param config The `set` clause
*
* @example
* ```ts
* await db.insert(cars)
* .values({ id: 1, brand: 'BMW'})
* .onDuplicateKeyUpdate({ set: { brand: 'Porsche' }});
* ```
*
* While MySQL does not directly support doing nothing on conflict, you can perform a no-op by setting any column's value to itself and achieve the same effect:
*
* ```ts
* import { sql } from 'drizzle-orm';
*
* await db.insert(cars)
* .values({ id: 1, brand: 'BMW' })
* .onDuplicateKeyUpdate({ set: { id: sql`id` } });
* ```
*/
onDuplicateKeyUpdate(config) {
const setSql = this.dialect.buildUpdateSet(this.config.table, (0, import_utils.mapUpdateSet)(this.config.table, config.set));
this.config.onConflict = import_sql.sql`update ${setSql}`;
return this;
}
$returningId() {
const returning = [];
for (const [key, value] of Object.entries(this.config.table[import_table.Table.Symbol.Columns])) {
if (value.primary) {
returning.push({ field: value, path: [key] });
}
}
this.config.returning = (0, import_utils.orderSelectedFields)(this.config.table[import_table.Table.Symbol.Columns]);
return this;
}
/** @internal */
getSQL() {
return this.dialect.buildInsertQuery(this.config).sql;
}
toSQL() {
const { typings: _typings, ...rest } = this.dialect.sqlToQuery(this.getSQL());
return rest;
}
prepare() {
const { sql: sql2, generatedIds } = this.dialect.buildInsertQuery(this.config);
return this.session.prepareQuery(
this.dialect.sqlToQuery(sql2),
void 0,
void 0,
generatedIds,
this.config.returning,
{
type: "delete",
tables: (0, import_utils2.extractUsedTable)(this.config.table)
}
);
}
execute = (placeholderValues) => {
return this.prepare().execute(placeholderValues);
};
createIterator = () => {
const self = this;
return async function* (placeholderValues) {
yield* self.prepare().iterator(placeholderValues);
};
};
iterator = this.createIterator();
$dynamic() {
return this;
}
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
SingleStoreInsertBase,
SingleStoreInsertBuilder
});
//# sourceMappingURL=insert.cjs.map

View File

@@ -0,0 +1,35 @@
import { status as httpStatus } from 'http-status';
import { getRequestCollectionWithID } from '../../utilities/getRequestEntity.js';
import { headersWithCors } from '../../utilities/headersWithCors.js';
import { parseParams } from '../../utilities/parseParams/index.js';
import { findByIDOperation } from '../operations/findByID.js';
export const findByIDHandler = async (req)=>{
const { data: dataArg } = req;
const { id, collection } = getRequestCollectionWithID(req);
const { data, depth, draft, flattenLocales, joins, populate, select, trash } = parseParams({
...req.query,
...dataArg
});
const result = await findByIDOperation({
id,
collection,
data,
depth,
draft,
flattenLocales,
joins,
populate,
req,
select,
trash
});
return Response.json(result, {
headers: headersWithCors({
headers: new Headers(),
req
}),
status: httpStatus.OK
});
};
//# sourceMappingURL=findByID.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"arrow-up-narrow-wide.js","sources":["../../../src/icons/arrow-up-narrow-wide.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name ArrowUpNarrowWide\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJtMyA4IDQtNCA0IDQiIC8+CiAgPHBhdGggZD0iTTcgNHYxNiIgLz4KICA8cGF0aCBkPSJNMTEgMTJoNCIgLz4KICA8cGF0aCBkPSJNMTEgMTZoNyIgLz4KICA8cGF0aCBkPSJNMTEgMjBoMTAiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/arrow-up-narrow-wide\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 ArrowUpNarrowWide = createLucideIcon('ArrowUpNarrowWide', [\n ['path', { d: 'm3 8 4-4 4 4', key: '11wl7u' }],\n ['path', { d: 'M7 4v16', key: '1glfcx' }],\n ['path', { d: 'M11 12h4', key: 'q8tih4' }],\n ['path', { d: 'M11 16h7', key: 'uosisv' }],\n ['path', { d: 'M11 20h10', key: 'jvxblo' }],\n]);\n\nexport default ArrowUpNarrowWide;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAoB,iBAAiB,mBAAqB,CAAA,CAAA,CAAA;AAAA,CAAA,CAC9D,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAgB,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,CAC7C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,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,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,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC5C,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,2 @@
import { assignWith } from "./index";
export = assignWith;

View File

@@ -0,0 +1,5 @@
export declare const isSameDay: import("./types.js").FPFn2<
boolean,
string | number | Date,
string | number | Date
>;

View File

@@ -0,0 +1 @@
{"version":3,"file":"he.d.ts","sourceRoot":"","sources":["../../../src/exports/i18n/he.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,uCAAuC,CAAA"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"ExportResult.js","sourceRoot":"","sources":["../../src/ExportResult.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAOH,MAAM,CAAN,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC1B,6DAAO,CAAA;IACP,2DAAM,CAAA;AACR,CAAC,EAHW,gBAAgB,KAAhB,gBAAgB,QAG3B","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 interface ExportResult {\n code: ExportResultCode;\n error?: Error;\n}\n\nexport enum ExportResultCode {\n SUCCESS,\n FAILED,\n}\n"]}

View File

@@ -0,0 +1,139 @@
"use strict";
exports.match = void 0;
var _index = require("../../_lib/buildMatchFn.js");
var _index2 = require("../../_lib/buildMatchPatternFn.js");
const matchOrdinalNumberPattern = /^(\d+)(º)?/i;
const parseOrdinalNumberPattern = /\d+/i;
const matchEraPatterns = {
narrow: /^(ac|dc|a|d)/i,
abbreviated: /^(a\.?\s?c\.?|a\.?\s?e\.?\s?c\.?|d\.?\s?c\.?|e\.?\s?c\.?)/i,
wide: /^(antes de cristo|antes da era com[uú]n|despois de cristo|era com[uú]n)/i,
};
const parseEraPatterns = {
any: [/^ac/i, /^dc/i],
wide: [
/^(antes de cristo|antes da era com[uú]n)/i,
/^(despois de cristo|era com[uú]n)/i,
],
};
const matchQuarterPatterns = {
narrow: /^[1234]/i,
abbreviated: /^T[1234]/i,
wide: /^[1234](º)? trimestre/i,
};
const parseQuarterPatterns = {
any: [/1/i, /2/i, /3/i, /4/i],
};
const matchMonthPatterns = {
narrow: /^[xfmasond]/i,
abbreviated: /^(xan|feb|mar|abr|mai|xun|xul|ago|set|out|nov|dec)/i,
wide: /^(xaneiro|febreiro|marzo|abril|maio|xuño|xullo|agosto|setembro|outubro|novembro|decembro)/i,
};
const parseMonthPatterns = {
narrow: [
/^x/i,
/^f/i,
/^m/i,
/^a/i,
/^m/i,
/^x/i,
/^x/i,
/^a/i,
/^s/i,
/^o/i,
/^n/i,
/^d/i,
],
any: [
/^xan/i,
/^feb/i,
/^mar/i,
/^abr/i,
/^mai/i,
/^xun/i,
/^xul/i,
/^ago/i,
/^set/i,
/^out/i,
/^nov/i,
/^dec/i,
],
};
const matchDayPatterns = {
narrow: /^[dlmxvs]/i,
short: /^(do|lu|ma|me|xo|ve|sa)/i,
abbreviated: /^(dom|lun|mar|mer|xov|ven|sab)/i,
wide: /^(domingo|luns|martes|m[eé]rcores|xoves|venres|s[áa]bado)/i,
};
const parseDayPatterns = {
narrow: [/^d/i, /^l/i, /^m/i, /^m/i, /^x/i, /^v/i, /^s/i],
any: [/^do/i, /^lu/i, /^ma/i, /^me/i, /^xo/i, /^ve/i, /^sa/i],
};
const matchDayPeriodPatterns = {
narrow: /^(a|p|mn|md|(da|[aá]s) (mañ[aá]|tarde|noite))/i,
any: /^([ap]\.?\s?m\.?|medianoite|mediod[ií]a|(da|[aá]s) (mañ[aá]|tarde|noite))/i,
};
const parseDayPeriodPatterns = {
any: {
am: /^a/i,
pm: /^p/i,
midnight: /^mn/i,
noon: /^md/i,
morning: /mañ[aá]/i,
afternoon: /tarde/i,
evening: /tardiña/i,
night: /noite/i,
},
};
const match = (exports.match = {
ordinalNumber: (0, _index2.buildMatchPatternFn)({
matchPattern: matchOrdinalNumberPattern,
parsePattern: parseOrdinalNumberPattern,
valueCallback: (value) => parseInt(value, 10),
}),
era: (0, _index.buildMatchFn)({
matchPatterns: matchEraPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseEraPatterns,
defaultParseWidth: "any",
}),
quarter: (0, _index.buildMatchFn)({
matchPatterns: matchQuarterPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseQuarterPatterns,
defaultParseWidth: "any",
valueCallback: (index) => index + 1,
}),
month: (0, _index.buildMatchFn)({
matchPatterns: matchMonthPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseMonthPatterns,
defaultParseWidth: "any",
}),
day: (0, _index.buildMatchFn)({
matchPatterns: matchDayPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseDayPatterns,
defaultParseWidth: "any",
}),
dayPeriod: (0, _index.buildMatchFn)({
matchPatterns: matchDayPeriodPatterns,
defaultMatchWidth: "any",
parsePatterns: parseDayPeriodPatterns,
defaultParseWidth: "any",
}),
});

View File

@@ -0,0 +1 @@
{"version":3,"file":"minimize.js","sources":["../../../src/icons/minimize.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Minimize\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNOCAzdjNhMiAyIDAgMCAxLTIgMkgzIiAvPgogIDxwYXRoIGQ9Ik0yMSA4aC0zYTIgMiAwIDAgMS0yLTJWMyIgLz4KICA8cGF0aCBkPSJNMyAxNmgzYTIgMiAwIDAgMSAyIDJ2MyIgLz4KICA8cGF0aCBkPSJNMTYgMjF2LTNhMiAyIDAgMCAxIDItMmgzIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/minimize\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 Minimize = createLucideIcon('Minimize', [\n ['path', { d: 'M8 3v3a2 2 0 0 1-2 2H3', key: 'hohbtr' }],\n ['path', { d: 'M21 8h-3a2 2 0 0 1-2-2V3', key: '5jw1f3' }],\n ['path', { d: 'M3 16h3a2 2 0 0 1 2 2v3', key: '198tvr' }],\n ['path', { d: 'M16 21v-3a2 2 0 0 1 2-2h3', key: 'ph8mxp' }],\n]);\n\nexport default Minimize;\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,CAAA,CAC5C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA0B,CAAA,CAAA,CAAA,CAAA,CAAA,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,CAAA,CACvD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA4B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CAAA,CACzD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA2B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CAAA,CACxD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA6B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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;AAC5D,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,13 @@
"use strict";
var _class_apply_descriptor_destructure = require("./_class_apply_descriptor_destructure.cjs");
var _class_check_private_static_access = require("./_class_check_private_static_access.cjs");
var _class_check_private_static_field_descriptor = require("./_class_check_private_static_field_descriptor.cjs");
function _class_static_private_field_destructure(receiver, classConstructor, descriptor) {
_class_check_private_static_access._(receiver, classConstructor);
_class_check_private_static_field_descriptor._(descriptor, "set");
return _class_apply_descriptor_destructure._(receiver, descriptor);
}
exports._ = _class_static_private_field_destructure;

View File

@@ -0,0 +1 @@
{"version":3,"file":"pyramid.js","sources":["../../../src/icons/pyramid.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Pyramid\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMi41IDE2Ljg4YTEgMSAwIDAgMS0uMzItMS40M2w5LTEzLjAyYTEgMSAwIDAgMSAxLjY0IDBsOSAxMy4wMWExIDEgMCAwIDEtLjMyIDEuNDRsLTguNTEgNC44NmEyIDIgMCAwIDEtMS45OCAwWiIgLz4KICA8cGF0aCBkPSJNMTIgMnYyMCIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/pyramid\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 Pyramid = createLucideIcon('Pyramid', [\n [\n 'path',\n {\n d: 'M2.5 16.88a1 1 0 0 1-.32-1.43l9-13.02a1 1 0 0 1 1.64 0l9 13.01a1 1 0 0 1-.32 1.44l-8.51 4.86a2 2 0 0 1-1.98 0Z',\n key: 'aenxs0',\n },\n ],\n ['path', { d: 'M12 2v20', key: 't6zp3m' }],\n]);\n\nexport default Pyramid;\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,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,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC3C,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,25 @@
import { millisecondsInMinute } from "./constants.mjs";
/**
* @name minutesToMilliseconds
* @category Conversion Helpers
* @summary Convert minutes to milliseconds.
*
* @description
* Convert a number of minutes to a full number of milliseconds.
*
* @param minutes - The number of minutes to be converted
*
* @returns The number of minutes converted in milliseconds
*
* @example
* // Convert 2 minutes to milliseconds
* const result = minutesToMilliseconds(2)
* //=> 120000
*/
export function minutesToMilliseconds(minutes) {
return Math.trunc(minutes * millisecondsInMinute);
}
// Fallback for modularized imports:
export default minutesToMilliseconds;

View File

@@ -0,0 +1,29 @@
/**
* @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 FilePenLine = createLucideIcon("FilePenLine", [
[
"path",
{
d: "m18 5-2.414-2.414A2 2 0 0 0 14.172 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2",
key: "142zxg"
}
],
[
"path",
{
d: "M21.378 12.626a1 1 0 0 0-3.004-3.004l-4.01 4.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z",
key: "2t3380"
}
],
["path", { d: "M8 18h1", key: "13wk12" }]
]);
export { FilePenLine as default };
//# sourceMappingURL=file-pen-line.js.map

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 LexicalPlainTextPlugin = process.env.NODE_ENV !== 'production' ? require('./LexicalPlainTextPlugin.dev.js') : require('./LexicalPlainTextPlugin.prod.js');
module.exports = LexicalPlainTextPlugin;

View File

@@ -0,0 +1,50 @@
import type { Database, Statement as BunStatement } from 'bun:sqlite';
import { entityKind } from "../entity.cjs";
import type { Logger } from "../logger.cjs";
import type { RelationalSchemaConfig, TablesRelationalConfig } from "../relations.cjs";
import { type Query } from "../sql/sql.cjs";
import type { SQLiteSyncDialect } from "../sqlite-core/dialect.cjs";
import { SQLiteTransaction } from "../sqlite-core/index.cjs";
import type { SelectedFieldsOrdered } from "../sqlite-core/query-builders/select.types.cjs";
import type { PreparedQueryConfig as PreparedQueryConfigBase, SQLiteExecuteMethod, SQLiteTransactionConfig } from "../sqlite-core/session.cjs";
import { SQLitePreparedQuery as PreparedQueryBase, SQLiteSession } from "../sqlite-core/session.cjs";
export interface SQLiteBunSessionOptions {
logger?: Logger;
}
type PreparedQueryConfig = Omit<PreparedQueryConfigBase, 'statement' | 'run'>;
type Statement = BunStatement<any>;
export declare class SQLiteBunSession<TFullSchema extends Record<string, unknown>, TSchema extends TablesRelationalConfig> extends SQLiteSession<'sync', void, TFullSchema, TSchema> {
private client;
private schema;
static readonly [entityKind]: string;
private logger;
constructor(client: Database, dialect: SQLiteSyncDialect, schema: RelationalSchemaConfig<TSchema> | undefined, options?: SQLiteBunSessionOptions);
exec(query: string): void;
prepareQuery<T extends Omit<PreparedQueryConfig, 'run'>>(query: Query, fields: SelectedFieldsOrdered | undefined, executeMethod: SQLiteExecuteMethod, isResponseInArrayMode: boolean, customResultMapper?: (rows: unknown[][]) => unknown): PreparedQuery<T>;
transaction<T>(transaction: (tx: SQLiteBunTransaction<TFullSchema, TSchema>) => T, config?: SQLiteTransactionConfig): T;
}
export declare class SQLiteBunTransaction<TFullSchema extends Record<string, unknown>, TSchema extends TablesRelationalConfig> extends SQLiteTransaction<'sync', void, TFullSchema, TSchema> {
static readonly [entityKind]: string;
transaction<T>(transaction: (tx: SQLiteBunTransaction<TFullSchema, TSchema>) => T): T;
}
export declare class PreparedQuery<T extends PreparedQueryConfig = PreparedQueryConfig> extends PreparedQueryBase<{
type: 'sync';
run: void;
all: T['all'];
get: T['get'];
values: T['values'];
execute: T['execute'];
}> {
private stmt;
private logger;
private fields;
private _isResponseInArrayMode;
private customResultMapper?;
static readonly [entityKind]: string;
constructor(stmt: Statement, query: Query, logger: Logger, fields: SelectedFieldsOrdered | undefined, executeMethod: SQLiteExecuteMethod, _isResponseInArrayMode: boolean, customResultMapper?: ((rows: unknown[][]) => unknown) | undefined);
run(placeholderValues?: Record<string, unknown>): import("bun:sqlite").Changes;
all(placeholderValues?: Record<string, unknown>): T['all'];
get(placeholderValues?: Record<string, unknown>): T['get'];
values(placeholderValues?: Record<string, unknown>): T['values'];
}
export {};

View File

@@ -0,0 +1,13 @@
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. You just DO WHAT THE FUCK YOU WANT TO.

View File

@@ -0,0 +1 @@
{"version":3,"file":"instagram.js","sources":["../../../src/icons/instagram.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Instagram\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHg9IjIiIHk9IjIiIHJ4PSI1IiByeT0iNSIgLz4KICA8cGF0aCBkPSJNMTYgMTEuMzdBNCA0IDAgMSAxIDEyLjYzIDggNCA0IDAgMCAxIDE2IDExLjM3eiIgLz4KICA8bGluZSB4MT0iMTcuNSIgeDI9IjE3LjUxIiB5MT0iNi41IiB5Mj0iNi41IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/instagram\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 * @deprecated Brand icons have been deprecated and are due to be removed, please refer to https://github.com/lucide-icons/lucide/issues/670. We recommend using https://simpleicons.org/?q=instagram instead. This icon will be removed in v1.0\n */\nconst Instagram = createLucideIcon('Instagram', [\n ['rect', { width: '20', height: '20', x: '2', y: '2', rx: '5', ry: '5', key: '2e1cvw' }],\n ['path', { d: 'M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z', key: '9exkf1' }],\n ['line', { x1: '17.5', x2: '17.51', y1: '6.5', y2: '6.5', key: 'r4j83e' }],\n]);\n\nexport default Instagram;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAY,iBAAiB,WAAa,CAAA,CAAA,CAAA;AAAA,CAAA,CAC9C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,KAAO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAQ,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,EAAG,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,KAAK,CAAI,CAAA,CAAA,CAAA,GAAA,CAAK,CAAA,CAAA,EAAI,CAAA,CAAA,CAAA,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,GAAU,CAAA,CAAA;AAAA,CAAA,CACvF,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAmD,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CAChF,CAAA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAE,CAAA,CAAA,CAAA,EAAI,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAS,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,CAAA,CAAA,CAAA,CAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC3E,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,38 @@
import { toDate } from "./toDate.js";
/**
* The {@link endOfYear} function options.
*/
/**
* @name endOfYear
* @category Year Helpers
* @summary Return the end of a year for the given date.
*
* @description
* Return the end 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).
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
*
* @param date - The original date
* @param options - The options
*
* @returns The end of a year
*
* @example
* // The end of a year for 2 September 2014 11:55:00:
* const result = endOfYear(new Date(2014, 8, 2, 11, 55, 0))
* //=> Wed Dec 31 2014 23:59:59.999
*/
export function endOfYear(date, options) {
const _date = toDate(date, options?.in);
const year = _date.getFullYear();
_date.setFullYear(year + 1, 0, 0);
_date.setHours(23, 59, 59, 999);
return _date;
}
// Fallback for modularized imports:
export default endOfYear;

View File

@@ -0,0 +1,178 @@
/**
* 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.
*
*/
import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';
import { useLexicalEditable } from '@lexical/react/useLexicalEditable';
import { $canShowPlaceholderCurry } from '@lexical/text';
import { mergeRegister } from '@lexical/utils';
import { useLayoutEffect, useEffect, useState, useMemo, Suspense } from 'react';
import { flushSync, createPortal } from 'react-dom';
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
import { registerDragonSupport } from '@lexical/dragon';
import { registerPlainText } from '@lexical/plain-text';
/**
* 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.
*
*/
const CAN_USE_DOM = typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined';
/**
* 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.
*
*/
// This workaround is no longer necessary in React 19,
// but we currently support React >=17.x
// https://github.com/facebook/react/pull/26395
const useLayoutEffectImpl = CAN_USE_DOM ? useLayoutEffect : useEffect;
/**
* 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.
*
*/
function canShowPlaceholderFromCurrentEditorState(editor) {
const currentCanShowPlaceholder = editor.getEditorState().read($canShowPlaceholderCurry(editor.isComposing()));
return currentCanShowPlaceholder;
}
function useCanShowPlaceholder(editor) {
const [canShowPlaceholder, setCanShowPlaceholder] = useState(() => canShowPlaceholderFromCurrentEditorState(editor));
useLayoutEffectImpl(() => {
function resetCanShowPlaceholder() {
const currentCanShowPlaceholder = canShowPlaceholderFromCurrentEditorState(editor);
setCanShowPlaceholder(currentCanShowPlaceholder);
}
resetCanShowPlaceholder();
return mergeRegister(editor.registerUpdateListener(() => {
resetCanShowPlaceholder();
}), editor.registerEditableListener(() => {
resetCanShowPlaceholder();
}));
}, [editor]);
return canShowPlaceholder;
}
/**
* 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.
*
*/
function useDecorators(editor, ErrorBoundary) {
const [decorators, setDecorators] = useState(() => editor.getDecorators());
// Subscribe to changes
useLayoutEffectImpl(() => {
return editor.registerDecoratorListener(nextDecorators => {
flushSync(() => {
setDecorators(nextDecorators);
});
});
}, [editor]);
useEffect(() => {
// If the content editable mounts before the subscription is added, then
// nothing will be rendered on initial pass. We can get around that by
// ensuring that we set the value.
setDecorators(editor.getDecorators());
}, [editor]);
// Return decorators defined as React Portals
return useMemo(() => {
const decoratedPortals = [];
const decoratorKeys = Object.keys(decorators);
for (let i = 0; i < decoratorKeys.length; i++) {
const nodeKey = decoratorKeys[i];
const reactDecorator = /*#__PURE__*/jsx(ErrorBoundary, {
onError: e => editor._onError(e),
children: /*#__PURE__*/jsx(Suspense, {
fallback: null,
children: decorators[nodeKey]
})
});
const element = editor.getElementByKey(nodeKey);
if (element !== null) {
decoratedPortals.push(/*#__PURE__*/createPortal(reactDecorator, element, nodeKey));
}
}
return decoratedPortals;
}, [ErrorBoundary, decorators, editor]);
}
/**
* 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.
*
*/
function usePlainTextSetup(editor) {
useLayoutEffectImpl(() => {
return mergeRegister(registerPlainText(editor), registerDragonSupport(editor));
// We only do this for init
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [editor]);
}
/**
* 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.
*
*/
function PlainTextPlugin({
contentEditable,
// TODO Remove. This property is now part of ContentEditable
placeholder = null,
ErrorBoundary
}) {
const [editor] = useLexicalComposerContext();
const decorators = useDecorators(editor, ErrorBoundary);
usePlainTextSetup(editor);
return /*#__PURE__*/jsxs(Fragment, {
children: [contentEditable, /*#__PURE__*/jsx(Placeholder, {
content: placeholder
}), decorators]
});
}
// TODO Remove
function Placeholder({
content
}) {
const [editor] = useLexicalComposerContext();
const showPlaceholder = useCanShowPlaceholder(editor);
const editable = useLexicalEditable();
if (!showPlaceholder) {
return null;
}
if (typeof content === 'function') {
return content(editable);
} else {
return content;
}
}
export { PlainTextPlugin };

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