@redocly/theme 0.1.28 → 0.1.31
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.
- package/CopyButton/CopyButtonWrapper.js +1 -1
- package/JsonViewer/JsonViewer.js +1 -1
- package/PageNavigation/NextPageLink.js +3 -3
- package/PageNavigation/PageNavigation.d.ts +1 -1
- package/PageNavigation/PageNavigation.js +7 -1
- package/PageNavigation/PreviousPageLink.js +3 -3
- package/Profile/Profile.d.ts +8 -0
- package/Profile/Profile.js +60 -0
- package/Profile/index.d.ts +2 -0
- package/Profile/index.js +5 -0
- package/TableOfContent/TableOfContent.js +9 -1
- package/Tooltip/Tooltip.d.ts +5 -4
- package/Tooltip/Tooltip.js +43 -21
- package/hooks/__tests__/mocks/MockIntersectionObserver.d.ts +15 -0
- package/hooks/__tests__/mocks/MockIntersectionObserver.js +39 -0
- package/hooks/useActiveHeading.d.ts +1 -1
- package/hooks/useActiveHeading.js +69 -20
- package/index.d.ts +1 -0
- package/index.js +1 -0
- package/mocks/hooks/index.d.ts +3 -3
- package/mocks/hooks/index.js +5 -8
- package/package.json +1 -1
- package/settings.yaml +4 -0
- package/src/CopyButton/CopyButtonWrapper.tsx +1 -1
- package/src/JsonViewer/JsonViewer.tsx +19 -17
- package/src/PageNavigation/NextPageLink.tsx +1 -1
- package/src/PageNavigation/PageNavigation.tsx +10 -2
- package/src/PageNavigation/PreviousPageLink.tsx +2 -2
- package/src/Profile/Profile.tsx +91 -0
- package/src/Profile/index.ts +2 -0
- package/src/TableOfContent/TableOfContent.tsx +11 -1
- package/src/Tooltip/Tooltip.tsx +87 -63
- package/src/hooks/useActiveHeading.ts +92 -28
- package/src/index.ts +1 -0
- package/src/mocks/hooks/index.ts +6 -9
- package/src/utils/color.ts +9 -0
- package/src/utils/index.ts +1 -0
- package/src/utils/theme-helpers.ts +3 -1
- package/utils/color.d.ts +2 -0
- package/utils/color.js +12 -0
- package/utils/index.d.ts +1 -0
- package/utils/index.js +1 -0
- package/utils/theme-helpers.js +3 -1
package/utils/color.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getRandomColor = exports.getRandomNumber = void 0;
|
|
4
|
+
var getRandomNumber = function (limit) { return Math.floor(Math.random() * limit); };
|
|
5
|
+
exports.getRandomNumber = getRandomNumber;
|
|
6
|
+
function getRandomColor() {
|
|
7
|
+
var h = (0, exports.getRandomNumber)(360);
|
|
8
|
+
var s = (0, exports.getRandomNumber)(100);
|
|
9
|
+
var l = (0, exports.getRandomNumber)(100);
|
|
10
|
+
return "hsl(".concat(h, "deg, ").concat(s, "%, ").concat(l, "%)");
|
|
11
|
+
}
|
|
12
|
+
exports.getRandomColor = getRandomColor;
|
package/utils/index.d.ts
CHANGED
package/utils/index.js
CHANGED
package/utils/theme-helpers.js
CHANGED
|
@@ -40,7 +40,7 @@ var Token;
|
|
|
40
40
|
Token["Doctype"] = "doctype";
|
|
41
41
|
Token["Cdata"] = "cdata";
|
|
42
42
|
Token["Punctuation"] = "punctuation";
|
|
43
|
-
Token["
|
|
43
|
+
Token["Property"] = "property";
|
|
44
44
|
Token["Tag"] = "tag";
|
|
45
45
|
Token["Number"] = "number";
|
|
46
46
|
Token["Constant"] = "constant";
|
|
@@ -56,6 +56,8 @@ var Token;
|
|
|
56
56
|
Token["Url"] = "url";
|
|
57
57
|
Token["Variable"] = "variable";
|
|
58
58
|
Token["Atrule"] = "atrule";
|
|
59
|
+
Token["AttrValue"] = "attr-value";
|
|
60
|
+
Token["AttrName"] = "attr-name";
|
|
59
61
|
Token["Keyword"] = "keyword";
|
|
60
62
|
Token["Regex"] = "regex";
|
|
61
63
|
Token["Important"] = "important";
|