@code.store/arcxp-sdk-ts 5.3.1 → 5.3.2

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.
@@ -26,6 +26,7 @@ export type WrapHandler = (node: Node, content: ContentElementType<'text'>) => C
26
26
  * using the `handle()` and `wrap()` methods.
27
27
  */
28
28
  export declare class HTMLProcessor {
29
+ protected blockElementTags: string[];
29
30
  protected parallelProcessing: boolean;
30
31
  protected handlers: {
31
32
  node: Map<string, NodeHandler>;
@@ -5,6 +5,7 @@ export type CElement = ArcTypes.ANS.AnElementThatCanBeListedAsPartOfContentEleme
5
5
  export type NodeHandler = (node: xmldoc.XmlNodeBase) => MaybePromise<CElement[] | undefined>;
6
6
  export type WrapHandler = (node: xmldoc.XmlElement, content: string) => string;
7
7
  export declare class XMLProcessor {
8
+ protected blockElementTags: string[];
8
9
  protected handlers: {
9
10
  node: Map<string, NodeHandler>;
10
11
  wrap: Map<string, WrapHandler>;
package/dist/index.cjs CHANGED
@@ -1337,6 +1337,7 @@ var html_utils = /*#__PURE__*/Object.freeze({
1337
1337
  */
1338
1338
  class HTMLProcessor {
1339
1339
  constructor() {
1340
+ this.blockElementTags = BLOCK_ELEMENT_TAGS$1;
1340
1341
  this.parallelProcessing = true;
1341
1342
  this.handlers = {
1342
1343
  node: new Map(),
@@ -1667,7 +1668,7 @@ class HTMLProcessor {
1667
1668
  isBlockElement(node) {
1668
1669
  if (!isHTMLElement(node))
1669
1670
  return false;
1670
- const defaultBlockElements = new Set(BLOCK_ELEMENT_TAGS$1);
1671
+ const defaultBlockElements = new Set(this.blockElementTags);
1671
1672
  return defaultBlockElements.has(node.tagName);
1672
1673
  }
1673
1674
  warn(metadata, message) {
@@ -1713,6 +1714,7 @@ var xml_utils = /*#__PURE__*/Object.freeze({
1713
1714
  const ContentElement = ContentElement$1;
1714
1715
  class XMLProcessor {
1715
1716
  constructor() {
1717
+ this.blockElementTags = BLOCK_ELEMENT_TAGS;
1716
1718
  this.handlers = {
1717
1719
  node: new Map(),
1718
1720
  wrap: new Map(),
@@ -1888,7 +1890,7 @@ class XMLProcessor {
1888
1890
  return decoded;
1889
1891
  }
1890
1892
  isBlockElement(node) {
1891
- const defaultBlockElements = new Set(BLOCK_ELEMENT_TAGS);
1893
+ const defaultBlockElements = new Set(this.blockElementTags);
1892
1894
  if (defaultBlockElements.has(node.name))
1893
1895
  return true;
1894
1896
  }