Skip to content

Commit

Permalink
merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
JimTacobs committed Dec 17, 2024
2 parents 2c3e09b + 90fdeb8 commit 6e631d6
Show file tree
Hide file tree
Showing 596 changed files with 6,344 additions and 5,826 deletions.
5 changes: 0 additions & 5 deletions .changeset/calm-walls-wave.md

This file was deleted.

9 changes: 0 additions & 9 deletions .changeset/mighty-walls-shake.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/six-snakes-joke.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/stale-files-learn.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/strange-pets-relax.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/tidy-bats-confess.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/unlucky-dogs-help.md

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
---
name: "\U0001F4DA Documentation or README.md issue report"
about: Report an issue in the project's documentation or README.md file.
title: ''
title: ""
labels: documentation
assignees: ''

assignees: ""
---

# **📚 Documentation Issue Report**

## **Describe the bug**

<!-- A clear and concise description of what the bug is. -->

*

---
- ***

### **To Reproduce**

Expand All @@ -35,18 +33,19 @@ assignees: ''
---

### **Media prove**

<!-- If applicable, add screenshots or videos to help explain your problem. -->

---

## **Describe the solution you'd like**
<!-- A clear and concise description of what you want to happen. -->

*
<!-- A clear and concise description of what you want to happen. -->

---
- ***

### **Additional context**

<!-- Add any other context or additional information about the problem here.-->

*
-
3 changes: 2 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,11 @@ updates:
- "@faker*"
- "@codspeed/*"
- "@playwright*"
prettier:
linter:
patterns:
- "prettier"
- "@types/prettier"
- "@biome/*"
vue:
patterns:
- "vue"
Expand Down
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pnpm run lint
pnpm generateAutomd
prettier $(git diff --cached --name-only --diff-filter=ACMR | sed 's| |\\ |g') --write --ignore-unknown
biome format --write --no-errors-on-unmatched $(git diff --cached --name-only --diff-filter=ACMR | sed 's| |\\ |g')
git update-index --again
9 changes: 8 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@
"typescript.tsdk": "node_modules/typescript/lib",
"todo-tree.tree.showCountsInTree": true,
"[vue]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
"editor.defaultFormatter": "biomejs.biome"
},
"editor.defaultFormatter": "biomejs.biome",
"[json]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[typescript]": {
"editor.defaultFormatter": "biomejs.biome"
}
}
2 changes: 1 addition & 1 deletion apps/docs/.vitepress/config.hub.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { CmsBaseReference } from "./theme/typer/cms-base-plugin";
import { ComposablesBuilder } from "./theme/typer/composables-builder";
import { ReadmeBasedReference } from "./theme/typer/plugin";
import { ReadmeLoader } from "./theme/typer/readme-loader";
import { ComposablesBuilder } from "./theme/typer/composables-builder";

