@localess/client 3.0.0-dev.20260313114825 → 3.0.0-dev.20260323210102
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.
- package/README.md +1 -2
- package/dist/index.d.mts +3 -26
- package/dist/index.d.ts +3 -26
- package/dist/index.js +1 -16
- package/dist/index.mjs +1 -14
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -74,11 +74,7 @@ interface ContentDataSchema {
|
|
|
74
74
|
/**
|
|
75
75
|
* Unique identifier for the Schema object.
|
|
76
76
|
*/
|
|
77
|
-
_schema
|
|
78
|
-
/**
|
|
79
|
-
* Unique identifier for the Schema object.
|
|
80
|
-
*/
|
|
81
|
-
schema: string;
|
|
77
|
+
_schema: string;
|
|
82
78
|
}
|
|
83
79
|
/**
|
|
84
80
|
* ContentData defined Object to connect all possible root Schemas.
|
|
@@ -233,7 +229,7 @@ type ContentFetchParams = {
|
|
|
233
229
|
* Content version to fetch, leave empty for 'published' or 'draft' for the latest draft.
|
|
234
230
|
* Overrides the version set in the client options.
|
|
235
231
|
*/
|
|
236
|
-
version?: 'draft'
|
|
232
|
+
version?: 'draft';
|
|
237
233
|
/**
|
|
238
234
|
* Locale identifier (ISO 639-1) to fetch content in, leave empty for default locale.
|
|
239
235
|
*
|
|
@@ -293,16 +289,6 @@ declare function localessEditable(content: ContentDataSchema): {
|
|
|
293
289
|
'data-ll-id': string;
|
|
294
290
|
'data-ll-schema': string;
|
|
295
291
|
};
|
|
296
|
-
/**
|
|
297
|
-
* Adds Localess editable attributes to a content item.
|
|
298
|
-
* @param content
|
|
299
|
-
* @returns An object containing data-ll-id and data-ll-schema attributes.
|
|
300
|
-
* @deprecated use localessEditable instead
|
|
301
|
-
*/
|
|
302
|
-
declare function llEditable(content: ContentDataSchema): {
|
|
303
|
-
'data-ll-id': string;
|
|
304
|
-
'data-ll-schema': string;
|
|
305
|
-
};
|
|
306
292
|
/**
|
|
307
293
|
* Adds Localess editable field attribute to a specific field.
|
|
308
294
|
* Added type safety to ensure fieldName is a valid key of the content data excluding base schema fields.
|
|
@@ -312,15 +298,6 @@ declare function llEditable(content: ContentDataSchema): {
|
|
|
312
298
|
declare function localessEditableField<T extends ContentData = ContentData>(fieldName: Exclude<keyof T, keyof ContentDataSchema>): {
|
|
313
299
|
'data-ll-field': Exclude<keyof T, keyof ContentDataSchema>;
|
|
314
300
|
};
|
|
315
|
-
/**
|
|
316
|
-
* Adds Localess editable field attribute to a specific field.
|
|
317
|
-
* @param fieldName
|
|
318
|
-
* @returns An object containing data-ll-field attribute.
|
|
319
|
-
* @deprecated use localessEditableField instead
|
|
320
|
-
*/
|
|
321
|
-
declare function llEditableField(fieldName: string): {
|
|
322
|
-
'data-ll-field': string;
|
|
323
|
-
};
|
|
324
301
|
|
|
325
302
|
/**
|
|
326
303
|
* Inject Localess Sync Script in Header
|
|
@@ -356,4 +333,4 @@ declare global {
|
|
|
356
333
|
}
|
|
357
334
|
}
|
|
358
335
|
|
|
359
|
-
export { type Content, type ContentAsset, type ContentData, type ContentDataField, type ContentDataSchema, type ContentFetchParams, type ContentLink, type ContentMetadata, type ContentReference, type ContentRichText, type EventCallback, type EventToApp, type EventToAppType, type Links, type LinksFetchParams, type Locale, type LocalessClient, type LocalessClientOptions, type LocalessSync, type References, type Translations, isBrowser, isIframe, isServer,
|
|
336
|
+
export { type Content, type ContentAsset, type ContentData, type ContentDataField, type ContentDataSchema, type ContentFetchParams, type ContentLink, type ContentMetadata, type ContentReference, type ContentRichText, type EventCallback, type EventToApp, type EventToAppType, type Links, type LinksFetchParams, type Locale, type LocalessClient, type LocalessClientOptions, type LocalessSync, type References, type Translations, isBrowser, isIframe, isServer, loadLocalessSync, localessClient, localessEditable, localessEditableField };
|
package/dist/index.d.ts
CHANGED
|
@@ -74,11 +74,7 @@ interface ContentDataSchema {
|
|
|
74
74
|
/**
|
|
75
75
|
* Unique identifier for the Schema object.
|
|
76
76
|
*/
|
|
77
|
-
_schema
|
|
78
|
-
/**
|
|
79
|
-
* Unique identifier for the Schema object.
|
|
80
|
-
*/
|
|
81
|
-
schema: string;
|
|
77
|
+
_schema: string;
|
|
82
78
|
}
|
|
83
79
|
/**
|
|
84
80
|
* ContentData defined Object to connect all possible root Schemas.
|
|
@@ -233,7 +229,7 @@ type ContentFetchParams = {
|
|
|
233
229
|
* Content version to fetch, leave empty for 'published' or 'draft' for the latest draft.
|
|
234
230
|
* Overrides the version set in the client options.
|
|
235
231
|
*/
|
|
236
|
-
version?: 'draft'
|
|
232
|
+
version?: 'draft';
|
|
237
233
|
/**
|
|
238
234
|
* Locale identifier (ISO 639-1) to fetch content in, leave empty for default locale.
|
|
239
235
|
*
|
|
@@ -293,16 +289,6 @@ declare function localessEditable(content: ContentDataSchema): {
|
|
|
293
289
|
'data-ll-id': string;
|
|
294
290
|
'data-ll-schema': string;
|
|
295
291
|
};
|
|
296
|
-
/**
|
|
297
|
-
* Adds Localess editable attributes to a content item.
|
|
298
|
-
* @param content
|
|
299
|
-
* @returns An object containing data-ll-id and data-ll-schema attributes.
|
|
300
|
-
* @deprecated use localessEditable instead
|
|
301
|
-
*/
|
|
302
|
-
declare function llEditable(content: ContentDataSchema): {
|
|
303
|
-
'data-ll-id': string;
|
|
304
|
-
'data-ll-schema': string;
|
|
305
|
-
};
|
|
306
292
|
/**
|
|
307
293
|
* Adds Localess editable field attribute to a specific field.
|
|
308
294
|
* Added type safety to ensure fieldName is a valid key of the content data excluding base schema fields.
|
|
@@ -312,15 +298,6 @@ declare function llEditable(content: ContentDataSchema): {
|
|
|
312
298
|
declare function localessEditableField<T extends ContentData = ContentData>(fieldName: Exclude<keyof T, keyof ContentDataSchema>): {
|
|
313
299
|
'data-ll-field': Exclude<keyof T, keyof ContentDataSchema>;
|
|
314
300
|
};
|
|
315
|
-
/**
|
|
316
|
-
* Adds Localess editable field attribute to a specific field.
|
|
317
|
-
* @param fieldName
|
|
318
|
-
* @returns An object containing data-ll-field attribute.
|
|
319
|
-
* @deprecated use localessEditableField instead
|
|
320
|
-
*/
|
|
321
|
-
declare function llEditableField(fieldName: string): {
|
|
322
|
-
'data-ll-field': string;
|
|
323
|
-
};
|
|
324
301
|
|
|
325
302
|
/**
|
|
326
303
|
* Inject Localess Sync Script in Header
|
|
@@ -356,4 +333,4 @@ declare global {
|
|
|
356
333
|
}
|
|
357
334
|
}
|
|
358
335
|
|
|
359
|
-
export { type Content, type ContentAsset, type ContentData, type ContentDataField, type ContentDataSchema, type ContentFetchParams, type ContentLink, type ContentMetadata, type ContentReference, type ContentRichText, type EventCallback, type EventToApp, type EventToAppType, type Links, type LinksFetchParams, type Locale, type LocalessClient, type LocalessClientOptions, type LocalessSync, type References, type Translations, isBrowser, isIframe, isServer,
|
|
336
|
+
export { type Content, type ContentAsset, type ContentData, type ContentDataField, type ContentDataSchema, type ContentFetchParams, type ContentLink, type ContentMetadata, type ContentReference, type ContentRichText, type EventCallback, type EventToApp, type EventToAppType, type Links, type LinksFetchParams, type Locale, type LocalessClient, type LocalessClientOptions, type LocalessSync, type References, type Translations, isBrowser, isIframe, isServer, loadLocalessSync, localessClient, localessEditable, localessEditableField };
|
package/dist/index.js
CHANGED
|
@@ -23,8 +23,6 @@ __export(index_exports, {
|
|
|
23
23
|
isBrowser: () => isBrowser,
|
|
24
24
|
isIframe: () => isIframe,
|
|
25
25
|
isServer: () => isServer,
|
|
26
|
-
llEditable: () => llEditable,
|
|
27
|
-
llEditableField: () => llEditableField,
|
|
28
26
|
loadLocalessSync: () => loadLocalessSync,
|
|
29
27
|
localessClient: () => localessClient,
|
|
30
28
|
localessEditable: () => localessEditable,
|
|
@@ -253,13 +251,7 @@ function localessClient(options) {
|
|
|
253
251
|
function localessEditable(content) {
|
|
254
252
|
return {
|
|
255
253
|
"data-ll-id": content._id,
|
|
256
|
-
"data-ll-schema": content._schema
|
|
257
|
-
};
|
|
258
|
-
}
|
|
259
|
-
function llEditable(content) {
|
|
260
|
-
return {
|
|
261
|
-
"data-ll-id": content._id,
|
|
262
|
-
"data-ll-schema": content._schema || content.schema
|
|
254
|
+
"data-ll-schema": content._schema
|
|
263
255
|
};
|
|
264
256
|
}
|
|
265
257
|
function localessEditableField(fieldName) {
|
|
@@ -267,11 +259,6 @@ function localessEditableField(fieldName) {
|
|
|
267
259
|
"data-ll-field": fieldName
|
|
268
260
|
};
|
|
269
261
|
}
|
|
270
|
-
function llEditableField(fieldName) {
|
|
271
|
-
return {
|
|
272
|
-
"data-ll-field": fieldName
|
|
273
|
-
};
|
|
274
|
-
}
|
|
275
262
|
|
|
276
263
|
// src/sync.ts
|
|
277
264
|
var JS_SYNC_ID = "localess-js-sync";
|
|
@@ -296,8 +283,6 @@ function loadLocalessSync(origin, force = false) {
|
|
|
296
283
|
isBrowser,
|
|
297
284
|
isIframe,
|
|
298
285
|
isServer,
|
|
299
|
-
llEditable,
|
|
300
|
-
llEditableField,
|
|
301
286
|
loadLocalessSync,
|
|
302
287
|
localessClient,
|
|
303
288
|
localessEditable,
|
package/dist/index.mjs
CHANGED
|
@@ -219,13 +219,7 @@ function localessClient(options) {
|
|
|
219
219
|
function localessEditable(content) {
|
|
220
220
|
return {
|
|
221
221
|
"data-ll-id": content._id,
|
|
222
|
-
"data-ll-schema": content._schema
|
|
223
|
-
};
|
|
224
|
-
}
|
|
225
|
-
function llEditable(content) {
|
|
226
|
-
return {
|
|
227
|
-
"data-ll-id": content._id,
|
|
228
|
-
"data-ll-schema": content._schema || content.schema
|
|
222
|
+
"data-ll-schema": content._schema
|
|
229
223
|
};
|
|
230
224
|
}
|
|
231
225
|
function localessEditableField(fieldName) {
|
|
@@ -233,11 +227,6 @@ function localessEditableField(fieldName) {
|
|
|
233
227
|
"data-ll-field": fieldName
|
|
234
228
|
};
|
|
235
229
|
}
|
|
236
|
-
function llEditableField(fieldName) {
|
|
237
|
-
return {
|
|
238
|
-
"data-ll-field": fieldName
|
|
239
|
-
};
|
|
240
|
-
}
|
|
241
230
|
|
|
242
231
|
// src/sync.ts
|
|
243
232
|
var JS_SYNC_ID = "localess-js-sync";
|
|
@@ -261,8 +250,6 @@ export {
|
|
|
261
250
|
isBrowser,
|
|
262
251
|
isIframe,
|
|
263
252
|
isServer,
|
|
264
|
-
llEditable,
|
|
265
|
-
llEditableField,
|
|
266
253
|
loadLocalessSync,
|
|
267
254
|
localessClient,
|
|
268
255
|
localessEditable,
|