@compiiile/compiiile 2.20.0 → 2.20.1

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.
@@ -17,7 +17,7 @@
17
17
  }
18
18
  },
19
19
  mounted() {
20
- // This is to delegate folder state to the client instead of the values computed on page load to prevent blinking
20
+ // This is to delegate folder state to the client instead of the values computed on page load to prevent blinking
21
21
  document.getElementById("compiiile-folders-state-style")?.remove()
22
22
  }
23
23
  }
@@ -1,185 +1,185 @@
1
1
  /* Putting the style from the ContentWrapper component here so that no "flash" occur in dev mode with HMR */
2
2
  .page .content-wrapper .markdown-content {
3
- margin-right: calc(var(--toc-width) + 80px);
4
-
5
- h1,
6
- h2,
7
- h3,
8
- h4,
9
- h5 {
10
- &:before {
11
- /* hack to offset scroll on route hash navigation */
12
- padding-top: calc(var(--top-bar-height) - 1px);
13
- margin-top: calc((var(--top-bar-height) - 1px) * -1);
14
- content: " ";
15
- display: block;
16
- }
17
- }
18
-
19
- h2,
20
- h3,
21
- h4,
22
- h5,
23
- h6 {
24
- margin: 20px 0 10px;
25
- }
26
-
27
- h2 {
28
- margin-top: 40px;
29
- }
30
-
31
- p code,
32
- li code,
33
- table code {
34
- padding: 2px 4px;
35
- border-radius: 3px;
36
- background-color: var(--code-background-color);
37
- border: solid 1px var(--code-background-color); /* same color, useful when printing without background graphics */
38
- color: var(--code-color);
39
- font-family: var(--monospace);
40
- font-size: 0.85rem;
41
- }
42
-
43
- p,
44
- ul {
45
- line-height: 1.618rem;
46
- margin-bottom: 1rem;
47
- }
48
-
49
- ul {
50
- padding-left: 40px;
51
- }
52
-
53
- hr {
54
- margin: 40px 0;
55
- background-color: var(--separator-color);
56
- height: 1px;
57
- border: 0;
58
- }
59
-
60
- blockquote {
61
- background-color: var(--blockquote-background-color);
62
- border: solid 1px var(--blockquote-border-color);
63
- border-radius: 8px;
64
- padding: 0.5em 1em;
65
- color: var(--blockquote-color);
66
- margin: 20px 0;
67
-
68
- p {
69
- margin-bottom: 0;
70
- }
71
-
72
- code {
73
- background-color: rgb(169 156 231 / 22%);
74
- }
75
- }
76
-
77
- img {
78
- max-width: 100%;
79
- margin: 20px auto;
80
- display: block;
81
- object-fit: contain;
82
- height: auto;
83
- }
84
-
85
- a {
86
- color: var(--link-color);
87
- }
88
-
89
- table {
90
- padding: 0;
91
- border-collapse: collapse;
92
- margin-bottom: 20px;
93
- display: block;
94
- max-width: 100%;
95
- overflow-x: auto;
96
- }
97
-
98
- table tr {
99
- border-top: 1px solid var(--table-border-color);
100
- background-color: var(--table-odd-lines-background-color);
101
- margin: 0;
102
- padding: 0;
103
- }
104
-
105
- table tr:nth-child(2n) {
106
- background-color: var(--table-even-lines-background-color);
107
- }
108
-
109
- table tr th {
110
- font-weight: bold;
111
- border: 1px solid var(--table-border-color);
112
- text-align: left;
113
- margin: 0;
114
- padding: 6px 13px;
115
- }
116
-
117
- table tr td {
118
- border: 1px solid var(--table-border-color);
119
- text-align: left;
120
- margin: 0;
121
- padding: 6px 13px;
122
- }
123
-
124
- table tr th :first-child,
125
- table tr td :first-child {
126
- margin-top: 0;
127
- }
128
-
129
- table tr th :last-child,
130
- table tr td :last-child {
131
- margin-bottom: 0;
132
- }
133
-
134
- pre code {
135
- margin-bottom: 1rem;
136
- }
137
-
138
- pre.astro-code {
139
- margin-bottom: 20px;
140
- font-size: 0.85rem;
141
- }
142
-
143
- .header-anchor {
144
- float: left;
145
- margin-left: -0.87em;
146
- padding-right: 0.23em;
147
- font-weight: 500;
148
- opacity: 0;
149
- transition: opacity 0.25s;
150
- text-decoration: none;
151
- }
152
-
153
- h1:hover .header-anchor,
154
- h2:hover .header-anchor,
155
- h3:hover .header-anchor,
156
- h4:hover .header-anchor,
157
- h5:hover .header-anchor,
158
- h6:hover .header-anchor,
159
- .header-anchor:focus {
160
- opacity: 1;
161
- }
3
+ margin-right: calc(var(--toc-width) + 80px);
4
+
5
+ h1,
6
+ h2,
7
+ h3,
8
+ h4,
9
+ h5 {
10
+ &:before {
11
+ /* hack to offset scroll on route hash navigation */
12
+ padding-top: calc(var(--top-bar-height) - 1px);
13
+ margin-top: calc((var(--top-bar-height) - 1px) * -1);
14
+ content: " ";
15
+ display: block;
16
+ }
17
+ }
18
+
19
+ h2,
20
+ h3,
21
+ h4,
22
+ h5,
23
+ h6 {
24
+ margin: 20px 0 10px;
25
+ }
26
+
27
+ h2 {
28
+ margin-top: 40px;
29
+ }
30
+
31
+ p code,
32
+ li code,
33
+ table code {
34
+ padding: 2px 4px;
35
+ border-radius: 3px;
36
+ background-color: var(--code-background-color);
37
+ border: solid 1px var(--code-background-color); /* same color, useful when printing without background graphics */
38
+ color: var(--code-color);
39
+ font-family: var(--monospace);
40
+ font-size: 0.85rem;
41
+ }
42
+
43
+ p,
44
+ ul {
45
+ line-height: 1.618rem;
46
+ margin-bottom: 1rem;
47
+ }
48
+
49
+ ul {
50
+ padding-left: 40px;
51
+ }
52
+
53
+ hr {
54
+ margin: 40px 0;
55
+ background-color: var(--separator-color);
56
+ height: 1px;
57
+ border: 0;
58
+ }
59
+
60
+ blockquote {
61
+ background-color: var(--blockquote-background-color);
62
+ border: solid 1px var(--blockquote-border-color);
63
+ border-radius: 8px;
64
+ padding: 0.5em 1em;
65
+ color: var(--blockquote-color);
66
+ margin: 20px 0;
67
+
68
+ p {
69
+ margin-bottom: 0;
70
+ }
71
+
72
+ code {
73
+ background-color: rgb(169 156 231 / 22%);
74
+ }
75
+ }
76
+
77
+ img {
78
+ max-width: 100%;
79
+ margin: 20px auto;
80
+ display: block;
81
+ object-fit: contain;
82
+ height: auto;
83
+ }
84
+
85
+ a {
86
+ color: var(--link-color);
87
+ }
88
+
89
+ table {
90
+ padding: 0;
91
+ border-collapse: collapse;
92
+ margin-bottom: 20px;
93
+ display: block;
94
+ max-width: 100%;
95
+ overflow-x: auto;
96
+ }
97
+
98
+ table tr {
99
+ border-top: 1px solid var(--table-border-color);
100
+ background-color: var(--table-odd-lines-background-color);
101
+ margin: 0;
102
+ padding: 0;
103
+ }
104
+
105
+ table tr:nth-child(2n) {
106
+ background-color: var(--table-even-lines-background-color);
107
+ }
108
+
109
+ table tr th {
110
+ font-weight: bold;
111
+ border: 1px solid var(--table-border-color);
112
+ text-align: left;
113
+ margin: 0;
114
+ padding: 6px 13px;
115
+ }
116
+
117
+ table tr td {
118
+ border: 1px solid var(--table-border-color);
119
+ text-align: left;
120
+ margin: 0;
121
+ padding: 6px 13px;
122
+ }
123
+
124
+ table tr th :first-child,
125
+ table tr td :first-child {
126
+ margin-top: 0;
127
+ }
128
+
129
+ table tr th :last-child,
130
+ table tr td :last-child {
131
+ margin-bottom: 0;
132
+ }
133
+
134
+ pre code {
135
+ margin-bottom: 1rem;
136
+ }
137
+
138
+ pre.astro-code {
139
+ margin-bottom: 20px;
140
+ font-size: 0.85rem;
141
+ }
142
+
143
+ .header-anchor {
144
+ float: left;
145
+ margin-left: -0.87em;
146
+ padding-right: 0.23em;
147
+ font-weight: 500;
148
+ opacity: 0;
149
+ transition: opacity 0.25s;
150
+ text-decoration: none;
151
+ }
152
+
153
+ h1:hover .header-anchor,
154
+ h2:hover .header-anchor,
155
+ h3:hover .header-anchor,
156
+ h4:hover .header-anchor,
157
+ h5:hover .header-anchor,
158
+ h6:hover .header-anchor,
159
+ .header-anchor:focus {
160
+ opacity: 1;
161
+ }
162
162
  }