/**
* This file extends the DevHub VitePress configuration.
Expand Down
10 changes: 5 additions & 5 deletions apps/docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { resolve } from "node:path";
import { baseConfig } from "@shopware-docs/vitepress";
import { defineConfigWithTheme } from "vitepress";
import { SearchPlugin } from "vitepress-plugin-search";
import type { Config as ThemeConfig } from "vitepress-shopware-docs";
import { baseConfig } from "@shopware-docs/vitepress";
import sharedConfig from "./config.hub";
import nav from "./navigation";
import { resolve } from "path";
import { sidebar } from "./sidebar";
import sharedConfig from "./config.hub";
import { SearchPlugin } from "vitepress-plugin-search";

interface ThemeConfigExtended extends ThemeConfig {
ai: {
Expand Down Expand Up @@ -113,7 +113,7 @@ export default defineConfigWithTheme<ThemeConfigExtended>(
vite: {
build: {
minify: "terser",
chunkSizeWarningLimit: Infinity,
chunkSizeWarningLimit: Number.POSITIVE_INFINITY,
ssr: false,
rollupOptions: {
output: {
Expand Down
6 changes: 3 additions & 3 deletions apps/docs/.vitepress/data/composables.data.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { defineLoader } from "vitepress";
import { resolve, dirname } from "path";
import { readdirSync } from "node:fs";
import { dirname, resolve } from "node:path";
import { extract } from "ts-dox";
import { readdirSync } from "fs";
import { defineLoader } from "vitepress";
export interface Data {
composablesList: { text: string; link: string; category: string }[];
}
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/.vitepress/navigation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const nav = [
},
{
text: "Resources",
activeMatch: `^/(api)`,
activeMatch: "^/(api)",
items: [
{
text: "HTTP APIs",
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/.vitepress/theme/components/AI.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script setup>
import { ref, reactive } from "vue";
import { reactive, ref } from "vue";
import { useAi } from "../composables/useAi";
import AIAnswer from "./AIAnswer.vue";
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/.vitepress/theme/components/AIAnswer.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script setup>
import { useAi } from "../composables/useAi";
import { ref } from "vue";
import { useAi } from "../composables/useAi";
const props = defineProps({
answer: Object,
Expand Down
8 changes: 4 additions & 4 deletions apps/docs/.vitepress/theme/components/ComposablesList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,17 @@ import { normalizeAnchorText } from "../typer/utils";
const categoryTreeData = computed(() => {
const categoryTree: { [key: string]: string[] } = {};
data.composablesList.forEach((composable) => {
for (const composable of data.composablesList) {
const categories = composable.category.split(",");
categories.forEach((category) => {
for (const category of categories) {
if (!categoryTree[category]) {
categoryTree[category] = [];
}
categoryTree[category].push(composable.text);
});
});
}
}
return categoryTree;
});
Expand Down
14 changes: 7 additions & 7 deletions apps/docs/.vitepress/theme/components/PageRef.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,21 @@
</template>

<script>
import { useAttrs, ref } from "vue";
import { ref, useAttrs } from "vue";
export default {
setup() {
let attrs = useAttrs();
const attrs = useAttrs();
let title = ref(attrs.title);
const title = ref(attrs.title);
let page = ref(attrs.page);
const page = ref(attrs.page);
let icon = ref(attrs.icon || "");
const icon = ref(attrs.icon || "");
let sub = ref(attrs.sub || "");
const sub = ref(attrs.sub || "");
let target = ref(attrs.target || "");
const target = ref(attrs.target || "");
return {
title,
Expand Down
16 changes: 5 additions & 11 deletions apps/docs/.vitepress/theme/composables/useAi.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useData } from "vitepress";
import { QueryResponse, Answer } from "../types";
import type { Answer, QueryResponse } from "../types";

type UseAiReturn = {
sendQueryRequest: (query: string) => Promise<QueryResponse>;
Expand Down Expand Up @@ -83,18 +83,12 @@ export function useAi(): UseAiReturn {
let text = answer.context;
let offset = 0;

answer.offsets_in_context.forEach((element) => {
text =
text.slice(0, element.start + offset) +
"<mark>" +
text.slice(element.start + offset);
for (const element of answer.offsets_in_context) {
text = `${text.slice(0, element.start + offset)}<mark>${text.slice(element.start + offset)}`;
offset += 6;
text =
text.slice(0, element.end + offset) +
"</mark>" +
text.slice(element.end + offset);
text = `${text.slice(0, element.end + offset)}</mark>${text.slice(element.end + offset)}`;
offset += 7;
});
}

return text;
};
Expand Down
24 changes: 12 additions & 12 deletions apps/docs/.vitepress/theme/custom.css
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
.vt-doc table {
width: 100%;
display: table;
width: 100%;
display: table;
}

.DocSearch-Button-Placeholder,
.DocSearch-Search-Icon,
.DocSearch-Button-Key,
.DocSearch-Button:hover .DocSearch-Search-Icon {
color: var(--vt-c-white);
color: var(--vt-c-white);
}

.search-item:hover,
.VPPluginSearch-search-item:hover,
.DocSearch-Button:hover .DocSearch-Button-Placeholder {
color: var(--vt-c-blue);
color: var(--vt-c-blue);
}

.group .VPSidebarGroup .VPSidebarGroup {
margin-left: .6rem;
margin-left: .6rem;
}

.group .VPSidebarGroup .VPSidebarGroup h2.title-text {
font-size: 11px;
font-size: 11px;
}

h1 + p > a {
display: inline-block;
margin-right: 10px;
display: inline-block;
margin-right: 10px;
}

/**
* Fix for anchor position
*/
* Fix for anchor position
*/
.vt-doc h3 > code + a.header-anchor::before,
.vt-doc h2 > a.header-anchor::before,
.vt-doc h3 > a.header-anchor::before {
content: "#";
}
content: "#";
}
4 changes: 2 additions & 2 deletions apps/docs/.vitepress/theme/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// import './styles/index.css'
import { App } from "vue";
import { SWAGTheme } from "vitepress-shopware-docs";
// import './styles/index.css'
import type { App } from "vue";
// Ai component
// import AI from "./components/AI.vue";
import "./custom.css";
Expand Down
16 changes: 9 additions & 7 deletions apps/docs/.vitepress/theme/typer/cms-base-plugin.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import { resolve } from "node:path";
import { findSync } from "find-in-files";
// @ts-nocheck
import type { Plugin } from "vite";
import { resolve } from "path";
import { findSync } from "find-in-files";

import { readFileSync, readdirSync } from "node:fs";
import {
getToggleContainer,
getWrappedCodeBlock,
prepareGithubPermalink,
replacer,
} from "./utils";
import { readdirSync, readFileSync } from "node:fs";

export async function CmsBaseReference({
projectRootDir,
Expand All @@ -26,8 +26,10 @@ export async function CmsBaseReference({
const [pkg, fileName] = id.split("/").slice(-2);
const packageName = fileName.replace(/\.md$/, "");

let transformedCode = code;

if (pkg !== "packages" || packageName !== "cms-base") {
return code;
return transformedCode;
}

let API = "\n\n## Available components\n\n";
Expand All @@ -42,7 +44,7 @@ export async function CmsBaseReference({

API += `### \`${component.name.replace(".vue", "")}\`\n`;
API += prepareGithubPermalink({
label: `source code`,
label: "source code",
path: `${component.path.split("frontends/").pop().replace("/vercel/path0/", "")}/${component.name}`,
project: "shopware/frontends",
});
Expand All @@ -64,9 +66,9 @@ export async function CmsBaseReference({
API += "\n\n";

// place it before the changelog
code = replacer(code, API, "", "tail");
transformedCode = replacer(transformedCode, API, "", "tail");

return code;
return transformedCode;
},
};
}
Loading

0 comments on commit 6e631d6

Please sign in to comment.