@casualoffice/sheets 0.16.0 → 0.18.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/chrome.cjs +3421 -307
- package/dist/chrome.cjs.map +1 -1
- package/dist/chrome.d.cts +33 -0
- package/dist/chrome.d.ts +33 -0
- package/dist/chrome.js +3380 -266
- package/dist/chrome.js.map +1 -1
- package/dist/embed/embed-runtime.js +152 -150
- package/package.json +1 -1
- package/src/chrome/ConditionalFormattingDialog.tsx +534 -0
- package/src/chrome/CustomSortDialog.tsx +357 -0
- package/src/chrome/DataValidationDialog.tsx +536 -0
- package/src/chrome/DeleteCellsDialog.tsx +183 -0
- package/src/chrome/GoalSeekDialog.tsx +370 -0
- package/src/chrome/InsertCellsDialog.tsx +185 -0
- package/src/chrome/InsertChartDialog.tsx +490 -0
- package/src/chrome/InsertFunctionDialog.tsx +493 -0
- package/src/chrome/InsertPivotDialog.tsx +488 -0
- package/src/chrome/InsertSparklineDialog.tsx +344 -0
- package/src/chrome/MenuBar.feature-gate.unit.test.ts +152 -0
- package/src/chrome/MenuBar.tsx +36 -141
- package/src/chrome/NameManagerDialog.tsx +378 -0
- package/src/chrome/PasteSpecialDialog.tsx +286 -0
- package/src/chrome/dialog-context.tsx +24 -0
- package/src/chrome/menu-model.ts +191 -0
package/dist/chrome.d.cts
CHANGED
|
@@ -75,6 +75,38 @@ interface AutoSumPickerProps {
|
|
|
75
75
|
}
|
|
76
76
|
declare function AutoSumPicker({ api }: AutoSumPickerProps): react.JSX.Element;
|
|
77
77
|
|
|
78
|
+
/**
|
|
79
|
+
* Copyright 2026 Casual Office
|
|
80
|
+
*
|
|
81
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
82
|
+
* you may not use this file except in compliance with the License.
|
|
83
|
+
* You may obtain a copy of the License at
|
|
84
|
+
*
|
|
85
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
86
|
+
*
|
|
87
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
88
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
89
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
90
|
+
* See the License for the specific language governing permissions and
|
|
91
|
+
* limitations under the License.
|
|
92
|
+
*/
|
|
93
|
+
/**
|
|
94
|
+
* MenuBar data model + pure gating engine.
|
|
95
|
+
*
|
|
96
|
+
* Split out of `MenuBar.tsx` so the feature-gating contract is unit-testable
|
|
97
|
+
* under `node --test`: `MenuBar.tsx` statically imports `@univerjs/core` values
|
|
98
|
+
* (which the vendored typeless-package ESM can't expose as named exports to
|
|
99
|
+
* node), so it can't be imported in a DOM-less test. This module has only
|
|
100
|
+
* type-only imports (all erased at build), so `computeVisibleMenus` — the code
|
|
101
|
+
* that decides which menus/items a host actually sees — can be exercised
|
|
102
|
+
* directly.
|
|
103
|
+
*
|
|
104
|
+
* Feature gates: pass `features` to hide a control or whole menu group when its
|
|
105
|
+
* feature is disabled. Defaults to all-enabled. A control whose feature is
|
|
106
|
+
* `false` does not render. An entire top-level menu whose own `feature` is
|
|
107
|
+
* `false`, or that ends up with no runnable items, is dropped.
|
|
108
|
+
*/
|
|
109
|
+
|
|
78
110
|
/**
|
|
79
111
|
* Dialog kinds the host can choose to render via `onDialogRequest`. These are
|
|
80
112
|
* the actions the SDK chrome can't fulfil on its own (no built-in modal). The
|
|
@@ -82,6 +114,7 @@ declare function AutoSumPicker({ api }: AutoSumPickerProps): react.JSX.Element;
|
|
|
82
114
|
* carries the pre-resolved A1 selection so the host doesn't have to re-read it.
|
|
83
115
|
*/
|
|
84
116
|
type MenuDialogKind = DialogKind;
|
|
117
|
+
|
|
85
118
|
interface MenuBarProps {
|
|
86
119
|
/** Live API, or `null` until the editor is ready. */
|
|
87
120
|
api: CasualSheetsAPI | null;
|
package/dist/chrome.d.ts
CHANGED
|
@@ -75,6 +75,38 @@ interface AutoSumPickerProps {
|
|
|
75
75
|
}
|
|
76
76
|
declare function AutoSumPicker({ api }: AutoSumPickerProps): react.JSX.Element;
|
|
77
77
|
|
|
78
|
+
/**
|
|
79
|
+
* Copyright 2026 Casual Office
|
|
80
|
+
*
|
|
81
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
82
|
+
* you may not use this file except in compliance with the License.
|
|
83
|
+
* You may obtain a copy of the License at
|
|
84
|
+
*
|
|
85
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
86
|
+
*
|
|
87
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
88
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
89
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
90
|
+
* See the License for the specific language governing permissions and
|
|
91
|
+
* limitations under the License.
|
|
92
|
+
*/
|
|
93
|
+
/**
|
|
94
|
+
* MenuBar data model + pure gating engine.
|
|
95
|
+
*
|
|
96
|
+
* Split out of `MenuBar.tsx` so the feature-gating contract is unit-testable
|
|
97
|
+
* under `node --test`: `MenuBar.tsx` statically imports `@univerjs/core` values
|
|
98
|
+
* (which the vendored typeless-package ESM can't expose as named exports to
|
|
99
|
+
* node), so it can't be imported in a DOM-less test. This module has only
|
|
100
|
+
* type-only imports (all erased at build), so `computeVisibleMenus` — the code
|
|
101
|
+
* that decides which menus/items a host actually sees — can be exercised
|
|
102
|
+
* directly.
|
|
103
|
+
*
|
|
104
|
+
* Feature gates: pass `features` to hide a control or whole menu group when its
|
|
105
|
+
* feature is disabled. Defaults to all-enabled. A control whose feature is
|
|
106
|
+
* `false` does not render. An entire top-level menu whose own `feature` is
|
|
107
|
+
* `false`, or that ends up with no runnable items, is dropped.
|
|
108
|
+
*/
|
|
109
|
+
|
|
78
110
|
/**
|
|
79
111
|
* Dialog kinds the host can choose to render via `onDialogRequest`. These are
|
|
80
112
|
* the actions the SDK chrome can't fulfil on its own (no built-in modal). The
|
|
@@ -82,6 +114,7 @@ declare function AutoSumPicker({ api }: AutoSumPickerProps): react.JSX.Element;
|
|
|
82
114
|
* carries the pre-resolved A1 selection so the host doesn't have to re-read it.
|
|
83
115
|
*/
|
|
84
116
|
type MenuDialogKind = DialogKind;
|
|
117
|
+
|
|
85
118
|
interface MenuBarProps {
|
|
86
119
|
/** Live API, or `null` until the editor is ready. */
|
|
87
120
|
api: CasualSheetsAPI | null;
|