@homotechsual/docusaurus-plugin-showcase 0.1.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.
Files changed (105) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/LICENSE +13 -0
  3. package/README.md +93 -0
  4. package/lib/core/module-generator.d.ts +3 -0
  5. package/lib/core/module-generator.d.ts.map +1 -0
  6. package/lib/core/module-generator.js +14 -0
  7. package/lib/core/module-generator.js.map +1 -0
  8. package/lib/core/types.d.ts +43 -0
  9. package/lib/core/types.d.ts.map +1 -0
  10. package/lib/core/types.js +2 -0
  11. package/lib/core/types.js.map +1 -0
  12. package/lib/core/utils.d.ts +3 -0
  13. package/lib/core/utils.d.ts.map +1 -0
  14. package/lib/core/utils.js +22 -0
  15. package/lib/core/utils.js.map +1 -0
  16. package/lib/icons/CircleCheck.d.ts +7 -0
  17. package/lib/icons/CircleCheck.d.ts.map +1 -0
  18. package/lib/icons/CircleCheck.js +5 -0
  19. package/lib/icons/CircleCheck.js.map +1 -0
  20. package/lib/icons/CircleMinus.d.ts +7 -0
  21. package/lib/icons/CircleMinus.d.ts.map +1 -0
  22. package/lib/icons/CircleMinus.js +5 -0
  23. package/lib/icons/CircleMinus.js.map +1 -0
  24. package/lib/icons/CircleX.d.ts +7 -0
  25. package/lib/icons/CircleX.d.ts.map +1 -0
  26. package/lib/icons/CircleX.js +5 -0
  27. package/lib/icons/CircleX.js.map +1 -0
  28. package/lib/icons/Docusaurus.d.ts +7 -0
  29. package/lib/icons/Docusaurus.d.ts.map +1 -0
  30. package/lib/icons/Docusaurus.js +5 -0
  31. package/lib/icons/Docusaurus.js.map +1 -0
  32. package/lib/icons/Heart.d.ts +7 -0
  33. package/lib/icons/Heart.d.ts.map +1 -0
  34. package/lib/icons/Heart.js +5 -0
  35. package/lib/icons/Heart.js.map +1 -0
  36. package/lib/icons/PlusSquare.d.ts +7 -0
  37. package/lib/icons/PlusSquare.d.ts.map +1 -0
  38. package/lib/icons/PlusSquare.js +5 -0
  39. package/lib/icons/PlusSquare.js.map +1 -0
  40. package/lib/index.d.ts +3 -0
  41. package/lib/index.d.ts.map +1 -0
  42. package/lib/index.js +2 -0
  43. package/lib/index.js.map +1 -0
  44. package/lib/loaders/yaml.d.ts +7 -0
  45. package/lib/loaders/yaml.d.ts.map +1 -0
  46. package/lib/loaders/yaml.js +73 -0
  47. package/lib/loaders/yaml.js.map +1 -0
  48. package/lib/plugin.d.ts +6 -0
  49. package/lib/plugin.d.ts.map +1 -0
  50. package/lib/plugin.js +45 -0
  51. package/lib/plugin.js.map +1 -0
  52. package/lib/presets/index.d.ts +3 -0
  53. package/lib/presets/index.d.ts.map +1 -0
  54. package/lib/presets/index.js +3 -0
  55. package/lib/presets/index.js.map +1 -0
  56. package/lib/presets/plugins.d.ts +3 -0
  57. package/lib/presets/plugins.d.ts.map +1 -0
  58. package/lib/presets/plugins.js +93 -0
  59. package/lib/presets/plugins.js.map +1 -0
  60. package/lib/presets/sites.d.ts +3 -0
  61. package/lib/presets/sites.d.ts.map +1 -0
  62. package/lib/presets/sites.js +63 -0
  63. package/lib/presets/sites.js.map +1 -0
  64. package/lib/theme/ShowcaseCard/index.d.ts +9 -0
  65. package/lib/theme/ShowcaseCard/index.d.ts.map +1 -0
  66. package/lib/theme/ShowcaseCard/index.js +29 -0
  67. package/lib/theme/ShowcaseCard/index.js.map +1 -0
  68. package/lib/theme/ShowcaseCard/styles.module.css +118 -0
  69. package/lib/theme/ShowcaseFilterToggle/index.d.ts +5 -0
  70. package/lib/theme/ShowcaseFilterToggle/index.d.ts.map +1 -0
  71. package/lib/theme/ShowcaseFilterToggle/index.js +24 -0
  72. package/lib/theme/ShowcaseFilterToggle/index.js.map +1 -0
  73. package/lib/theme/ShowcaseFilterToggle/styles.module.css +62 -0
  74. package/lib/theme/ShowcaseFilters/index.d.ts +13 -0
  75. package/lib/theme/ShowcaseFilters/index.d.ts.map +1 -0
  76. package/lib/theme/ShowcaseFilters/index.js +86 -0
  77. package/lib/theme/ShowcaseFilters/index.js.map +1 -0
  78. package/lib/theme/ShowcaseFilters/styles.module.css +62 -0
  79. package/lib/theme/ShowcasePage/index.d.ts +8 -0
  80. package/lib/theme/ShowcasePage/index.d.ts.map +1 -0
  81. package/lib/theme/ShowcasePage/index.js +30 -0
  82. package/lib/theme/ShowcasePage/index.js.map +1 -0
  83. package/lib/theme/ShowcasePage/styles.module.css +38 -0
  84. package/lib/theme/ShowcaseStatusSelect/index.d.ts +11 -0
  85. package/lib/theme/ShowcaseStatusSelect/index.d.ts.map +1 -0
  86. package/lib/theme/ShowcaseStatusSelect/index.js +23 -0
  87. package/lib/theme/ShowcaseStatusSelect/index.js.map +1 -0
  88. package/lib/theme/ShowcaseStatusSelect/styles.module.css +44 -0
  89. package/lib/theme/ShowcaseTagSelect/index.d.ts +11 -0
  90. package/lib/theme/ShowcaseTagSelect/index.d.ts.map +1 -0
  91. package/lib/theme/ShowcaseTagSelect/index.js +23 -0
  92. package/lib/theme/ShowcaseTagSelect/index.js.map +1 -0
  93. package/lib/theme/ShowcaseTagSelect/styles.module.css +44 -0
  94. package/lib/theme/ShowcaseTooltip/index.d.ts +10 -0
  95. package/lib/theme/ShowcaseTooltip/index.d.ts.map +1 -0
  96. package/lib/theme/ShowcaseTooltip/index.js +23 -0
  97. package/lib/theme/ShowcaseTooltip/index.js.map +1 -0
  98. package/lib/theme/icons.d.ts +9 -0
  99. package/lib/theme/icons.d.ts.map +1 -0
  100. package/lib/theme/icons.js +20 -0
  101. package/lib/theme/icons.js.map +1 -0
  102. package/package.json +91 -0
  103. package/schema/plugins-preset/1.0.0.json +43 -0
  104. package/schema/showcase/1.0.0.json +58 -0
  105. package/schema/sites-preset/1.0.0.json +42 -0
