@progressive-development/pd-content 0.9.2 → 1.0.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 (119) hide show
  1. package/LICENSE +21 -2
  2. package/README.md +42 -57
  3. package/dist/_virtual/_commonjsHelpers.js +7 -0
  4. package/dist/_virtual/prism-java.js +3 -0
  5. package/dist/_virtual/prism-java2.js +3 -0
  6. package/dist/_virtual/prism-python.js +3 -0
  7. package/dist/_virtual/prism-python2.js +3 -0
  8. package/dist/_virtual/prism-typescript.js +3 -0
  9. package/dist/_virtual/prism-typescript2.js +3 -0
  10. package/dist/_virtual/prism.js +7 -0
  11. package/dist/_virtual/prism2.js +3 -0
  12. package/dist/generated/locales/be.d.ts +10 -0
  13. package/dist/generated/locales/be.d.ts.map +1 -1
  14. package/dist/generated/locales/de.d.ts +10 -0
  15. package/dist/generated/locales/de.d.ts.map +1 -1
  16. package/dist/generated/locales/en.d.ts +10 -0
  17. package/dist/generated/locales/en.d.ts.map +1 -1
  18. package/dist/index.d.ts +8 -1
  19. package/dist/index.d.ts.map +1 -1
  20. package/dist/index.js +9 -0
  21. package/dist/locales/be.js +11 -1
  22. package/dist/locales/de.js +11 -1
  23. package/dist/locales/en.js +11 -1
  24. package/dist/node_modules/.pnpm/prismjs@1.30.0/node_modules/prismjs/components/prism-bash.js +235 -0
  25. package/dist/node_modules/.pnpm/prismjs@1.30.0/node_modules/prismjs/components/prism-java.js +135 -0
  26. package/dist/node_modules/.pnpm/prismjs@1.30.0/node_modules/prismjs/components/prism-json.js +27 -0
  27. package/dist/node_modules/.pnpm/prismjs@1.30.0/node_modules/prismjs/components/prism-markdown.js +415 -0
  28. package/dist/node_modules/.pnpm/prismjs@1.30.0/node_modules/prismjs/components/prism-python.js +76 -0
  29. package/dist/node_modules/.pnpm/prismjs@1.30.0/node_modules/prismjs/components/prism-sql.js +32 -0
  30. package/dist/node_modules/.pnpm/prismjs@1.30.0/node_modules/prismjs/components/prism-typescript.js +71 -0
  31. package/dist/node_modules/.pnpm/prismjs@1.30.0/node_modules/prismjs/components/prism-yaml.js +83 -0
  32. package/dist/node_modules/.pnpm/prismjs@1.30.0/node_modules/prismjs/prism.js +1959 -0
  33. package/dist/pd-box-view/PdBoxView.d.ts +9 -0
  34. package/dist/pd-box-view/PdBoxView.d.ts.map +1 -1
  35. package/dist/pd-box-view/pd-box-view.stories.d.ts +41 -8
  36. package/dist/pd-box-view/pd-box-view.stories.d.ts.map +1 -1
  37. package/dist/pd-code-snippet/PdCodeSnippet.d.ts +105 -0
  38. package/dist/pd-code-snippet/PdCodeSnippet.d.ts.map +1 -0
  39. package/dist/pd-code-snippet/PdCodeSnippet.js +504 -0
  40. package/dist/pd-code-snippet/pd-code-snippet.d.ts +4 -0
  41. package/dist/pd-code-snippet/pd-code-snippet.d.ts.map +1 -0
  42. package/dist/pd-code-snippet/pd-code-snippet.js +5 -0
  43. package/dist/pd-code-snippet/pd-code-snippet.stories.d.ts +55 -0
  44. package/dist/pd-code-snippet/pd-code-snippet.stories.d.ts.map +1 -0
  45. package/dist/pd-collapse/PdCollapse.d.ts +31 -7
  46. package/dist/pd-collapse/PdCollapse.d.ts.map +1 -1
  47. package/dist/pd-collapse/PdCollapse.js +73 -15
  48. package/dist/pd-collapse/pd-collapse.stories.d.ts +49 -21
  49. package/dist/pd-collapse/pd-collapse.stories.d.ts.map +1 -1
  50. package/dist/pd-collapse-group/PdCollapseGroup.d.ts +8 -7
  51. package/dist/pd-collapse-group/PdCollapseGroup.d.ts.map +1 -1
  52. package/dist/pd-collapse-group/PdCollapseGroup.js +7 -6
  53. package/dist/pd-collapse-group/pd-collapse-group.stories.d.ts +39 -4
  54. package/dist/pd-collapse-group/pd-collapse-group.stories.d.ts.map +1 -1
  55. package/dist/pd-edit-content/PdEditContent.d.ts +13 -0
  56. package/dist/pd-edit-content/PdEditContent.d.ts.map +1 -1
  57. package/dist/pd-edit-content/PdEditContent.js +33 -7
  58. package/dist/pd-edit-content/pd-edit-content.stories.d.ts +54 -10
  59. package/dist/pd-edit-content/pd-edit-content.stories.d.ts.map +1 -1
  60. package/dist/pd-loading-state/PdLoadingState.d.ts +64 -0
  61. package/dist/pd-loading-state/PdLoadingState.d.ts.map +1 -0
  62. package/dist/pd-loading-state/PdLoadingState.js +219 -0
  63. package/dist/pd-loading-state/pd-loading-state.d.ts +6 -0
  64. package/dist/pd-loading-state/pd-loading-state.d.ts.map +1 -0
  65. package/dist/pd-loading-state/pd-loading-state.stories.d.ts +48 -0
  66. package/dist/pd-loading-state/pd-loading-state.stories.d.ts.map +1 -0
  67. package/dist/pd-loading-state.d.ts +2 -0
  68. package/dist/pd-loading-state.js +1 -0
  69. package/dist/pd-more-info/PdMoreInfo.d.ts +6 -2
  70. package/dist/pd-more-info/PdMoreInfo.d.ts.map +1 -1
  71. package/dist/pd-more-info/PdMoreInfo.js +30 -2
  72. package/dist/pd-more-info/pd-more-info.stories.d.ts +41 -5
  73. package/dist/pd-more-info/pd-more-info.stories.d.ts.map +1 -1
  74. package/dist/pd-notice-box/PdNoticeBox.d.ts +88 -0
  75. package/dist/pd-notice-box/PdNoticeBox.d.ts.map +1 -0
  76. package/dist/pd-notice-box/PdNoticeBox.js +224 -0
  77. package/dist/pd-notice-box/pd-notice-box.d.ts +3 -0
  78. package/dist/pd-notice-box/pd-notice-box.d.ts.map +1 -0
  79. package/dist/pd-notice-box/pd-notice-box.js +8 -0
  80. package/dist/pd-notice-box/pd-notice-box.stories.d.ts +58 -0
  81. package/dist/pd-notice-box/pd-notice-box.stories.d.ts.map +1 -0
  82. package/dist/pd-panel-viewer/PdPanel.d.ts +5 -0
  83. package/dist/pd-panel-viewer/PdPanel.d.ts.map +1 -1
  84. package/dist/pd-panel-viewer/PdPanelViewer.d.ts +53 -2
  85. package/dist/pd-panel-viewer/PdPanelViewer.d.ts.map +1 -1
  86. package/dist/pd-panel-viewer/PdPanelViewer.js +188 -33
  87. package/dist/pd-panel-viewer/pd-panel-viewer.stories.d.ts +46 -0
  88. package/dist/pd-panel-viewer/pd-panel-viewer.stories.d.ts.map +1 -0
  89. package/dist/pd-resize-content/PdResizeContent.d.ts +12 -10
  90. package/dist/pd-resize-content/PdResizeContent.d.ts.map +1 -1
  91. package/dist/pd-resize-content/PdResizeContent.js +19 -9
  92. package/dist/pd-resize-content/pd-resize-content.stories.d.ts +36 -4
  93. package/dist/pd-resize-content/pd-resize-content.stories.d.ts.map +1 -1
  94. package/dist/pd-tab/PdTab.d.ts +35 -2
  95. package/dist/pd-tab/PdTab.d.ts.map +1 -1
  96. package/dist/pd-tab/PdTab.js +181 -68
  97. package/dist/pd-tab/pd-tab.stories.d.ts +51 -21
  98. package/dist/pd-tab/pd-tab.stories.d.ts.map +1 -1
  99. package/dist/pd-timeline/PdTimeline.d.ts +50 -0
  100. package/dist/pd-timeline/PdTimeline.d.ts.map +1 -0
  101. package/dist/pd-timeline/PdTimeline.js +315 -0
  102. package/dist/pd-timeline/pd-timeline.d.ts +3 -0
  103. package/dist/pd-timeline/pd-timeline.d.ts.map +1 -0
  104. package/dist/pd-timeline/pd-timeline.stories.d.ts +56 -0
  105. package/dist/pd-timeline/pd-timeline.stories.d.ts.map +1 -0
  106. package/dist/pd-timeline-wizard/PdTimelineWizard.d.ts +39 -0
  107. package/dist/pd-timeline-wizard/PdTimelineWizard.d.ts.map +1 -0
  108. package/dist/pd-timeline-wizard/PdTimelineWizard.js +150 -0
  109. package/dist/pd-timeline-wizard/pd-timeline-wizard.d.ts +3 -0
  110. package/dist/pd-timeline-wizard/pd-timeline-wizard.d.ts.map +1 -0
  111. package/dist/pd-timeline-wizard/pd-timeline-wizard.stories.d.ts +54 -0
  112. package/dist/pd-timeline-wizard/pd-timeline-wizard.stories.d.ts.map +1 -0
  113. package/dist/pd-timeline-wizard.d.ts +2 -0
  114. package/dist/pd-timeline-wizard.js +8 -0
  115. package/dist/pd-timeline.d.ts +2 -0
  116. package/dist/pd-timeline.js +8 -0
  117. package/dist/types.d.ts +25 -0
  118. package/dist/types.d.ts.map +1 -1
  119. package/package.json +16 -7
