@logic-pad/core 0.23.1 → 0.24.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/README.md CHANGED
@@ -8,7 +8,7 @@ This package is part of Logic Pad. [Bun >=v1.1.0](https://bun.sh/) is required f
8
8
 
9
9
  ```bash
10
10
  # 1. Clone this repository
11
- git clone https://github.com/hlysine/logic-pad.git
11
+ git clone https://github.com/logic-pad/logic-pad.git
12
12
 
13
13
  # 2. Restore dependencies
14
14
  cd logic-pad
@@ -2333,6 +2333,9 @@ declare global {
2333
2333
  * first iteration indicates that the grid is unsolvable. Yielding `null` on the second iteration indicates that the
2334
2334
  * solution is unique.
2335
2335
  *
2336
+ * If the solve finds the trivial solution of not filling any tiles, such as in the case of an underclued grid with
2337
+ * too many alternate solutions, it must yield the solution instead of yielding `null`.
2338
+ *
2336
2339
  * In the current UI implementation, the solver will be terminated after yielding `null`, or after 2 iterations if
2337
2340
  * `null` is never yielded. The solver should perform any necessary cleanup in the `finally` block of the generator.
2338
2341
  *
@@ -3159,6 +3162,37 @@ declare global {
3159
3162
  withText(text: string): this;
3160
3163
  withRotation(rotation: number): this;
3161
3164
  }
3165
+ export declare class EveryLetterSymbol extends Symbol$1 {
3166
+ readonly x: number;
3167
+ readonly y: number;
3168
+ readonly letter: string;
3169
+ readonly title = 'Hollow Letter';
3170
+ private static readonly CONFIGS;
3171
+ private static readonly EXAMPLE_GRID;
3172
+ /**
3173
+ * **Include each Hollow Letter once per region**
3174
+ *
3175
+ * @param x - The x-coordinate of the symbol.
3176
+ * @param y - The y-coordinate of the symbol.
3177
+ * @param letter - The letter of the symbol.
3178
+ */
3179
+ constructor(x: number, y: number, letter: string);
3180
+ get id(): string;
3181
+ get explanation(): string;
3182
+ get configs(): readonly AnyConfig[] | null;
3183
+ createExampleGrid(): GridData;
3184
+ validateSymbol(grid: GridData): State;
3185
+ copyWith({
3186
+ x,
3187
+ y,
3188
+ letter,
3189
+ }: {
3190
+ x?: number;
3191
+ y?: number;
3192
+ letter?: string;
3193
+ }): this;
3194
+ withLetter(letter: string): this;
3195
+ }
3162
3196
  export declare class HiddenSymbol
3163
3197
  extends Symbol$1
3164
3198
  implements SymbolDisplayHandler
@@ -116,7 +116,6 @@ export function resize(array, newSize, defaultValue) {
116
116
  * @param values The values to compare.
117
117
  * @returns Whether all the values are equal.
118
118
  */
119
- // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters
120
119
  export function allEqual(...values) {
121
120
  return values.every(value => value === values[0]);
122
121
  }
@@ -1,4 +1,3 @@
1
- // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters
2
1
  export function isEventHandler(val, event) {
3
2
  if (typeof val !== 'object' || val === null || val === undefined)
4
3
  return false;
package/dist/data/grid.js CHANGED
@@ -906,10 +906,15 @@ export default class GridData {
906
906
  })));
907
907
  const symbols = new Map();
908
908
  for (const [id, symbolList] of this.symbols) {
909
- const newSymbolList = symbolList.filter(symbol => symbol.x >= origin.x &&
909
+ const newSymbolList = symbolList
910
+ .filter(symbol => symbol.x >= origin.x &&
910
911
  symbol.y >= origin.y &&
911
912
  symbol.x < origin.x + width &&
912
- symbol.y < origin.y + height);
913
+ symbol.y < origin.y + height)
914
+ .map(symbol => symbol.copyWith({
915
+ x: symbol.x - origin.x,
916
+ y: symbol.y - origin.y,
917
+ }));
913
918
  if (newSymbolList.length > 0)
914
919
  symbols.set(id, newSymbolList);
915
920
  }
@@ -27,7 +27,6 @@ export default class StreamCompressor extends CompressorBase {
27
27
  }
28
28
  async decompress(input) {
29
29
  await ensureCompressionStream();
30
- // eslint-disable-next-line @typescript-eslint/no-deprecated
31
30
  const bytes = Uint8Array.from(atob(input), c => c.charCodeAt(0));
32
31
  const cs = new DecompressionStream(this.algorithm);
33
32
  const writer = cs.writable.getWriter();
@@ -4,6 +4,7 @@ import { instance as offByXInstance } from '../../rules/offByXRule.js';
4
4
  import { instance as lotusInstance } from '../../symbols/lotusSymbol.js';
5
5
  import { instance as galaxyInstance } from '../../symbols/galaxySymbol.js';
6
6
  import { instance as wrapAroundInstance } from '../../rules/wrapAroundRule.js';
7
+ import { instance as symbolsPerRegionInstance } from '../../rules/symbolsPerRegionRule.js';
7
8
  import { allSolvers } from '../allSolvers.js';
8
9
  import Solver from '../solver.js';
9
10
  import UndercluedRule from '../../rules/undercluedRule.js';
@@ -97,7 +98,6 @@ class AutoSolver extends Solver {
97
98
  }
98
99
  }
99
100
  async solveOne(generator) {
100
- // eslint-disable-next-line no-unreachable-loop
101
101
  for await (const grid of generator) {
102
102
  return grid;
103
103
  }
@@ -180,6 +180,7 @@ Object.defineProperty(AutoSolver, "nonAdditiveInstructions", {
180
180
  offByXInstance.id,
181
181
  lyingSymbolInstance.id,
182
182
  wrapAroundInstance.id,
183
+ symbolsPerRegionInstance.id,
183
184
  ])
184
185
  });
185
186
  export default AutoSolver;
@@ -293,12 +293,12 @@ onmessage = e => {
293
293
  let count = 0;
294
294
  solve(grid, solution => {
295
295
  // if (count === 0) console.timeLog('Solve time', 'First solution');
296
- if (solution) {
297
- if (solution.resetTiles().colorEquals(solution)) {
298
- postMessage(null);
299
- return false;
300
- }
301
- }
296
+ // if (solution) {
297
+ // if (solution.resetTiles().colorEquals(solution)) {
298
+ // postMessage(null);
299
+ // return false;
300
+ // }
301
+ // }
302
302
  postMessage(Serializer.stringifyGrid(solution));
303
303
  count += 1;
304
304
  return count < 2;
@@ -78,9 +78,8 @@ class CspuzSolver extends EventIteratingSolver {
78
78
  }
79
79
  async isEnvironmentSupported() {
80
80
  try {
81
- const abortController = new AbortController();
82
- for await (const _ of this.solve(GridData.create(['.']), abortController.signal)) {
83
- abortController.abort();
81
+ for await (const _ of this.solve(GridData.create(['.']))) {
82
+ // do nothing
84
83
  }
85
84
  return true;
86
85
  }
@@ -30,12 +30,7 @@ function postSolution(grid, solverResult) {
30
30
  }
31
31
  return tiles;
32
32
  });
33
- if (solution.resetTiles().colorEquals(solution)) {
34
- postMessage(null);
35
- }
36
- else {
37
- postMessage(Serializer.stringifyGrid(solution));
38
- }
33
+ postMessage(Serializer.stringifyGrid(solution));
39
34
  }
40
35
  }
41
36
  onmessage = e => {
@@ -32,6 +32,9 @@ export default abstract class Solver {
32
32
  * first iteration indicates that the grid is unsolvable. Yielding `null` on the second iteration indicates that the
33
33
  * solution is unique.
34
34
  *
35
+ * If the solve finds the trivial solution of not filling any tiles, such as in the case of an underclued grid with
36
+ * too many alternate solutions, it must yield the solution instead of yielding `null`.
37
+ *
35
38
  * In the current UI implementation, the solver will be terminated after yielding `null`, or after 2 iterations if
36
39
  * `null` is never yielded. The solver should perform any necessary cleanup in the `finally` block of the generator.
37
40
  *
@@ -115,11 +115,11 @@ onmessage = e => {
115
115
  const grid = Serializer.parseGrid(e.data);
116
116
  let count = 0;
117
117
  solve(grid, solution => {
118
- if (solution) {
119
- if (solution.resetTiles().colorEquals(solution)) {
120
- solution = null;
121
- }
122
- }
118
+ // if (solution) {
119
+ // if (solution.resetTiles().colorEquals(solution)) {
120
+ // solution = null;
121
+ // }
122
+ // }
123
123
  postMessage(solution ? Serializer.stringifyGrid(solution) : null);
124
124
  count += 1;
125
125
  return count < 2;
@@ -0,0 +1,32 @@
1
+ import { AnyConfig } from '../config.js';
2
+ import GridData from '../grid.js';
3
+ import { State } from '../primitives.js';
4
+ import Symbol from './symbol.js';
5
+ export default class EveryLetterSymbol extends Symbol {
6
+ readonly x: number;
7
+ readonly y: number;
8
+ readonly letter: string;
9
+ readonly title = "Hollow Letter";
10
+ private static readonly CONFIGS;
11
+ private static readonly EXAMPLE_GRID;
12
+ /**
13
+ * **Include each Hollow Letter once per region**
14
+ *
15
+ * @param x - The x-coordinate of the symbol.
16
+ * @param y - The y-coordinate of the symbol.
17
+ * @param letter - The letter of the symbol.
18
+ */
19
+ constructor(x: number, y: number, letter: string);
20
+ get id(): string;
21
+ get explanation(): string;
22
+ get configs(): readonly AnyConfig[] | null;
23
+ createExampleGrid(): GridData;
24
+ validateSymbol(grid: GridData): State;
25
+ copyWith({ x, y, letter, }: {
26
+ x?: number;
27
+ y?: number;
28
+ letter?: string;
29
+ }): this;
30
+ withLetter(letter: string): this;
31
+ }
32
+ export declare const instance: EveryLetterSymbol;
@@ -0,0 +1,145 @@
1
+ import { ConfigType } from '../config.js';
2
+ import GridData from '../grid.js';
3
+ import { array } from '../dataHelper.js';
4
+ import { Color, State } from '../primitives.js';
5
+ import Symbol from './symbol.js';
6
+ class EveryLetterSymbol extends Symbol {
7
+ /**
8
+ * **Include each Hollow Letter once per region**
9
+ *
10
+ * @param x - The x-coordinate of the symbol.
11
+ * @param y - The y-coordinate of the symbol.
12
+ * @param letter - The letter of the symbol.
13
+ */
14
+ constructor(x, y, letter) {
15
+ super(x, y);
16
+ Object.defineProperty(this, "x", {
17
+ enumerable: true,
18
+ configurable: true,
19
+ writable: true,
20
+ value: x
21
+ });
22
+ Object.defineProperty(this, "y", {
23
+ enumerable: true,
24
+ configurable: true,
25
+ writable: true,
26
+ value: y
27
+ });
28
+ Object.defineProperty(this, "letter", {
29
+ enumerable: true,
30
+ configurable: true,
31
+ writable: true,
32
+ value: letter
33
+ });
34
+ Object.defineProperty(this, "title", {
35
+ enumerable: true,
36
+ configurable: true,
37
+ writable: true,
38
+ value: 'Hollow Letter'
39
+ });
40
+ this.letter = letter;
41
+ }
42
+ get id() {
43
+ return `every_letter`;
44
+ }
45
+ get explanation() {
46
+ return 'Include each *Hollow Letter* once per region';
47
+ }
48
+ get configs() {
49
+ return EveryLetterSymbol.CONFIGS;
50
+ }
51
+ createExampleGrid() {
52
+ return EveryLetterSymbol.EXAMPLE_GRID;
53
+ }
54
+ validateSymbol(grid) {
55
+ const uniqueLetters = new Set(grid.symbols.get(this.id)?.map(s => s.letter));
56
+ if (uniqueLetters.size === 0) {
57
+ return State.Satisfied;
58
+ }
59
+ const possibleLetters = new Set(uniqueLetters);
60
+ const thisX = Math.floor(this.x);
61
+ const thisY = Math.floor(this.y);
62
+ let complete = true;
63
+ const visited = array(grid.width, grid.height, () => false);
64
+ const connected = array(grid.width, grid.height, () => false);
65
+ const color = grid.getTile(thisX, thisY).color;
66
+ if (color !== Color.Gray) {
67
+ grid.iterateArea({ x: thisX, y: thisY }, tile => tile.color === Color.Gray || tile.color === color, (tile, x, y) => {
68
+ visited[y][x] = true;
69
+ if (tile.color === Color.Gray)
70
+ complete = false;
71
+ });
72
+ grid.iterateArea({ x: thisX, y: thisY }, tile => tile.color === color, (_, x, y) => {
73
+ connected[y][x] = true;
74
+ });
75
+ }
76
+ else {
77
+ return State.Incomplete;
78
+ }
79
+ for (const symbol of grid.symbols.get(this.id) ?? []) {
80
+ if (symbol instanceof EveryLetterSymbol) {
81
+ const symbolX = Math.floor(symbol.x);
82
+ const symbolY = Math.floor(symbol.y);
83
+ if (visited[symbolY][symbolX]) {
84
+ possibleLetters.delete(symbol.letter);
85
+ }
86
+ if (connected[symbolY][symbolX]) {
87
+ if (!uniqueLetters.delete(symbol.letter)) {
88
+ return State.Error;
89
+ }
90
+ }
91
+ }
92
+ }
93
+ if (possibleLetters.size > 0) {
94
+ return State.Error;
95
+ }
96
+ return complete ? State.Satisfied : State.Incomplete;
97
+ }
98
+ copyWith({ x, y, letter, }) {
99
+ return new EveryLetterSymbol(x ?? this.x, y ?? this.y, letter ?? this.letter);
100
+ }
101
+ withLetter(letter) {
102
+ return this.copyWith({ letter });
103
+ }
104
+ }
105
+ Object.defineProperty(EveryLetterSymbol, "CONFIGS", {
106
+ enumerable: true,
107
+ configurable: true,
108
+ writable: true,
109
+ value: Object.freeze([
110
+ {
111
+ type: ConfigType.Number,
112
+ default: 0,
113
+ field: 'x',
114
+ description: 'X',
115
+ configurable: false,
116
+ },
117
+ {
118
+ type: ConfigType.Number,
119
+ default: 0,
120
+ field: 'y',
121
+ description: 'Y',
122
+ configurable: false,
123
+ },
124
+ {
125
+ type: ConfigType.String,
126
+ default: 'a',
127
+ field: 'letter',
128
+ description: 'Letter',
129
+ explanation: 'Use single lowercase letters by convention.',
130
+ configurable: true,
131
+ },
132
+ ])
133
+ });
134
+ Object.defineProperty(EveryLetterSymbol, "EXAMPLE_GRID", {
135
+ enumerable: true,
136
+ configurable: true,
137
+ writable: true,
138
+ value: Object.freeze(GridData.create(['bwwbw', 'bwbbw', 'wwbww', 'bbbwb'])
139
+ .addSymbol(new EveryLetterSymbol(2, 0, 'b'))
140
+ .addSymbol(new EveryLetterSymbol(4, 1, 'a'))
141
+ .addSymbol(new EveryLetterSymbol(0, 2, 'a'))
142
+ .addSymbol(new EveryLetterSymbol(3, 2, 'b')))
143
+ });
144
+ export default EveryLetterSymbol;
145
+ export const instance = new EveryLetterSymbol(0, 0, 'a');
@@ -2,6 +2,7 @@ export { instance as AreaNumberSymbol } from './areaNumberSymbol.js';
2
2
  export { instance as CustomIconSymbol } from './customIconSymbol.js';
3
3
  export { instance as CustomTextSymbol } from './customTextSymbol.js';
4
4
  export { instance as DartSymbol } from './dartSymbol.js';
5
+ export { instance as EveryLetterSymbol } from './everyLetterSymbol.js';
5
6
  export { instance as FocusSymbol } from './focusSymbol.js';
6
7
  export { instance as GalaxySymbol } from './galaxySymbol.js';
7
8
  export { instance as HiddenSymbol } from './hiddenSymbol.js';
@@ -6,6 +6,7 @@ export { instance as AreaNumberSymbol } from './areaNumberSymbol.js';
6
6
  export { instance as CustomIconSymbol } from './customIconSymbol.js';
7
7
  export { instance as CustomTextSymbol } from './customTextSymbol.js';
8
8
  export { instance as DartSymbol } from './dartSymbol.js';
9
+ export { instance as EveryLetterSymbol } from './everyLetterSymbol.js';
9
10
  export { instance as FocusSymbol } from './focusSymbol.js';
10
11
  export { instance as GalaxySymbol } from './galaxySymbol.js';
11
12
  export { instance as HiddenSymbol } from './hiddenSymbol.js';
package/dist/index.d.ts CHANGED
@@ -100,6 +100,7 @@ import CustomSymbol from './data/symbols/customSymbol.js';
100
100
  import CustomTextSymbol from './data/symbols/customTextSymbol.js';
101
101
  import DartSymbol from './data/symbols/dartSymbol.js';
102
102
  import DirectionLinkerSymbol from './data/symbols/directionLinkerSymbol.js';
103
+ import EveryLetterSymbol from './data/symbols/everyLetterSymbol.js';
103
104
  import FocusSymbol from './data/symbols/focusSymbol.js';
104
105
  import GalaxySymbol from './data/symbols/galaxySymbol.js';
105
106
  import HiddenSymbol from './data/symbols/hiddenSymbol.js';
@@ -116,4 +117,4 @@ import TileData from './data/tile.js';
116
117
  import TileConnections from './data/tileConnections.js';
117
118
  import validateGrid, { aggregateState, applyFinalOverrides } from './data/validate.js';
118
119
  import { GridValidator } from './data/validateAsync.js';
119
- export { ConfigType, configEquals, Configurable, CachedAccess, allEqual, array, directionToRotation, escape, isSameEdge, maxBy, minBy, move, orientationToRotation, resize, unescape, isEventHandler, handlesFinalValidation, handlesGetTile, handlesGridChange, handlesGridResize, handlesSetGrid, invokeSetGrid, handlesSymbolDisplay, handlesSymbolMerge, handlesSymbolValidation, GridData, NEIGHBOR_OFFSETS, GridConnections, GridZones, Instruction, COMPARISONS, Color, Comparison, DIRECTIONS, DRUM_SAMPLES, Direction, INSTRUMENTS, Instrument, MajorRule, Mode, ORIENTATIONS, Orientation, PuzzleType, State, WRAPPINGS, Wrapping, directionToggle, isDrumSample, orientationToggle, MetadataSchema, PuzzleSchema, getPuzzleTypes, puzzleEquals, validatePuzzleChecklist, BanPatternRule, CellCountPerZoneRule, CellCountRule, CompletePatternRule, ConnectAllRule, ConnectZonesRule, ContainsShapeRule, CustomRule, DifferentCountPerZoneRule, ExactCountPerZoneRule, ForesightRule, allRules, LyingSymbolRule, ControlLine, Row, MusicGridRule, MysteryRule, OffByXRule, PerfectionRule, RegionAreaRule, RegionShapeRule, Rule, SameCountPerZoneRule, SameShapeRule, SymbolsPerRegionRule, UndercluedRule, UniqueShapeRule, WrapAroundRule, Serializer, Compressor, ChecksumCompressor, CompressorBase, DeflateCompressor, GzipCompressor, StreamCompressor, SerializerBase, SerializerChecksum, SerializerV0, OFFSETS, orientationChars, 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, HouseSymbol, allSymbols, LetterSymbol, LotusSymbol, MinesweeperSymbol, MyopiaSymbol, NumberSymbol, Symbol, ViewpointSymbol, TileData, TileConnections, validateGrid, aggregateState, applyFinalOverrides, GridValidator, };
120
+ export { ConfigType, configEquals, Configurable, CachedAccess, allEqual, array, directionToRotation, escape, isSameEdge, maxBy, minBy, move, orientationToRotation, resize, unescape, isEventHandler, handlesFinalValidation, handlesGetTile, handlesGridChange, handlesGridResize, handlesSetGrid, invokeSetGrid, handlesSymbolDisplay, handlesSymbolMerge, handlesSymbolValidation, GridData, NEIGHBOR_OFFSETS, GridConnections, GridZones, Instruction, COMPARISONS, Color, Comparison, DIRECTIONS, DRUM_SAMPLES, Direction, INSTRUMENTS, Instrument, MajorRule, Mode, ORIENTATIONS, Orientation, PuzzleType, State, WRAPPINGS, Wrapping, directionToggle, isDrumSample, orientationToggle, MetadataSchema, PuzzleSchema, getPuzzleTypes, puzzleEquals, validatePuzzleChecklist, BanPatternRule, CellCountPerZoneRule, CellCountRule, CompletePatternRule, ConnectAllRule, ConnectZonesRule, ContainsShapeRule, CustomRule, DifferentCountPerZoneRule, ExactCountPerZoneRule, ForesightRule, allRules, LyingSymbolRule, ControlLine, Row, MusicGridRule, MysteryRule, OffByXRule, PerfectionRule, RegionAreaRule, RegionShapeRule, Rule, SameCountPerZoneRule, SameShapeRule, SymbolsPerRegionRule, UndercluedRule, UniqueShapeRule, WrapAroundRule, Serializer, Compressor, ChecksumCompressor, CompressorBase, DeflateCompressor, GzipCompressor, StreamCompressor, SerializerBase, SerializerChecksum, SerializerV0, OFFSETS, orientationChars, 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, EveryLetterSymbol, FocusSymbol, GalaxySymbol, HiddenSymbol, HouseSymbol, allSymbols, LetterSymbol, LotusSymbol, MinesweeperSymbol, MyopiaSymbol, NumberSymbol, Symbol, ViewpointSymbol, TileData, TileConnections, validateGrid, aggregateState, applyFinalOverrides, GridValidator, };
package/dist/index.js CHANGED
@@ -103,6 +103,7 @@ import CustomSymbol from './data/symbols/customSymbol.js';
103
103
  import CustomTextSymbol from './data/symbols/customTextSymbol.js';
104
104
  import DartSymbol from './data/symbols/dartSymbol.js';
105
105
  import DirectionLinkerSymbol from './data/symbols/directionLinkerSymbol.js';
106
+ import EveryLetterSymbol from './data/symbols/everyLetterSymbol.js';
106
107
  import FocusSymbol from './data/symbols/focusSymbol.js';
107
108
  import GalaxySymbol from './data/symbols/galaxySymbol.js';
108
109
  import HiddenSymbol from './data/symbols/hiddenSymbol.js';
@@ -119,4 +120,4 @@ import TileData from './data/tile.js';
119
120
  import TileConnections from './data/tileConnections.js';
120
121
  import validateGrid, { aggregateState, applyFinalOverrides } from './data/validate.js';
121
122
  import { GridValidator } from './data/validateAsync.js';
122
- export { ConfigType, configEquals, Configurable, CachedAccess, allEqual, array, directionToRotation, escape, isSameEdge, maxBy, minBy, move, orientationToRotation, resize, unescape, isEventHandler, handlesFinalValidation, handlesGetTile, handlesGridChange, handlesGridResize, handlesSetGrid, invokeSetGrid, handlesSymbolDisplay, handlesSymbolMerge, handlesSymbolValidation, GridData, NEIGHBOR_OFFSETS, GridConnections, GridZones, Instruction, COMPARISONS, Color, Comparison, DIRECTIONS, DRUM_SAMPLES, Direction, INSTRUMENTS, Instrument, MajorRule, Mode, ORIENTATIONS, Orientation, PuzzleType, State, WRAPPINGS, Wrapping, directionToggle, isDrumSample, orientationToggle, MetadataSchema, PuzzleSchema, getPuzzleTypes, puzzleEquals, validatePuzzleChecklist, BanPatternRule, CellCountPerZoneRule, CellCountRule, CompletePatternRule, ConnectAllRule, ConnectZonesRule, ContainsShapeRule, CustomRule, DifferentCountPerZoneRule, ExactCountPerZoneRule, ForesightRule, allRules, LyingSymbolRule, ControlLine, Row, MusicGridRule, MysteryRule, OffByXRule, PerfectionRule, RegionAreaRule, RegionShapeRule, Rule, SameCountPerZoneRule, SameShapeRule, SymbolsPerRegionRule, UndercluedRule, UniqueShapeRule, WrapAroundRule, Serializer, Compressor, ChecksumCompressor, CompressorBase, DeflateCompressor, GzipCompressor, StreamCompressor, SerializerBase, SerializerChecksum, SerializerV0, OFFSETS, orientationChars, 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, HouseSymbol, allSymbols, LetterSymbol, LotusSymbol, MinesweeperSymbol, MyopiaSymbol, NumberSymbol, Symbol, ViewpointSymbol, TileData, TileConnections, validateGrid, aggregateState, applyFinalOverrides, GridValidator, };
123
+ export { ConfigType, configEquals, Configurable, CachedAccess, allEqual, array, directionToRotation, escape, isSameEdge, maxBy, minBy, move, orientationToRotation, resize, unescape, isEventHandler, handlesFinalValidation, handlesGetTile, handlesGridChange, handlesGridResize, handlesSetGrid, invokeSetGrid, handlesSymbolDisplay, handlesSymbolMerge, handlesSymbolValidation, GridData, NEIGHBOR_OFFSETS, GridConnections, GridZones, Instruction, COMPARISONS, Color, Comparison, DIRECTIONS, DRUM_SAMPLES, Direction, INSTRUMENTS, Instrument, MajorRule, Mode, ORIENTATIONS, Orientation, PuzzleType, State, WRAPPINGS, Wrapping, directionToggle, isDrumSample, orientationToggle, MetadataSchema, PuzzleSchema, getPuzzleTypes, puzzleEquals, validatePuzzleChecklist, BanPatternRule, CellCountPerZoneRule, CellCountRule, CompletePatternRule, ConnectAllRule, ConnectZonesRule, ContainsShapeRule, CustomRule, DifferentCountPerZoneRule, ExactCountPerZoneRule, ForesightRule, allRules, LyingSymbolRule, ControlLine, Row, MusicGridRule, MysteryRule, OffByXRule, PerfectionRule, RegionAreaRule, RegionShapeRule, Rule, SameCountPerZoneRule, SameShapeRule, SymbolsPerRegionRule, UndercluedRule, UniqueShapeRule, WrapAroundRule, Serializer, Compressor, ChecksumCompressor, CompressorBase, DeflateCompressor, GzipCompressor, StreamCompressor, SerializerBase, SerializerChecksum, SerializerV0, OFFSETS, orientationChars, 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, EveryLetterSymbol, FocusSymbol, GalaxySymbol, HiddenSymbol, HouseSymbol, allSymbols, LetterSymbol, LotusSymbol, MinesweeperSymbol, MyopiaSymbol, NumberSymbol, Symbol, ViewpointSymbol, TileData, TileConnections, validateGrid, aggregateState, applyFinalOverrides, GridValidator, };
package/package.json CHANGED
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "name": "@logic-pad/core",
3
- "version": "0.23.1",
3
+ "version": "0.24.0",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist",
7
7
  "assets"
8
8
  ],
9
- "homepage": "https://github.com/hlysine/logic-pad",
9
+ "homepage": "https://github.com/logic-pad/logic-pad",
10
10
  "repository": {
11
11
  "type": "git",
12
- "url": "https://github.com/hlysine/logic-pad.git"
12
+ "url": "https://github.com/logic-pad/logic-pad.git"
13
13
  },
14
14
  "keywords": [
15
15
  "logic",
@@ -42,13 +42,13 @@
42
42
  },
43
43
  "scripts": {
44
44
  "build": "rimraf dist/ && bun run codegen && bunx --bun tsc && bun run typegen",
45
- "lint": "cd ../../ && eslint ./packages/logic-core --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
46
45
  "codegen": "bun ./scripts/genImports.ts && bun ./scripts/genEntry.ts",
47
46
  "typegen": "bun ./scripts/genTypes.ts",
48
47
  "prepublishOnly": "bun run build"
49
48
  },
50
49
  "engines": {
51
- "bun": ">=1.1.0"
50
+ "bun": ">=1.1.0",
51
+ "node": ">=23.11.0"
52
52
  },
53
53
  "dependencies": {
54
54
  "compression-streams-polyfill": "^0.1.7",