@ishibashi0112/spreadsheet-grid-core 0.41.0 → 0.41.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/README.md +25 -0
- package/dist/logic/gridHeight.cjs +1 -0
- package/dist/logic/gridHeight.d.ts +12 -0
- package/dist/logic/gridHeight.js +32 -0
- package/dist/model/gridTypes.core.d.ts +1008 -0
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# @ishibashi0112/spreadsheet-grid-core
|
|
2
|
+
|
|
3
|
+
The framework-agnostic core of [`@ishibashi0112/spreadsheet-grid`](https://www.npmjs.com/package/@ishibashi0112/spreadsheet-grid): state store, derived-value computation, commands and DOM controllers. It does not depend on React.
|
|
4
|
+
|
|
5
|
+
**You normally do not install or import this package directly.** It is a regular dependency of the React package, which re-exports the public types. Use `@ishibashi0112/spreadsheet-grid` in React apps.
|
|
6
|
+
|
|
7
|
+
## What is in here
|
|
8
|
+
|
|
9
|
+
- Public type definitions with JSDoc. The field docs of `SpreadsheetGridProps`, `GridColumn`, `SpreadsheetGridHandle` and the other option types are in `dist/model/gridTypes.core.d.ts`; they match the tables in `API_REFERENCE.md` of the React package.
|
|
10
|
+
- Framework-agnostic modules under subpaths: `@ishibashi0112/spreadsheet-grid-core/<dir>/<module>` (`model` / `logic` / `controllers` / `engine` / `utils` / `testing`). They are building blocks for the framework adapters and are not covered by `API_REFERENCE.md`.
|
|
11
|
+
|
|
12
|
+
## License
|
|
13
|
+
|
|
14
|
+
MIT
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## 日本語
|
|
19
|
+
|
|
20
|
+
[`@ishibashi0112/spreadsheet-grid`](https://www.npmjs.com/package/@ishibashi0112/spreadsheet-grid) のフレームワーク非依存コア(状態 store / 派生値計算 / コマンド / DOM コントローラ)です。React に依存しません。
|
|
21
|
+
|
|
22
|
+
**通常は直接インストール / import しません。** React 版パッケージの通常依存として自動で入り、公開型も React 版から再エクスポートされます。React アプリでは `@ishibashi0112/spreadsheet-grid` を使ってください。
|
|
23
|
+
|
|
24
|
+
- 公開型の定義(JSDoc 付き)。`SpreadsheetGridProps` / `GridColumn` / `SpreadsheetGridHandle` などのフィールドの説明は `dist/model/gridTypes.core.d.ts` にあり、React 版パッケージ同梱の `API_REFERENCE.md` の表と同じ内容です。
|
|
25
|
+
- サブパス `@ishibashi0112/spreadsheet-grid-core/<dir>/<module>`(`model` / `logic` / `controllers` / `engine` / `utils` / `testing`)のモジュールは各フレームワーク版(アダプタ)向けの部品で、`API_REFERENCE.md` の対象外です。
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.freeze({fillParent:!1,rootStyle:void 0,scrollContainerStyle:void 0});function t(e){return typeof e==`string`&&e.includes(`%`)}function n(n,r){return t(n)?r===void 0?{fillParent:!0,rootStyle:{height:n},scrollContainerStyle:{maxHeight:`none`}}:{fillParent:!0,rootStyle:{maxHeight:n},scrollContainerStyle:{height:r,maxHeight:r}}:n===void 0&&r===void 0?e:{fillParent:!1,rootStyle:void 0,scrollContainerStyle:{...n===void 0?{}:{height:n},maxHeight:r??`none`}}}exports.isParentRelativeHeight=t,exports.resolveGridHeightLayout=n;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type GridHeightValue = number | string;
|
|
2
|
+
export type GridHeightStyle = {
|
|
3
|
+
height?: GridHeightValue;
|
|
4
|
+
maxHeight?: GridHeightValue;
|
|
5
|
+
};
|
|
6
|
+
export type GridHeightLayout = {
|
|
7
|
+
fillParent: boolean;
|
|
8
|
+
rootStyle: GridHeightStyle | undefined;
|
|
9
|
+
scrollContainerStyle: GridHeightStyle | undefined;
|
|
10
|
+
};
|
|
11
|
+
export declare function isParentRelativeHeight(height: GridHeightValue | undefined): height is string;
|
|
12
|
+
export declare function resolveGridHeightLayout(height: GridHeightValue | undefined, maxHeight: GridHeightValue | undefined): GridHeightLayout;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
//#region src/logic/gridHeight.ts
|
|
2
|
+
var e = Object.freeze({
|
|
3
|
+
fillParent: !1,
|
|
4
|
+
rootStyle: void 0,
|
|
5
|
+
scrollContainerStyle: void 0
|
|
6
|
+
});
|
|
7
|
+
function t(e) {
|
|
8
|
+
return typeof e == "string" && e.includes("%");
|
|
9
|
+
}
|
|
10
|
+
function n(n, r) {
|
|
11
|
+
return t(n) ? r === void 0 ? {
|
|
12
|
+
fillParent: !0,
|
|
13
|
+
rootStyle: { height: n },
|
|
14
|
+
scrollContainerStyle: { maxHeight: "none" }
|
|
15
|
+
} : {
|
|
16
|
+
fillParent: !0,
|
|
17
|
+
rootStyle: { maxHeight: n },
|
|
18
|
+
scrollContainerStyle: {
|
|
19
|
+
height: r,
|
|
20
|
+
maxHeight: r
|
|
21
|
+
}
|
|
22
|
+
} : n === void 0 && r === void 0 ? e : {
|
|
23
|
+
fillParent: !1,
|
|
24
|
+
rootStyle: void 0,
|
|
25
|
+
scrollContainerStyle: {
|
|
26
|
+
...n === void 0 ? {} : { height: n },
|
|
27
|
+
maxHeight: r ?? "none"
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
//#endregion
|
|
32
|
+
export { t as isParentRelativeHeight, n as resolveGridHeightLayout };
|