@columnus/sdk 0.3.0 → 0.3.1
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/blocknote-editor-FP33A6RJ.js +7 -0
- package/dist/{blocknote-editor-547WFBXP.js.map → blocknote-editor-FP33A6RJ.js.map} +1 -1
- package/dist/blocknote-preview-QZ5SC2GJ.js +7 -0
- package/dist/{blocknote-preview-CTMNUSYX.js.map → blocknote-preview-QZ5SC2GJ.js.map} +1 -1
- package/dist/{chunk-JYSABU33.js → chunk-6LKVKI5O.js} +3 -3
- package/dist/{chunk-JYSABU33.js.map → chunk-6LKVKI5O.js.map} +1 -1
- package/dist/{chunk-BQCD5MEV.js → chunk-CKNRITN3.js} +4 -4
- package/dist/{chunk-BQCD5MEV.js.map → chunk-CKNRITN3.js.map} +1 -1
- package/dist/{chunk-IMYSQX2X.js → chunk-FKHOREJP.js} +4 -4
- package/dist/{chunk-IMYSQX2X.js.map → chunk-FKHOREJP.js.map} +1 -1
- package/dist/{chunk-XWMTXQF3.js → chunk-LTPU2AL3.js} +83 -36
- package/dist/chunk-LTPU2AL3.js.map +1 -0
- package/dist/{chunk-SKE2RDD2.js → chunk-UXUDOFKZ.js} +14 -62
- package/dist/chunk-UXUDOFKZ.js.map +1 -0
- package/dist/cms/convex/index.js +2 -2
- package/dist/cms/index.js +2 -2
- package/dist/cms/tables/tables-dialog.js +2 -2
- package/dist/{editor-543ARQ6S.js → editor-HJ3UNV3Q.js} +10 -10
- package/dist/{editor-543ARQ6S.js.map → editor-HJ3UNV3Q.js.map} +1 -1
- package/dist/types/fields/src/components/row-edit-panel.d.ts +2 -0
- package/dist/types/fields/src/components/row-editor.d.ts +3 -1
- package/dist/types/fields/src/components/use-picker-combobox.d.ts +2 -0
- package/package.json +1 -1
- package/dist/blocknote-editor-547WFBXP.js +0 -7
- package/dist/blocknote-preview-CTMNUSYX.js +0 -7
- package/dist/chunk-SKE2RDD2.js.map +0 -1
- package/dist/chunk-XWMTXQF3.js.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useMarkdownInsertPickers } from './chunk-ZTWPGA37.js';
|
|
2
2
|
import { readSessionCookie } from './chunk-QPQRNIKG.js';
|
|
3
|
-
import { cmsBackdrop, cmsBox, cmsButton, ghostBtn, CMS_FIELD_EDITOR_Z_INDEX, buildStampAttrs, ACCENT_FG, ACCENT, primaryBtn,
|
|
4
|
-
import { createInertFieldsDataAdapter, inertRichtextHostAdapter, RichtextHostProvider, FieldsDataProvider, ImageCell, FieldInput, isPickerOverlayTarget, RowEditor, Dialog, DialogContent, preventDismissOnPickerOverlay, DialogHeader, DialogTitle, DialogDescription, DialogFooter, Button, Label, RichDocView, previewLabel, MarkdownFieldTrigger, validateFileForKind, CellRenderer } from './chunk-
|
|
3
|
+
import { cmsBackdrop, cmsBox, cmsButton, ghostBtn, CMS_FIELD_EDITOR_Z_INDEX, buildStampAttrs, ACCENT_FG, ACCENT, primaryBtn, dangerBtn, IconTrash, cmsMuted, CMS_ROW_EDITOR_Z_INDEX, Icon, CMS_MARKDOWN_EDITOR_Z_INDEX } from './chunk-ICKWVUW7.js';
|
|
4
|
+
import { createInertFieldsDataAdapter, inertRichtextHostAdapter, RichtextHostProvider, FieldsDataProvider, TooltipProvider, ImageCell, FieldInput, isPickerOverlayTarget, RowEditor, Dialog, DialogContent, preventDismissOnPickerOverlay, DialogHeader, DialogTitle, DialogDescription, DialogFooter, Button, Label, RichDocView, previewLabel, MarkdownFieldTrigger, validateFileForKind, CellRenderer } from './chunk-LTPU2AL3.js';
|
|
5
5
|
import { fallbackPreviewLabel, filterSortDocuments, myDraft, toDocumentId, isValidAssetId, stripSystemFields, tableDisplayName, fieldDisplayName, editorAccessEnabled, richContentPlainText, newProvisionalRowId, findTableAccess, findProposalIdsOverlappingTarget, validatePatch, stringifyRichDoc, SHARE_LIST_LIMIT, collectRichDocAssetIds, formatNumericDate, looksLikeId, normalizeRichField, emptyToUndefined, isHttpUrl, focalObjectPosition, formatIdShort, refTarget, staleFieldNames, proposalDiffFieldNames, computeProposalRecordDiff, plainTextIfRichDoc } from './chunk-5IPH2A64.js';
|
|
6
6
|
import { createContext, lazy, useMemo, useState, useRef, useCallback, useEffect, useContext, useId, useLayoutEffect, Suspense } from 'react';
|
|
7
7
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
@@ -237,7 +237,7 @@ function DefaultRichtextHostProvider({
|
|
|
237
237
|
return /* @__PURE__ */ jsx(RichtextHostProvider, { adapter: resolved, children });
|
|
238
238
|
}
|
|
239
239
|
var MarkdownEditorDialogLazy = lazy(
|
|
240
|
-
() => import('./editor-
|
|
240
|
+
() => import('./editor-HJ3UNV3Q.js').then((m) => ({ default: m.MarkdownEditorDialog }))
|
|
241
241
|
);
|
|
242
242
|
function defaultRenderMarkdownField(props) {
|
|
243
243
|
return /* @__PURE__ */ jsx(CmsMarkdownFieldInput, { ...props });
|
|
@@ -1533,10 +1533,10 @@ function CmsProviderSession({
|
|
|
1533
1533
|
pendingReplaces.length
|
|
1534
1534
|
]
|
|
1535
1535
|
);
|
|
1536
|
-
return /* @__PURE__ */ jsx(CmsContext.Provider, { value, children: /* @__PURE__ */ jsx(FieldsDataProvider, { adapter: adapters.fieldsDataAdapter, children: /* @__PURE__ */ jsx(CmsTableRowsContext.Provider, { value: tableRows, children: /* @__PURE__ */
|
|
1536
|
+
return /* @__PURE__ */ jsx(CmsContext.Provider, { value, children: /* @__PURE__ */ jsx(FieldsDataProvider, { adapter: adapters.fieldsDataAdapter, children: /* @__PURE__ */ jsx(CmsTableRowsContext.Provider, { value: tableRows, children: /* @__PURE__ */ jsx(DefaultRichtextHostProvider, { manifest, adapter: richtextHostAdapter, children: /* @__PURE__ */ jsxs(TooltipProvider, { children: [
|
|
1537
1537
|
children,
|
|
1538
1538
|
pendingInPlaceKey ? /* @__PURE__ */ jsx(InPlaceSwitchModal, { onChoose: resolveInPlaceSwitch }) : null
|
|
1539
|
-
] }) }) }) });
|
|
1539
|
+
] }) }) }) }) });
|
|
1540
1540
|
}
|
|
1541
1541
|
function useCms() {
|
|
1542
1542
|
const ctx = useContext(CmsContext);
|
|
@@ -1760,10 +1760,10 @@ function FieldEditorDialog({
|
|
|
1760
1760
|
);
|
|
1761
1761
|
}
|
|
1762
1762
|
var MarkdownEditorLazy = lazy(
|
|
1763
|
-
() => import('./editor-
|
|
1763
|
+
() => import('./editor-HJ3UNV3Q.js').then((m) => ({ default: m.MarkdownEditor }))
|
|
1764
1764
|
);
|
|
1765
1765
|
var MarkdownInsertPickersLazy = lazy(
|
|
1766
|
-
() => import('./editor-
|
|
1766
|
+
() => import('./editor-HJ3UNV3Q.js').then((m) => ({ default: m.MarkdownInsertPickers }))
|
|
1767
1767
|
);
|
|
1768
1768
|
var shellStyle = {
|
|
1769
1769
|
display: "block",
|
|
@@ -3372,8 +3372,6 @@ function CmsFloatingToolbar({
|
|
|
3372
3372
|
outcomes,
|
|
3373
3373
|
saveDraft,
|
|
3374
3374
|
discardDraft,
|
|
3375
|
-
publishMine,
|
|
3376
|
-
withdrawMine,
|
|
3377
3375
|
inPlaceDirty,
|
|
3378
3376
|
navigation,
|
|
3379
3377
|
manifest,
|
|
@@ -3432,12 +3430,13 @@ function CmsFloatingToolbar({
|
|
|
3432
3430
|
}, [settingsOpen]);
|
|
3433
3431
|
const integrityReason = useMemo(() => {
|
|
3434
3432
|
if (!activeNavRowId || !navigation.ok) return null;
|
|
3435
|
-
|
|
3433
|
+
const integrity = describeContentRefIntegrity({
|
|
3436
3434
|
manifest,
|
|
3437
3435
|
navigationTable: navigation.table,
|
|
3438
3436
|
projection,
|
|
3439
3437
|
navRowId: activeNavRowId
|
|
3440
|
-
})
|
|
3438
|
+
});
|
|
3439
|
+
return integrity.code === "empty_body" ? null : integrity.reason;
|
|
3441
3440
|
}, [activeNavRowId, navigation, manifest, projection]);
|
|
3442
3441
|
const hasProposalActions = proposalActions !== null;
|
|
3443
3442
|
const draftCount = draft.length;
|
|
@@ -3552,14 +3551,6 @@ function CmsFloatingToolbar({
|
|
|
3552
3551
|
setEditMode(false);
|
|
3553
3552
|
setConfirm(null);
|
|
3554
3553
|
}
|
|
3555
|
-
async function onPublishMine() {
|
|
3556
|
-
await publishMine();
|
|
3557
|
-
setConfirm(null);
|
|
3558
|
-
}
|
|
3559
|
-
async function onWithdrawConfirmed() {
|
|
3560
|
-
await withdrawMine();
|
|
3561
|
-
setConfirm(null);
|
|
3562
|
-
}
|
|
3563
3554
|
const outcome = outcomes && outcomes.length > 0 ? summarizeOutcomes(outcomes) : null;
|
|
3564
3555
|
return /* @__PURE__ */ jsxs("div", { style: barStyle, "data-columnus-cms-toolbar": "true", role: "toolbar", "aria-label": "Columnus CMS", children: [
|
|
3565
3556
|
chatPanel,
|
|
@@ -3574,24 +3565,13 @@ function CmsFloatingToolbar({
|
|
|
3574
3565
|
onConfirm: onDiscardConfirmed,
|
|
3575
3566
|
onDismiss: () => setConfirm(null)
|
|
3576
3567
|
}
|
|
3577
|
-
) : confirm === "withdraw" ? /* @__PURE__ */ jsx(
|
|
3578
|
-
ConfirmPanel,
|
|
3579
|
-
{
|
|
3580
|
-
label: "withdraw",
|
|
3581
|
-
prompt: "Withdraw your pending proposal?",
|
|
3582
|
-
confirmLabel: actionPhase === "withdrawing" ? "Withdrawing\u2026" : "Withdraw",
|
|
3583
|
-
dismissLabel: "Cancel",
|
|
3584
|
-
busy,
|
|
3585
|
-
onConfirm: () => void onWithdrawConfirmed(),
|
|
3586
|
-
onDismiss: () => setConfirm(null)
|
|
3587
|
-
}
|
|
3588
3568
|
) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3589
3569
|
/* @__PURE__ */ jsxs("div", { style: actionsCluster, children: [
|
|
3590
3570
|
changeCount > 0 || changesOpen ? /* @__PURE__ */ jsxs(
|
|
3591
3571
|
"button",
|
|
3592
3572
|
{
|
|
3593
3573
|
type: "button",
|
|
3594
|
-
style: ghostBtn,
|
|
3574
|
+
style: canPublish && !editMode ? primaryBtn : ghostBtn,
|
|
3595
3575
|
"aria-pressed": changesOpen,
|
|
3596
3576
|
onClick: () => showPanel(changesOpen ? null : "changes"),
|
|
3597
3577
|
children: [
|
|
@@ -3600,35 +3580,6 @@ function CmsFloatingToolbar({
|
|
|
3600
3580
|
]
|
|
3601
3581
|
}
|
|
3602
3582
|
) : null,
|
|
3603
|
-
!editMode && canPublish ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3604
|
-
/* @__PURE__ */ jsxs(
|
|
3605
|
-
"button",
|
|
3606
|
-
{
|
|
3607
|
-
type: "button",
|
|
3608
|
-
style: primaryBtn,
|
|
3609
|
-
disabled: busy,
|
|
3610
|
-
title: "Publish your current draft to the live site",
|
|
3611
|
-
onClick: () => void onPublishMine(),
|
|
3612
|
-
children: [
|
|
3613
|
-
/* @__PURE__ */ jsx(IconPublish, {}),
|
|
3614
|
-
actionPhase === "publishing" ? "Publishing\u2026" : "Publish mine"
|
|
3615
|
-
]
|
|
3616
|
-
}
|
|
3617
|
-
),
|
|
3618
|
-
/* @__PURE__ */ jsxs(
|
|
3619
|
-
"button",
|
|
3620
|
-
{
|
|
3621
|
-
type: "button",
|
|
3622
|
-
style: dangerBtn,
|
|
3623
|
-
disabled: busy,
|
|
3624
|
-
onClick: () => setConfirm("withdraw"),
|
|
3625
|
-
children: [
|
|
3626
|
-
/* @__PURE__ */ jsx(IconX, {}),
|
|
3627
|
-
"Withdraw mine"
|
|
3628
|
-
]
|
|
3629
|
-
}
|
|
3630
|
-
)
|
|
3631
|
-
] }) : null,
|
|
3632
3583
|
!editMode ? /* @__PURE__ */ jsxs(
|
|
3633
3584
|
"button",
|
|
3634
3585
|
{
|
|
@@ -3918,6 +3869,7 @@ function DraftRowDialog({
|
|
|
3918
3869
|
initial: initialDoc,
|
|
3919
3870
|
saveLabel: "Add to draft",
|
|
3920
3871
|
overlayZIndex: CMS_ROW_EDITOR_Z_INDEX,
|
|
3872
|
+
forEditors: true,
|
|
3921
3873
|
allowCreate: (refTable) => cms.canProposeOp(refTable, "insert"),
|
|
3922
3874
|
onSubmit: async (doc) => {
|
|
3923
3875
|
const fields = stripSystemFields(doc);
|
|
@@ -4213,5 +4165,5 @@ function CmsRichDocView(props) {
|
|
|
4213
4165
|
}
|
|
4214
4166
|
|
|
4215
4167
|
export { CmsCompoundCreate, CmsCreateButton, CmsField, CmsFieldStamp, CmsFloatingToolbar, CmsLoginPage, CmsProvider, CmsRichDocView, CmsRow, DefaultRichtextHostProvider, DraftRowDialog, FieldEditorDialog, HTML_CACHE_BYPASS_HEADER, InsertRowDialog, applyDeleteToDraft, applyFieldToDraft, applyRowToDraft, buildInsertDraft, canProposeField, canProposeOp, cmsReadableTables, createDefaultCmsRichtextAdapters, createDefaultRichtextHostAdapter, createTableRowsRichtextHostAdapter, describeContentRefIntegrity, findContentRefField, inferNavigationTable, isCmsPath, mergeDraftIntoProposal, proposeEditableTable, readSession, resolveEditSurface, resolveStampDisplay, shouldBypassHtmlCache, slugifyDe, stampEditKey, uniqueSlug, useCms, useCmsOptional, useCmsProjectedField, useCmsProjectedString, useCmsProjectedTable, useCmsRelatedRow, useCmsRow, useCmsRowOptional, writeSession };
|
|
4216
|
-
//# sourceMappingURL=chunk-
|
|
4217
|
-
//# sourceMappingURL=chunk-
|
|
4168
|
+
//# sourceMappingURL=chunk-UXUDOFKZ.js.map
|
|
4169
|
+
//# sourceMappingURL=chunk-UXUDOFKZ.js.map
|