securemark 0.214.0 → 0.216.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.
Files changed (42) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/design.md +10 -10
  3. package/dist/securemark.js +2351 -1627
  4. package/index.d.ts +7 -6
  5. package/markdown.d.ts +1 -2
  6. package/package-lock.json +139 -220
  7. package/package.json +7 -7
  8. package/src/combinator/control/constraint/block.ts +2 -0
  9. package/src/combinator/control/manipulation/context.ts +5 -7
  10. package/src/parser/api/parse.test.ts +6 -0
  11. package/src/parser/block/extension/table.ts +3 -3
  12. package/src/parser/block/ilist.ts +3 -2
  13. package/src/parser/block/paragraph.test.ts +2 -2
  14. package/src/parser/inline/annotation.test.ts +1 -1
  15. package/src/parser/inline/autolink/anchor.test.ts +1 -1
  16. package/src/parser/inline/comment.test.ts +22 -22
  17. package/src/parser/inline/comment.ts +2 -2
  18. package/src/parser/inline/deletion.test.ts +1 -1
  19. package/src/parser/inline/emphasis.test.ts +1 -1
  20. package/src/parser/inline/extension/index.test.ts +3 -2
  21. package/src/parser/inline/extension/placeholder.test.ts +4 -6
  22. package/src/parser/inline/html.ts +4 -5
  23. package/src/parser/inline/insertion.test.ts +1 -1
  24. package/src/parser/inline/link.test.ts +10 -9
  25. package/src/parser/inline/link.ts +49 -33
  26. package/src/parser/inline/mark.test.ts +1 -1
  27. package/src/parser/inline/media.ts +5 -5
  28. package/src/parser/inline/reference.test.ts +1 -1
  29. package/src/parser/inline/ruby.test.ts +0 -1
  30. package/src/parser/inline/strong.test.ts +1 -1
  31. package/src/parser/util.ts +6 -1
  32. package/src/renderer/render/media/audio.ts +2 -2
  33. package/src/renderer/render/media/image.ts +6 -5
  34. package/src/renderer/render/media/pdf.ts +8 -8
  35. package/src/renderer/render/media/twitter.ts +21 -19
  36. package/src/renderer/render/media/video.ts +2 -2
  37. package/src/renderer/render/media/youtube.ts +18 -20
  38. package/src/util/info.test.ts +6 -5
  39. package/src/util/info.ts +12 -11
  40. package/src/util/quote.ts +4 -1
  41. package/src/util/{context.ts → scope.ts} +1 -1
  42. package/src/util.ts +1 -1
package/index.d.ts CHANGED
@@ -22,7 +22,7 @@ export function normalize(source: string): string;
22
22
  export function quote(anchor: string, range: Range): string;
23
23
  export function toc(source: DocumentFragment | HTMLElement | ShadowRoot): HTMLUListElement;
24
24
  export function info(source: DocumentFragment | HTMLElement | ShadowRoot): Info;
25
- export function context(base: DocumentFragment | HTMLElement | ShadowRoot, bound?: string): (el: Element) => boolean;
25
+ export function scope(base: DocumentFragment | HTMLElement | ShadowRoot, bound?: string): (el: Element) => boolean;
26
26
  export function sync(editor: HTMLElement, viewer: HTMLElement, bottom?: Element | null): () => void;
27
27
 
28
28
  export type ParserOptions = Omit<Partial<ParserSettings>, 'chunk'>;
@@ -69,13 +69,14 @@ export interface Caches {
69
69
  }
70
70
 
71
71
  export interface Info {
72
- readonly hashtag: HTMLAnchorElement[];
73
- readonly hashref: HTMLAnchorElement[];
74
- readonly channel: HTMLAnchorElement[];
75
- readonly account: HTMLAnchorElement[];
76
- readonly mention: HTMLAnchorElement[];
77
72
  readonly url: HTMLAnchorElement[];
78
73
  readonly tel: HTMLAnchorElement[];
79
74
  readonly email: HTMLAnchorElement[];
75
+ readonly account: HTMLAnchorElement[];
76
+ readonly channel: HTMLAnchorElement[];
77
+ readonly hashtag: HTMLAnchorElement[];
78
+ readonly hashref: HTMLAnchorElement[];
79
+ readonly mention: HTMLAnchorElement[];
80
+ readonly anchor: HTMLAnchorElement[];
80
81
  readonly media: HTMLElement[];
81
82
  }
package/markdown.d.ts CHANGED
@@ -817,7 +817,6 @@ export namespace MarkdownParser {
817
817
  Parser<string, Context, [
818
818
  SourceParser.StrParser,
819
819
  SourceParser.StrParser,
820
- SourceParser.StrParser,
821
820
  ]> {
822
821
  }
823
822
  export interface OptionParser extends
@@ -925,7 +924,7 @@ export namespace MarkdownParser {
925
924
  }
926
925
  }
927
926
  export interface CommentParser extends
928
- // <# comment #>
927
+ // [# comment #]
929
928
  Inline<'comment'>,
930
929
  Parser<HTMLElement, Context, []> {
931
930
  }