@june-ai/june-ui 0.2.3 → 0.2.4
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.cjs +7 -2
- package/dist/index.d.cts +5 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +7 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -454,6 +454,7 @@ var ATTACHABLE = /* @__PURE__ */ new Set([
|
|
|
454
454
|
"CodeBlock",
|
|
455
455
|
"CompositeCardBlock",
|
|
456
456
|
"ContextCardBlock",
|
|
457
|
+
"DocumentEditor",
|
|
457
458
|
"EditableTable",
|
|
458
459
|
"EntityList",
|
|
459
460
|
"Form",
|
|
@@ -2351,7 +2352,7 @@ function DocumentEditorImpl(props) {
|
|
|
2351
2352
|
|
|
2352
2353
|
// src/components/document-editor/document-component.tsx
|
|
2353
2354
|
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
2354
|
-
var DOCUMENT_COMPONENT_DESCRIPTION = 'An editable document. DocumentEditor(documentId, title, content, documentType?, status?, editable?, exportFormats?). "content" is the full document body as one Markdown string. Reuse documentId when revising the same document. Use it only when the user asks to create or revise a document.';
|
|
2355
|
+
var DOCUMENT_COMPONENT_DESCRIPTION = 'Custom component. An editable document. DocumentEditor(documentId, title, content, documentType?, status?, editable?, exportFormats?). Place it in the root container (Card or Stack). "content" is the full document body as one Markdown string. Reuse documentId when revising the same document. Use it only when the user asks to create or revise a document.';
|
|
2355
2356
|
var documentProps = import_v4.z.object({
|
|
2356
2357
|
documentId: import_v4.z.string().describe("Stable id. Reuse it when revising the same document."),
|
|
2357
2358
|
title: import_v4.z.string().describe("Document title. Do not repeat it as a heading in content."),
|
|
@@ -2389,7 +2390,11 @@ var JuneDocumentEditorComponent = (0, import_react_lang3.defineComponent)({
|
|
|
2389
2390
|
component: OpenUIDocument
|
|
2390
2391
|
});
|
|
2391
2392
|
function withDocumentEditor(library) {
|
|
2392
|
-
return library.extend({
|
|
2393
|
+
return library.extend({
|
|
2394
|
+
components: {
|
|
2395
|
+
add: [{ component: JuneDocumentEditorComponent, slots: ["Card"] }]
|
|
2396
|
+
}
|
|
2397
|
+
});
|
|
2393
2398
|
}
|
|
2394
2399
|
|
|
2395
2400
|
// src/components/document-editor/document-instructions.ts
|
package/dist/index.d.cts
CHANGED
|
@@ -412,7 +412,11 @@ declare const JuneDocumentEditorComponent: _openuidev_react_lang.DefinedComponen
|
|
|
412
412
|
type Extendable = Library & {
|
|
413
413
|
extend: NonNullable<Library["extend"]>;
|
|
414
414
|
};
|
|
415
|
-
/**
|
|
415
|
+
/**
|
|
416
|
+
* Returns a library that contains every component of `library` plus DocumentEditor,
|
|
417
|
+
* and allows DocumentEditor inside Card (Stack already accepts any child).
|
|
418
|
+
* The library must include Card, which both OpenUI libraries do.
|
|
419
|
+
*/
|
|
416
420
|
declare function withDocumentEditor(library: Extendable): Required<_openuidev_lang_core.Library<_openuidev_react_lang.ComponentRenderer<any>, _openuidev_lang_core.DefinedAction<any, string>>>;
|
|
417
421
|
|
|
418
422
|
declare const JuneDocumentContext: react.Context<JuneDocumentOptions>;
|
package/dist/index.d.ts
CHANGED
|
@@ -412,7 +412,11 @@ declare const JuneDocumentEditorComponent: _openuidev_react_lang.DefinedComponen
|
|
|
412
412
|
type Extendable = Library & {
|
|
413
413
|
extend: NonNullable<Library["extend"]>;
|
|
414
414
|
};
|
|
415
|
-
/**
|
|
415
|
+
/**
|
|
416
|
+
* Returns a library that contains every component of `library` plus DocumentEditor,
|
|
417
|
+
* and allows DocumentEditor inside Card (Stack already accepts any child).
|
|
418
|
+
* The library must include Card, which both OpenUI libraries do.
|
|
419
|
+
*/
|
|
416
420
|
declare function withDocumentEditor(library: Extendable): Required<_openuidev_lang_core.Library<_openuidev_react_lang.ComponentRenderer<any>, _openuidev_lang_core.DefinedAction<any, string>>>;
|
|
417
421
|
|
|
418
422
|
declare const JuneDocumentContext: react.Context<JuneDocumentOptions>;
|
package/dist/index.js
CHANGED
|
@@ -203,6 +203,7 @@ var ATTACHABLE = /* @__PURE__ */ new Set([
|
|
|
203
203
|
"CodeBlock",
|
|
204
204
|
"CompositeCardBlock",
|
|
205
205
|
"ContextCardBlock",
|
|
206
|
+
"DocumentEditor",
|
|
206
207
|
"EditableTable",
|
|
207
208
|
"EntityList",
|
|
208
209
|
"Form",
|
|
@@ -2074,7 +2075,7 @@ function DocumentEditorImpl(props) {
|
|
|
2074
2075
|
|
|
2075
2076
|
// src/components/document-editor/document-component.tsx
|
|
2076
2077
|
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
2077
|
-
var DOCUMENT_COMPONENT_DESCRIPTION = 'An editable document. DocumentEditor(documentId, title, content, documentType?, status?, editable?, exportFormats?). "content" is the full document body as one Markdown string. Reuse documentId when revising the same document. Use it only when the user asks to create or revise a document.';
|
|
2078
|
+
var DOCUMENT_COMPONENT_DESCRIPTION = 'Custom component. An editable document. DocumentEditor(documentId, title, content, documentType?, status?, editable?, exportFormats?). Place it in the root container (Card or Stack). "content" is the full document body as one Markdown string. Reuse documentId when revising the same document. Use it only when the user asks to create or revise a document.';
|
|
2078
2079
|
var documentProps = z.object({
|
|
2079
2080
|
documentId: z.string().describe("Stable id. Reuse it when revising the same document."),
|
|
2080
2081
|
title: z.string().describe("Document title. Do not repeat it as a heading in content."),
|
|
@@ -2112,7 +2113,11 @@ var JuneDocumentEditorComponent = defineComponent2({
|
|
|
2112
2113
|
component: OpenUIDocument
|
|
2113
2114
|
});
|
|
2114
2115
|
function withDocumentEditor(library) {
|
|
2115
|
-
return library.extend({
|
|
2116
|
+
return library.extend({
|
|
2117
|
+
components: {
|
|
2118
|
+
add: [{ component: JuneDocumentEditorComponent, slots: ["Card"] }]
|
|
2119
|
+
}
|
|
2120
|
+
});
|
|
2116
2121
|
}
|
|
2117
2122
|
|
|
2118
2123
|
// src/components/document-editor/document-instructions.ts
|