@sharpee/lang-en-us 0.9.65-beta → 0.9.66-beta
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/package.json +6 -17
- package/dist-npm/actions/about.d.ts +0 -35
- package/dist-npm/actions/about.d.ts.map +0 -1
- package/dist-npm/actions/about.js +0 -50
- package/dist-npm/actions/about.js.map +0 -1
- package/dist-npm/actions/again.d.ts +0 -16
- package/dist-npm/actions/again.d.ts.map +0 -1
- package/dist-npm/actions/again.js +0 -23
- package/dist-npm/actions/again.js.map +0 -1
- package/dist-npm/actions/answering.d.ts +0 -29
- package/dist-npm/actions/answering.d.ts.map +0 -1
- package/dist-npm/actions/answering.js +0 -44
- package/dist-npm/actions/answering.js.map +0 -1
- package/dist-npm/actions/asking.d.ts +0 -31
- package/dist-npm/actions/asking.d.ts.map +0 -1
- package/dist-npm/actions/asking.js +0 -44
- package/dist-npm/actions/asking.js.map +0 -1
- package/dist-npm/actions/attacking.d.ts +0 -82
- package/dist-npm/actions/attacking.d.ts.map +0 -1
- package/dist-npm/actions/attacking.js +0 -111
- package/dist-npm/actions/attacking.js.map +0 -1
- package/dist-npm/actions/climbing.d.ts +0 -27
- package/dist-npm/actions/climbing.d.ts.map +0 -1
- package/dist-npm/actions/climbing.js +0 -48
- package/dist-npm/actions/climbing.js.map +0 -1
- package/dist-npm/actions/closing.d.ts +0 -21
- package/dist-npm/actions/closing.d.ts.map +0 -1
- package/dist-npm/actions/closing.js +0 -27
- package/dist-npm/actions/closing.js.map +0 -1
- package/dist-npm/actions/drinking.d.ts +0 -40
- package/dist-npm/actions/drinking.d.ts.map +0 -1
- package/dist-npm/actions/drinking.js +0 -57
- package/dist-npm/actions/drinking.js.map +0 -1
- package/dist-npm/actions/dropping.d.ts +0 -22
- package/dist-npm/actions/dropping.d.ts.map +0 -1
- package/dist-npm/actions/dropping.js +0 -31
- package/dist-npm/actions/dropping.js.map +0 -1
- package/dist-npm/actions/eating.d.ts +0 -37
- package/dist-npm/actions/eating.d.ts.map +0 -1
- package/dist-npm/actions/eating.js +0 -54
- package/dist-npm/actions/eating.js.map +0 -1
- package/dist-npm/actions/entering.d.ts +0 -26
- package/dist-npm/actions/entering.d.ts.map +0 -1
- package/dist-npm/actions/entering.js +0 -49
- package/dist-npm/actions/entering.js.map +0 -1
- package/dist-npm/actions/examining.d.ts +0 -37
- package/dist-npm/actions/examining.d.ts.map +0 -1
- package/dist-npm/actions/examining.js +0 -50
- package/dist-npm/actions/examining.js.map +0 -1
- package/dist-npm/actions/exiting.d.ts +0 -23
- package/dist-npm/actions/exiting.d.ts.map +0 -1
- package/dist-npm/actions/exiting.js +0 -40
- package/dist-npm/actions/exiting.js.map +0 -1
- package/dist-npm/actions/giving.d.ts +0 -30
- package/dist-npm/actions/giving.d.ts.map +0 -1
- package/dist-npm/actions/giving.js +0 -45
- package/dist-npm/actions/giving.js.map +0 -1
- package/dist-npm/actions/going.d.ts +0 -35
- package/dist-npm/actions/going.d.ts.map +0 -1
- package/dist-npm/actions/going.js +0 -45
- package/dist-npm/actions/going.js.map +0 -1
- package/dist-npm/actions/help.d.ts +0 -26
- package/dist-npm/actions/help.d.ts.map +0 -1
- package/dist-npm/actions/help.js +0 -44
- package/dist-npm/actions/help.js.map +0 -1
- package/dist-npm/actions/index.d.ts +0 -1327
- package/dist-npm/actions/index.d.ts.map +0 -1
- package/dist-npm/actions/index.js +0 -208
- package/dist-npm/actions/index.js.map +0 -1
- package/dist-npm/actions/inserting.d.ts +0 -25
- package/dist-npm/actions/inserting.d.ts.map +0 -1
- package/dist-npm/actions/inserting.js +0 -33
- package/dist-npm/actions/inserting.js.map +0 -1
- package/dist-npm/actions/inventory.d.ts +0 -32
- package/dist-npm/actions/inventory.d.ts.map +0 -1
- package/dist-npm/actions/inventory.js +0 -41
- package/dist-npm/actions/inventory.js.map +0 -1
- package/dist-npm/actions/listening.d.ts +0 -26
- package/dist-npm/actions/listening.d.ts.map +0 -1
- package/dist-npm/actions/listening.js +0 -37
- package/dist-npm/actions/listening.js.map +0 -1
- package/dist-npm/actions/locking.d.ts +0 -25
- package/dist-npm/actions/locking.d.ts.map +0 -1
- package/dist-npm/actions/locking.js +0 -33
- package/dist-npm/actions/locking.js.map +0 -1
- package/dist-npm/actions/looking.d.ts +0 -23
- package/dist-npm/actions/looking.d.ts.map +0 -1
- package/dist-npm/actions/looking.js +0 -34
- package/dist-npm/actions/looking.js.map +0 -1
- package/dist-npm/actions/lowering.d.ts +0 -22
- package/dist-npm/actions/lowering.d.ts.map +0 -1
- package/dist-npm/actions/lowering.js +0 -29
- package/dist-npm/actions/lowering.js.map +0 -1
- package/dist-npm/actions/opening.d.ts +0 -23
- package/dist-npm/actions/opening.d.ts.map +0 -1
- package/dist-npm/actions/opening.js +0 -30
- package/dist-npm/actions/opening.js.map +0 -1
- package/dist-npm/actions/pulling.d.ts +0 -35
- package/dist-npm/actions/pulling.d.ts.map +0 -1
- package/dist-npm/actions/pulling.js +0 -53
- package/dist-npm/actions/pulling.js.map +0 -1
- package/dist-npm/actions/pushing.d.ts +0 -30
- package/dist-npm/actions/pushing.d.ts.map +0 -1
- package/dist-npm/actions/pushing.js +0 -45
- package/dist-npm/actions/pushing.js.map +0 -1
- package/dist-npm/actions/putting.d.ts +0 -28
- package/dist-npm/actions/putting.d.ts.map +0 -1
- package/dist-npm/actions/putting.js +0 -40
- package/dist-npm/actions/putting.js.map +0 -1
- package/dist-npm/actions/quitting.d.ts +0 -31
- package/dist-npm/actions/quitting.d.ts.map +0 -1
- package/dist-npm/actions/quitting.js +0 -47
- package/dist-npm/actions/quitting.js.map +0 -1
- package/dist-npm/actions/raising.d.ts +0 -22
- package/dist-npm/actions/raising.d.ts.map +0 -1
- package/dist-npm/actions/raising.js +0 -30
- package/dist-npm/actions/raising.js.map +0 -1
- package/dist-npm/actions/reading.d.ts +0 -23
- package/dist-npm/actions/reading.d.ts.map +0 -1
- package/dist-npm/actions/reading.js +0 -32
- package/dist-npm/actions/reading.js.map +0 -1
- package/dist-npm/actions/removing.d.ts +0 -25
- package/dist-npm/actions/removing.d.ts.map +0 -1
- package/dist-npm/actions/removing.js +0 -34
- package/dist-npm/actions/removing.js.map +0 -1
- package/dist-npm/actions/restoring.d.ts +0 -35
- package/dist-npm/actions/restoring.d.ts.map +0 -1
- package/dist-npm/actions/restoring.js +0 -51
- package/dist-npm/actions/restoring.js.map +0 -1
- package/dist-npm/actions/saving.d.ts +0 -33
- package/dist-npm/actions/saving.d.ts.map +0 -1
- package/dist-npm/actions/saving.js +0 -48
- package/dist-npm/actions/saving.js.map +0 -1
- package/dist-npm/actions/scoring.d.ts +0 -42
- package/dist-npm/actions/scoring.d.ts.map +0 -1
- package/dist-npm/actions/scoring.js +0 -70
- package/dist-npm/actions/scoring.js.map +0 -1
- package/dist-npm/actions/searching.d.ts +0 -26
- package/dist-npm/actions/searching.d.ts.map +0 -1
- package/dist-npm/actions/searching.js +0 -40
- package/dist-npm/actions/searching.js.map +0 -1
- package/dist-npm/actions/showing.d.ts +0 -29
- package/dist-npm/actions/showing.d.ts.map +0 -1
- package/dist-npm/actions/showing.js +0 -40
- package/dist-npm/actions/showing.js.map +0 -1
- package/dist-npm/actions/sleeping.d.ts +0 -28
- package/dist-npm/actions/sleeping.d.ts.map +0 -1
- package/dist-npm/actions/sleeping.js +0 -41
- package/dist-npm/actions/sleeping.js.map +0 -1
- package/dist-npm/actions/smelling.d.ts +0 -30
- package/dist-npm/actions/smelling.d.ts.map +0 -1
- package/dist-npm/actions/smelling.js +0 -43
- package/dist-npm/actions/smelling.js.map +0 -1
- package/dist-npm/actions/switching-off.d.ts +0 -28
- package/dist-npm/actions/switching-off.d.ts.map +0 -1
- package/dist-npm/actions/switching-off.js +0 -42
- package/dist-npm/actions/switching-off.js.map +0 -1
- package/dist-npm/actions/switching-on.d.ts +0 -28
- package/dist-npm/actions/switching-on.d.ts.map +0 -1
- package/dist-npm/actions/switching-on.js +0 -42
- package/dist-npm/actions/switching-on.js.map +0 -1
- package/dist-npm/actions/taking-off.d.ts +0 -20
- package/dist-npm/actions/taking-off.d.ts.map +0 -1
- package/dist-npm/actions/taking-off.js +0 -28
- package/dist-npm/actions/taking-off.js.map +0 -1
- package/dist-npm/actions/taking.d.ts +0 -26
- package/dist-npm/actions/taking.d.ts.map +0 -1
- package/dist-npm/actions/taking.js +0 -36
- package/dist-npm/actions/taking.js.map +0 -1
- package/dist-npm/actions/talking.d.ts +0 -33
- package/dist-npm/actions/talking.d.ts.map +0 -1
- package/dist-npm/actions/talking.js +0 -49
- package/dist-npm/actions/talking.js.map +0 -1
- package/dist-npm/actions/telling.d.ts +0 -30
- package/dist-npm/actions/telling.d.ts.map +0 -1
- package/dist-npm/actions/telling.js +0 -42
- package/dist-npm/actions/telling.js.map +0 -1
- package/dist-npm/actions/throwing.d.ts +0 -39
- package/dist-npm/actions/throwing.d.ts.map +0 -1
- package/dist-npm/actions/throwing.js +0 -60
- package/dist-npm/actions/throwing.js.map +0 -1
- package/dist-npm/actions/touching.d.ts +0 -36
- package/dist-npm/actions/touching.d.ts.map +0 -1
- package/dist-npm/actions/touching.js +0 -50
- package/dist-npm/actions/touching.js.map +0 -1
- package/dist-npm/actions/turning.d.ts +0 -40
- package/dist-npm/actions/turning.d.ts.map +0 -1
- package/dist-npm/actions/turning.js +0 -62
- package/dist-npm/actions/turning.js.map +0 -1
- package/dist-npm/actions/undoing.d.ts +0 -19
- package/dist-npm/actions/undoing.d.ts.map +0 -1
- package/dist-npm/actions/undoing.js +0 -26
- package/dist-npm/actions/undoing.js.map +0 -1
- package/dist-npm/actions/unlocking.d.ts +0 -25
- package/dist-npm/actions/unlocking.d.ts.map +0 -1
- package/dist-npm/actions/unlocking.js +0 -32
- package/dist-npm/actions/unlocking.js.map +0 -1
- package/dist-npm/actions/using.d.ts +0 -43
- package/dist-npm/actions/using.d.ts.map +0 -1
- package/dist-npm/actions/using.js +0 -61
- package/dist-npm/actions/using.js.map +0 -1
- package/dist-npm/actions/version.d.ts +0 -18
- package/dist-npm/actions/version.d.ts.map +0 -1
- package/dist-npm/actions/version.js +0 -26
- package/dist-npm/actions/version.js.map +0 -1
- package/dist-npm/actions/waiting.d.ts +0 -27
- package/dist-npm/actions/waiting.d.ts.map +0 -1
- package/dist-npm/actions/waiting.js +0 -36
- package/dist-npm/actions/waiting.js.map +0 -1
- package/dist-npm/actions/wearing.d.ts +0 -22
- package/dist-npm/actions/wearing.d.ts.map +0 -1
- package/dist-npm/actions/wearing.js +0 -30
- package/dist-npm/actions/wearing.js.map +0 -1
- package/dist-npm/data/events.d.ts +0 -134
- package/dist-npm/data/events.d.ts.map +0 -1
- package/dist-npm/data/events.js +0 -301
- package/dist-npm/data/events.js.map +0 -1
- package/dist-npm/data/messages.d.ts +0 -141
- package/dist-npm/data/messages.d.ts.map +0 -1
- package/dist-npm/data/messages.js +0 -300
- package/dist-npm/data/messages.js.map +0 -1
- package/dist-npm/data/templates.d.ts +0 -257
- package/dist-npm/data/templates.d.ts.map +0 -1
- package/dist-npm/data/templates.js +0 -289
- package/dist-npm/data/templates.js.map +0 -1
- package/dist-npm/data/verbs.d.ts +0 -68
- package/dist-npm/data/verbs.d.ts.map +0 -1
- package/dist-npm/data/verbs.js +0 -324
- package/dist-npm/data/verbs.js.map +0 -1
- package/dist-npm/data/words.d.ts +0 -79
- package/dist-npm/data/words.d.ts.map +0 -1
- package/dist-npm/data/words.js +0 -218
- package/dist-npm/data/words.js.map +0 -1
- package/dist-npm/events/index.d.ts +0 -8
- package/dist-npm/events/index.d.ts.map +0 -1
- package/dist-npm/events/index.js +0 -12
- package/dist-npm/events/index.js.map +0 -1
- package/dist-npm/events/revealed.d.ts +0 -19
- package/dist-npm/events/revealed.d.ts.map +0 -1
- package/dist-npm/events/revealed.js +0 -36
- package/dist-npm/events/revealed.js.map +0 -1
- package/dist-npm/formatters/article.d.ts +0 -41
- package/dist-npm/formatters/article.d.ts.map +0 -1
- package/dist-npm/formatters/article.js +0 -143
- package/dist-npm/formatters/article.js.map +0 -1
- package/dist-npm/formatters/index.d.ts +0 -18
- package/dist-npm/formatters/index.d.ts.map +0 -1
- package/dist-npm/formatters/index.js +0 -38
- package/dist-npm/formatters/index.js.map +0 -1
- package/dist-npm/formatters/list.d.ts +0 -38
- package/dist-npm/formatters/list.d.ts.map +0 -1
- package/dist-npm/formatters/list.js +0 -94
- package/dist-npm/formatters/list.js.map +0 -1
- package/dist-npm/formatters/registry.d.ts +0 -48
- package/dist-npm/formatters/registry.d.ts.map +0 -1
- package/dist-npm/formatters/registry.js +0 -128
- package/dist-npm/formatters/registry.js.map +0 -1
- package/dist-npm/formatters/text.d.ts +0 -33
- package/dist-npm/formatters/text.d.ts.map +0 -1
- package/dist-npm/formatters/text.js +0 -80
- package/dist-npm/formatters/text.js.map +0 -1
- package/dist-npm/formatters/types.d.ts +0 -41
- package/dist-npm/formatters/types.d.ts.map +0 -1
- package/dist-npm/formatters/types.js +0 -14
- package/dist-npm/formatters/types.js.map +0 -1
- package/dist-npm/grammar.d.ts +0 -189
- package/dist-npm/grammar.d.ts.map +0 -1
- package/dist-npm/grammar.js +0 -203
- package/dist-npm/grammar.js.map +0 -1
- package/dist-npm/index.d.ts +0 -22
- package/dist-npm/index.d.ts.map +0 -1
- package/dist-npm/index.js +0 -59
- package/dist-npm/index.js.map +0 -1
- package/dist-npm/language-provider.d.ts +0 -159
- package/dist-npm/language-provider.d.ts.map +0 -1
- package/dist-npm/language-provider.js +0 -527
- package/dist-npm/language-provider.js.map +0 -1
- package/dist-npm/npc/index.d.ts +0 -5
- package/dist-npm/npc/index.d.ts.map +0 -1
- package/dist-npm/npc/index.js +0 -21
- package/dist-npm/npc/index.js.map +0 -1
- package/dist-npm/npc/npc.d.ts +0 -43
- package/dist-npm/npc/npc.d.ts.map +0 -1
- package/dist-npm/npc/npc.js +0 -55
- package/dist-npm/npc/npc.js.map +0 -1
- package/dist-npm/perspective/index.d.ts +0 -5
- package/dist-npm/perspective/index.d.ts.map +0 -1
- package/dist-npm/perspective/index.js +0 -12
- package/dist-npm/perspective/index.js.map +0 -1
- package/dist-npm/perspective/placeholder-resolver.d.ts +0 -102
- package/dist-npm/perspective/placeholder-resolver.d.ts.map +0 -1
- package/dist-npm/perspective/placeholder-resolver.js +0 -275
- package/dist-npm/perspective/placeholder-resolver.js.map +0 -1
package/dist-npm/npc/npc.js
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Language content for NPC system (ADR-070)
|
|
4
|
-
*/
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.npcLanguage = void 0;
|
|
7
|
-
exports.npcLanguage = {
|
|
8
|
-
messages: {
|
|
9
|
-
// Movement messages
|
|
10
|
-
'npc.enters': "{npcName} enters from the {direction}.",
|
|
11
|
-
'npc.leaves': "{npcName} leaves to the {direction}.",
|
|
12
|
-
'npc.arrives': "{npcName} arrives.",
|
|
13
|
-
'npc.departs': "{npcName} departs.",
|
|
14
|
-
// Observation messages
|
|
15
|
-
'npc.notices_player': "{npcName} notices you.",
|
|
16
|
-
'npc.ignores_player': "{npcName} ignores you.",
|
|
17
|
-
// Action messages
|
|
18
|
-
'npc.takes': "{npcName} picks up {itemName}.",
|
|
19
|
-
'npc.drops': "{npcName} drops {itemName}.",
|
|
20
|
-
'npc.follows': "{npcName} follows you.",
|
|
21
|
-
// Guard messages
|
|
22
|
-
'npc.guard.blocks': "{npcName} blocks your way!",
|
|
23
|
-
'npc.guard.attacks': "{npcName} attacks you!",
|
|
24
|
-
'npc.guard.defeated': "{npcName} is no longer a threat.",
|
|
25
|
-
// Combat messages (basic)
|
|
26
|
-
'npc.attacks': "{npcName} attacks you!",
|
|
27
|
-
'npc.misses': "{npcName} swings at you but misses!",
|
|
28
|
-
'npc.hits': "{npcName} hits you for {damage} damage!",
|
|
29
|
-
'npc.killed': "{npcName} has been slain.",
|
|
30
|
-
'npc.unconscious': "{npcName} collapses, unconscious.",
|
|
31
|
-
// NPC combat attack outcomes (canonical Zork troll messages from MDL source)
|
|
32
|
-
'npc.combat.attack.missed': "The troll swings his axe, but it misses.",
|
|
33
|
-
'npc.combat.attack.hit': "The axe gets you right in the side. Ouch!",
|
|
34
|
-
'npc.combat.attack.hit_light': "The flat of the troll's axe skins across your forearm.",
|
|
35
|
-
'npc.combat.attack.hit_heavy': "The troll hits you with a glancing blow, and you are momentarily stunned.",
|
|
36
|
-
'npc.combat.attack.knocked_out': "The flat of the troll's axe hits you delicately on the head, knocking you out.",
|
|
37
|
-
'npc.combat.attack.killed': "The troll lands a killing blow. You are dead.",
|
|
38
|
-
// Speech messages
|
|
39
|
-
'npc.speaks': "{npcName} says, \"{text}\"",
|
|
40
|
-
'npc.shouts': "{npcName} shouts, \"{text}\"",
|
|
41
|
-
'npc.whispers': "{npcName} whispers, \"{text}\"",
|
|
42
|
-
'npc.mutters': "{npcName} mutters, \"{text}\"",
|
|
43
|
-
// Emote messages
|
|
44
|
-
'npc.laughs': "{npcName} laughs.",
|
|
45
|
-
'npc.growls': "{npcName} growls menacingly.",
|
|
46
|
-
'npc.cries': "{npcName} cries.",
|
|
47
|
-
'npc.sighs': "{npcName} sighs.",
|
|
48
|
-
// Dialogue messages
|
|
49
|
-
'npc.greets': "{npcName} greets you.",
|
|
50
|
-
'npc.farewell': "{npcName} bids you farewell.",
|
|
51
|
-
'npc.no_response': "{npcName} doesn't respond.",
|
|
52
|
-
'npc.confused': "{npcName} looks confused."
|
|
53
|
-
}
|
|
54
|
-
};
|
|
55
|
-
//# sourceMappingURL=npc.js.map
|
package/dist-npm/npc/npc.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"npc.js","sourceRoot":"","sources":["../../../../../src/npc/npc.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEU,QAAA,WAAW,GAAG;IACzB,QAAQ,EAAE;QACR,oBAAoB;QACpB,YAAY,EAAE,wCAAwC;QACtD,YAAY,EAAE,sCAAsC;QACpD,aAAa,EAAE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yBAAyB,EACzB,aAAa,EACb,8BAA8B,GAC/B,MAAM,wBAAwB,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Perspective module exports
|
|
4
|
-
*/
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.resolvePerspectivePlaceholders = exports.conjugateVerb = exports.DEFAULT_NARRATIVE_CONTEXT = exports.PRONOUNS = void 0;
|
|
7
|
-
var placeholder_resolver_1 = require("./placeholder-resolver");
|
|
8
|
-
Object.defineProperty(exports, "PRONOUNS", { enumerable: true, get: function () { return placeholder_resolver_1.PRONOUNS; } });
|
|
9
|
-
Object.defineProperty(exports, "DEFAULT_NARRATIVE_CONTEXT", { enumerable: true, get: function () { return placeholder_resolver_1.DEFAULT_NARRATIVE_CONTEXT; } });
|
|
10
|
-
Object.defineProperty(exports, "conjugateVerb", { enumerable: true, get: function () { return placeholder_resolver_1.conjugateVerb; } });
|
|
11
|
-
Object.defineProperty(exports, "resolvePerspectivePlaceholders", { enumerable: true, get: function () { return placeholder_resolver_1.resolvePerspectivePlaceholders; } });
|
|
12
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/perspective/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,+DAQgC;AAN9B,gHAAA,QAAQ,OAAA;AAGR,iIAAA,yBAAyB,OAAA;AACzB,qHAAA,aAAa,OAAA;AACb,sIAAA,8BAA8B,OAAA"}
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Perspective Placeholder Resolver
|
|
3
|
-
*
|
|
4
|
-
* ADR-089 Phase D: Resolves perspective-aware placeholders in messages.
|
|
5
|
-
*
|
|
6
|
-
* Placeholders:
|
|
7
|
-
* - {You} / {you} - Subject pronoun ("I", "You", "She")
|
|
8
|
-
* - {Your} / {your} - Possessive adjective ("My", "Your", "Her")
|
|
9
|
-
* - {Yours} / {yours} - Possessive pronoun ("Mine", "Yours", "Hers")
|
|
10
|
-
* - {Yourself} / {yourself} - Reflexive ("Myself", "Yourself", "Herself")
|
|
11
|
-
* - {You're} / {you're} - Contraction ("I'm", "You're", "She's")
|
|
12
|
-
* - {verb} - Conjugated verb (e.g., {take} -> "take" or "takes")
|
|
13
|
-
*/
|
|
14
|
-
/**
|
|
15
|
-
* Pronoun set for an entity (matches world-model PronounSet)
|
|
16
|
-
*
|
|
17
|
-
* Defined locally to avoid lang-en-us depending on world-model.
|
|
18
|
-
* Engine should pass player pronouns when setting narrative context.
|
|
19
|
-
*/
|
|
20
|
-
export interface PronounSet {
|
|
21
|
-
/** Nominative case: "he", "she", "they", "xe" */
|
|
22
|
-
subject: string;
|
|
23
|
-
/** Accusative case: "him", "her", "them", "xem" */
|
|
24
|
-
object: string;
|
|
25
|
-
/** Possessive pronoun (standalone): "his", "hers", "theirs", "xyrs" */
|
|
26
|
-
possessive: string;
|
|
27
|
-
/** Possessive adjective (before noun): "his", "her", "their", "xyr" */
|
|
28
|
-
possessiveAdj: string;
|
|
29
|
-
/** Reflexive: "himself", "herself", "themselves", "xemself" */
|
|
30
|
-
reflexive: string;
|
|
31
|
-
/** Verb agreement: 'singular' or 'plural' (they takes plural verbs) */
|
|
32
|
-
verbForm: 'singular' | 'plural';
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Standard pronoun sets (matches world-model PRONOUNS)
|
|
36
|
-
*/
|
|
37
|
-
export declare const PRONOUNS: {
|
|
38
|
-
readonly HE_HIM: {
|
|
39
|
-
readonly subject: "he";
|
|
40
|
-
readonly object: "him";
|
|
41
|
-
readonly possessive: "his";
|
|
42
|
-
readonly possessiveAdj: "his";
|
|
43
|
-
readonly reflexive: "himself";
|
|
44
|
-
readonly verbForm: "singular";
|
|
45
|
-
};
|
|
46
|
-
readonly SHE_HER: {
|
|
47
|
-
readonly subject: "she";
|
|
48
|
-
readonly object: "her";
|
|
49
|
-
readonly possessive: "hers";
|
|
50
|
-
readonly possessiveAdj: "her";
|
|
51
|
-
readonly reflexive: "herself";
|
|
52
|
-
readonly verbForm: "singular";
|
|
53
|
-
};
|
|
54
|
-
readonly THEY_THEM: {
|
|
55
|
-
readonly subject: "they";
|
|
56
|
-
readonly object: "them";
|
|
57
|
-
readonly possessive: "theirs";
|
|
58
|
-
readonly possessiveAdj: "their";
|
|
59
|
-
readonly reflexive: "themselves";
|
|
60
|
-
readonly verbForm: "plural";
|
|
61
|
-
};
|
|
62
|
-
};
|
|
63
|
-
/**
|
|
64
|
-
* Narrative perspective
|
|
65
|
-
*/
|
|
66
|
-
export type Perspective = '1st' | '2nd' | '3rd';
|
|
67
|
-
/**
|
|
68
|
-
* Narrative settings for placeholder resolution
|
|
69
|
-
*/
|
|
70
|
-
export interface NarrativeContext {
|
|
71
|
-
perspective: Perspective;
|
|
72
|
-
playerPronouns?: PronounSet;
|
|
73
|
-
}
|
|
74
|
-
/**
|
|
75
|
-
* Default narrative context (2nd person)
|
|
76
|
-
*/
|
|
77
|
-
export declare const DEFAULT_NARRATIVE_CONTEXT: NarrativeContext;
|
|
78
|
-
/**
|
|
79
|
-
* Conjugate a verb based on perspective
|
|
80
|
-
*
|
|
81
|
-
* @param verb Base form of verb (e.g., "take", "open")
|
|
82
|
-
* @param context Narrative context
|
|
83
|
-
* @returns Conjugated verb
|
|
84
|
-
*/
|
|
85
|
-
export declare function conjugateVerb(verb: string, context: NarrativeContext): string;
|
|
86
|
-
/**
|
|
87
|
-
* Resolve perspective placeholders in a message
|
|
88
|
-
*
|
|
89
|
-
* Placeholders:
|
|
90
|
-
* - {You} / {you} - Subject pronoun
|
|
91
|
-
* - {Your} / {your} - Possessive adjective
|
|
92
|
-
* - {Yours} / {yours} - Possessive pronoun
|
|
93
|
-
* - {Yourself} / {yourself} - Reflexive
|
|
94
|
-
* - {You're} / {you're} - Contraction
|
|
95
|
-
* - {verb} - Any verb in curly braces gets conjugated
|
|
96
|
-
*
|
|
97
|
-
* @param message Message with placeholders
|
|
98
|
-
* @param context Narrative context
|
|
99
|
-
* @returns Message with resolved placeholders
|
|
100
|
-
*/
|
|
101
|
-
export declare function resolvePerspectivePlaceholders(message: string, context?: NarrativeContext): string;
|
|
102
|
-
//# sourceMappingURL=placeholder-resolver.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"placeholder-resolver.d.ts","sourceRoot":"","sources":["../../../../../src/perspective/placeholder-resolver.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH;;;;;GAKG;AACH,MAAM,WAAW,UAAU;IACzB,iDAAiD;IACjD,OAAO,EAAE,MAAM,CAAC;IAChB,mDAAmD;IACnD,MAAM,EAAE,MAAM,CAAC;IACf,uEAAuE;IACvE,UAAU,EAAE,MAAM,CAAC;IACnB,uEAAuE;IACvE,aAAa,EAAE,MAAM,CAAC;IACtB,+DAA+D;IAC/D,SAAS,EAAE,MAAM,CAAC;IAClB,uEAAuE;IACvE,QAAQ,EAAE,UAAU,GAAG,QAAQ,CAAC;CACjC;AAED;;GAEG;AACH,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;CAaX,CAAC;AAEX;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC;AAEhD;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,WAAW,EAAE,WAAW,CAAC;IACzB,cAAc,CAAC,EAAE,UAAU,CAAC;CAC7B;AAED;;GAEG;AACH,eAAO,MAAM,yBAAyB,EAAE,gBAEvC,CAAC;AA0GF;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,gBAAgB,GAAG,MAAM,CA4B7E;AA0BD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,8BAA8B,CAC5C,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,gBAA4C,GACpD,MAAM,CAwER"}
|
|
@@ -1,275 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Perspective Placeholder Resolver
|
|
4
|
-
*
|
|
5
|
-
* ADR-089 Phase D: Resolves perspective-aware placeholders in messages.
|
|
6
|
-
*
|
|
7
|
-
* Placeholders:
|
|
8
|
-
* - {You} / {you} - Subject pronoun ("I", "You", "She")
|
|
9
|
-
* - {Your} / {your} - Possessive adjective ("My", "Your", "Her")
|
|
10
|
-
* - {Yours} / {yours} - Possessive pronoun ("Mine", "Yours", "Hers")
|
|
11
|
-
* - {Yourself} / {yourself} - Reflexive ("Myself", "Yourself", "Herself")
|
|
12
|
-
* - {You're} / {you're} - Contraction ("I'm", "You're", "She's")
|
|
13
|
-
* - {verb} - Conjugated verb (e.g., {take} -> "take" or "takes")
|
|
14
|
-
*/
|
|
15
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.DEFAULT_NARRATIVE_CONTEXT = exports.PRONOUNS = void 0;
|
|
17
|
-
exports.conjugateVerb = conjugateVerb;
|
|
18
|
-
exports.resolvePerspectivePlaceholders = resolvePerspectivePlaceholders;
|
|
19
|
-
/**
|
|
20
|
-
* Standard pronoun sets (matches world-model PRONOUNS)
|
|
21
|
-
*/
|
|
22
|
-
exports.PRONOUNS = {
|
|
23
|
-
HE_HIM: {
|
|
24
|
-
subject: 'he', object: 'him', possessive: 'his',
|
|
25
|
-
possessiveAdj: 'his', reflexive: 'himself', verbForm: 'singular'
|
|
26
|
-
},
|
|
27
|
-
SHE_HER: {
|
|
28
|
-
subject: 'she', object: 'her', possessive: 'hers',
|
|
29
|
-
possessiveAdj: 'her', reflexive: 'herself', verbForm: 'singular'
|
|
30
|
-
},
|
|
31
|
-
THEY_THEM: {
|
|
32
|
-
subject: 'they', object: 'them', possessive: 'theirs',
|
|
33
|
-
possessiveAdj: 'their', reflexive: 'themselves', verbForm: 'plural'
|
|
34
|
-
},
|
|
35
|
-
};
|
|
36
|
-
/**
|
|
37
|
-
* Default narrative context (2nd person)
|
|
38
|
-
*/
|
|
39
|
-
exports.DEFAULT_NARRATIVE_CONTEXT = {
|
|
40
|
-
perspective: '2nd',
|
|
41
|
-
};
|
|
42
|
-
/**
|
|
43
|
-
* Common irregular verbs and their conjugations
|
|
44
|
-
* Format: { base: [1st/2nd person, 3rd singular, 3rd plural] }
|
|
45
|
-
*/
|
|
46
|
-
const IRREGULAR_VERBS = {
|
|
47
|
-
'be': ['are', 'is', 'are'],
|
|
48
|
-
'have': ['have', 'has', 'have'],
|
|
49
|
-
'do': ['do', 'does', 'do'],
|
|
50
|
-
'go': ['go', 'goes', 'go'],
|
|
51
|
-
'can': ["can", "can", "can"],
|
|
52
|
-
"can't": ["can't", "can't", "can't"],
|
|
53
|
-
'cannot': ['cannot', 'cannot', 'cannot'],
|
|
54
|
-
'will': ['will', 'will', 'will'],
|
|
55
|
-
"won't": ["won't", "won't", "won't"],
|
|
56
|
-
'would': ['would', 'would', 'would'],
|
|
57
|
-
"wouldn't": ["wouldn't", "wouldn't", "wouldn't"],
|
|
58
|
-
'could': ['could', 'could', 'could'],
|
|
59
|
-
"couldn't": ["couldn't", "couldn't", "couldn't"],
|
|
60
|
-
'should': ['should', 'should', 'should'],
|
|
61
|
-
"shouldn't": ["shouldn't", "shouldn't", "shouldn't"],
|
|
62
|
-
'must': ['must', 'must', 'must'],
|
|
63
|
-
"mustn't": ["mustn't", "mustn't", "mustn't"],
|
|
64
|
-
'may': ['may', 'may', 'may'],
|
|
65
|
-
'might': ['might', 'might', 'might'],
|
|
66
|
-
};
|
|
67
|
-
/**
|
|
68
|
-
* Subject pronouns by perspective
|
|
69
|
-
*/
|
|
70
|
-
function getSubjectPronoun(context) {
|
|
71
|
-
switch (context.perspective) {
|
|
72
|
-
case '1st':
|
|
73
|
-
return 'I';
|
|
74
|
-
case '2nd':
|
|
75
|
-
return 'You';
|
|
76
|
-
case '3rd':
|
|
77
|
-
const pronouns = context.playerPronouns || exports.PRONOUNS.THEY_THEM;
|
|
78
|
-
// Capitalize first letter
|
|
79
|
-
return pronouns.subject.charAt(0).toUpperCase() + pronouns.subject.slice(1);
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
/**
|
|
83
|
-
* Possessive adjectives by perspective ("my", "your", "her")
|
|
84
|
-
*/
|
|
85
|
-
function getPossessiveAdjective(context) {
|
|
86
|
-
switch (context.perspective) {
|
|
87
|
-
case '1st':
|
|
88
|
-
return 'my';
|
|
89
|
-
case '2nd':
|
|
90
|
-
return 'your';
|
|
91
|
-
case '3rd':
|
|
92
|
-
const pronouns = context.playerPronouns || exports.PRONOUNS.THEY_THEM;
|
|
93
|
-
return pronouns.possessiveAdj;
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
/**
|
|
97
|
-
* Possessive pronouns by perspective ("mine", "yours", "hers")
|
|
98
|
-
*/
|
|
99
|
-
function getPossessivePronoun(context) {
|
|
100
|
-
switch (context.perspective) {
|
|
101
|
-
case '1st':
|
|
102
|
-
return 'mine';
|
|
103
|
-
case '2nd':
|
|
104
|
-
return 'yours';
|
|
105
|
-
case '3rd':
|
|
106
|
-
const pronouns = context.playerPronouns || exports.PRONOUNS.THEY_THEM;
|
|
107
|
-
return pronouns.possessive;
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
/**
|
|
111
|
-
* Reflexive pronouns by perspective ("myself", "yourself", "herself")
|
|
112
|
-
*/
|
|
113
|
-
function getReflexivePronoun(context) {
|
|
114
|
-
switch (context.perspective) {
|
|
115
|
-
case '1st':
|
|
116
|
-
return 'myself';
|
|
117
|
-
case '2nd':
|
|
118
|
-
return 'yourself';
|
|
119
|
-
case '3rd':
|
|
120
|
-
const pronouns = context.playerPronouns || exports.PRONOUNS.THEY_THEM;
|
|
121
|
-
return pronouns.reflexive;
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
/**
|
|
125
|
-
* "To be" contraction by perspective ("I'm", "You're", "She's")
|
|
126
|
-
*/
|
|
127
|
-
function getToBeContraction(context) {
|
|
128
|
-
switch (context.perspective) {
|
|
129
|
-
case '1st':
|
|
130
|
-
return "I'm";
|
|
131
|
-
case '2nd':
|
|
132
|
-
return "You're";
|
|
133
|
-
case '3rd':
|
|
134
|
-
const pronouns = context.playerPronouns || exports.PRONOUNS.THEY_THEM;
|
|
135
|
-
const subject = pronouns.subject.charAt(0).toUpperCase() + pronouns.subject.slice(1);
|
|
136
|
-
// "They're" for plural, "She's/He's" for singular
|
|
137
|
-
return pronouns.verbForm === 'plural' ? `${subject}'re` : `${subject}'s`;
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
/**
|
|
141
|
-
* Conjugate a verb based on perspective
|
|
142
|
-
*
|
|
143
|
-
* @param verb Base form of verb (e.g., "take", "open")
|
|
144
|
-
* @param context Narrative context
|
|
145
|
-
* @returns Conjugated verb
|
|
146
|
-
*/
|
|
147
|
-
function conjugateVerb(verb, context) {
|
|
148
|
-
const lowerVerb = verb.toLowerCase();
|
|
149
|
-
// 1st and 2nd person always use base form
|
|
150
|
-
if (context.perspective === '1st' || context.perspective === '2nd') {
|
|
151
|
-
// Check for irregular verbs
|
|
152
|
-
if (IRREGULAR_VERBS[lowerVerb]) {
|
|
153
|
-
return IRREGULAR_VERBS[lowerVerb][0];
|
|
154
|
-
}
|
|
155
|
-
return verb;
|
|
156
|
-
}
|
|
157
|
-
// 3rd person - check verb form (singular vs plural)
|
|
158
|
-
const pronouns = context.playerPronouns || exports.PRONOUNS.THEY_THEM;
|
|
159
|
-
const isPlural = pronouns.verbForm === 'plural';
|
|
160
|
-
// Check for irregular verbs
|
|
161
|
-
if (IRREGULAR_VERBS[lowerVerb]) {
|
|
162
|
-
return isPlural ? IRREGULAR_VERBS[lowerVerb][2] : IRREGULAR_VERBS[lowerVerb][1];
|
|
163
|
-
}
|
|
164
|
-
// Plural uses base form (they take)
|
|
165
|
-
if (isPlural) {
|
|
166
|
-
return verb;
|
|
167
|
-
}
|
|
168
|
-
// Singular 3rd person - add 's' or 'es'
|
|
169
|
-
return addThirdPersonS(verb);
|
|
170
|
-
}
|
|
171
|
-
/**
|
|
172
|
-
* Add third person singular 's' to a verb
|
|
173
|
-
*/
|
|
174
|
-
function addThirdPersonS(verb) {
|
|
175
|
-
const lower = verb.toLowerCase();
|
|
176
|
-
// Verbs ending in -s, -sh, -ch, -x, -z, -o add -es
|
|
177
|
-
if (lower.endsWith('s') || lower.endsWith('sh') || lower.endsWith('ch') ||
|
|
178
|
-
lower.endsWith('x') || lower.endsWith('z') || lower.endsWith('o')) {
|
|
179
|
-
return verb + 'es';
|
|
180
|
-
}
|
|
181
|
-
// Verbs ending in consonant + y: change y to ies
|
|
182
|
-
if (lower.endsWith('y') && lower.length > 1) {
|
|
183
|
-
const secondLast = lower[lower.length - 2];
|
|
184
|
-
if (!['a', 'e', 'i', 'o', 'u'].includes(secondLast)) {
|
|
185
|
-
return verb.slice(0, -1) + 'ies';
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
// Default: add 's'
|
|
189
|
-
return verb + 's';
|
|
190
|
-
}
|
|
191
|
-
/**
|
|
192
|
-
* Resolve perspective placeholders in a message
|
|
193
|
-
*
|
|
194
|
-
* Placeholders:
|
|
195
|
-
* - {You} / {you} - Subject pronoun
|
|
196
|
-
* - {Your} / {your} - Possessive adjective
|
|
197
|
-
* - {Yours} / {yours} - Possessive pronoun
|
|
198
|
-
* - {Yourself} / {yourself} - Reflexive
|
|
199
|
-
* - {You're} / {you're} - Contraction
|
|
200
|
-
* - {verb} - Any verb in curly braces gets conjugated
|
|
201
|
-
*
|
|
202
|
-
* @param message Message with placeholders
|
|
203
|
-
* @param context Narrative context
|
|
204
|
-
* @returns Message with resolved placeholders
|
|
205
|
-
*/
|
|
206
|
-
function resolvePerspectivePlaceholders(message, context = exports.DEFAULT_NARRATIVE_CONTEXT) {
|
|
207
|
-
// Subject pronoun
|
|
208
|
-
message = message.replace(/\{You\}/g, getSubjectPronoun(context));
|
|
209
|
-
message = message.replace(/\{you\}/g, getSubjectPronoun(context).toLowerCase());
|
|
210
|
-
// Possessive adjective
|
|
211
|
-
message = message.replace(/\{Your\}/g, capitalize(getPossessiveAdjective(context)));
|
|
212
|
-
message = message.replace(/\{your\}/g, getPossessiveAdjective(context));
|
|
213
|
-
// Possessive pronoun
|
|
214
|
-
message = message.replace(/\{Yours\}/g, capitalize(getPossessivePronoun(context)));
|
|
215
|
-
message = message.replace(/\{yours\}/g, getPossessivePronoun(context));
|
|
216
|
-
// Reflexive
|
|
217
|
-
message = message.replace(/\{Yourself\}/g, capitalize(getReflexivePronoun(context)));
|
|
218
|
-
message = message.replace(/\{yourself\}/g, getReflexivePronoun(context));
|
|
219
|
-
// Contraction
|
|
220
|
-
message = message.replace(/\{You're\}/g, getToBeContraction(context));
|
|
221
|
-
message = message.replace(/\{you're\}/g, getToBeContraction(context).toLowerCase());
|
|
222
|
-
// Verb conjugation - match {verbname} patterns
|
|
223
|
-
// Skip known non-verb placeholders
|
|
224
|
-
const nonVerbPlaceholders = new Set([
|
|
225
|
-
'item', 'target', 'container', 'direction', 'destination',
|
|
226
|
-
'surface', 'key', 'door', 'actor', 'recipient', 'object',
|
|
227
|
-
'room', 'count', 'score', 'turns', 'reason', 'message',
|
|
228
|
-
'the', 'a', 'an', 'text', 'description', 'name'
|
|
229
|
-
]);
|
|
230
|
-
message = message.replace(/\{([a-z][a-z']*)\}/gi, (match, verb) => {
|
|
231
|
-
const lowerVerb = verb.toLowerCase();
|
|
232
|
-
// Skip non-verb placeholders
|
|
233
|
-
if (nonVerbPlaceholders.has(lowerVerb)) {
|
|
234
|
-
return match; // Leave unchanged for regular param substitution
|
|
235
|
-
}
|
|
236
|
-
// Check if it looks like a verb (common patterns)
|
|
237
|
-
// Verbs we want to conjugate: take, open, close, lift, see, hear, etc.
|
|
238
|
-
const verbPatterns = [
|
|
239
|
-
/^(take|get|drop|put|open|close|lock|unlock|give|show|wear|remove)$/i,
|
|
240
|
-
/^(eat|drink|touch|smell|listen|look|examine|search|read|attack)$/i,
|
|
241
|
-
/^(push|pull|turn|switch|climb|enter|exit|go|wait|sleep|wake)$/i,
|
|
242
|
-
/^(lift|carry|hold|throw|catch|break|fix|use|try|need|want)$/i,
|
|
243
|
-
/^(see|hear|feel|find|know|think|say|tell|ask|answer)$/i,
|
|
244
|
-
/^(be|have|do|can|can't|will|won't|would|could|should|must|may|might)$/i,
|
|
245
|
-
/^[a-z]+'t$/i, // Contractions like "can't", "don't"
|
|
246
|
-
// Additional verbs for action templates
|
|
247
|
-
/^(respond|greet|introduce|swing|graze|land|punch|kick|smash|destroy|strike)$/i,
|
|
248
|
-
/^(quaff|gulp|sip|nibble|taste|devour|munch|doze|fall|enjoy)$/i,
|
|
249
|
-
/^(sniff|detect|discover|insert|adjust|lower|raise|tug|drag|press)$/i,
|
|
250
|
-
/^(inform|grow|toss|poke|prod|pat|stroke|crank|rotate|spin)$/i,
|
|
251
|
-
/^(toggle|apply|activate|greet|acknowledge)$/i,
|
|
252
|
-
];
|
|
253
|
-
const isVerb = verbPatterns.some(pattern => pattern.test(lowerVerb));
|
|
254
|
-
if (isVerb) {
|
|
255
|
-
const conjugated = conjugateVerb(verb, context);
|
|
256
|
-
// Preserve original capitalization pattern
|
|
257
|
-
if (verb[0] === verb[0].toUpperCase()) {
|
|
258
|
-
return capitalize(conjugated);
|
|
259
|
-
}
|
|
260
|
-
return conjugated;
|
|
261
|
-
}
|
|
262
|
-
// Not recognized as a verb, leave for regular param substitution
|
|
263
|
-
return match;
|
|
264
|
-
});
|
|
265
|
-
return message;
|
|
266
|
-
}
|
|
267
|
-
/**
|
|
268
|
-
* Capitalize first letter of a string
|
|
269
|
-
*/
|
|
270
|
-
function capitalize(str) {
|
|
271
|
-
if (!str)
|
|
272
|
-
return str;
|
|
273
|
-
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
274
|
-
}
|
|
275
|
-
//# sourceMappingURL=placeholder-resolver.js.map
|
|
@@ -1 +0,0 @@
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