@grove-dev/astro 0.7.0 → 0.9.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.
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +22 -33
- package/dist/index.js.map +1 -1
- package/dist/lib/display.d.ts +1 -1
- package/dist/lib/display.js +1 -1
- package/dist/lib/format.d.ts +1 -1
- package/dist/lib/format.js +1 -1
- package/dist/lib/icon-kinds.d.ts +1 -1
- package/dist/lib/icon-kinds.js +43 -43
- package/dist/lib/icon-registry.d.ts +2 -2
- package/dist/lib/icon-registry.js +23 -23
- package/dist/lib/index.d.ts +9 -9
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/index.js +9 -9
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/lenses.d.ts +1 -1
- package/dist/lib/lenses.js +1 -1
- package/dist/lib/packaged-icons.d.ts +1 -1
- package/dist/lib/packaged-icons.js +4 -4
- package/dist/lib/repo.d.ts +1 -1
- package/dist/lib/repo.js +1 -1
- package/dist/lib/search.d.ts +1 -1
- package/dist/lib/search.js +1 -1
- package/dist/lib/taxonomy-counts.d.ts +1 -1
- package/dist/lib/taxonomy-counts.js +1 -1
- package/package.json +7 -17
- package/src/index.ts +23 -38
- package/src/lib/display.ts +1 -1
- package/src/lib/format.ts +1 -1
- package/src/lib/icon-kinds.ts +44 -44
- package/src/lib/icon-registry.ts +25 -25
- package/src/lib/index.ts +9 -9
- package/src/lib/lenses.ts +1 -1
- package/src/lib/packaged-icons.ts +8 -8
- package/src/lib/repo.ts +1 -1
- package/src/lib/search.ts +1 -1
- package/src/lib/taxonomy-counts.ts +1 -1
- package/src/server/collections.ts +53 -42
- package/src/server/contrast.ts +14 -9
- package/src/server/directory.ts +22 -17
- package/src/server/index.ts +3 -2
- package/src/server/models.ts +425 -218
- package/src/server/seo.ts +34 -31
- package/src/styles.css +235 -91
- package/dist/layouts/index.d.ts +0 -25
- package/dist/layouts/index.d.ts.map +0 -1
- package/dist/layouts/index.js +0 -25
- package/dist/layouts/index.js.map +0 -1
- package/dist/ui/button.d.ts +0 -53
- package/dist/ui/button.d.ts.map +0 -1
- package/dist/ui/button.js +0 -90
- package/dist/ui/button.js.map +0 -1
- package/src/components/CardGrid.astro +0 -41
- package/src/components/CardIcon.astro +0 -67
- package/src/components/CategoryGrid.astro +0 -114
- package/src/components/CollectionCard.astro +0 -56
- package/src/components/CollectionIndex.astro +0 -102
- package/src/components/CollectionPage.astro +0 -128
- package/src/components/CollectionRow.astro +0 -81
- package/src/components/CollectionTeaser.astro +0 -47
- package/src/components/ContributorsGrid.astro +0 -143
- package/src/components/DirectoryIndexClient.astro +0 -510
- package/src/components/EditorialSummary.astro +0 -58
- package/src/components/FilterGroupMenu.astro +0 -69
- package/src/components/FilterOptions.astro +0 -49
- package/src/components/FinalCta.astro +0 -43
- package/src/components/Hero.astro +0 -243
- package/src/components/Icon.astro +0 -191
- package/src/components/IndexRow.astro +0 -37
- package/src/components/LanguageBreakdown.astro +0 -67
- package/src/components/MarkdownBody.astro +0 -37
- package/src/components/OriginalCollection.astro +0 -117
- package/src/components/Pagination.astro +0 -50
- package/src/components/PoweredBy.astro +0 -60
- package/src/components/ProjectCard.astro +0 -321
- package/src/components/RecordHeader.astro +0 -221
- package/src/components/RecordSection.astro +0 -128
- package/src/components/RecordSidebar.astro +0 -387
- package/src/components/RefinePanel.astro +0 -168
- package/src/components/SmartLensTabs.astro +0 -81
- package/src/components/StackGrid.astro +0 -151
- package/src/components/StackPlatformChips.astro +0 -73
- package/src/components/SubmissionClient.astro +0 -254
- package/src/components/TableOfContents.astro +0 -140
- package/src/components/WhyThisExists.astro +0 -116
- package/src/layouts/BaseLayout.astro +0 -415
- package/src/layouts/Container.astro +0 -18
- package/src/layouts/Footer.astro +0 -231
- package/src/layouts/Header.astro +0 -214
- package/src/layouts/SectionHeader.astro +0 -43
- package/src/layouts/Seo.astro +0 -171
- package/src/layouts/ThemeToggle.astro +0 -118
- package/src/layouts/astro-shim.d.ts +0 -29
- package/src/layouts/index.ts +0 -24
- package/src/server/collections.test.ts +0 -212
- package/src/server/contrast.test.ts +0 -82
- package/src/server/directory.test.ts +0 -177
- package/src/server/github-repo.test.ts +0 -88
- package/src/server/models-home.test.ts +0 -101
- package/src/server/models.test.ts +0 -135
- package/src/server/seo.test.ts +0 -123
- package/src/ui/Badge.astro +0 -38
- package/src/ui/Button.astro +0 -42
- package/src/ui/EmptyState.astro +0 -38
- package/src/ui/FilterDrawer.astro +0 -124
- package/src/ui/PageHeader.astro +0 -39
- package/src/ui/SearchField.astro +0 -106
- package/src/ui/button.test.ts +0 -54
- package/src/ui/button.ts +0 -107
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { AstroIntegration } from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
1
|
+
import type { AstroIntegration } from 'astro';
|
|
2
|
+
export * from '@grove-dev/core';
|
|
3
|
+
export * from './lib/index.js';
|
|
4
4
|
export default function groveAstro(): AstroIntegration;
|
|
5
5
|
export declare const CONSUMER_GLOBAL_CSS_ID = "virtual:grove-consumer-global-css";
|
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AA8BA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAC;AAG9C,cAAc,iBAAiB,CAAC;AAMhC,cAAc,gBAAgB,CAAC;AAU/B,MAAM,CAAC,OAAO,UAAU,UAAU,IAAI,gBAAgB,CAwFrD;AAID,eAAO,MAAM,sBAAsB,sCAAiC,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -24,42 +24,35 @@
|
|
|
24
24
|
* which is the classic "I changed the brand color in global.css
|
|
25
25
|
* and nothing happened" surprise.
|
|
26
26
|
*/
|
|
27
|
-
import { existsSync } from
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import { loadConfig, prepareDirectory } from
|
|
31
|
-
import { syncPackagedIcons } from
|
|
32
|
-
export * from
|
|
27
|
+
import { existsSync } from 'node:fs';
|
|
28
|
+
import { dirname, resolve } from 'node:path';
|
|
29
|
+
import { fileURLToPath } from 'node:url';
|
|
30
|
+
import { loadConfig, prepareDirectory } from '@grove-dev/core';
|
|
31
|
+
import { syncPackagedIcons } from './lib/packaged-icons.js';
|
|
32
|
+
export * from '@grove-dev/core';
|
|
33
33
|
// Generic lib helpers — repo URL parsing, formatting, search /
|
|
34
34
|
// facet / sort / paginate, lens application, score tiers, taxonomy
|
|
35
35
|
// counts, and pretty-print display maps. All dependency-free and
|
|
36
36
|
// typed against `@grove-dev/core`.
|
|
37
|
-
export * from
|
|
37
|
+
export * from './lib/index.js';
|
|
38
38
|
const here = dirname(fileURLToPath(import.meta.url));
|
|
39
|
-
// `here` is the compiled `dist/` directory. The components and
|
|
40
|
-
// layouts live in the source tree (the `dist/` is for the
|
|
41
|
-
// integration helper only). Walk up one level to reach `src/`
|
|
42
|
-
// before resolving the subpath roots.
|
|
43
|
-
const srcRoot = resolve(here, "..", "src");
|
|
44
|
-
const componentsDir = resolve(srcRoot, "components");
|
|
45
|
-
const layoutsDir = resolve(srcRoot, "layouts");
|
|
46
39
|
// Virtual module id used to inject the consumer's `src/styles/global.css`.
|
|
47
40
|
// Resolved by the inline Vite plugin below to the absolute file path
|
|
48
41
|
// when the file exists, or to an empty module when it doesn't.
|
|
49
|
-
const CONSUMER_GLOBAL_CSS_VIRTUAL_ID =
|
|
50
|
-
const CONSUMER_GLOBAL_CSS_EMPTY_ID =
|
|
42
|
+
const CONSUMER_GLOBAL_CSS_VIRTUAL_ID = 'virtual:grove-consumer-global-css';
|
|
43
|
+
const CONSUMER_GLOBAL_CSS_EMPTY_ID = '\0virtual:grove-consumer-global-css:empty';
|
|
51
44
|
export default function groveAstro() {
|
|
52
45
|
return {
|
|
53
|
-
name:
|
|
46
|
+
name: '@grove-dev/astro',
|
|
54
47
|
hooks: {
|
|
55
|
-
|
|
48
|
+
'astro:config:setup': async ({ config, updateConfig, injectScript, logger }) => {
|
|
56
49
|
// Alias the components/layouts source directories so
|
|
57
50
|
// consumer builds can import from
|
|
58
51
|
// @grove-dev/astro/components/ProjectCard.astro
|
|
59
52
|
// without us shipping a glob-shaped `exports` map that
|
|
60
53
|
// Vite/Rollup does not expand reliably.
|
|
61
54
|
const consumerRoot = fileURLToPath(config.root);
|
|
62
|
-
const groveConfigPath = resolve(consumerRoot,
|
|
55
|
+
const groveConfigPath = resolve(consumerRoot, 'grove.config.ts');
|
|
63
56
|
if (existsSync(groveConfigPath)) {
|
|
64
57
|
await prepareDirectory(consumerRoot);
|
|
65
58
|
// Data preparation and the icon sync below are the integration's
|
|
@@ -78,22 +71,20 @@ export default function groveAstro() {
|
|
|
78
71
|
// pre-sidecar hand edit would show up here, and version
|
|
79
72
|
// control is what makes it recoverable.
|
|
80
73
|
logger.info(`Adopted ${icons.written.length} icon(s) into public/icons/ and recorded them in ` +
|
|
81
|
-
|
|
74
|
+
'.grove-icons.json. Review with `git diff public/icons` if you had edited any.');
|
|
82
75
|
}
|
|
83
76
|
if (icons.skipped.length > 0) {
|
|
84
|
-
logger.warn(`Kept ${icons.skipped.length} locally modified icon(s): ${icons.skipped.join(
|
|
85
|
-
|
|
77
|
+
logger.warn(`Kept ${icons.skipped.length} locally modified icon(s): ${icons.skipped.join(', ')}. ` +
|
|
78
|
+
'Run `grove icons sync --force` to restore the packaged versions.');
|
|
86
79
|
}
|
|
87
80
|
}
|
|
88
|
-
const globalCssPath = resolve(consumerRoot,
|
|
81
|
+
const globalCssPath = resolve(consumerRoot, 'src/styles/global.css');
|
|
89
82
|
const globalCssExists = existsSync(globalCssPath);
|
|
90
83
|
updateConfig({
|
|
91
84
|
vite: {
|
|
92
85
|
resolve: {
|
|
93
86
|
alias: {
|
|
94
|
-
|
|
95
|
-
"@grove-dev/astro/layouts": layoutsDir,
|
|
96
|
-
"@grove/generated": resolve(consumerRoot, "data/generated"),
|
|
87
|
+
'@grove/generated': resolve(consumerRoot, 'data/generated'),
|
|
97
88
|
},
|
|
98
89
|
},
|
|
99
90
|
// The OG image pipeline (`@grove-dev/core`'s og-image.ts)
|
|
@@ -102,22 +93,20 @@ export default function groveAstro() {
|
|
|
102
93
|
// time) — never in page code — so keep the bundler away
|
|
103
94
|
// from the .node binary.
|
|
104
95
|
ssr: {
|
|
105
|
-
external: [
|
|
96
|
+
external: ['satori', '@resvg/resvg-js'],
|
|
106
97
|
},
|
|
107
98
|
plugins: [
|
|
108
99
|
{
|
|
109
|
-
name:
|
|
100
|
+
name: 'grove:consumer-global-css-resolver',
|
|
110
101
|
resolveId(id) {
|
|
111
102
|
if (id === CONSUMER_GLOBAL_CSS_VIRTUAL_ID) {
|
|
112
|
-
return globalCssExists
|
|
113
|
-
? globalCssPath
|
|
114
|
-
: CONSUMER_GLOBAL_CSS_EMPTY_ID;
|
|
103
|
+
return globalCssExists ? globalCssPath : CONSUMER_GLOBAL_CSS_EMPTY_ID;
|
|
115
104
|
}
|
|
116
105
|
return null;
|
|
117
106
|
},
|
|
118
107
|
load(id) {
|
|
119
108
|
if (id === CONSUMER_GLOBAL_CSS_EMPTY_ID) {
|
|
120
|
-
return
|
|
109
|
+
return '';
|
|
121
110
|
}
|
|
122
111
|
return null;
|
|
123
112
|
},
|
|
@@ -129,7 +118,7 @@ export default function groveAstro() {
|
|
|
129
118
|
// regardless of whether the consumer has a global.css yet.
|
|
130
119
|
// Vite's CSS pipeline (with @tailwindcss/vite) handles the
|
|
131
120
|
// resulting import as a stylesheet — no JS bundle weight.
|
|
132
|
-
injectScript(
|
|
121
|
+
injectScript('page-ssr', `import "${CONSUMER_GLOBAL_CSS_VIRTUAL_ID}";`);
|
|
133
122
|
},
|
|
134
123
|
},
|
|
135
124
|
};
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"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"}
|
package/dist/lib/display.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from '@grove-dev/core';
|
|
2
2
|
//# sourceMappingURL=display.d.ts.map
|
package/dist/lib/display.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from '@grove-dev/core';
|
|
2
2
|
//# sourceMappingURL=display.js.map
|
package/dist/lib/format.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from '@grove-dev/core';
|
|
2
2
|
//# sourceMappingURL=format.d.ts.map
|
package/dist/lib/format.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from '@grove-dev/core';
|
|
2
2
|
//# sourceMappingURL=format.js.map
|
package/dist/lib/icon-kinds.d.ts
CHANGED
|
@@ -8,6 +8,6 @@
|
|
|
8
8
|
* Keyed by `${folder}/${resolvedName}` — the folder matters because
|
|
9
9
|
* `apple` exists under both `stacks/` and `platforms/`.
|
|
10
10
|
*/
|
|
11
|
-
export type IconKind =
|
|
11
|
+
export type IconKind = 'color' | 'mono';
|
|
12
12
|
export declare const ICON_KINDS: Readonly<Record<string, IconKind>>;
|
|
13
13
|
//# sourceMappingURL=icon-kinds.d.ts.map
|
package/dist/lib/icon-kinds.js
CHANGED
|
@@ -1,46 +1,46 @@
|
|
|
1
1
|
export const ICON_KINDS = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
2
|
+
'platforms/android': 'color',
|
|
3
|
+
'platforms/app': 'mono',
|
|
4
|
+
'platforms/chrome': 'color',
|
|
5
|
+
'platforms/desktop': 'mono',
|
|
6
|
+
'platforms/embedded': 'mono',
|
|
7
|
+
'platforms/ios': 'mono',
|
|
8
|
+
'platforms/linux': 'color',
|
|
9
|
+
'platforms/macos': 'mono',
|
|
10
|
+
'platforms/ubuntu': 'color',
|
|
11
|
+
'platforms/web': 'mono',
|
|
12
|
+
'platforms/windows': 'color',
|
|
13
|
+
'stacks/android': 'color',
|
|
14
|
+
'stacks/apple': 'mono',
|
|
15
|
+
'stacks/bun': 'color',
|
|
16
|
+
'stacks/capacitor': 'color',
|
|
17
|
+
'stacks/clojure': 'color',
|
|
18
|
+
'stacks/dart': 'color',
|
|
19
|
+
'stacks/deno': 'mono',
|
|
20
|
+
'stacks/django': 'color',
|
|
21
|
+
'stacks/docker': 'color',
|
|
22
|
+
'stacks/firebase': 'color',
|
|
23
|
+
'stacks/flutter': 'color',
|
|
24
|
+
'stacks/go': 'color',
|
|
25
|
+
'stacks/graphql': 'color',
|
|
26
|
+
'stacks/ionic': 'color',
|
|
27
|
+
'stacks/java': 'color',
|
|
28
|
+
'stacks/javascript': 'color',
|
|
29
|
+
'stacks/kotlin': 'color',
|
|
30
|
+
'stacks/llm': 'mono',
|
|
31
|
+
'stacks/mongodb': 'color',
|
|
32
|
+
'stacks/nodejs': 'color',
|
|
33
|
+
'stacks/python': 'color',
|
|
34
|
+
'stacks/rag': 'mono',
|
|
35
|
+
'stacks/react': 'color',
|
|
36
|
+
'stacks/react-native': 'color',
|
|
37
|
+
'stacks/rust': 'mono',
|
|
38
|
+
'stacks/solidity': 'mono',
|
|
39
|
+
'stacks/sveltekit': 'color',
|
|
40
|
+
'stacks/swift': 'color',
|
|
41
|
+
'stacks/tauri': 'mono',
|
|
42
|
+
'stacks/tensorflow': 'color',
|
|
43
|
+
'stacks/typescript': 'color',
|
|
44
|
+
'stacks/vue': 'color',
|
|
45
45
|
};
|
|
46
46
|
//# sourceMappingURL=icon-kinds.js.map
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
* exact resolution the component performs instead of reimplementing
|
|
7
7
|
* (and drifting from) the alias and folder rules.
|
|
8
8
|
*/
|
|
9
|
-
export type IconCategory =
|
|
10
|
-
export type IconFolder =
|
|
9
|
+
export type IconCategory = 'stack' | 'platform' | 'brand';
|
|
10
|
+
export type IconFolder = 'stacks' | 'platforms' | 'brands';
|
|
11
11
|
/**
|
|
12
12
|
* Normalize: lowercase + replace spaces/underscores with dashes.
|
|
13
13
|
*
|
|
@@ -17,7 +17,7 @@ export function slugifyIconName(s) {
|
|
|
17
17
|
return s
|
|
18
18
|
.toLowerCase()
|
|
19
19
|
.trim()
|
|
20
|
-
.replace(/[\s_]+/g,
|
|
20
|
+
.replace(/[\s_]+/g, '-');
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
23
23
|
* Built-in id remaps. Stack-only by design: `category="platform"`
|
|
@@ -26,26 +26,26 @@ export function slugifyIconName(s) {
|
|
|
26
26
|
*/
|
|
27
27
|
const defaultAliases = {
|
|
28
28
|
stack: {
|
|
29
|
-
ios:
|
|
30
|
-
|
|
31
|
-
ipados:
|
|
32
|
-
macos:
|
|
33
|
-
|
|
34
|
-
spritekit:
|
|
35
|
-
swiftui:
|
|
36
|
-
kmp:
|
|
37
|
-
|
|
29
|
+
ios: 'apple',
|
|
30
|
+
'native-ios': 'apple',
|
|
31
|
+
ipados: 'apple',
|
|
32
|
+
macos: 'apple',
|
|
33
|
+
'objective-c': 'apple',
|
|
34
|
+
spritekit: 'apple',
|
|
35
|
+
swiftui: 'apple',
|
|
36
|
+
kmp: 'kotlin',
|
|
37
|
+
'kotlin-multiplatform': 'kotlin',
|
|
38
38
|
// Names the shipped set covers under a different file.
|
|
39
|
-
|
|
40
|
-
node:
|
|
41
|
-
clojurescript:
|
|
42
|
-
svelte:
|
|
39
|
+
'node.js': 'nodejs',
|
|
40
|
+
node: 'nodejs',
|
|
41
|
+
clojurescript: 'clojure',
|
|
42
|
+
svelte: 'sveltekit',
|
|
43
43
|
},
|
|
44
44
|
};
|
|
45
45
|
/** Stack marks that `category="platform"` should reuse rather than duplicate. */
|
|
46
|
-
const platformStackIcons = new Set([
|
|
46
|
+
const platformStackIcons = new Set(['docker']);
|
|
47
47
|
/** Platforms with no mark at all — always render the initials chip. */
|
|
48
|
-
export const textOnlyPlatforms = new Set([
|
|
48
|
+
export const textOnlyPlatforms = new Set(['self-host', 'self-hosted']);
|
|
49
49
|
/**
|
|
50
50
|
* Resolve a registry id to the asset it points at.
|
|
51
51
|
*
|
|
@@ -56,21 +56,21 @@ export const textOnlyPlatforms = new Set(["self-host", "self-hosted"]);
|
|
|
56
56
|
*/
|
|
57
57
|
export function resolveIconAsset(name, category, aliases) {
|
|
58
58
|
const resolved = resolveName(name, category, aliases);
|
|
59
|
-
const folder = category ===
|
|
60
|
-
?
|
|
61
|
-
: category ===
|
|
62
|
-
?
|
|
63
|
-
:
|
|
59
|
+
const folder = category === 'stack' || (category === 'platform' && platformStackIcons.has(resolved))
|
|
60
|
+
? 'stacks'
|
|
61
|
+
: category === 'platform'
|
|
62
|
+
? 'platforms'
|
|
63
|
+
: 'brands';
|
|
64
64
|
return {
|
|
65
65
|
folder,
|
|
66
66
|
name: resolved,
|
|
67
67
|
key: `${folder}/${resolved}`,
|
|
68
|
-
textOnly: category ===
|
|
68
|
+
textOnly: category === 'platform' && textOnlyPlatforms.has(resolved),
|
|
69
69
|
};
|
|
70
70
|
}
|
|
71
71
|
function resolveName(raw, category, aliases) {
|
|
72
72
|
if (!raw)
|
|
73
|
-
return
|
|
73
|
+
return '';
|
|
74
74
|
for (const registry of [aliases, defaultAliases[category]]) {
|
|
75
75
|
if (!registry)
|
|
76
76
|
continue;
|
package/dist/lib/index.d.ts
CHANGED
|
@@ -16,13 +16,13 @@
|
|
|
16
16
|
* `@grove-dev/core` (specifically `ProjectRecord` for the index
|
|
17
17
|
* payload and the `Score` / `HealthStatus` unions).
|
|
18
18
|
*/
|
|
19
|
-
export * from
|
|
20
|
-
export * from
|
|
21
|
-
export * from
|
|
22
|
-
export * from
|
|
23
|
-
export * from
|
|
24
|
-
export * from
|
|
25
|
-
export * from
|
|
26
|
-
export * from
|
|
27
|
-
export * from
|
|
19
|
+
export * from './display.js';
|
|
20
|
+
export * from './format.js';
|
|
21
|
+
export * from './icon-kinds.js';
|
|
22
|
+
export * from './icon-registry.js';
|
|
23
|
+
export * from './lenses.js';
|
|
24
|
+
export * from './packaged-icons.js';
|
|
25
|
+
export * from './repo.js';
|
|
26
|
+
export * from './search.js';
|
|
27
|
+
export * from './taxonomy-counts.js';
|
|
28
28
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lib/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lib/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC"}
|
package/dist/lib/index.js
CHANGED
|
@@ -16,13 +16,13 @@
|
|
|
16
16
|
* `@grove-dev/core` (specifically `ProjectRecord` for the index
|
|
17
17
|
* payload and the `Score` / `HealthStatus` unions).
|
|
18
18
|
*/
|
|
19
|
-
export * from
|
|
20
|
-
export * from
|
|
21
|
-
export * from
|
|
22
|
-
export * from
|
|
23
|
-
export * from
|
|
24
|
-
export * from
|
|
25
|
-
export * from
|
|
26
|
-
export * from
|
|
27
|
-
export * from
|
|
19
|
+
export * from './display.js';
|
|
20
|
+
export * from './format.js';
|
|
21
|
+
export * from './icon-kinds.js';
|
|
22
|
+
export * from './icon-registry.js';
|
|
23
|
+
export * from './lenses.js';
|
|
24
|
+
export * from './packaged-icons.js';
|
|
25
|
+
export * from './repo.js';
|
|
26
|
+
export * from './search.js';
|
|
27
|
+
export * from './taxonomy-counts.js';
|
|
28
28
|
//# sourceMappingURL=index.js.map
|
package/dist/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/lib/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/lib/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC"}
|
package/dist/lib/lenses.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from '@grove-dev/core';
|
|
2
2
|
//# sourceMappingURL=lenses.d.ts.map
|
package/dist/lib/lenses.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from '@grove-dev/core';
|
|
2
2
|
//# sourceMappingURL=lenses.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IconSyncOptions, IconSyncResult } from
|
|
1
|
+
import type { IconSyncOptions, IconSyncResult } from '@grove-dev/core';
|
|
2
2
|
/**
|
|
3
3
|
* `packages/astro/assets/icons` — two levels up, which holds for both
|
|
4
4
|
* `src/lib/` (tests, Vite) and `dist/lib/` (published).
|
|
@@ -6,14 +6,14 @@
|
|
|
6
6
|
* carries the matching artwork with it, so a consumer can never end up
|
|
7
7
|
* with a component asking for files their site does not have.
|
|
8
8
|
*/
|
|
9
|
-
import { dirname, resolve } from
|
|
10
|
-
import { fileURLToPath } from
|
|
11
|
-
import { syncIconAssets } from
|
|
9
|
+
import { dirname, resolve } from 'node:path';
|
|
10
|
+
import { fileURLToPath } from 'node:url';
|
|
11
|
+
import { syncIconAssets } from '@grove-dev/core';
|
|
12
12
|
/**
|
|
13
13
|
* `packages/astro/assets/icons` — two levels up, which holds for both
|
|
14
14
|
* `src/lib/` (tests, Vite) and `dist/lib/` (published).
|
|
15
15
|
*/
|
|
16
|
-
export const packagedIconsDir = resolve(dirname(fileURLToPath(import.meta.url)),
|
|
16
|
+
export const packagedIconsDir = resolve(dirname(fileURLToPath(import.meta.url)), '..', '..', 'assets', 'icons');
|
|
17
17
|
/** Copy the packaged icon set into a site's `public/`. */
|
|
18
18
|
export function syncPackagedIcons(publicDir, options) {
|
|
19
19
|
return syncIconAssets(packagedIconsDir, publicDir, options);
|
package/dist/lib/repo.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from '@grove-dev/core';
|
|
2
2
|
//# sourceMappingURL=repo.d.ts.map
|
package/dist/lib/repo.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from '@grove-dev/core';
|
|
2
2
|
//# sourceMappingURL=repo.js.map
|
package/dist/lib/search.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from '@grove-dev/core';
|
|
2
2
|
//# sourceMappingURL=search.d.ts.map
|
package/dist/lib/search.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from '@grove-dev/core';
|
|
2
2
|
//# sourceMappingURL=search.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from '@grove-dev/core';
|
|
2
2
|
//# sourceMappingURL=taxonomy-counts.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from '@grove-dev/core';
|
|
2
2
|
//# sourceMappingURL=taxonomy-counts.js.map
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@grove-dev/astro",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"description": "
|
|
5
|
+
"description": "Astro integration + server view-models for Grove directories. UI ships from @grove-dev/registry, not from this package.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"engines": {
|
|
8
8
|
"node": ">=22.12.0"
|
|
@@ -10,9 +10,7 @@
|
|
|
10
10
|
"keywords": [
|
|
11
11
|
"grove",
|
|
12
12
|
"astro",
|
|
13
|
-
"ui",
|
|
14
13
|
"directory",
|
|
15
|
-
"components",
|
|
16
14
|
"static-site"
|
|
17
15
|
],
|
|
18
16
|
"homepage": "https://github.com/tortuvshin/grove#readme",
|
|
@@ -31,14 +29,12 @@
|
|
|
31
29
|
"files": [
|
|
32
30
|
"assets",
|
|
33
31
|
"dist",
|
|
34
|
-
"src/components",
|
|
35
|
-
"src/layouts",
|
|
36
32
|
"src/lib",
|
|
37
|
-
"src/server",
|
|
38
|
-
"src/ui",
|
|
39
33
|
"src/index.ts",
|
|
40
34
|
"src/styles.css",
|
|
41
|
-
"README.md"
|
|
35
|
+
"README.md",
|
|
36
|
+
"src/server/**/*.ts",
|
|
37
|
+
"!src/server/**/*.test.ts"
|
|
42
38
|
],
|
|
43
39
|
"exports": {
|
|
44
40
|
".": {
|
|
@@ -46,14 +42,8 @@
|
|
|
46
42
|
"import": "./dist/index.js"
|
|
47
43
|
},
|
|
48
44
|
"./styles.css": "./src/styles.css",
|
|
49
|
-
"./components/*.astro": "./src/components/*.astro",
|
|
50
|
-
"./components/*": "./src/components/*.astro",
|
|
51
45
|
"./server": "./src/server/index.ts",
|
|
52
|
-
"./
|
|
53
|
-
"./ui/*.astro": "./src/ui/*.astro",
|
|
54
|
-
"./ui/*": "./src/ui/*.ts",
|
|
55
|
-
"./layouts/*.astro": "./src/layouts/*.astro",
|
|
56
|
-
"./layouts/*": "./src/layouts/*.astro"
|
|
46
|
+
"./package.json": "./package.json"
|
|
57
47
|
},
|
|
58
48
|
"dependencies": {
|
|
59
49
|
"astro": "^7.1.3",
|
|
@@ -61,7 +51,7 @@
|
|
|
61
51
|
"sanitize-html": "^2.17.5",
|
|
62
52
|
"shiki": "^1.29.2",
|
|
63
53
|
"yaml": "^2.9.0",
|
|
64
|
-
"@grove-dev/core": "0.
|
|
54
|
+
"@grove-dev/core": "0.9.0"
|
|
65
55
|
},
|
|
66
56
|
"peerDependencies": {
|
|
67
57
|
"astro": "^6.0.0 || ^7.0.0"
|