@scm-js/core 0.10.0 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +3 -1
- package/dist/index.mjs +4 -3
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @scm-js/core 0.
|
|
2
|
+
* @scm-js/core 0.11.0 — StarCraft maps as the scmJS editor reads and writes them.
|
|
3
3
|
* Generated by `npm run build:core` in github.com/scm-js/scm-js from core/src/index.ts; the guide is docs/core.md.
|
|
4
4
|
*/
|
|
5
5
|
import { Archive, HashEntry, StoredMember } from 'mopaq';
|
|
@@ -72,6 +72,8 @@ export interface TextEncodingInfo {
|
|
|
72
72
|
}
|
|
73
73
|
export declare const TEXT_ENCODINGS: readonly TextEncodingInfo[];
|
|
74
74
|
export declare const DEFAULT_TEXT_ENCODING: TextEncoding;
|
|
75
|
+
/** Bytes to text; a sequence the encoding does not define becomes U+FFFD rather than failing. */
|
|
76
|
+
export declare function decodeText(bytes: Uint8Array, encoding: TextEncoding): string;
|
|
75
77
|
/**
|
|
76
78
|
* STR/STRx string table.
|
|
77
79
|
*
|
package/dist/index.mjs
CHANGED
|
@@ -12575,8 +12575,9 @@ function rebuildIsomFromTiles(scn, tileset) {
|
|
|
12575
12575
|
/**
|
|
12576
12576
|
* Resize / crop the map in place.
|
|
12577
12577
|
*
|
|
12578
|
-
*
|
|
12579
|
-
* (`
|
|
12578
|
+
* A whole-map change: the caller (`resizeDocumentAtom`) records the map as it was as one
|
|
12579
|
+
* undo step (`WholeState`), so nothing here may write into the arrays it replaces — every
|
|
12580
|
+
* grid and list is built new. Existing content keeps its position relative
|
|
12580
12581
|
* to the chosen anchor: the offset `dx` is kept *even* so StarEdit's left/right tile
|
|
12581
12582
|
* pairs stay on their columns. Terrain outside the new bounds is cropped; units, sprites
|
|
12582
12583
|
* and doodads whose position falls outside are dropped (a doodad's tiles are already part
|
|
@@ -13249,4 +13250,4 @@ function canonicalSpec(source) {
|
|
|
13249
13250
|
return source.kind === "builtin" ? `builtin:${source.name}` : source.display;
|
|
13250
13251
|
}
|
|
13251
13252
|
//#endregion
|
|
13252
|
-
export { ACTION_DEFS, AI_SCRIPT_NAMES, ANYWHERE_NAME, ActionType, BRIEFING_ACTION_DEFS, BUILD_MANIFEST_MEMBER, BUILD_SOURCE_MEMBER, CHOICES, CONDITION_DEFS, ColorMode, Comparison, ConditionType, DEFAULT_DOODAD_PLACEMENT, DEFAULT_GAS, DEFAULT_MINERALS, DEFAULT_PLACEMENT, DEFAULT_SAVE_OPTIONS, DEFAULT_START_PLACEMENT, DEFAULT_TEXT_ENCODING, DIRT, FIND_KINDS, FORCE_SLOTS, ForceFlag, MAP_SIZES, MAP_VERSIONS, MEGATILE_PX, MINERAL_FIELD_IDS, MODELLED_SECTIONS, MapLoadError, PLAYER_COLORS, PLAYER_RACES, PLAYER_SLOTS, PLAYER_TYPES, PLUGIN_API_VERSION, PlayerGroup, PlayerRace, PlayerType, REQUIRED_SECTIONS, ResourceType, SAVE_PRESETS, SCENARIO_PATH, START_LOCATION, STRX_CAPACITY, SetModifier, SwitchAction, SwitchState, TECH_NAMES, TEXT_CODES, TEXT_ENCODINGS, TILESETS, TILESET_BY_ID, TRIGGER_OWNERS, TileFlag, TriggerTextError, UNIT_LIMIT, UNIT_NAMES, UNIT_TYPE_COUNT, UPGRADE_NAMES, UnitClass, VESPENE_GEYSER, actionDef, actionDefByName, addLocation, addUnits, aiScriptByName, aiScriptName, applyBriefing, applyChanges, applyDoodadChanges, applyForceSettings, applyLocationChanges, applyPlayerSettings, applyStringImport, applyStrings, applyTechSettings, applyTriggers, applyUnitChanges, applyUnitSettings, applyUpgradeSettings, baseTerrain, buildChk, buildDoodadCatalogue, buildMapFile, changeMapVersion, changeTextEncoding, checkDoodadPlacement, checkIsom, choiceLabel, choiceValue, conditionDef, conditionDefByName, createScenario, decodeTrg, decodeUnitsDat, defaultSaveOptions, deleteUnused, diamondAt, displayColorHex, drawMegatile, editLocation, encodeTrg, escapeStringText, extraKind, findInScenario, fingerprintTrigger, flatTerrain, forceName, formatBytes, formatOf, formatStringTable, formatTrigger, formatTriggers, groupBuildable, hasIsom, idealStarts, internString, isExpansion, isPreserved, isRemasteredRevision, isResource, isomTables, issueCounts, keptExtras, loadMap, loadTileset, locationCapacity, locationName, looksLikeMpq, makeUnit, mapStatistics, mapVersionOf, markDirty, megatileForTile, megatileHeight, mirroredOwner, moveLocations, moveUnits, newAction, newCondition, newTrigger, nextSerial, openMapBytes, packBuiltMap, paintIsom, paintIsomDiamonds, parseChk, parseScenario, parseStringTable, parseTriggers, parseWavHeader, placeDoodad, placeStartLocations, placedLocations, plainText, planSave, playableCount, playerColorHex, playerRaceLabel, playerTypeLabel, readArchive, readBriefing, readBuildManifest, readExtras, readForceSettings, readMembers, readPlayerSettings, readStrings, readSwitchNames, readTechSettings, readTriggerFile, readTriggers, readUnitSettings, readUpgradeSettings, removeLocations, removeUnits, requiredSections, resizeScenario, resolveIcon, restoreBuiltMap, runsOf, sameTriggers, scenarioDescription, scenarioName, serializeChk, serializeScenario, setExtendedStrings, setMapVersion, setPreserved, setScenarioDescription, setScenarioName, setTextEncoding, soundList, statisticsText, stringCapacity, stringUsages, summarizeTrigger, symmetryImages, techName, techRestrictionSections, techSettingsSections, textCode, tilesetIndex, triggerComment, triggerFormatOf, triggerNames, triggerUsage, triggersFromText, triggersToText, unescapeStringText, unitAt, unitCustomName, unitGeometry, unitName, unitSettingsSections, unitsInBox, unusedStrings, updateUnits, upgradeName, upgradeRestrictionSections, upgradeSettingsSections, usedLocations, validateManifest, validateScenario, wavDuration, wavFormatLabel, writeArchiveBytes, writeMapBytes };
|
|
13253
|
+
export { ACTION_DEFS, AI_SCRIPT_NAMES, ANYWHERE_NAME, ActionType, BRIEFING_ACTION_DEFS, BUILD_MANIFEST_MEMBER, BUILD_SOURCE_MEMBER, CHOICES, CONDITION_DEFS, ColorMode, Comparison, ConditionType, DEFAULT_DOODAD_PLACEMENT, DEFAULT_GAS, DEFAULT_MINERALS, DEFAULT_PLACEMENT, DEFAULT_SAVE_OPTIONS, DEFAULT_START_PLACEMENT, DEFAULT_TEXT_ENCODING, DIRT, FIND_KINDS, FORCE_SLOTS, ForceFlag, MAP_SIZES, MAP_VERSIONS, MEGATILE_PX, MINERAL_FIELD_IDS, MODELLED_SECTIONS, MapLoadError, PLAYER_COLORS, PLAYER_RACES, PLAYER_SLOTS, PLAYER_TYPES, PLUGIN_API_VERSION, PlayerGroup, PlayerRace, PlayerType, REQUIRED_SECTIONS, ResourceType, SAVE_PRESETS, SCENARIO_PATH, START_LOCATION, STRX_CAPACITY, SetModifier, SwitchAction, SwitchState, TECH_NAMES, TEXT_CODES, TEXT_ENCODINGS, TILESETS, TILESET_BY_ID, TRIGGER_OWNERS, TileFlag, TriggerTextError, UNIT_LIMIT, UNIT_NAMES, UNIT_TYPE_COUNT, UPGRADE_NAMES, UnitClass, VESPENE_GEYSER, actionDef, actionDefByName, addLocation, addUnits, aiScriptByName, aiScriptName, applyBriefing, applyChanges, applyDoodadChanges, applyForceSettings, applyLocationChanges, applyPlayerSettings, applyStringImport, applyStrings, applyTechSettings, applyTriggers, applyUnitChanges, applyUnitSettings, applyUpgradeSettings, baseTerrain, buildChk, buildDoodadCatalogue, buildMapFile, changeMapVersion, changeTextEncoding, checkDoodadPlacement, checkIsom, choiceLabel, choiceValue, conditionDef, conditionDefByName, createScenario, decodeText, decodeTrg, decodeUnitsDat, defaultSaveOptions, deleteUnused, diamondAt, displayColorHex, drawMegatile, editLocation, encodeTrg, escapeStringText, extraKind, findInScenario, fingerprintTrigger, flatTerrain, forceName, formatBytes, formatOf, formatStringTable, formatTrigger, formatTriggers, groupBuildable, hasIsom, idealStarts, internString, isExpansion, isPreserved, isRemasteredRevision, isResource, isomTables, issueCounts, keptExtras, loadMap, loadTileset, locationCapacity, locationName, looksLikeMpq, makeUnit, mapStatistics, mapVersionOf, markDirty, megatileForTile, megatileHeight, mirroredOwner, moveLocations, moveUnits, newAction, newCondition, newTrigger, nextSerial, openMapBytes, packBuiltMap, paintIsom, paintIsomDiamonds, parseChk, parseScenario, parseStringTable, parseTriggers, parseWavHeader, placeDoodad, placeStartLocations, placedLocations, plainText, planSave, playableCount, playerColorHex, playerRaceLabel, playerTypeLabel, readArchive, readBriefing, readBuildManifest, readExtras, readForceSettings, readMembers, readPlayerSettings, readStrings, readSwitchNames, readTechSettings, readTriggerFile, readTriggers, readUnitSettings, readUpgradeSettings, removeLocations, removeUnits, requiredSections, resizeScenario, resolveIcon, restoreBuiltMap, runsOf, sameTriggers, scenarioDescription, scenarioName, serializeChk, serializeScenario, setExtendedStrings, setMapVersion, setPreserved, setScenarioDescription, setScenarioName, setTextEncoding, soundList, statisticsText, stringCapacity, stringUsages, summarizeTrigger, symmetryImages, techName, techRestrictionSections, techSettingsSections, textCode, tilesetIndex, triggerComment, triggerFormatOf, triggerNames, triggerUsage, triggersFromText, triggersToText, unescapeStringText, unitAt, unitCustomName, unitGeometry, unitName, unitSettingsSections, unitsInBox, unusedStrings, updateUnits, upgradeName, upgradeRestrictionSections, upgradeSettingsSections, usedLocations, validateManifest, validateScenario, wavDuration, wavFormatLabel, writeArchiveBytes, writeMapBytes };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scm-js/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"description": "StarCraft: Brood War maps in Node.js and the browser, as the scmJS editor reads and writes them: open .scm/.scx/.chk, triggers, strings, units, locations, settings, Check Map, and write the map back",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"starcraft",
|