@limetech/lime-elements 37.14.1 → 37.15.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.
@@ -0,0 +1,2 @@
1
+ export declare const allowedCssProperties: string[];
2
+ //# sourceMappingURL=allowed-css-properties.d.ts.map
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Checks a node for a `style` attribute and, if found, sanitizes it.
3
+ *
4
+ * @param node - node to check
5
+ */
6
+ export declare function sanitizeStyle(node: any): void;
7
+ /**
8
+ * Applies a whitelist to the CSS properties in the input string.
9
+ * Any CSS properties not in the whitelist will be removed.
10
+ *
11
+ * @param styleValue - a string with CSS properties and values
12
+ * @returns a sanitized version of the input string
13
+ */
14
+ export declare function sanitizeStyleValue(styleValue: string): string;
15
+ /**
16
+ * Returns a copy of the input object with the `background` property removed.
17
+ * If the `background` property's value was a valid CSS color value, the
18
+ * returned object will have a `background-color` property with the same value.
19
+ *
20
+ * @param css - an object with CSS properties as keys and CSS values as values
21
+ * @returns a modified copy of the input object
22
+ */
23
+ export declare function normalizeBackgroundColor(css: Record<string, string>): {
24
+ [x: string]: string;
25
+ };
26
+ /**
27
+ * Check if a value is a valid CSS color value.
28
+ * Note that this function is not 100% comprehensive. It does not support
29
+ * `currentColor` or `inherit`. It also does not support `var(--variable)` or
30
+ * `rgb(var(--variable))`, for example.
31
+ *
32
+ * @param value - a string to check
33
+ * @returns `true` if the value is a valid CSS color value, `false` otherwise
34
+ */
35
+ export declare function isValidCssColorValue(value: string): boolean;
36
+ //# sourceMappingURL=sanitize-style.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@limetech/lime-elements",
3
- "version": "37.14.1",
3
+ "version": "37.15.0",
4
4
  "description": "Lime Elements",
5
5
  "author": "Lime Technologies",
6
6
  "license": "Apache-2.0",
@@ -81,6 +81,7 @@
81
81
  "material-components-web": "^13.0.0",
82
82
  "moment": "^2.30.1",
83
83
  "number-abbreviate": "^2.0.0",
84
+ "parse-css-color": "^0.2.1",
84
85
  "prettier": "^3.2.5",
85
86
  "puppeteer": "^19.11.1",
86
87
  "react": "^18.2.0",
@@ -96,9 +97,11 @@
96
97
  "replace-in-file": "^7.1.0",
97
98
  "shelljs": "0.8.5",
98
99
  "shx": "^0.3.3",
100
+ "style-to-object": "^1.0.6",
99
101
  "tabulator-tables": "^4.9.3",
100
102
  "typescript": "^4.9.5",
101
- "unified": "^11.0.4"
103
+ "unified": "^11.0.4",
104
+ "unist-util-visit": "^5.0.0"
102
105
  },
103
106
  "keywords": [
104
107
  "lime elements",