@drincs/nqtr 0.8.2 → 1.0.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 +8 -21
- package/dist/StageInterface-BN_O8nDA.d.mts +363 -0
- package/dist/StageInterface-BN_O8nDA.d.ts +363 -0
- package/dist/handlers.cjs +1 -1
- package/dist/handlers.d.mts +6 -617
- package/dist/handlers.d.ts +6 -617
- package/dist/handlers.mjs +1 -1
- package/dist/index-CtxMgD9N.d.ts +270 -0
- package/dist/index-D0T0L2IE.d.mts +270 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.mts +62 -660
- package/dist/index.d.ts +62 -660
- package/dist/index.mjs +1 -1
- package/dist/ink.cjs +66 -1
- package/dist/ink.d.mts +58 -10
- package/dist/ink.d.ts +58 -10
- package/dist/ink.mjs +66 -1
- package/dist/registries.cjs +1 -1
- package/dist/registries.d.mts +143 -366
- package/dist/registries.d.ts +143 -366
- package/dist/registries.mjs +1 -1
- package/dist/vite.cjs +2 -0
- package/dist/vite.d.mts +160 -0
- package/dist/vite.d.ts +160 -0
- package/dist/vite.mjs +2 -0
- package/package.json +33 -12
package/dist/ink.d.mts
CHANGED
|
@@ -1,17 +1,65 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
interface WaitOptions {
|
|
2
|
+
hours?: number;
|
|
3
|
+
days?: number;
|
|
4
|
+
}
|
|
5
|
+
interface NqtrHandlerOptions {
|
|
6
|
+
/**
|
|
7
|
+
* Custom time converter function to convert time strings to numbers. The default implementation converts "HH:MM" format to hours as a number (e.g. "01:30" => 1.5).
|
|
8
|
+
* @default (time: string) => Number(time.replace(":", "."))
|
|
9
|
+
* @param time Time string in the format "HH:MM"
|
|
10
|
+
* @returns Time in hours as a number (e.g. "01:30" => 1.5)
|
|
11
|
+
*/
|
|
12
|
+
timeConverter?: (time: string) => number;
|
|
13
|
+
/**
|
|
14
|
+
* Custom date converter function to convert date strings to numbers. The default implementation converts a string to a number using `Number()`.
|
|
15
|
+
* @default (date: string) => Number(date)
|
|
16
|
+
* @param date Date string
|
|
17
|
+
* @returns Date as a number
|
|
18
|
+
*/
|
|
19
|
+
dateConverter?: (date: string) => number;
|
|
20
|
+
/**
|
|
21
|
+
* Custom wait function to replace the default time and date increasing logic. The default implementation increases time and date based on the provided delta or default values.
|
|
22
|
+
* @default waitInternal
|
|
23
|
+
* @param delta An object containing hours and/or days to increase, or a number representing hours to increase.
|
|
24
|
+
*/
|
|
25
|
+
wait?: (delta?: WaitOptions | number) => void;
|
|
26
|
+
/**
|
|
27
|
+
* Known activity IDs — e.g. `nqtrActivityIds` from the file generated by the Vite plugin.
|
|
28
|
+
* When provided, the Ink hashtag validation does a runtime membership check instead of accepting any string.
|
|
29
|
+
*/
|
|
30
|
+
activityIds?: readonly string[];
|
|
31
|
+
/**
|
|
32
|
+
* Known commitment IDs — e.g. `nqtrCommitmentIds` from the file generated by the Vite plugin.
|
|
33
|
+
* When provided, the Ink hashtag validation does a runtime membership check instead of accepting any string.
|
|
34
|
+
*/
|
|
35
|
+
commitmentIds?: readonly string[];
|
|
36
|
+
/**
|
|
37
|
+
* Known quest IDs — e.g. `nqtrQuestIds` from the file generated by the Vite plugin.
|
|
38
|
+
* When provided, the Ink hashtag validation does a runtime membership check instead of accepting any string.
|
|
39
|
+
*/
|
|
40
|
+
questIds?: readonly string[];
|
|
41
|
+
/**
|
|
42
|
+
* Known room IDs — e.g. `nqtrRoomIds` from the file generated by the Vite plugin.
|
|
43
|
+
* When provided, the Ink hashtag validation does a runtime membership check instead of accepting any string.
|
|
44
|
+
*/
|
|
45
|
+
roomIds?: readonly string[];
|
|
46
|
+
}
|
|
3
47
|
/**
|
|
4
|
-
*
|
|
48
|
+
* Registers all NQTR-specific Ink hashtag command handlers for managing rooms, time, date,
|
|
49
|
+
* activities, routines, and quests. Supports commands like `enter room`, `set time`, `set date`,
|
|
50
|
+
* `add/remove activity`, `add/remove routine`, `start/continue quest`, and `wait`.
|
|
5
51
|
* @example
|
|
6
52
|
* ```ts
|
|
7
|
-
* import {
|
|
8
|
-
* import { HashtagCommands } from '@drincs/pixi-vn-ink';
|
|
53
|
+
* import { createNqtrHandler } from '@drincs/nqtr/ink';
|
|
9
54
|
*
|
|
10
|
-
*
|
|
55
|
+
* createNqtrHandler();
|
|
11
56
|
* ```
|
|
12
|
-
* @param options
|
|
13
|
-
|
|
57
|
+
* @param options Optional configuration for time/date conversion, wait logic, and known entity IDs.
|
|
58
|
+
*/
|
|
59
|
+
declare function createNqtrHandler(options?: NqtrHandlerOptions): void;
|
|
60
|
+
/**
|
|
61
|
+
* @deprecated Use {@link createNqtrHandler} instead.
|
|
14
62
|
*/
|
|
15
|
-
declare
|
|
63
|
+
declare function nqtrHandler(options?: NqtrHandlerOptions): void;
|
|
16
64
|
|
|
17
|
-
export { nqtrHandler };
|
|
65
|
+
export { createNqtrHandler, nqtrHandler };
|
package/dist/ink.d.ts
CHANGED
|
@@ -1,17 +1,65 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
interface WaitOptions {
|
|
2
|
+
hours?: number;
|
|
3
|
+
days?: number;
|
|
4
|
+
}
|
|
5
|
+
interface NqtrHandlerOptions {
|
|
6
|
+
/**
|
|
7
|
+
* Custom time converter function to convert time strings to numbers. The default implementation converts "HH:MM" format to hours as a number (e.g. "01:30" => 1.5).
|
|
8
|
+
* @default (time: string) => Number(time.replace(":", "."))
|
|
9
|
+
* @param time Time string in the format "HH:MM"
|
|
10
|
+
* @returns Time in hours as a number (e.g. "01:30" => 1.5)
|
|
11
|
+
*/
|
|
12
|
+
timeConverter?: (time: string) => number;
|
|
13
|
+
/**
|
|
14
|
+
* Custom date converter function to convert date strings to numbers. The default implementation converts a string to a number using `Number()`.
|
|
15
|
+
* @default (date: string) => Number(date)
|
|
16
|
+
* @param date Date string
|
|
17
|
+
* @returns Date as a number
|
|
18
|
+
*/
|
|
19
|
+
dateConverter?: (date: string) => number;
|
|
20
|
+
/**
|
|
21
|
+
* Custom wait function to replace the default time and date increasing logic. The default implementation increases time and date based on the provided delta or default values.
|
|
22
|
+
* @default waitInternal
|
|
23
|
+
* @param delta An object containing hours and/or days to increase, or a number representing hours to increase.
|
|
24
|
+
*/
|
|
25
|
+
wait?: (delta?: WaitOptions | number) => void;
|
|
26
|
+
/**
|
|
27
|
+
* Known activity IDs — e.g. `nqtrActivityIds` from the file generated by the Vite plugin.
|
|
28
|
+
* When provided, the Ink hashtag validation does a runtime membership check instead of accepting any string.
|
|
29
|
+
*/
|
|
30
|
+
activityIds?: readonly string[];
|
|
31
|
+
/**
|
|
32
|
+
* Known commitment IDs — e.g. `nqtrCommitmentIds` from the file generated by the Vite plugin.
|
|
33
|
+
* When provided, the Ink hashtag validation does a runtime membership check instead of accepting any string.
|
|
34
|
+
*/
|
|
35
|
+
commitmentIds?: readonly string[];
|
|
36
|
+
/**
|
|
37
|
+
* Known quest IDs — e.g. `nqtrQuestIds` from the file generated by the Vite plugin.
|
|
38
|
+
* When provided, the Ink hashtag validation does a runtime membership check instead of accepting any string.
|
|
39
|
+
*/
|
|
40
|
+
questIds?: readonly string[];
|
|
41
|
+
/**
|
|
42
|
+
* Known room IDs — e.g. `nqtrRoomIds` from the file generated by the Vite plugin.
|
|
43
|
+
* When provided, the Ink hashtag validation does a runtime membership check instead of accepting any string.
|
|
44
|
+
*/
|
|
45
|
+
roomIds?: readonly string[];
|
|
46
|
+
}
|
|
3
47
|
/**
|
|
4
|
-
*
|
|
48
|
+
* Registers all NQTR-specific Ink hashtag command handlers for managing rooms, time, date,
|
|
49
|
+
* activities, routines, and quests. Supports commands like `enter room`, `set time`, `set date`,
|
|
50
|
+
* `add/remove activity`, `add/remove routine`, `start/continue quest`, and `wait`.
|
|
5
51
|
* @example
|
|
6
52
|
* ```ts
|
|
7
|
-
* import {
|
|
8
|
-
* import { HashtagCommands } from '@drincs/pixi-vn-ink';
|
|
53
|
+
* import { createNqtrHandler } from '@drincs/nqtr/ink';
|
|
9
54
|
*
|
|
10
|
-
*
|
|
55
|
+
* createNqtrHandler();
|
|
11
56
|
* ```
|
|
12
|
-
* @param options
|
|
13
|
-
|
|
57
|
+
* @param options Optional configuration for time/date conversion, wait logic, and known entity IDs.
|
|
58
|
+
*/
|
|
59
|
+
declare function createNqtrHandler(options?: NqtrHandlerOptions): void;
|
|
60
|
+
/**
|
|
61
|
+
* @deprecated Use {@link createNqtrHandler} instead.
|
|
14
62
|
*/
|
|
15
|
-
declare
|
|
63
|
+
declare function nqtrHandler(options?: NqtrHandlerOptions): void;
|
|
16
64
|
|
|
17
|
-
export { nqtrHandler };
|
|
65
|
+
export { createNqtrHandler, nqtrHandler };
|