@prokodo/ui 0.0.52 → 0.0.54

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 (204) hide show
  1. package/README.md +81 -81
  2. package/dist/_virtual/_commonjsHelpers.js +9 -0
  3. package/dist/_virtual/common.js +7 -0
  4. package/dist/components/accordion/Accordion.client.js +3 -1
  5. package/dist/components/accordion/Accordion.view.js +100 -81
  6. package/dist/components/animated/Animated.server.js +3 -1
  7. package/dist/components/animatedText/AnimatedText.client.js +1 -7
  8. package/dist/components/animatedText/AnimatedText.view.js +4 -1
  9. package/dist/components/avatar/Avatar.view.js +2 -2
  10. package/dist/components/base-link/BaseLink.view.js +1 -1
  11. package/dist/components/button/Button.server.js +1 -8
  12. package/dist/components/calendly/Calendly.client.js +63 -54
  13. package/dist/components/calendly/Calendly.server.js +3 -1
  14. package/dist/components/card/Card.client.js +2 -1
  15. package/dist/components/card/Card.effects.client.js +5 -1
  16. package/dist/components/card/Card.view.js +19 -2
  17. package/dist/components/carousel/Carousel.client.js +36 -12
  18. package/dist/components/chip/Chip.view.js +10 -6
  19. package/dist/components/datePicker/DatePicker.client.js +53 -37
  20. package/dist/components/datePicker/DatePicker.view.js +3 -1
  21. package/dist/components/dialog/Dialog.client.js +22 -14
  22. package/dist/components/dialog/Dialog.view.js +10 -2
  23. package/dist/components/drawer/Drawer.client.js +10 -2
  24. package/dist/components/drawer/Drawer.effects.client.js +7 -2
  25. package/dist/components/dynamic-list/DynamicList.client.js +8 -7
  26. package/dist/components/dynamic-list/DynamicList.server.js +10 -4
  27. package/dist/components/dynamic-list/DynamicList.view.js +1 -1
  28. package/dist/components/form/Form.client.js +16 -13
  29. package/dist/components/form/Form.view.js +8 -4
  30. package/dist/components/form/FormField.client.js +5 -5
  31. package/dist/components/form/FormField.server.js +3 -23
  32. package/dist/components/form/FormResponse.js +5 -1
  33. package/dist/components/grid/Grid.js +7 -2
  34. package/dist/components/grid/GridRow.js +12 -2
  35. package/dist/components/headline/Headline.js +3 -1
  36. package/dist/components/icon/Icon.js +8 -4
  37. package/dist/components/image-text/ImageText.js +5 -1
  38. package/dist/components/input/Input.client.js +52 -28
  39. package/dist/components/input/Input.view.js +92 -68
  40. package/dist/components/inputOTP/InputOTP.js +107 -90
  41. package/dist/components/label/Label.js +1 -8
  42. package/dist/components/link/Link.view.js +3 -1
  43. package/dist/components/list/List.js +94 -42
  44. package/dist/components/loading/Loading.client.js +15 -2
  45. package/dist/components/loading/Loading.server.js +8 -1
  46. package/dist/components/loading/Loading.view.js +30 -7
  47. package/dist/components/post-item/PostItem.client.js +17 -0
  48. package/dist/components/post-item/PostItem.js +7 -136
  49. package/dist/components/post-item/PostItem.lazy.js +14 -0
  50. package/dist/components/post-item/PostItem.module.scss.js +3 -1
  51. package/dist/components/post-item/PostItem.server.js +14 -0
  52. package/dist/components/post-item/PostItem.view.js +238 -0
  53. package/dist/components/post-item/PostItemAuthor.js +28 -22
  54. package/dist/components/post-teaser/PostTeaser.client.js +30 -0
  55. package/dist/components/post-teaser/PostTeaser.js +9 -169
  56. package/dist/components/post-teaser/PostTeaser.lazy.js +13 -0
  57. package/dist/components/post-teaser/PostTeaser.module.scss.js +3 -0
  58. package/dist/components/post-teaser/PostTeaser.server.js +22 -0
  59. package/dist/components/post-teaser/PostTeaser.view.js +252 -0
  60. package/dist/components/post-widget/PostWidget.client.js +9 -0
  61. package/dist/components/post-widget/PostWidget.js +11 -156
  62. package/dist/components/post-widget/PostWidget.lazy.js +13 -0
  63. package/dist/components/post-widget/PostWidget.module.scss.js +1 -0
  64. package/dist/components/post-widget/PostWidget.server.js +11 -0
  65. package/dist/components/post-widget/PostWidget.view.js +263 -0
  66. package/dist/components/post-widget-carousel/PostWidgetCarousel.client.js +9 -0
  67. package/dist/components/post-widget-carousel/PostWidgetCarousel.js +9 -160
  68. package/dist/components/post-widget-carousel/PostWidgetCarousel.lazy.js +13 -0
  69. package/dist/components/post-widget-carousel/PostWidgetCarousel.module.scss.js +3 -0
  70. package/dist/components/post-widget-carousel/PostWidgetCarousel.server.js +11 -0
  71. package/dist/components/post-widget-carousel/PostWidgetCarousel.view.js +244 -0
  72. package/dist/components/rich-text/RichText.client.js +182 -12
  73. package/dist/components/rich-text/RichText.module.scss.js +1 -1
  74. package/dist/components/select/Select.view.js +132 -116
  75. package/dist/components/sidenav/SideNav.client.js +19 -18
  76. package/dist/components/sidenav/SideNav.server.js +8 -1
  77. package/dist/components/sidenav/SideNav.view.js +21 -3
  78. package/dist/components/skeleton/Skeleton.effects.client.js +3 -1
  79. package/dist/components/slider/Slider.client.js +56 -38
  80. package/dist/components/slider/Slider.view.js +1 -7
  81. package/dist/components/snackbar/SnackbarProvider.client.js +21 -22
  82. package/dist/components/stepper/Stepper.client.js +1 -8
  83. package/dist/components/switch/Switch.client.js +1 -6
  84. package/dist/components/switch/Switch.server.js +1 -3
  85. package/dist/components/table/Table.js +3 -1
  86. package/dist/components/table/TableCell.js +13 -1
  87. package/dist/components/teaser/Teaser.js +1 -5
  88. package/dist/constants/project.js +1 -1
  89. package/dist/helpers/createIsland.js +3 -1
  90. package/dist/helpers/createLazyWrapper.js +3 -1
  91. package/dist/helpers/date.js +21 -0
  92. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/common.js +5 -0
  93. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/common.js +90 -0
  94. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/core.js +1629 -0
  95. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/bash.js +407 -0
  96. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/c.js +307 -0
  97. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/cpp.js +556 -0
  98. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/csharp.js +413 -0
  99. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/css.js +950 -0
  100. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/diff.js +66 -0
  101. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/go.js +167 -0
  102. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/graphql.js +83 -0
  103. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/ini.js +129 -0
  104. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/java.js +268 -0
  105. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/javascript.js +715 -0
  106. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/json.js +53 -0
  107. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/kotlin.js +268 -0
  108. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/less.js +1031 -0
  109. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/lua.js +74 -0
  110. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/makefile.js +84 -0
  111. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/markdown.js +245 -0
  112. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/objectivec.js +256 -0
  113. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/perl.js +498 -0
  114. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/php-template.js +59 -0
  115. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/php.js +614 -0
  116. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/plaintext.js +25 -0
  117. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/python-repl.js +38 -0
  118. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/python.js +428 -0
  119. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/r.js +223 -0
  120. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/ruby.js +426 -0
  121. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/rust.js +326 -0
  122. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/scss.js +935 -0
  123. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/shell.js +37 -0
  124. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/sql.js +658 -0
  125. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/swift.js +893 -0
  126. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/typescript.js +829 -0
  127. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/vbnet.js +146 -0
  128. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/wasm.js +134 -0
  129. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/xml.js +239 -0
  130. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/languages/yaml.js +214 -0
  131. package/dist/node_modules/.pnpm/marked-highlight@2.2.2_marked@15.0.12/node_modules/marked-highlight/src/index.js +93 -0
  132. package/dist/tsconfig.build.tsbuildinfo +1 -1
  133. package/dist/types/components/accordion/Accordion.model.d.ts +1 -1
  134. package/dist/types/components/animated/Animated.client.d.ts +2 -2
  135. package/dist/types/components/animated/Animated.model.d.ts +1 -1
  136. package/dist/types/components/button/Button.client.d.ts +1 -1
  137. package/dist/types/components/button/Button.d.ts +1 -1
  138. package/dist/types/components/button/Button.lazy.d.ts +1 -1
  139. package/dist/types/components/button/Button.server.d.ts +1 -1
  140. package/dist/types/components/button/Button.view.d.ts +1 -1
  141. package/dist/types/components/card/Card.effects.client.d.ts +1 -1
  142. package/dist/types/components/card/index.d.ts +1 -1
  143. package/dist/types/components/carousel/Carousel.d.ts +3 -0
  144. package/dist/types/components/carousel/Carousel.lazy.d.ts +3 -0
  145. package/dist/types/components/carousel/Carousel.model.d.ts +4 -0
  146. package/dist/types/components/dialog/Dialog.client.d.ts +1 -1
  147. package/dist/types/components/dialog/Dialog.model.d.ts +4 -4
  148. package/dist/types/components/dialog/Dialog.view.d.ts +2 -2
  149. package/dist/types/components/drawer/Drawer.client.d.ts +1 -1
  150. package/dist/types/components/drawer/Drawer.d.ts +1 -1
  151. package/dist/types/components/drawer/Drawer.effects.client.d.ts +1 -1
  152. package/dist/types/components/drawer/Drawer.lazy.d.ts +1 -1
  153. package/dist/types/components/drawer/Drawer.model.d.ts +6 -6
  154. package/dist/types/components/drawer/Drawer.server.d.ts +1 -1
  155. package/dist/types/components/drawer/Drawer.view.d.ts +2 -2
  156. package/dist/types/components/drawer/index.d.ts +1 -1
  157. package/dist/types/components/icon/IconList.d.ts +1 -1
  158. package/dist/types/components/icon/index.d.ts +1 -1
  159. package/dist/types/components/image/Image.model.d.ts +2 -2
  160. package/dist/types/components/link/Link.d.ts +1 -1
  161. package/dist/types/components/link/Link.model.d.ts +1 -1
  162. package/dist/types/components/link/Link.server.d.ts +1 -1
  163. package/dist/types/components/loading/index.d.ts +1 -1
  164. package/dist/types/components/post-item/PostItem.client.d.ts +4 -0
  165. package/dist/types/components/post-item/PostItem.d.ts +3 -2
  166. package/dist/types/components/post-item/PostItem.lazy.d.ts +5 -0
  167. package/dist/types/components/post-item/PostItem.model.d.ts +46 -6
  168. package/dist/types/components/post-item/PostItem.server.d.ts +3 -0
  169. package/dist/types/components/post-item/PostItem.view.d.ts +3 -0
  170. package/dist/types/components/post-item/PostItemAuthor.model.d.ts +5 -8
  171. package/dist/types/components/post-item/index.d.ts +2 -2
  172. package/dist/types/components/post-teaser/PostTeaser.client.d.ts +4 -0
  173. package/dist/types/components/post-teaser/PostTeaser.d.ts +3 -2
  174. package/dist/types/components/post-teaser/PostTeaser.lazy.d.ts +5 -0
  175. package/dist/types/components/post-teaser/PostTeaser.model.d.ts +49 -3
  176. package/dist/types/components/post-teaser/PostTeaser.server.d.ts +3 -0
  177. package/dist/types/components/post-teaser/PostTeaser.view.d.ts +3 -0
  178. package/dist/types/components/post-teaser/index.d.ts +1 -1
  179. package/dist/types/components/post-widget/PostWidget.client.d.ts +4 -0
  180. package/dist/types/components/post-widget/PostWidget.d.ts +13 -3
  181. package/dist/types/components/post-widget/PostWidget.lazy.d.ts +14 -0
  182. package/dist/types/components/post-widget/PostWidget.model.d.ts +53 -3
  183. package/dist/types/components/post-widget/PostWidget.server.d.ts +3 -0
  184. package/dist/types/components/post-widget/PostWidget.view.d.ts +3 -0
  185. package/dist/types/components/post-widget/index.d.ts +1 -1
  186. package/dist/types/components/post-widget-carousel/PostWidgetCarousel.client.d.ts +3 -0
  187. package/dist/types/components/post-widget-carousel/PostWidgetCarousel.d.ts +11 -3
  188. package/dist/types/components/post-widget-carousel/PostWidgetCarousel.lazy.d.ts +12 -0
  189. package/dist/types/components/post-widget-carousel/PostWidgetCarousel.model.d.ts +39 -0
  190. package/dist/types/components/post-widget-carousel/PostWidgetCarousel.server.d.ts +3 -0
  191. package/dist/types/components/post-widget-carousel/PostWidgetCarousel.view.d.ts +3 -0
  192. package/dist/types/components/post-widget-carousel/index.d.ts +1 -1
  193. package/dist/types/components/rich-text/RichText.client.d.ts +1 -1
  194. package/dist/types/components/rich-text/RichText.d.ts +5 -0
  195. package/dist/types/components/rich-text/RichText.lazy.d.ts +5 -0
  196. package/dist/types/components/rich-text/RichText.model.d.ts +5 -0
  197. package/dist/types/components/sidenav/index.d.ts +1 -1
  198. package/dist/types/components/skeleton/Skeleton.effects.client.d.ts +2 -2
  199. package/dist/types/helpers/createIsland.d.ts +1 -1
  200. package/dist/types/helpers/createLazyWrapper.d.ts +1 -1
  201. package/dist/types/helpers/date.d.ts +5 -0
  202. package/dist/ui.css +154 -65
  203. package/package.json +5 -2
  204. package/dist/helpers/calculation.js +0 -6
