@dominikcz/greg 0.9.31 → 0.9.33

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/README.md CHANGED
@@ -50,6 +50,7 @@ import {
50
50
  vitePluginGregConfig,
51
51
  vitePluginSearchIndex,
52
52
  vitePluginSearchServer,
53
+ vitePluginAiServer,
53
54
  vitePluginFrontmatter,
54
55
  vitePluginCopyDocs,
55
56
  } from '@dominikcz/greg/plugins'
@@ -60,6 +61,7 @@ export default defineConfig({
60
61
  vitePluginGregConfig(),
61
62
  vitePluginSearchIndex({ docsDir: 'docs', srcDir: '/' }),
62
63
  vitePluginSearchServer({ docsDir: 'docs', srcDir: '/' }),
64
+ vitePluginAiServer({ docsDir: 'docs', srcDir: '/' }),
63
65
  vitePluginFrontmatter({ docsDir: 'docs', srcDir: '/' }),
64
66
  vitePluginCopyDocs({ docsDir: 'docs', srcDir: '/' }),
65
67
  ],
@@ -4,6 +4,7 @@ import {
4
4
  vitePluginGregConfig,
5
5
  vitePluginSearchIndex,
6
6
  vitePluginSearchServer,
7
+ vitePluginAiServer,
7
8
  vitePluginFrontmatter,
8
9
  vitePluginCopyDocs,
9
10
  } from '@dominikcz/greg/plugins'
@@ -17,6 +18,7 @@ export default defineConfig({
17
18
  vitePluginGregConfig(),
18
19
  vitePluginSearchIndex({ docsDir, srcDir: docsBase }),
19
20
  vitePluginSearchServer({ docsDir, srcDir: docsBase }),
21
+ vitePluginAiServer({ docsDir, srcDir: docsBase }),
20
22
  vitePluginFrontmatter({ docsDir, srcDir: docsBase }),
21
23
  vitePluginCopyDocs({ docsDir, srcDir: docsBase }),
22
24
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dominikcz/greg",
3
- "version": "0.9.31",
3
+ "version": "0.9.33",
4
4
  "type": "module",
5
5
  "types": "./types/index.d.ts",
6
6
  "bin": {
@@ -19,6 +19,7 @@
19
19
  },
20
20
  "files": [
21
21
  "bin",
22
+ "public",
22
23
  "scripts/generate-static.js",
23
24
  "scripts/build-versions.js",
24
25
  "scripts/render-markdown.js",
@@ -0,0 +1,5 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="#ff6f61"
2
+ stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="prefix__s-Et5g9c-6G1xH">
3
+ <path d="M4 19.5A2.5 2.5 0 016.5 17H20" class="prefix__s-Et5g9c-6G1xH" />
4
+ <path d="M6.5 2H20v20H6.5A2.5 2.5 0 014 19.5v-15A2.5 2.5 0 016.5 2z" class="prefix__s-Et5g9c-6G1xH" />
5
+ </svg>
@@ -0,0 +1,5 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor"
2
+ stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="prefix__s-Et5g9c-6G1xH">
3
+ <path d="M4 19.5A2.5 2.5 0 016.5 17H20" class="prefix__s-Et5g9c-6G1xH" />
4
+ <path d="M6.5 2H20v20H6.5A2.5 2.5 0 014 19.5v-15A2.5 2.5 0 016.5 2z" class="prefix__s-Et5g9c-6G1xH" />
5
+ </svg>
@@ -0,0 +1,36 @@
1
+ <svg width="64" height="64" viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="Greg favicon dark">
2
+ <style>
3
+ :root {
4
+ --accent: #ff6f61;
5
+ --accent-shadow: #9b453d;
6
+ }
7
+ </style>
8
+ <defs>
9
+ <g id="gMain" fill="none" stroke-linecap="round" stroke-linejoin="round">
10
+ <g stroke="currentColor" stroke-width="3.5">
11
+ <path d="M34.06 33.64L42.41 31.24L50.34 34.28L46.68 43.90L33.89 53.29L17.85 45.08L13.61 29.30L20.48 17.15L31.76 13.14L41.84 15.04"/>
12
+ </g>
13
+ <g stroke="currentColor" stroke-width="1.25" fill="currentColor">
14
+ <circle cx="34.06" cy="33.64" r="2.4"/>
15
+ <circle cx="42.41" cy="31.24" r="2.4"/>
16
+ <circle cx="50.34" cy="34.28" r="2.8"/>
17
+ <circle cx="46.68" cy="43.90" r="3.0"/>
18
+ <circle cx="33.89" cy="53.29" r="3.0"/>
19
+ <circle cx="17.85" cy="45.08" r="3.3"/>
20
+ <circle cx="13.61" cy="29.30" r="2.9"/>
21
+ <circle cx="20.48" cy="17.15" r="2.4"/>
22
+ <circle cx="31.76" cy="13.14" r="2.3"/>
23
+ <circle cx="41.84" cy="15.04" r="2.1"/>
24
+ </g>
25
+ </g>
26
+ </defs>
27
+
28
+ <g transform="translate(-8 -10.5) scale(1.24)">
29
+ <g color="var(--accent-shadow)">
30
+ <use href="#gMain" transform="translate(1.2 1.8)"/>
31
+ </g>
32
+ <g color="var(--accent)">
33
+ <use href="#gMain"/>
34
+ </g>
35
+ </g>
36
+ </svg>
@@ -0,0 +1,36 @@
1
+ <svg width="64" height="64" viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="Greg favicon light">
2
+ <style>
3
+ :root {
4
+ --accent: #646cff;
5
+ --accent-shadow: #3940b8;
6
+ }
7
+ </style>
8
+ <defs>
9
+ <g id="gMain" fill="none" stroke-linecap="round" stroke-linejoin="round">
10
+ <g stroke="currentColor" stroke-width="3.5">
11
+ <path d="M34.06 33.64L42.41 31.24L50.34 34.28L46.68 43.90L33.89 53.29L17.85 45.08L13.61 29.30L20.48 17.15L31.76 13.14L41.84 15.04"/>
12
+ </g>
13
+ <g stroke="currentColor" stroke-width="1.25" fill="currentColor">
14
+ <circle cx="34.06" cy="33.64" r="2.4"/>
15
+ <circle cx="42.41" cy="31.24" r="2.4"/>
16
+ <circle cx="50.34" cy="34.28" r="2.8"/>
17
+ <circle cx="46.68" cy="43.90" r="3.0"/>
18
+ <circle cx="33.89" cy="53.29" r="3.0"/>
19
+ <circle cx="17.85" cy="45.08" r="3.3"/>
20
+ <circle cx="13.61" cy="29.30" r="2.9"/>
21
+ <circle cx="20.48" cy="17.15" r="2.4"/>
22
+ <circle cx="31.76" cy="13.14" r="2.3"/>
23
+ <circle cx="41.84" cy="15.04" r="2.1"/>
24
+ </g>
25
+ </g>
26
+ </defs>
27
+
28
+ <g transform="translate(-8 -10.5) scale(1.24)">
29
+ <g color="var(--accent-shadow)">
30
+ <use href="#gMain" transform="translate(1.2 1.8)"/>
31
+ </g>
32
+ <g color="var(--accent)">
33
+ <use href="#gMain"/>
34
+ </g>
35
+ </g>
36
+ </svg>
@@ -0,0 +1,44 @@
1
+ <svg width="64" height="64" viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="Greg favicon simplified">
2
+ <style>
3
+ :root {
4
+ --accent: #646cff;
5
+ --accent-shadow: #3940b8;
6
+ }
7
+ @media (prefers-color-scheme: dark) {
8
+ :root {
9
+ --accent: #ff6f61;
10
+ --accent-shadow: #9b453d;
11
+ }
12
+ }
13
+ </style>
14
+ <defs>
15
+ <!-- Same graph silhouette as main logo, scaled to favicon space -->
16
+ <g id="gMain" fill="none" stroke-linecap="round" stroke-linejoin="round">
17
+ <g stroke="currentColor" stroke-width="3.5">
18
+ <path d="M34.06 33.64L42.41 31.24L50.34 34.28L46.68 43.90L33.89 53.29L17.85 45.08L13.61 29.30L20.48 17.15L31.76 13.14L41.84 15.04"/>
19
+ </g>
20
+ <g stroke="currentColor" stroke-width="1.25" fill="currentColor">
21
+ <circle cx="34.06" cy="33.64" r="2.4"/>
22
+ <circle cx="42.41" cy="31.24" r="2.4"/>
23
+ <circle cx="50.34" cy="34.28" r="2.8"/>
24
+ <circle cx="46.68" cy="43.90" r="3.0"/>
25
+ <circle cx="33.89" cy="53.29" r="3.0"/>
26
+ <circle cx="17.85" cy="45.08" r="3.3"/>
27
+ <circle cx="13.61" cy="29.30" r="2.9"/>
28
+ <circle cx="20.48" cy="17.15" r="2.4"/>
29
+ <circle cx="31.76" cy="13.14" r="2.3"/>
30
+ <circle cx="41.84" cy="15.04" r="2.1"/>
31
+ </g>
32
+ </g>
33
+ </defs>
34
+
35
+ <g transform="translate(-8 -10.5) scale(1.24)">
36
+ <!-- Shifted lower layer with reduced gap -->
37
+ <g color="var(--accent-shadow)">
38
+ <use href="#gMain" transform="translate(1.2 1.8)"/>
39
+ </g>
40
+ <g color="var(--accent)">
41
+ <use href="#gMain"/>
42
+ </g>
43
+ </g>
44
+ </svg>
@@ -0,0 +1,92 @@
1
+ <svg width="256" height="256" viewBox="0 0 256 256" aria-label="Greg logo dark" version="1.1" id="prefix__svg2" xmlns="http://www.w3.org/2000/svg">
2
+ <style id="style1">
3
+ :root {
4
+ --logo-bg-1: #ff6f61;
5
+ --logo-bg-2: #cf5c52;
6
+ --logo-glow: #ffd4ce;
7
+ --logo-shade: #7a2f2a;
8
+ --edge: #fff7f5;
9
+ --n1: #fff7f5;
10
+ --n2: #ffe8e3;
11
+ --n3: #ffd8d1;
12
+ --n4: #ffc8be;
13
+ color: var(--edge);
14
+ }
15
+ </style>
16
+
17
+ <defs id="prefix__defs2">
18
+ <linearGradient id="prefix__g" x1="0" y1="0" x2="1" y2="1">
19
+ <stop offset="0%" stop-color="var(--logo-bg-1)" id="prefix__stop1" />
20
+ <stop offset="100%" stop-color="var(--logo-bg-2)" id="prefix__stop2" />
21
+ </linearGradient>
22
+ <radialGradient id="prefix__g2" cx="0.3" cy="0.28" r="0.9">
23
+ <stop offset="0%" stop-color="var(--logo-glow)" stop-opacity="0.58" />
24
+ <stop offset="100%" stop-color="var(--logo-glow)" stop-opacity="0" />
25
+ </radialGradient>
26
+ <radialGradient id="prefix__g3" cx="0.82" cy="0.84" r="0.95">
27
+ <stop offset="0%" stop-color="var(--logo-shade)" stop-opacity="0.35" />
28
+ <stop offset="100%" stop-color="var(--logo-shade)" stop-opacity="0" />
29
+ </radialGradient>
30
+
31
+ <g id="prefix__graph-shape">
32
+ <g fill="none" stroke="var(--edge)" stroke-width="3.2" stroke-linecap="round" stroke-linejoin="round" stroke-opacity="0.9">
33
+ <path d="M136.24 134.567L169.654 124.963" />
34
+ <path d="M169.654 124.963L201.362 137.115" />
35
+ <path d="M201.362 137.115L186.709 175.596" />
36
+ <path d="M186.709 175.596L135.559 213.151" />
37
+ <path d="M135.559 213.151L71.407 180.315" />
38
+ <path d="M71.407 180.315L54.456 117.206" />
39
+ <path d="M54.456 117.206L81.925 68.597" />
40
+ <path d="M81.925 68.597L127.029 52.576" />
41
+ <path d="M127.029 52.576L167.378 60.164" />
42
+ </g>
43
+
44
+ <circle cx="136.24" cy="134.567" r="6.075" fill="var(--n1)" stroke="var(--edge)" stroke-opacity="0.35" stroke-width="1.1" />
45
+ <circle cx="169.654" cy="124.963" r="6.075" fill="var(--n2)" stroke="var(--edge)" stroke-opacity="0.35" stroke-width="1.1" />
46
+ <circle cx="201.362" cy="137.115" r="8.325" fill="var(--n3)" stroke="var(--edge)" stroke-opacity="0.35" stroke-width="1.1" />
47
+ <circle cx="186.709" cy="175.596" r="9.552" fill="var(--n4)" stroke="var(--edge)" stroke-opacity="0.35" stroke-width="1.1" />
48
+ <circle cx="135.559" cy="213.151" r="9.961" fill="var(--n1)" stroke="var(--edge)" stroke-opacity="0.35" stroke-width="1.1" />
49
+ <circle cx="71.407" cy="180.315" r="11.188" fill="var(--n2)" stroke="var(--edge)" stroke-opacity="0.35" stroke-width="1.1" />
50
+ <circle cx="54.456" cy="117.206" r="9.143" fill="var(--n3)" stroke="var(--edge)" stroke-opacity="0.35" stroke-width="1.1" />
51
+ <circle cx="81.925" cy="68.597" r="6.075" fill="var(--n4)" stroke="var(--edge)" stroke-opacity="0.35" stroke-width="1.1" />
52
+ <circle cx="127.029" cy="52.576" r="5.461" fill="var(--n1)" stroke="var(--edge)" stroke-opacity="0.35" stroke-width="1.1" />
53
+ <circle cx="167.378" cy="60.164" r="4.234" fill="var(--n2)" stroke="var(--edge)" stroke-opacity="0.35" stroke-width="1.1" />
54
+ </g>
55
+ </defs>
56
+
57
+ <rect x="16" y="16" width="224" height="224" rx="48" fill="url(#prefix__g)" id="prefix__rect2" />
58
+ <rect x="16" y="16" width="224" height="224" rx="48" fill="url(#prefix__g2)" />
59
+ <rect x="16" y="16" width="224" height="224" rx="48" fill="url(#prefix__g3)" />
60
+
61
+ <g transform="translate(-7.48 -1.11)">
62
+ <use href="#prefix__graph-shape" transform="translate(18 -12)" opacity="0.42" />
63
+
64
+ <g fill="none" stroke="var(--edge)" stroke-width="2.2" stroke-linecap="round" stroke-opacity="0.6">
65
+ <path d="M136.24 134.567L154.24 122.567" />
66
+ <path d="M169.654 124.963L187.654 112.963" />
67
+ <path d="M201.362 137.115L219.362 125.115" />
68
+ <path d="M186.709 175.596L204.709 163.596" />
69
+ <path d="M135.559 213.151L153.559 201.151" />
70
+ <path d="M71.407 180.315L89.407 168.315" />
71
+ <path d="M54.456 117.206L72.456 105.206" />
72
+ <path d="M81.925 68.597L99.925 56.597" />
73
+ <path d="M127.029 52.576L145.029 40.576" />
74
+ <path d="M167.378 60.164L185.378 48.164" />
75
+ </g>
76
+
77
+ <g fill="none" stroke="var(--edge)" stroke-width="1.5" stroke-linecap="round" stroke-opacity="0.38">
78
+ <path d="M136.24 134.567L187.654 112.963" />
79
+ <path d="M169.654 124.963L219.362 125.115" />
80
+ <path d="M201.362 137.115L204.709 163.596" />
81
+ <path d="M186.709 175.596L153.559 201.151" />
82
+ <path d="M135.559 213.151L89.407 168.315" />
83
+ <path d="M71.407 180.315L72.456 105.206" />
84
+ <path d="M54.456 117.206L89.407 168.315" />
85
+ <path d="M81.925 68.597L145.029 40.576" />
86
+ <path d="M127.029 52.576L185.378 48.164" />
87
+ <path d="M167.378 60.164L154.24 122.567" />
88
+ </g>
89
+
90
+ <use href="#prefix__graph-shape" />
91
+ </g>
92
+ </svg>
@@ -0,0 +1,92 @@
1
+ <svg width="256" height="256" viewBox="0 0 256 256" aria-label="Greg logo light" version="1.1" id="prefix__svg2" xmlns="http://www.w3.org/2000/svg">
2
+ <style id="style1">
3
+ :root {
4
+ --logo-bg-1: #646cff;
5
+ --logo-bg-2: #4f55d6;
6
+ --logo-glow: #c9ccff;
7
+ --logo-shade: #2e338c;
8
+ --edge: #ffffff;
9
+ --n1: #ffffff;
10
+ --n2: #eef1ff;
11
+ --n3: #d7ddff;
12
+ --n4: #c2ccff;
13
+ color: var(--edge);
14
+ }
15
+ </style>
16
+
17
+ <defs id="prefix__defs2">
18
+ <linearGradient id="prefix__g" x1="0" y1="0" x2="1" y2="1">
19
+ <stop offset="0%" stop-color="var(--logo-bg-1)" id="prefix__stop1" />
20
+ <stop offset="100%" stop-color="var(--logo-bg-2)" id="prefix__stop2" />
21
+ </linearGradient>
22
+ <radialGradient id="prefix__g2" cx="0.3" cy="0.28" r="0.9">
23
+ <stop offset="0%" stop-color="var(--logo-glow)" stop-opacity="0.58" />
24
+ <stop offset="100%" stop-color="var(--logo-glow)" stop-opacity="0" />
25
+ </radialGradient>
26
+ <radialGradient id="prefix__g3" cx="0.82" cy="0.84" r="0.95">
27
+ <stop offset="0%" stop-color="var(--logo-shade)" stop-opacity="0.35" />
28
+ <stop offset="100%" stop-color="var(--logo-shade)" stop-opacity="0" />
29
+ </radialGradient>
30
+
31
+ <g id="prefix__graph-shape">
32
+ <g fill="none" stroke="var(--edge)" stroke-width="3.2" stroke-linecap="round" stroke-linejoin="round" stroke-opacity="0.9">
33
+ <path d="M136.24 134.567L169.654 124.963" />
34
+ <path d="M169.654 124.963L201.362 137.115" />
35
+ <path d="M201.362 137.115L186.709 175.596" />
36
+ <path d="M186.709 175.596L135.559 213.151" />
37
+ <path d="M135.559 213.151L71.407 180.315" />
38
+ <path d="M71.407 180.315L54.456 117.206" />
39
+ <path d="M54.456 117.206L81.925 68.597" />
40
+ <path d="M81.925 68.597L127.029 52.576" />
41
+ <path d="M127.029 52.576L167.378 60.164" />
42
+ </g>
43
+
44
+ <circle cx="136.24" cy="134.567" r="6.075" fill="var(--n1)" stroke="var(--edge)" stroke-opacity="0.35" stroke-width="1.1" />
45
+ <circle cx="169.654" cy="124.963" r="6.075" fill="var(--n2)" stroke="var(--edge)" stroke-opacity="0.35" stroke-width="1.1" />
46
+ <circle cx="201.362" cy="137.115" r="8.325" fill="var(--n3)" stroke="var(--edge)" stroke-opacity="0.35" stroke-width="1.1" />
47
+ <circle cx="186.709" cy="175.596" r="9.552" fill="var(--n4)" stroke="var(--edge)" stroke-opacity="0.35" stroke-width="1.1" />
48
+ <circle cx="135.559" cy="213.151" r="9.961" fill="var(--n1)" stroke="var(--edge)" stroke-opacity="0.35" stroke-width="1.1" />
49
+ <circle cx="71.407" cy="180.315" r="11.188" fill="var(--n2)" stroke="var(--edge)" stroke-opacity="0.35" stroke-width="1.1" />
50
+ <circle cx="54.456" cy="117.206" r="9.143" fill="var(--n3)" stroke="var(--edge)" stroke-opacity="0.35" stroke-width="1.1" />
51
+ <circle cx="81.925" cy="68.597" r="6.075" fill="var(--n4)" stroke="var(--edge)" stroke-opacity="0.35" stroke-width="1.1" />
52
+ <circle cx="127.029" cy="52.576" r="5.461" fill="var(--n1)" stroke="var(--edge)" stroke-opacity="0.35" stroke-width="1.1" />
53
+ <circle cx="167.378" cy="60.164" r="4.234" fill="var(--n2)" stroke="var(--edge)" stroke-opacity="0.35" stroke-width="1.1" />
54
+ </g>
55
+ </defs>
56
+
57
+ <rect x="16" y="16" width="224" height="224" rx="48" fill="url(#prefix__g)" id="prefix__rect2" />
58
+ <rect x="16" y="16" width="224" height="224" rx="48" fill="url(#prefix__g2)" />
59
+ <rect x="16" y="16" width="224" height="224" rx="48" fill="url(#prefix__g3)" />
60
+
61
+ <g transform="translate(-7.48 -1.11)">
62
+ <use href="#prefix__graph-shape" transform="translate(18 -12)" opacity="0.42" />
63
+
64
+ <g fill="none" stroke="var(--edge)" stroke-width="2.2" stroke-linecap="round" stroke-opacity="0.6">
65
+ <path d="M136.24 134.567L154.24 122.567" />
66
+ <path d="M169.654 124.963L187.654 112.963" />
67
+ <path d="M201.362 137.115L219.362 125.115" />
68
+ <path d="M186.709 175.596L204.709 163.596" />
69
+ <path d="M135.559 213.151L153.559 201.151" />
70
+ <path d="M71.407 180.315L89.407 168.315" />
71
+ <path d="M54.456 117.206L72.456 105.206" />
72
+ <path d="M81.925 68.597L99.925 56.597" />
73
+ <path d="M127.029 52.576L145.029 40.576" />
74
+ <path d="M167.378 60.164L185.378 48.164" />
75
+ </g>
76
+
77
+ <g fill="none" stroke="var(--edge)" stroke-width="1.5" stroke-linecap="round" stroke-opacity="0.38">
78
+ <path d="M136.24 134.567L187.654 112.963" />
79
+ <path d="M169.654 124.963L219.362 125.115" />
80
+ <path d="M201.362 137.115L204.709 163.596" />
81
+ <path d="M186.709 175.596L153.559 201.151" />
82
+ <path d="M135.559 213.151L89.407 168.315" />
83
+ <path d="M71.407 180.315L72.456 105.206" />
84
+ <path d="M54.456 117.206L89.407 168.315" />
85
+ <path d="M81.925 68.597L145.029 40.576" />
86
+ <path d="M127.029 52.576L185.378 48.164" />
87
+ <path d="M167.378 60.164L154.24 122.567" />
88
+ </g>
89
+
90
+ <use href="#prefix__graph-shape" />
91
+ </g>
92
+ </svg>
@@ -0,0 +1,108 @@
1
+ <svg width="256" height="256" viewBox="0 0 256 256" aria-label="Greg logo variant wave G" version="1.1" id="prefix__svg2" xmlns="http://www.w3.org/2000/svg">
2
+ <style id="style1">
3
+ :root {
4
+ --logo-bg-1: #646cff;
5
+ --logo-bg-2: #4f55d6;
6
+ --logo-glow: #c9ccff;
7
+ --logo-shade: #2e338c;
8
+ --edge: #ffffff;
9
+ --n1: #ffffff;
10
+ --n2: #eef1ff;
11
+ --n3: #d7ddff;
12
+ --n4: #c2ccff;
13
+ color: var(--edge);
14
+ }
15
+
16
+ @media (prefers-color-scheme: dark) {
17
+ :root {
18
+ --logo-bg-1: #ff6f61;
19
+ --logo-bg-2: #cf5c52;
20
+ --logo-glow: #ffd4ce;
21
+ --logo-shade: #7a2f2a;
22
+ --edge: #fff7f5;
23
+ --n1: #fff7f5;
24
+ --n2: #ffe8e3;
25
+ --n3: #ffd8d1;
26
+ --n4: #ffc8be;
27
+ }
28
+ }
29
+ </style>
30
+
31
+ <defs id="prefix__defs2">
32
+ <linearGradient id="prefix__g" x1="0" y1="0" x2="1" y2="1">
33
+ <stop offset="0%" stop-color="var(--logo-bg-1)" id="prefix__stop1" />
34
+ <stop offset="100%" stop-color="var(--logo-bg-2)" id="prefix__stop2" />
35
+ </linearGradient>
36
+ <radialGradient id="prefix__g2" cx="0.3" cy="0.28" r="0.9">
37
+ <stop offset="0%" stop-color="var(--logo-glow)" stop-opacity="0.58" />
38
+ <stop offset="100%" stop-color="var(--logo-glow)" stop-opacity="0" />
39
+ </radialGradient>
40
+ <radialGradient id="prefix__g3" cx="0.82" cy="0.84" r="0.95">
41
+ <stop offset="0%" stop-color="var(--logo-shade)" stop-opacity="0.35" />
42
+ <stop offset="100%" stop-color="var(--logo-shade)" stop-opacity="0" />
43
+ </radialGradient>
44
+
45
+ <g id="prefix__graph-shape">
46
+ <g fill="none" stroke="var(--edge)" stroke-width="3.2" stroke-linecap="round" stroke-linejoin="round" stroke-opacity="0.9">
47
+ <path d="M136.24 134.567L169.654 124.963" />
48
+ <path d="M169.654 124.963L201.362 137.115" />
49
+ <path d="M201.362 137.115L186.709 175.596" />
50
+ <path d="M186.709 175.596L135.559 213.151" />
51
+ <path d="M135.559 213.151L71.407 180.315" />
52
+ <path d="M71.407 180.315L54.456 117.206" />
53
+ <path d="M54.456 117.206L81.925 68.597" />
54
+ <path d="M81.925 68.597L127.029 52.576" />
55
+ <path d="M127.029 52.576L167.378 60.164" />
56
+ </g>
57
+
58
+ <circle cx="136.24" cy="134.567" r="6.075" fill="var(--n1)" stroke="var(--edge)" stroke-opacity="0.35" stroke-width="1.1" />
59
+ <circle cx="169.654" cy="124.963" r="6.075" fill="var(--n2)" stroke="var(--edge)" stroke-opacity="0.35" stroke-width="1.1" />
60
+ <circle cx="201.362" cy="137.115" r="8.325" fill="var(--n3)" stroke="var(--edge)" stroke-opacity="0.35" stroke-width="1.1" />
61
+ <circle cx="186.709" cy="175.596" r="9.552" fill="var(--n4)" stroke="var(--edge)" stroke-opacity="0.35" stroke-width="1.1" />
62
+ <circle cx="135.559" cy="213.151" r="9.961" fill="var(--n1)" stroke="var(--edge)" stroke-opacity="0.35" stroke-width="1.1" />
63
+ <circle cx="71.407" cy="180.315" r="11.188" fill="var(--n2)" stroke="var(--edge)" stroke-opacity="0.35" stroke-width="1.1" />
64
+ <circle cx="54.456" cy="117.206" r="9.143" fill="var(--n3)" stroke="var(--edge)" stroke-opacity="0.35" stroke-width="1.1" />
65
+ <circle cx="81.925" cy="68.597" r="6.075" fill="var(--n4)" stroke="var(--edge)" stroke-opacity="0.35" stroke-width="1.1" />
66
+ <circle cx="127.029" cy="52.576" r="5.461" fill="var(--n1)" stroke="var(--edge)" stroke-opacity="0.35" stroke-width="1.1" />
67
+ <circle cx="167.378" cy="60.164" r="4.234" fill="var(--n2)" stroke="var(--edge)" stroke-opacity="0.35" stroke-width="1.1" />
68
+ </g>
69
+ </defs>
70
+
71
+ <rect x="16" y="16" width="224" height="224" rx="48" fill="url(#prefix__g)" id="prefix__rect2" />
72
+ <rect x="16" y="16" width="224" height="224" rx="48" fill="url(#prefix__g2)" />
73
+ <rect x="16" y="16" width="224" height="224" rx="48" fill="url(#prefix__g3)" />
74
+
75
+ <!-- Pseudo-3D graph: back copy in isometric shift + connectors + front copy -->
76
+ <g transform="translate(-7.48 -1.11)">
77
+ <use href="#prefix__graph-shape" transform="translate(18 -12)" opacity="0.42" />
78
+
79
+ <g fill="none" stroke="var(--edge)" stroke-width="2.2" stroke-linecap="round" stroke-opacity="0.6">
80
+ <path d="M136.24 134.567L154.24 122.567" />
81
+ <path d="M169.654 124.963L187.654 112.963" />
82
+ <path d="M201.362 137.115L219.362 125.115" />
83
+ <path d="M186.709 175.596L204.709 163.596" />
84
+ <path d="M135.559 213.151L153.559 201.151" />
85
+ <path d="M71.407 180.315L89.407 168.315" />
86
+ <path d="M54.456 117.206L72.456 105.206" />
87
+ <path d="M81.925 68.597L99.925 56.597" />
88
+ <path d="M127.029 52.576L145.029 40.576" />
89
+ <path d="M167.378 60.164L185.378 48.164" />
90
+ </g>
91
+
92
+ <!-- Diagonal truss connectors between layers -->
93
+ <g fill="none" stroke="var(--edge)" stroke-width="1.5" stroke-linecap="round" stroke-opacity="0.38">
94
+ <path d="M136.24 134.567L187.654 112.963" />
95
+ <path d="M169.654 124.963L219.362 125.115" />
96
+ <path d="M201.362 137.115L204.709 163.596" />
97
+ <path d="M186.709 175.596L153.559 201.151" />
98
+ <path d="M135.559 213.151L89.407 168.315" />
99
+ <path d="M71.407 180.315L72.456 105.206" />
100
+ <path d="M54.456 117.206L89.407 168.315" />
101
+ <path d="M81.925 68.597L145.029 40.576" />
102
+ <path d="M127.029 52.576L185.378 48.164" />
103
+ <path d="M167.378 60.164L154.24 122.567" />
104
+ </g>
105
+
106
+ <use href="#prefix__graph-shape" />
107
+ </g>
108
+ </svg>
@@ -0,0 +1,15 @@
1
+ <!doctype html>
2
+ <html>
3
+
4
+ <head>
5
+ <title>Plain HTML page | Greg</title>
6
+ <meta charset="utf-8" />
7
+ <meta name="robots" content="noindex, nofollow" />
8
+ </head>
9
+
10
+ <body>
11
+ <h1>Not part of the main Greg docs site</h1>
12
+ <div>This page is plain HTML in the <code>public</code> directory.</div>
13
+ </body>
14
+
15
+ </html>
Binary file
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="26.6" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 308"><path fill="#FF3E00" d="M239.682 40.707C211.113-.182 154.69-12.301 113.895 13.69L42.247 59.356a82.198 82.198 0 0 0-37.135 55.056a86.566 86.566 0 0 0 8.536 55.576a82.425 82.425 0 0 0-12.296 30.719a87.596 87.596 0 0 0 14.964 66.244c28.574 40.893 84.997 53.007 125.787 27.016l71.648-45.664a82.182 82.182 0 0 0 37.135-55.057a86.601 86.601 0 0 0-8.53-55.577a82.409 82.409 0 0 0 12.29-30.718a87.573 87.573 0 0 0-14.963-66.244"></path><path fill="#FFF" d="M106.889 270.841c-23.102 6.007-47.497-3.036-61.103-22.648a52.685 52.685 0 0 1-9.003-39.85a49.978 49.978 0 0 1 1.713-6.693l1.35-4.115l3.671 2.697a92.447 92.447 0 0 0 28.036 14.007l2.663.808l-.245 2.659a16.067 16.067 0 0 0 2.89 10.656a17.143 17.143 0 0 0 18.397 6.828a15.786 15.786 0 0 0 4.403-1.935l71.67-45.672a14.922 14.922 0 0 0 6.734-9.977a15.923 15.923 0 0 0-2.713-12.011a17.156 17.156 0 0 0-18.404-6.832a15.78 15.78 0 0 0-4.396 1.933l-27.35 17.434a52.298 52.298 0 0 1-14.553 6.391c-23.101 6.007-47.497-3.036-61.101-22.649a52.681 52.681 0 0 1-9.004-39.849a49.428 49.428 0 0 1 22.34-33.114l71.664-45.677a52.218 52.218 0 0 1 14.563-6.398c23.101-6.007 47.497 3.036 61.101 22.648a52.685 52.685 0 0 1 9.004 39.85a50.559 50.559 0 0 1-1.713 6.692l-1.35 4.116l-3.67-2.693a92.373 92.373 0 0 0-28.037-14.013l-2.664-.809l.246-2.658a16.099 16.099 0 0 0-2.89-10.656a17.143 17.143 0 0 0-18.398-6.828a15.786 15.786 0 0 0-4.402 1.935l-71.67 45.674a14.898 14.898 0 0 0-6.73 9.975a15.9 15.9 0 0 0 2.709 12.012a17.156 17.156 0 0 0 18.404 6.832a15.841 15.841 0 0 0 4.402-1.935l27.345-17.427a52.147 52.147 0 0 1 14.552-6.397c23.101-6.006 47.497 3.037 61.102 22.65a52.681 52.681 0 0 1 9.003 39.848a49.453 49.453 0 0 1-22.34 33.12l-71.664 45.673a52.218 52.218 0 0 1-14.563 6.398"></path></svg>
@@ -24,6 +24,7 @@ import { buildChunks } from './ai/chunker.js';
24
24
  import { MemoryStore } from './ai/stores/memoryStore.js';
25
25
  import { resolveCharacters } from './ai/characters.js';
26
26
  import { RagPipeline } from './ai/ragPipeline.js';
27
+ import { loadGregConfig } from './loadGregConfig.js';
27
28
 
28
29
  /** @typedef {import('../../../types/index.js').AiConfig} AiConfig */
29
30
 
@@ -33,10 +34,9 @@ export function vitePluginAiServer({
33
34
  aiUrl = '/api/ai',
34
35
  ai = /** @type {AiConfig} */ ({}),
35
36
  } = {}) {
36
- // Return a no-op plugin when AI is disabled zero overhead
37
- if (!ai?.enabled) {
38
- return { name: 'greg:ai-server' };
39
- }
37
+ const hasExplicitAiConfig = ai && typeof ai === 'object' && Object.keys(ai).length > 0;
38
+ /** @type {AiConfig} */
39
+ let resolvedAi = hasExplicitAiConfig ? ai : /** @type {AiConfig} */ ({});
40
40
 
41
41
  let resolvedDocsDir;
42
42
  let viteBase = '/';
@@ -47,15 +47,15 @@ export function vitePluginAiServer({
47
47
  let buildPromise = null;
48
48
 
49
49
  async function buildPipeline() {
50
- const provider = await createProvider(ai);
50
+ const provider = await createProvider(resolvedAi);
51
51
  const index = await buildSearchIndex(resolvedDocsDir, srcDir);
52
- const chunks = buildChunks(index, ai?.chunking ?? {});
52
+ const chunks = buildChunks(index, resolvedAi?.chunking ?? {});
53
53
  const store = new MemoryStore();
54
54
  await store.index(chunks);
55
55
 
56
56
  const characters = resolveCharacters(
57
- ai?.characters,
58
- ai?.customCharacters ?? [],
57
+ resolvedAi?.characters,
58
+ resolvedAi?.customCharacters ?? [],
59
59
  );
60
60
 
61
61
  return new RagPipeline(provider, store, characters);
@@ -91,6 +91,11 @@ export function vitePluginAiServer({
91
91
 
92
92
  function middleware() {
93
93
  return async (req, res, next) => {
94
+ if (!resolvedAi?.enabled) {
95
+ next();
96
+ return;
97
+ }
98
+
94
99
  const urlStr = req.url ?? '';
95
100
  const qIdx = urlStr.indexOf('?');
96
101
  const rawPathname = qIdx >= 0 ? urlStr.slice(0, qIdx) : urlStr;
@@ -128,7 +133,7 @@ export function vitePluginAiServer({
128
133
  return;
129
134
  }
130
135
 
131
- const characterId = String(body.character ?? ai?.defaultCharacter ?? 'professional');
136
+ const characterId = String(body.character ?? resolvedAi?.defaultCharacter ?? 'professional');
132
137
  const locale = String(body.locale ?? '');
133
138
 
134
139
  const pipeline = await loadPipeline();
@@ -156,10 +161,19 @@ export function vitePluginAiServer({
156
161
  return {
157
162
  name: 'greg:ai-server',
158
163
 
159
- configResolved(config) {
164
+ async configResolved(config) {
160
165
  const dirs = Array.isArray(docsDir) ? docsDir : [docsDir];
161
166
  resolvedDocsDir = dirs.map(d => path.resolve(config.root, d));
162
167
  viteBase = config.base ?? '/';
168
+
169
+ if (!hasExplicitAiConfig) {
170
+ try {
171
+ const gregConfig = await loadGregConfig();
172
+ resolvedAi = gregConfig?.search?.ai ?? {};
173
+ } catch {
174
+ resolvedAi = {};
175
+ }
176
+ }
163
177
  },
164
178
 
165
179
  configureServer(server) {
@@ -6,6 +6,12 @@ body,
6
6
  scrollbar-color: var(--greg-accent) transparent;
7
7
  }
8
8
 
9
+ .greg,
10
+ .greg * {
11
+ scrollbar-width: thin;
12
+ scrollbar-color: var(--greg-accent) transparent;
13
+ }
14
+
9
15
  html::-webkit-scrollbar,
10
16
  body::-webkit-scrollbar,
11
17
  .greg::-webkit-scrollbar {
@@ -44,6 +50,11 @@ body::-webkit-scrollbar-thumb:hover,
44
50
  height: 6px;
45
51
  }
46
52
 
53
+ .greg *::-webkit-scrollbar {
54
+ width: 6px;
55
+ height: 6px;
56
+ }
57
+
47
58
  .markdown-body *::-webkit-scrollbar-track {
48
59
  background: transparent;
49
60
  }