PluginProbe
Code Block Pro – Beautiful Syntax Highlighting / 1.13.0
Code Block Pro – Beautiful Syntax Highlighting v1.13.0
1.27.1 1.27.2 1.27.3 1.27.4 1.27.5 1.27.6 1.27.7 1.28.0 1.3.0 1.4.0 1.5.0 1.5.1 1.5.2 1.6.0 1.7.0 1.8.0 1.9.0 1.9.1 1.9.2 1.9.3 trunk 1.1.0 1.10.0 1.11.0 1.11.1 All 63 releases
← All changes | src/state/theme.ts +12 -9 1.7.01.13.0 View file →
@@ -5,14 +5,15 @@
5 5
6 6 type ThemeType = {
7 7 previousTheme: string;
8 8 previousLineHeight: string;
9 - previousFontFamily: string;
9 + previousFontFamily?: string;
10 10 previousFontSize: string;
11 11 previousHeaderType: string;
12 - previousClampFonts: boolean;
13 - previousDisablePadding: boolean;
14 - previousLineNumbers: boolean;
12 + previousFooterType?: string;
13 + previousClampFonts?: boolean;
14 + previousDisablePadding?: boolean;
15 + previousLineNumbers?: boolean;
15 16 updateThemeHistory: (settings: Partial<Attributes>) => void;
16 17 };
17 18 const path = '/wp/v2/settings';
18 19 const getSettings = async (name: string) => {
@@ -26,14 +27,15 @@
26 27 devtools(
27 28 (set) => ({
28 29 previousTheme: 'nord',
29 30 previousLineHeight: '1.25rem',
30 - previousFontFamily: '',
31 + previousFontFamily: undefined,
31 32 previousFontSize: '.875rem',
32 33 previousHeaderType: 'headlights',
33 - previousClampFonts: false,
34 - previousDisablePadding: false,
35 - previousLineNumbers: false,
34 + previousFooterType: undefined,
35 + previousClampFonts: undefined,
36 + previousDisablePadding: undefined,
37 + previousLineNumbers: undefined,
36 38 updateThemeHistory(attributes) {
37 39 set((state) => ({
38 40 ...state,
39 41 previousTheme: attributes.theme,
@@ -40,8 +42,9 @@
40 42 previousLineHeight: attributes.lineHeight,
41 43 previousFontFamily: attributes.fontFamily,
42 44 previousFontSize: attributes.fontSize,
43 45 previousHeaderType: attributes.headerType,
46 + previousFooterType: attributes.footerType,
44 47 previousClampFonts: attributes.clampFonts,
45 48 previousDisablePadding: attributes.disablePadding,
46 49 previousLineNumbers: attributes.lineNumbers,
47 50 }));
@@ -54,9 +57,9 @@
54 57 getStorage: () => ({
55 58 getItem: async (name: string) => {
56 59 const settings = await getSettings(name);
57 60 return JSON.stringify({
58 - version: settings.version,
61 + version: settings?.version ?? 0,
59 62 state: settings,
60 63 });
61 64 },
62 65 setItem: async (name: string, value: string) => {