@zipify/wysiwyg 1.1.1-0 → 1.1.1

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 (164) hide show
  1. package/dist/cli.js +2 -2
  2. package/dist/wysiwyg.css +11 -11
  3. package/dist/wysiwyg.mjs +46 -53
  4. package/lib/components/toolbar/controls/link/LinkControl.vue +4 -5
  5. package/lib/components/toolbar/controls/link/LinkControlHeader.vue +2 -2
  6. package/lib/components/toolbar/controls/link/__tests__/LinkControl.test.js +1 -1
  7. package/lib/components/toolbar/controls/link/__tests__/LinkControlHeader.test.js +1 -1
  8. package/lib/components/toolbar/controls/link/composables/useLink.js +5 -7
  9. package/lib/enums/TextSettings.js +0 -2
  10. package/lib/extensions/Alignment.js +10 -8
  11. package/lib/extensions/FontSize.js +8 -3
  12. package/lib/extensions/FontStyle.js +2 -2
  13. package/lib/extensions/LineHeight.js +10 -4
  14. package/lib/extensions/Link.js +15 -13
  15. package/lib/extensions/TextDecoration.js +13 -12
  16. package/lib/extensions/__tests__/FontFamily.test.js +6 -7
  17. package/lib/extensions/__tests__/FontWeight.test.js +10 -11
  18. package/lib/extensions/__tests__/TextDecoration.test.js +42 -73
  19. package/lib/extensions/__tests__/__snapshots__/Alignment.test.js.snap +3 -3
  20. package/lib/extensions/__tests__/__snapshots__/FontFamily.test.js.snap +0 -18
  21. package/lib/extensions/__tests__/__snapshots__/FontSize.test.js.snap +9 -9
  22. package/lib/extensions/__tests__/__snapshots__/FontStyle.test.js.snap +0 -16
  23. package/lib/extensions/__tests__/__snapshots__/LineHeight.test.js.snap +5 -5
  24. package/lib/extensions/__tests__/__snapshots__/TextDecoration.test.js.snap +43 -0
  25. package/lib/services/NodeFactory.js +4 -1
  26. package/node_modules_lambda/acorn-globals/node_modules/.bin/acorn +4 -0
  27. package/node_modules_lambda/acorn-globals/node_modules/acorn/CHANGELOG.md +620 -0
  28. package/node_modules_lambda/acorn-globals/node_modules/acorn/LICENSE +21 -0
  29. package/node_modules_lambda/acorn-globals/node_modules/acorn/README.md +269 -0
  30. package/node_modules_lambda/acorn-globals/node_modules/acorn/bin/acorn +4 -0
  31. package/node_modules_lambda/acorn-globals/node_modules/acorn/dist/acorn.d.ts +209 -0
  32. package/node_modules_lambda/acorn-globals/node_modules/acorn/dist/acorn.js +5186 -0
  33. package/node_modules_lambda/acorn-globals/node_modules/acorn/dist/acorn.js.map +1 -0
  34. package/node_modules_lambda/acorn-globals/node_modules/acorn/dist/acorn.mjs +5155 -0
  35. package/node_modules_lambda/acorn-globals/node_modules/acorn/dist/acorn.mjs.d.ts +2 -0
  36. package/node_modules_lambda/acorn-globals/node_modules/acorn/dist/acorn.mjs.map +1 -0
  37. package/node_modules_lambda/acorn-globals/node_modules/acorn/dist/bin.js +64 -0
  38. package/node_modules_lambda/acorn-globals/node_modules/acorn/package.json +35 -0
  39. package/node_modules_lambda/cssstyle/node_modules/cssom/LICENSE.txt +20 -0
  40. package/node_modules_lambda/cssstyle/node_modules/cssom/README.mdown +67 -0
  41. package/node_modules_lambda/cssstyle/node_modules/cssom/lib/CSSDocumentRule.js +39 -0
  42. package/node_modules_lambda/cssstyle/node_modules/cssom/lib/CSSFontFaceRule.js +36 -0
  43. package/node_modules_lambda/cssstyle/node_modules/cssom/lib/CSSHostRule.js +37 -0
  44. package/node_modules_lambda/cssstyle/node_modules/cssom/lib/CSSImportRule.js +132 -0
  45. package/node_modules_lambda/cssstyle/node_modules/cssom/lib/CSSKeyframeRule.js +37 -0
  46. package/node_modules_lambda/cssstyle/node_modules/cssom/lib/CSSKeyframesRule.js +39 -0
  47. package/node_modules_lambda/cssstyle/node_modules/cssom/lib/CSSMediaRule.js +41 -0
  48. package/node_modules_lambda/cssstyle/node_modules/cssom/lib/CSSOM.js +3 -0
  49. package/node_modules_lambda/cssstyle/node_modules/cssom/lib/CSSRule.js +43 -0
  50. package/node_modules_lambda/cssstyle/node_modules/cssom/lib/CSSStyleDeclaration.js +148 -0
  51. package/node_modules_lambda/cssstyle/node_modules/cssom/lib/CSSStyleRule.js +190 -0
  52. package/node_modules_lambda/cssstyle/node_modules/cssom/lib/CSSStyleSheet.js +88 -0
  53. package/node_modules_lambda/cssstyle/node_modules/cssom/lib/CSSSupportsRule.js +36 -0
  54. package/node_modules_lambda/cssstyle/node_modules/cssom/lib/CSSValue.js +43 -0
  55. package/node_modules_lambda/cssstyle/node_modules/cssom/lib/CSSValueExpression.js +344 -0
  56. package/node_modules_lambda/cssstyle/node_modules/cssom/lib/MatcherList.js +62 -0
  57. package/node_modules_lambda/cssstyle/node_modules/cssom/lib/MediaList.js +61 -0
  58. package/node_modules_lambda/cssstyle/node_modules/cssom/lib/StyleSheet.js +17 -0
  59. package/node_modules_lambda/cssstyle/node_modules/cssom/lib/clone.js +82 -0
  60. package/node_modules_lambda/cssstyle/node_modules/cssom/lib/index.js +21 -0
  61. package/node_modules_lambda/cssstyle/node_modules/cssom/lib/parse.js +464 -0
  62. package/node_modules_lambda/cssstyle/node_modules/cssom/package.json +18 -0
  63. package/node_modules_lambda/data-urls/node_modules/whatwg-url/LICENSE.txt +21 -0
  64. package/node_modules_lambda/data-urls/node_modules/whatwg-url/README.md +106 -0
  65. package/node_modules_lambda/data-urls/node_modules/whatwg-url/index.js +27 -0
  66. package/node_modules_lambda/data-urls/node_modules/whatwg-url/lib/Function.js +42 -0
  67. package/node_modules_lambda/data-urls/node_modules/whatwg-url/lib/URL-impl.js +209 -0
  68. package/node_modules_lambda/data-urls/node_modules/whatwg-url/lib/URL.js +442 -0
  69. package/node_modules_lambda/data-urls/node_modules/whatwg-url/lib/URLSearchParams-impl.js +130 -0
  70. package/node_modules_lambda/data-urls/node_modules/whatwg-url/lib/URLSearchParams.js +472 -0
  71. package/node_modules_lambda/data-urls/node_modules/whatwg-url/lib/VoidFunction.js +26 -0
  72. package/node_modules_lambda/data-urls/node_modules/whatwg-url/lib/encoding.js +16 -0
  73. package/node_modules_lambda/data-urls/node_modules/whatwg-url/lib/infra.js +26 -0
  74. package/node_modules_lambda/data-urls/node_modules/whatwg-url/lib/percent-encoding.js +142 -0
  75. package/node_modules_lambda/data-urls/node_modules/whatwg-url/lib/url-state-machine.js +1244 -0
  76. package/node_modules_lambda/data-urls/node_modules/whatwg-url/lib/urlencoded.js +106 -0
  77. package/node_modules_lambda/data-urls/node_modules/whatwg-url/lib/utils.js +190 -0
  78. package/node_modules_lambda/data-urls/node_modules/whatwg-url/package.json +58 -0
  79. package/node_modules_lambda/data-urls/node_modules/whatwg-url/webidl2js-wrapper.js +7 -0
  80. package/node_modules_lambda/escodegen/node_modules/estraverse/.jshintrc +16 -0
  81. package/node_modules_lambda/escodegen/node_modules/estraverse/LICENSE.BSD +19 -0
  82. package/node_modules_lambda/escodegen/node_modules/estraverse/README.md +153 -0
  83. package/node_modules_lambda/escodegen/node_modules/estraverse/estraverse.js +805 -0
  84. package/node_modules_lambda/escodegen/node_modules/estraverse/gulpfile.js +70 -0
  85. package/node_modules_lambda/escodegen/node_modules/estraverse/package.json +40 -0
  86. package/node_modules_lambda/escodegen/node_modules/levn/LICENSE +22 -0
  87. package/node_modules_lambda/escodegen/node_modules/levn/README.md +196 -0
  88. package/node_modules_lambda/escodegen/node_modules/levn/lib/cast.js +298 -0
  89. package/node_modules_lambda/escodegen/node_modules/levn/lib/coerce.js +285 -0
  90. package/node_modules_lambda/escodegen/node_modules/levn/lib/index.js +22 -0
  91. package/node_modules_lambda/escodegen/node_modules/levn/lib/parse-string.js +113 -0
  92. package/node_modules_lambda/escodegen/node_modules/levn/lib/parse.js +102 -0
  93. package/node_modules_lambda/escodegen/node_modules/levn/package.json +47 -0
  94. package/node_modules_lambda/escodegen/node_modules/optionator/CHANGELOG.md +56 -0
  95. package/node_modules_lambda/escodegen/node_modules/optionator/LICENSE +22 -0
  96. package/node_modules_lambda/escodegen/node_modules/optionator/README.md +238 -0
  97. package/node_modules_lambda/escodegen/node_modules/optionator/lib/help.js +260 -0
  98. package/node_modules_lambda/escodegen/node_modules/optionator/lib/index.js +465 -0
  99. package/node_modules_lambda/escodegen/node_modules/optionator/lib/util.js +54 -0
  100. package/node_modules_lambda/escodegen/node_modules/optionator/package.json +44 -0
  101. package/node_modules_lambda/escodegen/node_modules/prelude-ls/CHANGELOG.md +99 -0
  102. package/node_modules_lambda/escodegen/node_modules/prelude-ls/LICENSE +22 -0
  103. package/node_modules_lambda/escodegen/node_modules/prelude-ls/README.md +15 -0
  104. package/node_modules_lambda/escodegen/node_modules/prelude-ls/lib/Func.js +65 -0
  105. package/node_modules_lambda/escodegen/node_modules/prelude-ls/lib/List.js +686 -0
  106. package/node_modules_lambda/escodegen/node_modules/prelude-ls/lib/Num.js +130 -0
  107. package/node_modules_lambda/escodegen/node_modules/prelude-ls/lib/Obj.js +154 -0
  108. package/node_modules_lambda/escodegen/node_modules/prelude-ls/lib/Str.js +92 -0
  109. package/node_modules_lambda/escodegen/node_modules/prelude-ls/lib/index.js +178 -0
  110. package/node_modules_lambda/escodegen/node_modules/prelude-ls/package.json +52 -0
  111. package/node_modules_lambda/escodegen/node_modules/source-map/CHANGELOG.md +301 -0
  112. package/node_modules_lambda/escodegen/node_modules/source-map/LICENSE +28 -0
  113. package/node_modules_lambda/escodegen/node_modules/source-map/README.md +742 -0
  114. package/node_modules_lambda/escodegen/node_modules/source-map/dist/source-map.debug.js +3234 -0
  115. package/node_modules_lambda/escodegen/node_modules/source-map/dist/source-map.js +3233 -0
  116. package/node_modules_lambda/escodegen/node_modules/source-map/dist/source-map.min.js +2 -0
  117. package/node_modules_lambda/escodegen/node_modules/source-map/dist/source-map.min.js.map +1 -0
  118. package/node_modules_lambda/escodegen/node_modules/source-map/lib/array-set.js +121 -0
  119. package/node_modules_lambda/escodegen/node_modules/source-map/lib/base64-vlq.js +140 -0
  120. package/node_modules_lambda/escodegen/node_modules/source-map/lib/base64.js +67 -0
  121. package/node_modules_lambda/escodegen/node_modules/source-map/lib/binary-search.js +111 -0
  122. package/node_modules_lambda/escodegen/node_modules/source-map/lib/mapping-list.js +79 -0
  123. package/node_modules_lambda/escodegen/node_modules/source-map/lib/quick-sort.js +114 -0
  124. package/node_modules_lambda/escodegen/node_modules/source-map/lib/source-map-consumer.js +1145 -0
  125. package/node_modules_lambda/escodegen/node_modules/source-map/lib/source-map-generator.js +425 -0
  126. package/node_modules_lambda/escodegen/node_modules/source-map/lib/source-node.js +413 -0
  127. package/node_modules_lambda/escodegen/node_modules/source-map/lib/util.js +488 -0
  128. package/node_modules_lambda/escodegen/node_modules/source-map/package.json +73 -0
  129. package/node_modules_lambda/escodegen/node_modules/source-map/source-map.d.ts +98 -0
  130. package/node_modules_lambda/escodegen/node_modules/source-map/source-map.js +8 -0
  131. package/node_modules_lambda/escodegen/node_modules/type-check/LICENSE +22 -0
  132. package/node_modules_lambda/escodegen/node_modules/type-check/README.md +210 -0
  133. package/node_modules_lambda/escodegen/node_modules/type-check/lib/check.js +126 -0
  134. package/node_modules_lambda/escodegen/node_modules/type-check/lib/index.js +16 -0
  135. package/node_modules_lambda/escodegen/node_modules/type-check/lib/parse-type.js +196 -0
  136. package/node_modules_lambda/escodegen/node_modules/type-check/package.json +40 -0
  137. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/.github/dependabot.yml +11 -0
  138. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/Changelog.md +212 -0
  139. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/LICENSE +21 -0
  140. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/README.md +130 -0
  141. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/encodings/dbcs-codec.js +597 -0
  142. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/encodings/dbcs-data.js +188 -0
  143. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/encodings/index.js +23 -0
  144. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/encodings/internal.js +198 -0
  145. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/encodings/sbcs-codec.js +72 -0
  146. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/encodings/sbcs-data-generated.js +451 -0
  147. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/encodings/sbcs-data.js +179 -0
  148. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/encodings/tables/big5-added.json +122 -0
  149. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/encodings/tables/cp936.json +264 -0
  150. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/encodings/tables/cp949.json +273 -0
  151. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/encodings/tables/cp950.json +177 -0
  152. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/encodings/tables/eucjp.json +182 -0
  153. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json +1 -0
  154. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/encodings/tables/gbk-added.json +56 -0
  155. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/encodings/tables/shiftjis.json +125 -0
  156. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/encodings/utf16.js +197 -0
  157. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/encodings/utf32.js +319 -0
  158. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/encodings/utf7.js +290 -0
  159. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/lib/bom-handling.js +52 -0
  160. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/lib/index.d.ts +41 -0
  161. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/lib/index.js +180 -0
  162. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/lib/streams.js +109 -0
  163. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/package.json +44 -0
  164. package/package.json +1 -1
