@zipify/wysiwyg 1.1.1 → 1.2.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 (176) hide show
  1. package/.github/actions/lint-css/action.yaml +1 -3
  2. package/.release-it.json +2 -1
  3. package/dist/cli.js +3 -3
  4. package/dist/wysiwyg.css +24 -25
  5. package/dist/wysiwyg.mjs +641 -618
  6. package/jest.config.js +3 -0
  7. package/lib/components/base/Modal.vue +21 -2
  8. package/lib/components/base/__tests__/Modal.test.js +1 -0
  9. package/lib/components/toolbar/controls/link/LinkControl.vue +22 -10
  10. package/lib/components/toolbar/controls/link/LinkControlHeader.vue +3 -3
  11. package/lib/components/toolbar/controls/link/__tests__/LinkControl.test.js +8 -8
  12. package/lib/components/toolbar/controls/link/__tests__/LinkControlHeader.test.js +1 -1
  13. package/lib/components/toolbar/controls/link/composables/useLink.js +10 -6
  14. package/lib/composables/__tests__/__snapshots__/useEditor.test.js.snap +1 -1
  15. package/lib/composables/useEditor.js +4 -3
  16. package/lib/enums/TextSettings.js +2 -0
  17. package/lib/extensions/FontStyle.js +2 -2
  18. package/lib/extensions/FontWeight.js +2 -0
  19. package/lib/extensions/Link.js +13 -15
  20. package/lib/extensions/StylePreset.js +33 -3
  21. package/lib/extensions/TextDecoration.js +6 -12
  22. package/lib/extensions/__tests__/FontFamily.test.js +7 -6
  23. package/lib/extensions/__tests__/FontWeight.test.js +19 -10
  24. package/lib/extensions/__tests__/StylePreset.test.js +52 -2
  25. package/lib/extensions/__tests__/TextDecoration.test.js +11 -40
  26. package/lib/extensions/__tests__/__snapshots__/Alignment.test.js.snap +2 -2
  27. package/lib/extensions/__tests__/__snapshots__/BackgroundColor.test.js.snap +1 -1
  28. package/lib/extensions/__tests__/__snapshots__/FontColor.test.js.snap +1 -1
  29. package/lib/extensions/__tests__/__snapshots__/FontFamily.test.js.snap +19 -1
  30. package/lib/extensions/__tests__/__snapshots__/FontSize.test.js.snap +2 -2
  31. package/lib/extensions/__tests__/__snapshots__/FontStyle.test.js.snap +17 -1
  32. package/lib/extensions/__tests__/__snapshots__/FontWeight.test.js.snap +26 -1
  33. package/lib/extensions/__tests__/__snapshots__/LineHeight.test.js.snap +2 -2
  34. package/lib/extensions/__tests__/__snapshots__/Margin.test.js.snap +2 -2
  35. package/lib/extensions/__tests__/__snapshots__/StylePreset.test.js.snap +22 -2
  36. package/lib/extensions/__tests__/__snapshots__/TextDecoration.test.js.snap +3 -46
  37. package/package.json +22 -22
  38. package/lib/components/toolbar/controls/link/LinkControlApply.vue +0 -35
  39. package/node_modules_lambda/acorn-globals/node_modules/.bin/acorn +0 -4
  40. package/node_modules_lambda/acorn-globals/node_modules/acorn/CHANGELOG.md +0 -620
  41. package/node_modules_lambda/acorn-globals/node_modules/acorn/LICENSE +0 -21
  42. package/node_modules_lambda/acorn-globals/node_modules/acorn/README.md +0 -269
  43. package/node_modules_lambda/acorn-globals/node_modules/acorn/bin/acorn +0 -4
  44. package/node_modules_lambda/acorn-globals/node_modules/acorn/dist/acorn.d.ts +0 -209
  45. package/node_modules_lambda/acorn-globals/node_modules/acorn/dist/acorn.js +0 -5186
  46. package/node_modules_lambda/acorn-globals/node_modules/acorn/dist/acorn.js.map +0 -1
  47. package/node_modules_lambda/acorn-globals/node_modules/acorn/dist/acorn.mjs +0 -5155
  48. package/node_modules_lambda/acorn-globals/node_modules/acorn/dist/acorn.mjs.d.ts +0 -2
  49. package/node_modules_lambda/acorn-globals/node_modules/acorn/dist/acorn.mjs.map +0 -1
  50. package/node_modules_lambda/acorn-globals/node_modules/acorn/dist/bin.js +0 -64
  51. package/node_modules_lambda/acorn-globals/node_modules/acorn/package.json +0 -35
  52. package/node_modules_lambda/cssstyle/node_modules/cssom/LICENSE.txt +0 -20
  53. package/node_modules_lambda/cssstyle/node_modules/cssom/README.mdown +0 -67
  54. package/node_modules_lambda/cssstyle/node_modules/cssom/lib/CSSDocumentRule.js +0 -39
  55. package/node_modules_lambda/cssstyle/node_modules/cssom/lib/CSSFontFaceRule.js +0 -36
  56. package/node_modules_lambda/cssstyle/node_modules/cssom/lib/CSSHostRule.js +0 -37
  57. package/node_modules_lambda/cssstyle/node_modules/cssom/lib/CSSImportRule.js +0 -132
  58. package/node_modules_lambda/cssstyle/node_modules/cssom/lib/CSSKeyframeRule.js +0 -37
  59. package/node_modules_lambda/cssstyle/node_modules/cssom/lib/CSSKeyframesRule.js +0 -39
  60. package/node_modules_lambda/cssstyle/node_modules/cssom/lib/CSSMediaRule.js +0 -41
  61. package/node_modules_lambda/cssstyle/node_modules/cssom/lib/CSSOM.js +0 -3
  62. package/node_modules_lambda/cssstyle/node_modules/cssom/lib/CSSRule.js +0 -43
  63. package/node_modules_lambda/cssstyle/node_modules/cssom/lib/CSSStyleDeclaration.js +0 -148
  64. package/node_modules_lambda/cssstyle/node_modules/cssom/lib/CSSStyleRule.js +0 -190
  65. package/node_modules_lambda/cssstyle/node_modules/cssom/lib/CSSStyleSheet.js +0 -88
  66. package/node_modules_lambda/cssstyle/node_modules/cssom/lib/CSSSupportsRule.js +0 -36
  67. package/node_modules_lambda/cssstyle/node_modules/cssom/lib/CSSValue.js +0 -43
  68. package/node_modules_lambda/cssstyle/node_modules/cssom/lib/CSSValueExpression.js +0 -344
  69. package/node_modules_lambda/cssstyle/node_modules/cssom/lib/MatcherList.js +0 -62
  70. package/node_modules_lambda/cssstyle/node_modules/cssom/lib/MediaList.js +0 -61
  71. package/node_modules_lambda/cssstyle/node_modules/cssom/lib/StyleSheet.js +0 -17
  72. package/node_modules_lambda/cssstyle/node_modules/cssom/lib/clone.js +0 -82
  73. package/node_modules_lambda/cssstyle/node_modules/cssom/lib/index.js +0 -21
  74. package/node_modules_lambda/cssstyle/node_modules/cssom/lib/parse.js +0 -464
  75. package/node_modules_lambda/cssstyle/node_modules/cssom/package.json +0 -18
  76. package/node_modules_lambda/data-urls/node_modules/whatwg-url/LICENSE.txt +0 -21
  77. package/node_modules_lambda/data-urls/node_modules/whatwg-url/README.md +0 -106
  78. package/node_modules_lambda/data-urls/node_modules/whatwg-url/index.js +0 -27
  79. package/node_modules_lambda/data-urls/node_modules/whatwg-url/lib/Function.js +0 -42
  80. package/node_modules_lambda/data-urls/node_modules/whatwg-url/lib/URL-impl.js +0 -209
  81. package/node_modules_lambda/data-urls/node_modules/whatwg-url/lib/URL.js +0 -442
  82. package/node_modules_lambda/data-urls/node_modules/whatwg-url/lib/URLSearchParams-impl.js +0 -130
  83. package/node_modules_lambda/data-urls/node_modules/whatwg-url/lib/URLSearchParams.js +0 -472
  84. package/node_modules_lambda/data-urls/node_modules/whatwg-url/lib/VoidFunction.js +0 -26
  85. package/node_modules_lambda/data-urls/node_modules/whatwg-url/lib/encoding.js +0 -16
  86. package/node_modules_lambda/data-urls/node_modules/whatwg-url/lib/infra.js +0 -26
  87. package/node_modules_lambda/data-urls/node_modules/whatwg-url/lib/percent-encoding.js +0 -142
  88. package/node_modules_lambda/data-urls/node_modules/whatwg-url/lib/url-state-machine.js +0 -1244
  89. package/node_modules_lambda/data-urls/node_modules/whatwg-url/lib/urlencoded.js +0 -106
  90. package/node_modules_lambda/data-urls/node_modules/whatwg-url/lib/utils.js +0 -190
  91. package/node_modules_lambda/data-urls/node_modules/whatwg-url/package.json +0 -58
  92. package/node_modules_lambda/data-urls/node_modules/whatwg-url/webidl2js-wrapper.js +0 -7
  93. package/node_modules_lambda/escodegen/node_modules/estraverse/.jshintrc +0 -16
  94. package/node_modules_lambda/escodegen/node_modules/estraverse/LICENSE.BSD +0 -19
  95. package/node_modules_lambda/escodegen/node_modules/estraverse/README.md +0 -153
  96. package/node_modules_lambda/escodegen/node_modules/estraverse/estraverse.js +0 -805
  97. package/node_modules_lambda/escodegen/node_modules/estraverse/gulpfile.js +0 -70
  98. package/node_modules_lambda/escodegen/node_modules/estraverse/package.json +0 -40
  99. package/node_modules_lambda/escodegen/node_modules/levn/LICENSE +0 -22
  100. package/node_modules_lambda/escodegen/node_modules/levn/README.md +0 -196
  101. package/node_modules_lambda/escodegen/node_modules/levn/lib/cast.js +0 -298
  102. package/node_modules_lambda/escodegen/node_modules/levn/lib/coerce.js +0 -285
  103. package/node_modules_lambda/escodegen/node_modules/levn/lib/index.js +0 -22
  104. package/node_modules_lambda/escodegen/node_modules/levn/lib/parse-string.js +0 -113
  105. package/node_modules_lambda/escodegen/node_modules/levn/lib/parse.js +0 -102
  106. package/node_modules_lambda/escodegen/node_modules/levn/package.json +0 -47
  107. package/node_modules_lambda/escodegen/node_modules/optionator/CHANGELOG.md +0 -56
  108. package/node_modules_lambda/escodegen/node_modules/optionator/LICENSE +0 -22
  109. package/node_modules_lambda/escodegen/node_modules/optionator/README.md +0 -238
  110. package/node_modules_lambda/escodegen/node_modules/optionator/lib/help.js +0 -260
  111. package/node_modules_lambda/escodegen/node_modules/optionator/lib/index.js +0 -465
  112. package/node_modules_lambda/escodegen/node_modules/optionator/lib/util.js +0 -54
  113. package/node_modules_lambda/escodegen/node_modules/optionator/package.json +0 -44
  114. package/node_modules_lambda/escodegen/node_modules/prelude-ls/CHANGELOG.md +0 -99
  115. package/node_modules_lambda/escodegen/node_modules/prelude-ls/LICENSE +0 -22
  116. package/node_modules_lambda/escodegen/node_modules/prelude-ls/README.md +0 -15
  117. package/node_modules_lambda/escodegen/node_modules/prelude-ls/lib/Func.js +0 -65
  118. package/node_modules_lambda/escodegen/node_modules/prelude-ls/lib/List.js +0 -686
  119. package/node_modules_lambda/escodegen/node_modules/prelude-ls/lib/Num.js +0 -130
  120. package/node_modules_lambda/escodegen/node_modules/prelude-ls/lib/Obj.js +0 -154
  121. package/node_modules_lambda/escodegen/node_modules/prelude-ls/lib/Str.js +0 -92
  122. package/node_modules_lambda/escodegen/node_modules/prelude-ls/lib/index.js +0 -178
  123. package/node_modules_lambda/escodegen/node_modules/prelude-ls/package.json +0 -52
  124. package/node_modules_lambda/escodegen/node_modules/source-map/CHANGELOG.md +0 -301
  125. package/node_modules_lambda/escodegen/node_modules/source-map/LICENSE +0 -28
  126. package/node_modules_lambda/escodegen/node_modules/source-map/README.md +0 -742
  127. package/node_modules_lambda/escodegen/node_modules/source-map/dist/source-map.debug.js +0 -3234
  128. package/node_modules_lambda/escodegen/node_modules/source-map/dist/source-map.js +0 -3233
  129. package/node_modules_lambda/escodegen/node_modules/source-map/dist/source-map.min.js +0 -2
  130. package/node_modules_lambda/escodegen/node_modules/source-map/dist/source-map.min.js.map +0 -1
  131. package/node_modules_lambda/escodegen/node_modules/source-map/lib/array-set.js +0 -121
  132. package/node_modules_lambda/escodegen/node_modules/source-map/lib/base64-vlq.js +0 -140
  133. package/node_modules_lambda/escodegen/node_modules/source-map/lib/base64.js +0 -67
  134. package/node_modules_lambda/escodegen/node_modules/source-map/lib/binary-search.js +0 -111
  135. package/node_modules_lambda/escodegen/node_modules/source-map/lib/mapping-list.js +0 -79
  136. package/node_modules_lambda/escodegen/node_modules/source-map/lib/quick-sort.js +0 -114
  137. package/node_modules_lambda/escodegen/node_modules/source-map/lib/source-map-consumer.js +0 -1145
  138. package/node_modules_lambda/escodegen/node_modules/source-map/lib/source-map-generator.js +0 -425
  139. package/node_modules_lambda/escodegen/node_modules/source-map/lib/source-node.js +0 -413
  140. package/node_modules_lambda/escodegen/node_modules/source-map/lib/util.js +0 -488
  141. package/node_modules_lambda/escodegen/node_modules/source-map/package.json +0 -73
  142. package/node_modules_lambda/escodegen/node_modules/source-map/source-map.d.ts +0 -98
  143. package/node_modules_lambda/escodegen/node_modules/source-map/source-map.js +0 -8
  144. package/node_modules_lambda/escodegen/node_modules/type-check/LICENSE +0 -22
  145. package/node_modules_lambda/escodegen/node_modules/type-check/README.md +0 -210
  146. package/node_modules_lambda/escodegen/node_modules/type-check/lib/check.js +0 -126
  147. package/node_modules_lambda/escodegen/node_modules/type-check/lib/index.js +0 -16
  148. package/node_modules_lambda/escodegen/node_modules/type-check/lib/parse-type.js +0 -196
  149. package/node_modules_lambda/escodegen/node_modules/type-check/package.json +0 -40
  150. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/.github/dependabot.yml +0 -11
  151. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/Changelog.md +0 -212
  152. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/LICENSE +0 -21
  153. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/README.md +0 -130
  154. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/encodings/dbcs-codec.js +0 -597
  155. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/encodings/dbcs-data.js +0 -188
  156. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/encodings/index.js +0 -23
  157. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/encodings/internal.js +0 -198
  158. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/encodings/sbcs-codec.js +0 -72
  159. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/encodings/sbcs-data-generated.js +0 -451
  160. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/encodings/sbcs-data.js +0 -179
  161. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/encodings/tables/big5-added.json +0 -122
  162. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/encodings/tables/cp936.json +0 -264
  163. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/encodings/tables/cp949.json +0 -273
  164. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/encodings/tables/cp950.json +0 -177
  165. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/encodings/tables/eucjp.json +0 -182
  166. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json +0 -1
  167. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/encodings/tables/gbk-added.json +0 -56
  168. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/encodings/tables/shiftjis.json +0 -125
  169. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/encodings/utf16.js +0 -197
  170. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/encodings/utf32.js +0 -319
  171. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/encodings/utf7.js +0 -290
  172. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/lib/bom-handling.js +0 -52
  173. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/lib/index.d.ts +0 -41
  174. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/lib/index.js +0 -180
  175. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/lib/streams.js +0 -109
  176. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/package.json +0 -44
@@ -1,142 +0,0 @@
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
- };