@@ -0,0 +1,614 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
+ var php_1;
4
+ var hasRequiredPhp;
5
+ function requirePhp() {
6
+ if (hasRequiredPhp) return php_1;
7
+ hasRequiredPhp = 1;
8
+ function php(hljs) {
9
+ const regex = hljs.regex;
10
+ const NOT_PERL_ETC = /(?![A-Za-z0-9])(?![$])/;
11
+ const IDENT_RE = regex.concat(
12
+ /[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,
13
+ NOT_PERL_ETC
14
+ );
15
+ const PASCAL_CASE_CLASS_NAME_RE = regex.concat(
16
+ /(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,
17
+ NOT_PERL_ETC
18
+ );
19
+ const UPCASE_NAME_RE = regex.concat(
20
+ /[A-Z]+/,
21
+ NOT_PERL_ETC
22
+ );
23
+ const VARIABLE = {
24
+ scope: "variable",
25
+ match: "\\$+" + IDENT_RE
26
+ };
27
+ const PREPROCESSOR = {
28
+ scope: "meta",
29
+ variants: [
30
+ { begin: /<\?php/, relevance: 10 },
31
+ // boost for obvious PHP
32
+ { begin: /<\?=/ },
33
+ // less relevant per PSR-1 which says not to use short-tags
34
+ { begin: /<\?/, relevance: 0.1 },
35
+ { begin: /\?>/ }
36
+ // end php tag
37
+ ]
38
+ };
39
+ const SUBST = {
40
+ scope: "subst",
41
+ variants: [
42
+ { begin: /\$\w+/ },
43
+ {
44
+ begin: /\{\$/,
45
+ end: /\}/
46
+ }
47
+ ]
48
+ };
49
+ const SINGLE_QUOTED = hljs.inherit(hljs.APOS_STRING_MODE, { illegal: null });
50
+ const DOUBLE_QUOTED = hljs.inherit(hljs.QUOTE_STRING_MODE, {
51
+ illegal: null,
52
+ contains: hljs.QUOTE_STRING_MODE.contains.concat(SUBST)
53
+ });
54
+ const HEREDOC = {
55
+ begin: /<<<[ \t]*(?:(\w+)|"(\w+)")\n/,
56
+ end: /[ \t]*(\w+)\b/,
57
+ contains: hljs.QUOTE_STRING_MODE.contains.concat(SUBST),
58
+ "on:begin": /* @__PURE__ */ __name((m, resp) => {
59
+ resp.data._beginMatch = m[1] || m[2];
60
+ }, "on:begin"),
61
+ "on:end": /* @__PURE__ */ __name((m, resp) => {
62
+ if (resp.data._beginMatch !== m[1]) resp.ignoreMatch();
63
+ }, "on:end")
64
+ };
65
+ const NOWDOC = hljs.END_SAME_AS_BEGIN({
66
+ begin: /<<<[ \t]*'(\w+)'\n/,
67
+ end: /[ \t]*(\w+)\b/
68
+ });
69
+ const WHITESPACE = "[ \n]";
70
+ const STRING = {
71
+ scope: "string",
72
+ variants: [
73
+ DOUBLE_QUOTED,
74
+ SINGLE_QUOTED,
75
+ HEREDOC,
76
+ NOWDOC
77
+ ]
78
+ };
79
+ const NUMBER = {
80
+ scope: "number",
81
+ variants: [
82
+ { begin: `\\b0[bB][01]+(?:_[01]+)*\\b` },
83
+ // Binary w/ underscore support
84
+ { begin: `\\b0[oO][0-7]+(?:_[0-7]+)*\\b` },
85
+ // Octals w/ underscore support
86
+ { begin: `\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b` },
87
+ // Hex w/ underscore support
88
+ // Decimals w/ underscore support, with optional fragments and scientific exponent (e) suffix.
89
+ { begin: `(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?` }
90
+ ],
91
+ relevance: 0
92
+ };
93
+ const LITERALS = [
94
+ "false",
95
+ "null",
96
+ "true"
97
+ ];
98
+ const KWS = [
99
+ // Magic constants:
100
+ // <https://www.php.net/manual/en/language.constants.predefined.php>
101
+ "__CLASS__",
102
+ "__DIR__",
103
+ "__FILE__",
104
+ "__FUNCTION__",
105
+ "__COMPILER_HALT_OFFSET__",
106
+ "__LINE__",
107
+ "__METHOD__",
108
+ "__NAMESPACE__",
109
+ "__TRAIT__",
110
+ // Function that look like language construct or language construct that look like function:
111
+ // List of keywords that may not require parenthesis
112
+ "die",
113
+ "echo",
114
+ "exit",
115
+ "include",
116
+ "include_once",
117
+ "print",
118
+ "require",
119
+ "require_once",
120
+ // These are not language construct (function) but operate on the currently-executing function and can access the current symbol table
121
+ // 'compact extract func_get_arg func_get_args func_num_args get_called_class get_parent_class ' +
122
+ // Other keywords:
123
+ // <https://www.php.net/manual/en/reserved.php>
124
+ // <https://www.php.net/manual/en/language.types.type-juggling.php>
125
+ "array",
126
+ "abstract",
127
+ "and",
128
+ "as",
129
+ "binary",
130
+ "bool",
131
+ "boolean",
132
+ "break",
133
+ "callable",
134
+ "case",
135
+ "catch",
136
+ "class",
137
+ "clone",
138
+ "const",
139
+ "continue",
140
+ "declare",
141
+ "default",
142
+ "do",
143
+ "double",
144
+ "else",
145
+ "elseif",
146
+ "empty",
147
+ "enddeclare",
148
+ "endfor",
149
+ "endforeach",
150
+ "endif",
151
+ "endswitch",
152
+ "endwhile",
153
+ "enum",
154
+ "eval",
155
+ "extends",
156
+ "final",
157
+ "finally",
158
+ "float",
159
+ "for",
160
+ "foreach",
161
+ "from",
162
+ "global",
163
+ "goto",
164
+ "if",
165
+ "implements",
166
+ "instanceof",
167
+ "insteadof",
168
+ "int",
169
+ "integer",
170
+ "interface",
171
+ "isset",
172
+ "iterable",
173
+ "list",
174
+ "match|0",
175
+ "mixed",
176
+ "new",
177
+ "never",
178
+ "object",
179
+ "or",
180
+ "private",
181
+ "protected",
182
+ "public",
183
+ "readonly",
184
+ "real",
185
+ "return",
186
+ "string",
187
+ "switch",
188
+ "throw",
189
+ "trait",
190
+ "try",
191
+ "unset",
192
+ "use",
193
+ "var",
194
+ "void",
195
+ "while",
196
+ "xor",
197
+ "yield"
198
+ ];
199
+ const BUILT_INS = [
200
+ // Standard PHP library:
201
+ // <https://www.php.net/manual/en/book.spl.php>
202
+ "Error|0",
203
+ "AppendIterator",
204
+ "ArgumentCountError",
205
+ "ArithmeticError",
206
+ "ArrayIterator",
207
+ "ArrayObject",
208
+ "AssertionError",
209
+ "BadFunctionCallException",
210
+ "BadMethodCallException",
211
+ "CachingIterator",
212
+ "CallbackFilterIterator",
213
+ "CompileError",
214
+ "Countable",
215
+ "DirectoryIterator",
216
+ "DivisionByZeroError",
217
+ "DomainException",
218
+ "EmptyIterator",
219
+ "ErrorException",
220
+ "Exception",
221
+ "FilesystemIterator",
222
+ "FilterIterator",
223
+ "GlobIterator",
224
+ "InfiniteIterator",
225
+ "InvalidArgumentException",
226
+ "IteratorIterator",
227
+ "LengthException",
228
+ "LimitIterator",
229
+ "LogicException",
230
+ "MultipleIterator",
231
+ "NoRewindIterator",
232
+ "OutOfBoundsException",
233
+ "OutOfRangeException",
234
+ "OuterIterator",
235
+ "OverflowException",
236
+ "ParentIterator",
237
+ "ParseError",
238
+ "RangeException",
239
+ "RecursiveArrayIterator",
240
+ "RecursiveCachingIterator",
241
+ "RecursiveCallbackFilterIterator",
242
+ "RecursiveDirectoryIterator",
243
+ "RecursiveFilterIterator",
244
+ "RecursiveIterator",
245
+ "RecursiveIteratorIterator",
246
+ "RecursiveRegexIterator",
247
+ "RecursiveTreeIterator",
248
+ "RegexIterator",
249
+ "RuntimeException",
250
+ "SeekableIterator",
251
+ "SplDoublyLinkedList",
252
+ "SplFileInfo",
253
+ "SplFileObject",
254
+ "SplFixedArray",
255
+ "SplHeap",
256
+ "SplMaxHeap",
257
+ "SplMinHeap",
258
+ "SplObjectStorage",
259
+ "SplObserver",
260
+ "SplPriorityQueue",
261
+ "SplQueue",
262
+ "SplStack",
263
+ "SplSubject",
264
+ "SplTempFileObject",
265
+ "TypeError",
266
+ "UnderflowException",
267
+ "UnexpectedValueException",
268
+ "UnhandledMatchError",
269
+ // Reserved interfaces:
270
+ // <https://www.php.net/manual/en/reserved.interfaces.php>
271
+ "ArrayAccess",
272
+ "BackedEnum",
273
+ "Closure",
274
+ "Fiber",
275
+ "Generator",
276
+ "Iterator",
277
+ "IteratorAggregate",
278
+ "Serializable",
279
+ "Stringable",
280
+ "Throwable",
281
+ "Traversable",
282
+ "UnitEnum",
283
+ "WeakReference",
284
+ "WeakMap",
285
+ // Reserved classes:
286
+ // <https://www.php.net/manual/en/reserved.classes.php>
287
+ "Directory",
288
+ "__PHP_Incomplete_Class",
289
+ "parent",
290
+ "php_user_filter",
291
+ "self",
292
+ "static",
293
+ "stdClass"
294
+ ];
295
+ const dualCase = /* @__PURE__ */ __name((items) => {
296
+ const result = [];
297
+ items.forEach((item) => {
298
+ result.push(item);
299
+ if (item.toLowerCase() === item) {
300
+ result.push(item.toUpperCase());
301
+ } else {
302
+ result.push(item.toLowerCase());
303
+ }
304
+ });
305
+ return result;
306
+ }, "dualCase");
307
+ const KEYWORDS = {
308
+ keyword: KWS,
309
+ literal: dualCase(LITERALS),
310
+ built_in: BUILT_INS
311
+ };
312
+ const normalizeKeywords = /* @__PURE__ */ __name((items) => {
313
+ return items.map((item) => {
314
+ return item.replace(/\|\d+$/, "");
315
+ });
316
+ }, "normalizeKeywords");
317
+ const CONSTRUCTOR_CALL = { variants: [
318
+ {
319
+ match: [
320
+ /new/,
321
+ regex.concat(WHITESPACE, "+"),
322
+ // to prevent built ins from being confused as the class constructor call
323
+ regex.concat("(?!", normalizeKeywords(BUILT_INS).join("\\b|"), "\\b)"),
324
+ PASCAL_CASE_CLASS_NAME_RE
325
+ ],
326
+ scope: {
327
+ 1: "keyword",
328
+ 4: "title.class"
329
+ }
330
+ }
331
+ ] };
332
+ const CONSTANT_REFERENCE = regex.concat(IDENT_RE, "\\b(?!\\()");
333
+ const LEFT_AND_RIGHT_SIDE_OF_DOUBLE_COLON = { variants: [
334
+ {
335
+ match: [
336
+ regex.concat(
337
+ /::/,
338
+ regex.lookahead(/(?!class\b)/)
339
+ ),
340
+ CONSTANT_REFERENCE
341
+ ],
342
+ scope: { 2: "variable.constant" }
343
+ },
344
+ {
345
+ match: [
346
+ /::/,
347
+ /class/
348
+ ],
349
+ scope: { 2: "variable.language" }
350
+ },
351
+ {
352
+ match: [
353
+ PASCAL_CASE_CLASS_NAME_RE,
354
+ regex.concat(
355
+ /::/,
356
+ regex.lookahead(/(?!class\b)/)
357
+ ),
358
+ CONSTANT_REFERENCE
359
+ ],
360
+ scope: {
361
+ 1: "title.class",
362
+ 3: "variable.constant"
363
+ }
364
+ },
365
+ {
366
+ match: [
367
+ PASCAL_CASE_CLASS_NAME_RE,
368
+ regex.concat(
369
+ "::",
370
+ regex.lookahead(/(?!class\b)/)
371
+ )
372
+ ],
373
+ scope: { 1: "title.class" }
374
+ },
375
+ {
376
+ match: [
377
+ PASCAL_CASE_CLASS_NAME_RE,
378
+ /::/,
379
+ /class/
380
+ ],
381
+ scope: {
382
+ 1: "title.class",
383
+ 3: "variable.language"
384
+ }
385
+ }
386
+ ] };
387
+ const NAMED_ARGUMENT = {
388
+ scope: "attr",
389
+ match: regex.concat(IDENT_RE, regex.lookahead(":"), regex.lookahead(/(?!::)/))
390
+ };
391
+ const PARAMS_MODE = {
392
+ relevance: 0,
393
+ begin: /\(/,
394
+ end: /\)/,
395
+ keywords: KEYWORDS,
396
+ contains: [
397
+ NAMED_ARGUMENT,
398
+ VARIABLE,
399
+ LEFT_AND_RIGHT_SIDE_OF_DOUBLE_COLON,
400
+ hljs.C_BLOCK_COMMENT_MODE,
401
+ STRING,
402
+ NUMBER,
403
+ CONSTRUCTOR_CALL
404
+ ]
405
+ };
406
+ const FUNCTION_INVOKE = {
407
+ relevance: 0,
408
+ match: [
409
+ /\b/,
410
+ // to prevent keywords from being confused as the function title
411
+ regex.concat("(?!fn\\b|function\\b|", normalizeKeywords(KWS).join("\\b|"), "|", normalizeKeywords(BUILT_INS).join("\\b|"), "\\b)"),
412
+ IDENT_RE,
413
+ regex.concat(WHITESPACE, "*"),
414
+ regex.lookahead(/(?=\()/)
415
+ ],
416
+ scope: { 3: "title.function.invoke" },
417
+ contains: [PARAMS_MODE]
418
+ };
419
+ PARAMS_MODE.contains.push(FUNCTION_INVOKE);
420
+ const ATTRIBUTE_CONTAINS = [
421
+ NAMED_ARGUMENT,
422
+ LEFT_AND_RIGHT_SIDE_OF_DOUBLE_COLON,
423
+ hljs.C_BLOCK_COMMENT_MODE,
424
+ STRING,
425
+ NUMBER,
426
+ CONSTRUCTOR_CALL
427
+ ];
428
+ const ATTRIBUTES = {
429
+ begin: regex.concat(
430
+ /#\[\s*\\?/,
431
+ regex.either(
432
+ PASCAL_CASE_CLASS_NAME_RE,
433
+ UPCASE_NAME_RE
434
+ )
435
+ ),
436
+ beginScope: "meta",
437
+ end: /]/,
438
+ endScope: "meta",
439
+ keywords: {
440
+ literal: LITERALS,
441
+ keyword: [
442
+ "new",
443
+ "array"
444
+ ]
445
+ },
446
+ contains: [
447
+ {
448
+ begin: /\[/,
449
+ end: /]/,
450
+ keywords: {
451
+ literal: LITERALS,
452
+ keyword: [
453
+ "new",
454
+ "array"
455
+ ]
456
+ },
457
+ contains: [
458
+ "self",
459
+ ...ATTRIBUTE_CONTAINS
460
+ ]
461
+ },
462
+ ...ATTRIBUTE_CONTAINS,
463
+ {
464
+ scope: "meta",
465
+ variants: [
466
+ { match: PASCAL_CASE_CLASS_NAME_RE },
467
+ { match: UPCASE_NAME_RE }
468
+ ]
469
+ }
470
+ ]
471
+ };
472
+ return {
473
+ case_insensitive: false,
474
+ keywords: KEYWORDS,
475
+ contains: [
476
+ ATTRIBUTES,
477
+ hljs.HASH_COMMENT_MODE,
478
+ hljs.COMMENT("//", "$"),
479
+ hljs.COMMENT(
480
+ "/\\*",
481
+ "\\*/",
482
+ { contains: [
483
+ {
484
+ scope: "doctag",
485
+ match: "@[A-Za-z]+"
486
+ }
487
+ ] }
488
+ ),
489
+ {
490
+ match: /__halt_compiler\(\);/,
491
+ keywords: "__halt_compiler",
492
+ starts: {
493
+ scope: "comment",
494
+ end: hljs.MATCH_NOTHING_RE,
495
+ contains: [
496
+ {
497
+ match: /\?>/,
498
+ scope: "meta",
499
+ endsParent: true
500
+ }
501
+ ]
502
+ }
503
+ },
504
+ PREPROCESSOR,
505
+ {
506
+ scope: "variable.language",
507
+ match: /\$this\b/
508
+ },
509
+ VARIABLE,
510
+ FUNCTION_INVOKE,
511
+ LEFT_AND_RIGHT_SIDE_OF_DOUBLE_COLON,
512
+ {
513
+ match: [
514
+ /const/,
515
+ /\s/,
516
+ IDENT_RE
517
+ ],
518
+ scope: {
519
+ 1: "keyword",
520
+ 3: "variable.constant"
521
+ }
522
+ },
523
+ CONSTRUCTOR_CALL,
524
+ {
525
+ scope: "function",
526
+ relevance: 0,
527
+ beginKeywords: "fn function",
528
+ end: /[;{]/,
529
+ excludeEnd: true,
530
+ illegal: "[$%\\[]",
531
+ contains: [
532
+ { beginKeywords: "use" },
533
+ hljs.UNDERSCORE_TITLE_MODE,
534
+ {
535
+ begin: "=>",
536
+ // No markup, just a relevance booster
537
+ endsParent: true
538
+ },
539
+ {
540
+ scope: "params",
541
+ begin: "\\(",
542
+ end: "\\)",
543
+ excludeBegin: true,
544
+ excludeEnd: true,
545
+ keywords: KEYWORDS,
546
+ contains: [
547
+ "self",
548
+ ATTRIBUTES,
549
+ VARIABLE,
550
+ LEFT_AND_RIGHT_SIDE_OF_DOUBLE_COLON,
551
+ hljs.C_BLOCK_COMMENT_MODE,
552
+ STRING,
553
+ NUMBER
554
+ ]
555
+ }
556
+ ]
557
+ },
558
+ {
559
+ scope: "class",
560
+ variants: [
561
+ {
562
+ beginKeywords: "enum",
563
+ illegal: /[($"]/
564
+ },
565
+ {
566
+ beginKeywords: "class interface trait",
567
+ illegal: /[:($"]/
568
+ }
569
+ ],
570
+ relevance: 0,
571
+ end: /\{/,
572
+ excludeEnd: true,
573
+ contains: [
574
+ { beginKeywords: "extends implements" },
575
+ hljs.UNDERSCORE_TITLE_MODE
576
+ ]
577
+ },
578
+ // both use and namespace still use "old style" rules (vs multi-match)
579
+ // because the namespace name can include `\` and we still want each
580
+ // element to be treated as its own *individual* title
581
+ {
582
+ beginKeywords: "namespace",
583
+ relevance: 0,
584
+ end: ";",
585
+ illegal: /[.']/,
586
+ contains: [hljs.inherit(hljs.UNDERSCORE_TITLE_MODE, { scope: "title.class" })]
587
+ },
588
+ {
589
+ beginKeywords: "use",
590
+ relevance: 0,
591
+ end: ";",
592
+ contains: [
593
+ // TODO: title.function vs title.class
594
+ {
595
+ match: /\b(as|const|function)\b/,
596
+ scope: "keyword"
597
+ },
598
+ // TODO: could be title.class or title.function
599
+ hljs.UNDERSCORE_TITLE_MODE
600
+ ]
601
+ },
602
+ STRING,
603
+ NUMBER
604
+ ]
605
+ };
606
+ }
607
+ __name(php, "php");
608
+ php_1 = php;
609
+ return php_1;
610
+ }
611
+ __name(requirePhp, "requirePhp");
612
+ export {
613
+ requirePhp as __require
614
+ };
@@ -0,0 +1,25 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
+ var plaintext_1;
4
+ var hasRequiredPlaintext;
5
+ function requirePlaintext() {
6
+ if (hasRequiredPlaintext) return plaintext_1;
7
+ hasRequiredPlaintext = 1;
8
+ function plaintext(hljs) {
9
+ return {
10
+ name: "Plain text",
11
+ aliases: [
12
+ "text",
13
+ "txt"
14
+ ],
15
+ disableAutodetect: true
16
+ };
17
+ }
18
+ __name(plaintext, "plaintext");
19
+ plaintext_1 = plaintext;
20
+ return plaintext_1;
21
+ }
22
+ __name(requirePlaintext, "requirePlaintext");
23
+ export {
24
+ requirePlaintext as __require
25
+ };
@@ -0,0 +1,38 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
+ var pythonRepl_1;
4
+ var hasRequiredPythonRepl;
5
+ function requirePythonRepl() {
6
+ if (hasRequiredPythonRepl) return pythonRepl_1;
7
+ hasRequiredPythonRepl = 1;
8
+ function pythonRepl(hljs) {
9
+ return {
10
+ aliases: ["pycon"],
11
+ contains: [
12
+ {
13
+ className: "meta.prompt",
14
+ starts: {
15
+ // a space separates the REPL prefix from the actual code
16
+ // this is purely for cleaner HTML output
17
+ end: / |$/,
18
+ starts: {
19
+ end: "$",
20
+ subLanguage: "python"
21
+ }
22
+ },
23
+ variants: [
24
+ { begin: /^>>>(?=[ ]|$)/ },
25
+ { begin: /^\.\.\.(?=[ ]|$)/ }
26
+ ]
27
+ }
28
+ ]
29
+ };
30
+ }
31
+ __name(pythonRepl, "pythonRepl");
32
+ pythonRepl_1 = pythonRepl;
33
+ return pythonRepl_1;
34
+ }
35
+ __name(requirePythonRepl, "requirePythonRepl");
36
+ export {
37
+ requirePythonRepl as __require
38
+ };