@@ -0,0 +1,142 @@
1
+ "use strict";
2
+ const { isASCIIHex } = require("./infra");
3
+ const { utf8Encode } = require("./encoding");
4
+
5
+ function p(char) {
6
+ return char.codePointAt(0);
7
+ }
8
+
9
+ // https://url.spec.whatwg.org/#percent-encode
10
+ function percentEncode(c) {
11
+ let hex = c.toString(16).toUpperCase();
12
+ if (hex.length === 1) {
13
+ hex = `0${hex}`;
14
+ }
15
+
16
+ return `%${hex}`;
17
+ }
18
+
19
+ // https://url.spec.whatwg.org/#percent-decode
20
+ function percentDecodeBytes(input) {
21
+ const output = new Uint8Array(input.byteLength);
22
+ let outputIndex = 0;
23
+ for (let i = 0; i < input.byteLength; ++i) {
24
+ const byte = input[i];
25
+ if (byte !== 0x25) {
26
+ output[outputIndex++] = byte;
27
+ } else if (byte === 0x25 && (!isASCIIHex(input[i + 1]) || !isASCIIHex(input[i + 2]))) {
28
+ output[outputIndex++] = byte;
29
+ } else {
30
+ const bytePoint = parseInt(String.fromCodePoint(input[i + 1], input[i + 2]), 16);
31
+ output[outputIndex++] = bytePoint;
32
+ i += 2;
33
+ }
34
+ }
35
+
36
+ return output.slice(0, outputIndex);
37
+ }
38
+
39
+ // https://url.spec.whatwg.org/#string-percent-decode
40
+ function percentDecodeString(input) {
41
+ const bytes = utf8Encode(input);
42
+ return percentDecodeBytes(bytes);
43
+ }
44
+
45
+ // https://url.spec.whatwg.org/#c0-control-percent-encode-set
46
+ function isC0ControlPercentEncode(c) {
47
+ return c <= 0x1F || c > 0x7E;
48
+ }
49
+
50
+ // https://url.spec.whatwg.org/#fragment-percent-encode-set
51
+ const extraFragmentPercentEncodeSet = new Set([p(" "), p("\""), p("<"), p(">"), p("`")]);
52
+ function isFragmentPercentEncode(c) {
53
+ return isC0ControlPercentEncode(c) || extraFragmentPercentEncodeSet.has(c);
54
+ }
55
+
56
+ // https://url.spec.whatwg.org/#query-percent-encode-set
57
+ const extraQueryPercentEncodeSet = new Set([p(" "), p("\""), p("#"), p("<"), p(">")]);
58
+ function isQueryPercentEncode(c) {
59
+ return isC0ControlPercentEncode(c) || extraQueryPercentEncodeSet.has(c);
60
+ }
61
+
62
+ // https://url.spec.whatwg.org/#special-query-percent-encode-set
63
+ function isSpecialQueryPercentEncode(c) {
64
+ return isQueryPercentEncode(c) || c === p("'");
65
+ }
66
+
67
+ // https://url.spec.whatwg.org/#path-percent-encode-set
68
+ const extraPathPercentEncodeSet = new Set([p("?"), p("`"), p("{"), p("}")]);
69
+ function isPathPercentEncode(c) {
70
+ return isQueryPercentEncode(c) || extraPathPercentEncodeSet.has(c);
71
+ }
72
+
73
+ // https://url.spec.whatwg.org/#userinfo-percent-encode-set
74
+ const extraUserinfoPercentEncodeSet =
75
+ new Set([p("/"), p(":"), p(";"), p("="), p("@"), p("["), p("\\"), p("]"), p("^"), p("|")]);
76
+ function isUserinfoPercentEncode(c) {
77
+ return isPathPercentEncode(c) || extraUserinfoPercentEncodeSet.has(c);
78
+ }
79
+
80
+ // https://url.spec.whatwg.org/#component-percent-encode-set
81
+ const extraComponentPercentEncodeSet = new Set([p("$"), p("%"), p("&"), p("+"), p(",")]);
82
+ function isComponentPercentEncode(c) {
83
+ return isUserinfoPercentEncode(c) || extraComponentPercentEncodeSet.has(c);
84
+ }
85
+
86
+ // https://url.spec.whatwg.org/#application-x-www-form-urlencoded-percent-encode-set
87
+ const extraURLEncodedPercentEncodeSet = new Set([p("!"), p("'"), p("("), p(")"), p("~")]);
88
+ function isURLEncodedPercentEncode(c) {
89
+ return isComponentPercentEncode(c) || extraURLEncodedPercentEncodeSet.has(c);
90
+ }
91
+
92
+ // https://url.spec.whatwg.org/#code-point-percent-encode-after-encoding
93
+ // https://url.spec.whatwg.org/#utf-8-percent-encode
94
+ // Assuming encoding is always utf-8 allows us to trim one of the logic branches. TODO: support encoding.
95
+ // The "-Internal" variant here has code points as JS strings. The external version used by other files has code points
96
+ // as JS numbers, like the rest of the codebase.
97
+ function utf8PercentEncodeCodePointInternal(codePoint, percentEncodePredicate) {
98
+ const bytes = utf8Encode(codePoint);
99
+ let output = "";
100
+ for (const byte of bytes) {
101
+ // Our percentEncodePredicate operates on bytes, not code points, so this is slightly different from the spec.
102
+ if (!percentEncodePredicate(byte)) {
103
+ output += String.fromCharCode(byte);
104
+ } else {
105
+ output += percentEncode(byte);
106
+ }
107
+ }
108
+
109
+ return output;
110
+ }
111
+
112
+ function utf8PercentEncodeCodePoint(codePoint, percentEncodePredicate) {
113
+ return utf8PercentEncodeCodePointInternal(String.fromCodePoint(codePoint), percentEncodePredicate);
114
+ }
115
+
116
+ // https://url.spec.whatwg.org/#string-percent-encode-after-encoding
117
+ // https://url.spec.whatwg.org/#string-utf-8-percent-encode
118
+ function utf8PercentEncodeString(input, percentEncodePredicate, spaceAsPlus = false) {
119
+ let output = "";
120
+ for (const codePoint of input) {
121
+ if (spaceAsPlus && codePoint === " ") {
122
+ output += "+";
123
+ } else {
124
+ output += utf8PercentEncodeCodePointInternal(codePoint, percentEncodePredicate);
125
+ }
126
+ }
127
+ return output;
128
+ }
129
+
130
+ module.exports = {
131
+ isC0ControlPercentEncode,
132
+ isFragmentPercentEncode,
133
+ isQueryPercentEncode,
134
+ isSpecialQueryPercentEncode,
135
+ isPathPercentEncode,
136
+ isUserinfoPercentEncode,
137
+ isURLEncodedPercentEncode,
138
+ percentDecodeString,
139
+ percentDecodeBytes,
140
+ utf8PercentEncodeString,
141
+ utf8PercentEncodeCodePoint
142
+ };