@yoopta/code 6.0.0-beta.4 → 6.0.0-beta.6

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.
@@ -1,3 +1,24 @@
1
1
  export declare const PRETTIER_PARSER_MAP: Record<string, string>;
2
- export declare const PLUGIN_LOADERS: Record<string, () => Promise<any[]>>;
2
+ export declare const PLUGIN_LOADERS: Record<string, () => Promise<unknown[]>>;
3
+ export type FormatCodeOptions = {
4
+ printWidth?: number;
5
+ tabWidth?: number;
6
+ useTabs?: boolean;
7
+ semi?: boolean;
8
+ singleQuote?: boolean;
9
+ trailingComma?: 'all' | 'es5' | 'none';
10
+ };
11
+ /**
12
+ * Formats code using Prettier with lazy-loaded plugins.
13
+ * Returns the original code if formatting fails or language is not supported.
14
+ */
15
+ export declare function formatCode(code: string, language: string, options?: FormatCodeOptions): Promise<{
16
+ formatted: string;
17
+ success: boolean;
18
+ error?: string;
19
+ }>;
20
+ /**
21
+ * Checks if a language is supported by Prettier
22
+ */
23
+ export declare function isLanguageSupported(language: string): boolean;
3
24
  //# sourceMappingURL=prettier.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"prettier.d.ts","sourceRoot":"","sources":["../../src/utils/prettier.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CA+BtD,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,OAAO,CAAC,GAAG,EAAE,CAAC,CA6B/D,CAAC"}
1
+ {"version":3,"file":"prettier.d.ts","sourceRoot":"","sources":["../../src/utils/prettier.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CA+BtD,CAAC;AAGF,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,OAAO,CAAC,OAAO,EAAE,CAAC,CAwCnE,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,aAAa,CAAC,EAAE,KAAK,GAAG,KAAK,GAAG,MAAM,CAAC;CACxC,CAAC;AAWF;;;GAGG;AACH,wBAAsB,UAAU,CAC9B,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,EAChB,OAAO,GAAE,iBAAsB,GAC9B,OAAO,CAAC;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAsClE;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAE7D"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yoopta/code",
3
- "version": "6.0.0-beta.4",
3
+ "version": "6.0.0-beta.6",
4
4
  "description": "Code plugin with syntax highlighting for Yoopta Editor",
5
5
  "author": "Darginec05 <devopsbanda@gmail.com>",
6
6
  "homepage": "https://github.com/Darginec05/Yoopta-Editor#readme",
@@ -14,7 +14,7 @@
14
14
  "dist/"
15
15
  ],
16
16
  "peerDependencies": {
17
- "@yoopta/editor": ">=4.9.9",
17
+ "@yoopta/editor": "6.0.0-beta.4",
18
18
  "react": ">=18.2.0",
19
19
  "react-dom": ">=18.2.0"
20
20
  },
@@ -42,5 +42,5 @@
42
42
  "bugs": {
43
43
  "url": "https://github.com/Darginec05/Yoopta-Editor/issues"
44
44
  },
45
- "gitHead": "7259edee990882228148adcca6a6adafa1aa8b03"
45
+ "gitHead": "4c99cc586ce4c17cd837e3136a068121af44cc8f"
46
46
  }