@logic-pad/core 0.4.2 → 0.4.5
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/assets/logic-core.global.d.ts +37 -20
- package/dist/data/events/onSetGrid.d.ts +1 -0
- package/dist/data/events/onSetGrid.js +15 -0
- package/dist/data/events/onSymbolDisplay.d.ts +2 -1
- package/dist/data/grid.d.ts +0 -8
- package/dist/data/grid.js +0 -23
- package/dist/data/instruction.d.ts +5 -0
- package/dist/data/primitives.d.ts +2 -1
- package/dist/data/primitives.js +1 -0
- package/dist/data/rules/cellCountPerZoneRule.d.ts +1 -1
- package/dist/data/rules/cellCountPerZoneRule.js +7 -2
- package/dist/data/rules/foresightRule.d.ts +2 -1
- package/dist/data/rules/foresightRule.js +8 -1
- package/dist/data/rules/musicControlLine.js +1 -1
- package/dist/data/rules/musicGridRule.d.ts +5 -2
- package/dist/data/rules/musicGridRule.js +26 -11
- package/dist/data/rules/perfectionRule.d.ts +11 -3
- package/dist/data/rules/perfectionRule.js +69 -13
- package/dist/data/rules/rule.d.ts +2 -1
- package/dist/data/rules/rule.js +3 -0
- package/dist/data/serializer/serializer_v0.js +4 -2
- package/dist/data/symbols/hiddenSymbol.d.ts +5 -9
- package/dist/data/symbols/hiddenSymbol.js +19 -29
- package/dist/data/symbols/symbol.d.ts +3 -2
- package/dist/data/symbols/symbol.js +3 -0
- package/dist/data/validate.js +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/package.json +1 -1
- package/assets/z3-built.js +0 -14723
- package/assets/z3-built.wasm +0 -0
- package/assets/z3-built.worker.js +0 -206
|
@@ -1,13 +1,23 @@
|
|
|
1
1
|
import GridData from '../grid.js';
|
|
2
|
-
import { Color, State } from '../primitives.js';
|
|
2
|
+
import { Color, State, Mode, } from '../primitives.js';
|
|
3
3
|
import Rule from './rule.js';
|
|
4
4
|
import CustomIconSymbol from '../symbols/customIconSymbol.js';
|
|
5
|
+
import validateGrid from '../validate.js';
|
|
5
6
|
class PerfectionRule extends Rule {
|
|
6
7
|
/**
|
|
7
8
|
* **Quest for Perfection: cell colors are final**
|
|
9
|
+
*
|
|
10
|
+
* @param editor - whether to enable editor mode. This field is automatically set by the editor.
|
|
8
11
|
*/
|
|
9
|
-
constructor() {
|
|
12
|
+
constructor(editor = false) {
|
|
10
13
|
super();
|
|
14
|
+
Object.defineProperty(this, "editor", {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
configurable: true,
|
|
17
|
+
writable: true,
|
|
18
|
+
value: editor
|
|
19
|
+
});
|
|
20
|
+
this.editor = editor;
|
|
11
21
|
}
|
|
12
22
|
get id() {
|
|
13
23
|
return `perfection`;
|
|
@@ -30,6 +40,18 @@ class PerfectionRule extends Rule {
|
|
|
30
40
|
get isSingleton() {
|
|
31
41
|
return true;
|
|
32
42
|
}
|
|
43
|
+
modeVariant(mode) {
|
|
44
|
+
// only allow this rule in perfection mode
|
|
45
|
+
if (this.editor === (mode === Mode.Create)) {
|
|
46
|
+
return this;
|
|
47
|
+
}
|
|
48
|
+
else if (mode === Mode.Create) {
|
|
49
|
+
return this.copyWith({ editor: true });
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
return this.copyWith({ editor: false });
|
|
53
|
+
}
|
|
54
|
+
}
|
|
33
55
|
validateGrid(grid) {
|
|
34
56
|
if (grid.getTileCount(true, undefined, Color.Gray) > 0) {
|
|
35
57
|
return { state: State.Incomplete };
|
|
@@ -71,30 +93,62 @@ class PerfectionRule extends Rule {
|
|
|
71
93
|
}
|
|
72
94
|
return state;
|
|
73
95
|
}
|
|
74
|
-
fixTiles(grid) {
|
|
96
|
+
fixTiles(grid, exclusions) {
|
|
75
97
|
if (grid.getTileCount(true, false, Color.Light) > 0 ||
|
|
76
98
|
grid.getTileCount(true, false, Color.Dark) > 0) {
|
|
77
|
-
return grid.withTiles(tiles => tiles.map(row => row.map(t => t.exists &&
|
|
99
|
+
return grid.withTiles(tiles => tiles.map((row, y) => row.map((t, x) => t.exists &&
|
|
100
|
+
t.color !== Color.Gray &&
|
|
101
|
+
!exclusions?.some(e => e.x === x && e.y === y)
|
|
102
|
+
? t.withFixed(true)
|
|
103
|
+
: t)));
|
|
78
104
|
}
|
|
79
105
|
return grid;
|
|
80
106
|
}
|
|
107
|
+
isValid(grid, solution) {
|
|
108
|
+
return validateGrid(grid, solution).final !== State.Error;
|
|
109
|
+
}
|
|
110
|
+
findSingleError(grid, solution) {
|
|
111
|
+
if (solution === null)
|
|
112
|
+
return [];
|
|
113
|
+
const positions = [];
|
|
114
|
+
// If a solution is available, we can compare against the solution and allow the user to modify the one single error.
|
|
115
|
+
grid.tiles.forEach((row, y) => row.forEach((t, x) => {
|
|
116
|
+
if (t.exists &&
|
|
117
|
+
t.color !== Color.Gray &&
|
|
118
|
+
t.color !== solution.getTile(x, y).color) {
|
|
119
|
+
positions.push({ x, y });
|
|
120
|
+
}
|
|
121
|
+
}));
|
|
122
|
+
if (positions.length > 1) {
|
|
123
|
+
const connected = grid.connections.getConnectedTiles(positions[0]);
|
|
124
|
+
if (!positions.every(p => connected.some(c => c.x === p.x && c.y === p.y))) {
|
|
125
|
+
return [];
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
return positions;
|
|
129
|
+
}
|
|
81
130
|
/**
|
|
82
131
|
* Force all tiles to be fixed.
|
|
83
132
|
*
|
|
84
133
|
* If the grid is already wrong, prevent the player from changing it further.
|
|
85
134
|
*/
|
|
86
135
|
onSetGrid(oldGrid, newGrid, solution) {
|
|
87
|
-
if (
|
|
88
|
-
return
|
|
136
|
+
if (this.editor)
|
|
137
|
+
return newGrid;
|
|
138
|
+
const oldGridIsValid = this.isValid(oldGrid, solution);
|
|
139
|
+
const newGridIsValid = this.isValid(newGrid, solution);
|
|
140
|
+
if (!oldGridIsValid && !newGridIsValid) {
|
|
141
|
+
const oldPositions = this.findSingleError(oldGrid, solution);
|
|
142
|
+
return this.fixTiles(oldGrid, oldPositions);
|
|
89
143
|
}
|
|
90
|
-
if (!
|
|
91
|
-
|
|
92
|
-
return this.fixTiles(
|
|
144
|
+
else if (!newGridIsValid) {
|
|
145
|
+
const positions = this.findSingleError(newGrid, solution);
|
|
146
|
+
return this.fixTiles(newGrid, positions);
|
|
93
147
|
}
|
|
94
148
|
return this.fixTiles(newGrid);
|
|
95
149
|
}
|
|
96
|
-
copyWith(
|
|
97
|
-
return new PerfectionRule();
|
|
150
|
+
copyWith({ editor }) {
|
|
151
|
+
return new PerfectionRule(editor ?? this.editor);
|
|
98
152
|
}
|
|
99
153
|
}
|
|
100
154
|
Object.defineProperty(PerfectionRule, "EXAMPLE_GRID", {
|
|
@@ -107,7 +161,9 @@ Object.defineProperty(PerfectionRule, "SEARCH_VARIANTS", {
|
|
|
107
161
|
enumerable: true,
|
|
108
162
|
configurable: true,
|
|
109
163
|
writable: true,
|
|
110
|
-
value: [
|
|
111
|
-
|
|
164
|
+
value: [
|
|
165
|
+
new PerfectionRule().searchVariant(),
|
|
166
|
+
]
|
|
167
|
+
});
|
|
112
168
|
export default PerfectionRule;
|
|
113
169
|
export const instance = new PerfectionRule();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import GridData from '../grid.js';
|
|
2
|
-
import { RuleState } from '../primitives.js';
|
|
2
|
+
import { Mode, RuleState } from '../primitives.js';
|
|
3
3
|
import Instruction from '../instruction.js';
|
|
4
4
|
export interface SearchVariant {
|
|
5
5
|
description: string;
|
|
@@ -9,6 +9,7 @@ export default abstract class Rule extends Instruction {
|
|
|
9
9
|
abstract validateGrid(grid: GridData): RuleState;
|
|
10
10
|
abstract get searchVariants(): SearchVariant[];
|
|
11
11
|
searchVariant(): SearchVariant;
|
|
12
|
+
modeVariant(_mode: Mode): Rule | null;
|
|
12
13
|
/**
|
|
13
14
|
* Whether only one instance of this rule is allowed in a grid.
|
|
14
15
|
*/
|
package/dist/data/rules/rule.js
CHANGED
|
@@ -173,8 +173,10 @@ export default class SerializerV0 extends SerializerBase {
|
|
|
173
173
|
parseConfig(configs, entry) {
|
|
174
174
|
const [key, value] = entry.split('=');
|
|
175
175
|
const config = configs.find(x => x.field === key);
|
|
176
|
-
if (!config)
|
|
177
|
-
|
|
176
|
+
if (!config) {
|
|
177
|
+
console.warn(`Unknown config: ${key} when parsing ${entry}`);
|
|
178
|
+
return [key, value];
|
|
179
|
+
}
|
|
178
180
|
switch (config.type) {
|
|
179
181
|
case ConfigType.Boolean:
|
|
180
182
|
return [config.field, value === '1'];
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { AnyConfig } from '../config.js';
|
|
2
2
|
import { SymbolDisplayHandler } from '../events/onSymbolDisplay.js';
|
|
3
3
|
import GridData from '../grid.js';
|
|
4
|
-
import {
|
|
4
|
+
import { State } from '../primitives.js';
|
|
5
5
|
import Symbol from './symbol.js';
|
|
6
6
|
export default class HiddenSymbol extends Symbol implements SymbolDisplayHandler {
|
|
7
7
|
readonly x: number;
|
|
8
8
|
readonly y: number;
|
|
9
|
-
readonly color: Color;
|
|
10
9
|
readonly revealLocation: boolean;
|
|
11
10
|
private static readonly CONFIGS;
|
|
12
11
|
private static readonly EXAMPLE_GRID;
|
|
@@ -15,10 +14,9 @@ export default class HiddenSymbol extends Symbol implements SymbolDisplayHandler
|
|
|
15
14
|
*
|
|
16
15
|
* @param x - The x-coordinate of the symbol.
|
|
17
16
|
* @param y - The y-coordinate of the symbol.
|
|
18
|
-
* @param color - The target color of the cell.
|
|
19
17
|
* @param revealLocation - Whether to reveal the location of the symbol.
|
|
20
18
|
*/
|
|
21
|
-
constructor(x: number, y: number,
|
|
19
|
+
constructor(x: number, y: number, revealLocation?: boolean);
|
|
22
20
|
get id(): string;
|
|
23
21
|
get explanation(): string;
|
|
24
22
|
get configs(): readonly AnyConfig[] | null;
|
|
@@ -26,15 +24,13 @@ export default class HiddenSymbol extends Symbol implements SymbolDisplayHandler
|
|
|
26
24
|
get necessaryForCompletion(): boolean;
|
|
27
25
|
get visibleWhenSolving(): boolean;
|
|
28
26
|
get sortOrder(): number;
|
|
29
|
-
validateSymbol(grid: GridData): State;
|
|
30
|
-
onSymbolDisplay(grid: GridData, symbol: Symbol, editing: boolean): boolean;
|
|
31
|
-
copyWith({ x, y,
|
|
27
|
+
validateSymbol(grid: GridData, solution: GridData | null): State;
|
|
28
|
+
onSymbolDisplay(grid: GridData, solution: GridData | null, symbol: Symbol, editing: boolean): boolean;
|
|
29
|
+
copyWith({ x, y, revealLocation, }: {
|
|
32
30
|
x?: number;
|
|
33
31
|
y?: number;
|
|
34
|
-
color?: Color;
|
|
35
32
|
revealLocation?: boolean;
|
|
36
33
|
}): this;
|
|
37
|
-
withColor(color: Color): this;
|
|
38
34
|
withRevealLocation(revealLocation: boolean): this;
|
|
39
35
|
}
|
|
40
36
|
export declare const instance: HiddenSymbol;
|
|
@@ -9,10 +9,9 @@ class HiddenSymbol extends Symbol {
|
|
|
9
9
|
*
|
|
10
10
|
* @param x - The x-coordinate of the symbol.
|
|
11
11
|
* @param y - The y-coordinate of the symbol.
|
|
12
|
-
* @param color - The target color of the cell.
|
|
13
12
|
* @param revealLocation - Whether to reveal the location of the symbol.
|
|
14
13
|
*/
|
|
15
|
-
constructor(x, y,
|
|
14
|
+
constructor(x, y, revealLocation = false) {
|
|
16
15
|
super(x, y);
|
|
17
16
|
Object.defineProperty(this, "x", {
|
|
18
17
|
enumerable: true,
|
|
@@ -26,19 +25,12 @@ class HiddenSymbol extends Symbol {
|
|
|
26
25
|
writable: true,
|
|
27
26
|
value: y
|
|
28
27
|
});
|
|
29
|
-
Object.defineProperty(this, "color", {
|
|
30
|
-
enumerable: true,
|
|
31
|
-
configurable: true,
|
|
32
|
-
writable: true,
|
|
33
|
-
value: color
|
|
34
|
-
});
|
|
35
28
|
Object.defineProperty(this, "revealLocation", {
|
|
36
29
|
enumerable: true,
|
|
37
30
|
configurable: true,
|
|
38
31
|
writable: true,
|
|
39
32
|
value: revealLocation
|
|
40
33
|
});
|
|
41
|
-
this.color = color;
|
|
42
34
|
this.revealLocation = revealLocation;
|
|
43
35
|
}
|
|
44
36
|
get id() {
|
|
@@ -62,14 +54,20 @@ class HiddenSymbol extends Symbol {
|
|
|
62
54
|
get sortOrder() {
|
|
63
55
|
return 0;
|
|
64
56
|
}
|
|
65
|
-
validateSymbol(grid) {
|
|
57
|
+
validateSymbol(grid, solution) {
|
|
66
58
|
const thisX = Math.floor(this.x);
|
|
67
59
|
const thisY = Math.floor(this.y);
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
60
|
+
const thisColor = grid.getTile(thisX, thisY).color;
|
|
61
|
+
if (solution) {
|
|
62
|
+
return thisColor === solution.getTile(thisX, thisY).color
|
|
63
|
+
? State.Satisfied
|
|
64
|
+
: State.Incomplete;
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
return thisColor !== Color.Gray ? State.Satisfied : State.Incomplete;
|
|
68
|
+
}
|
|
71
69
|
}
|
|
72
|
-
onSymbolDisplay(grid, symbol, editing) {
|
|
70
|
+
onSymbolDisplay(grid, solution, symbol, editing) {
|
|
73
71
|
if (editing)
|
|
74
72
|
return true;
|
|
75
73
|
const thisX = Math.floor(this.x);
|
|
@@ -78,17 +76,17 @@ class HiddenSymbol extends Symbol {
|
|
|
78
76
|
const symY = Math.floor(symbol.y);
|
|
79
77
|
if (thisX !== symX || thisY !== symY)
|
|
80
78
|
return true;
|
|
81
|
-
const
|
|
79
|
+
const thisColor = grid.getTile(thisX, thisY).color;
|
|
80
|
+
const colorMatch = solution
|
|
81
|
+
? thisColor === solution.getTile(thisX, thisY).color
|
|
82
|
+
: thisColor !== Color.Gray;
|
|
82
83
|
if (symbol.id === this.id) {
|
|
83
84
|
return !colorMatch;
|
|
84
85
|
}
|
|
85
86
|
return colorMatch;
|
|
86
87
|
}
|
|
87
|
-
copyWith({ x, y,
|
|
88
|
-
return new HiddenSymbol(x ?? this.x, y ?? this.y,
|
|
89
|
-
}
|
|
90
|
-
withColor(color) {
|
|
91
|
-
return this.copyWith({ color });
|
|
88
|
+
copyWith({ x, y, revealLocation, }) {
|
|
89
|
+
return new HiddenSymbol(x ?? this.x, y ?? this.y, revealLocation ?? this.revealLocation);
|
|
92
90
|
}
|
|
93
91
|
withRevealLocation(revealLocation) {
|
|
94
92
|
return this.copyWith({ revealLocation });
|
|
@@ -113,14 +111,6 @@ Object.defineProperty(HiddenSymbol, "CONFIGS", {
|
|
|
113
111
|
description: 'Y',
|
|
114
112
|
configurable: false,
|
|
115
113
|
},
|
|
116
|
-
{
|
|
117
|
-
type: ConfigType.Color,
|
|
118
|
-
default: Color.Light,
|
|
119
|
-
field: 'color',
|
|
120
|
-
allowGray: true,
|
|
121
|
-
description: 'Show on color',
|
|
122
|
-
configurable: true,
|
|
123
|
-
},
|
|
124
114
|
{
|
|
125
115
|
type: ConfigType.Boolean,
|
|
126
116
|
default: false,
|
|
@@ -138,4 +128,4 @@ Object.defineProperty(HiddenSymbol, "EXAMPLE_GRID", {
|
|
|
138
128
|
))
|
|
139
129
|
});
|
|
140
130
|
export default HiddenSymbol;
|
|
141
|
-
export const instance = new HiddenSymbol(0, 0
|
|
131
|
+
export const instance = new HiddenSymbol(0, 0);
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { GridResizeHandler } from '../events/onGridResize.js';
|
|
2
2
|
import GridData from '../grid.js';
|
|
3
3
|
import Instruction from '../instruction.js';
|
|
4
|
-
import { State } from '../primitives.js';
|
|
4
|
+
import { Mode, State } from '../primitives.js';
|
|
5
5
|
export default abstract class Symbol extends Instruction implements GridResizeHandler {
|
|
6
6
|
readonly x: number;
|
|
7
7
|
readonly y: number;
|
|
8
8
|
constructor(x: number, y: number);
|
|
9
|
-
abstract validateSymbol(grid: GridData): State;
|
|
9
|
+
abstract validateSymbol(grid: GridData, solution: GridData | null): State;
|
|
10
|
+
modeVariant(_mode: Mode): Symbol | null;
|
|
10
11
|
onGridResize(_grid: GridData, mode: 'insert' | 'remove', direction: 'row' | 'column', index: number): this | null;
|
|
11
12
|
/**
|
|
12
13
|
* The step size for the x and y coordinates of the symbol.
|
package/dist/data/validate.js
CHANGED
|
@@ -64,7 +64,7 @@ export default function validateGrid(grid, solution) {
|
|
|
64
64
|
grid.symbols.forEach((symbolList, id) => symbolStates.set(id, symbolList.map(s => {
|
|
65
65
|
if (s.validateWithSolution)
|
|
66
66
|
requireSolution = true;
|
|
67
|
-
return applySymbolOverrides(grid, grid.rules, s, g => s.validateSymbol(g));
|
|
67
|
+
return applySymbolOverrides(grid, grid.rules, s, g => s.validateSymbol(g, solution));
|
|
68
68
|
})));
|
|
69
69
|
// apply the result of symbol overrides to the rules that provided them
|
|
70
70
|
symbolOverrideStates.forEach((states, i) => {
|
package/dist/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { isEventHandler } from './data/events/eventHelper.js';
|
|
|
5
5
|
import { handlesFinalValidation } from './data/events/onFinalValidation.js';
|
|
6
6
|
import { handlesGridChange } from './data/events/onGridChange.js';
|
|
7
7
|
import { handlesGridResize } from './data/events/onGridResize.js';
|
|
8
|
-
import { handlesSetGrid } from './data/events/onSetGrid.js';
|
|
8
|
+
import { handlesSetGrid, invokeSetGrid } from './data/events/onSetGrid.js';
|
|
9
9
|
import { handlesSymbolDisplay } from './data/events/onSymbolDisplay.js';
|
|
10
10
|
import { handlesSymbolValidation } from './data/events/onSymbolValidation.js';
|
|
11
11
|
import GridData, { NEIGHBOR_OFFSETS } from './data/grid.js';
|
|
@@ -98,4 +98,4 @@ import ViewpointSymbol from './data/symbols/viewpointSymbol.js';
|
|
|
98
98
|
import TileData from './data/tile.js';
|
|
99
99
|
import TileConnections from './data/tileConnections.js';
|
|
100
100
|
import validateGrid, { aggregateState, applyFinalOverrides } from './data/validate.js';
|
|
101
|
-
export { ConfigType, configEquals, Configurable, CachedAccess, allEqual, array, directionToRotation, escape, isSameEdge, maxBy, minBy, move, orientationToRotation, resize, unescape, isEventHandler, handlesFinalValidation, handlesGridChange, handlesGridResize, handlesSetGrid, handlesSymbolDisplay, handlesSymbolValidation, GridData, NEIGHBOR_OFFSETS, GridConnections, GridZones, Instruction, COMPARISONS, Color, Comparison, DIRECTIONS, Direction, MajorRule, Mode, ORIENTATIONS, Orientation, State, directionToggle, orientationToggle, MetadataSchema, PuzzleSchema, BanPatternRule, CellCountPerZoneRule, CellCountRule, CompletePatternRule, ConnectAllRule, CustomRule, ForesightRule, allRules, ControlLine, Row, MusicGridRule, MysteryRule, OffByXRule, PerfectionRule, RegionAreaRule, RegionShapeRule, Rule, SameShapeRule, SymbolsPerRegionRule, UndercluedRule, UniqueShapeRule, Serializer, Compressor, CompressorBase, DeflateCompressor, GzipCompressor, StreamCompressor, SerializerBase, SerializerV0, getShapeVariants, normalizeShape, positionsToShape, shapeEquals, tilesToShape, allSolvers, BacktrackSolver, BTModule, BTGridData, BTTile, IntArray2D, colorToBTTile, createOneTileResult, getOppositeColor, BanPatternBTModule, CellCountBTModule, ConnectAllBTModule, RegionAreaBTModule, RegionShapeBTModule, SameShapeBTModule, SymbolsPerRegionBTModule, UniqueShapeBTModule, AreaNumberBTModule, DartBTModule, DirectionLinkerBTModule, GalaxyBTModule, LetterBTModule, LotusBTModule, MinesweeperBTModule, MyopiaBTModule, ViewpointBTModule, Solver, UndercluedSolver, AreaNumberModule, CellCountModule, ConnectAllModule, DartModule, allZ3Modules, LetterModule, MyopiaModule, RegionAreaModule, ViewpointModule, Z3Module, convertDirection, Z3Solver, Z3SolverContext, AreaNumberSymbol, CustomIconSymbol, CustomSymbol, CustomTextSymbol, DartSymbol, DirectionLinkerSymbol, GalaxySymbol, HiddenSymbol, allSymbols, LetterSymbol, LotusSymbol, MinesweeperSymbol, MultiEntrySymbol, MyopiaSymbol, NumberSymbol, Symbol, ViewpointSymbol, TileData, TileConnections, validateGrid, aggregateState, applyFinalOverrides, };
|
|
101
|
+
export { ConfigType, configEquals, Configurable, CachedAccess, allEqual, array, directionToRotation, escape, isSameEdge, maxBy, minBy, move, orientationToRotation, resize, unescape, isEventHandler, handlesFinalValidation, handlesGridChange, handlesGridResize, handlesSetGrid, invokeSetGrid, handlesSymbolDisplay, handlesSymbolValidation, GridData, NEIGHBOR_OFFSETS, GridConnections, GridZones, Instruction, COMPARISONS, Color, Comparison, DIRECTIONS, Direction, MajorRule, Mode, ORIENTATIONS, Orientation, State, directionToggle, orientationToggle, MetadataSchema, PuzzleSchema, BanPatternRule, CellCountPerZoneRule, CellCountRule, CompletePatternRule, ConnectAllRule, CustomRule, ForesightRule, allRules, ControlLine, Row, MusicGridRule, MysteryRule, OffByXRule, PerfectionRule, RegionAreaRule, RegionShapeRule, Rule, SameShapeRule, SymbolsPerRegionRule, UndercluedRule, UniqueShapeRule, Serializer, Compressor, CompressorBase, DeflateCompressor, GzipCompressor, StreamCompressor, SerializerBase, SerializerV0, getShapeVariants, normalizeShape, positionsToShape, shapeEquals, tilesToShape, allSolvers, BacktrackSolver, BTModule, BTGridData, BTTile, IntArray2D, colorToBTTile, createOneTileResult, getOppositeColor, BanPatternBTModule, CellCountBTModule, ConnectAllBTModule, RegionAreaBTModule, RegionShapeBTModule, SameShapeBTModule, SymbolsPerRegionBTModule, UniqueShapeBTModule, AreaNumberBTModule, DartBTModule, DirectionLinkerBTModule, GalaxyBTModule, LetterBTModule, LotusBTModule, MinesweeperBTModule, MyopiaBTModule, ViewpointBTModule, Solver, UndercluedSolver, AreaNumberModule, CellCountModule, ConnectAllModule, DartModule, allZ3Modules, LetterModule, MyopiaModule, RegionAreaModule, ViewpointModule, Z3Module, convertDirection, Z3Solver, Z3SolverContext, AreaNumberSymbol, CustomIconSymbol, CustomSymbol, CustomTextSymbol, DartSymbol, DirectionLinkerSymbol, GalaxySymbol, HiddenSymbol, allSymbols, LetterSymbol, LotusSymbol, MinesweeperSymbol, MultiEntrySymbol, MyopiaSymbol, NumberSymbol, Symbol, ViewpointSymbol, TileData, TileConnections, validateGrid, aggregateState, applyFinalOverrides, };
|
package/dist/index.js
CHANGED
|
@@ -8,7 +8,7 @@ import { isEventHandler } from './data/events/eventHelper.js';
|
|
|
8
8
|
import { handlesFinalValidation } from './data/events/onFinalValidation.js';
|
|
9
9
|
import { handlesGridChange } from './data/events/onGridChange.js';
|
|
10
10
|
import { handlesGridResize } from './data/events/onGridResize.js';
|
|
11
|
-
import { handlesSetGrid } from './data/events/onSetGrid.js';
|
|
11
|
+
import { handlesSetGrid, invokeSetGrid } from './data/events/onSetGrid.js';
|
|
12
12
|
import { handlesSymbolDisplay } from './data/events/onSymbolDisplay.js';
|
|
13
13
|
import { handlesSymbolValidation } from './data/events/onSymbolValidation.js';
|
|
14
14
|
import GridData, { NEIGHBOR_OFFSETS } from './data/grid.js';
|
|
@@ -101,4 +101,4 @@ import ViewpointSymbol from './data/symbols/viewpointSymbol.js';
|
|
|
101
101
|
import TileData from './data/tile.js';
|
|
102
102
|
import TileConnections from './data/tileConnections.js';
|
|
103
103
|
import validateGrid, { aggregateState, applyFinalOverrides } from './data/validate.js';
|
|
104
|
-
export { ConfigType, configEquals, Configurable, CachedAccess, allEqual, array, directionToRotation, escape, isSameEdge, maxBy, minBy, move, orientationToRotation, resize, unescape, isEventHandler, handlesFinalValidation, handlesGridChange, handlesGridResize, handlesSetGrid, handlesSymbolDisplay, handlesSymbolValidation, GridData, NEIGHBOR_OFFSETS, GridConnections, GridZones, Instruction, COMPARISONS, Color, Comparison, DIRECTIONS, Direction, MajorRule, Mode, ORIENTATIONS, Orientation, State, directionToggle, orientationToggle, MetadataSchema, PuzzleSchema, BanPatternRule, CellCountPerZoneRule, CellCountRule, CompletePatternRule, ConnectAllRule, CustomRule, ForesightRule, allRules, ControlLine, Row, MusicGridRule, MysteryRule, OffByXRule, PerfectionRule, RegionAreaRule, RegionShapeRule, Rule, SameShapeRule, SymbolsPerRegionRule, UndercluedRule, UniqueShapeRule, Serializer, Compressor, CompressorBase, DeflateCompressor, GzipCompressor, StreamCompressor, SerializerBase, SerializerV0, getShapeVariants, normalizeShape, positionsToShape, shapeEquals, tilesToShape, allSolvers, BacktrackSolver, BTModule, BTGridData, BTTile, IntArray2D, colorToBTTile, createOneTileResult, getOppositeColor, BanPatternBTModule, CellCountBTModule, ConnectAllBTModule, RegionAreaBTModule, RegionShapeBTModule, SameShapeBTModule, SymbolsPerRegionBTModule, UniqueShapeBTModule, AreaNumberBTModule, DartBTModule, DirectionLinkerBTModule, GalaxyBTModule, LetterBTModule, LotusBTModule, MinesweeperBTModule, MyopiaBTModule, ViewpointBTModule, Solver, UndercluedSolver, AreaNumberModule, CellCountModule, ConnectAllModule, DartModule, allZ3Modules, LetterModule, MyopiaModule, RegionAreaModule, ViewpointModule, Z3Module, convertDirection, Z3Solver, Z3SolverContext, AreaNumberSymbol, CustomIconSymbol, CustomSymbol, CustomTextSymbol, DartSymbol, DirectionLinkerSymbol, GalaxySymbol, HiddenSymbol, allSymbols, LetterSymbol, LotusSymbol, MinesweeperSymbol, MultiEntrySymbol, MyopiaSymbol, NumberSymbol, Symbol, ViewpointSymbol, TileData, TileConnections, validateGrid, aggregateState, applyFinalOverrides, };
|
|
104
|
+
export { ConfigType, configEquals, Configurable, CachedAccess, allEqual, array, directionToRotation, escape, isSameEdge, maxBy, minBy, move, orientationToRotation, resize, unescape, isEventHandler, handlesFinalValidation, handlesGridChange, handlesGridResize, handlesSetGrid, invokeSetGrid, handlesSymbolDisplay, handlesSymbolValidation, GridData, NEIGHBOR_OFFSETS, GridConnections, GridZones, Instruction, COMPARISONS, Color, Comparison, DIRECTIONS, Direction, MajorRule, Mode, ORIENTATIONS, Orientation, State, directionToggle, orientationToggle, MetadataSchema, PuzzleSchema, BanPatternRule, CellCountPerZoneRule, CellCountRule, CompletePatternRule, ConnectAllRule, CustomRule, ForesightRule, allRules, ControlLine, Row, MusicGridRule, MysteryRule, OffByXRule, PerfectionRule, RegionAreaRule, RegionShapeRule, Rule, SameShapeRule, SymbolsPerRegionRule, UndercluedRule, UniqueShapeRule, Serializer, Compressor, CompressorBase, DeflateCompressor, GzipCompressor, StreamCompressor, SerializerBase, SerializerV0, getShapeVariants, normalizeShape, positionsToShape, shapeEquals, tilesToShape, allSolvers, BacktrackSolver, BTModule, BTGridData, BTTile, IntArray2D, colorToBTTile, createOneTileResult, getOppositeColor, BanPatternBTModule, CellCountBTModule, ConnectAllBTModule, RegionAreaBTModule, RegionShapeBTModule, SameShapeBTModule, SymbolsPerRegionBTModule, UniqueShapeBTModule, AreaNumberBTModule, DartBTModule, DirectionLinkerBTModule, GalaxyBTModule, LetterBTModule, LotusBTModule, MinesweeperBTModule, MyopiaBTModule, ViewpointBTModule, Solver, UndercluedSolver, AreaNumberModule, CellCountModule, ConnectAllModule, DartModule, allZ3Modules, LetterModule, MyopiaModule, RegionAreaModule, ViewpointModule, Z3Module, convertDirection, Z3Solver, Z3SolverContext, AreaNumberSymbol, CustomIconSymbol, CustomSymbol, CustomTextSymbol, DartSymbol, DirectionLinkerSymbol, GalaxySymbol, HiddenSymbol, allSymbols, LetterSymbol, LotusSymbol, MinesweeperSymbol, MultiEntrySymbol, MyopiaSymbol, NumberSymbol, Symbol, ViewpointSymbol, TileData, TileConnections, validateGrid, aggregateState, applyFinalOverrides, };
|