PluginProbe
Code Snippets / trunk
Code Snippets vtrunk
4.0.0-beta.2 3.10.2 3.10.1 3.10.0 3.10.0-beta.2 3.10.0-beta.1 4.0.0-beta.1 3.9.6 trunk 2.10.0 2.10.1 2.12.0 2.12.1 2.13.0 2.13.1 2.13.2 2.13.3 2.14.0 2.14.1 2.14.2 2.14.3 2.14.4 2.14.5 2.14.6 3.0.0 All 65 releases
← All changes | js/types/Window.ts +81 -11 3.9.6 → trunk View file →
@@ -1,17 +1,30 @@
1 +import type { SnippetSchema } from './schema/SnippetSchema'
2 +import type { ChangelogSchema, ImageLinkSchema } from './schema/WelcomeSchema'
1 3 import type Prism from 'prismjs'
2 4 import type tinymce from 'tinymce'
5 +import type { FeedbackConfig } from './Feedback'
6 +import type { InsightsChartViews, InsightsSummary } from './Insights'
3 7 import type { Snippet } from './Snippet'
4 -import type { CodeEditorInstance, EditorOption, WordPressCodeEditor } from './WordPressCodeEditor'
5 -import type { WordPressEditor } from './WordPressEditor'
8 +import type { SnippetView } from './SnippetView'
9 +import type { CodeEditorInstance, EditorOption, WordPressCodeEditor } from './vendor/WordPressCodeEditor'
10 +import type { WordPressEditor } from './vendor/WordPressEditor'
6 11
7 12 declare global {
8 13 interface Window {
9 14 readonly wp: {
10 15 readonly editor?: WordPressEditor
11 - readonly codeEditor: WordPressCodeEditor
16 + readonly codeEditor?: WordPressCodeEditor
17 + readonly hooks?: {
18 + addAction: (
19 + hookName: string,
20 + namespace: string,
21 + callback: (data: { rest_nonce?: string }) => void
22 + ) => void
23 + }
12 24 }
13 - readonly pagenow: string
25 + codeSnippetsErrors?: string[]
26 + readonly pagenow?: string
14 27 readonly ajaxurl: string
15 28 readonly tinymce?: tinymce.EditorManager
16 29 readonly wpActiveEditor?: string
17 30 code_snippets_editor_preview?: CodeEditorInstance
@@ -17,16 +30,29 @@
17 30 code_snippets_editor_preview?: CodeEditorInstance
18 31 readonly code_snippets_editor_settings: EditorOption[]
19 32 CODE_SNIPPETS_PRISM?: typeof Prism
20 33 readonly CODE_SNIPPETS?: {
34 + debug: boolean
21 35 isLicensed: boolean
36 + hideUpsell: boolean
37 + isCloudConnected: boolean
38 + snippetView: SnippetView
39 + insightsChartViews: InsightsChartViews
40 + demosSeen?: string[]
22 41 restAPI: {
23 42 base: string
24 43 snippets: string
25 - conditions: string
26 - cloud: string
44 + recentlyActive: string
45 + snippetView: string
46 + insightsView: string
47 + demosSeen: string
48 + importPlugins: string
49 + importFiles: string
27 50 nonce: string
28 - localToken: string
51 + cloud: {
52 + token: string
53 + snippets: string
54 + }
29 55 }
30 56 urls: {
31 57 plugin: string
32 58 manage: string
@@ -31,20 +57,52 @@
31 57 plugin: string
32 58 manage: string
33 59 addNew: string
34 60 edit: string
35 - connectCloud: string
61 + insights: string
62 + welcome: string
63 + import: string
64 + settings: string | null
65 + cloud: string
66 + demoReset: string
36 67 }
68 + banner: {
69 + key: string
70 + start_datetime: { date: string, timezone_type: number, timezone: string }
71 + end_datetime: { date: string, timezone_type: number, timezone: string }
72 + text_free: string
73 + action_url_free: string
74 + action_label_free: string
75 + text_pro: string
76 + action_url_pro: string
77 + action_label_pro: string
78 + }
37 79 }
80 + readonly CODE_SNIPPETS_MANAGE?: {
81 + snippetsList?: Snippet[]
82 + hasNetworkCap: boolean
83 + hiddenColumns: string[]
84 + listOrder?: string
85 + truncateRowValues: number | string
86 + snippetsPerPage: number
87 + typeCounts?: Record<string, number>
88 + cloudSearchPerPage: number
89 + isSafeModeActive: boolean
90 + bulkDownloadNonce: string
91 + runOnceNonce?: string
92 + supportsZipDownloads: boolean
93 + editorTheme: string
94 + aiDemo?: {
95 + siteName: string
96 + }
97 + }
38 98 readonly CODE_SNIPPETS_EDIT?: {
39 - snippet: Snippet
99 + snippet: SnippetSchema
40 100 pageTitleActions: Record<string, string>
41 - isPreview: boolean
42 101 isLicensed: boolean
43 102 enableDownloads: boolean
44 103 activateByDefault: boolean
45 104 enableDescription: boolean
46 - hideUpsell: boolean
47 105 editorTheme: string
48 106 tagOptions: {
49 107 enabled: boolean
50 108 allowSpaces: boolean
@@ -54,6 +112,18 @@
54 112 rows: number
55 113 mediaButtons: boolean
56 114 }
57 115 }
116 + readonly CODE_SNIPPETS_WELCOME?: {
117 + hero: {
118 + name: string
119 + follow_url: string
120 + image_url: string
121 + }
122 + changelog: ChangelogSchema[]
123 + features: ImageLinkSchema[]
124 + partners: ImageLinkSchema[]
125 + }
126 + readonly CODE_SNIPPETS_INSIGHTS?: InsightsSummary
127 + readonly CODE_SNIPPETS_FEEDBACK?: FeedbackConfig
58 128 }
59 129 }