@qualcomm-ui/mdx-vite 2.2.1 → 2.4.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/README.md CHANGED
@@ -6,8 +6,7 @@ This package provides Vite plugins for building documentation sites with MDX, in
6
6
 
7
7
  For documentation and usage guides:
8
8
 
9
- - [React documentation](https://react-next.qui.qualcomm.com/)
10
- - [Angular documentation](https://angular-next.qui.qualcomm.com/)
9
+ - [QUI Docs documentation](https://docs-next.qui.qualcomm.com/)
11
10
 
12
11
  ## License
13
12
 
@@ -12,6 +12,12 @@ export interface AngularDemoPluginOptions {
12
12
  dark: ThemeRegistrationRaw | ThemeRegistration | ThemeRegistrationResolved | string;
13
13
  light: ThemeRegistrationRaw | ThemeRegistration | ThemeRegistrationResolved | string;
14
14
  };
15
+ /**
16
+ * When enabled, transforms Tailwind class names to inline styles in the
17
+ * highlighted code. Non-inlineable classes (hover:, sm:, etc.) are kept as
18
+ * className and their CSS rules are aggregated into a residual-css entry.
19
+ */
20
+ transformTailwindStyles?: boolean;
15
21
  }
16
- export declare function angularDemoPlugin({ demoPattern, initialHtml, routesDir, theme, }?: AngularDemoPluginOptions): Plugin;
22
+ export declare function angularDemoPlugin({ demoPattern, initialHtml, routesDir, theme, transformTailwindStyles, }?: AngularDemoPluginOptions): Plugin;
17
23
  //# sourceMappingURL=angular-demo-plugin.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"angular-demo-plugin.d.ts","sourceRoot":"","sources":["../../src/angular-demo-plugin/angular-demo-plugin.ts"],"names":[],"mappings":"AAQA,OAAO,EAGL,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,EACzB,KAAK,yBAAyB,EAC/B,MAAM,OAAO,CAAA;AAEd,OAAO,KAAK,EAAC,MAAM,EAAgB,MAAM,MAAM,CAAA;AAe/C,MAAM,WAAW,wBAAwB;IACvC,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;IAC/B;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACpC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,KAAK,CAAC,EAAE;QACN,IAAI,EACA,oBAAoB,GACpB,iBAAiB,GACjB,yBAAyB,GACzB,MAAM,CAAA;QACV,KAAK,EACD,oBAAoB,GACpB,iBAAiB,GACjB,yBAAyB,GACzB,MAAM,CAAA;KACX,CAAA;CACF;AA8BD,wBAAgB,iBAAiB,CAAC,EAChC,WAAwC,EACxC,WAAW,EACX,SAAwB,EACxB,KAGC,GACF,GAAE,wBAA6B,GAAG,MAAM,CAo6BxC"}
1
+ {"version":3,"file":"angular-demo-plugin.d.ts","sourceRoot":"","sources":["../../src/angular-demo-plugin/angular-demo-plugin.ts"],"names":[],"mappings":"AAQA,OAAO,EAGL,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,EACzB,KAAK,yBAAyB,EAC/B,MAAM,OAAO,CAAA;AAEd,OAAO,KAAK,EAAC,MAAM,EAAgB,MAAM,MAAM,CAAA;AAiB/C,MAAM,WAAW,wBAAwB;IACvC,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;IAC/B;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACpC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,KAAK,CAAC,EAAE;QACN,IAAI,EACA,oBAAoB,GACpB,iBAAiB,GACjB,yBAAyB,GACzB,MAAM,CAAA;QACV,KAAK,EACD,oBAAoB,GACpB,iBAAiB,GACjB,yBAAyB,GACzB,MAAM,CAAA;KACX,CAAA;IACD;;;;OAIG;IACH,uBAAuB,CAAC,EAAE,OAAO,CAAA;CAClC;AAmCD,wBAAgB,iBAAiB,CAAC,EAChC,WAAwC,EACxC,WAAW,EACX,SAAwB,EACxB,KAGC,EACD,uBAAuB,GACxB,GAAE,wBAA6B,GAAG,MAAM,CAq+BxC"}
package/dist/cli.js CHANGED
@@ -5782,12 +5782,20 @@ async function generateLlmsTxt(pages, projectName, description, baseUrl) {
5782
5782
  const lines = [
5783
5783
  getIntroLines(pages, projectName, description, baseUrl)
5784
5784
  ];
5785
- lines.push("## Documentation Content");
5786
5785
  lines.push("");
5787
5786
  for (const page of pages) {
5788
- lines.push(`# ${page.title}`);
5787
+ const content = page.content.split("\n").map((line) => {
5788
+ if (line.startsWith("#")) {
5789
+ return `#${line}`;
5790
+ }
5791
+ return line;
5792
+ });
5793
+ if (content.every((line) => !line.trim())) {
5794
+ continue;
5795
+ }
5796
+ lines.push(`## ${page.title}`);
5789
5797
  lines.push("");
5790
- lines.push(page.content);
5798
+ lines.push(content.join("\n"));
5791
5799
  lines.push("");
5792
5800
  }
5793
5801
  return lines.join("\n");