@localess/react 0.9.2-dev.20260224115109 → 0.9.2-dev.20260307154946
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 +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +3 -3
- package/dist/index.mjs +3 -3
- package/package.json +20 -20
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import React__default from 'react';
|
|
3
|
-
import { LocalessClientOptions, ContentData, Links, ContentRichText, LocalessClient, ContentAsset } from '@localess/client';
|
|
3
|
+
import { LocalessClientOptions, ContentData, Links, References, ContentRichText, LocalessClient, ContentAsset } from '@localess/client';
|
|
4
4
|
export { Content, ContentAsset, ContentData, ContentDataField, ContentDataSchema, ContentLink, ContentMetadata, ContentReference, ContentRichText, EventCallback, EventToApp, EventToAppType, Links, LocalessClient, LocalessSync, References, Translations, isBrowser, isIframe, isServer, llEditable, llEditableField, localessEditable, localessEditableField } from '@localess/client';
|
|
5
5
|
|
|
6
6
|
type LocalessOptions = LocalessClientOptions & {
|
|
@@ -21,6 +21,7 @@ type LocalessOptions = LocalessClientOptions & {
|
|
|
21
21
|
type LocalessComponentProps<T extends ContentData = ContentData> = {
|
|
22
22
|
data: T;
|
|
23
23
|
links?: Links;
|
|
24
|
+
references?: References;
|
|
24
25
|
};
|
|
25
26
|
declare const LocalessComponent: React.ForwardRefExoticComponent<LocalessComponentProps<ContentData> & React.RefAttributes<HTMLElement>>;
|
|
26
27
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import React__default from 'react';
|
|
3
|
-
import { LocalessClientOptions, ContentData, Links, ContentRichText, LocalessClient, ContentAsset } from '@localess/client';
|
|
3
|
+
import { LocalessClientOptions, ContentData, Links, References, ContentRichText, LocalessClient, ContentAsset } from '@localess/client';
|
|
4
4
|
export { Content, ContentAsset, ContentData, ContentDataField, ContentDataSchema, ContentLink, ContentMetadata, ContentReference, ContentRichText, EventCallback, EventToApp, EventToAppType, Links, LocalessClient, LocalessSync, References, Translations, isBrowser, isIframe, isServer, llEditable, llEditableField, localessEditable, localessEditableField } from '@localess/client';
|
|
5
5
|
|
|
6
6
|
type LocalessOptions = LocalessClientOptions & {
|
|
@@ -21,6 +21,7 @@ type LocalessOptions = LocalessClientOptions & {
|
|
|
21
21
|
type LocalessComponentProps<T extends ContentData = ContentData> = {
|
|
22
22
|
data: T;
|
|
23
23
|
links?: Links;
|
|
24
|
+
references?: References;
|
|
24
25
|
};
|
|
25
26
|
declare const LocalessComponent: React.ForwardRefExoticComponent<LocalessComponentProps<ContentData> & React.RefAttributes<HTMLElement>>;
|
|
26
27
|
|
package/dist/index.js
CHANGED
|
@@ -54,7 +54,7 @@ var import_client3 = require("@localess/client");
|
|
|
54
54
|
var import_react = require("react");
|
|
55
55
|
var import_client = require("@localess/client");
|
|
56
56
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
57
|
-
var LocalessComponent = (0, import_react.forwardRef)(({ data, links, ...restProps }, ref) => {
|
|
57
|
+
var LocalessComponent = (0, import_react.forwardRef)(({ data, links, references, ...restProps }, ref) => {
|
|
58
58
|
if (!data) {
|
|
59
59
|
console.error("LocalessComponent property %cdata%c is not provided.", FONT_BOLD, FONT_NORMAL);
|
|
60
60
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
|
|
@@ -66,11 +66,11 @@ var LocalessComponent = (0, import_react.forwardRef)(({ data, links, ...restProp
|
|
|
66
66
|
const Comp = getComponent(data._schema || data.schema);
|
|
67
67
|
if (Comp) {
|
|
68
68
|
const attr = isSyncEnabled() ? (0, import_client.localessEditable)(data) : {};
|
|
69
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Comp, { ref, data, links, ...attr, ...restProps });
|
|
69
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Comp, { ref, data, links, references, ...attr, ...restProps });
|
|
70
70
|
}
|
|
71
71
|
const FallbackComponent = getFallbackComponent();
|
|
72
72
|
if (FallbackComponent) {
|
|
73
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FallbackComponent, { ref, data, links, ...restProps });
|
|
73
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FallbackComponent, { ref, data, links, references, ...restProps });
|
|
74
74
|
}
|
|
75
75
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", { children: [
|
|
76
76
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("b", { children: "LocalessComponent" }),
|
package/dist/index.mjs
CHANGED
|
@@ -12,7 +12,7 @@ import { llEditable, llEditableField, localessEditable as localessEditable2, loc
|
|
|
12
12
|
import { forwardRef } from "react";
|
|
13
13
|
import { localessEditable } from "@localess/client";
|
|
14
14
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
15
|
-
var LocalessComponent = forwardRef(({ data, links, ...restProps }, ref) => {
|
|
15
|
+
var LocalessComponent = forwardRef(({ data, links, references, ...restProps }, ref) => {
|
|
16
16
|
if (!data) {
|
|
17
17
|
console.error("LocalessComponent property %cdata%c is not provided.", FONT_BOLD, FONT_NORMAL);
|
|
18
18
|
return /* @__PURE__ */ jsxs("div", { children: [
|
|
@@ -24,11 +24,11 @@ var LocalessComponent = forwardRef(({ data, links, ...restProps }, ref) => {
|
|
|
24
24
|
const Comp = getComponent(data._schema || data.schema);
|
|
25
25
|
if (Comp) {
|
|
26
26
|
const attr = isSyncEnabled() ? localessEditable(data) : {};
|
|
27
|
-
return /* @__PURE__ */ jsx(Comp, { ref, data, links, ...attr, ...restProps });
|
|
27
|
+
return /* @__PURE__ */ jsx(Comp, { ref, data, links, references, ...attr, ...restProps });
|
|
28
28
|
}
|
|
29
29
|
const FallbackComponent = getFallbackComponent();
|
|
30
30
|
if (FallbackComponent) {
|
|
31
|
-
return /* @__PURE__ */ jsx(FallbackComponent, { ref, data, links, ...restProps });
|
|
31
|
+
return /* @__PURE__ */ jsx(FallbackComponent, { ref, data, links, references, ...restProps });
|
|
32
32
|
}
|
|
33
33
|
return /* @__PURE__ */ jsxs("p", { children: [
|
|
34
34
|
/* @__PURE__ */ jsx("b", { children: "LocalessComponent" }),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@localess/react",
|
|
3
|
-
"version": "0.9.2-dev.
|
|
3
|
+
"version": "0.9.2-dev.20260307154946",
|
|
4
4
|
"description": "ReactJS JavaScript/TypeScript SDK for Localess's API.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"localess",
|
|
@@ -46,31 +46,31 @@
|
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"@localess/client": "*",
|
|
49
|
-
"@tiptap/static-renderer": "^3.
|
|
50
|
-
"@tiptap/html": "^3.
|
|
51
|
-
"@tiptap/extension-bold": "^3.
|
|
52
|
-
"@tiptap/extension-italic": "^3.
|
|
53
|
-
"@tiptap/extension-strike": "^3.
|
|
54
|
-
"@tiptap/extension-underline": "^3.
|
|
55
|
-
"@tiptap/extension-document": "^3.
|
|
56
|
-
"@tiptap/extension-text": "^3.
|
|
57
|
-
"@tiptap/extension-paragraph": "^3.
|
|
58
|
-
"@tiptap/extension-history": "^3.
|
|
59
|
-
"@tiptap/extension-list-item": "^3.
|
|
60
|
-
"@tiptap/extension-bullet-list": "^3.
|
|
61
|
-
"@tiptap/extension-ordered-list": "^3.
|
|
62
|
-
"@tiptap/extension-code": "^3.
|
|
63
|
-
"@tiptap/extension-code-block-lowlight": "^3.
|
|
64
|
-
"@tiptap/extension-link": "^3.
|
|
65
|
-
"@tiptap/extension-heading": "^3.
|
|
49
|
+
"@tiptap/static-renderer": "^3.20.1",
|
|
50
|
+
"@tiptap/html": "^3.20.1",
|
|
51
|
+
"@tiptap/extension-bold": "^3.20.1",
|
|
52
|
+
"@tiptap/extension-italic": "^3.20.1",
|
|
53
|
+
"@tiptap/extension-strike": "^3.20.1",
|
|
54
|
+
"@tiptap/extension-underline": "^3.20.1",
|
|
55
|
+
"@tiptap/extension-document": "^3.20.1",
|
|
56
|
+
"@tiptap/extension-text": "^3.20.1",
|
|
57
|
+
"@tiptap/extension-paragraph": "^3.20.1",
|
|
58
|
+
"@tiptap/extension-history": "^3.20.1",
|
|
59
|
+
"@tiptap/extension-list-item": "^3.20.1",
|
|
60
|
+
"@tiptap/extension-bullet-list": "^3.20.1",
|
|
61
|
+
"@tiptap/extension-ordered-list": "^3.20.1",
|
|
62
|
+
"@tiptap/extension-code": "^3.20.1",
|
|
63
|
+
"@tiptap/extension-code-block-lowlight": "^3.20.1",
|
|
64
|
+
"@tiptap/extension-link": "^3.20.1",
|
|
65
|
+
"@tiptap/extension-heading": "^3.20.1"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
68
|
"@types/react": "^19.0.0",
|
|
69
|
-
"@types/node": "^20
|
|
69
|
+
"@types/node": "^20",
|
|
70
70
|
"react": "^19.0.0",
|
|
71
71
|
"react-dom": "^19.0.0",
|
|
72
72
|
"tsup": "^8.5.1",
|
|
73
|
-
"typescript": "^5.
|
|
73
|
+
"typescript": "^5.9.3"
|
|
74
74
|
},
|
|
75
75
|
"engines": {
|
|
76
76
|
"node": ">= 20.0.0"
|