163
163
 
164
164
  .siblings {
165
- display: flex;
166
- margin-right: calc(var(--toc-width) + 80px);
167
- color: var(--link-color);
168
- margin-top: 80px;
169
- gap: 20px;
170
- flex-wrap: wrap;
171
-
172
- .sibling-link {
173
- text-decoration: none;
174
- border-radius: 2px;
175
-
176
- &:focus-visible {
177
- outline: solid 1px var(--separator-color);
178
- }
179
- }
180
-
181
- .sibling-link--next {
182
- text-align: right;
183
- margin-left: auto;
184
- }
165
+ display: flex;
166
+ margin-right: calc(var(--toc-width) + 80px);
167
+ color: var(--link-color);
168
+ margin-top: 80px;
169
+ gap: 20px;
170
+ flex-wrap: wrap;
171
+
172
+ .sibling-link {
173
+ text-decoration: none;
174
+ border-radius: 2px;
175
+
176
+ &:focus-visible {
177
+ outline: solid 1px var(--separator-color);
178
+ }
179
+ }
180
+
181
+ .sibling-link--next {
182
+ text-align: right;
183
+ margin-left: auto;
184
+ }
185
185
  }
package/bin/config.js CHANGED
@@ -13,7 +13,7 @@ import { createRequire } from "node:module"
13
13
  import { packageDirectory } from "package-directory"
