@logic-pad/core 0.11.3 → 0.12.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.
@@ -9,7 +9,7 @@ declare global {
9
9
  // Generated by dts-bundle-generator v9.5.1
10
10
 
11
11
  import { RegionConstrainer, SymbolGrid } from 'grilops';
12
- import { PuzzleData } from 'logic-pad-solver-core';
12
+ import { PuzzleData as PuzzleData$1 } from 'logic-pad-solver-core';
13
13
  import { Optimize, Solver as Solver$1, Z3LowLevel } from 'z3-solver';
14
14
  import { z } from 'zod';
15
15
 
@@ -32,6 +32,15 @@ declare global {
32
32
  Underclued = 'underclued',
33
33
  WrapAround = 'wrap_around',
34
34
  }
35
+ /**
36
+ * General puzzle types for categorization. One puzzle can have multiple types.
37
+ */
38
+ export declare enum PuzzleType {
39
+ Logic = 'logic',
40
+ Underclued = 'underclued',
41
+ Pattern = 'pattern',
42
+ Music = 'music',
43
+ }
35
44
  export declare enum State {
36
45
  /**
37
46
  * Describes the violation of a rule.
@@ -1402,10 +1411,6 @@ declare global {
1402
1411
  * A description of the puzzle. (can be empty)
1403
1412
  */
1404
1413
  description: string;
1405
- /**
1406
- * A link to a place to discuss this puzzle. (can be empty)
1407
- */
1408
- link: string;
1409
1414
  /**
1410
1415
  * The difficulty of the puzzle, from 0 to 10. (required)
1411
1416
  *
@@ -1418,7 +1423,6 @@ declare global {
1418
1423
  title: z.ZodString;
1419
1424
  author: z.ZodString;
1420
1425
  description: z.ZodString;
1421
- link: z.ZodString;
1422
1426
  difficulty: z.ZodNumber;
1423
1427
  },
1424
1428
  'strict',
@@ -1427,14 +1431,12 @@ declare global {
1427
1431
  description: string;
1428
1432
  title: string;
1429
1433
  author: string;
1430
- link: string;
1431
1434
  difficulty: number;
1432
1435
  },
1433
1436
  {
1434
1437
  description: string;
1435
1438
  title: string;
1436
1439
  author: string;
1437
- link: string;
1438
1440
  difficulty: number;
1439
1441
  }
1440
1442
  >;
@@ -1443,7 +1445,6 @@ declare global {
1443
1445
  title: z.ZodString;
1444
1446
  author: z.ZodString;
1445
1447
  description: z.ZodString;
1446
- link: z.ZodString;
1447
1448
  difficulty: z.ZodNumber;
1448
1449
  grid: z.ZodType<GridData, z.ZodTypeDef, GridData>;
1449
1450
  solution: z.ZodNullable<z.ZodType<GridData, z.ZodTypeDef, GridData>>;
@@ -1455,7 +1456,6 @@ declare global {
1455
1456
  grid: GridData;
1456
1457
  title: string;
1457
1458
  author: string;
1458
- link: string;
1459
1459
  difficulty: number;
1460
1460
  solution: GridData | null;
1461
1461
  },
@@ -1464,12 +1464,11 @@ declare global {
1464
1464
  grid: GridData;
1465
1465
  title: string;
1466
1466
  author: string;
1467
- link: string;
1468
1467
  difficulty: number;
1469
1468
  solution: GridData | null;
1470
1469
  }
1471
1470
  >;
1472
- export type Puzzle = PuzzleMetadata & {
1471
+ export type PuzzleData = {
1473
1472
  /**
1474
1473
  * The grid of the puzzle. (required)
1475
1474
  *
@@ -1485,6 +1484,12 @@ declare global {
1485
1484
  */
1486
1485
  solution: GridData | null;
1487
1486
  };
1487
+ export type Puzzle = PuzzleMetadata & PuzzleData;
1488
+ /**
1489
+ * Get the types of a puzzle based on its grid properties. The returned types are ordered by their priority.
1490
+ * The first type is the most important one.
1491
+ */
1492
+ export declare function getPuzzleTypes(puzzle: Puzzle): PuzzleType[];
1488
1493
  export interface ShapeElement {
1489
1494
  x: number;
1490
1495
  y: number;
@@ -2037,6 +2042,8 @@ declare global {
2037
2042
  abstract parseSymbols(input: string): Map<string, Symbol$1[]>;
2038
2043
  abstract stringifyGrid(grid: GridData): string;
2039
2044
  abstract parseGrid(input: string): GridData;
2045
+ abstract stringifyGridWithSolution(puzzle: PuzzleData): string;
2046
+ abstract parseGridWithSolution(input: string): PuzzleData;
2040
2047
  abstract stringifyPuzzle(puzzle: Puzzle): string;
2041
2048
  abstract parsePuzzle(input: string): Puzzle;
2042
2049
  }
@@ -2068,6 +2075,8 @@ declare global {
2068
2075
  parseSymbols(input: string): Map<string, Symbol$1[]>;
2069
2076
  stringifyGrid(grid: GridData): string;
2070
2077
  parseGrid(input: string): GridData;
2078
+ stringifyGridWithSolution(puzzle: PuzzleData): string;
2079
+ parseGridWithSolution(input: string): PuzzleData;
2071
2080
  stringifyPuzzle(puzzle: Puzzle): string;
2072
2081
  parsePuzzle(input: string): Puzzle;
2073
2082
  }
@@ -2699,7 +2708,7 @@ declare global {
2699
2708
  isInstructionSupported(instructionId: string): boolean;
2700
2709
  isEnvironmentSupported(): Promise<boolean>;
2701
2710
  }
2702
- export declare function gridToJson(grid: GridData): PuzzleData;
2711
+ export declare function gridToJson(grid: GridData): PuzzleData$1;
2703
2712
  export declare class UniversalSolver extends EventIteratingSolver {
2704
2713
  readonly id = 'universal';
2705
2714
  readonly author = 'romain22222, Lysine';
@@ -17,6 +17,15 @@ export declare enum MajorRule {
17
17
  Underclued = "underclued",
18
18
  WrapAround = "wrap_around"
19
19
  }
20
+ /**
21
+ * General puzzle types for categorization. One puzzle can have multiple types.
22
+ */
23
+ export declare enum PuzzleType {
24
+ Logic = "logic",
25
+ Underclued = "underclued",
26
+ Pattern = "pattern",
27
+ Music = "music"
28
+ }
20
29
  export declare enum State {
21
30
  /**
22
31
  * Describes the violation of a rule.
@@ -8,6 +8,16 @@ export var MajorRule;
8
8
  MajorRule["Underclued"] = "underclued";
9
9
  MajorRule["WrapAround"] = "wrap_around";
10
10
  })(MajorRule || (MajorRule = {}));
11
+ /**
12
+ * General puzzle types for categorization. One puzzle can have multiple types.
13
+ */
14
+ export var PuzzleType;
15
+ (function (PuzzleType) {
16
+ PuzzleType["Logic"] = "logic";
17
+ PuzzleType["Underclued"] = "underclued";
18
+ PuzzleType["Pattern"] = "pattern";
19
+ PuzzleType["Music"] = "music";
20
+ })(PuzzleType || (PuzzleType = {}));
11
21
  export var State;
12
22
  (function (State) {
13
23
  /**
@@ -1,5 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  import GridData from './grid.js';
3
+ import { PuzzleType } from './primitives.js';
3
4
  export type PuzzleMetadata = {
4
5
  /**
5
6
  * The title of the puzzle. (required)
@@ -13,10 +14,6 @@ export type PuzzleMetadata = {
13
14
  * A description of the puzzle. (can be empty)
14
15
  */
15
16
  description: string;
16
- /**
17
- * A link to a place to discuss this puzzle. (can be empty)
18
- */
19
- link: string;
20
17
  /**
21
18
  * The difficulty of the puzzle, from 0 to 10. (required)
22
19
  *
@@ -28,26 +25,22 @@ export declare const MetadataSchema: z.ZodObject<{
28
25
  title: z.ZodString;
29
26
  author: z.ZodString;
30
27
  description: z.ZodString;
31
- link: z.ZodString;
32
28
  difficulty: z.ZodNumber;
33
29
  }, "strict", z.ZodTypeAny, {
34
30
  description: string;
35
31
  title: string;
36
32
  author: string;
37
- link: string;
38
33
  difficulty: number;
39
34
  }, {
40
35
  description: string;
41
36
  title: string;
42
37
  author: string;
43
- link: string;
44
38
  difficulty: number;
45
39
  }>;
46
40
  export declare const PuzzleSchema: z.ZodObject<{
47
41
  title: z.ZodString;
48
42
  author: z.ZodString;
49
43
  description: z.ZodString;
50
- link: z.ZodString;
51
44
  difficulty: z.ZodNumber;
52
45
  grid: z.ZodType<GridData, z.ZodTypeDef, GridData>;
53
46
  solution: z.ZodNullable<z.ZodType<GridData, z.ZodTypeDef, GridData>>;
@@ -56,7 +49,6 @@ export declare const PuzzleSchema: z.ZodObject<{
56
49
  grid: GridData;
57
50
  title: string;
58
51
  author: string;
59
- link: string;
60
52
  difficulty: number;
61
53
  solution: GridData | null;
62
54
  }, {
@@ -64,11 +56,10 @@ export declare const PuzzleSchema: z.ZodObject<{
64
56
  grid: GridData;
65
57
  title: string;
66
58
  author: string;
67
- link: string;
68
59
  difficulty: number;
69
60
  solution: GridData | null;
70
61
  }>;
71
- export type Puzzle = PuzzleMetadata & {
62
+ export type PuzzleData = {
72
63
  /**
73
64
  * The grid of the puzzle. (required)
74
65
  *
@@ -84,3 +75,9 @@ export type Puzzle = PuzzleMetadata & {
84
75
  */
85
76
  solution: GridData | null;
86
77
  };
78
+ export type Puzzle = PuzzleMetadata & PuzzleData;
79
+ /**
80
+ * Get the types of a puzzle based on its grid properties. The returned types are ordered by their priority.
81
+ * The first type is the most important one.
82
+ */
83
+ export declare function getPuzzleTypes(puzzle: Puzzle): PuzzleType[];
@@ -1,11 +1,11 @@
1
1
  import { z } from 'zod';
2
2
  import GridData from './grid.js';
3
+ import { PuzzleType } from './primitives.js';
3
4
  export const MetadataSchema = z
4
5
  .object({
5
6
  title: z.string().min(1),
6
7
  author: z.string().min(1),
7
8
  description: z.string(),
8
- link: z.string(),
9
9
  difficulty: z.number().int().min(0).max(10),
10
10
  })
11
11
  .strict();
@@ -14,9 +14,31 @@ export const PuzzleSchema = z
14
14
  title: z.string().min(1),
15
15
  author: z.string().min(1),
16
16
  description: z.string(),
17
- link: z.string(),
18
17
  difficulty: z.number().int().min(0).max(10),
19
18
  grid: z.instanceof(GridData),
20
19
  solution: z.instanceof(GridData).nullable(),
21
20
  })
22
21
  .strict();
22
+ /**
23
+ * Get the types of a puzzle based on its grid properties. The returned types are ordered by their priority.
24
+ * The first type is the most important one.
25
+ */
26
+ export function getPuzzleTypes(puzzle) {
27
+ const types = [];
28
+ let logic = true;
29
+ if (puzzle.grid.musicGrid.value) {
30
+ types.push(PuzzleType.Music);
31
+ logic = false;
32
+ }
33
+ if (puzzle.grid.completePattern.value) {
34
+ types.push(PuzzleType.Pattern);
35
+ logic = false;
36
+ }
37
+ if (puzzle.grid.underclued.value) {
38
+ types.push(PuzzleType.Underclued);
39
+ }
40
+ if (logic) {
41
+ types.push(PuzzleType.Logic);
42
+ }
43
+ return types;
44
+ }
@@ -3,7 +3,7 @@ import GridConnections from '../gridConnections.js';
3
3
  import Rule from '../rules/rule.js';
4
4
  import TileData from '../tile.js';
5
5
  import Symbol from '../symbols/symbol.js';
6
- import { Puzzle } from '../puzzle.js';
6
+ import { Puzzle, PuzzleData } from '../puzzle.js';
7
7
  import GridZones from '../gridZones.js';
8
8
  export default abstract class SerializerBase {
9
9
  abstract get version(): number;
@@ -25,6 +25,8 @@ export default abstract class SerializerBase {
25
25
  abstract parseSymbols(input: string): Map<string, Symbol[]>;
26
26
  abstract stringifyGrid(grid: GridData): string;
27
27
  abstract parseGrid(input: string): GridData;
28
+ abstract stringifyGridWithSolution(puzzle: PuzzleData): string;
29
+ abstract parseGridWithSolution(input: string): PuzzleData;
28
30
  abstract stringifyPuzzle(puzzle: Puzzle): string;
29
31
  abstract parsePuzzle(input: string): Puzzle;
30
32
  }
@@ -6,7 +6,7 @@ import Symbol from '../symbols/symbol.js';
6
6
  import Instruction from '../instruction.js';
7
7
  import { AnyConfig } from '../config.js';
8
8
  import SerializerBase from './serializerBase.js';
9
- import { Puzzle } from '../puzzle.js';
9
+ import { Puzzle, PuzzleData } from '../puzzle.js';
10
10
  import { ControlLine } from '../rules/musicControlLine.js';
11
11
  import GridZones from '../gridZones.js';
12
12
  export default class SerializerV0 extends SerializerBase {
@@ -34,6 +34,8 @@ export default class SerializerV0 extends SerializerBase {
34
34
  parseSymbols(input: string): Map<string, Symbol[]>;
35
35
  stringifyGrid(grid: GridData): string;
36
36
  parseGrid(input: string): GridData;
37
+ stringifyGridWithSolution(puzzle: PuzzleData): string;
38
+ parseGridWithSolution(input: string): PuzzleData;
37
39
  stringifyPuzzle(puzzle: Puzzle): string;
38
40
  parsePuzzle(input: string): Puzzle;
39
41
  }
@@ -427,7 +427,7 @@ export default class SerializerV0 extends SerializerBase {
427
427
  }
428
428
  return GridData.create(width ?? tiles?.[0].length ?? 0, height ?? tiles?.length ?? 0, tiles, connections, zones, symbols, rules);
429
429
  }
430
- stringifyPuzzle(puzzle) {
430
+ stringifyGridWithSolution(puzzle) {
431
431
  let grid = puzzle.grid;
432
432
  if (puzzle.solution !== null) {
433
433
  const tiles = array(puzzle.grid.width, puzzle.grid.height, (x, y) => {
@@ -444,23 +444,33 @@ export default class SerializerV0 extends SerializerBase {
444
444
  });
445
445
  grid = puzzle.grid.copyWith({ tiles });
446
446
  }
447
+ return this.stringifyGrid(grid);
448
+ }
449
+ parseGridWithSolution(input) {
450
+ const grid = this.parseGrid(input);
451
+ const reset = grid.resetTiles();
452
+ return {
453
+ grid: reset,
454
+ solution: grid.colorEquals(reset) ? null : grid,
455
+ };
456
+ }
457
+ stringifyPuzzle(puzzle) {
447
458
  return JSON.stringify({
448
459
  title: puzzle.title,
449
- grid: this.stringifyGrid(grid),
460
+ grid: this.stringifyGridWithSolution(puzzle),
450
461
  difficulty: puzzle.difficulty,
451
- link: puzzle.link,
452
462
  author: puzzle.author,
453
463
  description: puzzle.description,
454
464
  });
455
465
  }
456
466
  parsePuzzle(input) {
457
- const { grid: gridString, ...metadata } = JSON.parse(input);
458
- const grid = this.parseGrid(gridString);
459
- const reset = grid.resetTiles();
467
+ const { grid: gridString, title, author, description, difficulty, } = JSON.parse(input);
460
468
  return {
461
- ...metadata,
462
- grid: reset,
463
- solution: grid.colorEquals(reset) ? null : grid,
469
+ title,
470
+ author,
471
+ description,
472
+ difficulty,
473
+ ...this.parseGridWithSolution(gridString),
464
474
  };
465
475
  }
466
476
  }
@@ -126,6 +126,14 @@ class DirectionLinkerSymbol extends Symbol {
126
126
  color1: baseColor1,
127
127
  color2: baseColor2,
128
128
  };
129
+ const newColor1 = getColor(newArrTurtle.pos1, grid);
130
+ const newColor2 = getColor(newArrTurtle.pos2, grid);
131
+ if (newColor1 !== baseColor1 &&
132
+ newColor2 !== baseColor2 &&
133
+ newColor1 !== Color.Gray &&
134
+ newColor2 !== Color.Gray) {
135
+ continue;
136
+ }
129
137
  if (checkedCouples.some(({ pos1, pos2 }) => pos1.x === newArrTurtle.pos1.x &&
130
138
  pos1.y === newArrTurtle.pos1.y &&
131
139
  pos2.x === newArrTurtle.pos2.x &&
package/dist/index.d.ts CHANGED
@@ -13,8 +13,8 @@ import GridData, { NEIGHBOR_OFFSETS } from './data/grid.js';
13
13
  import GridConnections from './data/gridConnections.js';
14
14
  import GridZones from './data/gridZones.js';
15
15
  import Instruction from './data/instruction.js';
16
- import { COMPARISONS, Color, Comparison, DIRECTIONS, Direction, MajorRule, Mode, ORIENTATIONS, Orientation, State, WRAPPINGS, Wrapping, directionToggle, orientationToggle } from './data/primitives.js';
17
- import { MetadataSchema, PuzzleSchema } from './data/puzzle.js';
16
+ import { COMPARISONS, Color, Comparison, DIRECTIONS, Direction, MajorRule, Mode, ORIENTATIONS, Orientation, PuzzleType, State, WRAPPINGS, Wrapping, directionToggle, orientationToggle } from './data/primitives.js';
17
+ import { MetadataSchema, PuzzleSchema, getPuzzleTypes } from './data/puzzle.js';
18
18
  import BanPatternRule from './data/rules/banPatternRule.js';
19
19
  import CellCountPerZoneRule from './data/rules/cellCountPerZoneRule.js';
20
20
  import CellCountRule from './data/rules/cellCountRule.js';
@@ -108,4 +108,4 @@ import ViewpointSymbol from './data/symbols/viewpointSymbol.js';
108
108
  import TileData from './data/tile.js';
109
109
  import TileConnections from './data/tileConnections.js';
110
110
  import validateGrid, { aggregateState, applyFinalOverrides } from './data/validate.js';
111
- 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, ContainsShapeRule, 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, sanitizePatternGrid, 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, };
111
+ 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, PuzzleType, State, WRAPPINGS, Wrapping, directionToggle, orientationToggle, MetadataSchema, PuzzleSchema, getPuzzleTypes, BanPatternRule, CellCountPerZoneRule, CellCountRule, CompletePatternRule, ConnectAllRule, ContainsShapeRule, 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, sanitizePatternGrid, 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
@@ -16,8 +16,8 @@ import GridData, { NEIGHBOR_OFFSETS } from './data/grid.js';
16
16
  import GridConnections from './data/gridConnections.js';
17
17
  import GridZones from './data/gridZones.js';
18
18
  import Instruction from './data/instruction.js';
19
- import { COMPARISONS, Color, Comparison, DIRECTIONS, Direction, MajorRule, Mode, ORIENTATIONS, Orientation, State, WRAPPINGS, Wrapping, directionToggle, orientationToggle } from './data/primitives.js';
20
- import { MetadataSchema, PuzzleSchema } from './data/puzzle.js';
19
+ import { COMPARISONS, Color, Comparison, DIRECTIONS, Direction, MajorRule, Mode, ORIENTATIONS, Orientation, PuzzleType, State, WRAPPINGS, Wrapping, directionToggle, orientationToggle } from './data/primitives.js';
20
+ import { MetadataSchema, PuzzleSchema, getPuzzleTypes } from './data/puzzle.js';
21
21
  import BanPatternRule from './data/rules/banPatternRule.js';
22
22
  import CellCountPerZoneRule from './data/rules/cellCountPerZoneRule.js';
23
23
  import CellCountRule from './data/rules/cellCountRule.js';
@@ -111,4 +111,4 @@ import ViewpointSymbol from './data/symbols/viewpointSymbol.js';
111
111
  import TileData from './data/tile.js';
112
112
  import TileConnections from './data/tileConnections.js';
113
113
  import validateGrid, { aggregateState, applyFinalOverrides } from './data/validate.js';
114
- 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, ContainsShapeRule, 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, sanitizePatternGrid, 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, };
114
+ 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, PuzzleType, State, WRAPPINGS, Wrapping, directionToggle, orientationToggle, MetadataSchema, PuzzleSchema, getPuzzleTypes, BanPatternRule, CellCountPerZoneRule, CellCountRule, CompletePatternRule, ConnectAllRule, ContainsShapeRule, 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, sanitizePatternGrid, 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.11.3",
3
+ "version": "0.12.0",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist",