@tatamicks/core 0.2.3 → 0.3.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/index.css +1 -1
- package/dist/index.js +10 -18
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2764 -3169
- package/dist/index.mjs.map +1 -1
- package/dist/src/index.d.ts +54 -57
- package/package.json +77 -77
package/dist/src/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { default as default_2 } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
2
|
+
import { JSX } from 'react/jsx-runtime';
|
|
4
3
|
import { MemoExoticComponent } from 'react';
|
|
4
|
+
import { NamedExoticComponent } from 'react';
|
|
5
5
|
import { ReactNode } from 'react';
|
|
6
6
|
import { RefAttributes } from 'react';
|
|
7
7
|
|
|
@@ -179,7 +179,7 @@ export declare enum BlockChangeType {
|
|
|
179
179
|
PASTE = "paste"
|
|
180
180
|
}
|
|
181
181
|
|
|
182
|
-
export declare const BlockContainer:
|
|
182
|
+
export declare const BlockContainer: NamedExoticComponent<BlockContainerProps & RefAttributes<BlockRef>>;
|
|
183
183
|
|
|
184
184
|
export declare interface BlockContainerProps {
|
|
185
185
|
block: Block;
|
|
@@ -237,7 +237,7 @@ export declare interface BlockGuideBorderProps {
|
|
|
237
237
|
className?: string;
|
|
238
238
|
}
|
|
239
239
|
|
|
240
|
-
export declare const BlockLayer: MemoExoticComponent<({ blocks, pluginRegistry, mode, values, selectedBlockIds, getBlockRectPx, onValueChange, onValueBlur, showGuides, showBorder, blockSubZIndex, defaultGuideBorder, dpi, className, }: BlockLayerProps) =>
|
|
240
|
+
export declare const BlockLayer: MemoExoticComponent<({ blocks, pluginRegistry, mode, values, selectedBlockIds, getBlockRectPx, onValueChange, onValueBlur, showGuides, showBorder, blockSubZIndex, defaultGuideBorder, dpi, className, }: BlockLayerProps) => JSX.Element>;
|
|
241
241
|
|
|
242
242
|
export declare interface BlockLayerProps {
|
|
243
243
|
blocks: Block[];
|
|
@@ -273,7 +273,7 @@ export declare interface BlockLayout {
|
|
|
273
273
|
* 内部配列では最後が最前面
|
|
274
274
|
*/
|
|
275
275
|
export declare const BlockOrderPanel: {
|
|
276
|
-
({ blocks, onBlocksChange, }: BlockOrderPanelProps):
|
|
276
|
+
({ blocks, onBlocksChange, }: BlockOrderPanelProps): JSX.Element;
|
|
277
277
|
displayName: string;
|
|
278
278
|
};
|
|
279
279
|
|
|
@@ -341,7 +341,7 @@ export declare interface BlockPosPx {
|
|
|
341
341
|
* 選択されたブロックのプロパティを編集するための統合サイドバーコンポーネント。
|
|
342
342
|
* BasePanels(共通設定)と PluginPanels(固有設定)を組み合わせて表示します。
|
|
343
343
|
*/
|
|
344
|
-
export declare const BlockPropertyPanel: MemoExoticComponent<({ selectedBlocks, pluginRegistry, onUpdateBlocks, gridSize, className, }: BlockPropertyPanelProps) =>
|
|
344
|
+
export declare const BlockPropertyPanel: MemoExoticComponent<({ selectedBlocks, pluginRegistry, onUpdateBlocks, gridSize, className, }: BlockPropertyPanelProps) => JSX.Element>;
|
|
345
345
|
|
|
346
346
|
export declare interface BlockPropertyPanelProps {
|
|
347
347
|
selectedBlocks: Block[];
|
|
@@ -564,7 +564,7 @@ export declare interface BorderPanelProps {
|
|
|
564
564
|
onUpdateBlocks: (updates: Record<string, Partial<Block>>) => void;
|
|
565
565
|
}
|
|
566
566
|
|
|
567
|
-
export declare const BorderRenderer: MemoExoticComponent<({ width, height, border, dpi, className, }: BorderRendererProps) =>
|
|
567
|
+
export declare const BorderRenderer: MemoExoticComponent<({ width, height, border, dpi, className, }: BorderRendererProps) => JSX.Element | null>;
|
|
568
568
|
|
|
569
569
|
export declare interface BorderRendererProps {
|
|
570
570
|
width: number;
|
|
@@ -630,7 +630,7 @@ export declare function calculateResizedLayout({ layout, handle, deltaCol, delta
|
|
|
630
630
|
* - BlockOrderPanel: ブロック順序設定
|
|
631
631
|
*/
|
|
632
632
|
export declare const CanvasPanel: {
|
|
633
|
-
({ schema, onSchemaChange }: CanvasPanelProps):
|
|
633
|
+
({ schema, onSchemaChange }: CanvasPanelProps): JSX.Element;
|
|
634
634
|
displayName: string;
|
|
635
635
|
};
|
|
636
636
|
|
|
@@ -1110,7 +1110,7 @@ export declare interface DraggingState {
|
|
|
1110
1110
|
isOutside?: boolean;
|
|
1111
1111
|
}
|
|
1112
1112
|
|
|
1113
|
-
export declare const DragLayer: MemoExoticComponent<({ blocks, pluginRegistry, gridLength, draggingState, getBlockRectPx, selectionStyle, ghostZIndex, selectBorderZIndex, blockHandlesZIndex, }: DragLayerProps) =>
|
|
1113
|
+
export declare const DragLayer: MemoExoticComponent<({ blocks, pluginRegistry, gridLength, draggingState, getBlockRectPx, selectionStyle, ghostZIndex, selectBorderZIndex, blockHandlesZIndex, }: DragLayerProps) => JSX.Element | null>;
|
|
1114
1114
|
|
|
1115
1115
|
export declare interface DragLayerProps {
|
|
1116
1116
|
blocks: Block[];
|
|
@@ -1343,6 +1343,18 @@ export declare function getBlockZIndex(index: number): number;
|
|
|
1343
1343
|
*/
|
|
1344
1344
|
export declare function getCommonValue<T = Value>(blocks: Block[], path: string): T | undefined;
|
|
1345
1345
|
|
|
1346
|
+
/**
|
|
1347
|
+
* インタラクション状態からモードを導出する
|
|
1348
|
+
*
|
|
1349
|
+
* @remarks
|
|
1350
|
+
* モードは状態の導出値であり、状態そのものではない
|
|
1351
|
+
* これにより状態の一貫性が保証される
|
|
1352
|
+
*
|
|
1353
|
+
* @param state - インタラクション状態
|
|
1354
|
+
* @returns 現在のモード
|
|
1355
|
+
*/
|
|
1356
|
+
export declare function getInteractionMode(state: InteractionState): InteractionMode;
|
|
1357
|
+
|
|
1346
1358
|
/**
|
|
1347
1359
|
* サポートされる最大ブロック数を取得
|
|
1348
1360
|
*
|
|
@@ -1479,7 +1491,7 @@ export declare type GridChangeType = "resize" | "insert" | "delete" | "equalize"
|
|
|
1479
1491
|
* グリッド線と線の間に寸法(値と単位)を表示します。
|
|
1480
1492
|
* ダブルクリックで単位編集UIを表示します。
|
|
1481
1493
|
*/
|
|
1482
|
-
export declare const GridDimensionLabel: MemoExoticComponent<({ direction, index, dimension, position, currentPxSize, marginLeftPx, marginTopPx, isNearCursor, resizingPxSize, onDimensionChange, }: GridDimensionLabelProps) =>
|
|
1494
|
+
export declare const GridDimensionLabel: MemoExoticComponent<({ direction, index, dimension, position, currentPxSize, marginLeftPx, marginTopPx, isNearCursor, resizingPxSize, onDimensionChange, }: GridDimensionLabelProps) => JSX.Element | null>;
|
|
1483
1495
|
|
|
1484
1496
|
export declare interface GridDimensionLabelProps {
|
|
1485
1497
|
/** ラベルの方向 ('column' or 'row') */
|
|
@@ -1601,7 +1613,7 @@ export declare interface GridPosPx {
|
|
|
1601
1613
|
* 設計文書に従い、「グリッド線そのもののドラッグは禁止」し、
|
|
1602
1614
|
* 「グリッド線の両端ハンドル」のみをドラッグ可能とします。
|
|
1603
1615
|
*/
|
|
1604
|
-
export declare const GridResizeHandle: MemoExoticComponent<({ direction, index, position, marginLeftPx, marginTopPx, onResizeStart, onResize, onResizeEnd, }: GridResizeHandleProps) =>
|
|
1616
|
+
export declare const GridResizeHandle: MemoExoticComponent<({ direction, index, position, marginLeftPx, marginTopPx, onResizeStart, onResize, onResizeEnd, }: GridResizeHandleProps) => JSX.Element>;
|
|
1605
1617
|
|
|
1606
1618
|
/**
|
|
1607
1619
|
* @file GridResizeHandle.tsx
|
|
@@ -1631,7 +1643,7 @@ export declare interface GridResizeHandleProps {
|
|
|
1631
1643
|
* 行・列数を変更するパネル
|
|
1632
1644
|
*/
|
|
1633
1645
|
export declare const GridSizePanel: {
|
|
1634
|
-
({ grid, onGridChange }: GridSizePanelProps):
|
|
1646
|
+
({ grid, onGridChange }: GridSizePanelProps): JSX.Element;
|
|
1635
1647
|
displayName: string;
|
|
1636
1648
|
};
|
|
1637
1649
|
|
|
@@ -1680,7 +1692,7 @@ export declare interface ImageSchema {
|
|
|
1680
1692
|
* スキーマと値のインポート/エクスポート機能を提供
|
|
1681
1693
|
*/
|
|
1682
1694
|
export declare const ImportExportPanel: {
|
|
1683
|
-
({ schema, values, onSchemaChange, onValuesChange, }: ImportExportPanelProps):
|
|
1695
|
+
({ schema, values, onSchemaChange, onValuesChange, }: ImportExportPanelProps): JSX.Element;
|
|
1684
1696
|
displayName: string;
|
|
1685
1697
|
};
|
|
1686
1698
|
|
|
@@ -1695,7 +1707,7 @@ export declare interface ImportExportPanelProps {
|
|
|
1695
1707
|
onValuesChange: (values: Record<string, Value>) => void;
|
|
1696
1708
|
}
|
|
1697
1709
|
|
|
1698
|
-
export declare const InsertGhost: MemoExoticComponent<({ pluginRegistry, gridLength, getBlockRectPx, currentGrid, currentMousePx, pluginKind, defaultSize, isOutside, selectionStyle, ghostZIndex, selectBorderZIndex, blockHandlesZIndex, }: InsertGhostProps) =>
|
|
1710
|
+
export declare const InsertGhost: MemoExoticComponent<({ pluginRegistry, gridLength, getBlockRectPx, currentGrid, currentMousePx, pluginKind, defaultSize, isOutside, selectionStyle, ghostZIndex, selectBorderZIndex, blockHandlesZIndex, }: InsertGhostProps) => JSX.Element | null>;
|
|
1699
1711
|
|
|
1700
1712
|
export declare interface InsertGhostProps {
|
|
1701
1713
|
pluginRegistry: Record<string, BlockPlugin>;
|
|
@@ -1724,7 +1736,7 @@ export declare interface InsertGhostProps {
|
|
|
1724
1736
|
blockHandlesZIndex?: number;
|
|
1725
1737
|
}
|
|
1726
1738
|
|
|
1727
|
-
export declare const InteractionBlock: default_2.MemoExoticComponent<({ block, rect, showHandles, onResizeStart, activeHandle, selectionStyle, handleStyle, selectBorderZIndex, blockHandlesZIndex, }: InteractionBlockProps) =>
|
|
1739
|
+
export declare const InteractionBlock: default_2.MemoExoticComponent<({ block, rect, showHandles, onResizeStart, activeHandle, selectionStyle, handleStyle, selectBorderZIndex, blockHandlesZIndex, }: InteractionBlockProps) => JSX.Element>;
|
|
1728
1740
|
|
|
1729
1741
|
export declare interface InteractionBlockProps {
|
|
1730
1742
|
block: Block;
|
|
@@ -1740,20 +1752,7 @@ export declare interface InteractionBlockProps {
|
|
|
1740
1752
|
blockHandlesZIndex?: number;
|
|
1741
1753
|
}
|
|
1742
1754
|
|
|
1743
|
-
/**
|
|
1744
|
-
* インタラクション変更イベント
|
|
1745
|
-
*
|
|
1746
|
-
* @remarks
|
|
1747
|
-
* OnBlockChangeと同じパターン (type付きUnion型)
|
|
1748
|
-
* 全ての操作をこのイベントで表現する
|
|
1749
|
-
*/
|
|
1750
1755
|
export declare type InteractionChangeEvent = {
|
|
1751
|
-
type: InteractionEventType.SELECT;
|
|
1752
|
-
blockIds: string[];
|
|
1753
|
-
shiftKey?: boolean;
|
|
1754
|
-
} | {
|
|
1755
|
-
type: InteractionEventType.DESELECT;
|
|
1756
|
-
} | {
|
|
1757
1756
|
type: InteractionEventType.START_PRESS;
|
|
1758
1757
|
blockId: string;
|
|
1759
1758
|
startGrid: {
|
|
@@ -1807,10 +1806,6 @@ export declare type InteractionChangeEvent = {
|
|
|
1807
1806
|
* インタラクション変更イベントの種類を型安全に扱うための列挙型
|
|
1808
1807
|
*/
|
|
1809
1808
|
export declare enum InteractionEventType {
|
|
1810
|
-
/** ブロックを選択 */
|
|
1811
|
-
SELECT = "select",
|
|
1812
|
-
/** 選択を解除 */
|
|
1813
|
-
DESELECT = "deselect",
|
|
1814
1809
|
/** プレス開始(ドラッグ判定前) */
|
|
1815
1810
|
START_PRESS = "startPress",
|
|
1816
1811
|
/** ドラッグ更新 */
|
|
@@ -1831,7 +1826,7 @@ export declare enum InteractionEventType {
|
|
|
1831
1826
|
START_RESIZE = "startResize"
|
|
1832
1827
|
}
|
|
1833
1828
|
|
|
1834
|
-
export declare const InteractionLayer: MemoExoticComponent<({ blocks, pluginRegistry, gridLength, getBlockRectPx, getColIndex, getRowIndex, state, onChange, onBlockChange, scale, className, selectionStyle, handleStyle, editBlockZIndex, selectBorderZIndex, blockHandlesZIndex, dragGhostZIndex, }: InteractionLayerProps) =>
|
|
1829
|
+
export declare const InteractionLayer: MemoExoticComponent<({ blocks, pluginRegistry, gridLength, getBlockRectPx, getColIndex, getRowIndex, state, onChange, selectedBlockIds, onSelectionChange, onBlockChange, scale, className, selectionStyle, handleStyle, editBlockZIndex, selectBorderZIndex, blockHandlesZIndex, dragGhostZIndex, }: InteractionLayerProps) => JSX.Element>;
|
|
1835
1830
|
|
|
1836
1831
|
/**
|
|
1837
1832
|
* InteractionLayerProps
|
|
@@ -1848,6 +1843,8 @@ export declare interface InteractionLayerProps {
|
|
|
1848
1843
|
getRowIndex: (px: number) => number;
|
|
1849
1844
|
state: InteractionState;
|
|
1850
1845
|
onChange: OnInteractionChange;
|
|
1846
|
+
selectedBlockIds: string[];
|
|
1847
|
+
onSelectionChange: (blockIds: string[]) => void;
|
|
1851
1848
|
onBlockChange?: OnBlockChange;
|
|
1852
1849
|
scale?: number;
|
|
1853
1850
|
className?: string;
|
|
@@ -1882,12 +1879,12 @@ export declare enum InteractionMode {
|
|
|
1882
1879
|
* @remarks
|
|
1883
1880
|
* Pluginの `value` に相当する統合状態
|
|
1884
1881
|
* 全ての操作状態をこのオブジェクト1つで管理する
|
|
1882
|
+
*
|
|
1883
|
+
* **注意**:
|
|
1884
|
+
* - 選択状態(`selectedBlockIds`)は外部で管理されます
|
|
1885
|
+
* - モード(`mode`)は`dragging`と`editingBlockId`から導出されます
|
|
1885
1886
|
*/
|
|
1886
1887
|
export declare interface InteractionState {
|
|
1887
|
-
/** 現在のモード */
|
|
1888
|
-
mode: InteractionMode;
|
|
1889
|
-
/** 選択中のブロックID群 */
|
|
1890
|
-
selectedBlockIds: string[];
|
|
1891
1888
|
/** 編集中のブロックID (nullの場合は編集モードではない) */
|
|
1892
1889
|
editingBlockId: string | null;
|
|
1893
1890
|
/** ドラッグ中の状態 (ドラッグ中のみ有効) */
|
|
@@ -1968,7 +1965,7 @@ export declare interface MarginOverlayProps {
|
|
|
1968
1965
|
* マージンを変更するパネル
|
|
1969
1966
|
*/
|
|
1970
1967
|
export declare const MarginPanel: {
|
|
1971
|
-
({ paper, onPaperChange }: MarginPanelProps):
|
|
1968
|
+
({ paper, onPaperChange }: MarginPanelProps): JSX.Element;
|
|
1972
1969
|
displayName: string;
|
|
1973
1970
|
};
|
|
1974
1971
|
|
|
@@ -1988,7 +1985,7 @@ export declare interface MetaPanelProps {
|
|
|
1988
1985
|
|
|
1989
1986
|
export declare function mmsToPxs(mms: number[], dpi?: number): number[];
|
|
1990
1987
|
|
|
1991
|
-
export declare const MovingGhost: MemoExoticComponent<({ blocks, pluginRegistry, gridLength, getBlockRectPx, selectedBlockIds, deltaCol, deltaRow, isOutside, currentMousePx, selectionStyle, ghostZIndex, selectBorderZIndex, blockHandlesZIndex, }: MovingGhostProps) =>
|
|
1988
|
+
export declare const MovingGhost: MemoExoticComponent<({ blocks, pluginRegistry, gridLength, getBlockRectPx, selectedBlockIds, deltaCol, deltaRow, isOutside, currentMousePx, selectionStyle, ghostZIndex, selectBorderZIndex, blockHandlesZIndex, }: MovingGhostProps) => JSX.Element>;
|
|
1992
1989
|
|
|
1993
1990
|
export declare interface MovingGhostProps {
|
|
1994
1991
|
blocks: Block[];
|
|
@@ -2035,12 +2032,12 @@ export declare enum MultilineWordWrap {
|
|
|
2035
2032
|
}
|
|
2036
2033
|
|
|
2037
2034
|
export declare const NoteEdit: MemoExoticComponent< {
|
|
2038
|
-
({ schema, values, pluginRegistry, onValueChange, scale, className, }: NoteEditProps):
|
|
2035
|
+
({ schema, values, pluginRegistry, onValueChange, scale, className, }: NoteEditProps): JSX.Element;
|
|
2039
2036
|
displayName: string;
|
|
2040
2037
|
}>;
|
|
2041
2038
|
|
|
2042
2039
|
export declare const NoteEditor: MemoExoticComponent< {
|
|
2043
|
-
({ schema, values, mode, pluginRegistry, onSchemaChange, onValuesChange, onSelectionChange, scale, className, }: NoteEditorProps):
|
|
2040
|
+
({ schema, values, mode, pluginRegistry, onSchemaChange, onValuesChange, onSelectionChange, scale, className, }: NoteEditorProps): JSX.Element;
|
|
2044
2041
|
displayName: string;
|
|
2045
2042
|
}>;
|
|
2046
2043
|
|
|
@@ -2066,7 +2063,7 @@ export declare interface NoteEditProps {
|
|
|
2066
2063
|
}
|
|
2067
2064
|
|
|
2068
2065
|
export declare const NoteForm: MemoExoticComponent< {
|
|
2069
|
-
({ schema, pluginRegistry, onSchemaChange, onSelectionChange, scale, className, }: NoteFormProps):
|
|
2066
|
+
({ schema, pluginRegistry, onSchemaChange, onSelectionChange, scale, className, }: NoteFormProps): JSX.Element;
|
|
2070
2067
|
displayName: string;
|
|
2071
2068
|
}>;
|
|
2072
2069
|
|
|
@@ -2085,7 +2082,7 @@ export declare enum NoteMode {
|
|
|
2085
2082
|
VIEW = "View"
|
|
2086
2083
|
}
|
|
2087
2084
|
|
|
2088
|
-
export declare const NotePrint:
|
|
2085
|
+
export declare const NotePrint: NamedExoticComponent<NotePrintProps & RefAttributes<NoteViewPrintRef>>;
|
|
2089
2086
|
|
|
2090
2087
|
export declare interface NotePrintProps {
|
|
2091
2088
|
schema: FormSchema;
|
|
@@ -2095,7 +2092,7 @@ export declare interface NotePrintProps {
|
|
|
2095
2092
|
}
|
|
2096
2093
|
|
|
2097
2094
|
export declare const NoteView: MemoExoticComponent< {
|
|
2098
|
-
({ schema, values, pluginRegistry, scale, className, }: NoteViewProps):
|
|
2095
|
+
({ schema, values, pluginRegistry, scale, className, }: NoteViewProps): JSX.Element;
|
|
2099
2096
|
displayName: string;
|
|
2100
2097
|
}>;
|
|
2101
2098
|
|
|
@@ -2187,7 +2184,7 @@ export declare type Orientation = "portrait" | "landscape";
|
|
|
2187
2184
|
* - ImportExportPanel: スキーマ・値のインポート/エクスポート
|
|
2188
2185
|
*/
|
|
2189
2186
|
export declare const OtherPanel: {
|
|
2190
|
-
({ schema, values, onSchemaChange, onValuesChange, }: OtherPanelProps):
|
|
2187
|
+
({ schema, values, onSchemaChange, onValuesChange, }: OtherPanelProps): JSX.Element;
|
|
2191
2188
|
displayName: string;
|
|
2192
2189
|
};
|
|
2193
2190
|
|
|
@@ -2228,7 +2225,7 @@ export declare type PaddingUnit = (typeof PADDING_UNITS)[number];
|
|
|
2228
2225
|
* ブロックをドラッグ&ドロップで挿入するためのパレット
|
|
2229
2226
|
*/
|
|
2230
2227
|
export declare const PalettePanel: {
|
|
2231
|
-
({ plugins, className }: PalettePanelProps):
|
|
2228
|
+
({ plugins, className }: PalettePanelProps): JSX.Element;
|
|
2232
2229
|
displayName: string;
|
|
2233
2230
|
};
|
|
2234
2231
|
|
|
@@ -2294,7 +2291,7 @@ export declare interface PaperSize {
|
|
|
2294
2291
|
* 用紙サイズを変更するパネル
|
|
2295
2292
|
*/
|
|
2296
2293
|
export declare const PaperSizePanel: {
|
|
2297
|
-
({ paper, onPaperChange, }: PaperSizePanelProps):
|
|
2294
|
+
({ paper, onPaperChange, }: PaperSizePanelProps): JSX.Element;
|
|
2298
2295
|
displayName: string;
|
|
2299
2296
|
};
|
|
2300
2297
|
|
|
@@ -2444,7 +2441,7 @@ declare interface PropertyDefinition_2<T, Context = Record<string, Value>> {
|
|
|
2444
2441
|
}
|
|
2445
2442
|
export { PropertyDefinition_2 as PropertyDefinition }
|
|
2446
2443
|
|
|
2447
|
-
export declare const PropertyField: MemoExoticComponent<({ propertyKey, definition, selectedBlocks, onChange, }: PropertyFieldProps) =>
|
|
2444
|
+
export declare const PropertyField: MemoExoticComponent<({ propertyKey, definition, selectedBlocks, onChange, }: PropertyFieldProps) => JSX.Element | null>;
|
|
2448
2445
|
|
|
2449
2446
|
export declare interface PropertyFieldProps {
|
|
2450
2447
|
propertyKey: string;
|
|
@@ -2486,7 +2483,7 @@ export declare interface RendererProps<P = Record<string, Value>, V = Value> {
|
|
|
2486
2483
|
|
|
2487
2484
|
export declare const RESIZE_HANDLE_STYLE: ResizeHandleStyle;
|
|
2488
2485
|
|
|
2489
|
-
export declare const ResizeGhost: MemoExoticComponent<({ blocks, pluginRegistry, gridLength, getBlockRectPx, blockId, handle, deltaCol, deltaRow, isOutside, selectionStyle, ghostZIndex, selectBorderZIndex, blockHandlesZIndex, }: ResizeGhostProps) =>
|
|
2486
|
+
export declare const ResizeGhost: MemoExoticComponent<({ blocks, pluginRegistry, gridLength, getBlockRectPx, blockId, handle, deltaCol, deltaRow, isOutside, selectionStyle, ghostZIndex, selectBorderZIndex, blockHandlesZIndex, }: ResizeGhostProps) => JSX.Element | null>;
|
|
2490
2487
|
|
|
2491
2488
|
export declare interface ResizeGhostProps {
|
|
2492
2489
|
blocks: Block[];
|
|
@@ -2532,7 +2529,7 @@ export declare enum ResizeHandle {
|
|
|
2532
2529
|
NW = "nw"
|
|
2533
2530
|
}
|
|
2534
2531
|
|
|
2535
|
-
export declare const ResizeHandles: default_2.MemoExoticComponent<({ onResizeStart, activeHandle, handleStyle, zIndex, }: ResizeHandlesProps) =>
|
|
2532
|
+
export declare const ResizeHandles: default_2.MemoExoticComponent<({ onResizeStart, activeHandle, handleStyle, zIndex, }: ResizeHandlesProps) => JSX.Element>;
|
|
2536
2533
|
|
|
2537
2534
|
export declare interface ResizeHandlesProps {
|
|
2538
2535
|
onResizeStart: (e: default_2.PointerEvent, handle: ResizeHandle) => void;
|
|
@@ -2612,7 +2609,7 @@ export declare interface SelectConfig {
|
|
|
2612
2609
|
|
|
2613
2610
|
export declare const SELECTION_STYLE: BorderStyle;
|
|
2614
2611
|
|
|
2615
|
-
export declare const SelectionBorder: MemoExoticComponent<({ width, height, zIndex, borderStyle, }: SelectionBorderProps) =>
|
|
2612
|
+
export declare const SelectionBorder: MemoExoticComponent<({ width, height, zIndex, borderStyle, }: SelectionBorderProps) => JSX.Element>;
|
|
2616
2613
|
|
|
2617
2614
|
declare interface SelectionBorderProps {
|
|
2618
2615
|
width: number;
|
|
@@ -2621,7 +2618,7 @@ declare interface SelectionBorderProps {
|
|
|
2621
2618
|
borderStyle?: BorderStyle;
|
|
2622
2619
|
}
|
|
2623
2620
|
|
|
2624
|
-
export declare const SelectionLayer: default_2.MemoExoticComponent<({ blocks, selectedBlockIds, isDragging, draggingState, getBlockRectPx, onResizeStart, selectionStyle, handleStyle, selectBorderZIndex, blockHandlesZIndex, }: SelectionLayerProps) =>
|
|
2621
|
+
export declare const SelectionLayer: default_2.MemoExoticComponent<({ blocks, selectedBlockIds, isDragging, draggingState, getBlockRectPx, onResizeStart, selectionStyle, handleStyle, selectBorderZIndex, blockHandlesZIndex, }: SelectionLayerProps) => JSX.Element | null>;
|
|
2625
2622
|
|
|
2626
2623
|
export declare interface SelectionLayerProps {
|
|
2627
2624
|
blocks: Block[];
|
|
@@ -2709,7 +2706,7 @@ export declare function serializeValues(values: Record<string, Value>, pretty?:
|
|
|
2709
2706
|
* - その他タブ: OtherPanel (スキーマ/値のインポート/エクスポート)
|
|
2710
2707
|
*/
|
|
2711
2708
|
export declare const Sidebar: {
|
|
2712
|
-
({ blocks, selectedBlockIds, pluginRegistry, onUpdateBlocks, schema, values, onSchemaChange, onValuesChange, gridSize, className, }: SidebarProps):
|
|
2709
|
+
({ blocks, selectedBlockIds, pluginRegistry, onUpdateBlocks, schema, values, onSchemaChange, onValuesChange, gridSize, className, }: SidebarProps): JSX.Element;
|
|
2713
2710
|
displayName: string;
|
|
2714
2711
|
};
|
|
2715
2712
|
|
|
@@ -2764,7 +2761,7 @@ export declare function stringToDimension<U extends Unit>(str: string, allowedUn
|
|
|
2764
2761
|
* TabPanel
|
|
2765
2762
|
* タブコンテンツの共通ラッパー
|
|
2766
2763
|
*/
|
|
2767
|
-
export declare const TabPanel: ({ children, emptyMessage, className, }: TabPanelProps) =>
|
|
2764
|
+
export declare const TabPanel: ({ children, emptyMessage, className, }: TabPanelProps) => JSX.Element;
|
|
2768
2765
|
|
|
2769
2766
|
export declare interface TabPanelProps {
|
|
2770
2767
|
/** パネルの内容 */
|
|
@@ -2946,6 +2943,9 @@ export declare function useGridCalc(paper: Paper, grid: Grid, dpi?: number): {
|
|
|
2946
2943
|
* - `mode: 'pressing'` でグリッドをまたいだら → `mode: 'dragging'` に遷移
|
|
2947
2944
|
* - ピクセル閾値 (5px) は使わない
|
|
2948
2945
|
*
|
|
2946
|
+
* **選択状態**: 外部で管理されるため、このHookでは管理しません
|
|
2947
|
+
* - `SELECT/DESELECT`イベントは外部への通知として残されています
|
|
2948
|
+
*
|
|
2949
2949
|
* @param initialState - 初期状態 (オプション)
|
|
2950
2950
|
* @returns [state, handleChange] - 状態とコールバック
|
|
2951
2951
|
*
|
|
@@ -2953,9 +2953,6 @@ export declare function useGridCalc(paper: Paper, grid: Grid, dpi?: number): {
|
|
|
2953
2953
|
* ```tsx
|
|
2954
2954
|
* const [state, onChange] = useInteractionState();
|
|
2955
2955
|
*
|
|
2956
|
-
* // ブロックをクリック
|
|
2957
|
-
* onChange({ type: InteractionEventType.SELECT, blockIds: ['block-1'] });
|
|
2958
|
-
*
|
|
2959
2956
|
* // ドラッグ開始 (まだpressing)
|
|
2960
2957
|
* onChange({ type: InteractionEventType.START_PRESS, blockId: 'block-1', startGrid: { col: 0, row: 0 } });
|
|
2961
2958
|
*
|
package/package.json
CHANGED
|
@@ -1,77 +1,77 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@tatamicks/core",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"private": false,
|
|
5
|
-
"description": "A headless, extensible document editor for React with grid-based layout system",
|
|
6
|
-
"keywords": [
|
|
7
|
-
"react",
|
|
8
|
-
"editor",
|
|
9
|
-
"document-editor",
|
|
10
|
-
"headless",
|
|
11
|
-
"grid-layout",
|
|
12
|
-
"plugin-system",
|
|
13
|
-
"typescript"
|
|
14
|
-
],
|
|
15
|
-
"author": "yonpachi",
|
|
16
|
-
"license": "MIT",
|
|
17
|
-
"repository": {
|
|
18
|
-
"type": "git",
|
|
19
|
-
"url": "git+https://github.com/torchi-net/tatamicks.git",
|
|
20
|
-
"directory": "packages/tatamicks-core"
|
|
21
|
-
},
|
|
22
|
-
"homepage": "https://github.com/torchi-net/tatamicks#readme",
|
|
23
|
-
"bugs": {
|
|
24
|
-
"url": "https://github.com/torchi-net/tatamicks/issues"
|
|
25
|
-
},
|
|
26
|
-
"type": "module",
|
|
27
|
-
"main": "dist/index.js",
|
|
28
|
-
"module": "dist/index.mjs",
|
|
29
|
-
"types": "dist/src/index.d.ts",
|
|
30
|
-
"style": "dist/index.css",
|
|
31
|
-
"exports": {
|
|
32
|
-
".": {
|
|
33
|
-
"types": "./dist/src/index.d.ts",
|
|
34
|
-
"import": "./dist/index.mjs",
|
|
35
|
-
"require": "./dist/index.js"
|
|
36
|
-
},
|
|
37
|
-
"./dist/index.css": "./dist/index.css"
|
|
38
|
-
},
|
|
39
|
-
"scripts": {
|
|
40
|
-
"dev": "vite",
|
|
41
|
-
"build": "vite build .",
|
|
42
|
-
"preview": "vite preview",
|
|
43
|
-
"typecheck": "tsc --noEmit",
|
|
44
|
-
"lint": "biome check .",
|
|
45
|
-
"format": "biome format --write .",
|
|
46
|
-
"test": "vitest --run .",
|
|
47
|
-
"test:unit": "vitest run ."
|
|
48
|
-
},
|
|
49
|
-
"files": [
|
|
50
|
-
"dist"
|
|
51
|
-
],
|
|
52
|
-
"peerDependencies": {
|
|
53
|
-
"react": "^19.0.2",
|
|
54
|
-
"react-dom": "^19.0.2"
|
|
55
|
-
},
|
|
56
|
-
"devDependencies": {
|
|
57
|
-
"@biomejs/biome": "^2.2.6",
|
|
58
|
-
"@testing-library/jest-dom": "^6.9.1",
|
|
59
|
-
"@testing-library/react": "^16.3.0",
|
|
60
|
-
"@types/node": "^24.7.2",
|
|
61
|
-
"@types/react": "^19.0.2",
|
|
62
|
-
"@types/react-dom": "^19.0.2",
|
|
63
|
-
"@vitejs/plugin-react": "^4.7.0",
|
|
64
|
-
"@vitest/browser": "3.2.4",
|
|
65
|
-
"@vitest/coverage-v8": "3.2.4",
|
|
66
|
-
"
|
|
67
|
-
"playwright": "^1.56.0",
|
|
68
|
-
"typescript": "^5.9.3",
|
|
69
|
-
"vite": "^6.3.6",
|
|
70
|
-
"vite-plugin-dts": "^4.5.4",
|
|
71
|
-
"vite-plugin-lib-inject-css": "^2.2.2",
|
|
72
|
-
"vitest": "^3.2.4"
|
|
73
|
-
},
|
|
74
|
-
"sideEffects": [
|
|
75
|
-
"**/*.css"
|
|
76
|
-
]
|
|
77
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@tatamicks/core",
|
|
3
|
+
"version": "0.3.0",
|
|
4
|
+
"private": false,
|
|
5
|
+
"description": "A headless, extensible document editor for React with grid-based layout system",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"react",
|
|
8
|
+
"editor",
|
|
9
|
+
"document-editor",
|
|
10
|
+
"headless",
|
|
11
|
+
"grid-layout",
|
|
12
|
+
"plugin-system",
|
|
13
|
+
"typescript"
|
|
14
|
+
],
|
|
15
|
+
"author": "yonpachi",
|
|
16
|
+
"license": "MIT",
|
|
17
|
+
"repository": {
|
|
18
|
+
"type": "git",
|
|
19
|
+
"url": "git+https://github.com/torchi-net/tatamicks.git",
|
|
20
|
+
"directory": "packages/tatamicks-core"
|
|
21
|
+
},
|
|
22
|
+
"homepage": "https://github.com/torchi-net/tatamicks#readme",
|
|
23
|
+
"bugs": {
|
|
24
|
+
"url": "https://github.com/torchi-net/tatamicks/issues"
|
|
25
|
+
},
|
|
26
|
+
"type": "module",
|
|
27
|
+
"main": "dist/index.js",
|
|
28
|
+
"module": "dist/index.mjs",
|
|
29
|
+
"types": "dist/src/index.d.ts",
|
|
30
|
+
"style": "dist/index.css",
|
|
31
|
+
"exports": {
|
|
32
|
+
".": {
|
|
33
|
+
"types": "./dist/src/index.d.ts",
|
|
34
|
+
"import": "./dist/index.mjs",
|
|
35
|
+
"require": "./dist/index.js"
|
|
36
|
+
},
|
|
37
|
+
"./dist/index.css": "./dist/index.css"
|
|
38
|
+
},
|
|
39
|
+
"scripts": {
|
|
40
|
+
"dev": "vite",
|
|
41
|
+
"build": "vite build .",
|
|
42
|
+
"preview": "vite preview",
|
|
43
|
+
"typecheck": "tsc --noEmit",
|
|
44
|
+
"lint": "biome check .",
|
|
45
|
+
"format": "biome format --write .",
|
|
46
|
+
"test": "vitest --run .",
|
|
47
|
+
"test:unit": "vitest run ."
|
|
48
|
+
},
|
|
49
|
+
"files": [
|
|
50
|
+
"dist"
|
|
51
|
+
],
|
|
52
|
+
"peerDependencies": {
|
|
53
|
+
"react": "^19.0.2",
|
|
54
|
+
"react-dom": "^19.0.2"
|
|
55
|
+
},
|
|
56
|
+
"devDependencies": {
|
|
57
|
+
"@biomejs/biome": "^2.2.6",
|
|
58
|
+
"@testing-library/jest-dom": "^6.9.1",
|
|
59
|
+
"@testing-library/react": "^16.3.0",
|
|
60
|
+
"@types/node": "^24.7.2",
|
|
61
|
+
"@types/react": "^19.0.2",
|
|
62
|
+
"@types/react-dom": "^19.0.2",
|
|
63
|
+
"@vitejs/plugin-react": "^4.7.0",
|
|
64
|
+
"@vitest/browser": "3.2.4",
|
|
65
|
+
"@vitest/coverage-v8": "3.2.4",
|
|
66
|
+
"happy-dom": "^20.3.1",
|
|
67
|
+
"playwright": "^1.56.0",
|
|
68
|
+
"typescript": "^5.9.3",
|
|
69
|
+
"vite": "^6.3.6",
|
|
70
|
+
"vite-plugin-dts": "^4.5.4",
|
|
71
|
+
"vite-plugin-lib-inject-css": "^2.2.2",
|
|
72
|
+
"vitest": "^3.2.4"
|
|
73
|
+
},
|
|
74
|
+
"sideEffects": [
|
|
75
|
+
"**/*.css"
|
|
76
|
+
]
|
|
77
|
+
}
|