@@ -0,0 +1,30 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import React, { useState, useMemo } from 'react';
3
+ import clsx from 'clsx';
4
+ import Layout from '@theme/Layout';
5
+ import Link from '@docusaurus/Link';
6
+ import Translate, { translate } from '@docusaurus/Translate';
7
+ import { sortBy } from '../../core/utils.js';
8
+ import ShowcaseFilters from '../ShowcaseFilters/index.js';
9
+ import ShowcaseCard from '../ShowcaseCard/index.js';
10
+ import { getIcon } from '../icons.js';
11
+ import styles from './styles.module.css';
12
+ export default function ShowcasePage({ showcase }) {
13
+ const { items, options } = showcase;
14
+ const sortedItems = useMemo(() => {
15
+ let result = sortBy(items, (item) => item.name.toLowerCase());
16
+ if (options.favouriteTag) {
17
+ result = sortBy(result, (item) => !item.tags.includes(options.favouriteTag));
18
+ }
19
+ return result;
20
+ }, [items, options.favouriteTag]);
21
+ const [filteredItems, setFilteredItems] = useState(sortedItems);
22
+ const title = options.pageTitle ?? translate({ id: 'showcase.page.title', message: 'Showcase' });
23
+ const description = options.pageDescription ?? translate({ id: 'showcase.page.description', message: 'A community showcase.' });
24
+ const isFiltered = filteredItems.length !== sortedItems.length;
25
+ const favouriteItems = sortedItems.filter((item) => options.favouriteTag && item.tags.includes(options.favouriteTag));
26
+ const otherItems = sortedItems.filter((item) => !options.favouriteTag || !item.tags.includes(options.favouriteTag));
27
+ const FavIcon = getIcon('heart');
28
+ return (_jsx(Layout, { title: title, description: description, children: _jsxs("main", { className: "margin-vert--lg", children: [_jsxs("section", { className: clsx('margin-top--lg margin-bottom--lg', styles.pageHeader), children: [_jsx("h1", { children: title }), _jsx("p", { children: description }), options.submitUrl && (_jsxs(Link, { className: "button button--primary button--lg", href: options.submitUrl, target: "_blank", rel: "noreferrer", children: [getIcon('plus-square') && React.createElement(getIcon('plus-square'), { size: 16, className: 'margin-right--sm' }), _jsx(Translate, { id: "showcase.header.addButton", children: "Add an item" })] }))] }), _jsx(ShowcaseFilters, { items: sortedItems, options: options, onFilter: setFilteredItems }), filteredItems.length === 0 ? (_jsx("section", { className: styles.noResults, children: _jsx("h2", { children: _jsx(Translate, { id: "showcase.noResults", children: "No results" }) }) })) : isFiltered ? (_jsx("div", { className: "container", children: _jsx("ul", { className: clsx('clean-list', styles.grid), children: filteredItems.map((item) => (_jsx(ShowcaseCard, { item: item, options: options }, item.id))) }) })) : (_jsxs(_Fragment, { children: [favouriteItems.length > 0 && (_jsx("div", { className: styles.favouriteSection, children: _jsxs("div", { className: "container", children: [_jsxs("div", { className: styles.favouriteHeader, children: [_jsx("h2", { children: _jsx(Translate, { id: "showcase.favourites.title", children: "Our favourites" }) }), FavIcon && _jsx(FavIcon, { size: 28, className: styles.favouriteIcon })] }), _jsx("ul", { className: clsx('clean-list', styles.grid), children: favouriteItems.map((item) => (_jsx(ShowcaseCard, { item: item, options: options }, item.id))) })] }) })), _jsxs("div", { className: "container margin-top--lg", children: [_jsx("h2", { children: _jsx(Translate, { id: "showcase.allItems.title", children: "All items" }) }), _jsx("ul", { className: clsx('clean-list', styles.grid), children: otherItems.map((item) => (_jsx(ShowcaseCard, { item: item, options: options }, item.id))) })] })] }))] }) }));
29
+ }
30
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/theme/ShowcasePage/index.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AAChD,OAAO,IAAI,MAAM,MAAM,CAAA;AACvB,OAAO,MAAM,MAAM,eAAe,CAAA;AAClC,OAAO,IAAI,MAAM,kBAAkB,CAAA;AACnC,OAAO,SAAS,EAAE,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAE5C,OAAO,eAAe,MAAM,6BAA6B,CAAA;AACzD,OAAO,YAAY,MAAM,0BAA0B,CAAA;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AACrC,OAAO,MAAM,MAAM,qBAAqB,CAAA;AAMxC,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EAAE,QAAQ,EAAS;IAC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
+ grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
8
+ gap: 24px;
9
+ list-style: none;
10
+ padding: 0;
11
+ margin: 0;
12
+ }
13
+
14
+ .favouriteSection {
15
+ padding: 2rem 0;
16
+ background-color: var(--ifm-color-emphasis-100);
17
+ margin-bottom: 2rem;
18
+ }
19
+
20
+ .favouriteHeader {
21
+ display: flex;
22
+ align-items: center;
23
+ gap: 1rem;
24
+ margin-bottom: 1rem;
25
+ }
26
+
27
+ .favouriteHeader h2 {
28
+ margin: 0;
29
+ }
30
+
31
+ .favouriteIcon {
32
+ color: var(--ifm-color-danger);
33
+ }
34
+
35
+ .noResults {
36
+ text-align: center;
37
+ padding: 2rem;
38
+ }
@@ -0,0 +1,11 @@
1
+ import React, { type ReactNode } from 'react';
2
+ type Props = {
3
+ status: string;
4
+ id: string;
5
+ label: string;
6
+ icon: ReactNode;
7
+ };
8
+ export declare function readMaintenanceStatus(search: string): string[];
9
+ export default function ShowcaseStatusSelect({ status, id, label, icon }: Props): React.JSX.Element;
10
+ export {};
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/theme/ShowcaseStatusSelect/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAK7C,KAAK,KAAK,GAAG;IACX,MAAM,EAAE,MAAM,CAAA;IACd,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,SAAS,CAAA;CAChB,CAAA;AAID,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAE9D;AAED,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CA6BlG"}
@@ -0,0 +1,23 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { useHistory, useLocation } from '@docusaurus/router';
3
+ import { toggleListItem } from '../../core/utils.js';
4
+ import styles from './styles.module.css';
5
+ const StatusQueryKey = 'status';
6
+ export function readMaintenanceStatus(search) {
7
+ return new URLSearchParams(search).getAll(StatusQueryKey);
8
+ }
9
+ export default function ShowcaseStatusSelect({ status, id, label, icon }) {
10
+ const location = useLocation();
11
+ const history = useHistory();
12
+ const selectedStatuses = readMaintenanceStatus(location.search);
13
+ const checked = selectedStatuses.includes(status);
14
+ const toggle = () => {
15
+ const newStatuses = toggleListItem(selectedStatuses, status);
16
+ const search = new URLSearchParams(location.search);
17
+ search.delete(StatusQueryKey);
18
+ newStatuses.forEach((s) => search.append(StatusQueryKey, s));
19
+ history.push({ ...location, search: search.toString() });
20
+ };
21
+ return (_jsxs(_Fragment, { children: [_jsx("input", { type: "checkbox", id: id, className: styles.srOnly, checked: checked, onChange: toggle }), _jsxs("label", { htmlFor: id, className: styles.checkboxLabel, children: [label, icon] })] }));
22
+ }
23
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/theme/ShowcaseStatusSelect/index.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AACpD,OAAO,MAAM,MAAM,qBAAqB,CAAA;AASxC,MAAM,cAAc,GAAG,QAAQ,CAAA;AAE/B,MAAM,UAAU,qBAAqB,CAAC,MAAc;IAClD,OAAO,IAAI,eAAe,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,CAAA;AAC3D,CAAC;AAED,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,IAAI,EAAS;IAC7E,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAA;IAC9B,MAAM,OAAO,GAAG,UAAU,EAAE,CAAA;IAC5B,MAAM,gBAAgB,GAAG,qBAAqB,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAA;IAC/D,MAAM,OAAO,GAAG,gBAAgB,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAA;IAEjD,MAAM,MAAM,GAAG,GAAG,EAAE;QAClB,MAAM,WAAW,GAAG,cAAc,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAAA;QAC5D,MAAM,MAAM,GAAG,IAAI,eAAe,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAA;QACnD,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,CAAA;QAC7B,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC,CAAA;QAC5D,OAAO,CAAC,IAAI,CAAC,EAAE,GAAG,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAA;IAC1D,CAAC,CAAA;IAED,OAAO,CACL,8BACE,gBACE,IAAI,EAAC,UAAU,EACf,EAAE,EAAE,EAAE,EACN,SAAS,EAAE,MAAM,CAAC,MAAM,EACxB,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,MAAM,GAChB,EACF,iBAAO,OAAO,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,CAAC,aAAa,aAChD,KAAK,EACL,IAAI,IACC,IACP,CACJ,CAAA;AACH,CAAC"}
@@ -0,0 +1,44 @@
1
+ .srOnly {
2
+ border: 0;
3
+ clip: rect(0 0 0 0);
4
+ clip-path: polygon(0 0, 0 0, 0 0);
5
+ height: 1px;
6
+ margin: -1px;
7
+ overflow: hidden;
8
+ padding: 0;
9
+ position: absolute;
10
+ width: 1px;
11
+ white-space: nowrap;
12
+ }
13
+
14
+ input[type='checkbox'] + .checkboxLabel {
15
+ display: flex;
16
+ align-items: center;
17
+ cursor: pointer;
18
+ line-height: 1.5;
19
+ border-radius: 4px;
20
+ padding: 0.275rem 0.8rem;
21
+ opacity: 0.85;
22
+ transition: opacity 200ms ease-out;
23
+ border: 2px solid var(--ifm-color-secondary-darkest);
24
+ }
25
+
26
+ .checkboxLabel:hover {
27
+ opacity: 1;
28
+ box-shadow: 0 0 2px 1px var(--ifm-color-secondary-darkest);
29
+ }
30
+
31
+ input:focus-visible + .checkboxLabel {
32
+ outline: 2px solid currentColor;
33
+ }
34
+
35
+ input:checked + .checkboxLabel {
36
+ opacity: 0.9;
37
+ background-color: var(--site-color-checkbox-checked-bg, hsl(167deg 56% 73% / 25%));
38
+ border: 2px solid var(--ifm-color-primary-darkest);
39
+ }
40
+
41
+ input:checked + .checkboxLabel:hover {
42
+ opacity: 0.75;
43
+ box-shadow: 0 0 2px 1px var(--ifm-color-primary-dark);
44
+ }
@@ -0,0 +1,11 @@
1
+ import React, { type ReactNode } from 'react';
2
+ type Props = {
3
+ tag: string;
4
+ id: string;
5
+ label: string;
6
+ icon: ReactNode;
7
+ };
8
+ export declare function readSearchTags(search: string): string[];
9
+ export default function ShowcaseTagSelect({ tag, id, label, icon }: Props): React.JSX.Element;
10
+ export {};
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/theme/ShowcaseTagSelect/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAK7C,KAAK,KAAK,GAAG;IACX,GAAG,EAAE,MAAM,CAAA;IACX,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,SAAS,CAAA;CAChB,CAAA;AAID,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAEvD;AAED,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CA6B5F"}
@@ -0,0 +1,23 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { useHistory, useLocation } from '@docusaurus/router';
3
+ import { toggleListItem } from '../../core/utils.js';
4
+ import styles from './styles.module.css';
5
+ const TagsQueryKey = 'tags';
6
+ export function readSearchTags(search) {
7
+ return new URLSearchParams(search).getAll(TagsQueryKey);
8
+ }
9
+ export default function ShowcaseTagSelect({ tag, id, label, icon }) {
10
+ const location = useLocation();
11
+ const history = useHistory();
12
+ const selectedTags = readSearchTags(location.search);
13
+ const checked = selectedTags.includes(tag);
14
+ const toggle = () => {
15
+ const newTags = toggleListItem(selectedTags, tag);
16
+ const search = new URLSearchParams(location.search);
17
+ search.delete(TagsQueryKey);
18
+ newTags.forEach((t) => search.append(TagsQueryKey, t));
19
+ history.push({ ...location, search: search.toString() });
20
+ };
21
+ return (_jsxs(_Fragment, { children: [_jsx("input", { type: "checkbox", id: id, className: styles.srOnly, checked: checked, onChange: toggle }), _jsxs("label", { htmlFor: id, className: styles.checkboxLabel, children: [label, icon] })] }));
22
+ }
23
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/theme/ShowcaseTagSelect/index.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AACpD,OAAO,MAAM,MAAM,qBAAqB,CAAA;AASxC,MAAM,YAAY,GAAG,MAAM,CAAA;AAE3B,MAAM,UAAU,cAAc,CAAC,MAAc;IAC3C,OAAO,IAAI,eAAe,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,YAA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;
7
+ overflow: hidden;
8
+ padding: 0;
9
+ position: absolute;
10
+ width: 1px;
11
+ white-space: nowrap;
12
+ }
13
+
14
+ input[type='checkbox'] + .checkboxLabel {
15
+ display: flex;
16
+ align-items: center;
17
+ cursor: pointer;
18
+ line-height: 1.5;
19
+ border-radius: 4px;
20
+ padding: 0.275rem 0.8rem;
21
+ opacity: 0.85;
22
+ transition: opacity 200ms ease-out;
23
+ border: 2px solid var(--ifm-color-secondary-darkest);
24
+ }
25
+
26
+ .checkboxLabel:hover {
27
+ opacity: 1;
28
+ box-shadow: 0 0 2px 1px var(--ifm-color-secondary-darkest);
29
+ }
30
+
31
+ input:focus-visible + .checkboxLabel {
32
+ outline: 2px solid currentColor;
33
+ }
34
+
35
+ input:checked + .checkboxLabel {
36
+ opacity: 0.9;
37
+ background-color: var(--site-color-checkbox-checked-bg, hsl(167deg 56% 73% / 25%));
38
+ border: 2px solid var(--ifm-color-primary-darkest);
39
+ }
40
+
41
+ input:checked + .checkboxLabel:hover {
42
+ opacity: 0.75;
43
+ box-shadow: 0 0 2px 1px var(--ifm-color-primary-dark);
44
+ }
@@ -0,0 +1,10 @@
1
+ import React, { type ReactNode } from 'react';
2
+ type Props = {
3
+ id: string;
4
+ text: string;
5
+ anchorEl: string;
6
+ children: ReactNode;
7
+ };
8
+ export default function ShowcaseTooltip({ id, text, anchorEl, children }: Props): React.JSX.Element;
9
+ export {};
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/theme/ShowcaseTooltip/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,KAAK,SAAS,EAAoB,MAAM,OAAO,CAAA;AAG/D,KAAK,KAAK,GAAG;IACX,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,SAAS,CAAA;CACpB,CAAA;AAGD,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CA8ClG"}
@@ -0,0 +1,23 @@
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useState, useRef } from 'react';
3
+ import { usePopper } from 'react-popper';
4
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
5
+ export default function ShowcaseTooltip({ id, text, anchorEl, children }) {
6
+ const [open, setOpen] = useState(false);
7
+ const triggerRef = useRef(null);
8
+ const tooltipRef = useRef(null);
9
+ const { styles: popperStyles, attributes } = usePopper(triggerRef.current, tooltipRef.current, {
10
+ modifiers: [{ name: 'offset', options: { offset: [0, 8] } }],
11
+ });
12
+ return (_jsxs(_Fragment, { children: [_jsx("span", { ref: triggerRef, "aria-describedby": open ? id : undefined, onMouseEnter: () => setOpen(true), onMouseLeave: () => setOpen(false), onFocus: () => setOpen(true), onBlur: () => setOpen(false), children: children }), open && (_jsx("div", { id: id, role: "tooltip", ref: tooltipRef, style: {
13
+ ...popperStyles.popper,
14
+ background: 'var(--ifm-color-emphasis-700)',
15
+ color: 'var(--ifm-color-emphasis-0)',
16
+ borderRadius: 4,
17
+ padding: '4px 8px',
18
+ fontSize: '0.8rem',
19
+ maxWidth: 200,
20
+ zIndex: 100,
21
+ }, ...attributes.popper, children: text }))] }));
22
+ }
23
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/theme/ShowcaseTooltip/index.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAkB,QAAQ,EAAE,MAAM,EAAE,MAAM,OAAO,CAAA;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AASxC,6DAA6D;AAC7D,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,EAAE,EAAE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B,IAAI,GACD,CACP,IACA,CACJ,CAAA;AACH,CAAC"}
@@ -0,0 +1,9 @@
1
+ import type React from 'react';
2
+ type IconComponent = React.ComponentType<{
3
+ className?: string;
4
+ size?: number;
5
+ }>;
6
+ export declare const SHOWCASE_ICONS: Record<string, IconComponent>;
7
+ export declare function getIcon(id: string | null | undefined): IconComponent | null;
8
+ export {};
9
+ //# sourceMappingURL=icons.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../../src/theme/icons.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAQ9B,KAAK,aAAa,GAAG,KAAK,CAAC,aAAa,CAAC;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAAA;AAE/E,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAOxD,CAAA;AAED,wBAAgB,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,aAAa,GAAG,IAAI,CAG3E"}
@@ -0,0 +1,20 @@
1
+ import CircleCheck from '../icons/CircleCheck.js';
2
+ import CircleMinus from '../icons/CircleMinus.js';
3
+ import CircleX from '../icons/CircleX.js';
4
+ import DocusaurusIcon from '../icons/Docusaurus.js';
5
+ import Heart from '../icons/Heart.js';
6
+ import PlusSquare from '../icons/PlusSquare.js';
7
+ export const SHOWCASE_ICONS = {
8
+ 'circle-check': CircleCheck,
9
+ 'circle-minus': CircleMinus,
10
+ 'circle-x': CircleX,
11
+ 'docusaurus': DocusaurusIcon,
12
+ 'heart': Heart,
13
+ 'plus-square': PlusSquare,
14
+ };
15
+ export function getIcon(id) {
16
+ if (!id)
17
+ return null;
18
+ return SHOWCASE_ICONS[id] ?? null;
19
+ }
20
+ //# sourceMappingURL=icons.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icons.js","sourceRoot":"","sources":["../../src/theme/icons.ts"],"names":[],"mappings":"AACA,OAAO,WAAW,MAAM,yBAAyB,CAAA;AACjD,OAAO,WAAW,MAAM,yBAAyB,CAAA;AACjD,OAAO,OAAO,MAAM,qBAAqB,CAAA;AACzC,OAAO,cAAc,MAAM,wBAAwB,CAAA;AACnD,OAAO,KAAK,MAAM,mBAAmB,CAAA;AACrC,OAAO,UAAU,MAAM,wBAAwB,CAAA;AAI/C,MAAM,CAAC,MAAM,cAAc,GAAkC;IAC3D,cAAc,EAAE,WAAW;IAC3B,cAAc,EAAE,WAAW;IAC3B,UAAU,EAAE,OAAO;IACnB,YAAY,EAAE,cAAc;IAC5B,OAAO,EAAE,KAAK;IACd,aAAa,EAAE,UAAU;CAC1B,CAAA;AAED,MAAM,UAAU,OAAO,CAAC,EAA6B;IACnD,IAAI,CAAC,EAAE;QAAE,OAAO,IAAI,CAAA;IACpB,OAAO,cAAc,CAAC,EAAE,CAAC,IAAI,IAAI,CAAA;AACnC,CAAC"}
package/package.json ADDED
@@ -0,0 +1,91 @@
1
+ {
2
+ "name": "@homotechsual/docusaurus-plugin-showcase",
3
+ "version": "0.1.0",
4
+ "description": "A Docusaurus plugin for building swizzleable showcase / directory pages from YAML data",
5
+ "type": "module",
6
+ "main": "lib/index.js",
7
+ "types": "lib/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./lib/index.d.ts",
11
+ "import": "./lib/index.js",
12
+ "default": "./lib/index.js"
13
+ },
14
+ "./presets": {
15
+ "types": "./lib/presets/index.d.ts",
16
+ "import": "./lib/presets/index.js",
17
+ "default": "./lib/presets/index.js"
18
+ },
19
+ "./schema/*": "./schema/*"
20
+ },
21
+ "files": [
22
+ "lib/**/*.js",
23
+ "lib/**/*.js.map",
24
+ "lib/**/*.d.ts",
25
+ "lib/**/*.d.ts.map",
26
+ "lib/**/*.css",
27
+ "schema/**/*.json"
28
+ ],
29
+ "scripts": {
30
+ "build": "tsc && node scripts/copy-assets.mjs",
31
+ "watch": "tsc --watch",
32
+ "lint": "eslint src",
33
+ "format": "prettier --write \"src/**/*.{ts,tsx,css}\"",
34
+ "test": "vitest run",
35
+ "test:watch": "vitest"
36
+ },
37
+ "repository": {
38
+ "type": "git",
39
+ "url": "git+https://github.com/homotechsual/docusaurus-plugin-showcase.git"
40
+ },
41
+ "keywords": [
42
+ "docusaurus",
43
+ "docusaurus-plugin",
44
+ "showcase",
45
+ "directory"
46
+ ],
47
+ "author": "Mikey O'Toole <mikey@homotechsual.dev>",
48
+ "license": "Apache-2.0",
49
+ "bugs": {
50
+ "url": "https://github.com/homotechsual/docusaurus-plugin-showcase/issues"
51
+ },
52
+ "homepage": "https://github.com/homotechsual/docusaurus-plugin-showcase#readme",
53
+ "packageManager": "yarn@4.16.0+sha512.5374c94eb4ef6aa8188fb112f20c1aa6569f248d676c5e576e1fd2a1a4d8d87a96df65d9dfe1c2a0252cbe38bda46cf18d955005b81b43cc7607a5c9d56fd2b6",
54
+ "workspaces": [
55
+ "demo"
56
+ ],
57
+ "peerDependencies": {
58
+ "@docusaurus/core": ">=3.0.0 <5.0.0",
59
+ "react": "~19.2.7",
60
+ "react-dom": "~19.2.7"
61
+ },
62
+ "dependencies": {
63
+ "@docusaurus/faster": "^3.10.1",
64
+ "@popperjs/core": "^2.11.8",
65
+ "ajv": "^8.20.0",
66
+ "ajv-formats": "^3.0.1",
67
+ "clsx": "^2.1.1",
68
+ "glob": "^13.0.6",
69
+ "js-yaml": "^4.2.0",
70
+ "react-popper": "^2.3.0"
71
+ },
72
+ "devDependencies": {
73
+ "@docusaurus/core": "^3.10.1",
74
+ "@docusaurus/theme-common": "^3.10.1",
75
+ "@docusaurus/types": "^3.10.1",
76
+ "@types/js-yaml": "^4.0.9",
77
+ "@types/node": "^25.9.2",
78
+ "@types/react": "^19.2.17",
79
+ "@types/react-dom": "^19.2.3",
80
+ "eslint": "^10.4.1",
81
+ "eslint-config-prettier": "^10.1.8",
82
+ "globals": "^17.6.0",
83
+ "prettier": "^3.8.3",
84
+ "typescript": "^6.0.3",
85
+ "typescript-eslint": "^8.61.0",
86
+ "vitest": "^4.1.8"
87
+ },
88
+ "publishConfig": {
89
+ "access": "public"
90
+ }
91
+ }
@@ -0,0 +1,43 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/homotechsual/docusaurus-plugin-showcase/schema/plugins-preset/1.0.0.json",
4
+ "title": "PluginsPresetItem",
5
+ "type": "object",
6
+ "required": ["id", "name", "description", "website"],
7
+ "additionalProperties": false,
8
+ "properties": {
9
+ "id": { "type": "string" },
10
+ "name": { "type": "string" },
11
+ "description": { "type": "string" },
12
+ "website": { "type": "string", "format": "uri" },
13
+ "source": { "type": ["string", "null"], "format": "uri" },
14
+ "preview": { "type": ["string", "null"] },
15
+ "author": { "type": ["string", "null"] },
16
+ "tags": {
17
+ "type": "array",
18
+ "items": {
19
+ "type": "string",
20
+ "enum": [
21
+ "favourite",
22
+ "docusaurus",
23
+ "search",
24
+ "api",
25
+ "utility",
26
+ "content",
27
+ "theme",
28
+ "markdown",
29
+ "analytics",
30
+ "integration",
31
+ "seo",
32
+ "editing"
33
+ ]
34
+ }
35
+ },
36
+ "status": {
37
+ "type": ["string", "null"],
38
+ "enum": ["maintained", "unmaintained", "unknown", null]
39
+ },
40
+ "npmPackages": { "type": ["array", "null"], "items": { "type": "string" } },
41
+ "minimumVersion": { "type": ["string", "null"] }
42
+ }
43
+ }
@@ -0,0 +1,58 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/homotechsual/docusaurus-plugin-showcase/schema/showcase/1.0.0.json",
4
+ "title": "ShowcaseItem",
5
+ "type": "object",
6
+ "required": ["id", "name", "description", "website"],
7
+ "additionalProperties": true,
8
+ "properties": {
9
+ "id": {
10
+ "type": "string",
11
+ "description": "Unique identifier for this item (e.g. 'author.plugin-name')"
12
+ },
13
+ "name": {
14
+ "type": "string",
15
+ "description": "Display name"
16
+ },
17
+ "description": {
18
+ "type": "string",
19
+ "description": "Short description"
20
+ },
21
+ "website": {
22
+ "type": "string",
23
+ "format": "uri",
24
+ "description": "Primary URL (docs site, GitHub page, npm page, etc.)"
25
+ },
26
+ "source": {
27
+ "type": ["string", "null"],
28
+ "format": "uri",
29
+ "description": "Source code URL"
30
+ },
31
+ "preview": {
32
+ "type": ["string", "null"],
33
+ "description": "Preview image URL. null = use screenshot service"
34
+ },
35
+ "author": {
36
+ "type": ["string", "null"],
37
+ "description": "Author handle or name"
38
+ },
39
+ "tags": {
40
+ "type": "array",
41
+ "items": { "type": "string" },
42
+ "description": "Tag keys defined in plugin options"
43
+ },
44
+ "status": {
45
+ "type": ["string", "null"],
46
+ "description": "Status key defined in plugin options"
47
+ },
48
+ "npmPackages": {
49
+ "type": ["array", "null"],
50
+ "items": { "type": "string" },
51
+ "description": "npm package name(s)"
52
+ },
53
+ "minimumVersion": {
54
+ "type": ["string", "null"],
55
+ "description": "Minimum Docusaurus version required"
56
+ }
57
+ }
58
+ }
@@ -0,0 +1,42 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/homotechsual/docusaurus-plugin-showcase/schema/sites-preset/1.0.0.json",
4
+ "title": "SiteShowcaseItem",
5
+ "type": "object",
6
+ "required": ["id", "description", "website"],
7
+ "additionalProperties": false,
8
+ "properties": {
9
+ "id": {
10
+ "type": "string",
11
+ "description": "Unique identifier for this site"
12
+ },
13
+ "name": {
14
+ "type": "string",
15
+ "description": "Display name"
16
+ },
17
+ "title": {
18
+ "type": "string",
19
+ "description": "Alias for name (compatible with Docusaurus site showcase format)"
20
+ },
21
+ "description": {
22
+ "type": "string"
23
+ },
24
+ "website": {
25
+ "type": "string",
26
+ "format": "uri"
27
+ },
28
+ "source": {
29
+ "type": ["string", "null"],
30
+ "format": "uri",
31
+ "description": "URL to the website's source repository"
32
+ },
33
+ "preview": {
34
+ "type": ["string", "null"],
35
+ "description": "Preview image URL. null = use screenshot service or co-located image file."
36
+ },
37
+ "tags": {
38
+ "type": "array",
39
+ "items": { "type": "string" }
40
+ }
41
+ }
42
+ }