| 1 |
import type { SnippetSchema } from './schema/SnippetSchema' |
| 2 |
import type { ChangelogSchema, ImageLinkSchema } from './schema/WelcomeSchema' |
| 3 |
import type Prism from 'prismjs' |
| 4 |
import type tinymce from 'tinymce' |
| 5 |
import type { FeedbackConfig } from './Feedback' |
| 6 |
import type { InsightsChartViews, InsightsSummary } from './Insights' |
| 7 |
import type { Snippet } from './Snippet' |
| 8 |
import type { SnippetView } from './SnippetView' |
| 9 |
import type { CodeEditorInstance, EditorOption, WordPressCodeEditor } from './vendor/WordPressCodeEditor' |
| 10 |
import type { WordPressEditor } from './vendor/WordPressEditor' |
| 11 |
|
| 12 |
declare global { |
| 13 |
interface Window { |
| 14 |
readonly wp: { |
| 15 |
readonly editor?: WordPressEditor |
| 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 |
} |
| 24 |
} |
| 25 |
codeSnippetsErrors?: string[] |
| 26 |
readonly pagenow?: string |
| 27 |
readonly ajaxurl: string |
| 28 |
readonly tinymce?: tinymce.EditorManager |
| 29 |
readonly wpActiveEditor?: string |
| 30 |
code_snippets_editor_preview?: CodeEditorInstance |
| 31 |
readonly code_snippets_editor_settings: EditorOption[] |
| 32 |
CODE_SNIPPETS_PRISM?: typeof Prism |
| 33 |
readonly CODE_SNIPPETS?: { |
| 34 |
debug: boolean |
| 35 |
isLicensed: boolean |
| 36 |
hideUpsell: boolean |
| 37 |
isCloudConnected: boolean |
| 38 |
snippetView: SnippetView |
| 39 |
insightsChartViews: InsightsChartViews |
| 40 |
demosSeen?: string[] |
| 41 |
restAPI: { |
| 42 |
base: string |
| 43 |
snippets: string |
| 44 |
recentlyActive: string |
| 45 |
snippetView: string |
| 46 |
insightsView: string |
| 47 |
demosSeen: string |
| 48 |
importPlugins: string |
| 49 |
importFiles: string |
| 50 |
nonce: string |
| 51 |
cloud: { |
| 52 |
token: string |
| 53 |
snippets: string |
| 54 |
} |
| 55 |
} |
| 56 |
urls: { |
| 57 |
plugin: string |
| 58 |
manage: string |
| 59 |
addNew: string |
| 60 |
edit: string |
| 61 |
insights: string |
| 62 |
welcome: string |
| 63 |
import: string |
| 64 |
settings: string | null |
| 65 |
cloud: string |
| 66 |
demoReset: string |
| 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 |
} |
| 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 |
} |
| 98 |
readonly CODE_SNIPPETS_EDIT?: { |
| 99 |
snippet: SnippetSchema |
| 100 |
pageTitleActions: Record<string, string> |
| 101 |
isLicensed: boolean |
| 102 |
enableDownloads: boolean |
| 103 |
activateByDefault: boolean |
| 104 |
enableDescription: boolean |
| 105 |
editorTheme: string |
| 106 |
tagOptions: { |
| 107 |
enabled: boolean |
| 108 |
allowSpaces: boolean |
| 109 |
availableTags: string[] |
| 110 |
} |
| 111 |
descEditorOptions: { |
| 112 |
rows: number |
| 113 |
mediaButtons: boolean |
| 114 |
} |
| 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 |
| 128 |
} |
| 129 |
} |
| 130 |
|