@esposter/shared 2.27.0 → 2.29.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/README.md CHANGED
@@ -80,8 +80,7 @@ Run from `packages/shared/`:
80
80
 
81
81
  ```bash
82
82
  pnpm build # compile to dist/
83
- pnpm test # vitest watch mode
84
- pnpm coverage # vitest run --coverage
83
+ pnpm test # vitest watch mode (coverage is run from the repo root)
85
84
  pnpm lint:fix # auto-fix lint
86
85
  pnpm typecheck # type check
87
86
  ```
package/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { z } from "zod";
2
+ import baseSanitizeHtml from "sanitize-html";
2
3
 
3
4
  //#region src/test/constants.d.ts
4
5
  declare const AllSpecialValues: {
@@ -69,6 +70,7 @@ declare const RoutePath: {
69
70
  readonly Index: "/";
70
71
  readonly Login: "/login";
71
72
  readonly Messages: (id: string) => string;
73
+ readonly MessagesDraftsAndSent: "/messages/draftsandsent";
72
74
  readonly MessagesFriends: "/messages/friends";
73
75
  readonly MessagesIndex: "/messages";
74
76
  readonly MessagesInvite: (code: string) => string;
@@ -2327,7 +2329,7 @@ declare const MENTION_TYPE = "mention";
2327
2329
  declare const MENTION_HERE_ID = "@here";
2328
2330
  declare const MENTION_EVERYONE_ID = "@everyone";
2329
2331
  //#endregion
2330
- //#region ../../node_modules/.pnpm/node-html-parser@7.1.0/node_modules/node-html-parser/dist/void-tag.d.ts
2332
+ //#region ../../node_modules/.pnpm/node-html-parser@8.0.1/node_modules/node-html-parser/dist/void-tag.d.ts
2331
2333
  declare class VoidTag {
2332
2334
  addClosingSlash: boolean;
2333
2335
  private voidTags;
@@ -2336,14 +2338,14 @@ declare class VoidTag {
2336
2338
  isVoidElement(tag: string): boolean;
2337
2339
  }
2338
2340
  //#endregion
2339
- //#region ../../node_modules/.pnpm/node-html-parser@7.1.0/node_modules/node-html-parser/dist/nodes/type.d.ts
2341
+ //#region ../../node_modules/.pnpm/node-html-parser@8.0.1/node_modules/node-html-parser/dist/nodes/type.d.ts
2340
2342
  declare enum NodeType {
2341
2343
  ELEMENT_NODE = 1,
2342
2344
  TEXT_NODE = 3,
2343
2345
  COMMENT_NODE = 8
2344
2346
  }
2345
2347
  //#endregion
2346
- //#region ../../node_modules/.pnpm/node-html-parser@7.1.0/node_modules/node-html-parser/dist/nodes/node.d.ts
2348
+ //#region ../../node_modules/.pnpm/node-html-parser@8.0.1/node_modules/node-html-parser/dist/nodes/node.d.ts
2347
2349
  /**
2348
2350
  * Node Class as base class for TextNode and HTMLElement.
2349
2351
  */
@@ -2367,7 +2369,7 @@ declare abstract class Node {
2367
2369
  set textContent(val: string);
2368
2370
  }
2369
2371
  //#endregion
2370
- //#region ../../node_modules/.pnpm/node-html-parser@7.1.0/node_modules/node-html-parser/dist/nodes/html.d.ts
2372
+ //#region ../../node_modules/.pnpm/node-html-parser@8.0.1/node_modules/node-html-parser/dist/nodes/html.d.ts
2371
2373
  interface KeyAttributes {
2372
2374
  id?: string;
2373
2375
  class?: string;
@@ -2635,6 +2637,12 @@ declare const css: typeof String.raw;
2635
2637
  //#region src/services/prettier/html.d.ts
2636
2638
  declare const html: typeof String.raw;
2637
2639
  //#endregion
2640
+ //#region src/services/sanitizeHtml/sanitizeHtml.d.ts
2641
+ declare const sanitizeHtml: (...[html, options]: Parameters<typeof baseSanitizeHtml>) => string;
2642
+ //#endregion
2643
+ //#region src/services/sanitizeHtml/sanitizeMessageHtml.d.ts
2644
+ declare const sanitizeMessageHtml: (html: string) => string;
2645
+ //#endregion
2638
2646
  //#region src/services/shared/applyItemMetadataMixin.d.ts
2639
2647
  declare const applyItemMetadataMixin: <TBase extends Class<NonNullable<unknown>>>(Base: TBase) => WithMetadata<TBase>;
2640
2648
  //#endregion
@@ -2744,4 +2752,4 @@ declare const UUIDV4_REGEX: RegExp;
2744
2752
  //#region src/util/id/uuid/uuidValidateV4.d.ts
2745
2753
  declare const uuidValidateV4: (uuid: string) => boolean;
2746
2754
  //#endregion
2747
- export { AllSpecialValues, BuildTuple, ClassifiedMentions, CreateUniqueArraySchema, DeepOmit, DeepOptionalUndefined, ExcludeFunctionProperties, ForbiddenError, FunctionProperties, GetArrayProps, GetObjectProps, GetPaths, GetPrimitiveProps, GetProperties, ID_SEPARATOR, InvalidOperationError, ItemEntityType, ItemEntityTypePropertyNames, ItemMetadata, ItemMetadataPropertyNames, KnownKeys, MAX_READ_LIMIT, MENTION_EVERYONE_ID, MENTION_HERE_ID, MENTION_ID_ATTRIBUTE, MENTION_ITEM_TYPE_ATTRIBUTE, MENTION_LABEL_ATTRIBUTE, MENTION_TYPE, MENTION_TYPE_ATTRIBUTE, MapValue, MentionType, MergeObjectsStrict, NIL, NotFoundError, NotInitializedError, Operation, PropertyNames, RoutePath, SITE_NAME, SURVEY_DISPLAY_NAME, Serializable, SkipFirst, TakeFirst, TakeOne, ToData, TupleSlice, TupleSplit, TupleSplitHead, TupleSplitTail, UUIDV4_REGEX, UniqueArraySchemaKey, WithMetadata, applyItemMetadataMixin, capitalize, checkIsPlainObject, classifyMentions, createItemEntityTypeSchema, createNormalizedStringSchema, createUniqueArraySchema, css, exhaustiveGuard, getIsServer, getMentions, getPropertyNames, getRawData, getResult, getResultAsync, hrtime, html, itemMetadataSchema, jsonDateParse, mergeObjectsStrict, noop, normalizeString, now, streamToText, takeOne, toAppError, toKebabCase, toRawDeep, truncate, uncapitalize, uuidValidateV4, withFinalizer, withFinalizerAsync };
2755
+ export { AllSpecialValues, BuildTuple, ClassifiedMentions, CreateUniqueArraySchema, DeepOmit, DeepOptionalUndefined, ExcludeFunctionProperties, ForbiddenError, FunctionProperties, GetArrayProps, GetObjectProps, GetPaths, GetPrimitiveProps, GetProperties, ID_SEPARATOR, InvalidOperationError, ItemEntityType, ItemEntityTypePropertyNames, ItemMetadata, ItemMetadataPropertyNames, KnownKeys, MAX_READ_LIMIT, MENTION_EVERYONE_ID, MENTION_HERE_ID, MENTION_ID_ATTRIBUTE, MENTION_ITEM_TYPE_ATTRIBUTE, MENTION_LABEL_ATTRIBUTE, MENTION_TYPE, MENTION_TYPE_ATTRIBUTE, MapValue, MentionType, MergeObjectsStrict, NIL, NotFoundError, NotInitializedError, Operation, PropertyNames, RoutePath, SITE_NAME, SURVEY_DISPLAY_NAME, Serializable, SkipFirst, TakeFirst, TakeOne, ToData, TupleSlice, TupleSplit, TupleSplitHead, TupleSplitTail, UUIDV4_REGEX, UniqueArraySchemaKey, WithMetadata, applyItemMetadataMixin, capitalize, checkIsPlainObject, classifyMentions, createItemEntityTypeSchema, createNormalizedStringSchema, createUniqueArraySchema, css, exhaustiveGuard, getIsServer, getMentions, getPropertyNames, getRawData, getResult, getResultAsync, hrtime, html, itemMetadataSchema, jsonDateParse, mergeObjectsStrict, noop, normalizeString, now, sanitizeHtml, sanitizeMessageHtml, streamToText, takeOne, toAppError, toKebabCase, toRawDeep, truncate, uncapitalize, uuidValidateV4, withFinalizer, withFinalizerAsync };