14
14
 
15
15
  import { loadConfig } from "./loadConfig.js"
16
- import Context from "./vitePluginCompiiile/models/Context.js";
16
+ import Context from "./vitePluginCompiiile/models/Context.js"
17
17
 
18
18
  const { argv, localIntegrations, configFromFile, source, hasPublicFiles, publicDir } = await loadConfig()
19
19
 
@@ -60,11 +60,17 @@ const astroConfig = {
60
60
  {
61
61
  name: "include-dependencies",
62
62
  hooks: {
63
+ // fixing packages not included for certain environments (like 'piccolore' when installed globally)
63
64
  "astro:build:setup": ({ updateConfig }) => {
64
65
  updateConfig({
65
- vite: {
66
- ssr: {
67
- noExternal: true
66
+ ssr: {
67
+ noExternal: true
68
+ },
69
+ environments: {
70
+ prerender: {
71
+ resolve: {
72
+ noExternal: true
73
+ }
68
74
  }
69
75
  }
70
76
  })
@@ -1,12 +1,9 @@
1
- import Context from "./models/Context.js"
2
1
  import { createMarkdownProcessor } from "@astrojs/markdown-remark"
3
- import {rehypePlugins, remarkPlugins, shikiConfig} from "./markdownConfig.js"
2
+ import { rehypePlugins, remarkPlugins, shikiConfig } from "./markdownConfig.js"
4
3
  import path from "node:path"
5
4
  import { loadConfig } from "../loadConfig.js"
6
5
  import { promises as fs } from "node:fs"
7
6
 
8
- const source = "."
9
-
10
7
  const pathFromSource = (filePath) => {
11
8
  return filePath?.replace(process.env.COMPIIILE_SOURCE + "/", "")
12
9
  }
@@ -43,7 +40,11 @@ export default function compiiile(sharedContext) {
43
40
 
44
41
  const routeListItem = sharedContext.routeList.find((route) => route.fullPath === absolutePath)
45
42
 
46
- const markdownProcessor = await createMarkdownProcessor({remarkPlugins, rehypePlugins: rehypePlugins(sharedContext), shikiConfig})
43
+ const markdownProcessor = await createMarkdownProcessor({
44
+ remarkPlugins,
45
+ rehypePlugins: rehypePlugins(sharedContext),
46
+ shikiConfig
47
+ })
47
48
  const renderedMarkdown = await markdownProcessor.render(content)
48
49
 
49
50
  const title = sharedContext.getFileTitleFromProcessedMarkdown(renderedMarkdown)
@@ -5,7 +5,7 @@ import rehypeSlug from "rehype-slug"
5
5
  import rehypeAutolinkHeadings from "rehype-autolink-headings"
6
6
  import { h } from "hastscript"
7
7
  import rehypeHandleYamlMatterPlugin from "./rehypeHandleYamlMatterPlugin.js"
8
- import { unified } from '@astrojs/markdown-remark';
8
+ import { unified } from "@astrojs/markdown-remark"
9
9
 
10
10
  export const remarkPlugins = [remarkEmoji]
11
11
  export const rehypePlugins = (sharedContext) => [
@@ -5,7 +5,7 @@ import FileListItem from "./FileListItem.js"
5
5
  import FilesTreeItem from "./FilesTreeItem.js"
6
6
  import RouteListItem from "./RouteListItem.js"
7
7
  import { createMarkdownProcessor } from "@astrojs/markdown-remark"
8
- import {remarkPlugins, rehypePlugins, shikiConfig} from "../markdownConfig.js"
8
+ import { remarkPlugins, rehypePlugins, shikiConfig } from "../markdownConfig.js"
9
9
  import { unemojify } from "node-emoji"
10
10
  import slugify from "slugify"
11
11
  import parseIgnore from "parse-gitignore"
@@ -152,7 +152,11 @@ export default class {
152
152
  encoding: "utf8"
153
153
  })
154
154
 
155
- const markdownProcessor = await createMarkdownProcessor({remarkPlugins, rehypePlugins: rehypePlugins(this), shikiConfig})
155
+ const markdownProcessor = await createMarkdownProcessor({
156
+ remarkPlugins,
157
+ rehypePlugins: rehypePlugins(this),
158
+ shikiConfig
159
+ })
156
160
  const renderedMarkdown = await markdownProcessor.render(markdownContent)
157
161
 
158
162
  fileListItem.textContent = unemojify(
@@ -11,7 +11,7 @@ export default function rehypeLinkPlugin(sharedContext) {
11
11
  const filePath = decodedFilePath.replace(process.env.COMPIIILE_SOURCE, "")
12
12
 
13
13
  node.properties.href = sharedContext?.fileRouteMap?.[filePath.substring(1)] + linkTargetUrl.hash
14
- } else if(!node.properties.href.startsWith("#")){
14
+ } else if (!node.properties.href.startsWith("#")) {
15
15
  node.properties.target = "_blank"
16
16
  }
17
17
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@compiiile/compiiile",
3
3
  "private": false,
4
- "version": "2.20.0",
4
+ "version": "2.20.1",
5
5
  "description": "The most convenient way to render a folder containing markdown files. Previewing and searching markdown files has never been that easy.",
6
6
  "author": "AlbanCrepel <alban.crepel@gmail.com>",
7
7
  "license": "GPL-3.0-only",
@@ -21,10 +21,10 @@
21
21
  "url": "git+https://github.com/compiiile/compiiile.git"
22
22
  },
23
23
  "dependencies": {
24
- "@astrojs/markdown-remark": "^7.2.0",
25
- "@astrojs/mdx": "^7.0.0",
24
+ "@astrojs/markdown-remark": "^7.2.1",
25
+ "@astrojs/mdx": "^7.0.2",
26
26
  "@astrojs/sitemap": "^3.7.3",
27
- "@astrojs/vue": "^7.0.0",
27
+ "@astrojs/vue": "^7.0.1",
28
28
  "@babel/core": "^7.28.5",
29
29
  "@babel/eslint-parser": "^7.28.5",
30
30
  "@babel/parser": "^7.28.5",
@@ -35,7 +35,7 @@
35
35
  "@fontsource-variable/dm-sans": "^5.2.8",
36
36
  "@fontsource-variable/jetbrains-mono": "^5.2.8",
37
37
  "@phosphor-icons/web": "^2.1.2",
38
- "astro": "^7.0.3",
38
+ "astro": "^7.0.7",
39
39
  "astro-seo": "^1.1.0",
40
40
  "c12": "^3.3.4",
41
41
  "eslint": "^9.39.2",
@@ -49,6 +49,7 @@
49
49
  "node-emoji": "^2.2.0",
50
50
  "package-directory": "^8.1.0",
51
51
  "parse-gitignore": "^2.0.0",
52
+ "piccolore": "^0.1.3",
52
53
  "prettier": "^3.7.4",
53
54
  "rehype-autolink-headings": "^7.1.0",
54
55
  "rehype-slug": "^6.0.0",
@@ -58,7 +59,7 @@
58
59
  "typescript": "^5.9.3",
59
60
  "uuid": "^13.0.0",
60
61
  "vfile-matter": "^5.0.1",
61
- "vite": "^8.1.0",
62
+ "vite": "^8.1.4",
62
63
  "vue": "^3.5.39",
63
64
  "yargs": "^18.0.0",
64
65
  "zod": "^3.25.76"
@@ -1,23 +0,0 @@
1
- /* eslint-disable */
2
- // @ts-nocheck
3
- // Generated by unplugin-vue-components
4
- // Read more: https://github.com/vuejs/core/pull/3399
5
- export {}
6
-
7
- /* prettier-ignore */
8
- declare module 'vue' {
9
- export interface GlobalComponents {
10
- ClientScript: typeof import('./src/components/ClientScript.vue')['default']
11
- ContentWrapper: typeof import('./src/components/ContentWrapper.vue')['default']
12
- FilesTree: typeof import('./src/components/layout/navBar/FilesTree.vue')['default']
13
- HamburgerButton: typeof import('./src/components/layout/HamburgerButton.vue')['default']
14
- NavBar: typeof import('./src/components/layout/navBar/NavBar.vue')['default']
15
- NavListItem: typeof import('./src/components/layout/navBar/NavListItem.vue')['default']
16
- SearchBar: typeof import('./src/components/searchBar/SearchBar.vue')['default']
17
- SearchResult: typeof import('./src/components/searchBar/SearchResult.vue')['default']
18
- SlidesContent: typeof import('./src/components/SlidesContent.vue')['default']
19
- TableOfContent: typeof import('./src/components/TableOfContent.vue')['default']
20
- ThemeSwitcher: typeof import('./src/components/layout/ThemeSwitcher.vue')['default']
21
- TopBar: typeof import('./src/components/layout/TopBar.vue')['default']
22
- }
23
- }