@logic-pad/core 0.10.0 → 0.10.2

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.
@@ -2087,7 +2087,8 @@ declare global {
2087
2087
  *
2088
2088
  * @returns A promise that resolves to `true` if the environment is supported, or `false` otherwise.
2089
2089
  */
2090
- isEnvironmentSupported(): Promise<boolean>;
2090
+ protected isEnvironmentSupported(): Promise<boolean>;
2091
+ readonly environmentCheck: CachedAccess<Promise<boolean>>;
2091
2092
  /**
2092
2093
  * Check if the solver supports the given instruction. This is used to render a small indication in the UI for each
2093
2094
  * instruction in the editor.
@@ -2108,9 +2109,25 @@ declare global {
2108
2109
  isGridSupported(grid: GridData): boolean;
2109
2110
  }
2110
2111
  export declare const allSolvers: Map<string, Solver>;
2112
+ export declare class AutoSolver extends Solver {
2113
+ readonly id = 'auto';
2114
+ readonly author = 'various contributors';
2115
+ readonly description =
2116
+ 'Automatically select the fastest solver based on supported instructions and environment.';
2117
+ readonly supportsCancellation = true;
2118
+ private gridSupportCache;
2119
+ isGridSupported(grid: GridData): boolean;
2120
+ isInstructionSupported(instructionId: string): boolean;
2121
+ protected isEnvironmentSupported(): Promise<boolean>;
2122
+ solve(
2123
+ grid: GridData,
2124
+ abortSignal?: AbortSignal | undefined
2125
+ ): AsyncGenerator<GridData | null>;
2126
+ }
2111
2127
  export declare abstract class EventIteratingSolver extends Solver {
2112
2128
  readonly supportsCancellation = true;
2113
2129
  protected abstract createWorker(): Worker;
2130
+ protected isEnvironmentSupported(): Promise<boolean>;
2114
2131
  solve(
2115
2132
  grid: GridData,
2116
2133
  abortSignal?: AbortSignal
@@ -2635,7 +2652,7 @@ declare global {
2635
2652
  readonly id = 'cspuz';
2636
2653
  readonly author = 'semiexp';
2637
2654
  readonly description =
2638
- 'A blazingly fast WebAssembly solver that supports most rules and symbols (including underclued). No uniqueness check yet.';
2655
+ 'A blazingly fast WebAssembly solver that supports most rules and symbols (including underclued).';
2639
2656
  protected createWorker(): Worker;
2640
2657
  isGridSupported(grid: GridData): boolean;
2641
2658
  isInstructionSupported(instructionId: string): boolean;
@@ -2739,7 +2756,7 @@ declare global {
2739
2756
  readonly description =
2740
2757
  '(Obsolete) A WebAssembly solver that supports a limited set of rules and symbols.';
2741
2758
  readonly supportsCancellation = false;
2742
- isEnvironmentSupported(): Promise<boolean>;
2759
+ protected isEnvironmentSupported(): Promise<boolean>;
2743
2760
  solve(grid: GridData): AsyncGenerator<GridData | null>;
2744
2761
  isInstructionSupported(instructionId: string): boolean;
2745
2762
  isGridSupported(grid: GridData): boolean;
@@ -2,10 +2,12 @@ import UniversalSolver from './universal/universalSolver.js';
2
2
  import BacktrackSolver from './backtrack/backtrackSolver.js';
3
3
  import Z3Solver from './z3/z3Solver.js';
4
4
  import CspuzSolver from './cspuz/cspuzSolver.js';
5
+ import AutoSolver from './auto/autoSolver.js';
5
6
  const allSolvers = new Map();
6
7
  function register(prototype) {
7
8
  allSolvers.set(prototype.id, prototype);
8
9
  }
10
+ register(new AutoSolver());
9
11
  register(new CspuzSolver());
10
12
  register(new BacktrackSolver());
11
13
  register(new UniversalSolver());
@@ -0,0 +1,13 @@
1
+ import GridData from '../../grid.js';
2
+ import Solver from '../solver.js';
3
+ export default class AutoSolver extends Solver {
4
+ readonly id = "auto";
5
+ readonly author = "various contributors";
6
+ readonly description = "Automatically select the fastest solver based on supported instructions and environment.";
7
+ readonly supportsCancellation = true;
8
+ private gridSupportCache;
9
+ isGridSupported(grid: GridData): boolean;
10
+ isInstructionSupported(instructionId: string): boolean;
11
+ protected isEnvironmentSupported(): Promise<boolean>;
12
+ solve(grid: GridData, abortSignal?: AbortSignal | undefined): AsyncGenerator<GridData | null>;
13
+ }
@@ -0,0 +1,88 @@
1
+ import { allSolvers } from '../allSolvers.js';
2
+ import Solver from '../solver.js';
3
+ export default class AutoSolver extends Solver {
4
+ constructor() {
5
+ super(...arguments);
6
+ Object.defineProperty(this, "id", {
7
+ enumerable: true,
8
+ configurable: true,
9
+ writable: true,
10
+ value: 'auto'
11
+ });
12
+ Object.defineProperty(this, "author", {
13
+ enumerable: true,
14
+ configurable: true,
15
+ writable: true,
16
+ value: 'various contributors'
17
+ });
18
+ Object.defineProperty(this, "description", {
19
+ enumerable: true,
20
+ configurable: true,
21
+ writable: true,
22
+ value: 'Automatically select the fastest solver based on supported instructions and environment.'
23
+ });
24
+ Object.defineProperty(this, "supportsCancellation", {
25
+ enumerable: true,
26
+ configurable: true,
27
+ writable: true,
28
+ value: true
29
+ });
30
+ Object.defineProperty(this, "gridSupportCache", {
31
+ enumerable: true,
32
+ configurable: true,
33
+ writable: true,
34
+ value: null
35
+ });
36
+ }
37
+ isGridSupported(grid) {
38
+ for (const solver of allSolvers.values()) {
39
+ if (solver.id === this.id)
40
+ continue;
41
+ if (solver.isGridSupported(grid)) {
42
+ this.gridSupportCache = [grid, solver];
43
+ return true;
44
+ }
45
+ }
46
+ this.gridSupportCache = [grid, null];
47
+ return false;
48
+ }
49
+ isInstructionSupported(instructionId) {
50
+ for (const solver of allSolvers.values()) {
51
+ if (solver.id === this.id)
52
+ continue;
53
+ if (solver.isInstructionSupported(instructionId)) {
54
+ return true;
55
+ }
56
+ }
57
+ return false;
58
+ }
59
+ async isEnvironmentSupported() {
60
+ for (const solver of allSolvers.values()) {
61
+ if (solver.id === this.id)
62
+ continue;
63
+ if (await solver.environmentCheck.value) {
64
+ return true;
65
+ }
66
+ }
67
+ return false;
68
+ }
69
+ solve(grid, abortSignal) {
70
+ let targetSolver = null;
71
+ if (this.gridSupportCache && this.gridSupportCache[0] === grid) {
72
+ targetSolver = this.gridSupportCache[1];
73
+ }
74
+ else {
75
+ for (const solver of allSolvers.values()) {
76
+ if (solver.id === this.id)
77
+ continue;
78
+ if (solver.isGridSupported(grid)) {
79
+ targetSolver = solver;
80
+ }
81
+ }
82
+ }
83
+ if (targetSolver) {
84
+ return targetSolver.solve(grid, abortSignal);
85
+ }
86
+ throw new Error('No solver supports the given grid');
87
+ }
88
+ }
@@ -4,7 +4,7 @@ export default class CspuzSolver extends EventIteratingSolver {
4
4
  private static readonly supportedInstrs;
5
5
  readonly id = "cspuz";
6
6
  readonly author = "semiexp";
7
- readonly description = "A blazingly fast WebAssembly solver that supports most rules and symbols (including underclued). No uniqueness check yet.";
7
+ readonly description = "A blazingly fast WebAssembly solver that supports most rules and symbols (including underclued).";
8
8
  protected createWorker(): Worker;
9
9
  isGridSupported(grid: GridData): boolean;
10
10
  isInstructionSupported(instructionId: string): boolean;
@@ -36,7 +36,7 @@ class CspuzSolver extends EventIteratingSolver {
36
36
  enumerable: true,
37
37
  configurable: true,
38
38
  writable: true,
39
- value: 'A blazingly fast WebAssembly solver that supports most rules and symbols (including underclued). No uniqueness check yet.'
39
+ value: 'A blazingly fast WebAssembly solver that supports most rules and symbols (including underclued).'
40
40
  });
41
41
  }
42
42
  createWorker() {
@@ -14,10 +14,7 @@ function stringToColor(str) {
14
14
  return Color.Gray;
15
15
  }
16
16
  }
17
- onmessage = e => {
18
- const grid = Serializer.parseGrid(e.data);
19
- const puzzleData = gridToJson(grid);
20
- const solverResult = solveLogicPad(puzzleData, !!grid.findRule(r => r.id === undercluedInstance.id));
17
+ function postSolution(grid, solverResult) {
21
18
  if (solverResult === null) {
22
19
  postMessage(null);
23
20
  }
@@ -40,5 +37,47 @@ onmessage = e => {
40
37
  postMessage(Serializer.stringifyGrid(solution));
41
38
  }
42
39
  }
40
+ }
41
+ onmessage = e => {
42
+ const grid = Serializer.parseGrid(e.data);
43
+ const isUnderclued = !!grid.findRule(r => r.id === undercluedInstance.id);
44
+ const puzzleData = gridToJson(grid);
45
+ const solverResult = solveLogicPad(puzzleData, isUnderclued);
46
+ postSolution(grid, solverResult);
47
+ // Make use of the underclued mode to determine solution uniqueness
48
+ if (solverResult !== null && !('error' in solverResult) && !isUnderclued) {
49
+ const undercluedResult = solveLogicPad(puzzleData, true);
50
+ if (undercluedResult === null) {
51
+ postMessage(undefined); // Shouldn't happen because underclued grids should always be solvable
52
+ }
53
+ else if ('error' in undercluedResult) {
54
+ throw new Error(undercluedResult.error);
55
+ }
56
+ else if (undercluedResult.every((row, y) => row.every((cell, x) => cell !== null || !grid.getTile(x, y).exists))) {
57
+ postMessage(null);
58
+ }
59
+ else {
60
+ let tweaked = false;
61
+ for (const [y, row] of undercluedResult.entries()) {
62
+ for (const [x, color] of row.entries()) {
63
+ if (color !== null) {
64
+ puzzleData.tiles[y][x].fixed = true;
65
+ puzzleData.tiles[y][x].color = color;
66
+ }
67
+ else if (!tweaked) {
68
+ const positions = grid.connections.getConnectedTiles({ x, y });
69
+ const newColor = solverResult[y][x] === 'dark' ? 'light' : 'dark';
70
+ positions.forEach(({ x: px, y: py }) => {
71
+ puzzleData.tiles[py][px].fixed = true;
72
+ puzzleData.tiles[py][px].color = newColor;
73
+ });
74
+ tweaked = true;
75
+ }
76
+ }
77
+ }
78
+ const secondResult = solveLogicPad(puzzleData, false);
79
+ postSolution(grid, secondResult);
80
+ }
81
+ }
43
82
  postMessage(undefined);
44
83
  };
@@ -3,5 +3,6 @@ import Solver from './solver.js';
3
3
  export default abstract class EventIteratingSolver extends Solver {
4
4
  readonly supportsCancellation = true;
5
5
  protected abstract createWorker(): Worker;
6
+ protected isEnvironmentSupported(): Promise<boolean>;
6
7
  solve(grid: GridData, abortSignal?: AbortSignal): AsyncGenerator<GridData | null>;
7
8
  }
@@ -11,6 +11,16 @@ export default class EventIteratingSolver extends Solver {
11
11
  value: true
12
12
  });
13
13
  }
14
+ isEnvironmentSupported() {
15
+ try {
16
+ const worker = this.createWorker();
17
+ worker.terminate();
18
+ return Promise.resolve(true);
19
+ }
20
+ catch (ex) {
21
+ return Promise.resolve(false);
22
+ }
23
+ }
14
24
  async *solve(grid, abortSignal) {
15
25
  const worker = this.createWorker();
16
26
  const terminateHandler = () => worker.terminate();
@@ -1,3 +1,4 @@
1
+ import { CachedAccess } from '../dataHelper.js';
1
2
  import GridData from '../grid.js';
2
3
  /**
3
4
  * Base class that all solvers must extend.
@@ -49,7 +50,8 @@ export default abstract class Solver {
49
50
  *
50
51
  * @returns A promise that resolves to `true` if the environment is supported, or `false` otherwise.
51
52
  */
52
- isEnvironmentSupported(): Promise<boolean>;
53
+ protected isEnvironmentSupported(): Promise<boolean>;
54
+ readonly environmentCheck: CachedAccess<Promise<boolean>>;
53
55
  /**
54
56
  * Check if the solver supports the given instruction. This is used to render a small indication in the UI for each
55
57
  * instruction in the editor.
@@ -1,9 +1,18 @@
1
+ import { CachedAccess } from '../dataHelper.js';
1
2
  import { allRules } from '../rules/index.js';
2
3
  import { allSymbols } from '../symbols/index.js';
3
4
  /**
4
5
  * Base class that all solvers must extend.
5
6
  */
6
7
  export default class Solver {
8
+ constructor() {
9
+ Object.defineProperty(this, "environmentCheck", {
10
+ enumerable: true,
11
+ configurable: true,
12
+ writable: true,
13
+ value: CachedAccess.of(() => this.isEnvironmentSupported())
14
+ });
15
+ }
7
16
  /**
8
17
  * Check if the solver supports the current browser environment. This method is called once when the user first clicks
9
18
  * the "Solve" button, and the result is cached for the duration of the editor session.
@@ -5,7 +5,7 @@ export default class Z3Solver extends Solver {
5
5
  readonly author = "Lysine";
6
6
  readonly description = "(Obsolete) A WebAssembly solver that supports a limited set of rules and symbols.";
7
7
  readonly supportsCancellation = false;
8
- isEnvironmentSupported(): Promise<boolean>;
8
+ protected isEnvironmentSupported(): Promise<boolean>;
9
9
  solve(grid: GridData): AsyncGenerator<GridData | null>;
10
10
  isInstructionSupported(instructionId: string): boolean;
11
11
  isGridSupported(grid: GridData): boolean;
@@ -153,29 +153,29 @@ class DirectionLinkerSymbol extends Symbol {
153
153
  }
154
154
  // 1x2
155
155
  if (x % 1 === 0) {
156
- return [
157
- makeTurtle({ x, y: y - 0.5 }, {
158
- x,
159
- y: y +
160
- (this.linkedDirections[Direction.Up] === Direction.Up &&
161
- this.linkedDirections[Direction.Down] === Direction.Down
162
- ? -0.5
163
- : 0.5),
164
- }, grid),
165
- ];
156
+ if (this.linkedDirections[Direction.Up] === Direction.Up &&
157
+ this.linkedDirections[Direction.Down] === Direction.Down) {
158
+ return [
159
+ makeTurtle({ x, y: y - 0.5 }, { x, y: y - 0.5 }, grid),
160
+ makeTurtle({ x, y: y + 0.5 }, { x, y: y + 0.5 }, grid),
161
+ ];
162
+ }
163
+ else {
164
+ return [makeTurtle({ x, y: y - 0.5 }, { x, y: y + 0.5 }, grid)];
165
+ }
166
166
  }
167
167
  // 2x1
168
168
  if (y % 1 === 0) {
169
- return [
170
- makeTurtle({ x: x - 0.5, y }, {
171
- x: x +
172
- (this.linkedDirections[Direction.Left] === Direction.Left &&
173
- this.linkedDirections[Direction.Right] === Direction.Right
174
- ? -0.5
175
- : 0.5),
176
- y,
177
- }, grid),
178
- ];
169
+ if (this.linkedDirections[Direction.Left] === Direction.Left &&
170
+ this.linkedDirections[Direction.Right] === Direction.Right) {
171
+ return [
172
+ makeTurtle({ x: x - 0.5, y }, { x: x - 0.5, y }, grid),
173
+ makeTurtle({ x: x + 0.5, y }, { x: x + 0.5, y }, grid),
174
+ ];
175
+ }
176
+ else {
177
+ return [makeTurtle({ x: x - 0.5, y }, { x: x + 0.5, y }, grid)];
178
+ }
179
179
  }
180
180
  // 2x2
181
181
  if (this.linkedDirections[Direction.Left] === Direction.Left &&
package/dist/index.d.ts CHANGED
@@ -47,6 +47,7 @@ import SerializerBase from './data/serializer/serializerBase.js';
47
47
  import SerializerV0 from './data/serializer/serializer_v0.js';
48
48
  import { getShapeVariants, normalizeShape, positionsToShape, shapeEquals, tilesToShape } from './data/shapes.js';
49
49
  import { allSolvers } from './data/solver/allSolvers.js';
50
+ import AutoSolver from './data/solver/auto/autoSolver.js';
50
51
  import BacktrackSolver from './data/solver/backtrack/backtrackSolver.js';
51
52
  import BTModule, { BTGridData, BTTile, IntArray2D, colorToBTTile, createOneTileResult, getOppositeColor } from './data/solver/backtrack/data.js';
52
53
  import BanPatternBTModule from './data/solver/backtrack/rules/banPattern.js';
@@ -106,4 +107,4 @@ import ViewpointSymbol from './data/symbols/viewpointSymbol.js';
106
107
  import TileData from './data/tile.js';
107
108
  import TileConnections from './data/tileConnections.js';
108
109
  import validateGrid, { aggregateState, applyFinalOverrides } from './data/validate.js';
109
- export { ConfigType, configEquals, Configurable, CachedAccess, allEqual, array, directionToRotation, escape, isSameEdge, maxBy, minBy, move, orientationToRotation, resize, unescape, isEventHandler, handlesFinalValidation, handlesGetTile, handlesGridChange, handlesGridResize, handlesSetGrid, invokeSetGrid, handlesSymbolDisplay, handlesSymbolValidation, GridData, NEIGHBOR_OFFSETS, GridConnections, GridZones, Instruction, COMPARISONS, Color, Comparison, DIRECTIONS, Direction, MajorRule, Mode, ORIENTATIONS, Orientation, State, WRAPPINGS, Wrapping, directionToggle, orientationToggle, MetadataSchema, PuzzleSchema, BanPatternRule, CellCountPerZoneRule, CellCountRule, CompletePatternRule, ConnectAllRule, CustomRule, ForesightRule, allRules, LyingSymbolRule, ControlLine, Row, MusicGridRule, MysteryRule, OffByXRule, PerfectionRule, RegionAreaRule, RegionShapeRule, Rule, SameShapeRule, SymbolsPerRegionRule, UndercluedRule, UniqueShapeRule, WrapAroundRule, 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, FocusBTModule, GalaxyBTModule, LetterBTModule, LotusBTModule, MinesweeperBTModule, MyopiaBTModule, ViewpointBTModule, CspuzSolver, gridToJson, EventIteratingSolver, Solver, UniversalSolver, AreaNumberModule, CellCountModule, ConnectAllModule, DartModule, allZ3Modules, LetterModule, MyopiaModule, RegionAreaModule, ViewpointModule, Z3Module, convertDirection, Z3Solver, Z3SolverContext, AreaNumberSymbol, CustomIconSymbol, CustomSymbol, CustomTextSymbol, DartSymbol, DirectionLinkerSymbol, FocusSymbol, GalaxySymbol, HiddenSymbol, allSymbols, LetterSymbol, LotusSymbol, MinesweeperSymbol, MultiEntrySymbol, MyopiaSymbol, NumberSymbol, Symbol, ViewpointSymbol, TileData, TileConnections, validateGrid, aggregateState, applyFinalOverrides, };
110
+ export { ConfigType, configEquals, Configurable, CachedAccess, allEqual, array, directionToRotation, escape, isSameEdge, maxBy, minBy, move, orientationToRotation, resize, unescape, isEventHandler, handlesFinalValidation, handlesGetTile, handlesGridChange, handlesGridResize, handlesSetGrid, invokeSetGrid, handlesSymbolDisplay, handlesSymbolValidation, GridData, NEIGHBOR_OFFSETS, GridConnections, GridZones, Instruction, COMPARISONS, Color, Comparison, DIRECTIONS, Direction, MajorRule, Mode, ORIENTATIONS, Orientation, State, WRAPPINGS, Wrapping, directionToggle, orientationToggle, MetadataSchema, PuzzleSchema, BanPatternRule, CellCountPerZoneRule, CellCountRule, CompletePatternRule, ConnectAllRule, CustomRule, ForesightRule, allRules, LyingSymbolRule, ControlLine, Row, MusicGridRule, MysteryRule, OffByXRule, PerfectionRule, RegionAreaRule, RegionShapeRule, Rule, SameShapeRule, SymbolsPerRegionRule, UndercluedRule, UniqueShapeRule, WrapAroundRule, Serializer, Compressor, CompressorBase, DeflateCompressor, GzipCompressor, StreamCompressor, SerializerBase, SerializerV0, getShapeVariants, normalizeShape, positionsToShape, shapeEquals, tilesToShape, allSolvers, AutoSolver, BacktrackSolver, BTModule, BTGridData, BTTile, IntArray2D, colorToBTTile, createOneTileResult, getOppositeColor, BanPatternBTModule, CellCountBTModule, ConnectAllBTModule, RegionAreaBTModule, RegionShapeBTModule, SameShapeBTModule, SymbolsPerRegionBTModule, UniqueShapeBTModule, AreaNumberBTModule, DartBTModule, DirectionLinkerBTModule, FocusBTModule, GalaxyBTModule, LetterBTModule, LotusBTModule, MinesweeperBTModule, MyopiaBTModule, ViewpointBTModule, CspuzSolver, gridToJson, EventIteratingSolver, Solver, UniversalSolver, AreaNumberModule, CellCountModule, ConnectAllModule, DartModule, allZ3Modules, LetterModule, MyopiaModule, RegionAreaModule, ViewpointModule, Z3Module, convertDirection, Z3Solver, Z3SolverContext, AreaNumberSymbol, CustomIconSymbol, CustomSymbol, CustomTextSymbol, DartSymbol, DirectionLinkerSymbol, FocusSymbol, GalaxySymbol, HiddenSymbol, allSymbols, LetterSymbol, LotusSymbol, MinesweeperSymbol, MultiEntrySymbol, MyopiaSymbol, NumberSymbol, Symbol, ViewpointSymbol, TileData, TileConnections, validateGrid, aggregateState, applyFinalOverrides, };
package/dist/index.js CHANGED
@@ -50,6 +50,7 @@ import SerializerBase from './data/serializer/serializerBase.js';
50
50
  import SerializerV0 from './data/serializer/serializer_v0.js';
51
51
  import { getShapeVariants, normalizeShape, positionsToShape, shapeEquals, tilesToShape } from './data/shapes.js';
52
52
  import { allSolvers } from './data/solver/allSolvers.js';
53
+ import AutoSolver from './data/solver/auto/autoSolver.js';
53
54
  import BacktrackSolver from './data/solver/backtrack/backtrackSolver.js';
54
55
  import BTModule, { BTGridData, BTTile, IntArray2D, colorToBTTile, createOneTileResult, getOppositeColor } from './data/solver/backtrack/data.js';
55
56
  import BanPatternBTModule from './data/solver/backtrack/rules/banPattern.js';
@@ -109,4 +110,4 @@ import ViewpointSymbol from './data/symbols/viewpointSymbol.js';
109
110
  import TileData from './data/tile.js';
110
111
  import TileConnections from './data/tileConnections.js';
111
112
  import validateGrid, { aggregateState, applyFinalOverrides } from './data/validate.js';
112
- export { ConfigType, configEquals, Configurable, CachedAccess, allEqual, array, directionToRotation, escape, isSameEdge, maxBy, minBy, move, orientationToRotation, resize, unescape, isEventHandler, handlesFinalValidation, handlesGetTile, handlesGridChange, handlesGridResize, handlesSetGrid, invokeSetGrid, handlesSymbolDisplay, handlesSymbolValidation, GridData, NEIGHBOR_OFFSETS, GridConnections, GridZones, Instruction, COMPARISONS, Color, Comparison, DIRECTIONS, Direction, MajorRule, Mode, ORIENTATIONS, Orientation, State, WRAPPINGS, Wrapping, directionToggle, orientationToggle, MetadataSchema, PuzzleSchema, BanPatternRule, CellCountPerZoneRule, CellCountRule, CompletePatternRule, ConnectAllRule, CustomRule, ForesightRule, allRules, LyingSymbolRule, ControlLine, Row, MusicGridRule, MysteryRule, OffByXRule, PerfectionRule, RegionAreaRule, RegionShapeRule, Rule, SameShapeRule, SymbolsPerRegionRule, UndercluedRule, UniqueShapeRule, WrapAroundRule, 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, FocusBTModule, GalaxyBTModule, LetterBTModule, LotusBTModule, MinesweeperBTModule, MyopiaBTModule, ViewpointBTModule, CspuzSolver, gridToJson, EventIteratingSolver, Solver, UniversalSolver, AreaNumberModule, CellCountModule, ConnectAllModule, DartModule, allZ3Modules, LetterModule, MyopiaModule, RegionAreaModule, ViewpointModule, Z3Module, convertDirection, Z3Solver, Z3SolverContext, AreaNumberSymbol, CustomIconSymbol, CustomSymbol, CustomTextSymbol, DartSymbol, DirectionLinkerSymbol, FocusSymbol, GalaxySymbol, HiddenSymbol, allSymbols, LetterSymbol, LotusSymbol, MinesweeperSymbol, MultiEntrySymbol, MyopiaSymbol, NumberSymbol, Symbol, ViewpointSymbol, TileData, TileConnections, validateGrid, aggregateState, applyFinalOverrides, };
113
+ export { ConfigType, configEquals, Configurable, CachedAccess, allEqual, array, directionToRotation, escape, isSameEdge, maxBy, minBy, move, orientationToRotation, resize, unescape, isEventHandler, handlesFinalValidation, handlesGetTile, handlesGridChange, handlesGridResize, handlesSetGrid, invokeSetGrid, handlesSymbolDisplay, handlesSymbolValidation, GridData, NEIGHBOR_OFFSETS, GridConnections, GridZones, Instruction, COMPARISONS, Color, Comparison, DIRECTIONS, Direction, MajorRule, Mode, ORIENTATIONS, Orientation, State, WRAPPINGS, Wrapping, directionToggle, orientationToggle, MetadataSchema, PuzzleSchema, BanPatternRule, CellCountPerZoneRule, CellCountRule, CompletePatternRule, ConnectAllRule, CustomRule, ForesightRule, allRules, LyingSymbolRule, ControlLine, Row, MusicGridRule, MysteryRule, OffByXRule, PerfectionRule, RegionAreaRule, RegionShapeRule, Rule, SameShapeRule, SymbolsPerRegionRule, UndercluedRule, UniqueShapeRule, WrapAroundRule, Serializer, Compressor, CompressorBase, DeflateCompressor, GzipCompressor, StreamCompressor, SerializerBase, SerializerV0, getShapeVariants, normalizeShape, positionsToShape, shapeEquals, tilesToShape, allSolvers, AutoSolver, BacktrackSolver, BTModule, BTGridData, BTTile, IntArray2D, colorToBTTile, createOneTileResult, getOppositeColor, BanPatternBTModule, CellCountBTModule, ConnectAllBTModule, RegionAreaBTModule, RegionShapeBTModule, SameShapeBTModule, SymbolsPerRegionBTModule, UniqueShapeBTModule, AreaNumberBTModule, DartBTModule, DirectionLinkerBTModule, FocusBTModule, GalaxyBTModule, LetterBTModule, LotusBTModule, MinesweeperBTModule, MyopiaBTModule, ViewpointBTModule, CspuzSolver, gridToJson, EventIteratingSolver, Solver, UniversalSolver, AreaNumberModule, CellCountModule, ConnectAllModule, DartModule, allZ3Modules, LetterModule, MyopiaModule, RegionAreaModule, ViewpointModule, Z3Module, convertDirection, Z3Solver, Z3SolverContext, AreaNumberSymbol, CustomIconSymbol, CustomSymbol, CustomTextSymbol, DartSymbol, DirectionLinkerSymbol, FocusSymbol, GalaxySymbol, HiddenSymbol, allSymbols, LetterSymbol, LotusSymbol, MinesweeperSymbol, MultiEntrySymbol, MyopiaSymbol, NumberSymbol, Symbol, ViewpointSymbol, TileData, TileConnections, validateGrid, aggregateState, applyFinalOverrides, };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@logic-pad/core",
3
- "version": "0.10.0",
3
+ "version": "0.10.2",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist",