mirror of
https://github.com/LewdLeah/Auto-Cards.git
synced 2025-07-09 15:00:25 -04:00
init workspace
Signed-off-by: Magic <magicoflolis@tuta.io>
This commit is contained in:
parent
feba65e8a9
commit
1800cafee7
14 changed files with 1390 additions and 0 deletions
10
src/context.js
Normal file
10
src/context.js
Normal file
|
@ -0,0 +1,10 @@
|
|||
// Your "Context" tab should look like this
|
||||
const modifier = (text) => {
|
||||
//
|
||||
// Ideally, your other context code goes above this line
|
||||
[text, stop] = AutoCards("context", text, stop);
|
||||
// Alternatively, you may also put it below this line
|
||||
//
|
||||
return {text, stop};
|
||||
};
|
||||
modifier(text);
|
10
src/input.js
Normal file
10
src/input.js
Normal file
|
@ -0,0 +1,10 @@
|
|||
// Your "Input" tab should look like this
|
||||
const modifier = (text) => {
|
||||
//
|
||||
// Ideally, your other input code goes above this line
|
||||
text = AutoCards("input", text);
|
||||
// Alternatively, you may also put it below this line
|
||||
//
|
||||
return {text};
|
||||
};
|
||||
modifier(text);
|
5
src/library.js
Normal file
5
src/library.js
Normal file
|
@ -0,0 +1,5 @@
|
|||
/// <reference types="./types/global.d.ts" />
|
||||
// Your "Library" tab should look like this
|
||||
|
||||
// [source code not public yet]
|
||||
// Estimated release date is May 26, 2025 (but no promises)
|
10
src/output.js
Normal file
10
src/output.js
Normal file
|
@ -0,0 +1,10 @@
|
|||
// Your "Output" tab should look like this
|
||||
const modifier = (text) => {
|
||||
//
|
||||
// Ideally, your other output code goes above this line
|
||||
text = AutoCards("output", text);
|
||||
// Alternatively, you may also put it below this line
|
||||
//
|
||||
return {text};
|
||||
};
|
||||
modifier(text);
|
50
src/types/global.d.ts
vendored
Normal file
50
src/types/global.d.ts
vendored
Normal file
|
@ -0,0 +1,50 @@
|
|||
/// <reference no-default-lib="true"/>
|
||||
/// <reference lib="es2022"/>
|
||||
|
||||
export interface History {
|
||||
text: string;
|
||||
type: "continue" | "say" | "do" | "story" | "see" | "repeat" | "start" | "unknown";
|
||||
rawText: string;
|
||||
}
|
||||
|
||||
export interface StoryCard {
|
||||
id: string;
|
||||
title: string;
|
||||
keys: string;
|
||||
type: string;
|
||||
/**
|
||||
* This is `value` when exported
|
||||
*/
|
||||
entry: string;
|
||||
description: string;
|
||||
}
|
||||
|
||||
export interface State {
|
||||
key: string;
|
||||
memory: Memory;
|
||||
message: string;
|
||||
[key: string]: unknown;
|
||||
}
|
||||
export interface Memory {
|
||||
context: string;
|
||||
authorsNote: string;
|
||||
}
|
||||
export interface Info {
|
||||
actionCount: number;
|
||||
characters: string[];
|
||||
[key: string]: unknown;
|
||||
}
|
||||
|
||||
declare global {
|
||||
let stop: boolean;
|
||||
let text: unknown;
|
||||
function AutoCards(): unknown;
|
||||
function addStoryCard(): unknown;
|
||||
function removeStoryCard(): unknown;
|
||||
function log(): void;
|
||||
const history: History[];
|
||||
const storyCards: StoryCard[];
|
||||
const state: State;
|
||||
const memory: Memory;
|
||||
const info: Info;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue