@@ -32,6 +32,8 @@ public struct EditorConfiguration: Sendable {
3232 public let locale : String
3333 /// Enables the native inserter UI in the editor
3434 public let isNativeInserterEnabled : Bool
35+ /// Endpoint for loading editor settings
36+ public let editorSettingsEndpoint : URL ?
3537 /// Endpoint for loading editor assets, used when enabling `shouldUsePlugins`
3638 public let editorAssetsEndpoint : URL ?
3739 /// Logs emitted at or above this level will be printed to the debug console
@@ -56,6 +58,7 @@ public struct EditorConfiguration: Sendable {
5658 editorSettings: String ,
5759 locale: String ,
5860 isNativeInserterEnabled: Bool ,
61+ editorSettingsEndpoint: URL ? ,
5962 editorAssetsEndpoint: URL ? ,
6063 logLevel: EditorLogLevel ,
6164 enableNetworkLogging: Bool = false
@@ -75,6 +78,7 @@ public struct EditorConfiguration: Sendable {
7578 self . editorSettings = editorSettings
7679 self . locale = locale
7780 self . isNativeInserterEnabled = isNativeInserterEnabled
81+ self . editorSettingsEndpoint = editorSettingsEndpoint
7882 self . editorAssetsEndpoint = editorAssetsEndpoint
7983 self . logLevel = logLevel
8084 self . enableNetworkLogging = enableNetworkLogging
@@ -97,6 +101,7 @@ public struct EditorConfiguration: Sendable {
97101 editorSettings: editorSettings,
98102 locale: locale,
99103 isNativeInserterEnabled: isNativeInserterEnabled,
104+ editorSettingsEndpoint: editorSettingsEndpoint,
100105 editorAssetsEndpoint: editorAssetsEndpoint,
101106 logLevel: logLevel,
102107 enableNetworkLogging: enableNetworkLogging
@@ -130,6 +135,7 @@ public struct EditorConfigurationBuilder {
130135 private var editorSettings : String
131136 private var locale : String
132137 private var isNativeInserterEnabled : Bool
138+ private var editorSettingsEndpoint : URL ?
133139 private var editorAssetsEndpoint : URL ?
134140 private var logLevel : EditorLogLevel
135141 private var enableNetworkLogging : Bool
@@ -150,6 +156,7 @@ public struct EditorConfigurationBuilder {
150156 editorSettings: String = " undefined " ,
151157 locale: String = " en " ,
152158 isNativeInserterEnabled: Bool = false ,
159+ editorSettingsEndpoint: URL ? = nil ,
153160 editorAssetsEndpoint: URL ? = nil ,
154161 logLevel: EditorLogLevel = . error,
155162 enableNetworkLogging: Bool = false
@@ -169,6 +176,7 @@ public struct EditorConfigurationBuilder {
169176 self . editorSettings = editorSettings
170177 self . locale = locale
171178 self . isNativeInserterEnabled = isNativeInserterEnabled
179+ self . editorSettingsEndpoint = editorSettingsEndpoint
172180 self . editorAssetsEndpoint = editorAssetsEndpoint
173181 self . logLevel = logLevel
174182 self . enableNetworkLogging = enableNetworkLogging
@@ -264,6 +272,12 @@ public struct EditorConfigurationBuilder {
264272 return copy
265273 }
266274
275+ public func setEditorSettingsEndpoint( _ editorSettingsEndpoint: URL ? ) -> EditorConfigurationBuilder {
276+ var copy = self
277+ copy. editorSettingsEndpoint = editorSettingsEndpoint
278+ return copy
279+ }
280+
267281 public func setEditorAssetsEndpoint( _ editorAssetsEndpoint: URL ? ) -> EditorConfigurationBuilder {
268282 var copy = self
269283 copy. editorAssetsEndpoint = editorAssetsEndpoint
@@ -321,6 +335,7 @@ public struct EditorConfigurationBuilder {
321335 editorSettings: editorSettings,
322336 locale: locale,
323337 isNativeInserterEnabled: isNativeInserterEnabled,
338+ editorSettingsEndpoint: editorSettingsEndpoint,
324339 editorAssetsEndpoint: editorAssetsEndpoint,
325340 logLevel: logLevel,
326341 enableNetworkLogging: enableNetworkLogging
0 commit comments