@localess/js-client 0.8.2-next.20250625-092814.0 → 0.8.3-next.20251219-194058.0
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/dist/index.d.mts +30 -1
- package/dist/index.d.ts +30 -1
- package/dist/index.js +17 -2
- package/dist/index.mjs +14 -1
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -249,10 +249,39 @@ interface LocalessClient {
|
|
|
249
249
|
*/
|
|
250
250
|
declare function localessClient(options: LocalessClientOptions): LocalessClient;
|
|
251
251
|
|
|
252
|
+
/**
|
|
253
|
+
* Adds Localess editable attributes to a content item.
|
|
254
|
+
* @param content
|
|
255
|
+
* @returns An object containing data-ll-id and data-ll-schema attributes.
|
|
256
|
+
*/
|
|
257
|
+
declare function localessEditable(content: ContentDataSchema): {
|
|
258
|
+
'data-ll-id': string;
|
|
259
|
+
'data-ll-schema': string;
|
|
260
|
+
};
|
|
261
|
+
/**
|
|
262
|
+
* Adds Localess editable attributes to a content item.
|
|
263
|
+
* @param content
|
|
264
|
+
* @returns An object containing data-ll-id and data-ll-schema attributes.
|
|
265
|
+
* @deprecated use localessEditable instead
|
|
266
|
+
*/
|
|
252
267
|
declare function llEditable(content: ContentDataSchema): {
|
|
253
268
|
'data-ll-id': string;
|
|
254
269
|
'data-ll-schema': string;
|
|
255
270
|
};
|
|
271
|
+
/**
|
|
272
|
+
* Adds Localess editable field attribute to a specific field.
|
|
273
|
+
* @param fieldName
|
|
274
|
+
* @returns An object containing data-ll-field attribute.
|
|
275
|
+
*/
|
|
276
|
+
declare function localessEditableField(fieldName: string): {
|
|
277
|
+
'data-ll-field': string;
|
|
278
|
+
};
|
|
279
|
+
/**
|
|
280
|
+
* Adds Localess editable field attribute to a specific field.
|
|
281
|
+
* @param fieldName
|
|
282
|
+
* @returns An object containing data-ll-field attribute.
|
|
283
|
+
* @deprecated use localessEditableField instead
|
|
284
|
+
*/
|
|
256
285
|
declare function llEditableField(fieldName: string): {
|
|
257
286
|
'data-ll-field': string;
|
|
258
287
|
};
|
|
@@ -287,4 +316,4 @@ declare global {
|
|
|
287
316
|
}
|
|
288
317
|
}
|
|
289
318
|
|
|
290
|
-
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 LocalessClient, type LocalessClientOptions, type LocalessSync, type Translations, llEditable, llEditableField, loadLocalessSync, localessClient };
|
|
319
|
+
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 LocalessClient, type LocalessClientOptions, type LocalessSync, type Translations, llEditable, llEditableField, loadLocalessSync, localessClient, localessEditable, localessEditableField };
|
package/dist/index.d.ts
CHANGED
|
@@ -249,10 +249,39 @@ interface LocalessClient {
|
|
|
249
249
|
*/
|
|
250
250
|
declare function localessClient(options: LocalessClientOptions): LocalessClient;
|
|
251
251
|
|
|
252
|
+
/**
|
|
253
|
+
* Adds Localess editable attributes to a content item.
|
|
254
|
+
* @param content
|
|
255
|
+
* @returns An object containing data-ll-id and data-ll-schema attributes.
|
|
256
|
+
*/
|
|
257
|
+
declare function localessEditable(content: ContentDataSchema): {
|
|
258
|
+
'data-ll-id': string;
|
|
259
|
+
'data-ll-schema': string;
|
|
260
|
+
};
|
|
261
|
+
/**
|
|
262
|
+
* Adds Localess editable attributes to a content item.
|
|
263
|
+
* @param content
|
|
264
|
+
* @returns An object containing data-ll-id and data-ll-schema attributes.
|
|
265
|
+
* @deprecated use localessEditable instead
|
|
266
|
+
*/
|
|
252
267
|
declare function llEditable(content: ContentDataSchema): {
|
|
253
268
|
'data-ll-id': string;
|
|
254
269
|
'data-ll-schema': string;
|
|
255
270
|
};
|
|
271
|
+
/**
|
|
272
|
+
* Adds Localess editable field attribute to a specific field.
|
|
273
|
+
* @param fieldName
|
|
274
|
+
* @returns An object containing data-ll-field attribute.
|
|
275
|
+
*/
|
|
276
|
+
declare function localessEditableField(fieldName: string): {
|
|
277
|
+
'data-ll-field': string;
|
|
278
|
+
};
|
|
279
|
+
/**
|
|
280
|
+
* Adds Localess editable field attribute to a specific field.
|
|
281
|
+
* @param fieldName
|
|
282
|
+
* @returns An object containing data-ll-field attribute.
|
|
283
|
+
* @deprecated use localessEditableField instead
|
|
284
|
+
*/
|
|
256
285
|
declare function llEditableField(fieldName: string): {
|
|
257
286
|
'data-ll-field': string;
|
|
258
287
|
};
|
|
@@ -287,4 +316,4 @@ declare global {
|
|
|
287
316
|
}
|
|
288
317
|
}
|
|
289
318
|
|
|
290
|
-
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 LocalessClient, type LocalessClientOptions, type LocalessSync, type Translations, llEditable, llEditableField, loadLocalessSync, localessClient };
|
|
319
|
+
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 LocalessClient, type LocalessClientOptions, type LocalessSync, type Translations, llEditable, llEditableField, loadLocalessSync, localessClient, localessEditable, localessEditableField };
|
package/dist/index.js
CHANGED
|
@@ -23,7 +23,9 @@ __export(index_exports, {
|
|
|
23
23
|
llEditable: () => llEditable,
|
|
24
24
|
llEditableField: () => llEditableField,
|
|
25
25
|
loadLocalessSync: () => loadLocalessSync,
|
|
26
|
-
localessClient: () => localessClient
|
|
26
|
+
localessClient: () => localessClient,
|
|
27
|
+
localessEditable: () => localessEditable,
|
|
28
|
+
localessEditableField: () => localessEditableField
|
|
27
29
|
});
|
|
28
30
|
module.exports = __toCommonJS(index_exports);
|
|
29
31
|
|
|
@@ -200,12 +202,23 @@ function localessClient(options) {
|
|
|
200
202
|
}
|
|
201
203
|
|
|
202
204
|
// src/editable.ts
|
|
205
|
+
function localessEditable(content) {
|
|
206
|
+
return {
|
|
207
|
+
"data-ll-id": content._id,
|
|
208
|
+
"data-ll-schema": content._schema || content.schema
|
|
209
|
+
};
|
|
210
|
+
}
|
|
203
211
|
function llEditable(content) {
|
|
204
212
|
return {
|
|
205
213
|
"data-ll-id": content._id,
|
|
206
214
|
"data-ll-schema": content._schema || content.schema
|
|
207
215
|
};
|
|
208
216
|
}
|
|
217
|
+
function localessEditableField(fieldName) {
|
|
218
|
+
return {
|
|
219
|
+
"data-ll-field": fieldName
|
|
220
|
+
};
|
|
221
|
+
}
|
|
209
222
|
function llEditableField(fieldName) {
|
|
210
223
|
return {
|
|
211
224
|
"data-ll-field": fieldName
|
|
@@ -236,5 +249,7 @@ function loadLocalessSync(origin, force = false) {
|
|
|
236
249
|
llEditable,
|
|
237
250
|
llEditableField,
|
|
238
251
|
loadLocalessSync,
|
|
239
|
-
localessClient
|
|
252
|
+
localessClient,
|
|
253
|
+
localessEditable,
|
|
254
|
+
localessEditableField
|
|
240
255
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -171,12 +171,23 @@ function localessClient(options) {
|
|
|
171
171
|
}
|
|
172
172
|
|
|
173
173
|
// src/editable.ts
|
|
174
|
+
function localessEditable(content) {
|
|
175
|
+
return {
|
|
176
|
+
"data-ll-id": content._id,
|
|
177
|
+
"data-ll-schema": content._schema || content.schema
|
|
178
|
+
};
|
|
179
|
+
}
|
|
174
180
|
function llEditable(content) {
|
|
175
181
|
return {
|
|
176
182
|
"data-ll-id": content._id,
|
|
177
183
|
"data-ll-schema": content._schema || content.schema
|
|
178
184
|
};
|
|
179
185
|
}
|
|
186
|
+
function localessEditableField(fieldName) {
|
|
187
|
+
return {
|
|
188
|
+
"data-ll-field": fieldName
|
|
189
|
+
};
|
|
190
|
+
}
|
|
180
191
|
function llEditableField(fieldName) {
|
|
181
192
|
return {
|
|
182
193
|
"data-ll-field": fieldName
|
|
@@ -206,5 +217,7 @@ export {
|
|
|
206
217
|
llEditable,
|
|
207
218
|
llEditableField,
|
|
208
219
|
loadLocalessSync,
|
|
209
|
-
localessClient
|
|
220
|
+
localessClient,
|
|
221
|
+
localessEditable,
|
|
222
|
+
localessEditableField
|
|
210
223
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@localess/js-client",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.3-next.20251219-194058.0",
|
|
4
4
|
"description": "Universal JavaScript/TypeScript SDK for Localess's API.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"localess",
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
},
|
|
39
39
|
"license": "MIT",
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@types/node": "^20
|
|
42
|
-
"tsup": "^8.
|
|
41
|
+
"@types/node": "^20",
|
|
42
|
+
"tsup": "^8.5.1",
|
|
43
43
|
"typescript": "^5.0.0"
|
|
44
44
|
},
|
|
45
45
|
"engines": {
|