@esposter/shared 4.5.0 → 4.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -2293,5 +2293,6 @@ export declare const createExponentialBackoff: (baseDelayMs: number, maxDelayMs:
2293
2293
  export declare const getExponentialBackoffDelayMs: (attempt: number, baseDelayMs: number, maxDelayMs: number) => number;
2294
2294
  export declare const now: () => string;
2295
2295
  export declare const sleep: (durationMs: number) => Promise<void>;
2296
+ export declare const checkIsEnumValue: <TEnum extends Record<string, string>>(enumObject: TEnum, value: string) => value is TEnum[keyof TEnum];
2296
2297
  export declare const exhaustiveGuard: (value: never) => never;
2297
2298
  export {};
package/dist/index.js CHANGED
@@ -2757,4 +2757,6 @@ const now = () => {
2757
2757
  latestNanoseconds = nanoseconds > latestNanoseconds ? nanoseconds : latestNanoseconds + 1n;
2758
2758
  return latestNanoseconds.toString();
2759
2759
  };
2760
- export { ALL_SPECIAL_VALUES, APPEND_SEGMENT, CHARSET_PARAMETER_REGEX, CUSTOM_EMOJI_ID_ATTRIBUTE, CUSTOM_EMOJI_NAME_ATTRIBUTE, DEFAULT_ALLOWED_ATTRIBUTES, DEFAULT_ALLOWED_SCHEMES, DEFAULT_ALLOWED_TAGS, DEFAULT_COMPRESSION_LEVEL, DEFAULT_FACET_SCORE, DEFAULT_LINK_ATTRIBUTES, DEFAULT_SOURCE_SCORE, DEFAULT_TEXT_CHARSET, DEFAULT_TYPE_SCORE, ESCAPED_ATTRIBUTE_CHARACTERS_REGEX, ESCAPED_TEXT_CHARACTERS_REGEX, FacetScoreMap, ForbiddenError, GIBIBYTE, HTML_NAMESPACE, ID_SEPARATOR, IMPORTANT_REGEX, InvalidOperationError, ItemMetadata, ItemMetadataPropertyNames, JSON_POINTER_REGEX, JsonPatchOperationType, KIBIBYTE, MAX_NESTING_DEPTH, MAX_READ_LIMIT, MAX_WINDOW_LOG, MEDIA_TYPE_REGEX, MENTION_EVERYONE_ID, MENTION_HERE_ID, MENTION_ID_ATTRIBUTE, MENTION_ITEM_TYPE_ATTRIBUTE, MENTION_LABEL_ATTRIBUTE, MENTION_SELECTOR, MENTION_TYPE, MENTION_TYPE_ATTRIBUTE, MILLISECONDS_PER_SECOND, MIN_WINDOW_LOG, MentionType, NON_TEXT_TAGS, NotFoundError, NotInitializedError, ObjectMethod, Operation, PANZOOM_DEFAULT_CURSOR, PANZOOM_DEFAULT_DURATION, PANZOOM_DEFAULT_EASING, PANZOOM_DEFAULT_EXCLUDE_CLASS, PANZOOM_DEFAULT_MAX_SCALE, PANZOOM_DEFAULT_MIN_SCALE, PANZOOM_DEFAULT_OPTIONS, PANZOOM_DEFAULT_OVERFLOW, PANZOOM_DEFAULT_PAN_THRESHOLD, PANZOOM_DEFAULT_START_PAN, PANZOOM_DEFAULT_START_SCALE, PANZOOM_DEFAULT_STEP, PANZOOM_DEFAULT_TOUCH_ACTION, PANZOOM_PIXELS_PER_LINE, PANZOOM_PRIMARY_BUTTON, PANZOOM_SVG_NAMESPACE, PANZOOM_TRANSFORM_ORIGIN, PANZOOM_WHEEL_NOTCH_PIXELS, PANZOOM_WHEEL_STEP_DIVISOR, PATH_SEPARATOR_REGEX, PanzoomContain, PanzoomDeltaMode, PanzoomEventName, PanzoomZoomDirection, RoutePath, SANITIZER_ADVISORY_WATCH_SINCE, SITE_NAME, SPOILER_ATTRIBUTE, SPOILER_SELECTOR, SRCSET_ATTRIBUTE, SRCSET_DESCRIPTOR_REGEX, Serializable, SourceScoreMap, TEXT_MEDIA_TYPE_REGEX, TypeScoreMap, TypedEventEmitter, URL_ATTRIBUTES, UUIDV4_REGEX, VOID_TAGS, WordFilteredError, addJsonValue, applyItemMetadataMixin, applyPanzoomStyles, applyPatch, applyPatches, bindPanzoom, capitalize, charset, checkContainsProfanity, checkIsAllowedUrl, checkIsContainableLength, checkIsCustomMethod, checkIsDeepEqual, checkIsNestedControl, checkIsNestedInteraction, checkIsOnlyReactor, checkIsPanzoomElement, checkIsPanzoomExcluded, checkIsPlainObject, checkIsSameBytes, checkIsSameValueZero, checkIsServer, checkIsSourceAllowed, checkIsUnsafeUrlCharacter, checkIsWhitespaceCharacter, checkIsZoomRefused, chunk, chunkBySerializedSize, clonePlainDeep, collectText, constrainPanzoomAxis, constrainPanzoomPan, constrainPanzoomScale, contentType, createEvictingPromiseCache, createExponentialBackoff, createHistory, createItemEntityTypeSchema, createNormalizedStringSchema, createPanzoom, createRecordSchema, createUniqueArraySchema, css, dedent, dispatchPanzoomChange, dispatchPanzoomEvent, downloadFile, downloadUrl, encodeUrlSubDelimiters, endPanzoomGesture, englishProfaneWords, escapeAttribute, escapeCharacters, escapeText, exhaustiveGuard, extension, filterAttributes, filterClasses, filterHtml, filterSrcset, filterStyle, fitPanzoom, getChildNodes, getDecodedUriComponent, getEndOfDay, getEnumerableKeys, getExponentialBackoffDelayMs, getExtensionMimeTypeMap, getMediaType, getMentions, getMimeScore, getMimeTypeEntryMap, getOrCreate, getPanzoomCallOptions, getPanzoomCentredPan, getPanzoomCoverScale, getPanzoomDrag, getPanzoomEventDetail, getPanzoomFitScale, getPanzoomFocalPan, getPanzoomMeasure, getPanzoomParent, getPanzoomPinchFrame, getPanzoomPinchScale, getPanzoomStartScale, getPanzoomStartState, getPanzoomStepScale, getPanzoomTarget, getPanzoomWheelScale, getPanzoomZoomedState, getPropertyNames, getRawData, getRequestError, getResult, getResultAsync, getSynchronizedFunction, getTagPolicy, getTransactionDone, getTransactionObjectStore, getUpdatedUserIds, getWindowLog, getZonedDateTime, html, jsonDateParse, lookup, matchesClassPattern, mergeObjectsStrict, movePanzoomDrag, movePanzoomGesture, movePanzoomPinch, noop, normalizeString, now, omitDeep, openDatabase, padWithZeros, panPanzoom, parseArrayIndex, parseJsonPointer, pushHistory, readJsonValue, reanchorPanzoomDrag, redoHistory, removeJsonValue, renderNode, reportFinalizerError, requestToPromise, resetPanzoom, restorePanzoomStyles, rethrowRejections, sanitizeHtml, sanitizeTextHtml, settleAll, sleep, startPanzoomGesture, streamToText, takeOne, takeRandom, toAppError, toJsonPointer, toKebabCase, toRawDeep, truncate, uncapitalize, undoHistory, updateJsonValue, waitForSynchronizedFunctions, withFinalizer, withFinalizerAsync, wrapDatabase, wrapIndex, wrapObjectStore, wrapTransaction, wrapUpgradeDatabase, wrapUpgradeTransaction, writePanzoomState, writePanzoomStyle, zoomPanzoom, zoomPanzoomStep };
2760
+ // src/util/validation/checkIsEnumValue.ts
2761
+ const checkIsEnumValue = (enumObject, value) => Object.values(enumObject).some((enumValue) => enumValue === value);
2762
+ export { ALL_SPECIAL_VALUES, APPEND_SEGMENT, CHARSET_PARAMETER_REGEX, CUSTOM_EMOJI_ID_ATTRIBUTE, CUSTOM_EMOJI_NAME_ATTRIBUTE, DEFAULT_ALLOWED_ATTRIBUTES, DEFAULT_ALLOWED_SCHEMES, DEFAULT_ALLOWED_TAGS, DEFAULT_COMPRESSION_LEVEL, DEFAULT_FACET_SCORE, DEFAULT_LINK_ATTRIBUTES, DEFAULT_SOURCE_SCORE, DEFAULT_TEXT_CHARSET, DEFAULT_TYPE_SCORE, ESCAPED_ATTRIBUTE_CHARACTERS_REGEX, ESCAPED_TEXT_CHARACTERS_REGEX, FacetScoreMap, ForbiddenError, GIBIBYTE, HTML_NAMESPACE, ID_SEPARATOR, IMPORTANT_REGEX, InvalidOperationError, ItemMetadata, ItemMetadataPropertyNames, JSON_POINTER_REGEX, JsonPatchOperationType, KIBIBYTE, MAX_NESTING_DEPTH, MAX_READ_LIMIT, MAX_WINDOW_LOG, MEDIA_TYPE_REGEX, MENTION_EVERYONE_ID, MENTION_HERE_ID, MENTION_ID_ATTRIBUTE, MENTION_ITEM_TYPE_ATTRIBUTE, MENTION_LABEL_ATTRIBUTE, MENTION_SELECTOR, MENTION_TYPE, MENTION_TYPE_ATTRIBUTE, MILLISECONDS_PER_SECOND, MIN_WINDOW_LOG, MentionType, NON_TEXT_TAGS, NotFoundError, NotInitializedError, ObjectMethod, Operation, PANZOOM_DEFAULT_CURSOR, PANZOOM_DEFAULT_DURATION, PANZOOM_DEFAULT_EASING, PANZOOM_DEFAULT_EXCLUDE_CLASS, PANZOOM_DEFAULT_MAX_SCALE, PANZOOM_DEFAULT_MIN_SCALE, PANZOOM_DEFAULT_OPTIONS, PANZOOM_DEFAULT_OVERFLOW, PANZOOM_DEFAULT_PAN_THRESHOLD, PANZOOM_DEFAULT_START_PAN, PANZOOM_DEFAULT_START_SCALE, PANZOOM_DEFAULT_STEP, PANZOOM_DEFAULT_TOUCH_ACTION, PANZOOM_PIXELS_PER_LINE, PANZOOM_PRIMARY_BUTTON, PANZOOM_SVG_NAMESPACE, PANZOOM_TRANSFORM_ORIGIN, PANZOOM_WHEEL_NOTCH_PIXELS, PANZOOM_WHEEL_STEP_DIVISOR, PATH_SEPARATOR_REGEX, PanzoomContain, PanzoomDeltaMode, PanzoomEventName, PanzoomZoomDirection, RoutePath, SANITIZER_ADVISORY_WATCH_SINCE, SITE_NAME, SPOILER_ATTRIBUTE, SPOILER_SELECTOR, SRCSET_ATTRIBUTE, SRCSET_DESCRIPTOR_REGEX, Serializable, SourceScoreMap, TEXT_MEDIA_TYPE_REGEX, TypeScoreMap, TypedEventEmitter, URL_ATTRIBUTES, UUIDV4_REGEX, VOID_TAGS, WordFilteredError, addJsonValue, applyItemMetadataMixin, applyPanzoomStyles, applyPatch, applyPatches, bindPanzoom, capitalize, charset, checkContainsProfanity, checkIsAllowedUrl, checkIsContainableLength, checkIsCustomMethod, checkIsDeepEqual, checkIsEnumValue, checkIsNestedControl, checkIsNestedInteraction, checkIsOnlyReactor, checkIsPanzoomElement, checkIsPanzoomExcluded, checkIsPlainObject, checkIsSameBytes, checkIsSameValueZero, checkIsServer, checkIsSourceAllowed, checkIsUnsafeUrlCharacter, checkIsWhitespaceCharacter, checkIsZoomRefused, chunk, chunkBySerializedSize, clonePlainDeep, collectText, constrainPanzoomAxis, constrainPanzoomPan, constrainPanzoomScale, contentType, createEvictingPromiseCache, createExponentialBackoff, createHistory, createItemEntityTypeSchema, createNormalizedStringSchema, createPanzoom, createRecordSchema, createUniqueArraySchema, css, dedent, dispatchPanzoomChange, dispatchPanzoomEvent, downloadFile, downloadUrl, encodeUrlSubDelimiters, endPanzoomGesture, englishProfaneWords, escapeAttribute, escapeCharacters, escapeText, exhaustiveGuard, extension, filterAttributes, filterClasses, filterHtml, filterSrcset, filterStyle, fitPanzoom, getChildNodes, getDecodedUriComponent, getEndOfDay, getEnumerableKeys, getExponentialBackoffDelayMs, getExtensionMimeTypeMap, getMediaType, getMentions, getMimeScore, getMimeTypeEntryMap, getOrCreate, getPanzoomCallOptions, getPanzoomCentredPan, getPanzoomCoverScale, getPanzoomDrag, getPanzoomEventDetail, getPanzoomFitScale, getPanzoomFocalPan, getPanzoomMeasure, getPanzoomParent, getPanzoomPinchFrame, getPanzoomPinchScale, getPanzoomStartScale, getPanzoomStartState, getPanzoomStepScale, getPanzoomTarget, getPanzoomWheelScale, getPanzoomZoomedState, getPropertyNames, getRawData, getRequestError, getResult, getResultAsync, getSynchronizedFunction, getTagPolicy, getTransactionDone, getTransactionObjectStore, getUpdatedUserIds, getWindowLog, getZonedDateTime, html, jsonDateParse, lookup, matchesClassPattern, mergeObjectsStrict, movePanzoomDrag, movePanzoomGesture, movePanzoomPinch, noop, normalizeString, now, omitDeep, openDatabase, padWithZeros, panPanzoom, parseArrayIndex, parseJsonPointer, pushHistory, readJsonValue, reanchorPanzoomDrag, redoHistory, removeJsonValue, renderNode, reportFinalizerError, requestToPromise, resetPanzoom, restorePanzoomStyles, rethrowRejections, sanitizeHtml, sanitizeTextHtml, settleAll, sleep, startPanzoomGesture, streamToText, takeOne, takeRandom, toAppError, toJsonPointer, toKebabCase, toRawDeep, truncate, uncapitalize, undoHistory, updateJsonValue, waitForSynchronizedFunctions, withFinalizer, withFinalizerAsync, wrapDatabase, wrapIndex, wrapObjectStore, wrapTransaction, wrapUpgradeDatabase, wrapUpgradeTransaction, writePanzoomState, writePanzoomStyle, zoomPanzoom, zoomPanzoomStep };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@esposter/shared",
3
- "version": "4.5.0",
3
+ "version": "4.6.0",
4
4
  "description": "A library that contains shared typescript code.",
5
5
  "keywords": [
6
6
  "error-handling",
@@ -48,18 +48,18 @@
48
48
  "dependencies": {
49
49
  "mime-db": "^1.54.0",
50
50
  "neverthrow": "^8.2.0",
51
- "node-html-parser": "^9.0.6",
51
+ "node-html-parser": "^9.0.7",
52
52
  "parse5": "^8.1.0"
53
53
  },
54
54
  "devDependencies": {
55
55
  "@azure/data-tables": "^13.3.2",
56
- "@esposter/configuration": "4.5.0",
56
+ "@esposter/configuration": "4.6.0",
57
57
  "@types/node": "^26.6.6",
58
58
  "fake-indexeddb": "^6.2.7",
59
59
  "happy-dom": "^21.0.4",
60
- "tsdown": "^0.23.5",
60
+ "tsdown": "^0.23.7",
61
61
  "type-fest": "^5.10.0",
62
- "vue": "^3.5.44"
62
+ "vue": "^3.5.45"
63
63
  },
64
64
  "peerDependencies": {
65
65
  "zod": "^4.6.7"
@@ -67,5 +67,5 @@
67
67
  "inlinedDependencies": {
68
68
  "type-fest": "5.10.0"
69
69
  },
70
- "gitHead": "e30c001f3b4b15693e75fb53092d62a97ade4d2b"
70
+ "gitHead": "0ceea3ffbe12ca69413ea5db2d3cfad197a63cba"
71
71
  }