@@ -0,0 +1,135 @@
1
+ import { __exports as prismJava } from '../../../../../../_virtual/prism-java2.js';
2
+
3
+ var hasRequiredPrismJava;
4
+
5
+ function requirePrismJava () {
6
+ if (hasRequiredPrismJava) return prismJava;
7
+ hasRequiredPrismJava = 1;
8
+ (function (Prism) {
9
+
10
+ var keywords = /\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/;
11
+
12
+ // full package (optional) + parent classes (optional)
13
+ var classNamePrefix = /(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source;
14
+
15
+ // based on the java naming conventions
16
+ var className = {
17
+ pattern: RegExp(/(^|[^\w.])/.source + classNamePrefix + /[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),
18
+ lookbehind: true,
19
+ inside: {
20
+ 'namespace': {
21
+ pattern: /^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,
22
+ inside: {
23
+ 'punctuation': /\./
24
+ }
25
+ },
26
+ 'punctuation': /\./
27
+ }
28
+ };
29
+
30
+ Prism.languages.java = Prism.languages.extend('clike', {
31
+ 'string': {
32
+ pattern: /(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,
33
+ lookbehind: true,
34
+ greedy: true
35
+ },
36
+ 'class-name': [
37
+ className,
38
+ {
39
+ // variables, parameters, and constructor references
40
+ // this to support class names (or generic parameters) which do not contain a lower case letter (also works for methods)
41
+ pattern: RegExp(/(^|[^\w.])/.source + classNamePrefix + /[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),
42
+ lookbehind: true,
43
+ inside: className.inside
44
+ },
45
+ {
46
+ // class names based on keyword
47
+ // this to support class names (or generic parameters) which do not contain a lower case letter (also works for methods)
48
+ pattern: RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source + classNamePrefix + /[A-Z]\w*\b/.source),
49
+ lookbehind: true,
50
+ inside: className.inside
51
+ }
52
+ ],
53
+ 'keyword': keywords,
54
+ 'function': [
55
+ Prism.languages.clike.function,
56
+ {
57
+ pattern: /(::\s*)[a-z_]\w*/,
58
+ lookbehind: true
59
+ }
60
+ ],
61
+ 'number': /\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,
62
+ 'operator': {
63
+ pattern: /(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,
64
+ lookbehind: true
65
+ },
66
+ 'constant': /\b[A-Z][A-Z_\d]+\b/
67
+ });
68
+
69
+ Prism.languages.insertBefore('java', 'string', {
70
+ 'triple-quoted-string': {
71
+ // http://openjdk.java.net/jeps/355#Description
72
+ pattern: /"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,
73
+ greedy: true,
74
+ alias: 'string'
75
+ },
76
+ 'char': {
77
+ pattern: /'(?:\\.|[^'\\\r\n]){1,6}'/,
78
+ greedy: true
79
+ }
80
+ });
81
+
82
+ Prism.languages.insertBefore('java', 'class-name', {
83
+ 'annotation': {
84
+ pattern: /(^|[^.])@\w+(?:\s*\.\s*\w+)*/,
85
+ lookbehind: true,
86
+ alias: 'punctuation'
87
+ },
88
+ 'generics': {
89
+ pattern: /<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,
90
+ inside: {
91
+ 'class-name': className,
92
+ 'keyword': keywords,
93
+ 'punctuation': /[<>(),.:]/,
94
+ 'operator': /[?&|]/
95
+ }
96
+ },
97
+ 'import': [
98
+ {
99
+ pattern: RegExp(/(\bimport\s+)/.source + classNamePrefix + /(?:[A-Z]\w*|\*)(?=\s*;)/.source),
100
+ lookbehind: true,
101
+ inside: {
102
+ 'namespace': className.inside.namespace,
103
+ 'punctuation': /\./,
104
+ 'operator': /\*/,
105
+ 'class-name': /\w+/
106
+ }
107
+ },
108
+ {
109
+ pattern: RegExp(/(\bimport\s+static\s+)/.source + classNamePrefix + /(?:\w+|\*)(?=\s*;)/.source),
110
+ lookbehind: true,
111
+ alias: 'static',
112
+ inside: {
113
+ 'namespace': className.inside.namespace,
114
+ 'static': /\b\w+$/,
115
+ 'punctuation': /\./,
116
+ 'operator': /\*/,
117
+ 'class-name': /\w+/
118
+ }
119
+ }
120
+ ],
121
+ 'namespace': {
122
+ pattern: RegExp(
123
+ /(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!<keyword>)[a-z]\w*(?:\.[a-z]\w*)*\.?/
124
+ .source.replace(/<keyword>/g, function () { return keywords.source; })),
125
+ lookbehind: true,
126
+ inside: {
127
+ 'punctuation': /\./,
128
+ }
129
+ }
130
+ });
131
+ }(Prism));
132
+ return prismJava;
133
+ }
134
+
135
+ export { requirePrismJava as __require };
@@ -0,0 +1,27 @@
1
+ // https://www.json.org/json-en.html
2
+ Prism.languages.json = {
3
+ 'property': {
4
+ pattern: /(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,
5
+ lookbehind: true,
6
+ greedy: true
7
+ },
8
+ 'string': {
9
+ pattern: /(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,
10
+ lookbehind: true,
11
+ greedy: true
12
+ },
13
+ 'comment': {
14
+ pattern: /\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,
15
+ greedy: true
16
+ },
17
+ 'number': /-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,
18
+ 'punctuation': /[{}[\],]/,
19
+ 'operator': /:/,
20
+ 'boolean': /\b(?:false|true)\b/,
21
+ 'null': {
22
+ pattern: /\bnull\b/,
23
+ alias: 'keyword'
24
+ }
25
+ };
26
+
27
+ Prism.languages.webmanifest = Prism.languages.json;
@@ -0,0 +1,415 @@
1
+ (function (Prism) {
2
+
3
+ // Allow only one line break
4
+ var inner = /(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;
5
+
6
+ /**
7
+ * This function is intended for the creation of the bold or italic pattern.
8
+ *
9
+ * This also adds a lookbehind group to the given pattern to ensure that the pattern is not backslash-escaped.
10
+ *
11
+ * _Note:_ Keep in mind that this adds a capturing group.
12
+ *
13
+ * @param {string} pattern
14
+ * @returns {RegExp}
15
+ */
16
+ function createInline(pattern) {
17
+ pattern = pattern.replace(/<inner>/g, function () { return inner; });
18
+ return RegExp(/((?:^|[^\\])(?:\\{2})*)/.source + '(?:' + pattern + ')');
19
+ }
20
+
21
+
22
+ var tableCell = /(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source;
23
+ var tableRow = /\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g, function () { return tableCell; });
24
+ var tableLine = /\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;
25
+
26
+
27
+ Prism.languages.markdown = Prism.languages.extend('markup', {});
28
+ Prism.languages.insertBefore('markdown', 'prolog', {
29
+ 'front-matter-block': {
30
+ pattern: /(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,
31
+ lookbehind: true,
32
+ greedy: true,
33
+ inside: {
34
+ 'punctuation': /^---|---$/,
35
+ 'front-matter': {
36
+ pattern: /\S+(?:\s+\S+)*/,
37
+ alias: ['yaml', 'language-yaml'],
38
+ inside: Prism.languages.yaml
39
+ }
40
+ }
41
+ },
42
+ 'blockquote': {
43
+ // > ...
44
+ pattern: /^>(?:[\t ]*>)*/m,
45
+ alias: 'punctuation'
46
+ },
47
+ 'table': {
48
+ pattern: RegExp('^' + tableRow + tableLine + '(?:' + tableRow + ')*', 'm'),
49
+ inside: {
50
+ 'table-data-rows': {
51
+ pattern: RegExp('^(' + tableRow + tableLine + ')(?:' + tableRow + ')*$'),
52
+ lookbehind: true,
53
+ inside: {
54
+ 'table-data': {
55
+ pattern: RegExp(tableCell),
56
+ inside: Prism.languages.markdown
57
+ },
58
+ 'punctuation': /\|/
59
+ }
60
+ },
61
+ 'table-line': {
62
+ pattern: RegExp('^(' + tableRow + ')' + tableLine + '$'),
63
+ lookbehind: true,
64
+ inside: {
65
+ 'punctuation': /\||:?-{3,}:?/
66
+ }
67
+ },
68
+ 'table-header-row': {
69
+ pattern: RegExp('^' + tableRow + '$'),
70
+ inside: {
71
+ 'table-header': {
72
+ pattern: RegExp(tableCell),
73
+ alias: 'important',
74
+ inside: Prism.languages.markdown
75
+ },
76
+ 'punctuation': /\|/
77
+ }
78
+ }
79
+ }
80
+ },
81
+ 'code': [
82
+ {
83
+ // Prefixed by 4 spaces or 1 tab and preceded by an empty line
84
+ pattern: /((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,
85
+ lookbehind: true,
86
+ alias: 'keyword'
87
+ },
88
+ {
89
+ // ```optional language
90
+ // code block
91
+ // ```
92
+ pattern: /^```[\s\S]*?^```$/m,
93
+ greedy: true,
94
+ inside: {
95
+ 'code-block': {
96
+ pattern: /^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,
97
+ lookbehind: true
98
+ },
99
+ 'code-language': {
100
+ pattern: /^(```).+/,
101
+ lookbehind: true
102
+ },
103
+ 'punctuation': /```/
104
+ }
105
+ }
106
+ ],
107
+ 'title': [
108
+ {
109
+ // title 1
110
+ // =======
111
+
112
+ // title 2
113
+ // -------
114
+ pattern: /\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,
115
+ alias: 'important',
116
+ inside: {
117
+ punctuation: /==+$|--+$/
118
+ }
119
+ },
120
+ {
121
+ // # title 1
122
+ // ###### title 6
123
+ pattern: /(^\s*)#.+/m,
124
+ lookbehind: true,
125
+ alias: 'important',
126
+ inside: {
127
+ punctuation: /^#+|#+$/
128
+ }
129
+ }
130
+ ],
131
+ 'hr': {
132
+ // ***
133
+ // ---
134
+ // * * *
135
+ // -----------
136
+ pattern: /(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,
137
+ lookbehind: true,
138
+ alias: 'punctuation'
139
+ },
140
+ 'list': {
141
+ // * item
142
+ // + item
143
+ // - item
144
+ // 1. item
145
+ pattern: /(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,
146
+ lookbehind: true,
147
+ alias: 'punctuation'
148
+ },
149
+ 'url-reference': {
150
+ // [id]: http://example.com "Optional title"
151
+ // [id]: http://example.com 'Optional title'
152
+ // [id]: http://example.com (Optional title)
153
+ // [id]: <http://example.com> "Optional title"
154
+ pattern: /!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,
155
+ inside: {
156
+ 'variable': {
157
+ pattern: /^(!?\[)[^\]]+/,
158
+ lookbehind: true
159
+ },
160
+ 'string': /(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,
161
+ 'punctuation': /^[\[\]!:]|[<>]/
162
+ },
163
+ alias: 'url'
164
+ },
165
+ 'bold': {
166
+ // **strong**
167
+ // __strong__
168
+
169
+ // allow one nested instance of italic text using the same delimiter
170
+ pattern: createInline(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),
171
+ lookbehind: true,
172
+ greedy: true,
173
+ inside: {
174
+ 'content': {
175
+ pattern: /(^..)[\s\S]+(?=..$)/,
176
+ lookbehind: true,
177
+ inside: {} // see below
178
+ },
179
+ 'punctuation': /\*\*|__/
180
+ }
181
+ },
182
+ 'italic': {
183
+ // *em*
184
+ // _em_
185
+
186
+ // allow one nested instance of bold text using the same delimiter
187
+ pattern: createInline(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),
188
+ lookbehind: true,
189
+ greedy: true,
190
+ inside: {
191
+ 'content': {
192
+ pattern: /(^.)[\s\S]+(?=.$)/,
193
+ lookbehind: true,
194
+ inside: {} // see below
195
+ },
196
+ 'punctuation': /[*_]/
197
+ }
198
+ },
199
+ 'strike': {
200
+ // ~~strike through~~
201
+ // ~strike~
202
+ // eslint-disable-next-line regexp/strict
203
+ pattern: createInline(/(~~?)(?:(?!~)<inner>)+\2/.source),
204
+ lookbehind: true,
205
+ greedy: true,
206
+ inside: {
207
+ 'content': {
208
+ pattern: /(^~~?)[\s\S]+(?=\1$)/,
209
+ lookbehind: true,
210
+ inside: {} // see below
211
+ },
212
+ 'punctuation': /~~?/
213
+ }
214
+ },
215
+ 'code-snippet': {
216
+ // `code`
217
+ // ``code``
218
+ pattern: /(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,
219
+ lookbehind: true,
220
+ greedy: true,
221
+ alias: ['code', 'keyword']
222
+ },
223
+ 'url': {
224
+ // [example](http://example.com "Optional title")
225
+ // [example][id]
226
+ // [example] [id]
227
+ pattern: createInline(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),
228
+ lookbehind: true,
229
+ greedy: true,
230
+ inside: {
231
+ 'operator': /^!/,
232
+ 'content': {
233
+ pattern: /(^\[)[^\]]+(?=\])/,
234
+ lookbehind: true,
235
+ inside: {} // see below
236
+ },
237
+ 'variable': {
238
+ pattern: /(^\][ \t]?\[)[^\]]+(?=\]$)/,
239
+ lookbehind: true
240
+ },
241
+ 'url': {
242
+ pattern: /(^\]\()[^\s)]+/,
243
+ lookbehind: true
244
+ },
245
+ 'string': {
246
+ pattern: /(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,
247
+ lookbehind: true
248
+ }
249
+ }
250
+ }
251
+ });
252
+
253
+ ['url', 'bold', 'italic', 'strike'].forEach(function (token) {
254
+ ['url', 'bold', 'italic', 'strike', 'code-snippet'].forEach(function (inside) {
255
+ if (token !== inside) {
256
+ Prism.languages.markdown[token].inside.content.inside[inside] = Prism.languages.markdown[inside];
257
+ }
258
+ });
259
+ });
260
+
261
+ Prism.hooks.add('after-tokenize', function (env) {
262
+ if (env.language !== 'markdown' && env.language !== 'md') {
263
+ return;
264
+ }
265
+
266
+ function walkTokens(tokens) {
267
+ if (!tokens || typeof tokens === 'string') {
268
+ return;
269
+ }
270
+
271
+ for (var i = 0, l = tokens.length; i < l; i++) {
272
+ var token = tokens[i];
273
+
274
+ if (token.type !== 'code') {
275
+ walkTokens(token.content);
276
+ continue;
277
+ }
278
+
279
+ /*
280
+ * Add the correct `language-xxxx` class to this code block. Keep in mind that the `code-language` token
281
+ * is optional. But the grammar is defined so that there is only one case we have to handle:
282
+ *
283
+ * token.content = [
284
+ * <span class="punctuation">```</span>,
285
+ * <span class="code-language">xxxx</span>,
286
+ * '\n', // exactly one new lines (\r or \n or \r\n)
287
+ * <span class="code-block">...</span>,
288
+ * '\n', // exactly one new lines again
289
+ * <span class="punctuation">```</span>
290
+ * ];
291
+ */
292
+
293
+ var codeLang = token.content[1];
294
+ var codeBlock = token.content[3];
295
+
296
+ if (codeLang && codeBlock &&
297
+ codeLang.type === 'code-language' && codeBlock.type === 'code-block' &&
298
+ typeof codeLang.content === 'string') {
299
+
300
+ // this might be a language that Prism does not support
301
+
302
+ // do some replacements to support C++, C#, and F#
303
+ var lang = codeLang.content.replace(/\b#/g, 'sharp').replace(/\b\+\+/g, 'pp');
304
+ // only use the first word
305
+ lang = (/[a-z][\w-]*/i.exec(lang) || [''])[0].toLowerCase();
306
+ var alias = 'language-' + lang;
307
+
308
+ // add alias
309
+ if (!codeBlock.alias) {
310
+ codeBlock.alias = [alias];
311
+ } else if (typeof codeBlock.alias === 'string') {
312
+ codeBlock.alias = [codeBlock.alias, alias];
313
+ } else {
314
+ codeBlock.alias.push(alias);
315
+ }
316
+ }
317
+ }
318
+ }
319
+
320
+ walkTokens(env.tokens);
321
+ });
322
+
323
+ Prism.hooks.add('wrap', function (env) {
324
+ if (env.type !== 'code-block') {
325
+ return;
326
+ }
327
+
328
+ var codeLang = '';
329
+ for (var i = 0, l = env.classes.length; i < l; i++) {
330
+ var cls = env.classes[i];
331
+ var match = /language-(.+)/.exec(cls);
332
+ if (match) {
333
+ codeLang = match[1];
334
+ break;
335
+ }
336
+ }
337
+
338
+ var grammar = Prism.languages[codeLang];
339
+
340
+ if (!grammar) {
341
+ if (codeLang && codeLang !== 'none' && Prism.plugins.autoloader) {
342
+ var id = 'md-' + new Date().valueOf() + '-' + Math.floor(Math.random() * 1e16);
343
+ env.attributes['id'] = id;
344
+
345
+ Prism.plugins.autoloader.loadLanguages(codeLang, function () {
346
+ var ele = document.getElementById(id);
347
+ if (ele) {
348
+ ele.innerHTML = Prism.highlight(ele.textContent, Prism.languages[codeLang], codeLang);
349
+ }
350
+ });
351
+ }
352
+ } else {
353
+ env.content = Prism.highlight(textContent(env.content), grammar, codeLang);
354
+ }
355
+ });
356
+
357
+ var tagPattern = RegExp(Prism.languages.markup.tag.pattern.source, 'gi');
358
+
359
+ /**
360
+ * A list of known entity names.
361
+ *
362
+ * This will always be incomplete to save space. The current list is the one used by lowdash's unescape function.
363
+ *
364
+ * @see {@link https://github.com/lodash/lodash/blob/2da024c3b4f9947a48517639de7560457cd4ec6c/unescape.js#L2}
365
+ */
366
+ var KNOWN_ENTITY_NAMES = {
367
+ 'amp': '&',
368
+ 'lt': '<',
369
+ 'gt': '>',
370
+ 'quot': '"',
371
+ };
372
+
373
+ // IE 11 doesn't support `String.fromCodePoint`
374
+ var fromCodePoint = String.fromCodePoint || String.fromCharCode;
375
+
376
+ /**
377
+ * Returns the text content of a given HTML source code string.
378
+ *
379
+ * @param {string} html
380
+ * @returns {string}
381
+ */
382
+ function textContent(html) {
383
+ // remove all tags
384
+ var text = html.replace(tagPattern, '');
385
+
386
+ // decode known entities
387
+ text = text.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi, function (m, code) {
388
+ code = code.toLowerCase();
389
+
390
+ if (code[0] === '#') {
391
+ var value;
392
+ if (code[1] === 'x') {
393
+ value = parseInt(code.slice(2), 16);
394
+ } else {
395
+ value = Number(code.slice(1));
396
+ }
397
+
398
+ return fromCodePoint(value);
399
+ } else {
400
+ var known = KNOWN_ENTITY_NAMES[code];
401
+ if (known) {
402
+ return known;
403
+ }
404
+
405
+ // unable to decode
406
+ return m;
407
+ }
408
+ });
409
+
410
+ return text;
411
+ }
412
+
413
+ Prism.languages.md = Prism.languages.markdown;
414
+
415
+ }(Prism));
@@ -0,0 +1,76 @@
1
+ import { __exports as prismPython } from '../../../../../../_virtual/prism-python2.js';
2
+
3
+ var hasRequiredPrismPython;
4
+
5
+ function requirePrismPython () {
6
+ if (hasRequiredPrismPython) return prismPython;
7
+ hasRequiredPrismPython = 1;
8
+ Prism.languages.python = {
9
+ 'comment': {
10
+ pattern: /(^|[^\\])#.*/,
11
+ lookbehind: true,
12
+ greedy: true
13
+ },
14
+ 'string-interpolation': {
15
+ pattern: /(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,
16
+ greedy: true,
17
+ inside: {
18
+ 'interpolation': {
19
+ // "{" <expression> <optional "!s", "!r", or "!a"> <optional ":" format specifier> "}"
20
+ pattern: /((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,
21
+ lookbehind: true,
22
+ inside: {
23
+ 'format-spec': {
24
+ pattern: /(:)[^:(){}]+(?=\}$)/,
25
+ lookbehind: true
26
+ },
27
+ 'conversion-option': {
28
+ pattern: /![sra](?=[:}]$)/,
29
+ alias: 'punctuation'
30
+ },
31
+ rest: null
32
+ }
33
+ },
34
+ 'string': /[\s\S]+/
35
+ }
36
+ },
37
+ 'triple-quoted-string': {
38
+ pattern: /(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,
39
+ greedy: true,
40
+ alias: 'string'
41
+ },
42
+ 'string': {
43
+ pattern: /(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,
44
+ greedy: true
45
+ },
46
+ 'function': {
47
+ pattern: /((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,
48
+ lookbehind: true
49
+ },
50
+ 'class-name': {
51
+ pattern: /(\bclass\s+)\w+/i,
52
+ lookbehind: true
53
+ },
54
+ 'decorator': {
55
+ pattern: /(^[\t ]*)@\w+(?:\.\w+)*/m,
56
+ lookbehind: true,
57
+ alias: ['annotation', 'punctuation'],
58
+ inside: {
59
+ 'punctuation': /\./
60
+ }
61
+ },
62
+ 'keyword': /\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,
63
+ 'builtin': /\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,
64
+ 'boolean': /\b(?:False|None|True)\b/,
65
+ 'number': /\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,
66
+ 'operator': /[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,
67
+ 'punctuation': /[{}[\];(),.:]/
68
+ };
69
+
70
+ Prism.languages.python['string-interpolation'].inside['interpolation'].inside.rest = Prism.languages.python;
71
+
72
+ Prism.languages.py = Prism.languages.python;
73
+ return prismPython;
74
+ }
75
+
76
+ export { requirePrismPython as __require };
@@ -0,0 +1,32 @@
1
+ Prism.languages.sql = {
2
+ 'comment': {
3
+ pattern: /(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,
4
+ lookbehind: true
5
+ },
6
+ 'variable': [
7
+ {
8
+ pattern: /@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,
9
+ greedy: true
10
+ },
11
+ /@[\w.$]+/
12
+ ],
13
+ 'string': {
14
+ pattern: /(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,
15
+ greedy: true,
16
+ lookbehind: true
17
+ },
18
+ 'identifier': {
19
+ pattern: /(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,
20
+ greedy: true,
21
+ lookbehind: true,
22
+ inside: {
23
+ 'punctuation': /^`|`$/
24
+ }
25
+ },
26
+ 'function': /\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i, // Should we highlight user defined functions too?
27
+ 'keyword': /\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,
28
+ 'boolean': /\b(?:FALSE|NULL|TRUE)\b/i,
29
+ 'number': /\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,
30
+ 'operator': /[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,
31
+ 'punctuation': /[;[\]()`,.]/
32
+ };