diff --git a/fe_calckey/frontend/calckey-js/api-extractor.json b/fe_calckey/frontend/calckey-js/api-extractor.json deleted file mode 100644 index a95281a..0000000 --- a/fe_calckey/frontend/calckey-js/api-extractor.json +++ /dev/null @@ -1,364 +0,0 @@ -/** - * Config file for API Extractor. For more info, please visit: https://api-extractor.com - */ -{ - "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", - - /** - * Optionally specifies another JSON config file that this file extends from. This provides a way for - * standard settings to be shared across multiple projects. - * - * If the path starts with "./" or "../", the path is resolved relative to the folder of the file that contains - * the "extends" field. Otherwise, the first path segment is interpreted as an NPM package name, and will be - * resolved using NodeJS require(). - * - * SUPPORTED TOKENS: none - * DEFAULT VALUE: "" - */ - // "extends": "./shared/api-extractor-base.json" - // "extends": "my-package/include/api-extractor-base.json" - - /** - * Determines the "" token that can be used with other config file settings. The project folder - * typically contains the tsconfig.json and package.json config files, but the path is user-defined. - * - * The path is resolved relative to the folder of the config file that contains the setting. - * - * The default value for "projectFolder" is the token "", which means the folder is determined by traversing - * parent folders, starting from the folder containing api-extractor.json, and stopping at the first folder - * that contains a tsconfig.json file. If a tsconfig.json file cannot be found in this way, then an error - * will be reported. - * - * SUPPORTED TOKENS: - * DEFAULT VALUE: "" - */ - // "projectFolder": "..", - - /** - * (REQUIRED) Specifies the .d.ts file to be used as the starting point for analysis. API Extractor - * analyzes the symbols exported by this module. - * - * The file extension must be ".d.ts" and not ".ts". - * - * The path is resolved relative to the folder of the config file that contains the setting; to change this, - * prepend a folder token such as "". - * - * SUPPORTED TOKENS: , , - */ - "mainEntryPointFilePath": "/built/index.d.ts", - - /** - * A list of NPM package names whose exports should be treated as part of this package. - * - * For example, suppose that Webpack is used to generate a distributed bundle for the project "library1", - * and another NPM package "library2" is embedded in this bundle. Some types from library2 may become part - * of the exported API for library1, but by default API Extractor would generate a .d.ts rollup that explicitly - * imports library2. To avoid this, we can specify: - * - * "bundledPackages": [ "library2" ], - * - * This would direct API Extractor to embed those types directly in the .d.ts rollup, as if they had been - * local files for library1. - */ - "bundledPackages": [], - - /** - * Determines how the TypeScript compiler engine will be invoked by API Extractor. - */ - "compiler": { - /** - * Specifies the path to the tsconfig.json file to be used by API Extractor when analyzing the project. - * - * The path is resolved relative to the folder of the config file that contains the setting; to change this, - * prepend a folder token such as "". - * - * Note: This setting will be ignored if "overrideTsconfig" is used. - * - * SUPPORTED TOKENS: , , - * DEFAULT VALUE: "/tsconfig.json" - */ - // "tsconfigFilePath": "/tsconfig.json", - /** - * Provides a compiler configuration that will be used instead of reading the tsconfig.json file from disk. - * The object must conform to the TypeScript tsconfig schema: - * - * http://json.schemastore.org/tsconfig - * - * If omitted, then the tsconfig.json file will be read from the "projectFolder". - * - * DEFAULT VALUE: no overrideTsconfig section - */ - // "overrideTsconfig": { - // . . . - // } - /** - * This option causes the compiler to be invoked with the --skipLibCheck option. This option is not recommended - * and may cause API Extractor to produce incomplete or incorrect declarations, but it may be required when - * dependencies contain declarations that are incompatible with the TypeScript engine that API Extractor uses - * for its analysis. Where possible, the underlying issue should be fixed rather than relying on skipLibCheck. - * - * DEFAULT VALUE: false - */ - // "skipLibCheck": true, - }, - - /** - * Configures how the API report file (*.api.md) will be generated. - */ - "apiReport": { - /** - * (REQUIRED) Whether to generate an API report. - */ - "enabled": true - - /** - * The filename for the API report files. It will be combined with "reportFolder" or "reportTempFolder" to produce - * a full file path. - * - * The file extension should be ".api.md", and the string should not contain a path separator such as "\" or "/". - * - * SUPPORTED TOKENS: , - * DEFAULT VALUE: ".api.md" - */ - // "reportFileName": ".api.md", - - /** - * Specifies the folder where the API report file is written. The file name portion is determined by - * the "reportFileName" setting. - * - * The API report file is normally tracked by Git. Changes to it can be used to trigger a branch policy, - * e.g. for an API review. - * - * The path is resolved relative to the folder of the config file that contains the setting; to change this, - * prepend a folder token such as "". - * - * SUPPORTED TOKENS: , , - * DEFAULT VALUE: "/etc/" - */ - // "reportFolder": "/etc/", - - /** - * Specifies the folder where the temporary report file is written. The file name portion is determined by - * the "reportFileName" setting. - * - * After the temporary file is written to disk, it is compared with the file in the "reportFolder". - * If they are different, a production build will fail. - * - * The path is resolved relative to the folder of the config file that contains the setting; to change this, - * prepend a folder token such as "". - * - * SUPPORTED TOKENS: , , - * DEFAULT VALUE: "/temp/" - */ - // "reportTempFolder": "/temp/" - }, - - /** - * Configures how the doc model file (*.api.json) will be generated. - */ - "docModel": { - /** - * (REQUIRED) Whether to generate a doc model file. - */ - "enabled": true - - /** - * The output path for the doc model file. The file extension should be ".api.json". - * - * The path is resolved relative to the folder of the config file that contains the setting; to change this, - * prepend a folder token such as "". - * - * SUPPORTED TOKENS: , , - * DEFAULT VALUE: "/temp/.api.json" - */ - // "apiJsonFilePath": "/temp/.api.json" - }, - - /** - * Configures how the .d.ts rollup file will be generated. - */ - "dtsRollup": { - /** - * (REQUIRED) Whether to generate the .d.ts rollup file. - */ - "enabled": false - - /** - * Specifies the output path for a .d.ts rollup file to be generated without any trimming. - * This file will include all declarations that are exported by the main entry point. - * - * If the path is an empty string, then this file will not be written. - * - * The path is resolved relative to the folder of the config file that contains the setting; to change this, - * prepend a folder token such as "". - * - * SUPPORTED TOKENS: , , - * DEFAULT VALUE: "/dist/.d.ts" - */ - // "untrimmedFilePath": "/dist/.d.ts", - - /** - * Specifies the output path for a .d.ts rollup file to be generated with trimming for a "beta" release. - * This file will include only declarations that are marked as "@public" or "@beta". - * - * The path is resolved relative to the folder of the config file that contains the setting; to change this, - * prepend a folder token such as "". - * - * SUPPORTED TOKENS: , , - * DEFAULT VALUE: "" - */ - // "betaTrimmedFilePath": "/dist/-beta.d.ts", - - /** - * Specifies the output path for a .d.ts rollup file to be generated with trimming for a "public" release. - * This file will include only declarations that are marked as "@public". - * - * If the path is an empty string, then this file will not be written. - * - * The path is resolved relative to the folder of the config file that contains the setting; to change this, - * prepend a folder token such as "". - * - * SUPPORTED TOKENS: , , - * DEFAULT VALUE: "" - */ - // "publicTrimmedFilePath": "/dist/-public.d.ts", - - /** - * When a declaration is trimmed, by default it will be replaced by a code comment such as - * "Excluded from this release type: exampleMember". Set "omitTrimmingComments" to true to remove the - * declaration completely. - * - * DEFAULT VALUE: false - */ - // "omitTrimmingComments": true - }, - - /** - * Configures how the tsdoc-metadata.json file will be generated. - */ - "tsdocMetadata": { - /** - * Whether to generate the tsdoc-metadata.json file. - * - * DEFAULT VALUE: true - */ - // "enabled": true, - /** - * Specifies where the TSDoc metadata file should be written. - * - * The path is resolved relative to the folder of the config file that contains the setting; to change this, - * prepend a folder token such as "". - * - * The default value is "", which causes the path to be automatically inferred from the "tsdocMetadata", - * "typings" or "main" fields of the project's package.json. If none of these fields are set, the lookup - * falls back to "tsdoc-metadata.json" in the package folder. - * - * SUPPORTED TOKENS: , , - * DEFAULT VALUE: "" - */ - // "tsdocMetadataFilePath": "/dist/tsdoc-metadata.json" - }, - - /** - * Specifies what type of newlines API Extractor should use when writing output files. By default, the output files - * will be written with Windows-style newlines. To use POSIX-style newlines, specify "lf" instead. - * To use the OS's default newline kind, specify "os". - * - * DEFAULT VALUE: "crlf" - */ - // "newlineKind": "crlf", - - /** - * Configures how API Extractor reports error and warning messages produced during analysis. - * - * There are three sources of messages: compiler messages, API Extractor messages, and TSDoc messages. - */ - "messages": { - /** - * Configures handling of diagnostic messages reported by the TypeScript compiler engine while analyzing - * the input .d.ts files. - * - * TypeScript message identifiers start with "TS" followed by an integer. For example: "TS2551" - * - * DEFAULT VALUE: A single "default" entry with logLevel=warning. - */ - "compilerMessageReporting": { - /** - * Configures the default routing for messages that don't match an explicit rule in this table. - */ - "default": { - /** - * Specifies whether the message should be written to the the tool's output log. Note that - * the "addToApiReportFile" property may supersede this option. - * - * Possible values: "error", "warning", "none" - * - * Errors cause the build to fail and return a nonzero exit code. Warnings cause a production build fail - * and return a nonzero exit code. For a non-production build (e.g. when "api-extractor run" includes - * the "--local" option), the warning is displayed but the build will not fail. - * - * DEFAULT VALUE: "warning" - */ - "logLevel": "warning" - - /** - * When addToApiReportFile is true: If API Extractor is configured to write an API report file (.api.md), - * then the message will be written inside that file; otherwise, the message is instead logged according to - * the "logLevel" option. - * - * DEFAULT VALUE: false - */ - // "addToApiReportFile": false - } - - // "TS2551": { - // "logLevel": "warning", - // "addToApiReportFile": true - // }, - // - // . . . - }, - - /** - * Configures handling of messages reported by API Extractor during its analysis. - * - * API Extractor message identifiers start with "ae-". For example: "ae-extra-release-tag" - * - * DEFAULT VALUE: See api-extractor-defaults.json for the complete table of extractorMessageReporting mappings - */ - "extractorMessageReporting": { - "default": { - "logLevel": "none" - // "addToApiReportFile": false - } - - // "ae-extra-release-tag": { - // "logLevel": "warning", - // "addToApiReportFile": true - // }, - // - // . . . - }, - - /** - * Configures handling of messages reported by the TSDoc parser when analyzing code comments. - * - * TSDoc message identifiers start with "tsdoc-". For example: "tsdoc-link-tag-unescaped-text" - * - * DEFAULT VALUE: A single "default" entry with logLevel=warning. - */ - "tsdocMessageReporting": { - "default": { - "logLevel": "warning" - // "addToApiReportFile": false - } - - // "tsdoc-link-tag-unescaped-text": { - // "logLevel": "warning", - // "addToApiReportFile": true - // }, - // - // . . . - } - } -} diff --git a/fe_calckey/frontend/calckey-js/etc/calckey-js.api.json b/fe_calckey/frontend/calckey-js/etc/calckey-js.api.json deleted file mode 100644 index 4f13a4d..0000000 --- a/fe_calckey/frontend/calckey-js/etc/calckey-js.api.json +++ /dev/null @@ -1,9814 +0,0 @@ -{ - "metadata": { - "toolPackage": "@microsoft/api-extractor", - "toolVersion": "7.36.0", - "schemaVersion": 1011, - "oldestForwardsCompatibleVersion": 1001, - "tsdocConfig": { - "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json", - "noStandardTags": true, - "tagDefinitions": [ - { - "tagName": "@alpha", - "syntaxKind": "modifier" - }, - { - "tagName": "@beta", - "syntaxKind": "modifier" - }, - { - "tagName": "@defaultValue", - "syntaxKind": "block" - }, - { - "tagName": "@decorator", - "syntaxKind": "block", - "allowMultiple": true - }, - { - "tagName": "@deprecated", - "syntaxKind": "block" - }, - { - "tagName": "@eventProperty", - "syntaxKind": "modifier" - }, - { - "tagName": "@example", - "syntaxKind": "block", - "allowMultiple": true - }, - { - "tagName": "@experimental", - "syntaxKind": "modifier" - }, - { - "tagName": "@inheritDoc", - "syntaxKind": "inline" - }, - { - "tagName": "@internal", - "syntaxKind": "modifier" - }, - { - "tagName": "@label", - "syntaxKind": "inline" - }, - { - "tagName": "@link", - "syntaxKind": "inline", - "allowMultiple": true - }, - { - "tagName": "@override", - "syntaxKind": "modifier" - }, - { - "tagName": "@packageDocumentation", - "syntaxKind": "modifier" - }, - { - "tagName": "@param", - "syntaxKind": "block", - "allowMultiple": true - }, - { - "tagName": "@privateRemarks", - "syntaxKind": "block" - }, - { - "tagName": "@public", - "syntaxKind": "modifier" - }, - { - "tagName": "@readonly", - "syntaxKind": "modifier" - }, - { - "tagName": "@remarks", - "syntaxKind": "block" - }, - { - "tagName": "@returns", - "syntaxKind": "block" - }, - { - "tagName": "@sealed", - "syntaxKind": "modifier" - }, - { - "tagName": "@see", - "syntaxKind": "block" - }, - { - "tagName": "@throws", - "syntaxKind": "block", - "allowMultiple": true - }, - { - "tagName": "@typeParam", - "syntaxKind": "block", - "allowMultiple": true - }, - { - "tagName": "@virtual", - "syntaxKind": "modifier" - }, - { - "tagName": "@betaDocumentation", - "syntaxKind": "modifier" - }, - { - "tagName": "@internalRemarks", - "syntaxKind": "block" - }, - { - "tagName": "@preapproved", - "syntaxKind": "modifier" - } - ], - "supportForTags": { - "@alpha": true, - "@beta": true, - "@defaultValue": true, - "@decorator": true, - "@deprecated": true, - "@eventProperty": true, - "@example": true, - "@experimental": true, - "@inheritDoc": true, - "@internal": true, - "@label": true, - "@link": true, - "@override": true, - "@packageDocumentation": true, - "@param": true, - "@privateRemarks": true, - "@public": true, - "@readonly": true, - "@remarks": true, - "@returns": true, - "@sealed": true, - "@see": true, - "@throws": true, - "@typeParam": true, - "@virtual": true, - "@betaDocumentation": true, - "@internalRemarks": true, - "@preapproved": true - }, - "reportUnsupportedHtmlElements": false - } - }, - "kind": "Package", - "canonicalReference": "calckey-js!", - "docComment": "", - "name": "calckey-js", - "preserveMemberOrder": false, - "members": [ - { - "kind": "EntryPoint", - "canonicalReference": "calckey-js!", - "name": "", - "preserveMemberOrder": false, - "members": [ - { - "kind": "TypeAlias", - "canonicalReference": "calckey-js!Acct:type", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare type Acct = " - }, - { - "kind": "Content", - "text": "{\n\tusername: string;\n\thost: string | null;\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "src/acct.ts", - "releaseTag": "Public", - "name": "Acct", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "Namespace", - "canonicalReference": "calckey-js!api:namespace", - "docComment": "", - "excerptTokens": [], - "fileUrlPath": "src/index.ts", - "releaseTag": "None", - "name": "api", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Class", - "canonicalReference": "calckey-js!api.APIClient:class", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare class APIClient " - } - ], - "fileUrlPath": "src/api.ts", - "releaseTag": "Public", - "isAbstract": false, - "name": "APIClient", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Constructor", - "canonicalReference": "calckey-js!api.APIClient:constructor(1)", - "docComment": "/**\n * Constructs a new instance of the `APIClient` class\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "constructor(opts: " - }, - { - "kind": "Content", - "text": "{\n\t\torigin: " - }, - { - "kind": "Reference", - "text": "APIClient", - "canonicalReference": "calckey-js!api.APIClient:class" - }, - { - "kind": "Content", - "text": "[\"origin\"];\n\t\tcredential?: " - }, - { - "kind": "Reference", - "text": "APIClient", - "canonicalReference": "calckey-js!api.APIClient:class" - }, - { - "kind": "Content", - "text": "[\"credential\"];\n\t\tfetch?: " - }, - { - "kind": "Reference", - "text": "APIClient", - "canonicalReference": "calckey-js!api.APIClient:class" - }, - { - "kind": "Content", - "text": "[\"fetch\"] | null | undefined;\n\t}" - }, - { - "kind": "Content", - "text": ");" - } - ], - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "opts", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 8 - }, - "isOptional": false - } - ] - }, - { - "kind": "Property", - "canonicalReference": "calckey-js!api.APIClient#credential:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "credential: " - }, - { - "kind": "Content", - "text": "string | null | undefined" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "credential", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "calckey-js!api.APIClient#fetch:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "fetch: " - }, - { - "kind": "Reference", - "text": "FetchLike", - "canonicalReference": "calckey-js!api.FetchLike:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "fetch", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "calckey-js!api.APIClient#origin:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "origin: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "origin", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "calckey-js!api.APIClient#request:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "request(\n\t\tendpoint: " - }, - { - "kind": "Content", - "text": "E" - }, - { - "kind": "Content", - "text": ",\n\t\tparams?: " - }, - { - "kind": "Content", - "text": "P" - }, - { - "kind": "Content", - "text": ",\n\t\tcredential?: " - }, - { - "kind": "Content", - "text": "string | null | undefined" - }, - { - "kind": "Content", - "text": ",\n\t): " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "<\n\t\t" - }, - { - "kind": "Reference", - "text": "Endpoints", - "canonicalReference": "calckey-js!Endpoints:type" - }, - { - "kind": "Content", - "text": "[E][\"res\"] extends {\n\t\t\t$switch: {\n\t\t\t\t$cases: [any, any][];\n\t\t\t\t$default: any;\n\t\t\t};\n\t\t}\n\t\t\t? " - }, - { - "kind": "Reference", - "text": "IsCaseMatched", - "canonicalReference": "calckey-js!~IsCaseMatched:type" - }, - { - "kind": "Content", - "text": " extends true\n\t\t\t\t? " - }, - { - "kind": "Reference", - "text": "GetCaseResult", - "canonicalReference": "calckey-js!~GetCaseResult:type" - }, - { - "kind": "Content", - "text": "\n\t\t\t\t: " - }, - { - "kind": "Reference", - "text": "IsCaseMatched", - "canonicalReference": "calckey-js!~IsCaseMatched:type" - }, - { - "kind": "Content", - "text": " extends true\n\t\t\t\t? " - }, - { - "kind": "Reference", - "text": "GetCaseResult", - "canonicalReference": "calckey-js!~GetCaseResult:type" - }, - { - "kind": "Content", - "text": "\n\t\t\t\t: " - }, - { - "kind": "Reference", - "text": "IsCaseMatched", - "canonicalReference": "calckey-js!~IsCaseMatched:type" - }, - { - "kind": "Content", - "text": " extends true\n\t\t\t\t? " - }, - { - "kind": "Reference", - "text": "GetCaseResult", - "canonicalReference": "calckey-js!~GetCaseResult:type" - }, - { - "kind": "Content", - "text": "\n\t\t\t\t: " - }, - { - "kind": "Reference", - "text": "IsCaseMatched", - "canonicalReference": "calckey-js!~IsCaseMatched:type" - }, - { - "kind": "Content", - "text": " extends true\n\t\t\t\t? " - }, - { - "kind": "Reference", - "text": "GetCaseResult", - "canonicalReference": "calckey-js!~GetCaseResult:type" - }, - { - "kind": "Content", - "text": "\n\t\t\t\t: " - }, - { - "kind": "Reference", - "text": "IsCaseMatched", - "canonicalReference": "calckey-js!~IsCaseMatched:type" - }, - { - "kind": "Content", - "text": " extends true\n\t\t\t\t? " - }, - { - "kind": "Reference", - "text": "GetCaseResult", - "canonicalReference": "calckey-js!~GetCaseResult:type" - }, - { - "kind": "Content", - "text": "\n\t\t\t\t: " - }, - { - "kind": "Reference", - "text": "IsCaseMatched", - "canonicalReference": "calckey-js!~IsCaseMatched:type" - }, - { - "kind": "Content", - "text": " extends true\n\t\t\t\t? " - }, - { - "kind": "Reference", - "text": "GetCaseResult", - "canonicalReference": "calckey-js!~GetCaseResult:type" - }, - { - "kind": "Content", - "text": "\n\t\t\t\t: " - }, - { - "kind": "Reference", - "text": "IsCaseMatched", - "canonicalReference": "calckey-js!~IsCaseMatched:type" - }, - { - "kind": "Content", - "text": " extends true\n\t\t\t\t? " - }, - { - "kind": "Reference", - "text": "GetCaseResult", - "canonicalReference": "calckey-js!~GetCaseResult:type" - }, - { - "kind": "Content", - "text": "\n\t\t\t\t: " - }, - { - "kind": "Reference", - "text": "IsCaseMatched", - "canonicalReference": "calckey-js!~IsCaseMatched:type" - }, - { - "kind": "Content", - "text": " extends true\n\t\t\t\t? " - }, - { - "kind": "Reference", - "text": "GetCaseResult", - "canonicalReference": "calckey-js!~GetCaseResult:type" - }, - { - "kind": "Content", - "text": "\n\t\t\t\t: " - }, - { - "kind": "Reference", - "text": "IsCaseMatched", - "canonicalReference": "calckey-js!~IsCaseMatched:type" - }, - { - "kind": "Content", - "text": " extends true\n\t\t\t\t? " - }, - { - "kind": "Reference", - "text": "GetCaseResult", - "canonicalReference": "calckey-js!~GetCaseResult:type" - }, - { - "kind": "Content", - "text": "\n\t\t\t\t: " - }, - { - "kind": "Reference", - "text": "IsCaseMatched", - "canonicalReference": "calckey-js!~IsCaseMatched:type" - }, - { - "kind": "Content", - "text": " extends true\n\t\t\t\t? " - }, - { - "kind": "Reference", - "text": "GetCaseResult", - "canonicalReference": "calckey-js!~GetCaseResult:type" - }, - { - "kind": "Content", - "text": "\n\t\t\t\t: " - }, - { - "kind": "Reference", - "text": "Endpoints", - "canonicalReference": "calckey-js!Endpoints:type" - }, - { - "kind": "Content", - "text": "[E][\"res\"][\"$switch\"][\"$default\"]\n\t\t\t: " - }, - { - "kind": "Reference", - "text": "Endpoints", - "canonicalReference": "calckey-js!Endpoints:type" - }, - { - "kind": "Content", - "text": "[E][\"res\"]\n\t>" - }, - { - "kind": "Content", - "text": ";" - } - ], - "typeParameters": [ - { - "typeParameterName": "E", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - }, - { - "typeParameterName": "P", - "constraintTokenRange": { - "startIndex": 4, - "endIndex": 6 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 13, - "endIndex": 61 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "endpoint", - "parameterTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - }, - "isOptional": false - }, - { - "parameterName": "params", - "parameterTypeTokenRange": { - "startIndex": 9, - "endIndex": 10 - }, - "isOptional": true - }, - { - "parameterName": "credential", - "parameterTypeTokenRange": { - "startIndex": 11, - "endIndex": 12 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "request" - } - ], - "implementsTokenRanges": [] - }, - { - "kind": "TypeAlias", - "canonicalReference": "calckey-js!api.APIError:type", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare type APIError = " - }, - { - "kind": "Content", - "text": "{\n\tid: string;\n\tcode: string;\n\tmessage: string;\n\tkind: \"client\" | \"server\";\n\tinfo: " - }, - { - "kind": "Reference", - "text": "Record", - "canonicalReference": "!Record:type" - }, - { - "kind": "Content", - "text": ";\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "src/api.ts", - "releaseTag": "Public", - "name": "APIError", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 4 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "calckey-js!api.FetchLike:type", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare type FetchLike = " - }, - { - "kind": "Content", - "text": "(\n\tinput: string,\n\tinit?: {\n\t\tmethod?: string;\n\t\tbody?: string;\n\t\tcredentials?: " - }, - { - "kind": "Reference", - "text": "RequestCredentials", - "canonicalReference": "!RequestCredentials:type" - }, - { - "kind": "Content", - "text": ";\n\t\tcache?: " - }, - { - "kind": "Reference", - "text": "RequestCache", - "canonicalReference": "!RequestCache:type" - }, - { - "kind": "Content", - "text": ";\n\t},\n) => " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "<{\n\tstatus: number;\n\tjson(): " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": ";\n}>" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "src/api.ts", - "releaseTag": "Public", - "name": "FetchLike", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 10 - } - }, - { - "kind": "Function", - "canonicalReference": "calckey-js!api.isAPIError:function(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function isAPIError(reason: " - }, - { - "kind": "Content", - "text": "any" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "reason", - "canonicalReference": "calckey-js!~reason" - }, - { - "kind": "Content", - "text": " is " - }, - { - "kind": "Reference", - "text": "APIError", - "canonicalReference": "calckey-js!api.APIError:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "src/api.ts", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 6 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "reason", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "isAPIError" - } - ] - }, - { - "kind": "Class", - "canonicalReference": "calckey-js!ChannelConnection:class", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare abstract class Connection<\n\tChannel extends " - }, - { - "kind": "Reference", - "text": "AnyOf", - "canonicalReference": "calckey-js!~AnyOf:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "Channels", - "canonicalReference": "calckey-js!Channels:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": " = " - }, - { - "kind": "Content", - "text": "any" - }, - { - "kind": "Content", - "text": ",\n> extends " - }, - { - "kind": "Reference", - "text": "EventEmitter", - "canonicalReference": "eventemitter3!EventEmitter.EventEmitter" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": " " - } - ], - "fileUrlPath": "src/streaming.ts", - "releaseTag": "Public", - "typeParameters": [ - { - "typeParameterName": "Channel", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "defaultTypeTokenRange": { - "startIndex": 6, - "endIndex": 7 - } - } - ], - "isAbstract": true, - "name": "ChannelConnection", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Constructor", - "canonicalReference": "calckey-js!ChannelConnection:constructor(1)", - "docComment": "/**\n * Constructs a new instance of the `Connection` class\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "constructor(stream: " - }, - { - "kind": "Reference", - "text": "Stream", - "canonicalReference": "calckey-js!Stream:class" - }, - { - "kind": "Content", - "text": ", channel: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ", name?: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ");" - } - ], - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "stream", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "channel", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "name", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": true - } - ] - }, - { - "kind": "Property", - "canonicalReference": "calckey-js!ChannelConnection#channel:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "channel: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "channel", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "calckey-js!ChannelConnection#dispose:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "abstract dispose(): " - }, - { - "kind": "Content", - "text": "void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": true, - "name": "dispose" - }, - { - "kind": "Property", - "canonicalReference": "calckey-js!ChannelConnection#id:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "abstract id: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "id", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": true - }, - { - "kind": "Property", - "canonicalReference": "calckey-js!ChannelConnection#inCount:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "inCount: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "inCount", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "calckey-js!ChannelConnection#name:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "name?: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "name", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "calckey-js!ChannelConnection#outCount:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "outCount: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "outCount", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "calckey-js!ChannelConnection#send:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "send(\n\t\ttype: " - }, - { - "kind": "Content", - "text": "T" - }, - { - "kind": "Content", - "text": ",\n\t\tbody: " - }, - { - "kind": "Content", - "text": "Channel[\"receives\"][T]" - }, - { - "kind": "Content", - "text": ",\n\t): " - }, - { - "kind": "Content", - "text": "void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "type", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "body", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "send" - }, - { - "kind": "Property", - "canonicalReference": "calckey-js!ChannelConnection#stream:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "protected stream: " - }, - { - "kind": "Reference", - "text": "Stream", - "canonicalReference": "calckey-js!Stream:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "stream", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": true, - "isAbstract": false - } - ], - "extendsTokenRange": { - "startIndex": 8, - "endIndex": 10 - }, - "implementsTokenRanges": [] - }, - { - "kind": "TypeAlias", - "canonicalReference": "calckey-js!Channels:type", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare type Channels = " - }, - { - "kind": "Content", - "text": "{\n\tmain: {\n\t\tparams: null;\n\t\tevents: {\n\t\t\tnotification: (payload: " - }, - { - "kind": "Reference", - "text": "Notification", - "canonicalReference": "calckey-js!entities.Notification_2:type" - }, - { - "kind": "Content", - "text": ") => void;\n\t\t\tmention: (payload: " - }, - { - "kind": "Reference", - "text": "Note", - "canonicalReference": "calckey-js!entities.Note:type" - }, - { - "kind": "Content", - "text": ") => void;\n\t\t\treply: (payload: " - }, - { - "kind": "Reference", - "text": "Note", - "canonicalReference": "calckey-js!entities.Note:type" - }, - { - "kind": "Content", - "text": ") => void;\n\t\t\trenote: (payload: " - }, - { - "kind": "Reference", - "text": "Note", - "canonicalReference": "calckey-js!entities.Note:type" - }, - { - "kind": "Content", - "text": ") => void;\n\t\t\tfollow: (payload: " - }, - { - "kind": "Reference", - "text": "User", - "canonicalReference": "calckey-js!entities.User:type" - }, - { - "kind": "Content", - "text": ") => void;\n\t\t\tfollowed: (payload: " - }, - { - "kind": "Reference", - "text": "User", - "canonicalReference": "calckey-js!entities.User:type" - }, - { - "kind": "Content", - "text": ") => void;\n\t\t\tunfollow: (payload: " - }, - { - "kind": "Reference", - "text": "User", - "canonicalReference": "calckey-js!entities.User:type" - }, - { - "kind": "Content", - "text": ") => void;\n\t\t\tmeUpdated: (payload: " - }, - { - "kind": "Reference", - "text": "MeDetailed", - "canonicalReference": "calckey-js!entities.MeDetailed:type" - }, - { - "kind": "Content", - "text": ") => void;\n\t\t\tpageEvent: (payload: " - }, - { - "kind": "Reference", - "text": "PageEvent", - "canonicalReference": "calckey-js!entities.PageEvent:type" - }, - { - "kind": "Content", - "text": ") => void;\n\t\t\turlUploadFinished: (payload: {\n\t\t\t\tmarker: string;\n\t\t\t\tfile: " - }, - { - "kind": "Reference", - "text": "DriveFile", - "canonicalReference": "calckey-js!entities.DriveFile:type" - }, - { - "kind": "Content", - "text": ";\n\t\t\t}) => void;\n\t\t\treadAllNotifications: () => void;\n\t\t\tunreadNotification: (payload: " - }, - { - "kind": "Reference", - "text": "Notification", - "canonicalReference": "calckey-js!entities.Notification_2:type" - }, - { - "kind": "Content", - "text": ") => void;\n\t\t\tunreadMention: (payload: " - }, - { - "kind": "Reference", - "text": "Note", - "canonicalReference": "calckey-js!entities.Note:type" - }, - { - "kind": "Content", - "text": "[\"id\"]) => void;\n\t\t\treadAllUnreadMentions: () => void;\n\t\t\tunreadSpecifiedNote: (payload: " - }, - { - "kind": "Reference", - "text": "Note", - "canonicalReference": "calckey-js!entities.Note:type" - }, - { - "kind": "Content", - "text": "[\"id\"]) => void;\n\t\t\treadAllUnreadSpecifiedNotes: () => void;\n\t\t\treadAllMessagingMessages: () => void;\n\t\t\tmessagingMessage: (payload: " - }, - { - "kind": "Reference", - "text": "MessagingMessage", - "canonicalReference": "calckey-js!entities.MessagingMessage:type" - }, - { - "kind": "Content", - "text": ") => void;\n\t\t\tunreadMessagingMessage: (payload: " - }, - { - "kind": "Reference", - "text": "MessagingMessage", - "canonicalReference": "calckey-js!entities.MessagingMessage:type" - }, - { - "kind": "Content", - "text": ") => void;\n\t\t\treadAllAntennas: () => void;\n\t\t\tunreadAntenna: (payload: " - }, - { - "kind": "Reference", - "text": "Antenna", - "canonicalReference": "calckey-js!entities.Antenna:type" - }, - { - "kind": "Content", - "text": ") => void;\n\t\t\treadAllAnnouncements: () => void;\n\t\t\treadAllChannels: () => void;\n\t\t\tunreadChannel: (payload: " - }, - { - "kind": "Reference", - "text": "Note", - "canonicalReference": "calckey-js!entities.Note:type" - }, - { - "kind": "Content", - "text": "[\"id\"]) => void;\n\t\t\tmyTokenRegenerated: () => void;\n\t\t\treversiNoInvites: () => void;\n\t\t\treversiInvited: (payload: " - }, - { - "kind": "Reference", - "text": "FIXME", - "canonicalReference": "calckey-js!~FIXME:type" - }, - { - "kind": "Content", - "text": ") => void;\n\t\t\tsignin: (payload: " - }, - { - "kind": "Reference", - "text": "FIXME", - "canonicalReference": "calckey-js!~FIXME:type" - }, - { - "kind": "Content", - "text": ") => void;\n\t\t\tregistryUpdated: (payload: {\n\t\t\t\tscope?: string[];\n\t\t\t\tkey: string;\n\t\t\t\tvalue: any | null;\n\t\t\t}) => void;\n\t\t\tdriveFileCreated: (payload: " - }, - { - "kind": "Reference", - "text": "DriveFile", - "canonicalReference": "calckey-js!entities.DriveFile:type" - }, - { - "kind": "Content", - "text": ") => void;\n\t\t\treadAntenna: (payload: " - }, - { - "kind": "Reference", - "text": "Antenna", - "canonicalReference": "calckey-js!entities.Antenna:type" - }, - { - "kind": "Content", - "text": ") => void;\n\t\t};\n\t\treceives: null;\n\t};\n\thomeTimeline: {\n\t\tparams: null;\n\t\tevents: {\n\t\t\tnote: (payload: " - }, - { - "kind": "Reference", - "text": "Note", - "canonicalReference": "calckey-js!entities.Note:type" - }, - { - "kind": "Content", - "text": ") => void;\n\t\t};\n\t\treceives: null;\n\t};\n\tlocalTimeline: {\n\t\tparams: null;\n\t\tevents: {\n\t\t\tnote: (payload: " - }, - { - "kind": "Reference", - "text": "Note", - "canonicalReference": "calckey-js!entities.Note:type" - }, - { - "kind": "Content", - "text": ") => void;\n\t\t};\n\t\treceives: null;\n\t};\n\thybridTimeline: {\n\t\tparams: null;\n\t\tevents: {\n\t\t\tnote: (payload: " - }, - { - "kind": "Reference", - "text": "Note", - "canonicalReference": "calckey-js!entities.Note:type" - }, - { - "kind": "Content", - "text": ") => void;\n\t\t};\n\t\treceives: null;\n\t};\n\trecommendedTimeline: {\n\t\tparams: null;\n\t\tevents: {\n\t\t\tnote: (payload: " - }, - { - "kind": "Reference", - "text": "Note", - "canonicalReference": "calckey-js!entities.Note:type" - }, - { - "kind": "Content", - "text": ") => void;\n\t\t};\n\t\treceives: null;\n\t};\n\tglobalTimeline: {\n\t\tparams: null;\n\t\tevents: {\n\t\t\tnote: (payload: " - }, - { - "kind": "Reference", - "text": "Note", - "canonicalReference": "calckey-js!entities.Note:type" - }, - { - "kind": "Content", - "text": ") => void;\n\t\t};\n\t\treceives: null;\n\t};\n\tantenna: {\n\t\tparams: {\n\t\t\tantennaId: " - }, - { - "kind": "Reference", - "text": "Antenna", - "canonicalReference": "calckey-js!entities.Antenna:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t};\n\t\tevents: {\n\t\t\tnote: (payload: " - }, - { - "kind": "Reference", - "text": "Note", - "canonicalReference": "calckey-js!entities.Note:type" - }, - { - "kind": "Content", - "text": ") => void;\n\t\t};\n\t\treceives: null;\n\t};\n\tmessaging: {\n\t\tparams: {\n\t\t\totherparty?: " - }, - { - "kind": "Reference", - "text": "User", - "canonicalReference": "calckey-js!entities.User:type" - }, - { - "kind": "Content", - "text": "[\"id\"] | null;\n\t\t\tgroup?: " - }, - { - "kind": "Reference", - "text": "UserGroup", - "canonicalReference": "calckey-js!entities.UserGroup:type" - }, - { - "kind": "Content", - "text": "[\"id\"] | null;\n\t\t};\n\t\tevents: {\n\t\t\tmessage: (payload: " - }, - { - "kind": "Reference", - "text": "MessagingMessage", - "canonicalReference": "calckey-js!entities.MessagingMessage:type" - }, - { - "kind": "Content", - "text": ") => void;\n\t\t\tdeleted: (payload: " - }, - { - "kind": "Reference", - "text": "MessagingMessage", - "canonicalReference": "calckey-js!entities.MessagingMessage:type" - }, - { - "kind": "Content", - "text": "[\"id\"]) => void;\n\t\t\tread: (payload: " - }, - { - "kind": "Reference", - "text": "MessagingMessage", - "canonicalReference": "calckey-js!entities.MessagingMessage:type" - }, - { - "kind": "Content", - "text": "[\"id\"][]) => void;\n\t\t\ttypers: (payload: " - }, - { - "kind": "Reference", - "text": "User", - "canonicalReference": "calckey-js!entities.User:type" - }, - { - "kind": "Content", - "text": "[]) => void;\n\t\t};\n\t\treceives: {\n\t\t\tread: {\n\t\t\t\tid: " - }, - { - "kind": "Reference", - "text": "MessagingMessage", - "canonicalReference": "calckey-js!entities.MessagingMessage:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t\t};\n\t\t};\n\t};\n\tserverStats: {\n\t\tparams: null;\n\t\tevents: {\n\t\t\tstats: (payload: " - }, - { - "kind": "Reference", - "text": "FIXME", - "canonicalReference": "calckey-js!~FIXME:type" - }, - { - "kind": "Content", - "text": ") => void;\n\t\t};\n\t\treceives: {\n\t\t\trequestLog: {\n\t\t\t\tid: string | number;\n\t\t\t\tlength: number;\n\t\t\t};\n\t\t};\n\t};\n\tqueueStats: {\n\t\tparams: null;\n\t\tevents: {\n\t\t\tstats: (payload: " - }, - { - "kind": "Reference", - "text": "FIXME", - "canonicalReference": "calckey-js!~FIXME:type" - }, - { - "kind": "Content", - "text": ") => void;\n\t\t};\n\t\treceives: {\n\t\t\trequestLog: {\n\t\t\t\tid: string | number;\n\t\t\t\tlength: number;\n\t\t\t};\n\t\t};\n\t};\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "src/streaming.types.ts", - "releaseTag": "Public", - "name": "Channels", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 76 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "calckey-js!Endpoints:type", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare type Endpoints = " - }, - { - "kind": "Content", - "text": "{\n\t\"admin/abuse-user-reports\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"admin/delete-all-files-of-a-user\": {\n\t\treq: {\n\t\t\tuserId: " - }, - { - "kind": "Reference", - "text": "User", - "canonicalReference": "calckey-js!entities.User:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t};\n\t\tres: null;\n\t};\n\t\"admin/delete-logs\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "NoParams", - "canonicalReference": "calckey-js!~NoParams:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: null;\n\t};\n\t\"admin/get-index-stats\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"admin/get-table-stats\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"admin/invite\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"admin/logs\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"admin/meta\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"admin/reset-password\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"admin/resolve-abuse-user-report\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"admin/resync-chart\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"admin/send-email\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"admin/server-info\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"admin/show-moderation-logs\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"admin/show-user\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"admin/show-users\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"admin/silence-user\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"admin/suspend-user\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"admin/unsilence-user\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"admin/unsuspend-user\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"admin/update-meta\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"admin/vacuum\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"admin/accounts/create\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"admin/ad/create\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"admin/ad/delete\": {\n\t\treq: {\n\t\t\tid: " - }, - { - "kind": "Reference", - "text": "Ad", - "canonicalReference": "calckey-js!entities.Ad:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t};\n\t\tres: null;\n\t};\n\t\"admin/ad/list\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"admin/ad/update\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"admin/announcements/create\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"admin/announcements/delete\": {\n\t\treq: {\n\t\t\tid: " - }, - { - "kind": "Reference", - "text": "Announcement", - "canonicalReference": "calckey-js!entities.Announcement:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t};\n\t\tres: null;\n\t};\n\t\"admin/announcements/list\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"admin/announcements/update\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"admin/drive/clean-remote-files\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"admin/drive/cleanup\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"admin/drive/files\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"admin/drive/show-file\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"admin/emoji/add\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"admin/emoji/copy\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"admin/emoji/list-remote\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"admin/emoji/list\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"admin/emoji/remove\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"admin/emoji/update\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"admin/federation/delete-all-files\": {\n\t\treq: {\n\t\t\thost: string;\n\t\t};\n\t\tres: null;\n\t};\n\t\"admin/federation/refresh-remote-instance-metadata\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"admin/federation/remove-all-following\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"admin/federation/update-instance\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"admin/moderators/add\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"admin/moderators/remove\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"admin/promo/create\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"admin/queue/clear\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"admin/queue/deliver-delayed\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"admin/queue/inbox-delayed\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"admin/queue/jobs\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"admin/queue/stats\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"admin/relays/add\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"admin/relays/list\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"admin/relays/remove\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\tannouncements: {\n\t\treq: {\n\t\t\tlimit?: number;\n\t\t\twithUnreads?: boolean;\n\t\t\tsinceId?: " - }, - { - "kind": "Reference", - "text": "Announcement", - "canonicalReference": "calckey-js!entities.Announcement:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t\tuntilId?: " - }, - { - "kind": "Reference", - "text": "Announcement", - "canonicalReference": "calckey-js!entities.Announcement:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t};\n\t\tres: " - }, - { - "kind": "Reference", - "text": "Announcement", - "canonicalReference": "calckey-js!entities.Announcement:type" - }, - { - "kind": "Content", - "text": "[];\n\t};\n\t\"antennas/create\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "Antenna", - "canonicalReference": "calckey-js!entities.Antenna:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"antennas/delete\": {\n\t\treq: {\n\t\t\tantennaId: " - }, - { - "kind": "Reference", - "text": "Antenna", - "canonicalReference": "calckey-js!entities.Antenna:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t};\n\t\tres: null;\n\t};\n\t\"antennas/list\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "NoParams", - "canonicalReference": "calckey-js!~NoParams:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "Antenna", - "canonicalReference": "calckey-js!entities.Antenna:type" - }, - { - "kind": "Content", - "text": "[];\n\t};\n\t\"antennas/notes\": {\n\t\treq: {\n\t\t\tantennaId: " - }, - { - "kind": "Reference", - "text": "Antenna", - "canonicalReference": "calckey-js!entities.Antenna:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t\tlimit?: number;\n\t\t\tsinceId?: " - }, - { - "kind": "Reference", - "text": "Note", - "canonicalReference": "calckey-js!entities.Note:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t\tuntilId?: " - }, - { - "kind": "Reference", - "text": "Note", - "canonicalReference": "calckey-js!entities.Note:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t};\n\t\tres: " - }, - { - "kind": "Reference", - "text": "Note", - "canonicalReference": "calckey-js!entities.Note:type" - }, - { - "kind": "Content", - "text": "[];\n\t};\n\t\"antennas/show\": {\n\t\treq: {\n\t\t\tantennaId: " - }, - { - "kind": "Reference", - "text": "Antenna", - "canonicalReference": "calckey-js!entities.Antenna:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t};\n\t\tres: " - }, - { - "kind": "Reference", - "text": "Antenna", - "canonicalReference": "calckey-js!entities.Antenna:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"antennas/update\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "Antenna", - "canonicalReference": "calckey-js!entities.Antenna:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"antennas/mark-read\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "Antenna", - "canonicalReference": "calckey-js!entities.Antenna:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"ap/get\": {\n\t\treq: {\n\t\t\turi: string;\n\t\t};\n\t\tres: " - }, - { - "kind": "Reference", - "text": "Record", - "canonicalReference": "!Record:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"ap/show\": {\n\t\treq: {\n\t\t\turi: string;\n\t\t};\n\t\tres:\n\t\t\t| {\n\t\t\t\t\ttype: \"Note\";\n\t\t\t\t\tobject: " - }, - { - "kind": "Reference", - "text": "Note", - "canonicalReference": "calckey-js!entities.Note:type" - }, - { - "kind": "Content", - "text": ";\n\t\t\t }\n\t\t\t| {\n\t\t\t\t\ttype: \"User\";\n\t\t\t\t\tobject: " - }, - { - "kind": "Reference", - "text": "UserDetailed", - "canonicalReference": "calckey-js!entities.UserDetailed:type" - }, - { - "kind": "Content", - "text": ";\n\t\t\t };\n\t};\n\t\"app/create\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "App", - "canonicalReference": "calckey-js!entities.App:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"app/show\": {\n\t\treq: {\n\t\t\tappId: " - }, - { - "kind": "Reference", - "text": "App", - "canonicalReference": "calckey-js!entities.App:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t};\n\t\tres: " - }, - { - "kind": "Reference", - "text": "App", - "canonicalReference": "calckey-js!entities.App:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"auth/accept\": {\n\t\treq: {\n\t\t\ttoken: string;\n\t\t};\n\t\tres: null;\n\t};\n\t\"auth/session/generate\": {\n\t\treq: {\n\t\t\tappSecret: string;\n\t\t};\n\t\tres: {\n\t\t\ttoken: string;\n\t\t\turl: string;\n\t\t};\n\t};\n\t\"auth/session/show\": {\n\t\treq: {\n\t\t\ttoken: string;\n\t\t};\n\t\tres: " - }, - { - "kind": "Reference", - "text": "AuthSession", - "canonicalReference": "calckey-js!entities.AuthSession:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"auth/session/userkey\": {\n\t\treq: {\n\t\t\tappSecret: string;\n\t\t\ttoken: string;\n\t\t};\n\t\tres: {\n\t\t\taccessToken: string;\n\t\t\tuser: " - }, - { - "kind": "Reference", - "text": "User", - "canonicalReference": "calckey-js!entities.User:type" - }, - { - "kind": "Content", - "text": ";\n\t\t};\n\t};\n\t\"blocking/create\": {\n\t\treq: {\n\t\t\tuserId: " - }, - { - "kind": "Reference", - "text": "User", - "canonicalReference": "calckey-js!entities.User:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t};\n\t\tres: " - }, - { - "kind": "Reference", - "text": "UserDetailed", - "canonicalReference": "calckey-js!entities.UserDetailed:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"blocking/delete\": {\n\t\treq: {\n\t\t\tuserId: " - }, - { - "kind": "Reference", - "text": "User", - "canonicalReference": "calckey-js!entities.User:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t};\n\t\tres: " - }, - { - "kind": "Reference", - "text": "UserDetailed", - "canonicalReference": "calckey-js!entities.UserDetailed:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"blocking/list\": {\n\t\treq: {\n\t\t\tlimit?: number;\n\t\t\tsinceId?: " - }, - { - "kind": "Reference", - "text": "Blocking", - "canonicalReference": "calckey-js!entities.Blocking:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t\tuntilId?: " - }, - { - "kind": "Reference", - "text": "Blocking", - "canonicalReference": "calckey-js!entities.Blocking:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t};\n\t\tres: " - }, - { - "kind": "Reference", - "text": "Blocking", - "canonicalReference": "calckey-js!entities.Blocking:type" - }, - { - "kind": "Content", - "text": "[];\n\t};\n\t\"channels/create\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"channels/featured\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"channels/follow\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"channels/followed\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"channels/owned\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"channels/pin-note\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"channels/show\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"channels/timeline\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"channels/unfollow\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"channels/update\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"charts/active-users\": {\n\t\treq: {\n\t\t\tspan: \"day\" | \"hour\";\n\t\t\tlimit?: number;\n\t\t\toffset?: number | null;\n\t\t};\n\t\tres: {\n\t\t\tlocal: {\n\t\t\t\tusers: number[];\n\t\t\t};\n\t\t\tremote: {\n\t\t\t\tusers: number[];\n\t\t\t};\n\t\t};\n\t};\n\t\"charts/drive\": {\n\t\treq: {\n\t\t\tspan: \"day\" | \"hour\";\n\t\t\tlimit?: number;\n\t\t\toffset?: number | null;\n\t\t};\n\t\tres: {\n\t\t\tlocal: {\n\t\t\t\tdecCount: number[];\n\t\t\t\tdecSize: number[];\n\t\t\t\tincCount: number[];\n\t\t\t\tincSize: number[];\n\t\t\t\ttotalCount: number[];\n\t\t\t\ttotalSize: number[];\n\t\t\t};\n\t\t\tremote: {\n\t\t\t\tdecCount: number[];\n\t\t\t\tdecSize: number[];\n\t\t\t\tincCount: number[];\n\t\t\t\tincSize: number[];\n\t\t\t\ttotalCount: number[];\n\t\t\t\ttotalSize: number[];\n\t\t\t};\n\t\t};\n\t};\n\t\"charts/federation\": {\n\t\treq: {\n\t\t\tspan: \"day\" | \"hour\";\n\t\t\tlimit?: number;\n\t\t\toffset?: number | null;\n\t\t};\n\t\tres: {\n\t\t\tinstance: {\n\t\t\t\tdec: number[];\n\t\t\t\tinc: number[];\n\t\t\t\ttotal: number[];\n\t\t\t};\n\t\t};\n\t};\n\t\"charts/hashtag\": {\n\t\treq: {\n\t\t\tspan: \"day\" | \"hour\";\n\t\t\tlimit?: number;\n\t\t\toffset?: number | null;\n\t\t};\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"charts/instance\": {\n\t\treq: {\n\t\t\tspan: \"day\" | \"hour\";\n\t\t\tlimit?: number;\n\t\t\toffset?: number | null;\n\t\t\thost: string;\n\t\t};\n\t\tres: {\n\t\t\tdrive: {\n\t\t\t\tdecFiles: number[];\n\t\t\t\tdecUsage: number[];\n\t\t\t\tincFiles: number[];\n\t\t\t\tincUsage: number[];\n\t\t\t\ttotalFiles: number[];\n\t\t\t\ttotalUsage: number[];\n\t\t\t};\n\t\t\tfollowers: {\n\t\t\t\tdec: number[];\n\t\t\t\tinc: number[];\n\t\t\t\ttotal: number[];\n\t\t\t};\n\t\t\tfollowing: {\n\t\t\t\tdec: number[];\n\t\t\t\tinc: number[];\n\t\t\t\ttotal: number[];\n\t\t\t};\n\t\t\tnotes: {\n\t\t\t\tdec: number[];\n\t\t\t\tinc: number[];\n\t\t\t\ttotal: number[];\n\t\t\t\tdiffs: {\n\t\t\t\t\tnormal: number[];\n\t\t\t\t\trenote: number[];\n\t\t\t\t\treply: number[];\n\t\t\t\t};\n\t\t\t};\n\t\t\trequests: {\n\t\t\t\tfailed: number[];\n\t\t\t\treceived: number[];\n\t\t\t\tsucceeded: number[];\n\t\t\t};\n\t\t\tusers: {\n\t\t\t\tdec: number[];\n\t\t\t\tinc: number[];\n\t\t\t\ttotal: number[];\n\t\t\t};\n\t\t};\n\t};\n\t\"charts/network\": {\n\t\treq: {\n\t\t\tspan: \"day\" | \"hour\";\n\t\t\tlimit?: number;\n\t\t\toffset?: number | null;\n\t\t};\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"charts/notes\": {\n\t\treq: {\n\t\t\tspan: \"day\" | \"hour\";\n\t\t\tlimit?: number;\n\t\t\toffset?: number | null;\n\t\t};\n\t\tres: {\n\t\t\tlocal: {\n\t\t\t\tdec: number[];\n\t\t\t\tinc: number[];\n\t\t\t\ttotal: number[];\n\t\t\t\tdiffs: {\n\t\t\t\t\tnormal: number[];\n\t\t\t\t\trenote: number[];\n\t\t\t\t\treply: number[];\n\t\t\t\t};\n\t\t\t};\n\t\t\tremote: {\n\t\t\t\tdec: number[];\n\t\t\t\tinc: number[];\n\t\t\t\ttotal: number[];\n\t\t\t\tdiffs: {\n\t\t\t\t\tnormal: number[];\n\t\t\t\t\trenote: number[];\n\t\t\t\t\treply: number[];\n\t\t\t\t};\n\t\t\t};\n\t\t};\n\t};\n\t\"charts/user/drive\": {\n\t\treq: {\n\t\t\tspan: \"day\" | \"hour\";\n\t\t\tlimit?: number;\n\t\t\toffset?: number | null;\n\t\t\tuserId: " - }, - { - "kind": "Reference", - "text": "User", - "canonicalReference": "calckey-js!entities.User:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t};\n\t\tres: {\n\t\t\tdecCount: number[];\n\t\t\tdecSize: number[];\n\t\t\tincCount: number[];\n\t\t\tincSize: number[];\n\t\t\ttotalCount: number[];\n\t\t\ttotalSize: number[];\n\t\t};\n\t};\n\t\"charts/user/following\": {\n\t\treq: {\n\t\t\tspan: \"day\" | \"hour\";\n\t\t\tlimit?: number;\n\t\t\toffset?: number | null;\n\t\t\tuserId: " - }, - { - "kind": "Reference", - "text": "User", - "canonicalReference": "calckey-js!entities.User:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t};\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"charts/user/notes\": {\n\t\treq: {\n\t\t\tspan: \"day\" | \"hour\";\n\t\t\tlimit?: number;\n\t\t\toffset?: number | null;\n\t\t\tuserId: " - }, - { - "kind": "Reference", - "text": "User", - "canonicalReference": "calckey-js!entities.User:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t};\n\t\tres: {\n\t\t\tdec: number[];\n\t\t\tinc: number[];\n\t\t\ttotal: number[];\n\t\t\tdiffs: {\n\t\t\t\tnormal: number[];\n\t\t\t\trenote: number[];\n\t\t\t\treply: number[];\n\t\t\t};\n\t\t};\n\t};\n\t\"charts/user/reactions\": {\n\t\treq: {\n\t\t\tspan: \"day\" | \"hour\";\n\t\t\tlimit?: number;\n\t\t\toffset?: number | null;\n\t\t\tuserId: " - }, - { - "kind": "Reference", - "text": "User", - "canonicalReference": "calckey-js!entities.User:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t};\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"charts/users\": {\n\t\treq: {\n\t\t\tspan: \"day\" | \"hour\";\n\t\t\tlimit?: number;\n\t\t\toffset?: number | null;\n\t\t};\n\t\tres: {\n\t\t\tlocal: {\n\t\t\t\tdec: number[];\n\t\t\t\tinc: number[];\n\t\t\t\ttotal: number[];\n\t\t\t};\n\t\t\tremote: {\n\t\t\t\tdec: number[];\n\t\t\t\tinc: number[];\n\t\t\t\ttotal: number[];\n\t\t\t};\n\t\t};\n\t};\n\t\"clips/add-note\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"clips/create\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"clips/delete\": {\n\t\treq: {\n\t\t\tclipId: " - }, - { - "kind": "Reference", - "text": "Clip", - "canonicalReference": "calckey-js!entities.Clip:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t};\n\t\tres: null;\n\t};\n\t\"clips/list\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"clips/notes\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"clips/show\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"clips/update\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\tdrive: {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "NoParams", - "canonicalReference": "calckey-js!~NoParams:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: {\n\t\t\tcapacity: number;\n\t\t\tusage: number;\n\t\t};\n\t};\n\t\"drive/files\": {\n\t\treq: {\n\t\t\tfolderId?: " - }, - { - "kind": "Reference", - "text": "DriveFolder", - "canonicalReference": "calckey-js!entities.DriveFolder:type" - }, - { - "kind": "Content", - "text": "[\"id\"] | null;\n\t\t\ttype?: " - }, - { - "kind": "Reference", - "text": "DriveFile", - "canonicalReference": "calckey-js!entities.DriveFile:type" - }, - { - "kind": "Content", - "text": "[\"type\"] | null;\n\t\t\tlimit?: number;\n\t\t\tsinceId?: " - }, - { - "kind": "Reference", - "text": "DriveFile", - "canonicalReference": "calckey-js!entities.DriveFile:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t\tuntilId?: " - }, - { - "kind": "Reference", - "text": "DriveFile", - "canonicalReference": "calckey-js!entities.DriveFile:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t};\n\t\tres: " - }, - { - "kind": "Reference", - "text": "DriveFile", - "canonicalReference": "calckey-js!entities.DriveFile:type" - }, - { - "kind": "Content", - "text": "[];\n\t};\n\t\"drive/files/attached-notes\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"drive/files/check-existence\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"drive/files/create\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"drive/files/delete\": {\n\t\treq: {\n\t\t\tfileId: " - }, - { - "kind": "Reference", - "text": "DriveFile", - "canonicalReference": "calckey-js!entities.DriveFile:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t};\n\t\tres: null;\n\t};\n\t\"drive/files/find-by-hash\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"drive/files/find\": {\n\t\treq: {\n\t\t\tname: string;\n\t\t\tfolderId?: " - }, - { - "kind": "Reference", - "text": "DriveFolder", - "canonicalReference": "calckey-js!entities.DriveFolder:type" - }, - { - "kind": "Content", - "text": "[\"id\"] | null;\n\t\t};\n\t\tres: " - }, - { - "kind": "Reference", - "text": "DriveFile", - "canonicalReference": "calckey-js!entities.DriveFile:type" - }, - { - "kind": "Content", - "text": "[];\n\t};\n\t\"drive/files/show\": {\n\t\treq: {\n\t\t\tfileId?: " - }, - { - "kind": "Reference", - "text": "DriveFile", - "canonicalReference": "calckey-js!entities.DriveFile:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t\turl?: string;\n\t\t};\n\t\tres: " - }, - { - "kind": "Reference", - "text": "DriveFile", - "canonicalReference": "calckey-js!entities.DriveFile:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"drive/files/update\": {\n\t\treq: {\n\t\t\tfileId: " - }, - { - "kind": "Reference", - "text": "DriveFile", - "canonicalReference": "calckey-js!entities.DriveFile:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t\tfolderId?: " - }, - { - "kind": "Reference", - "text": "DriveFolder", - "canonicalReference": "calckey-js!entities.DriveFolder:type" - }, - { - "kind": "Content", - "text": "[\"id\"] | null;\n\t\t\tname?: string;\n\t\t\tisSensitive?: boolean;\n\t\t\tcomment?: string | null;\n\t\t};\n\t\tres: " - }, - { - "kind": "Reference", - "text": "DriveFile", - "canonicalReference": "calckey-js!entities.DriveFile:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"drive/files/upload-from-url\": {\n\t\treq: {\n\t\t\turl: string;\n\t\t\tfolderId?: " - }, - { - "kind": "Reference", - "text": "DriveFolder", - "canonicalReference": "calckey-js!entities.DriveFolder:type" - }, - { - "kind": "Content", - "text": "[\"id\"] | null;\n\t\t\tisSensitive?: boolean;\n\t\t\tcomment?: string | null;\n\t\t\tmarker?: string | null;\n\t\t\tforce?: boolean;\n\t\t};\n\t\tres: null;\n\t};\n\t\"drive/folders\": {\n\t\treq: {\n\t\t\tfolderId?: " - }, - { - "kind": "Reference", - "text": "DriveFolder", - "canonicalReference": "calckey-js!entities.DriveFolder:type" - }, - { - "kind": "Content", - "text": "[\"id\"] | null;\n\t\t\tlimit?: number;\n\t\t\tsinceId?: " - }, - { - "kind": "Reference", - "text": "DriveFile", - "canonicalReference": "calckey-js!entities.DriveFile:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t\tuntilId?: " - }, - { - "kind": "Reference", - "text": "DriveFile", - "canonicalReference": "calckey-js!entities.DriveFile:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t};\n\t\tres: " - }, - { - "kind": "Reference", - "text": "DriveFolder", - "canonicalReference": "calckey-js!entities.DriveFolder:type" - }, - { - "kind": "Content", - "text": "[];\n\t};\n\t\"drive/folders/create\": {\n\t\treq: {\n\t\t\tname?: string;\n\t\t\tparentId?: " - }, - { - "kind": "Reference", - "text": "DriveFolder", - "canonicalReference": "calckey-js!entities.DriveFolder:type" - }, - { - "kind": "Content", - "text": "[\"id\"] | null;\n\t\t};\n\t\tres: " - }, - { - "kind": "Reference", - "text": "DriveFolder", - "canonicalReference": "calckey-js!entities.DriveFolder:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"drive/folders/delete\": {\n\t\treq: {\n\t\t\tfolderId: " - }, - { - "kind": "Reference", - "text": "DriveFolder", - "canonicalReference": "calckey-js!entities.DriveFolder:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t};\n\t\tres: null;\n\t};\n\t\"drive/folders/find\": {\n\t\treq: {\n\t\t\tname: string;\n\t\t\tparentId?: " - }, - { - "kind": "Reference", - "text": "DriveFolder", - "canonicalReference": "calckey-js!entities.DriveFolder:type" - }, - { - "kind": "Content", - "text": "[\"id\"] | null;\n\t\t};\n\t\tres: " - }, - { - "kind": "Reference", - "text": "DriveFolder", - "canonicalReference": "calckey-js!entities.DriveFolder:type" - }, - { - "kind": "Content", - "text": "[];\n\t};\n\t\"drive/folders/show\": {\n\t\treq: {\n\t\t\tfolderId: " - }, - { - "kind": "Reference", - "text": "DriveFolder", - "canonicalReference": "calckey-js!entities.DriveFolder:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t};\n\t\tres: " - }, - { - "kind": "Reference", - "text": "DriveFolder", - "canonicalReference": "calckey-js!entities.DriveFolder:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"drive/folders/update\": {\n\t\treq: {\n\t\t\tfolderId: " - }, - { - "kind": "Reference", - "text": "DriveFolder", - "canonicalReference": "calckey-js!entities.DriveFolder:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t\tname?: string;\n\t\t\tparentId?: " - }, - { - "kind": "Reference", - "text": "DriveFolder", - "canonicalReference": "calckey-js!entities.DriveFolder:type" - }, - { - "kind": "Content", - "text": "[\"id\"] | null;\n\t\t};\n\t\tres: " - }, - { - "kind": "Reference", - "text": "DriveFolder", - "canonicalReference": "calckey-js!entities.DriveFolder:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"drive/stream\": {\n\t\treq: {\n\t\t\ttype?: " - }, - { - "kind": "Reference", - "text": "DriveFile", - "canonicalReference": "calckey-js!entities.DriveFile:type" - }, - { - "kind": "Content", - "text": "[\"type\"] | null;\n\t\t\tlimit?: number;\n\t\t\tsinceId?: " - }, - { - "kind": "Reference", - "text": "DriveFile", - "canonicalReference": "calckey-js!entities.DriveFile:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t\tuntilId?: " - }, - { - "kind": "Reference", - "text": "DriveFile", - "canonicalReference": "calckey-js!entities.DriveFile:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t};\n\t\tres: " - }, - { - "kind": "Reference", - "text": "DriveFile", - "canonicalReference": "calckey-js!entities.DriveFile:type" - }, - { - "kind": "Content", - "text": "[];\n\t};\n\tendpoint: {\n\t\treq: {\n\t\t\tendpoint: string;\n\t\t};\n\t\tres: {\n\t\t\tparams: {\n\t\t\t\tname: string;\n\t\t\t\ttype: string;\n\t\t\t}[];\n\t\t};\n\t};\n\tendpoints: {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "NoParams", - "canonicalReference": "calckey-js!~NoParams:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: string[];\n\t};\n\t\"federation/dns\": {\n\t\treq: {\n\t\t\thost: string;\n\t\t};\n\t\tres: {\n\t\t\ta: string[];\n\t\t\taaaa: string[];\n\t\t\tcname: string[];\n\t\t\ttxt: string[];\n\t\t};\n\t};\n\t\"federation/followers\": {\n\t\treq: {\n\t\t\thost: string;\n\t\t\tlimit?: number;\n\t\t\tsinceId?: " - }, - { - "kind": "Reference", - "text": "Following", - "canonicalReference": "calckey-js!entities.Following:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t\tuntilId?: " - }, - { - "kind": "Reference", - "text": "Following", - "canonicalReference": "calckey-js!entities.Following:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t};\n\t\tres: " - }, - { - "kind": "Reference", - "text": "FollowingFolloweePopulated", - "canonicalReference": "calckey-js!entities.FollowingFolloweePopulated:type" - }, - { - "kind": "Content", - "text": "[];\n\t};\n\t\"federation/following\": {\n\t\treq: {\n\t\t\thost: string;\n\t\t\tlimit?: number;\n\t\t\tsinceId?: " - }, - { - "kind": "Reference", - "text": "Following", - "canonicalReference": "calckey-js!entities.Following:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t\tuntilId?: " - }, - { - "kind": "Reference", - "text": "Following", - "canonicalReference": "calckey-js!entities.Following:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t};\n\t\tres: " - }, - { - "kind": "Reference", - "text": "FollowingFolloweePopulated", - "canonicalReference": "calckey-js!entities.FollowingFolloweePopulated:type" - }, - { - "kind": "Content", - "text": "[];\n\t};\n\t\"federation/instances\": {\n\t\treq: {\n\t\t\thost?: string | null;\n\t\t\tblocked?: boolean | null;\n\t\t\tnotResponding?: boolean | null;\n\t\t\tsuspended?: boolean | null;\n\t\t\tfederating?: boolean | null;\n\t\t\tsubscribing?: boolean | null;\n\t\t\tpublishing?: boolean | null;\n\t\t\tlimit?: number;\n\t\t\toffset?: number;\n\t\t\tsort?:\n\t\t\t\t| \"+pubSub\"\n\t\t\t\t| \"-pubSub\"\n\t\t\t\t| \"+notes\"\n\t\t\t\t| \"-notes\"\n\t\t\t\t| \"+users\"\n\t\t\t\t| \"-users\"\n\t\t\t\t| \"+following\"\n\t\t\t\t| \"-following\"\n\t\t\t\t| \"+followers\"\n\t\t\t\t| \"-followers\"\n\t\t\t\t| \"+caughtAt\"\n\t\t\t\t| \"-caughtAt\"\n\t\t\t\t| \"+lastCommunicatedAt\"\n\t\t\t\t| \"-lastCommunicatedAt\"\n\t\t\t\t| \"+driveUsage\"\n\t\t\t\t| \"-driveUsage\"\n\t\t\t\t| \"+driveFiles\"\n\t\t\t\t| \"-driveFiles\";\n\t\t};\n\t\tres: " - }, - { - "kind": "Reference", - "text": "Instance", - "canonicalReference": "calckey-js!entities.Instance:type" - }, - { - "kind": "Content", - "text": "[];\n\t};\n\t\"federation/show-instance\": {\n\t\treq: {\n\t\t\thost: string;\n\t\t};\n\t\tres: " - }, - { - "kind": "Reference", - "text": "Instance", - "canonicalReference": "calckey-js!entities.Instance:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"federation/update-remote-user\": {\n\t\treq: {\n\t\t\tuserId: " - }, - { - "kind": "Reference", - "text": "User", - "canonicalReference": "calckey-js!entities.User:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t};\n\t\tres: null;\n\t};\n\t\"federation/users\": {\n\t\treq: {\n\t\t\thost: string;\n\t\t\tlimit?: number;\n\t\t\tsinceId?: " - }, - { - "kind": "Reference", - "text": "User", - "canonicalReference": "calckey-js!entities.User:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t\tuntilId?: " - }, - { - "kind": "Reference", - "text": "User", - "canonicalReference": "calckey-js!entities.User:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t};\n\t\tres: " - }, - { - "kind": "Reference", - "text": "UserDetailed", - "canonicalReference": "calckey-js!entities.UserDetailed:type" - }, - { - "kind": "Content", - "text": "[];\n\t};\n\t\"following/create\": {\n\t\treq: {\n\t\t\tuserId: " - }, - { - "kind": "Reference", - "text": "User", - "canonicalReference": "calckey-js!entities.User:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t};\n\t\tres: " - }, - { - "kind": "Reference", - "text": "User", - "canonicalReference": "calckey-js!entities.User:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"following/delete\": {\n\t\treq: {\n\t\t\tuserId: " - }, - { - "kind": "Reference", - "text": "User", - "canonicalReference": "calckey-js!entities.User:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t};\n\t\tres: " - }, - { - "kind": "Reference", - "text": "User", - "canonicalReference": "calckey-js!entities.User:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"following/requests/accept\": {\n\t\treq: {\n\t\t\tuserId: " - }, - { - "kind": "Reference", - "text": "User", - "canonicalReference": "calckey-js!entities.User:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t};\n\t\tres: null;\n\t};\n\t\"following/requests/cancel\": {\n\t\treq: {\n\t\t\tuserId: " - }, - { - "kind": "Reference", - "text": "User", - "canonicalReference": "calckey-js!entities.User:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t};\n\t\tres: " - }, - { - "kind": "Reference", - "text": "User", - "canonicalReference": "calckey-js!entities.User:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"following/requests/list\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "NoParams", - "canonicalReference": "calckey-js!~NoParams:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "FollowRequest", - "canonicalReference": "calckey-js!entities.FollowRequest:type" - }, - { - "kind": "Content", - "text": "[];\n\t};\n\t\"following/requests/reject\": {\n\t\treq: {\n\t\t\tuserId: " - }, - { - "kind": "Reference", - "text": "User", - "canonicalReference": "calckey-js!entities.User:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t};\n\t\tres: null;\n\t};\n\t\"gallery/featured\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"gallery/popular\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"gallery/posts\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"gallery/posts/create\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"gallery/posts/delete\": {\n\t\treq: {\n\t\t\tpostId: " - }, - { - "kind": "Reference", - "text": "GalleryPost", - "canonicalReference": "calckey-js!entities.GalleryPost:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t};\n\t\tres: null;\n\t};\n\t\"gallery/posts/like\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"gallery/posts/show\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"gallery/posts/unlike\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"gallery/posts/update\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"games/reversi/games\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"games/reversi/games/show\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"games/reversi/games/surrender\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"games/reversi/invitations\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"games/reversi/match\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"games/reversi/match/cancel\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"get-online-users-count\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "NoParams", - "canonicalReference": "calckey-js!~NoParams:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: {\n\t\t\tcount: number;\n\t\t};\n\t};\n\t\"hashtags/list\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"hashtags/search\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"hashtags/show\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"hashtags/trend\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"hashtags/users\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\ti: {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "NoParams", - "canonicalReference": "calckey-js!~NoParams:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "User", - "canonicalReference": "calckey-js!entities.User:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"i/apps\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"i/authorized-apps\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"i/change-password\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"i/delete-account\": {\n\t\treq: {\n\t\t\tpassword: string;\n\t\t};\n\t\tres: null;\n\t};\n\t\"i/export-blocking\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"i/export-following\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"i/export-mute\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"i/export-notes\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"i/export-user-lists\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"i/favorites\": {\n\t\treq: {\n\t\t\tlimit?: number;\n\t\t\tsinceId?: " - }, - { - "kind": "Reference", - "text": "NoteFavorite", - "canonicalReference": "calckey-js!entities.NoteFavorite:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t\tuntilId?: " - }, - { - "kind": "Reference", - "text": "NoteFavorite", - "canonicalReference": "calckey-js!entities.NoteFavorite:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t};\n\t\tres: " - }, - { - "kind": "Reference", - "text": "NoteFavorite", - "canonicalReference": "calckey-js!entities.NoteFavorite:type" - }, - { - "kind": "Content", - "text": "[];\n\t};\n\t\"i/gallery/likes\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"i/gallery/posts\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"i/get-word-muted-notes-count\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"i/import-following\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"i/import-user-lists\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"i/move\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"i/known-as\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"i/notifications\": {\n\t\treq: {\n\t\t\tlimit?: number;\n\t\t\tsinceId?: " - }, - { - "kind": "Reference", - "text": "Notification", - "canonicalReference": "calckey-js!entities.Notification_2:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t\tuntilId?: " - }, - { - "kind": "Reference", - "text": "Notification", - "canonicalReference": "calckey-js!entities.Notification_2:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t\tfollowing?: boolean;\n\t\t\tmarkAsRead?: boolean;\n\t\t\tincludeTypes?: " - }, - { - "kind": "Reference", - "text": "Notification", - "canonicalReference": "calckey-js!entities.Notification_2:type" - }, - { - "kind": "Content", - "text": "[\"type\"][];\n\t\t\texcludeTypes?: " - }, - { - "kind": "Reference", - "text": "Notification", - "canonicalReference": "calckey-js!entities.Notification_2:type" - }, - { - "kind": "Content", - "text": "[\"type\"][];\n\t\t};\n\t\tres: " - }, - { - "kind": "Reference", - "text": "Notification", - "canonicalReference": "calckey-js!entities.Notification_2:type" - }, - { - "kind": "Content", - "text": "[];\n\t};\n\t\"i/page-likes\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"i/pages\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"i/pin\": {\n\t\treq: {\n\t\t\tnoteId: " - }, - { - "kind": "Reference", - "text": "Note", - "canonicalReference": "calckey-js!entities.Note:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t};\n\t\tres: " - }, - { - "kind": "Reference", - "text": "MeDetailed", - "canonicalReference": "calckey-js!entities.MeDetailed:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"i/read-all-messaging-messages\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"i/read-all-unread-notes\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"i/read-announcement\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"i/regenerate-token\": {\n\t\treq: {\n\t\t\tpassword: string;\n\t\t};\n\t\tres: null;\n\t};\n\t\"i/registry/get-all\": {\n\t\treq: {\n\t\t\tscope?: string[];\n\t\t};\n\t\tres: " - }, - { - "kind": "Reference", - "text": "Record", - "canonicalReference": "!Record:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"i/registry/get-detail\": {\n\t\treq: {\n\t\t\tkey: string;\n\t\t\tscope?: string[];\n\t\t};\n\t\tres: {\n\t\t\tupdatedAt: " - }, - { - "kind": "Reference", - "text": "DateString", - "canonicalReference": "calckey-js!entities.DateString:type" - }, - { - "kind": "Content", - "text": ";\n\t\t\tvalue: any;\n\t\t};\n\t};\n\t\"i/registry/get\": {\n\t\treq: {\n\t\t\tkey: string;\n\t\t\tscope?: string[];\n\t\t};\n\t\tres: any;\n\t};\n\t\"i/registry/keys-with-type\": {\n\t\treq: {\n\t\t\tscope?: string[];\n\t\t};\n\t\tres: " - }, - { - "kind": "Reference", - "text": "Record", - "canonicalReference": "!Record:type" - }, - { - "kind": "Content", - "text": "<\n\t\t\tstring,\n\t\t\t\"null\" | \"array\" | \"number\" | \"string\" | \"boolean\" | \"object\"\n\t\t>;\n\t};\n\t\"i/registry/keys\": {\n\t\treq: {\n\t\t\tscope?: string[];\n\t\t};\n\t\tres: string[];\n\t};\n\t\"i/registry/remove\": {\n\t\treq: {\n\t\t\tkey: string;\n\t\t\tscope?: string[];\n\t\t};\n\t\tres: null;\n\t};\n\t\"i/registry/scopes\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "NoParams", - "canonicalReference": "calckey-js!~NoParams:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: string[][];\n\t};\n\t\"i/registry/set\": {\n\t\treq: {\n\t\t\tkey: string;\n\t\t\tvalue: any;\n\t\t\tscope?: string[];\n\t\t};\n\t\tres: null;\n\t};\n\t\"i/revoke-token\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"i/signin-history\": {\n\t\treq: {\n\t\t\tlimit?: number;\n\t\t\tsinceId?: " - }, - { - "kind": "Reference", - "text": "Signin", - "canonicalReference": "calckey-js!entities.Signin:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t\tuntilId?: " - }, - { - "kind": "Reference", - "text": "Signin", - "canonicalReference": "calckey-js!entities.Signin:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t};\n\t\tres: " - }, - { - "kind": "Reference", - "text": "Signin", - "canonicalReference": "calckey-js!entities.Signin:type" - }, - { - "kind": "Content", - "text": "[];\n\t};\n\t\"i/unpin\": {\n\t\treq: {\n\t\t\tnoteId: " - }, - { - "kind": "Reference", - "text": "Note", - "canonicalReference": "calckey-js!entities.Note:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t};\n\t\tres: " - }, - { - "kind": "Reference", - "text": "MeDetailed", - "canonicalReference": "calckey-js!entities.MeDetailed:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"i/update-email\": {\n\t\treq: {\n\t\t\tpassword: string;\n\t\t\temail?: string | null;\n\t\t};\n\t\tres: " - }, - { - "kind": "Reference", - "text": "MeDetailed", - "canonicalReference": "calckey-js!entities.MeDetailed:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"i/update\": {\n\t\treq: {\n\t\t\tname?: string | null;\n\t\t\tdescription?: string | null;\n\t\t\tlang?: string | null;\n\t\t\tlocation?: string | null;\n\t\t\tbirthday?: string | null;\n\t\t\tavatarId?: " - }, - { - "kind": "Reference", - "text": "DriveFile", - "canonicalReference": "calckey-js!entities.DriveFile:type" - }, - { - "kind": "Content", - "text": "[\"id\"] | null;\n\t\t\tbannerId?: " - }, - { - "kind": "Reference", - "text": "DriveFile", - "canonicalReference": "calckey-js!entities.DriveFile:type" - }, - { - "kind": "Content", - "text": "[\"id\"] | null;\n\t\t\tfields?: {\n\t\t\t\tname: string;\n\t\t\t\tvalue: string;\n\t\t\t}[];\n\t\t\tisLocked?: boolean;\n\t\t\tisExplorable?: boolean;\n\t\t\thideOnlineStatus?: boolean;\n\t\t\tcarefulBot?: boolean;\n\t\t\tautoAcceptFollowed?: boolean;\n\t\t\tnoCrawle?: boolean;\n\t\t\tpreventAiLearning?: boolean;\n\t\t\tisBot?: boolean;\n\t\t\tisCat?: boolean;\n\t\t\tinjectFeaturedNote?: boolean;\n\t\t\treceiveAnnouncementEmail?: boolean;\n\t\t\talwaysMarkNsfw?: boolean;\n\t\t\tmutedWords?: string[][];\n\t\t\tmutingNotificationTypes?: " - }, - { - "kind": "Reference", - "text": "Notification", - "canonicalReference": "calckey-js!entities.Notification_2:type" - }, - { - "kind": "Content", - "text": "[\"type\"][];\n\t\t\temailNotificationTypes?: string[];\n\t\t};\n\t\tres: " - }, - { - "kind": "Reference", - "text": "MeDetailed", - "canonicalReference": "calckey-js!entities.MeDetailed:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"i/user-group-invites\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"i/2fa/done\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"i/2fa/key-done\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"i/2fa/password-less\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"i/2fa/register-key\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"i/2fa/register\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"i/2fa/update-key\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"i/2fa/remove-key\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"i/2fa/unregister\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"messaging/history\": {\n\t\treq: {\n\t\t\tlimit?: number;\n\t\t\tgroup?: boolean;\n\t\t};\n\t\tres: " - }, - { - "kind": "Reference", - "text": "MessagingMessage", - "canonicalReference": "calckey-js!entities.MessagingMessage:type" - }, - { - "kind": "Content", - "text": "[];\n\t};\n\t\"messaging/messages\": {\n\t\treq: {\n\t\t\tuserId?: " - }, - { - "kind": "Reference", - "text": "User", - "canonicalReference": "calckey-js!entities.User:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t\tgroupId?: " - }, - { - "kind": "Reference", - "text": "UserGroup", - "canonicalReference": "calckey-js!entities.UserGroup:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t\tlimit?: number;\n\t\t\tsinceId?: " - }, - { - "kind": "Reference", - "text": "MessagingMessage", - "canonicalReference": "calckey-js!entities.MessagingMessage:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t\tuntilId?: " - }, - { - "kind": "Reference", - "text": "MessagingMessage", - "canonicalReference": "calckey-js!entities.MessagingMessage:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t\tmarkAsRead?: boolean;\n\t\t};\n\t\tres: " - }, - { - "kind": "Reference", - "text": "MessagingMessage", - "canonicalReference": "calckey-js!entities.MessagingMessage:type" - }, - { - "kind": "Content", - "text": "[];\n\t};\n\t\"messaging/messages/create\": {\n\t\treq: {\n\t\t\tuserId?: " - }, - { - "kind": "Reference", - "text": "User", - "canonicalReference": "calckey-js!entities.User:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t\tgroupId?: " - }, - { - "kind": "Reference", - "text": "UserGroup", - "canonicalReference": "calckey-js!entities.UserGroup:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t\ttext?: string;\n\t\t\tfileId?: " - }, - { - "kind": "Reference", - "text": "DriveFile", - "canonicalReference": "calckey-js!entities.DriveFile:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t};\n\t\tres: " - }, - { - "kind": "Reference", - "text": "MessagingMessage", - "canonicalReference": "calckey-js!entities.MessagingMessage:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"messaging/messages/delete\": {\n\t\treq: {\n\t\t\tmessageId: " - }, - { - "kind": "Reference", - "text": "MessagingMessage", - "canonicalReference": "calckey-js!entities.MessagingMessage:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t};\n\t\tres: null;\n\t};\n\t\"messaging/messages/read\": {\n\t\treq: {\n\t\t\tmessageId: " - }, - { - "kind": "Reference", - "text": "MessagingMessage", - "canonicalReference": "calckey-js!entities.MessagingMessage:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t};\n\t\tres: null;\n\t};\n\tmeta: {\n\t\treq: {\n\t\t\tdetail?: boolean;\n\t\t};\n\t\tres: {\n\t\t\t$switch: {\n\t\t\t\t$cases: [\n\t\t\t\t\t[\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tdetail: true;\n\t\t\t\t\t\t},\n\t\t\t\t\t\t" - }, - { - "kind": "Reference", - "text": "DetailedInstanceMetadata", - "canonicalReference": "calckey-js!entities.DetailedInstanceMetadata:type" - }, - { - "kind": "Content", - "text": ",\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tdetail: false;\n\t\t\t\t\t\t},\n\t\t\t\t\t\t" - }, - { - "kind": "Reference", - "text": "LiteInstanceMetadata", - "canonicalReference": "calckey-js!entities.LiteInstanceMetadata:type" - }, - { - "kind": "Content", - "text": ",\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tdetail: boolean;\n\t\t\t\t\t\t},\n\t\t\t\t\t\t" - }, - { - "kind": "Reference", - "text": "LiteInstanceMetadata", - "canonicalReference": "calckey-js!entities.LiteInstanceMetadata:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "DetailedInstanceMetadata", - "canonicalReference": "calckey-js!entities.DetailedInstanceMetadata:type" - }, - { - "kind": "Content", - "text": ",\n\t\t\t\t\t],\n\t\t\t\t];\n\t\t\t\t$default: " - }, - { - "kind": "Reference", - "text": "LiteInstanceMetadata", - "canonicalReference": "calckey-js!entities.LiteInstanceMetadata:type" - }, - { - "kind": "Content", - "text": ";\n\t\t\t};\n\t\t};\n\t};\n\t\"miauth/gen-token\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"mute/create\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"mute/delete\": {\n\t\treq: {\n\t\t\tuserId: " - }, - { - "kind": "Reference", - "text": "User", - "canonicalReference": "calckey-js!entities.User:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t};\n\t\tres: null;\n\t};\n\t\"mute/list\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"renote-mute/create\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"renote-mute/delete\": {\n\t\treq: {\n\t\t\tuserId: " - }, - { - "kind": "Reference", - "text": "User", - "canonicalReference": "calckey-js!entities.User:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t};\n\t\tres: null;\n\t};\n\t\"renote-mute/list\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"my/apps\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\tnotes: {\n\t\treq: {\n\t\t\tlimit?: number;\n\t\t\tsinceId?: " - }, - { - "kind": "Reference", - "text": "Note", - "canonicalReference": "calckey-js!entities.Note:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t\tuntilId?: " - }, - { - "kind": "Reference", - "text": "Note", - "canonicalReference": "calckey-js!entities.Note:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t};\n\t\tres: " - }, - { - "kind": "Reference", - "text": "Note", - "canonicalReference": "calckey-js!entities.Note:type" - }, - { - "kind": "Content", - "text": "[];\n\t};\n\t\"notes/children\": {\n\t\treq: {\n\t\t\tnoteId: " - }, - { - "kind": "Reference", - "text": "Note", - "canonicalReference": "calckey-js!entities.Note:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t\tlimit?: number;\n\t\t\tsinceId?: " - }, - { - "kind": "Reference", - "text": "Note", - "canonicalReference": "calckey-js!entities.Note:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t\tuntilId?: " - }, - { - "kind": "Reference", - "text": "Note", - "canonicalReference": "calckey-js!entities.Note:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t};\n\t\tres: " - }, - { - "kind": "Reference", - "text": "Note", - "canonicalReference": "calckey-js!entities.Note:type" - }, - { - "kind": "Content", - "text": "[];\n\t};\n\t\"notes/clips\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"notes/conversation\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"notes/create\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "NoteSubmitReq", - "canonicalReference": "calckey-js!~NoteSubmitReq:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: {\n\t\t\tcreatedNote: " - }, - { - "kind": "Reference", - "text": "Note", - "canonicalReference": "calckey-js!entities.Note:type" - }, - { - "kind": "Content", - "text": ";\n\t\t};\n\t};\n\t\"notes/delete\": {\n\t\treq: {\n\t\t\tnoteId: " - }, - { - "kind": "Reference", - "text": "Note", - "canonicalReference": "calckey-js!entities.Note:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t};\n\t\tres: null;\n\t};\n\t\"notes/edit\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "NoteSubmitReq", - "canonicalReference": "calckey-js!~NoteSubmitReq:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: {\n\t\t\tcreatedNote: " - }, - { - "kind": "Reference", - "text": "Note", - "canonicalReference": "calckey-js!entities.Note:type" - }, - { - "kind": "Content", - "text": ";\n\t\t};\n\t};\n\t\"notes/favorites/create\": {\n\t\treq: {\n\t\t\tnoteId: " - }, - { - "kind": "Reference", - "text": "Note", - "canonicalReference": "calckey-js!entities.Note:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t};\n\t\tres: null;\n\t};\n\t\"notes/favorites/delete\": {\n\t\treq: {\n\t\t\tnoteId: " - }, - { - "kind": "Reference", - "text": "Note", - "canonicalReference": "calckey-js!entities.Note:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t};\n\t\tres: null;\n\t};\n\t\"notes/featured\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "Note", - "canonicalReference": "calckey-js!entities.Note:type" - }, - { - "kind": "Content", - "text": "[];\n\t};\n\t\"notes/global-timeline\": {\n\t\treq: {\n\t\t\tlimit?: number;\n\t\t\tsinceId?: " - }, - { - "kind": "Reference", - "text": "Note", - "canonicalReference": "calckey-js!entities.Note:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t\tuntilId?: " - }, - { - "kind": "Reference", - "text": "Note", - "canonicalReference": "calckey-js!entities.Note:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t\tsinceDate?: number;\n\t\t\tuntilDate?: number;\n\t\t};\n\t\tres: " - }, - { - "kind": "Reference", - "text": "Note", - "canonicalReference": "calckey-js!entities.Note:type" - }, - { - "kind": "Content", - "text": "[];\n\t};\n\t\"notes/recommended-timeline\": {\n\t\treq: {\n\t\t\tlimit?: number;\n\t\t\tsinceId?: " - }, - { - "kind": "Reference", - "text": "Note", - "canonicalReference": "calckey-js!entities.Note:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t\tuntilId?: " - }, - { - "kind": "Reference", - "text": "Note", - "canonicalReference": "calckey-js!entities.Note:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t\tsinceDate?: number;\n\t\t\tuntilDate?: number;\n\t\t};\n\t\tres: " - }, - { - "kind": "Reference", - "text": "Note", - "canonicalReference": "calckey-js!entities.Note:type" - }, - { - "kind": "Content", - "text": "[];\n\t};\n\t\"notes/hybrid-timeline\": {\n\t\treq: {\n\t\t\tlimit?: number;\n\t\t\tsinceId?: " - }, - { - "kind": "Reference", - "text": "Note", - "canonicalReference": "calckey-js!entities.Note:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t\tuntilId?: " - }, - { - "kind": "Reference", - "text": "Note", - "canonicalReference": "calckey-js!entities.Note:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t\tsinceDate?: number;\n\t\t\tuntilDate?: number;\n\t\t};\n\t\tres: " - }, - { - "kind": "Reference", - "text": "Note", - "canonicalReference": "calckey-js!entities.Note:type" - }, - { - "kind": "Content", - "text": "[];\n\t};\n\t\"notes/local-timeline\": {\n\t\treq: {\n\t\t\tlimit?: number;\n\t\t\tsinceId?: " - }, - { - "kind": "Reference", - "text": "Note", - "canonicalReference": "calckey-js!entities.Note:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t\tuntilId?: " - }, - { - "kind": "Reference", - "text": "Note", - "canonicalReference": "calckey-js!entities.Note:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t\tsinceDate?: number;\n\t\t\tuntilDate?: number;\n\t\t};\n\t\tres: " - }, - { - "kind": "Reference", - "text": "Note", - "canonicalReference": "calckey-js!entities.Note:type" - }, - { - "kind": "Content", - "text": "[];\n\t};\n\t\"notes/mentions\": {\n\t\treq: {\n\t\t\tfollowing?: boolean;\n\t\t\tlimit?: number;\n\t\t\tsinceId?: " - }, - { - "kind": "Reference", - "text": "Note", - "canonicalReference": "calckey-js!entities.Note:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t\tuntilId?: " - }, - { - "kind": "Reference", - "text": "Note", - "canonicalReference": "calckey-js!entities.Note:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t};\n\t\tres: " - }, - { - "kind": "Reference", - "text": "Note", - "canonicalReference": "calckey-js!entities.Note:type" - }, - { - "kind": "Content", - "text": "[];\n\t};\n\t\"notes/polls/recommendation\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"notes/polls/vote\": {\n\t\treq: {\n\t\t\tnoteId: " - }, - { - "kind": "Reference", - "text": "Note", - "canonicalReference": "calckey-js!entities.Note:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t\tchoice: number;\n\t\t};\n\t\tres: null;\n\t};\n\t\"notes/reactions\": {\n\t\treq: {\n\t\t\tnoteId: " - }, - { - "kind": "Reference", - "text": "Note", - "canonicalReference": "calckey-js!entities.Note:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t\ttype?: string | null;\n\t\t\tlimit?: number;\n\t\t};\n\t\tres: " - }, - { - "kind": "Reference", - "text": "NoteReaction", - "canonicalReference": "calckey-js!entities.NoteReaction:type" - }, - { - "kind": "Content", - "text": "[];\n\t};\n\t\"notes/reactions/create\": {\n\t\treq: {\n\t\t\tnoteId: " - }, - { - "kind": "Reference", - "text": "Note", - "canonicalReference": "calckey-js!entities.Note:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t\treaction: string;\n\t\t};\n\t\tres: null;\n\t};\n\t\"notes/reactions/delete\": {\n\t\treq: {\n\t\t\tnoteId: " - }, - { - "kind": "Reference", - "text": "Note", - "canonicalReference": "calckey-js!entities.Note:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t};\n\t\tres: null;\n\t};\n\t\"notes/renotes\": {\n\t\treq: {\n\t\t\tlimit?: number;\n\t\t\tsinceId?: " - }, - { - "kind": "Reference", - "text": "Note", - "canonicalReference": "calckey-js!entities.Note:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t\tuntilId?: " - }, - { - "kind": "Reference", - "text": "Note", - "canonicalReference": "calckey-js!entities.Note:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t\tnoteId: " - }, - { - "kind": "Reference", - "text": "Note", - "canonicalReference": "calckey-js!entities.Note:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t};\n\t\tres: " - }, - { - "kind": "Reference", - "text": "Note", - "canonicalReference": "calckey-js!entities.Note:type" - }, - { - "kind": "Content", - "text": "[];\n\t};\n\t\"notes/replies\": {\n\t\treq: {\n\t\t\tlimit?: number;\n\t\t\tsinceId?: " - }, - { - "kind": "Reference", - "text": "Note", - "canonicalReference": "calckey-js!entities.Note:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t\tuntilId?: " - }, - { - "kind": "Reference", - "text": "Note", - "canonicalReference": "calckey-js!entities.Note:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t\tnoteId: " - }, - { - "kind": "Reference", - "text": "Note", - "canonicalReference": "calckey-js!entities.Note:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t};\n\t\tres: " - }, - { - "kind": "Reference", - "text": "Note", - "canonicalReference": "calckey-js!entities.Note:type" - }, - { - "kind": "Content", - "text": "[];\n\t};\n\t\"notes/search-by-tag\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"notes/search\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"notes/show\": {\n\t\treq: {\n\t\t\tnoteId: " - }, - { - "kind": "Reference", - "text": "Note", - "canonicalReference": "calckey-js!entities.Note:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t};\n\t\tres: " - }, - { - "kind": "Reference", - "text": "Note", - "canonicalReference": "calckey-js!entities.Note:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"notes/state\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"notes/timeline\": {\n\t\treq: {\n\t\t\tlimit?: number;\n\t\t\tsinceId?: " - }, - { - "kind": "Reference", - "text": "Note", - "canonicalReference": "calckey-js!entities.Note:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t\tuntilId?: " - }, - { - "kind": "Reference", - "text": "Note", - "canonicalReference": "calckey-js!entities.Note:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t\tsinceDate?: number;\n\t\t\tuntilDate?: number;\n\t\t};\n\t\tres: " - }, - { - "kind": "Reference", - "text": "Note", - "canonicalReference": "calckey-js!entities.Note:type" - }, - { - "kind": "Content", - "text": "[];\n\t};\n\t\"notes/unrenote\": {\n\t\treq: {\n\t\t\tnoteId: " - }, - { - "kind": "Reference", - "text": "Note", - "canonicalReference": "calckey-js!entities.Note:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t};\n\t\tres: null;\n\t};\n\t\"notes/user-list-timeline\": {\n\t\treq: {\n\t\t\tlistId: " - }, - { - "kind": "Reference", - "text": "UserList", - "canonicalReference": "calckey-js!entities.UserList:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t\tlimit?: number;\n\t\t\tsinceId?: " - }, - { - "kind": "Reference", - "text": "Note", - "canonicalReference": "calckey-js!entities.Note:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t\tuntilId?: " - }, - { - "kind": "Reference", - "text": "Note", - "canonicalReference": "calckey-js!entities.Note:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t\tsinceDate?: number;\n\t\t\tuntilDate?: number;\n\t\t};\n\t\tres: " - }, - { - "kind": "Reference", - "text": "Note", - "canonicalReference": "calckey-js!entities.Note:type" - }, - { - "kind": "Content", - "text": "[];\n\t};\n\t\"notes/watching/create\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"notes/watching/delete\": {\n\t\treq: {\n\t\t\tnoteId: " - }, - { - "kind": "Reference", - "text": "Note", - "canonicalReference": "calckey-js!entities.Note:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t};\n\t\tres: null;\n\t};\n\t\"notifications/create\": {\n\t\treq: {\n\t\t\tbody: string;\n\t\t\theader?: string | null;\n\t\t\ticon?: string | null;\n\t\t};\n\t\tres: null;\n\t};\n\t\"notifications/mark-all-as-read\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "NoParams", - "canonicalReference": "calckey-js!~NoParams:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: null;\n\t};\n\t\"notifications/read\": {\n\t\treq: {\n\t\t\tnotificationId: " - }, - { - "kind": "Reference", - "text": "Notification", - "canonicalReference": "calckey-js!entities.Notification_2:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t};\n\t\tres: null;\n\t};\n\t\"page-push\": {\n\t\treq: {\n\t\t\tpageId: " - }, - { - "kind": "Reference", - "text": "Page", - "canonicalReference": "calckey-js!entities.Page:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t\tevent: string;\n\t\t\tvar?: any;\n\t\t};\n\t\tres: null;\n\t};\n\t\"pages/create\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "Page", - "canonicalReference": "calckey-js!entities.Page:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"pages/delete\": {\n\t\treq: {\n\t\t\tpageId: " - }, - { - "kind": "Reference", - "text": "Page", - "canonicalReference": "calckey-js!entities.Page:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t};\n\t\tres: null;\n\t};\n\t\"pages/featured\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "NoParams", - "canonicalReference": "calckey-js!~NoParams:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "Page", - "canonicalReference": "calckey-js!entities.Page:type" - }, - { - "kind": "Content", - "text": "[];\n\t};\n\t\"pages/like\": {\n\t\treq: {\n\t\t\tpageId: " - }, - { - "kind": "Reference", - "text": "Page", - "canonicalReference": "calckey-js!entities.Page:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t};\n\t\tres: null;\n\t};\n\t\"pages/show\": {\n\t\treq: {\n\t\t\tpageId?: " - }, - { - "kind": "Reference", - "text": "Page", - "canonicalReference": "calckey-js!entities.Page:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t\tname?: string;\n\t\t\tusername?: string;\n\t\t};\n\t\tres: " - }, - { - "kind": "Reference", - "text": "Page", - "canonicalReference": "calckey-js!entities.Page:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"pages/unlike\": {\n\t\treq: {\n\t\t\tpageId: " - }, - { - "kind": "Reference", - "text": "Page", - "canonicalReference": "calckey-js!entities.Page:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t};\n\t\tres: null;\n\t};\n\t\"pages/update\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: null;\n\t};\n\tping: {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "NoParams", - "canonicalReference": "calckey-js!~NoParams:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: {\n\t\t\tpong: number;\n\t\t};\n\t};\n\t\"pinned-users\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"promo/read\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"request-reset-password\": {\n\t\treq: {\n\t\t\tusername: string;\n\t\t\temail: string;\n\t\t};\n\t\tres: null;\n\t};\n\t\"reset-password\": {\n\t\treq: {\n\t\t\ttoken: string;\n\t\t\tpassword: string;\n\t\t};\n\t\tres: null;\n\t};\n\t\"room/show\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"room/update\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\tstats: {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "NoParams", - "canonicalReference": "calckey-js!~NoParams:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "Stats", - "canonicalReference": "calckey-js!entities.Stats:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"server-info\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "NoParams", - "canonicalReference": "calckey-js!~NoParams:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "ServerInfo", - "canonicalReference": "calckey-js!entities.ServerInfo:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"latest-version\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "NoParams", - "canonicalReference": "calckey-js!~NoParams:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"sw/register\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"username/available\": {\n\t\treq: {\n\t\t\tusername: string;\n\t\t};\n\t\tres: {\n\t\t\tavailable: boolean;\n\t\t};\n\t};\n\tusers: {\n\t\treq: {\n\t\t\tlimit?: number;\n\t\t\toffset?: number;\n\t\t\tsort?: " - }, - { - "kind": "Reference", - "text": "UserSorting", - "canonicalReference": "calckey-js!entities.UserSorting:type" - }, - { - "kind": "Content", - "text": ";\n\t\t\torigin?: " - }, - { - "kind": "Reference", - "text": "OriginType", - "canonicalReference": "calckey-js!entities.OriginType:type" - }, - { - "kind": "Content", - "text": ";\n\t\t};\n\t\tres: " - }, - { - "kind": "Reference", - "text": "User", - "canonicalReference": "calckey-js!entities.User:type" - }, - { - "kind": "Content", - "text": "[];\n\t};\n\t\"users/clips\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"users/followers\": {\n\t\treq: {\n\t\t\tuserId?: " - }, - { - "kind": "Reference", - "text": "User", - "canonicalReference": "calckey-js!entities.User:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t\tusername?: " - }, - { - "kind": "Reference", - "text": "User", - "canonicalReference": "calckey-js!entities.User:type" - }, - { - "kind": "Content", - "text": "[\"username\"];\n\t\t\thost?: " - }, - { - "kind": "Reference", - "text": "User", - "canonicalReference": "calckey-js!entities.User:type" - }, - { - "kind": "Content", - "text": "[\"host\"] | null;\n\t\t\tlimit?: number;\n\t\t\tsinceId?: " - }, - { - "kind": "Reference", - "text": "Following", - "canonicalReference": "calckey-js!entities.Following:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t\tuntilId?: " - }, - { - "kind": "Reference", - "text": "Following", - "canonicalReference": "calckey-js!entities.Following:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t};\n\t\tres: " - }, - { - "kind": "Reference", - "text": "FollowingFollowerPopulated", - "canonicalReference": "calckey-js!entities.FollowingFollowerPopulated:type" - }, - { - "kind": "Content", - "text": "[];\n\t};\n\t\"users/following\": {\n\t\treq: {\n\t\t\tuserId?: " - }, - { - "kind": "Reference", - "text": "User", - "canonicalReference": "calckey-js!entities.User:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t\tusername?: " - }, - { - "kind": "Reference", - "text": "User", - "canonicalReference": "calckey-js!entities.User:type" - }, - { - "kind": "Content", - "text": "[\"username\"];\n\t\t\thost?: " - }, - { - "kind": "Reference", - "text": "User", - "canonicalReference": "calckey-js!entities.User:type" - }, - { - "kind": "Content", - "text": "[\"host\"] | null;\n\t\t\tlimit?: number;\n\t\t\tsinceId?: " - }, - { - "kind": "Reference", - "text": "Following", - "canonicalReference": "calckey-js!entities.Following:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t\tuntilId?: " - }, - { - "kind": "Reference", - "text": "Following", - "canonicalReference": "calckey-js!entities.Following:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t};\n\t\tres: " - }, - { - "kind": "Reference", - "text": "FollowingFolloweePopulated", - "canonicalReference": "calckey-js!entities.FollowingFolloweePopulated:type" - }, - { - "kind": "Content", - "text": "[];\n\t};\n\t\"users/gallery/posts\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"users/get-frequently-replied-users\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"users/groups/create\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"users/groups/delete\": {\n\t\treq: {\n\t\t\tgroupId: " - }, - { - "kind": "Reference", - "text": "UserGroup", - "canonicalReference": "calckey-js!entities.UserGroup:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t};\n\t\tres: null;\n\t};\n\t\"users/groups/invitations/accept\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"users/groups/invitations/reject\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"users/groups/invite\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"users/groups/joined\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"users/groups/owned\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"users/groups/pull\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"users/groups/show\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"users/groups/transfer\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"users/groups/update\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"users/lists/create\": {\n\t\treq: {\n\t\t\tname: string;\n\t\t};\n\t\tres: " - }, - { - "kind": "Reference", - "text": "UserList", - "canonicalReference": "calckey-js!entities.UserList:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"users/lists/delete\": {\n\t\treq: {\n\t\t\tlistId: " - }, - { - "kind": "Reference", - "text": "UserList", - "canonicalReference": "calckey-js!entities.UserList:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t};\n\t\tres: null;\n\t};\n\t\"users/lists/list\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "NoParams", - "canonicalReference": "calckey-js!~NoParams:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "UserList", - "canonicalReference": "calckey-js!entities.UserList:type" - }, - { - "kind": "Content", - "text": "[];\n\t};\n\t\"users/lists/pull\": {\n\t\treq: {\n\t\t\tlistId: " - }, - { - "kind": "Reference", - "text": "UserList", - "canonicalReference": "calckey-js!entities.UserList:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t\tuserId: " - }, - { - "kind": "Reference", - "text": "User", - "canonicalReference": "calckey-js!entities.User:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t};\n\t\tres: null;\n\t};\n\t\"users/lists/push\": {\n\t\treq: {\n\t\t\tlistId: " - }, - { - "kind": "Reference", - "text": "UserList", - "canonicalReference": "calckey-js!entities.UserList:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t\tuserId: " - }, - { - "kind": "Reference", - "text": "User", - "canonicalReference": "calckey-js!entities.User:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t};\n\t\tres: null;\n\t};\n\t\"users/lists/show\": {\n\t\treq: {\n\t\t\tlistId: " - }, - { - "kind": "Reference", - "text": "UserList", - "canonicalReference": "calckey-js!entities.UserList:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t};\n\t\tres: " - }, - { - "kind": "Reference", - "text": "UserList", - "canonicalReference": "calckey-js!entities.UserList:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"users/lists/update\": {\n\t\treq: {\n\t\t\tlistId: " - }, - { - "kind": "Reference", - "text": "UserList", - "canonicalReference": "calckey-js!entities.UserList:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t\tname: string;\n\t\t};\n\t\tres: " - }, - { - "kind": "Reference", - "text": "UserList", - "canonicalReference": "calckey-js!entities.UserList:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"users/notes\": {\n\t\treq: {\n\t\t\tuserId: " - }, - { - "kind": "Reference", - "text": "User", - "canonicalReference": "calckey-js!entities.User:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t\tlimit?: number;\n\t\t\tsinceId?: " - }, - { - "kind": "Reference", - "text": "Note", - "canonicalReference": "calckey-js!entities.Note:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t\tuntilId?: " - }, - { - "kind": "Reference", - "text": "Note", - "canonicalReference": "calckey-js!entities.Note:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t\tsinceDate?: number;\n\t\t\tuntilDate?: number;\n\t\t};\n\t\tres: " - }, - { - "kind": "Reference", - "text": "Note", - "canonicalReference": "calckey-js!entities.Note:type" - }, - { - "kind": "Content", - "text": "[];\n\t};\n\t\"users/pages\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"users/recommendation\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"users/relation\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"users/report-abuse\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"users/search-by-username-and-host\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"users/search\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n\t\"users/show\": {\n\t\treq:\n\t\t\t| " - }, - { - "kind": "Reference", - "text": "ShowUserReq", - "canonicalReference": "calckey-js!~ShowUserReq:type" - }, - { - "kind": "Content", - "text": "\n\t\t\t| {\n\t\t\t\t\tuserIds: " - }, - { - "kind": "Reference", - "text": "User", - "canonicalReference": "calckey-js!entities.User:type" - }, - { - "kind": "Content", - "text": "[\"id\"][];\n\t\t\t };\n\t\tres: {\n\t\t\t$switch: {\n\t\t\t\t$cases: [\n\t\t\t\t\t[\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tuserIds: " - }, - { - "kind": "Reference", - "text": "User", - "canonicalReference": "calckey-js!entities.User:type" - }, - { - "kind": "Content", - "text": "[\"id\"][];\n\t\t\t\t\t\t},\n\t\t\t\t\t\t" - }, - { - "kind": "Reference", - "text": "UserDetailed", - "canonicalReference": "calckey-js!entities.UserDetailed:type" - }, - { - "kind": "Content", - "text": "[],\n\t\t\t\t\t],\n\t\t\t\t];\n\t\t\t\t$default: " - }, - { - "kind": "Reference", - "text": "UserDetailed", - "canonicalReference": "calckey-js!entities.UserDetailed:type" - }, - { - "kind": "Content", - "text": ";\n\t\t\t};\n\t\t};\n\t};\n\t\"users/stats\": {\n\t\treq: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t\tres: " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO:type" - }, - { - "kind": "Content", - "text": ";\n\t};\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "src/api.types.ts", - "releaseTag": "Public", - "name": "Endpoints", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 1158 - } - }, - { - "kind": "Namespace", - "canonicalReference": "calckey-js!entities:namespace", - "docComment": "", - "excerptTokens": [], - "fileUrlPath": "src/index.ts", - "releaseTag": "None", - "name": "entities", - "preserveMemberOrder": false, - "members": [ - { - "kind": "TypeAlias", - "canonicalReference": "calckey-js!entities.Ad:type", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare type Ad = " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO_2:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "src/entities.ts", - "releaseTag": "Public", - "name": "Ad", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "calckey-js!entities.Announcement:type", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare type Announcement = " - }, - { - "kind": "Content", - "text": "{\n\tid: " - }, - { - "kind": "Reference", - "text": "ID", - "canonicalReference": "calckey-js!entities.ID:type" - }, - { - "kind": "Content", - "text": ";\n\tcreatedAt: " - }, - { - "kind": "Reference", - "text": "DateString", - "canonicalReference": "calckey-js!entities.DateString:type" - }, - { - "kind": "Content", - "text": ";\n\tupdatedAt: " - }, - { - "kind": "Reference", - "text": "DateString", - "canonicalReference": "calckey-js!entities.DateString:type" - }, - { - "kind": "Content", - "text": " | null;\n\ttext: string;\n\ttitle: string;\n\timageUrl: string | null;\n\tisRead?: boolean;\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "src/entities.ts", - "releaseTag": "Public", - "name": "Announcement", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 8 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "calckey-js!entities.Antenna:type", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare type Antenna = " - }, - { - "kind": "Content", - "text": "{\n\tid: " - }, - { - "kind": "Reference", - "text": "ID", - "canonicalReference": "calckey-js!entities.ID:type" - }, - { - "kind": "Content", - "text": ";\n\tcreatedAt: " - }, - { - "kind": "Reference", - "text": "DateString", - "canonicalReference": "calckey-js!entities.DateString:type" - }, - { - "kind": "Content", - "text": ";\n\tname: string;\n\tkeywords: string[][];\n\texcludeKeywords: string[][];\n\tsrc: \"home\" | \"all\" | \"users\" | \"list\" | \"group\" | \"instances\";\n\tuserListId: " - }, - { - "kind": "Reference", - "text": "ID", - "canonicalReference": "calckey-js!entities.ID:type" - }, - { - "kind": "Content", - "text": " | null;\n\tuserGroupId: " - }, - { - "kind": "Reference", - "text": "ID", - "canonicalReference": "calckey-js!entities.ID:type" - }, - { - "kind": "Content", - "text": " | null;\n\tusers: string[];\n\tinstances: string[];\n\tcaseSensitive: boolean;\n\tnotify: boolean;\n\twithReplies: boolean;\n\twithFile: boolean;\n\thasUnreadNote: boolean;\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "src/entities.ts", - "releaseTag": "Public", - "name": "Antenna", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 10 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "calckey-js!entities.App:type", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare type App = " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO_2:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "src/entities.ts", - "releaseTag": "Public", - "name": "App", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "calckey-js!entities.AuthSession:type", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare type AuthSession = " - }, - { - "kind": "Content", - "text": "{\n\tid: " - }, - { - "kind": "Reference", - "text": "ID", - "canonicalReference": "calckey-js!entities.ID:type" - }, - { - "kind": "Content", - "text": ";\n\tapp: " - }, - { - "kind": "Reference", - "text": "App", - "canonicalReference": "calckey-js!entities.App:type" - }, - { - "kind": "Content", - "text": ";\n\ttoken: string;\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "src/entities.ts", - "releaseTag": "Public", - "name": "AuthSession", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 6 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "calckey-js!entities.Blocking:type", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare type Blocking = " - }, - { - "kind": "Content", - "text": "{\n\tid: " - }, - { - "kind": "Reference", - "text": "ID", - "canonicalReference": "calckey-js!entities.ID:type" - }, - { - "kind": "Content", - "text": ";\n\tcreatedAt: " - }, - { - "kind": "Reference", - "text": "DateString", - "canonicalReference": "calckey-js!entities.DateString:type" - }, - { - "kind": "Content", - "text": ";\n\tblockeeId: " - }, - { - "kind": "Reference", - "text": "User", - "canonicalReference": "calckey-js!entities.User:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\tblockee: " - }, - { - "kind": "Reference", - "text": "UserDetailed", - "canonicalReference": "calckey-js!entities.UserDetailed:type" - }, - { - "kind": "Content", - "text": ";\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "src/entities.ts", - "releaseTag": "Public", - "name": "Blocking", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 10 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "calckey-js!entities.Channel:type", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare type Channel = " - }, - { - "kind": "Content", - "text": "{\n\tid: " - }, - { - "kind": "Reference", - "text": "ID", - "canonicalReference": "calckey-js!entities.ID:type" - }, - { - "kind": "Content", - "text": ";\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "src/entities.ts", - "releaseTag": "Public", - "name": "Channel", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 4 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "calckey-js!entities.Clip:type", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare type Clip = " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO_2:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "src/entities.ts", - "releaseTag": "Public", - "name": "Clip", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "calckey-js!entities.CustomEmoji:type", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare type CustomEmoji = " - }, - { - "kind": "Content", - "text": "{\n\tid: string;\n\tname: string;\n\turl: string;\n\tcategory: string;\n\taliases: string[];\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "src/entities.ts", - "releaseTag": "Public", - "name": "CustomEmoji", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "calckey-js!entities.DateString:type", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare type DateString = " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "src/entities.ts", - "releaseTag": "Public", - "name": "DateString", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "calckey-js!entities.DetailedInstanceMetadata:type", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare type DetailedInstanceMetadata = " - }, - { - "kind": "Reference", - "text": "LiteInstanceMetadata", - "canonicalReference": "calckey-js!entities.LiteInstanceMetadata:type" - }, - { - "kind": "Content", - "text": " & {\n\tfeatures: " - }, - { - "kind": "Reference", - "text": "Record", - "canonicalReference": "!Record:type" - }, - { - "kind": "Content", - "text": ";\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "src/entities.ts", - "releaseTag": "Public", - "name": "DetailedInstanceMetadata", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 5 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "calckey-js!entities.DriveFile:type", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare type DriveFile = " - }, - { - "kind": "Content", - "text": "{\n\tid: " - }, - { - "kind": "Reference", - "text": "ID", - "canonicalReference": "calckey-js!entities.ID:type" - }, - { - "kind": "Content", - "text": ";\n\tcreatedAt: " - }, - { - "kind": "Reference", - "text": "DateString", - "canonicalReference": "calckey-js!entities.DateString:type" - }, - { - "kind": "Content", - "text": ";\n\tisSensitive: boolean;\n\tname: string;\n\tthumbnailUrl: string;\n\turl: string;\n\ttype: string;\n\tsize: number;\n\tmd5: string;\n\tblurhash: string;\n\tcomment: string | null;\n\tproperties: " - }, - { - "kind": "Reference", - "text": "Record", - "canonicalReference": "!Record:type" - }, - { - "kind": "Content", - "text": ";\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "src/entities.ts", - "releaseTag": "Public", - "name": "DriveFile", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 8 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "calckey-js!entities.DriveFolder:type", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare type DriveFolder = " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO_2:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "src/entities.ts", - "releaseTag": "Public", - "name": "DriveFolder", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "calckey-js!entities.Following:type", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare type Following = " - }, - { - "kind": "Content", - "text": "{\n\tid: " - }, - { - "kind": "Reference", - "text": "ID", - "canonicalReference": "calckey-js!entities.ID:type" - }, - { - "kind": "Content", - "text": ";\n\tcreatedAt: " - }, - { - "kind": "Reference", - "text": "DateString", - "canonicalReference": "calckey-js!entities.DateString:type" - }, - { - "kind": "Content", - "text": ";\n\tfollowerId: " - }, - { - "kind": "Reference", - "text": "User", - "canonicalReference": "calckey-js!entities.User:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\tfolloweeId: " - }, - { - "kind": "Reference", - "text": "User", - "canonicalReference": "calckey-js!entities.User:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "src/entities.ts", - "releaseTag": "Public", - "name": "Following", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 10 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "calckey-js!entities.FollowingFolloweePopulated:type", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare type FollowingFolloweePopulated = " - }, - { - "kind": "Reference", - "text": "Following", - "canonicalReference": "calckey-js!entities.Following:type" - }, - { - "kind": "Content", - "text": " & {\n\tfollowee: " - }, - { - "kind": "Reference", - "text": "UserDetailed", - "canonicalReference": "calckey-js!entities.UserDetailed:type" - }, - { - "kind": "Content", - "text": ";\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "src/entities.ts", - "releaseTag": "Public", - "name": "FollowingFolloweePopulated", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 5 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "calckey-js!entities.FollowingFollowerPopulated:type", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare type FollowingFollowerPopulated = " - }, - { - "kind": "Reference", - "text": "Following", - "canonicalReference": "calckey-js!entities.Following:type" - }, - { - "kind": "Content", - "text": " & {\n\tfollower: " - }, - { - "kind": "Reference", - "text": "UserDetailed", - "canonicalReference": "calckey-js!entities.UserDetailed:type" - }, - { - "kind": "Content", - "text": ";\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "src/entities.ts", - "releaseTag": "Public", - "name": "FollowingFollowerPopulated", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 5 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "calckey-js!entities.FollowRequest:type", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare type FollowRequest = " - }, - { - "kind": "Content", - "text": "{\n\tid: " - }, - { - "kind": "Reference", - "text": "ID", - "canonicalReference": "calckey-js!entities.ID:type" - }, - { - "kind": "Content", - "text": ";\n\tfollower: " - }, - { - "kind": "Reference", - "text": "User", - "canonicalReference": "calckey-js!entities.User:type" - }, - { - "kind": "Content", - "text": ";\n\tfollowee: " - }, - { - "kind": "Reference", - "text": "User", - "canonicalReference": "calckey-js!entities.User:type" - }, - { - "kind": "Content", - "text": ";\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "src/entities.ts", - "releaseTag": "Public", - "name": "FollowRequest", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 8 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "calckey-js!entities.GalleryPost:type", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare type GalleryPost = " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO_2:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "src/entities.ts", - "releaseTag": "Public", - "name": "GalleryPost", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "calckey-js!entities.ID:type", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare type ID = " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "src/entities.ts", - "releaseTag": "Public", - "name": "ID", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "calckey-js!entities.Instance:type", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare type Instance = " - }, - { - "kind": "Content", - "text": "{\n\tid: " - }, - { - "kind": "Reference", - "text": "ID", - "canonicalReference": "calckey-js!entities.ID:type" - }, - { - "kind": "Content", - "text": ";\n\tcaughtAt: " - }, - { - "kind": "Reference", - "text": "DateString", - "canonicalReference": "calckey-js!entities.DateString:type" - }, - { - "kind": "Content", - "text": ";\n\thost: string;\n\tusersCount: number;\n\tnotesCount: number;\n\tfollowingCount: number;\n\tfollowersCount: number;\n\tdriveUsage: number;\n\tdriveFiles: number;\n\tlatestRequestSentAt: " - }, - { - "kind": "Reference", - "text": "DateString", - "canonicalReference": "calckey-js!entities.DateString:type" - }, - { - "kind": "Content", - "text": " | null;\n\tlatestStatus: number | null;\n\tlatestRequestReceivedAt: " - }, - { - "kind": "Reference", - "text": "DateString", - "canonicalReference": "calckey-js!entities.DateString:type" - }, - { - "kind": "Content", - "text": " | null;\n\tlastCommunicatedAt: " - }, - { - "kind": "Reference", - "text": "DateString", - "canonicalReference": "calckey-js!entities.DateString:type" - }, - { - "kind": "Content", - "text": ";\n\tisNotResponding: boolean;\n\tisSuspended: boolean;\n\tsoftwareName: string | null;\n\tsoftwareVersion: string | null;\n\topenRegistrations: boolean | null;\n\tname: string | null;\n\tdescription: string | null;\n\tmaintainerName: string | null;\n\tmaintainerEmail: string | null;\n\ticonUrl: string | null;\n\tfaviconUrl: string | null;\n\tthemeColor: string | null;\n\tinfoUpdatedAt: " - }, - { - "kind": "Reference", - "text": "DateString", - "canonicalReference": "calckey-js!entities.DateString:type" - }, - { - "kind": "Content", - "text": " | null;\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "src/entities.ts", - "releaseTag": "Public", - "name": "Instance", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 14 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "calckey-js!entities.InstanceMetadata:type", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare type InstanceMetadata =\n\t" - }, - { - "kind": "Content", - "text": "| " - }, - { - "kind": "Reference", - "text": "LiteInstanceMetadata", - "canonicalReference": "calckey-js!entities.LiteInstanceMetadata:type" - }, - { - "kind": "Content", - "text": "\n\t| " - }, - { - "kind": "Reference", - "text": "DetailedInstanceMetadata", - "canonicalReference": "calckey-js!entities.DetailedInstanceMetadata:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "src/entities.ts", - "releaseTag": "Public", - "name": "InstanceMetadata", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 5 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "calckey-js!entities.LiteInstanceMetadata:type", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare type LiteInstanceMetadata = " - }, - { - "kind": "Content", - "text": "{\n\tmaintainerName: string | null;\n\tmaintainerEmail: string | null;\n\tversion: string;\n\tname: string | null;\n\turi: string;\n\tdescription: string | null;\n\ttosUrl: string | null;\n\tdisableRegistration: boolean;\n\tdisableLocalTimeline: boolean;\n\tdisableRecommendedTimeline: boolean;\n\tdisableGlobalTimeline: boolean;\n\tdriveCapacityPerLocalUserMb: number;\n\tdriveCapacityPerRemoteUserMb: number;\n\tenableHcaptcha: boolean;\n\thcaptchaSiteKey: string | null;\n\tenableRecaptcha: boolean;\n\trecaptchaSiteKey: string | null;\n\tswPublickey: string | null;\n\tmaxNoteTextLength: number;\n\tenableEmail: boolean;\n\tenableTwitterIntegration: boolean;\n\tenableGithubIntegration: boolean;\n\tenableDiscordIntegration: boolean;\n\tenableServiceWorker: boolean;\n\temojis: " - }, - { - "kind": "Reference", - "text": "CustomEmoji", - "canonicalReference": "calckey-js!entities.CustomEmoji:type" - }, - { - "kind": "Content", - "text": "[];\n\tads: {\n\t\tid: " - }, - { - "kind": "Reference", - "text": "ID", - "canonicalReference": "calckey-js!entities.ID:type" - }, - { - "kind": "Content", - "text": ";\n\t\tratio: number;\n\t\tplace: string;\n\t\turl: string;\n\t\timageUrl: string;\n\t}[];\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "src/entities.ts", - "releaseTag": "Public", - "name": "LiteInstanceMetadata", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 6 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "calckey-js!entities.MeDetailed:type", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare type MeDetailed = " - }, - { - "kind": "Reference", - "text": "UserDetailed", - "canonicalReference": "calckey-js!entities.UserDetailed:type" - }, - { - "kind": "Content", - "text": " & {\n\tavatarId: " - }, - { - "kind": "Reference", - "text": "DriveFile", - "canonicalReference": "calckey-js!entities.DriveFile:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\tbannerId: " - }, - { - "kind": "Reference", - "text": "DriveFile", - "canonicalReference": "calckey-js!entities.DriveFile:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\tautoAcceptFollowed: boolean;\n\talwaysMarkNsfw: boolean;\n\tcarefulBot: boolean;\n\temailNotificationTypes: string[];\n\thasPendingReceivedFollowRequest: boolean;\n\thasUnreadAnnouncement: boolean;\n\thasUnreadAntenna: boolean;\n\thasUnreadChannel: boolean;\n\thasUnreadMentions: boolean;\n\thasUnreadMessagingMessage: boolean;\n\thasUnreadNotification: boolean;\n\thasUnreadSpecifiedNotes: boolean;\n\thideOnlineStatus: boolean;\n\tinjectFeaturedNote: boolean;\n\tintegrations: " - }, - { - "kind": "Reference", - "text": "Record", - "canonicalReference": "!Record:type" - }, - { - "kind": "Content", - "text": ";\n\tisDeleted: boolean;\n\tisExplorable: boolean;\n\tmutedWords: string[][];\n\tmutingNotificationTypes: string[];\n\tnoCrawle: boolean;\n\tpreventAiLearning: boolean;\n\treceiveAnnouncementEmail: boolean;\n\tusePasswordLessLogin: boolean;\n\t[other: string]: any;\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "src/entities.ts", - "releaseTag": "Public", - "name": "MeDetailed", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 9 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "calckey-js!entities.MessagingMessage:type", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare type MessagingMessage = " - }, - { - "kind": "Content", - "text": "{\n\tid: " - }, - { - "kind": "Reference", - "text": "ID", - "canonicalReference": "calckey-js!entities.ID:type" - }, - { - "kind": "Content", - "text": ";\n\tcreatedAt: " - }, - { - "kind": "Reference", - "text": "DateString", - "canonicalReference": "calckey-js!entities.DateString:type" - }, - { - "kind": "Content", - "text": ";\n\tfile: " - }, - { - "kind": "Reference", - "text": "DriveFile", - "canonicalReference": "calckey-js!entities.DriveFile:type" - }, - { - "kind": "Content", - "text": " | null;\n\tfileId: " - }, - { - "kind": "Reference", - "text": "DriveFile", - "canonicalReference": "calckey-js!entities.DriveFile:type" - }, - { - "kind": "Content", - "text": "[\"id\"] | null;\n\tisRead: boolean;\n\treads: " - }, - { - "kind": "Reference", - "text": "User", - "canonicalReference": "calckey-js!entities.User:type" - }, - { - "kind": "Content", - "text": "[\"id\"][];\n\ttext: string | null;\n\tuser: " - }, - { - "kind": "Reference", - "text": "User", - "canonicalReference": "calckey-js!entities.User:type" - }, - { - "kind": "Content", - "text": ";\n\tuserId: " - }, - { - "kind": "Reference", - "text": "User", - "canonicalReference": "calckey-js!entities.User:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\trecipient?: " - }, - { - "kind": "Reference", - "text": "User", - "canonicalReference": "calckey-js!entities.User:type" - }, - { - "kind": "Content", - "text": " | null;\n\trecipientId: " - }, - { - "kind": "Reference", - "text": "User", - "canonicalReference": "calckey-js!entities.User:type" - }, - { - "kind": "Content", - "text": "[\"id\"] | null;\n\tgroup?: " - }, - { - "kind": "Reference", - "text": "UserGroup", - "canonicalReference": "calckey-js!entities.UserGroup:type" - }, - { - "kind": "Content", - "text": " | null;\n\tgroupId: " - }, - { - "kind": "Reference", - "text": "UserGroup", - "canonicalReference": "calckey-js!entities.UserGroup:type" - }, - { - "kind": "Content", - "text": "[\"id\"] | null;\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "src/entities.ts", - "releaseTag": "Public", - "name": "MessagingMessage", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 24 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "calckey-js!entities.Note:type", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare type Note = " - }, - { - "kind": "Content", - "text": "{\n\tid: " - }, - { - "kind": "Reference", - "text": "ID", - "canonicalReference": "calckey-js!entities.ID:type" - }, - { - "kind": "Content", - "text": ";\n\tcreatedAt: " - }, - { - "kind": "Reference", - "text": "DateString", - "canonicalReference": "calckey-js!entities.DateString:type" - }, - { - "kind": "Content", - "text": ";\n\ttext: string | null;\n\tcw: string | null;\n\tuser: " - }, - { - "kind": "Reference", - "text": "User", - "canonicalReference": "calckey-js!entities.User:type" - }, - { - "kind": "Content", - "text": ";\n\tuserId: " - }, - { - "kind": "Reference", - "text": "User", - "canonicalReference": "calckey-js!entities.User:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\treply?: " - }, - { - "kind": "Reference", - "text": "Note", - "canonicalReference": "calckey-js!entities.Note:type" - }, - { - "kind": "Content", - "text": ";\n\treplyId: " - }, - { - "kind": "Reference", - "text": "Note", - "canonicalReference": "calckey-js!entities.Note:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\trenote?: " - }, - { - "kind": "Reference", - "text": "Note", - "canonicalReference": "calckey-js!entities.Note:type" - }, - { - "kind": "Content", - "text": ";\n\trenoteId: " - }, - { - "kind": "Reference", - "text": "Note", - "canonicalReference": "calckey-js!entities.Note:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\tfiles: " - }, - { - "kind": "Reference", - "text": "DriveFile", - "canonicalReference": "calckey-js!entities.DriveFile:type" - }, - { - "kind": "Content", - "text": "[];\n\tfileIds: " - }, - { - "kind": "Reference", - "text": "DriveFile", - "canonicalReference": "calckey-js!entities.DriveFile:type" - }, - { - "kind": "Content", - "text": "[\"id\"][];\n\tvisibility: \"public\" | \"home\" | \"followers\" | \"specified\";\n\tvisibleUserIds?: " - }, - { - "kind": "Reference", - "text": "User", - "canonicalReference": "calckey-js!entities.User:type" - }, - { - "kind": "Content", - "text": "[\"id\"][];\n\tlocalOnly?: boolean;\n\tchannel?: " - }, - { - "kind": "Reference", - "text": "Channel", - "canonicalReference": "calckey-js!entities.Channel:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\tmyReaction?: string;\n\treactions: " - }, - { - "kind": "Reference", - "text": "Record", - "canonicalReference": "!Record:type" - }, - { - "kind": "Content", - "text": ";\n\trenoteCount: number;\n\trepliesCount: number;\n\tpoll?: {\n\t\texpiresAt: " - }, - { - "kind": "Reference", - "text": "DateString", - "canonicalReference": "calckey-js!entities.DateString:type" - }, - { - "kind": "Content", - "text": " | null;\n\t\tmultiple: boolean;\n\t\tchoices: {\n\t\t\tisVoted: boolean;\n\t\t\ttext: string;\n\t\t\tvotes: number;\n\t\t}[];\n\t};\n\temojis: {\n\t\tname: string;\n\t\turl: string;\n\t}[];\n\turi?: string;\n\turl?: string;\n\tupdatedAt?: " - }, - { - "kind": "Reference", - "text": "DateString", - "canonicalReference": "calckey-js!entities.DateString:type" - }, - { - "kind": "Content", - "text": ";\n\tisHidden?: boolean;\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "src/entities.ts", - "releaseTag": "Public", - "name": "Note", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 32 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "calckey-js!entities.NoteFavorite:type", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare type NoteFavorite = " - }, - { - "kind": "Content", - "text": "{\n\tid: " - }, - { - "kind": "Reference", - "text": "ID", - "canonicalReference": "calckey-js!entities.ID:type" - }, - { - "kind": "Content", - "text": ";\n\tcreatedAt: " - }, - { - "kind": "Reference", - "text": "DateString", - "canonicalReference": "calckey-js!entities.DateString:type" - }, - { - "kind": "Content", - "text": ";\n\tnoteId: " - }, - { - "kind": "Reference", - "text": "Note", - "canonicalReference": "calckey-js!entities.Note:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\tnote: " - }, - { - "kind": "Reference", - "text": "Note", - "canonicalReference": "calckey-js!entities.Note:type" - }, - { - "kind": "Content", - "text": ";\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "src/entities.ts", - "releaseTag": "Public", - "name": "NoteFavorite", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 10 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "calckey-js!entities.NoteReaction:type", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare type NoteReaction = " - }, - { - "kind": "Content", - "text": "{\n\tid: " - }, - { - "kind": "Reference", - "text": "ID", - "canonicalReference": "calckey-js!entities.ID:type" - }, - { - "kind": "Content", - "text": ";\n\tcreatedAt: " - }, - { - "kind": "Reference", - "text": "DateString", - "canonicalReference": "calckey-js!entities.DateString:type" - }, - { - "kind": "Content", - "text": ";\n\tuser: " - }, - { - "kind": "Reference", - "text": "UserLite", - "canonicalReference": "calckey-js!entities.UserLite:type" - }, - { - "kind": "Content", - "text": ";\n\ttype: string;\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "src/entities.ts", - "releaseTag": "Public", - "name": "NoteReaction", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 8 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "calckey-js!entities.Notification:type", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare type Notification = " - }, - { - "kind": "Content", - "text": "{\n\tid: " - }, - { - "kind": "Reference", - "text": "ID", - "canonicalReference": "calckey-js!entities.ID:type" - }, - { - "kind": "Content", - "text": ";\n\tcreatedAt: " - }, - { - "kind": "Reference", - "text": "DateString", - "canonicalReference": "calckey-js!entities.DateString:type" - }, - { - "kind": "Content", - "text": ";\n\tisRead: boolean;\n} & (\n\t| {\n\t\t\ttype: \"reaction\";\n\t\t\treaction: string;\n\t\t\tuser: " - }, - { - "kind": "Reference", - "text": "User", - "canonicalReference": "calckey-js!entities.User:type" - }, - { - "kind": "Content", - "text": ";\n\t\t\tuserId: " - }, - { - "kind": "Reference", - "text": "User", - "canonicalReference": "calckey-js!entities.User:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t\tnote: " - }, - { - "kind": "Reference", - "text": "Note", - "canonicalReference": "calckey-js!entities.Note:type" - }, - { - "kind": "Content", - "text": ";\n\t }\n\t| {\n\t\t\ttype: \"reply\";\n\t\t\tuser: " - }, - { - "kind": "Reference", - "text": "User", - "canonicalReference": "calckey-js!entities.User:type" - }, - { - "kind": "Content", - "text": ";\n\t\t\tuserId: " - }, - { - "kind": "Reference", - "text": "User", - "canonicalReference": "calckey-js!entities.User:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t\tnote: " - }, - { - "kind": "Reference", - "text": "Note", - "canonicalReference": "calckey-js!entities.Note:type" - }, - { - "kind": "Content", - "text": ";\n\t }\n\t| {\n\t\t\ttype: \"renote\";\n\t\t\tuser: " - }, - { - "kind": "Reference", - "text": "User", - "canonicalReference": "calckey-js!entities.User:type" - }, - { - "kind": "Content", - "text": ";\n\t\t\tuserId: " - }, - { - "kind": "Reference", - "text": "User", - "canonicalReference": "calckey-js!entities.User:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t\tnote: " - }, - { - "kind": "Reference", - "text": "Note", - "canonicalReference": "calckey-js!entities.Note:type" - }, - { - "kind": "Content", - "text": ";\n\t }\n\t| {\n\t\t\ttype: \"quote\";\n\t\t\tuser: " - }, - { - "kind": "Reference", - "text": "User", - "canonicalReference": "calckey-js!entities.User:type" - }, - { - "kind": "Content", - "text": ";\n\t\t\tuserId: " - }, - { - "kind": "Reference", - "text": "User", - "canonicalReference": "calckey-js!entities.User:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t\tnote: " - }, - { - "kind": "Reference", - "text": "Note", - "canonicalReference": "calckey-js!entities.Note:type" - }, - { - "kind": "Content", - "text": ";\n\t }\n\t| {\n\t\t\ttype: \"mention\";\n\t\t\tuser: " - }, - { - "kind": "Reference", - "text": "User", - "canonicalReference": "calckey-js!entities.User:type" - }, - { - "kind": "Content", - "text": ";\n\t\t\tuserId: " - }, - { - "kind": "Reference", - "text": "User", - "canonicalReference": "calckey-js!entities.User:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t\tnote: " - }, - { - "kind": "Reference", - "text": "Note", - "canonicalReference": "calckey-js!entities.Note:type" - }, - { - "kind": "Content", - "text": ";\n\t }\n\t| {\n\t\t\ttype: \"pollVote\";\n\t\t\tuser: " - }, - { - "kind": "Reference", - "text": "User", - "canonicalReference": "calckey-js!entities.User:type" - }, - { - "kind": "Content", - "text": ";\n\t\t\tuserId: " - }, - { - "kind": "Reference", - "text": "User", - "canonicalReference": "calckey-js!entities.User:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t\t\tnote: " - }, - { - "kind": "Reference", - "text": "Note", - "canonicalReference": "calckey-js!entities.Note:type" - }, - { - "kind": "Content", - "text": ";\n\t }\n\t| {\n\t\t\ttype: \"follow\";\n\t\t\tuser: " - }, - { - "kind": "Reference", - "text": "User", - "canonicalReference": "calckey-js!entities.User:type" - }, - { - "kind": "Content", - "text": ";\n\t\t\tuserId: " - }, - { - "kind": "Reference", - "text": "User", - "canonicalReference": "calckey-js!entities.User:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t }\n\t| {\n\t\t\ttype: \"followRequestAccepted\";\n\t\t\tuser: " - }, - { - "kind": "Reference", - "text": "User", - "canonicalReference": "calckey-js!entities.User:type" - }, - { - "kind": "Content", - "text": ";\n\t\t\tuserId: " - }, - { - "kind": "Reference", - "text": "User", - "canonicalReference": "calckey-js!entities.User:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t }\n\t| {\n\t\t\ttype: \"receiveFollowRequest\";\n\t\t\tuser: " - }, - { - "kind": "Reference", - "text": "User", - "canonicalReference": "calckey-js!entities.User:type" - }, - { - "kind": "Content", - "text": ";\n\t\t\tuserId: " - }, - { - "kind": "Reference", - "text": "User", - "canonicalReference": "calckey-js!entities.User:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t }\n\t| {\n\t\t\ttype: \"groupInvited\";\n\t\t\tinvitation: " - }, - { - "kind": "Reference", - "text": "UserGroup", - "canonicalReference": "calckey-js!entities.UserGroup:type" - }, - { - "kind": "Content", - "text": ";\n\t\t\tuser: " - }, - { - "kind": "Reference", - "text": "User", - "canonicalReference": "calckey-js!entities.User:type" - }, - { - "kind": "Content", - "text": ";\n\t\t\tuserId: " - }, - { - "kind": "Reference", - "text": "User", - "canonicalReference": "calckey-js!entities.User:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\t }\n\t| {\n\t\t\ttype: \"app\";\n\t\t\theader?: string | null;\n\t\t\tbody: string;\n\t\t\ticon?: string | null;\n\t }\n)" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "src/entities.ts", - "releaseTag": "Public", - "name": "Notification", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 60 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "calckey-js!entities.OriginType:type", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare type OriginType = " - }, - { - "kind": "Content", - "text": "\"combined\" | \"local\" | \"remote\"" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "src/entities.ts", - "releaseTag": "Public", - "name": "OriginType", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "calckey-js!entities.Page:type", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare type Page = " - }, - { - "kind": "Content", - "text": "{\n\tid: " - }, - { - "kind": "Reference", - "text": "ID", - "canonicalReference": "calckey-js!entities.ID:type" - }, - { - "kind": "Content", - "text": ";\n\tcreatedAt: " - }, - { - "kind": "Reference", - "text": "DateString", - "canonicalReference": "calckey-js!entities.DateString:type" - }, - { - "kind": "Content", - "text": ";\n\tupdatedAt: " - }, - { - "kind": "Reference", - "text": "DateString", - "canonicalReference": "calckey-js!entities.DateString:type" - }, - { - "kind": "Content", - "text": ";\n\tuserId: " - }, - { - "kind": "Reference", - "text": "User", - "canonicalReference": "calckey-js!entities.User:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\tuser: " - }, - { - "kind": "Reference", - "text": "User", - "canonicalReference": "calckey-js!entities.User:type" - }, - { - "kind": "Content", - "text": ";\n\tcontent: " - }, - { - "kind": "Reference", - "text": "Record", - "canonicalReference": "!Record:type" - }, - { - "kind": "Content", - "text": "[];\n\tvariables: " - }, - { - "kind": "Reference", - "text": "Record", - "canonicalReference": "!Record:type" - }, - { - "kind": "Content", - "text": "[];\n\ttitle: string;\n\tname: string;\n\tsummary: string | null;\n\thideTitleWhenPinned: boolean;\n\talignCenter: boolean;\n\tfont: string;\n\tscript: string;\n\teyeCatchingImageId: " - }, - { - "kind": "Reference", - "text": "DriveFile", - "canonicalReference": "calckey-js!entities.DriveFile:type" - }, - { - "kind": "Content", - "text": "[\"id\"] | null;\n\teyeCatchingImage: " - }, - { - "kind": "Reference", - "text": "DriveFile", - "canonicalReference": "calckey-js!entities.DriveFile:type" - }, - { - "kind": "Content", - "text": " | null;\n\tattachedFiles: any;\n\tlikedCount: number;\n\tisLiked?: boolean;\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "src/entities.ts", - "releaseTag": "Public", - "name": "Page", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 20 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "calckey-js!entities.PageEvent:type", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare type PageEvent = " - }, - { - "kind": "Content", - "text": "{\n\tpageId: " - }, - { - "kind": "Reference", - "text": "Page", - "canonicalReference": "calckey-js!entities.Page:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\tevent: string;\n\tvar: any;\n\tuserId: " - }, - { - "kind": "Reference", - "text": "User", - "canonicalReference": "calckey-js!entities.User:type" - }, - { - "kind": "Content", - "text": "[\"id\"];\n\tuser: " - }, - { - "kind": "Reference", - "text": "User", - "canonicalReference": "calckey-js!entities.User:type" - }, - { - "kind": "Content", - "text": ";\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "src/entities.ts", - "releaseTag": "Public", - "name": "PageEvent", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 8 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "calckey-js!entities.ServerInfo:type", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare type ServerInfo = " - }, - { - "kind": "Content", - "text": "{\n\tmachine: string;\n\tcpu: {\n\t\tmodel: string;\n\t\tcores: number;\n\t};\n\tmem: {\n\t\ttotal: number;\n\t};\n\tfs: {\n\t\ttotal: number;\n\t\tused: number;\n\t};\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "src/entities.ts", - "releaseTag": "Public", - "name": "ServerInfo", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "calckey-js!entities.Signin:type", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare type Signin = " - }, - { - "kind": "Content", - "text": "{\n\tid: " - }, - { - "kind": "Reference", - "text": "ID", - "canonicalReference": "calckey-js!entities.ID:type" - }, - { - "kind": "Content", - "text": ";\n\tcreatedAt: " - }, - { - "kind": "Reference", - "text": "DateString", - "canonicalReference": "calckey-js!entities.DateString:type" - }, - { - "kind": "Content", - "text": ";\n\tip: string;\n\theaders: " - }, - { - "kind": "Reference", - "text": "Record", - "canonicalReference": "!Record:type" - }, - { - "kind": "Content", - "text": ";\n\tsuccess: boolean;\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "src/entities.ts", - "releaseTag": "Public", - "name": "Signin", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 8 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "calckey-js!entities.Stats:type", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare type Stats = " - }, - { - "kind": "Content", - "text": "{\n\tnotesCount: number;\n\toriginalNotesCount: number;\n\tusersCount: number;\n\toriginalUsersCount: number;\n\tinstances: number;\n\tdriveUsageLocal: number;\n\tdriveUsageRemote: number;\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "src/entities.ts", - "releaseTag": "Public", - "name": "Stats", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "calckey-js!entities.User:type", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare type User = " - }, - { - "kind": "Reference", - "text": "UserLite", - "canonicalReference": "calckey-js!entities.UserLite:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "UserDetailed", - "canonicalReference": "calckey-js!entities.UserDetailed:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "src/entities.ts", - "releaseTag": "Public", - "name": "User", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 4 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "calckey-js!entities.UserDetailed:type", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare type UserDetailed = " - }, - { - "kind": "Reference", - "text": "UserLite", - "canonicalReference": "calckey-js!entities.UserLite:type" - }, - { - "kind": "Content", - "text": " & {\n\tbannerBlurhash: string | null;\n\tbannerColor: string | null;\n\tbannerUrl: string | null;\n\tbirthday: string | null;\n\tcreatedAt: " - }, - { - "kind": "Reference", - "text": "DateString", - "canonicalReference": "calckey-js!entities.DateString:type" - }, - { - "kind": "Content", - "text": ";\n\tdescription: string | null;\n\tffVisibility: \"public\" | \"followers\" | \"private\";\n\tfields: {\n\t\tname: string;\n\t\tvalue: string;\n\t}[];\n\tfollowersCount: number;\n\tfollowingCount: number;\n\thasPendingFollowRequestFromYou: boolean;\n\thasPendingFollowRequestToYou: boolean;\n\tisAdmin: boolean;\n\tisBlocked: boolean;\n\tisBlocking: boolean;\n\tisBot: boolean;\n\tisCat: boolean;\n\tisFollowed: boolean;\n\tisFollowing: boolean;\n\tisLocked: boolean;\n\tisModerator: boolean;\n\tisMuted: boolean;\n\tisRenoteMuted: boolean;\n\tisSilenced: boolean;\n\tisSuspended: boolean;\n\tlang: string | null;\n\tlastFetchedAt?: " - }, - { - "kind": "Reference", - "text": "DateString", - "canonicalReference": "calckey-js!entities.DateString:type" - }, - { - "kind": "Content", - "text": ";\n\tlocation: string | null;\n\tnotesCount: number;\n\tpinnedNoteIds: " - }, - { - "kind": "Reference", - "text": "ID", - "canonicalReference": "calckey-js!entities.ID:type" - }, - { - "kind": "Content", - "text": "[];\n\tpinnedNotes: " - }, - { - "kind": "Reference", - "text": "Note", - "canonicalReference": "calckey-js!entities.Note:type" - }, - { - "kind": "Content", - "text": "[];\n\tpinnedPage: " - }, - { - "kind": "Reference", - "text": "Page", - "canonicalReference": "calckey-js!entities.Page:type" - }, - { - "kind": "Content", - "text": " | null;\n\tpinnedPageId: string | null;\n\tpublicReactions: boolean;\n\tsecurityKeys: boolean;\n\ttwoFactorEnabled: boolean;\n\tupdatedAt: " - }, - { - "kind": "Reference", - "text": "DateString", - "canonicalReference": "calckey-js!entities.DateString:type" - }, - { - "kind": "Content", - "text": " | null;\n\turi: string | null;\n\turl: string | null;\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "src/entities.ts", - "releaseTag": "Public", - "name": "UserDetailed", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 15 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "calckey-js!entities.UserGroup:type", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare type UserGroup = " - }, - { - "kind": "Reference", - "text": "TODO", - "canonicalReference": "calckey-js!~TODO_2:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "src/entities.ts", - "releaseTag": "Public", - "name": "UserGroup", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "calckey-js!entities.UserList:type", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare type UserList = " - }, - { - "kind": "Content", - "text": "{\n\tid: " - }, - { - "kind": "Reference", - "text": "ID", - "canonicalReference": "calckey-js!entities.ID:type" - }, - { - "kind": "Content", - "text": ";\n\tcreatedAt: " - }, - { - "kind": "Reference", - "text": "DateString", - "canonicalReference": "calckey-js!entities.DateString:type" - }, - { - "kind": "Content", - "text": ";\n\tname: string;\n\tuserIds: " - }, - { - "kind": "Reference", - "text": "User", - "canonicalReference": "calckey-js!entities.User:type" - }, - { - "kind": "Content", - "text": "[\"id\"][];\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "src/entities.ts", - "releaseTag": "Public", - "name": "UserList", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 8 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "calckey-js!entities.UserLite:type", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare type UserLite = " - }, - { - "kind": "Content", - "text": "{\n\tid: " - }, - { - "kind": "Reference", - "text": "ID", - "canonicalReference": "calckey-js!entities.ID:type" - }, - { - "kind": "Content", - "text": ";\n\tusername: string;\n\thost: string | null;\n\tname: string;\n\tonlineStatus: \"online\" | \"active\" | \"offline\" | \"unknown\";\n\tavatarUrl: string;\n\tavatarBlurhash: string;\n\talsoKnownAs: string[];\n\tmovedToUri: any;\n\temojis: {\n\t\tname: string;\n\t\turl: string;\n\t}[];\n\tinstance?: {\n\t\tname: " - }, - { - "kind": "Reference", - "text": "Instance", - "canonicalReference": "calckey-js!entities.Instance:type" - }, - { - "kind": "Content", - "text": "[\"name\"];\n\t\tsoftwareName: " - }, - { - "kind": "Reference", - "text": "Instance", - "canonicalReference": "calckey-js!entities.Instance:type" - }, - { - "kind": "Content", - "text": "[\"softwareName\"];\n\t\tsoftwareVersion: " - }, - { - "kind": "Reference", - "text": "Instance", - "canonicalReference": "calckey-js!entities.Instance:type" - }, - { - "kind": "Content", - "text": "[\"softwareVersion\"];\n\t\ticonUrl: " - }, - { - "kind": "Reference", - "text": "Instance", - "canonicalReference": "calckey-js!entities.Instance:type" - }, - { - "kind": "Content", - "text": "[\"iconUrl\"];\n\t\tfaviconUrl: " - }, - { - "kind": "Reference", - "text": "Instance", - "canonicalReference": "calckey-js!entities.Instance:type" - }, - { - "kind": "Content", - "text": "[\"faviconUrl\"];\n\t\tthemeColor: " - }, - { - "kind": "Reference", - "text": "Instance", - "canonicalReference": "calckey-js!entities.Instance:type" - }, - { - "kind": "Content", - "text": "[\"themeColor\"];\n\t};\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "src/entities.ts", - "releaseTag": "Public", - "name": "UserLite", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 16 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "calckey-js!entities.UserSorting:type", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare type UserSorting =\n\t" - }, - { - "kind": "Content", - "text": "| \"+follower\"\n\t| \"-follower\"\n\t| \"+createdAt\"\n\t| \"-createdAt\"\n\t| \"+updatedAt\"\n\t| \"-updatedAt\"" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "src/entities.ts", - "releaseTag": "Public", - "name": "UserSorting", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ] - }, - { - "kind": "Variable", - "canonicalReference": "calckey-js!ffVisibility:var", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "ffVisibility: " - }, - { - "kind": "Content", - "text": "readonly [\"public\", \"followers\", \"private\"]" - } - ], - "fileUrlPath": "src/index.ts", - "isReadonly": true, - "releaseTag": "Public", - "name": "ffVisibility", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "Variable", - "canonicalReference": "calckey-js!mutedNoteReasons:var", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "mutedNoteReasons: " - }, - { - "kind": "Content", - "text": "readonly [\n\t\"word\",\n\t\"manual\",\n\t\"spam\",\n\t\"other\",\n]" - } - ], - "fileUrlPath": "src/index.ts", - "isReadonly": true, - "releaseTag": "Public", - "name": "mutedNoteReasons", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "Variable", - "canonicalReference": "calckey-js!noteVisibilities:var", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "noteVisibilities: " - }, - { - "kind": "Content", - "text": "readonly [\n\t\"public\",\n\t\"home\",\n\t\"followers\",\n\t\"specified\",\n]" - } - ], - "fileUrlPath": "src/index.ts", - "isReadonly": true, - "releaseTag": "Public", - "name": "noteVisibilities", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "Variable", - "canonicalReference": "calckey-js!notificationTypes:var", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "notificationTypes: " - }, - { - "kind": "Content", - "text": "readonly [\n\t\"follow\",\n\t\"mention\",\n\t\"reply\",\n\t\"renote\",\n\t\"quote\",\n\t\"reaction\",\n\t\"pollVote\",\n\t\"pollEnded\",\n\t\"receiveFollowRequest\",\n\t\"followRequestAccepted\",\n\t\"groupInvited\",\n\t\"app\",\n]" - } - ], - "fileUrlPath": "src/index.ts", - "isReadonly": true, - "releaseTag": "Public", - "name": "notificationTypes", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "Variable", - "canonicalReference": "calckey-js!permissions:var", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "permissions: " - }, - { - "kind": "Content", - "text": "string[]" - } - ], - "fileUrlPath": "src/index.ts", - "isReadonly": true, - "releaseTag": "Public", - "name": "permissions", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "Class", - "canonicalReference": "calckey-js!Stream:class", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "export default class Stream extends " - }, - { - "kind": "Reference", - "text": "EventEmitter", - "canonicalReference": "eventemitter3!EventEmitter.EventEmitter" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "StreamEvents", - "canonicalReference": "calckey-js!~StreamEvents:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": " " - } - ], - "fileUrlPath": "src/streaming.ts", - "releaseTag": "Public", - "isAbstract": false, - "name": "Stream", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Constructor", - "canonicalReference": "calckey-js!Stream:constructor(1)", - "docComment": "/**\n * Constructs a new instance of the `Stream` class\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "constructor(\n\t\torigin: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ",\n\t\tuser: " - }, - { - "kind": "Content", - "text": "{\n\t\t\ttoken: string;\n\t\t} | null" - }, - { - "kind": "Content", - "text": ",\n\t\toptions?: " - }, - { - "kind": "Content", - "text": "{\n\t\t\tWebSocket?: any;\n\t\t}" - }, - { - "kind": "Content", - "text": ",\n\t);" - } - ], - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "origin", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "user", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "options", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": true - } - ] - }, - { - "kind": "Method", - "canonicalReference": "calckey-js!Stream#close:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "close(): " - }, - { - "kind": "Content", - "text": "void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "close" - }, - { - "kind": "Method", - "canonicalReference": "calckey-js!Stream#disconnectToChannel:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "disconnectToChannel(connection: " - }, - { - "kind": "Reference", - "text": "NonSharedConnection", - "canonicalReference": "calckey-js!~NonSharedConnection:class" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "connection", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "disconnectToChannel" - }, - { - "kind": "Method", - "canonicalReference": "calckey-js!Stream#removeSharedConnection:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "removeSharedConnection(connection: " - }, - { - "kind": "Reference", - "text": "SharedConnection", - "canonicalReference": "calckey-js!~SharedConnection:class" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "connection", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "removeSharedConnection" - }, - { - "kind": "Method", - "canonicalReference": "calckey-js!Stream#removeSharedConnectionPool:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "removeSharedConnectionPool(pool: " - }, - { - "kind": "Reference", - "text": "Pool", - "canonicalReference": "calckey-js!~Pool:class" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "pool", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "removeSharedConnectionPool" - }, - { - "kind": "Method", - "canonicalReference": "calckey-js!Stream#send:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "send(typeOrPayload: " - }, - { - "kind": "Content", - "text": "any" - }, - { - "kind": "Content", - "text": ", payload?: " - }, - { - "kind": "Content", - "text": "any" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "typeOrPayload", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "payload", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "send" - }, - { - "kind": "Property", - "canonicalReference": "calckey-js!Stream#state:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "state: " - }, - { - "kind": "Content", - "text": "\"initializing\" | \"reconnecting\" | \"connected\"" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "state", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "calckey-js!Stream#useChannel:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "useChannel(\n\t\tchannel: " - }, - { - "kind": "Content", - "text": "C" - }, - { - "kind": "Content", - "text": ",\n\t\tparams?: " - }, - { - "kind": "Reference", - "text": "Channels", - "canonicalReference": "calckey-js!Channels:type" - }, - { - "kind": "Content", - "text": "[C][\"params\"]" - }, - { - "kind": "Content", - "text": ",\n\t\tname?: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ",\n\t): " - }, - { - "kind": "Reference", - "text": "Connection", - "canonicalReference": "calckey-js!ChannelConnection:class" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "Channels", - "canonicalReference": "calckey-js!Channels:type" - }, - { - "kind": "Content", - "text": "[C]>" - }, - { - "kind": "Content", - "text": ";" - } - ], - "typeParameters": [ - { - "typeParameterName": "C", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 11, - "endIndex": 15 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "channel", - "parameterTypeTokenRange": { - "startIndex": 4, - "endIndex": 5 - }, - "isOptional": false - }, - { - "parameterName": "params", - "parameterTypeTokenRange": { - "startIndex": 6, - "endIndex": 8 - }, - "isOptional": true - }, - { - "parameterName": "name", - "parameterTypeTokenRange": { - "startIndex": 9, - "endIndex": 10 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "useChannel" - } - ], - "extendsTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "implementsTokenRanges": [] - } - ] - } - ] -} diff --git a/fe_calckey/frontend/calckey-js/etc/calckey-js.api.md b/fe_calckey/frontend/calckey-js/etc/calckey-js.api.md deleted file mode 100644 index 27ca443..0000000 --- a/fe_calckey/frontend/calckey-js/etc/calckey-js.api.md +++ /dev/null @@ -1,2835 +0,0 @@ -## API Report File for "calckey-js" - -> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). - -```ts - -import { EventEmitter } from 'eventemitter3'; - -// @public (undocumented) -export type Acct = { - username: string; - host: string | null; -}; - -// Warning: (ae-forgotten-export) The symbol "TODO_2" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type Ad = TODO_2; - -// @public (undocumented) -type Announcement = { - id: ID; - createdAt: DateString; - updatedAt: DateString | null; - text: string; - title: string; - imageUrl: string | null; - isRead?: boolean; -}; - -// @public (undocumented) -type Antenna = { - id: ID; - createdAt: DateString; - name: string; - keywords: string[][]; - excludeKeywords: string[][]; - src: "home" | "all" | "users" | "list" | "group" | "instances"; - userListId: ID | null; - userGroupId: ID | null; - users: string[]; - instances: string[]; - caseSensitive: boolean; - notify: boolean; - withReplies: boolean; - withFile: boolean; - hasUnreadNote: boolean; -}; - -declare namespace api { - export { - isAPIError, - APIError, - FetchLike, - APIClient - } -} -export { api } - -// @public (undocumented) -class APIClient { - constructor(opts: { - origin: APIClient["origin"]; - credential?: APIClient["credential"]; - fetch?: APIClient["fetch"] | null | undefined; - }); - // (undocumented) - credential: string | null | undefined; - // (undocumented) - fetch: FetchLike; - // (undocumented) - origin: string; - // Warning: (ae-forgotten-export) The symbol "IsCaseMatched" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "GetCaseResult" needs to be exported by the entry point index.d.ts - // - // (undocumented) - request( - endpoint: E, - params?: P, - credential?: string | null | undefined, - ): Promise< - Endpoints[E]["res"] extends { - $switch: { - $cases: [any, any][]; - $default: any; - }; - } - ? IsCaseMatched extends true - ? GetCaseResult - : IsCaseMatched extends true - ? GetCaseResult - : IsCaseMatched extends true - ? GetCaseResult - : IsCaseMatched extends true - ? GetCaseResult - : IsCaseMatched extends true - ? GetCaseResult - : IsCaseMatched extends true - ? GetCaseResult - : IsCaseMatched extends true - ? GetCaseResult - : IsCaseMatched extends true - ? GetCaseResult - : IsCaseMatched extends true - ? GetCaseResult - : IsCaseMatched extends true - ? GetCaseResult - : Endpoints[E]["res"]["$switch"]["$default"] - : Endpoints[E]["res"] - >; -} - -// @public (undocumented) -type APIError = { - id: string; - code: string; - message: string; - kind: "client" | "server"; - info: Record; -}; - -// @public (undocumented) -type App = TODO_2; - -// @public (undocumented) -type AuthSession = { - id: ID; - app: App; - token: string; -}; - -// @public (undocumented) -type Blocking = { - id: ID; - createdAt: DateString; - blockeeId: User["id"]; - blockee: UserDetailed; -}; - -// @public (undocumented) -type Channel = { - id: ID; -}; - -// Warning: (ae-forgotten-export) The symbol "AnyOf" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -export abstract class ChannelConnection< - Channel extends AnyOf = any, -> extends EventEmitter { - constructor(stream: Stream, channel: string, name?: string); - // (undocumented) - channel: string; - // (undocumented) - abstract dispose(): void; - // (undocumented) - abstract id: string; - // (undocumented) - inCount: number; - // (undocumented) - name?: string; - // (undocumented) - outCount: number; - // (undocumented) - send( - type: T, - body: Channel["receives"][T], - ): void; - // (undocumented) - protected stream: Stream; -} - -// @public (undocumented) -export type Channels = { - main: { - params: null; - events: { - notification: (payload: Notification_2) => void; - mention: (payload: Note) => void; - reply: (payload: Note) => void; - renote: (payload: Note) => void; - follow: (payload: User) => void; - followed: (payload: User) => void; - unfollow: (payload: User) => void; - meUpdated: (payload: MeDetailed) => void; - pageEvent: (payload: PageEvent) => void; - urlUploadFinished: (payload: { - marker: string; - file: DriveFile; - }) => void; - readAllNotifications: () => void; - unreadNotification: (payload: Notification_2) => void; - unreadMention: (payload: Note["id"]) => void; - readAllUnreadMentions: () => void; - unreadSpecifiedNote: (payload: Note["id"]) => void; - readAllUnreadSpecifiedNotes: () => void; - readAllMessagingMessages: () => void; - messagingMessage: (payload: MessagingMessage) => void; - unreadMessagingMessage: (payload: MessagingMessage) => void; - readAllAntennas: () => void; - unreadAntenna: (payload: Antenna) => void; - readAllAnnouncements: () => void; - readAllChannels: () => void; - unreadChannel: (payload: Note["id"]) => void; - myTokenRegenerated: () => void; - reversiNoInvites: () => void; - reversiInvited: (payload: FIXME) => void; - signin: (payload: FIXME) => void; - registryUpdated: (payload: { - scope?: string[]; - key: string; - value: any | null; - }) => void; - driveFileCreated: (payload: DriveFile) => void; - readAntenna: (payload: Antenna) => void; - }; - receives: null; - }; - homeTimeline: { - params: null; - events: { - note: (payload: Note) => void; - }; - receives: null; - }; - localTimeline: { - params: null; - events: { - note: (payload: Note) => void; - }; - receives: null; - }; - hybridTimeline: { - params: null; - events: { - note: (payload: Note) => void; - }; - receives: null; - }; - recommendedTimeline: { - params: null; - events: { - note: (payload: Note) => void; - }; - receives: null; - }; - globalTimeline: { - params: null; - events: { - note: (payload: Note) => void; - }; - receives: null; - }; - antenna: { - params: { - antennaId: Antenna["id"]; - }; - events: { - note: (payload: Note) => void; - }; - receives: null; - }; - messaging: { - params: { - otherparty?: User["id"] | null; - group?: UserGroup["id"] | null; - }; - events: { - message: (payload: MessagingMessage) => void; - deleted: (payload: MessagingMessage["id"]) => void; - read: (payload: MessagingMessage["id"][]) => void; - typers: (payload: User[]) => void; - }; - receives: { - read: { - id: MessagingMessage["id"]; - }; - }; - }; - serverStats: { - params: null; - events: { - stats: (payload: FIXME) => void; - }; - receives: { - requestLog: { - id: string | number; - length: number; - }; - }; - }; - queueStats: { - params: null; - events: { - stats: (payload: FIXME) => void; - }; - receives: { - requestLog: { - id: string | number; - length: number; - }; - }; - }; -}; - -// @public (undocumented) -type Clip = TODO_2; - -// @public (undocumented) -type CustomEmoji = { - id: string; - name: string; - url: string; - category: string; - aliases: string[]; -}; - -// @public (undocumented) -type DateString = string; - -// @public (undocumented) -type DetailedInstanceMetadata = LiteInstanceMetadata & { - features: Record; -}; - -// @public (undocumented) -type DriveFile = { - id: ID; - createdAt: DateString; - isSensitive: boolean; - name: string; - thumbnailUrl: string; - url: string; - type: string; - size: number; - md5: string; - blurhash: string; - comment: string | null; - properties: Record; -}; - -// @public (undocumented) -type DriveFolder = TODO_2; - -// @public (undocumented) -export type Endpoints = { - "admin/abuse-user-reports": { - req: TODO; - res: TODO; - }; - "admin/delete-all-files-of-a-user": { - req: { - userId: User["id"]; - }; - res: null; - }; - "admin/delete-logs": { - req: NoParams; - res: null; - }; - "admin/get-index-stats": { - req: TODO; - res: TODO; - }; - "admin/get-table-stats": { - req: TODO; - res: TODO; - }; - "admin/invite": { - req: TODO; - res: TODO; - }; - "admin/logs": { - req: TODO; - res: TODO; - }; - "admin/meta": { - req: TODO; - res: TODO; - }; - "admin/reset-password": { - req: TODO; - res: TODO; - }; - "admin/resolve-abuse-user-report": { - req: TODO; - res: TODO; - }; - "admin/resync-chart": { - req: TODO; - res: TODO; - }; - "admin/send-email": { - req: TODO; - res: TODO; - }; - "admin/server-info": { - req: TODO; - res: TODO; - }; - "admin/show-moderation-logs": { - req: TODO; - res: TODO; - }; - "admin/show-user": { - req: TODO; - res: TODO; - }; - "admin/show-users": { - req: TODO; - res: TODO; - }; - "admin/silence-user": { - req: TODO; - res: TODO; - }; - "admin/suspend-user": { - req: TODO; - res: TODO; - }; - "admin/unsilence-user": { - req: TODO; - res: TODO; - }; - "admin/unsuspend-user": { - req: TODO; - res: TODO; - }; - "admin/update-meta": { - req: TODO; - res: TODO; - }; - "admin/vacuum": { - req: TODO; - res: TODO; - }; - "admin/accounts/create": { - req: TODO; - res: TODO; - }; - "admin/ad/create": { - req: TODO; - res: TODO; - }; - "admin/ad/delete": { - req: { - id: Ad["id"]; - }; - res: null; - }; - "admin/ad/list": { - req: TODO; - res: TODO; - }; - "admin/ad/update": { - req: TODO; - res: TODO; - }; - "admin/announcements/create": { - req: TODO; - res: TODO; - }; - "admin/announcements/delete": { - req: { - id: Announcement["id"]; - }; - res: null; - }; - "admin/announcements/list": { - req: TODO; - res: TODO; - }; - "admin/announcements/update": { - req: TODO; - res: TODO; - }; - "admin/drive/clean-remote-files": { - req: TODO; - res: TODO; - }; - "admin/drive/cleanup": { - req: TODO; - res: TODO; - }; - "admin/drive/files": { - req: TODO; - res: TODO; - }; - "admin/drive/show-file": { - req: TODO; - res: TODO; - }; - "admin/emoji/add": { - req: TODO; - res: TODO; - }; - "admin/emoji/copy": { - req: TODO; - res: TODO; - }; - "admin/emoji/list-remote": { - req: TODO; - res: TODO; - }; - "admin/emoji/list": { - req: TODO; - res: TODO; - }; - "admin/emoji/remove": { - req: TODO; - res: TODO; - }; - "admin/emoji/update": { - req: TODO; - res: TODO; - }; - "admin/federation/delete-all-files": { - req: { - host: string; - }; - res: null; - }; - "admin/federation/refresh-remote-instance-metadata": { - req: TODO; - res: TODO; - }; - "admin/federation/remove-all-following": { - req: TODO; - res: TODO; - }; - "admin/federation/update-instance": { - req: TODO; - res: TODO; - }; - "admin/moderators/add": { - req: TODO; - res: TODO; - }; - "admin/moderators/remove": { - req: TODO; - res: TODO; - }; - "admin/promo/create": { - req: TODO; - res: TODO; - }; - "admin/queue/clear": { - req: TODO; - res: TODO; - }; - "admin/queue/deliver-delayed": { - req: TODO; - res: TODO; - }; - "admin/queue/inbox-delayed": { - req: TODO; - res: TODO; - }; - "admin/queue/jobs": { - req: TODO; - res: TODO; - }; - "admin/queue/stats": { - req: TODO; - res: TODO; - }; - "admin/relays/add": { - req: TODO; - res: TODO; - }; - "admin/relays/list": { - req: TODO; - res: TODO; - }; - "admin/relays/remove": { - req: TODO; - res: TODO; - }; - announcements: { - req: { - limit?: number; - withUnreads?: boolean; - sinceId?: Announcement["id"]; - untilId?: Announcement["id"]; - }; - res: Announcement[]; - }; - "antennas/create": { - req: TODO; - res: Antenna; - }; - "antennas/delete": { - req: { - antennaId: Antenna["id"]; - }; - res: null; - }; - "antennas/list": { - req: NoParams; - res: Antenna[]; - }; - "antennas/notes": { - req: { - antennaId: Antenna["id"]; - limit?: number; - sinceId?: Note["id"]; - untilId?: Note["id"]; - }; - res: Note[]; - }; - "antennas/show": { - req: { - antennaId: Antenna["id"]; - }; - res: Antenna; - }; - "antennas/update": { - req: TODO; - res: Antenna; - }; - "antennas/mark-read": { - req: TODO; - res: Antenna; - }; - "ap/get": { - req: { - uri: string; - }; - res: Record; - }; - "ap/show": { - req: { - uri: string; - }; - res: - | { - type: "Note"; - object: Note; - } - | { - type: "User"; - object: UserDetailed; - }; - }; - "app/create": { - req: TODO; - res: App; - }; - "app/show": { - req: { - appId: App["id"]; - }; - res: App; - }; - "auth/accept": { - req: { - token: string; - }; - res: null; - }; - "auth/session/generate": { - req: { - appSecret: string; - }; - res: { - token: string; - url: string; - }; - }; - "auth/session/show": { - req: { - token: string; - }; - res: AuthSession; - }; - "auth/session/userkey": { - req: { - appSecret: string; - token: string; - }; - res: { - accessToken: string; - user: User; - }; - }; - "blocking/create": { - req: { - userId: User["id"]; - }; - res: UserDetailed; - }; - "blocking/delete": { - req: { - userId: User["id"]; - }; - res: UserDetailed; - }; - "blocking/list": { - req: { - limit?: number; - sinceId?: Blocking["id"]; - untilId?: Blocking["id"]; - }; - res: Blocking[]; - }; - "channels/create": { - req: TODO; - res: TODO; - }; - "channels/featured": { - req: TODO; - res: TODO; - }; - "channels/follow": { - req: TODO; - res: TODO; - }; - "channels/followed": { - req: TODO; - res: TODO; - }; - "channels/owned": { - req: TODO; - res: TODO; - }; - "channels/pin-note": { - req: TODO; - res: TODO; - }; - "channels/show": { - req: TODO; - res: TODO; - }; - "channels/timeline": { - req: TODO; - res: TODO; - }; - "channels/unfollow": { - req: TODO; - res: TODO; - }; - "channels/update": { - req: TODO; - res: TODO; - }; - "charts/active-users": { - req: { - span: "day" | "hour"; - limit?: number; - offset?: number | null; - }; - res: { - local: { - users: number[]; - }; - remote: { - users: number[]; - }; - }; - }; - "charts/drive": { - req: { - span: "day" | "hour"; - limit?: number; - offset?: number | null; - }; - res: { - local: { - decCount: number[]; - decSize: number[]; - incCount: number[]; - incSize: number[]; - totalCount: number[]; - totalSize: number[]; - }; - remote: { - decCount: number[]; - decSize: number[]; - incCount: number[]; - incSize: number[]; - totalCount: number[]; - totalSize: number[]; - }; - }; - }; - "charts/federation": { - req: { - span: "day" | "hour"; - limit?: number; - offset?: number | null; - }; - res: { - instance: { - dec: number[]; - inc: number[]; - total: number[]; - }; - }; - }; - "charts/hashtag": { - req: { - span: "day" | "hour"; - limit?: number; - offset?: number | null; - }; - res: TODO; - }; - "charts/instance": { - req: { - span: "day" | "hour"; - limit?: number; - offset?: number | null; - host: string; - }; - res: { - drive: { - decFiles: number[]; - decUsage: number[]; - incFiles: number[]; - incUsage: number[]; - totalFiles: number[]; - totalUsage: number[]; - }; - followers: { - dec: number[]; - inc: number[]; - total: number[]; - }; - following: { - dec: number[]; - inc: number[]; - total: number[]; - }; - notes: { - dec: number[]; - inc: number[]; - total: number[]; - diffs: { - normal: number[]; - renote: number[]; - reply: number[]; - }; - }; - requests: { - failed: number[]; - received: number[]; - succeeded: number[]; - }; - users: { - dec: number[]; - inc: number[]; - total: number[]; - }; - }; - }; - "charts/network": { - req: { - span: "day" | "hour"; - limit?: number; - offset?: number | null; - }; - res: TODO; - }; - "charts/notes": { - req: { - span: "day" | "hour"; - limit?: number; - offset?: number | null; - }; - res: { - local: { - dec: number[]; - inc: number[]; - total: number[]; - diffs: { - normal: number[]; - renote: number[]; - reply: number[]; - }; - }; - remote: { - dec: number[]; - inc: number[]; - total: number[]; - diffs: { - normal: number[]; - renote: number[]; - reply: number[]; - }; - }; - }; - }; - "charts/user/drive": { - req: { - span: "day" | "hour"; - limit?: number; - offset?: number | null; - userId: User["id"]; - }; - res: { - decCount: number[]; - decSize: number[]; - incCount: number[]; - incSize: number[]; - totalCount: number[]; - totalSize: number[]; - }; - }; - "charts/user/following": { - req: { - span: "day" | "hour"; - limit?: number; - offset?: number | null; - userId: User["id"]; - }; - res: TODO; - }; - "charts/user/notes": { - req: { - span: "day" | "hour"; - limit?: number; - offset?: number | null; - userId: User["id"]; - }; - res: { - dec: number[]; - inc: number[]; - total: number[]; - diffs: { - normal: number[]; - renote: number[]; - reply: number[]; - }; - }; - }; - "charts/user/reactions": { - req: { - span: "day" | "hour"; - limit?: number; - offset?: number | null; - userId: User["id"]; - }; - res: TODO; - }; - "charts/users": { - req: { - span: "day" | "hour"; - limit?: number; - offset?: number | null; - }; - res: { - local: { - dec: number[]; - inc: number[]; - total: number[]; - }; - remote: { - dec: number[]; - inc: number[]; - total: number[]; - }; - }; - }; - "clips/add-note": { - req: TODO; - res: TODO; - }; - "clips/create": { - req: TODO; - res: TODO; - }; - "clips/delete": { - req: { - clipId: Clip["id"]; - }; - res: null; - }; - "clips/list": { - req: TODO; - res: TODO; - }; - "clips/notes": { - req: TODO; - res: TODO; - }; - "clips/show": { - req: TODO; - res: TODO; - }; - "clips/update": { - req: TODO; - res: TODO; - }; - drive: { - req: NoParams; - res: { - capacity: number; - usage: number; - }; - }; - "drive/files": { - req: { - folderId?: DriveFolder["id"] | null; - type?: DriveFile["type"] | null; - limit?: number; - sinceId?: DriveFile["id"]; - untilId?: DriveFile["id"]; - }; - res: DriveFile[]; - }; - "drive/files/attached-notes": { - req: TODO; - res: TODO; - }; - "drive/files/check-existence": { - req: TODO; - res: TODO; - }; - "drive/files/create": { - req: TODO; - res: TODO; - }; - "drive/files/delete": { - req: { - fileId: DriveFile["id"]; - }; - res: null; - }; - "drive/files/find-by-hash": { - req: TODO; - res: TODO; - }; - "drive/files/find": { - req: { - name: string; - folderId?: DriveFolder["id"] | null; - }; - res: DriveFile[]; - }; - "drive/files/show": { - req: { - fileId?: DriveFile["id"]; - url?: string; - }; - res: DriveFile; - }; - "drive/files/update": { - req: { - fileId: DriveFile["id"]; - folderId?: DriveFolder["id"] | null; - name?: string; - isSensitive?: boolean; - comment?: string | null; - }; - res: DriveFile; - }; - "drive/files/upload-from-url": { - req: { - url: string; - folderId?: DriveFolder["id"] | null; - isSensitive?: boolean; - comment?: string | null; - marker?: string | null; - force?: boolean; - }; - res: null; - }; - "drive/folders": { - req: { - folderId?: DriveFolder["id"] | null; - limit?: number; - sinceId?: DriveFile["id"]; - untilId?: DriveFile["id"]; - }; - res: DriveFolder[]; - }; - "drive/folders/create": { - req: { - name?: string; - parentId?: DriveFolder["id"] | null; - }; - res: DriveFolder; - }; - "drive/folders/delete": { - req: { - folderId: DriveFolder["id"]; - }; - res: null; - }; - "drive/folders/find": { - req: { - name: string; - parentId?: DriveFolder["id"] | null; - }; - res: DriveFolder[]; - }; - "drive/folders/show": { - req: { - folderId: DriveFolder["id"]; - }; - res: DriveFolder; - }; - "drive/folders/update": { - req: { - folderId: DriveFolder["id"]; - name?: string; - parentId?: DriveFolder["id"] | null; - }; - res: DriveFolder; - }; - "drive/stream": { - req: { - type?: DriveFile["type"] | null; - limit?: number; - sinceId?: DriveFile["id"]; - untilId?: DriveFile["id"]; - }; - res: DriveFile[]; - }; - endpoint: { - req: { - endpoint: string; - }; - res: { - params: { - name: string; - type: string; - }[]; - }; - }; - endpoints: { - req: NoParams; - res: string[]; - }; - "federation/dns": { - req: { - host: string; - }; - res: { - a: string[]; - aaaa: string[]; - cname: string[]; - txt: string[]; - }; - }; - "federation/followers": { - req: { - host: string; - limit?: number; - sinceId?: Following["id"]; - untilId?: Following["id"]; - }; - res: FollowingFolloweePopulated[]; - }; - "federation/following": { - req: { - host: string; - limit?: number; - sinceId?: Following["id"]; - untilId?: Following["id"]; - }; - res: FollowingFolloweePopulated[]; - }; - "federation/instances": { - req: { - host?: string | null; - blocked?: boolean | null; - notResponding?: boolean | null; - suspended?: boolean | null; - federating?: boolean | null; - subscribing?: boolean | null; - publishing?: boolean | null; - limit?: number; - offset?: number; - sort?: - | "+pubSub" - | "-pubSub" - | "+notes" - | "-notes" - | "+users" - | "-users" - | "+following" - | "-following" - | "+followers" - | "-followers" - | "+caughtAt" - | "-caughtAt" - | "+lastCommunicatedAt" - | "-lastCommunicatedAt" - | "+driveUsage" - | "-driveUsage" - | "+driveFiles" - | "-driveFiles"; - }; - res: Instance[]; - }; - "federation/show-instance": { - req: { - host: string; - }; - res: Instance; - }; - "federation/update-remote-user": { - req: { - userId: User["id"]; - }; - res: null; - }; - "federation/users": { - req: { - host: string; - limit?: number; - sinceId?: User["id"]; - untilId?: User["id"]; - }; - res: UserDetailed[]; - }; - "following/create": { - req: { - userId: User["id"]; - }; - res: User; - }; - "following/delete": { - req: { - userId: User["id"]; - }; - res: User; - }; - "following/requests/accept": { - req: { - userId: User["id"]; - }; - res: null; - }; - "following/requests/cancel": { - req: { - userId: User["id"]; - }; - res: User; - }; - "following/requests/list": { - req: NoParams; - res: FollowRequest[]; - }; - "following/requests/reject": { - req: { - userId: User["id"]; - }; - res: null; - }; - "gallery/featured": { - req: TODO; - res: TODO; - }; - "gallery/popular": { - req: TODO; - res: TODO; - }; - "gallery/posts": { - req: TODO; - res: TODO; - }; - "gallery/posts/create": { - req: TODO; - res: TODO; - }; - "gallery/posts/delete": { - req: { - postId: GalleryPost["id"]; - }; - res: null; - }; - "gallery/posts/like": { - req: TODO; - res: TODO; - }; - "gallery/posts/show": { - req: TODO; - res: TODO; - }; - "gallery/posts/unlike": { - req: TODO; - res: TODO; - }; - "gallery/posts/update": { - req: TODO; - res: TODO; - }; - "games/reversi/games": { - req: TODO; - res: TODO; - }; - "games/reversi/games/show": { - req: TODO; - res: TODO; - }; - "games/reversi/games/surrender": { - req: TODO; - res: TODO; - }; - "games/reversi/invitations": { - req: TODO; - res: TODO; - }; - "games/reversi/match": { - req: TODO; - res: TODO; - }; - "games/reversi/match/cancel": { - req: TODO; - res: TODO; - }; - "get-online-users-count": { - req: NoParams; - res: { - count: number; - }; - }; - "hashtags/list": { - req: TODO; - res: TODO; - }; - "hashtags/search": { - req: TODO; - res: TODO; - }; - "hashtags/show": { - req: TODO; - res: TODO; - }; - "hashtags/trend": { - req: TODO; - res: TODO; - }; - "hashtags/users": { - req: TODO; - res: TODO; - }; - i: { - req: NoParams; - res: User; - }; - "i/apps": { - req: TODO; - res: TODO; - }; - "i/authorized-apps": { - req: TODO; - res: TODO; - }; - "i/change-password": { - req: TODO; - res: TODO; - }; - "i/delete-account": { - req: { - password: string; - }; - res: null; - }; - "i/export-blocking": { - req: TODO; - res: TODO; - }; - "i/export-following": { - req: TODO; - res: TODO; - }; - "i/export-mute": { - req: TODO; - res: TODO; - }; - "i/export-notes": { - req: TODO; - res: TODO; - }; - "i/export-user-lists": { - req: TODO; - res: TODO; - }; - "i/favorites": { - req: { - limit?: number; - sinceId?: NoteFavorite["id"]; - untilId?: NoteFavorite["id"]; - }; - res: NoteFavorite[]; - }; - "i/gallery/likes": { - req: TODO; - res: TODO; - }; - "i/gallery/posts": { - req: TODO; - res: TODO; - }; - "i/get-word-muted-notes-count": { - req: TODO; - res: TODO; - }; - "i/import-following": { - req: TODO; - res: TODO; - }; - "i/import-user-lists": { - req: TODO; - res: TODO; - }; - "i/move": { - req: TODO; - res: TODO; - }; - "i/known-as": { - req: TODO; - res: TODO; - }; - "i/notifications": { - req: { - limit?: number; - sinceId?: Notification_2["id"]; - untilId?: Notification_2["id"]; - following?: boolean; - markAsRead?: boolean; - includeTypes?: Notification_2["type"][]; - excludeTypes?: Notification_2["type"][]; - }; - res: Notification_2[]; - }; - "i/page-likes": { - req: TODO; - res: TODO; - }; - "i/pages": { - req: TODO; - res: TODO; - }; - "i/pin": { - req: { - noteId: Note["id"]; - }; - res: MeDetailed; - }; - "i/read-all-messaging-messages": { - req: TODO; - res: TODO; - }; - "i/read-all-unread-notes": { - req: TODO; - res: TODO; - }; - "i/read-announcement": { - req: TODO; - res: TODO; - }; - "i/regenerate-token": { - req: { - password: string; - }; - res: null; - }; - "i/registry/get-all": { - req: { - scope?: string[]; - }; - res: Record; - }; - "i/registry/get-detail": { - req: { - key: string; - scope?: string[]; - }; - res: { - updatedAt: DateString; - value: any; - }; - }; - "i/registry/get": { - req: { - key: string; - scope?: string[]; - }; - res: any; - }; - "i/registry/keys-with-type": { - req: { - scope?: string[]; - }; - res: Record< - string, - "null" | "array" | "number" | "string" | "boolean" | "object" - >; - }; - "i/registry/keys": { - req: { - scope?: string[]; - }; - res: string[]; - }; - "i/registry/remove": { - req: { - key: string; - scope?: string[]; - }; - res: null; - }; - "i/registry/scopes": { - req: NoParams; - res: string[][]; - }; - "i/registry/set": { - req: { - key: string; - value: any; - scope?: string[]; - }; - res: null; - }; - "i/revoke-token": { - req: TODO; - res: TODO; - }; - "i/signin-history": { - req: { - limit?: number; - sinceId?: Signin["id"]; - untilId?: Signin["id"]; - }; - res: Signin[]; - }; - "i/unpin": { - req: { - noteId: Note["id"]; - }; - res: MeDetailed; - }; - "i/update-email": { - req: { - password: string; - email?: string | null; - }; - res: MeDetailed; - }; - "i/update": { - req: { - name?: string | null; - description?: string | null; - lang?: string | null; - location?: string | null; - birthday?: string | null; - avatarId?: DriveFile["id"] | null; - bannerId?: DriveFile["id"] | null; - fields?: { - name: string; - value: string; - }[]; - isLocked?: boolean; - isExplorable?: boolean; - hideOnlineStatus?: boolean; - carefulBot?: boolean; - autoAcceptFollowed?: boolean; - noCrawle?: boolean; - preventAiLearning?: boolean; - isBot?: boolean; - isCat?: boolean; - injectFeaturedNote?: boolean; - receiveAnnouncementEmail?: boolean; - alwaysMarkNsfw?: boolean; - mutedWords?: string[][]; - mutingNotificationTypes?: Notification_2["type"][]; - emailNotificationTypes?: string[]; - }; - res: MeDetailed; - }; - "i/user-group-invites": { - req: TODO; - res: TODO; - }; - "i/2fa/done": { - req: TODO; - res: TODO; - }; - "i/2fa/key-done": { - req: TODO; - res: TODO; - }; - "i/2fa/password-less": { - req: TODO; - res: TODO; - }; - "i/2fa/register-key": { - req: TODO; - res: TODO; - }; - "i/2fa/register": { - req: TODO; - res: TODO; - }; - "i/2fa/update-key": { - req: TODO; - res: TODO; - }; - "i/2fa/remove-key": { - req: TODO; - res: TODO; - }; - "i/2fa/unregister": { - req: TODO; - res: TODO; - }; - "messaging/history": { - req: { - limit?: number; - group?: boolean; - }; - res: MessagingMessage[]; - }; - "messaging/messages": { - req: { - userId?: User["id"]; - groupId?: UserGroup["id"]; - limit?: number; - sinceId?: MessagingMessage["id"]; - untilId?: MessagingMessage["id"]; - markAsRead?: boolean; - }; - res: MessagingMessage[]; - }; - "messaging/messages/create": { - req: { - userId?: User["id"]; - groupId?: UserGroup["id"]; - text?: string; - fileId?: DriveFile["id"]; - }; - res: MessagingMessage; - }; - "messaging/messages/delete": { - req: { - messageId: MessagingMessage["id"]; - }; - res: null; - }; - "messaging/messages/read": { - req: { - messageId: MessagingMessage["id"]; - }; - res: null; - }; - meta: { - req: { - detail?: boolean; - }; - res: { - $switch: { - $cases: [ - [ - { - detail: true; - }, - DetailedInstanceMetadata, - ], - [ - { - detail: false; - }, - LiteInstanceMetadata, - ], - [ - { - detail: boolean; - }, - LiteInstanceMetadata | DetailedInstanceMetadata, - ], - ]; - $default: LiteInstanceMetadata; - }; - }; - }; - "miauth/gen-token": { - req: TODO; - res: TODO; - }; - "mute/create": { - req: TODO; - res: TODO; - }; - "mute/delete": { - req: { - userId: User["id"]; - }; - res: null; - }; - "mute/list": { - req: TODO; - res: TODO; - }; - "renote-mute/create": { - req: TODO; - res: TODO; - }; - "renote-mute/delete": { - req: { - userId: User["id"]; - }; - res: null; - }; - "renote-mute/list": { - req: TODO; - res: TODO; - }; - "my/apps": { - req: TODO; - res: TODO; - }; - notes: { - req: { - limit?: number; - sinceId?: Note["id"]; - untilId?: Note["id"]; - }; - res: Note[]; - }; - "notes/children": { - req: { - noteId: Note["id"]; - limit?: number; - sinceId?: Note["id"]; - untilId?: Note["id"]; - }; - res: Note[]; - }; - "notes/clips": { - req: TODO; - res: TODO; - }; - "notes/conversation": { - req: TODO; - res: TODO; - }; - "notes/create": { - req: NoteSubmitReq; - res: { - createdNote: Note; - }; - }; - "notes/delete": { - req: { - noteId: Note["id"]; - }; - res: null; - }; - "notes/edit": { - req: NoteSubmitReq; - res: { - createdNote: Note; - }; - }; - "notes/favorites/create": { - req: { - noteId: Note["id"]; - }; - res: null; - }; - "notes/favorites/delete": { - req: { - noteId: Note["id"]; - }; - res: null; - }; - "notes/featured": { - req: TODO; - res: Note[]; - }; - "notes/global-timeline": { - req: { - limit?: number; - sinceId?: Note["id"]; - untilId?: Note["id"]; - sinceDate?: number; - untilDate?: number; - }; - res: Note[]; - }; - "notes/recommended-timeline": { - req: { - limit?: number; - sinceId?: Note["id"]; - untilId?: Note["id"]; - sinceDate?: number; - untilDate?: number; - }; - res: Note[]; - }; - "notes/hybrid-timeline": { - req: { - limit?: number; - sinceId?: Note["id"]; - untilId?: Note["id"]; - sinceDate?: number; - untilDate?: number; - }; - res: Note[]; - }; - "notes/local-timeline": { - req: { - limit?: number; - sinceId?: Note["id"]; - untilId?: Note["id"]; - sinceDate?: number; - untilDate?: number; - }; - res: Note[]; - }; - "notes/mentions": { - req: { - following?: boolean; - limit?: number; - sinceId?: Note["id"]; - untilId?: Note["id"]; - }; - res: Note[]; - }; - "notes/polls/recommendation": { - req: TODO; - res: TODO; - }; - "notes/polls/vote": { - req: { - noteId: Note["id"]; - choice: number; - }; - res: null; - }; - "notes/reactions": { - req: { - noteId: Note["id"]; - type?: string | null; - limit?: number; - }; - res: NoteReaction[]; - }; - "notes/reactions/create": { - req: { - noteId: Note["id"]; - reaction: string; - }; - res: null; - }; - "notes/reactions/delete": { - req: { - noteId: Note["id"]; - }; - res: null; - }; - "notes/renotes": { - req: { - limit?: number; - sinceId?: Note["id"]; - untilId?: Note["id"]; - noteId: Note["id"]; - }; - res: Note[]; - }; - "notes/replies": { - req: { - limit?: number; - sinceId?: Note["id"]; - untilId?: Note["id"]; - noteId: Note["id"]; - }; - res: Note[]; - }; - "notes/search-by-tag": { - req: TODO; - res: TODO; - }; - "notes/search": { - req: TODO; - res: TODO; - }; - "notes/show": { - req: { - noteId: Note["id"]; - }; - res: Note; - }; - "notes/state": { - req: TODO; - res: TODO; - }; - "notes/timeline": { - req: { - limit?: number; - sinceId?: Note["id"]; - untilId?: Note["id"]; - sinceDate?: number; - untilDate?: number; - }; - res: Note[]; - }; - "notes/unrenote": { - req: { - noteId: Note["id"]; - }; - res: null; - }; - "notes/user-list-timeline": { - req: { - listId: UserList["id"]; - limit?: number; - sinceId?: Note["id"]; - untilId?: Note["id"]; - sinceDate?: number; - untilDate?: number; - }; - res: Note[]; - }; - "notes/watching/create": { - req: TODO; - res: TODO; - }; - "notes/watching/delete": { - req: { - noteId: Note["id"]; - }; - res: null; - }; - "notifications/create": { - req: { - body: string; - header?: string | null; - icon?: string | null; - }; - res: null; - }; - "notifications/mark-all-as-read": { - req: NoParams; - res: null; - }; - "notifications/read": { - req: { - notificationId: Notification_2["id"]; - }; - res: null; - }; - "page-push": { - req: { - pageId: Page["id"]; - event: string; - var?: any; - }; - res: null; - }; - "pages/create": { - req: TODO; - res: Page; - }; - "pages/delete": { - req: { - pageId: Page["id"]; - }; - res: null; - }; - "pages/featured": { - req: NoParams; - res: Page[]; - }; - "pages/like": { - req: { - pageId: Page["id"]; - }; - res: null; - }; - "pages/show": { - req: { - pageId?: Page["id"]; - name?: string; - username?: string; - }; - res: Page; - }; - "pages/unlike": { - req: { - pageId: Page["id"]; - }; - res: null; - }; - "pages/update": { - req: TODO; - res: null; - }; - ping: { - req: NoParams; - res: { - pong: number; - }; - }; - "pinned-users": { - req: TODO; - res: TODO; - }; - "promo/read": { - req: TODO; - res: TODO; - }; - "request-reset-password": { - req: { - username: string; - email: string; - }; - res: null; - }; - "reset-password": { - req: { - token: string; - password: string; - }; - res: null; - }; - "room/show": { - req: TODO; - res: TODO; - }; - "room/update": { - req: TODO; - res: TODO; - }; - stats: { - req: NoParams; - res: Stats; - }; - "server-info": { - req: NoParams; - res: ServerInfo; - }; - "sw/register": { - req: TODO; - res: TODO; - }; - "username/available": { - req: { - username: string; - }; - res: { - available: boolean; - }; - }; - users: { - req: { - limit?: number; - offset?: number; - sort?: UserSorting; - origin?: OriginType; - }; - res: User[]; - }; - "users/clips": { - req: TODO; - res: TODO; - }; - "users/followers": { - req: { - userId?: User["id"]; - username?: User["username"]; - host?: User["host"] | null; - limit?: number; - sinceId?: Following["id"]; - untilId?: Following["id"]; - }; - res: FollowingFollowerPopulated[]; - }; - "users/following": { - req: { - userId?: User["id"]; - username?: User["username"]; - host?: User["host"] | null; - limit?: number; - sinceId?: Following["id"]; - untilId?: Following["id"]; - }; - res: FollowingFolloweePopulated[]; - }; - "users/gallery/posts": { - req: TODO; - res: TODO; - }; - "users/get-frequently-replied-users": { - req: TODO; - res: TODO; - }; - "users/groups/create": { - req: TODO; - res: TODO; - }; - "users/groups/delete": { - req: { - groupId: UserGroup["id"]; - }; - res: null; - }; - "users/groups/invitations/accept": { - req: TODO; - res: TODO; - }; - "users/groups/invitations/reject": { - req: TODO; - res: TODO; - }; - "users/groups/invite": { - req: TODO; - res: TODO; - }; - "users/groups/joined": { - req: TODO; - res: TODO; - }; - "users/groups/owned": { - req: TODO; - res: TODO; - }; - "users/groups/pull": { - req: TODO; - res: TODO; - }; - "users/groups/show": { - req: TODO; - res: TODO; - }; - "users/groups/transfer": { - req: TODO; - res: TODO; - }; - "users/groups/update": { - req: TODO; - res: TODO; - }; - "users/lists/create": { - req: { - name: string; - }; - res: UserList; - }; - "users/lists/delete": { - req: { - listId: UserList["id"]; - }; - res: null; - }; - "users/lists/list": { - req: NoParams; - res: UserList[]; - }; - "users/lists/pull": { - req: { - listId: UserList["id"]; - userId: User["id"]; - }; - res: null; - }; - "users/lists/push": { - req: { - listId: UserList["id"]; - userId: User["id"]; - }; - res: null; - }; - "users/lists/show": { - req: { - listId: UserList["id"]; - }; - res: UserList; - }; - "users/lists/update": { - req: { - listId: UserList["id"]; - name: string; - }; - res: UserList; - }; - "users/notes": { - req: { - userId: User["id"]; - limit?: number; - sinceId?: Note["id"]; - untilId?: Note["id"]; - sinceDate?: number; - untilDate?: number; - }; - res: Note[]; - }; - "users/pages": { - req: TODO; - res: TODO; - }; - "users/recommendation": { - req: TODO; - res: TODO; - }; - "users/relation": { - req: TODO; - res: TODO; - }; - "users/report-abuse": { - req: TODO; - res: TODO; - }; - "users/search-by-username-and-host": { - req: TODO; - res: TODO; - }; - "users/search": { - req: TODO; - res: TODO; - }; - "users/show": { - req: - | ShowUserReq - | { - userIds: User["id"][]; - }; - res: { - $switch: { - $cases: [ - [ - { - userIds: User["id"][]; - }, - UserDetailed[], - ], - ]; - $default: UserDetailed; - }; - }; - }; - "users/stats": { - req: TODO; - res: TODO; - }; -}; - -declare namespace entities { - export { - ID, - DateString, - User, - UserLite, - UserDetailed, - UserGroup, - UserList, - MeDetailed, - DriveFile, - DriveFolder, - GalleryPost, - Note, - NoteReaction, - Notification_2 as Notification, - MessagingMessage, - CustomEmoji, - LiteInstanceMetadata, - DetailedInstanceMetadata, - InstanceMetadata, - ServerInfo, - Stats, - Page, - PageEvent, - Announcement, - Antenna, - App, - AuthSession, - Ad, - Clip, - NoteFavorite, - FollowRequest, - Channel, - Following, - FollowingFolloweePopulated, - FollowingFollowerPopulated, - Blocking, - Instance, - Signin, - UserSorting, - OriginType - } -} -export { entities } - -// @public (undocumented) -type FetchLike = ( - input: string, - init?: { - method?: string; - body?: string; - credentials?: RequestCredentials; - cache?: RequestCache; - }, -) => Promise<{ - status: number; - json(): Promise; -}>; - -// @public (undocumented) -export const ffVisibility: readonly ["public", "followers", "private"]; - -// @public (undocumented) -type Following = { - id: ID; - createdAt: DateString; - followerId: User["id"]; - followeeId: User["id"]; -}; - -// @public (undocumented) -type FollowingFolloweePopulated = Following & { - followee: UserDetailed; -}; - -// @public (undocumented) -type FollowingFollowerPopulated = Following & { - follower: UserDetailed; -}; - -// @public (undocumented) -type FollowRequest = { - id: ID; - follower: User; - followee: User; -}; - -// @public (undocumented) -type GalleryPost = TODO_2; - -// @public (undocumented) -type ID = string; - -// @public (undocumented) -type Instance = { - id: ID; - caughtAt: DateString; - host: string; - usersCount: number; - notesCount: number; - followingCount: number; - followersCount: number; - driveUsage: number; - driveFiles: number; - latestRequestSentAt: DateString | null; - latestStatus: number | null; - latestRequestReceivedAt: DateString | null; - lastCommunicatedAt: DateString; - isNotResponding: boolean; - isSuspended: boolean; - softwareName: string | null; - softwareVersion: string | null; - openRegistrations: boolean | null; - name: string | null; - description: string | null; - maintainerName: string | null; - maintainerEmail: string | null; - iconUrl: string | null; - faviconUrl: string | null; - themeColor: string | null; - infoUpdatedAt: DateString | null; -}; - -// @public (undocumented) -type InstanceMetadata = - | LiteInstanceMetadata - | DetailedInstanceMetadata; - -// @public (undocumented) -function isAPIError(reason: any): reason is APIError; - -// @public (undocumented) -type LiteInstanceMetadata = { - maintainerName: string | null; - maintainerEmail: string | null; - version: string; - name: string | null; - uri: string; - description: string | null; - tosUrl: string | null; - disableRegistration: boolean; - disableLocalTimeline: boolean; - disableRecommendedTimeline: boolean; - disableGlobalTimeline: boolean; - driveCapacityPerLocalUserMb: number; - driveCapacityPerRemoteUserMb: number; - enableHcaptcha: boolean; - hcaptchaSiteKey: string | null; - enableRecaptcha: boolean; - recaptchaSiteKey: string | null; - swPublickey: string | null; - maxNoteTextLength: number; - enableEmail: boolean; - enableTwitterIntegration: boolean; - enableGithubIntegration: boolean; - enableDiscordIntegration: boolean; - enableServiceWorker: boolean; - emojis: CustomEmoji[]; - ads: { - id: ID; - ratio: number; - place: string; - url: string; - imageUrl: string; - }[]; -}; - -// @public (undocumented) -type MeDetailed = UserDetailed & { - avatarId: DriveFile["id"]; - bannerId: DriveFile["id"]; - autoAcceptFollowed: boolean; - alwaysMarkNsfw: boolean; - carefulBot: boolean; - emailNotificationTypes: string[]; - hasPendingReceivedFollowRequest: boolean; - hasUnreadAnnouncement: boolean; - hasUnreadAntenna: boolean; - hasUnreadChannel: boolean; - hasUnreadMentions: boolean; - hasUnreadMessagingMessage: boolean; - hasUnreadNotification: boolean; - hasUnreadSpecifiedNotes: boolean; - hideOnlineStatus: boolean; - injectFeaturedNote: boolean; - integrations: Record; - isDeleted: boolean; - isExplorable: boolean; - mutedWords: string[][]; - mutingNotificationTypes: string[]; - noCrawle: boolean; - preventAiLearning: boolean; - receiveAnnouncementEmail: boolean; - usePasswordLessLogin: boolean; - [other: string]: any; -}; - -// @public (undocumented) -type MessagingMessage = { - id: ID; - createdAt: DateString; - file: DriveFile | null; - fileId: DriveFile["id"] | null; - isRead: boolean; - reads: User["id"][]; - text: string | null; - user: User; - userId: User["id"]; - recipient?: User | null; - recipientId: User["id"] | null; - group?: UserGroup | null; - groupId: UserGroup["id"] | null; -}; - -// @public (undocumented) -export const mutedNoteReasons: readonly [ - "word", - "manual", - "spam", - "other", -]; - -// @public (undocumented) -type Note = { - id: ID; - createdAt: DateString; - text: string | null; - cw: string | null; - user: User; - userId: User["id"]; - reply?: Note; - replyId: Note["id"]; - renote?: Note; - renoteId: Note["id"]; - files: DriveFile[]; - fileIds: DriveFile["id"][]; - visibility: "public" | "home" | "followers" | "specified"; - visibleUserIds?: User["id"][]; - localOnly?: boolean; - channel?: Channel["id"]; - myReaction?: string; - reactions: Record; - renoteCount: number; - repliesCount: number; - poll?: { - expiresAt: DateString | null; - multiple: boolean; - choices: { - isVoted: boolean; - text: string; - votes: number; - }[]; - }; - emojis: { - name: string; - url: string; - }[]; - uri?: string; - url?: string; - updatedAt?: DateString; - isHidden?: boolean; -}; - -// @public (undocumented) -type NoteFavorite = { - id: ID; - createdAt: DateString; - noteId: Note["id"]; - note: Note; -}; - -// @public (undocumented) -type NoteReaction = { - id: ID; - createdAt: DateString; - user: UserLite; - type: string; -}; - -// @public (undocumented) -export const noteVisibilities: readonly [ - "public", - "home", - "followers", - "specified", -]; - -// @public (undocumented) -type Notification_2 = { - id: ID; - createdAt: DateString; - isRead: boolean; -} & ( - | { - type: "reaction"; - reaction: string; - user: User; - userId: User["id"]; - note: Note; - } - | { - type: "reply"; - user: User; - userId: User["id"]; - note: Note; - } - | { - type: "renote"; - user: User; - userId: User["id"]; - note: Note; - } - | { - type: "quote"; - user: User; - userId: User["id"]; - note: Note; - } - | { - type: "mention"; - user: User; - userId: User["id"]; - note: Note; - } - | { - type: "pollVote"; - user: User; - userId: User["id"]; - note: Note; - } - | { - type: "follow"; - user: User; - userId: User["id"]; - } - | { - type: "followRequestAccepted"; - user: User; - userId: User["id"]; - } - | { - type: "receiveFollowRequest"; - user: User; - userId: User["id"]; - } - | { - type: "groupInvited"; - invitation: UserGroup; - user: User; - userId: User["id"]; - } - | { - type: "app"; - header?: string | null; - body: string; - icon?: string | null; - } -); - -// @public (undocumented) -export const notificationTypes: readonly [ - "follow", - "mention", - "reply", - "renote", - "quote", - "reaction", - "pollVote", - "pollEnded", - "receiveFollowRequest", - "followRequestAccepted", - "groupInvited", - "app", -]; - -// @public (undocumented) -type OriginType = "combined" | "local" | "remote"; - -// @public (undocumented) -type Page = { - id: ID; - createdAt: DateString; - updatedAt: DateString; - userId: User["id"]; - user: User; - content: Record[]; - variables: Record[]; - title: string; - name: string; - summary: string | null; - hideTitleWhenPinned: boolean; - alignCenter: boolean; - font: string; - script: string; - eyeCatchingImageId: DriveFile["id"] | null; - eyeCatchingImage: DriveFile | null; - attachedFiles: any; - likedCount: number; - isLiked?: boolean; -}; - -// @public (undocumented) -type PageEvent = { - pageId: Page["id"]; - event: string; - var: any; - userId: User["id"]; - user: User; -}; - -// @public (undocumented) -export const permissions: string[]; - -// @public (undocumented) -type ServerInfo = { - machine: string; - cpu: { - model: string; - cores: number; - }; - mem: { - total: number; - }; - fs: { - total: number; - used: number; - }; -}; - -// @public (undocumented) -type Signin = { - id: ID; - createdAt: DateString; - ip: string; - headers: Record; - success: boolean; -}; - -// @public (undocumented) -type Stats = { - notesCount: number; - originalNotesCount: number; - usersCount: number; - originalUsersCount: number; - instances: number; - driveUsageLocal: number; - driveUsageRemote: number; -}; - -// Warning: (ae-forgotten-export) The symbol "StreamEvents" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -export class Stream extends EventEmitter { - constructor( - origin: string, - user: { - token: string; - } | null, - options?: { - WebSocket?: any; - }, - ); - // (undocumented) - close(): void; - // Warning: (ae-forgotten-export) The symbol "NonSharedConnection" needs to be exported by the entry point index.d.ts - // - // (undocumented) - disconnectToChannel(connection: NonSharedConnection): void; - // Warning: (ae-forgotten-export) The symbol "SharedConnection" needs to be exported by the entry point index.d.ts - // - // (undocumented) - removeSharedConnection(connection: SharedConnection): void; - // Warning: (ae-forgotten-export) The symbol "Pool" needs to be exported by the entry point index.d.ts - // - // (undocumented) - removeSharedConnectionPool(pool: Pool): void; - // (undocumented) - send(typeOrPayload: any, payload?: any): void; - // (undocumented) - state: "initializing" | "reconnecting" | "connected"; - // (undocumented) - useChannel( - channel: C, - params?: Channels[C]["params"], - name?: string, - ): ChannelConnection; - } - -// @public (undocumented) -type User = UserLite | UserDetailed; - -// @public (undocumented) -type UserDetailed = UserLite & { - bannerBlurhash: string | null; - bannerColor: string | null; - bannerUrl: string | null; - birthday: string | null; - createdAt: DateString; - description: string | null; - ffVisibility: "public" | "followers" | "private"; - fields: { - name: string; - value: string; - }[]; - followersCount: number; - followingCount: number; - hasPendingFollowRequestFromYou: boolean; - hasPendingFollowRequestToYou: boolean; - isAdmin: boolean; - isBlocked: boolean; - isBlocking: boolean; - isBot: boolean; - isCat: boolean; - isFollowed: boolean; - isFollowing: boolean; - isLocked: boolean; - isModerator: boolean; - isMuted: boolean; - isRenoteMuted: boolean; - isSilenced: boolean; - isSuspended: boolean; - lang: string | null; - lastFetchedAt?: DateString; - location: string | null; - notesCount: number; - pinnedNoteIds: ID[]; - pinnedNotes: Note[]; - pinnedPage: Page | null; - pinnedPageId: string | null; - publicReactions: boolean; - securityKeys: boolean; - twoFactorEnabled: boolean; - updatedAt: DateString | null; - uri: string | null; - url: string | null; -}; - -// @public (undocumented) -type UserGroup = TODO_2; - -// @public (undocumented) -type UserList = { - id: ID; - createdAt: DateString; - name: string; - userIds: User["id"][]; -}; - -// @public (undocumented) -type UserLite = { - id: ID; - username: string; - host: string | null; - name: string; - onlineStatus: "online" | "active" | "offline" | "unknown"; - avatarUrl: string; - avatarBlurhash: string; - alsoKnownAs: string[]; - movedToUri: any; - emojis: { - name: string; - url: string; - }[]; - instance?: { - name: Instance["name"]; - softwareName: Instance["softwareName"]; - softwareVersion: Instance["softwareVersion"]; - iconUrl: Instance["iconUrl"]; - faviconUrl: Instance["faviconUrl"]; - themeColor: Instance["themeColor"]; - }; -}; - -// @public (undocumented) -type UserSorting = - | "+follower" - | "-follower" - | "+createdAt" - | "-createdAt" - | "+updatedAt" - | "-updatedAt"; - -// Warnings were encountered during analysis: -// -// src/api.types.ts:80:37 - (ae-forgotten-export) The symbol "TODO" needs to be exported by the entry point index.d.ts -// src/api.types.ts:83:28 - (ae-forgotten-export) The symbol "NoParams" needs to be exported by the entry point index.d.ts -// src/api.types.ts:853:5 - (ae-forgotten-export) The symbol "NoteSubmitReq" needs to be exported by the entry point index.d.ts -// src/api.types.ts:1094:3 - (ae-forgotten-export) The symbol "ShowUserReq" needs to be exported by the entry point index.d.ts -// src/streaming.types.ts:56:18 - (ae-forgotten-export) The symbol "FIXME" needs to be exported by the entry point index.d.ts - -// (No @packageDocumentation comment for this package) - -``` diff --git a/fe_calckey/frontend/calckey-js/etc/misskey-js.api.md b/fe_calckey/frontend/calckey-js/etc/misskey-js.api.md deleted file mode 100644 index 269d5cf..0000000 --- a/fe_calckey/frontend/calckey-js/etc/misskey-js.api.md +++ /dev/null @@ -1,2681 +0,0 @@ -## API Report File for "misskey-js" - -> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). - -```ts - -import { EventEmitter } from 'eventemitter3'; - -// @public (undocumented) -export type Acct = { - username: string; - host: string | null; -}; - -// Warning: (ae-forgotten-export) The symbol "TODO" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type Ad = TODO_2; - -// @public (undocumented) -type Announcement = { - id: ID; - createdAt: DateString; - updatedAt: DateString | null; - text: string; - title: string; - imageUrl: string | null; - isRead?: boolean; -}; - -// @public (undocumented) -type Antenna = { - id: ID; - createdAt: DateString; - name: string; - keywords: string[][]; - excludeKeywords: string[][]; - src: 'home' | 'all' | 'users' | 'list' | 'group'; - userListId: ID | null; - userGroupId: ID | null; - users: string[]; - caseSensitive: boolean; - notify: boolean; - withReplies: boolean; - withFile: boolean; - hasUnreadNote: boolean; -}; - -declare namespace api { - export { - isAPIError, - APIError, - FetchLike, - APIClient - } -} -export { api } - -// @public (undocumented) -class APIClient { - constructor(opts: { - origin: APIClient['origin']; - credential?: APIClient['credential']; - fetch?: APIClient['fetch'] | null | undefined; - }); - // (undocumented) - credential: string | null | undefined; - // (undocumented) - fetch: FetchLike; - // (undocumented) - origin: string; - // Warning: (ae-forgotten-export) The symbol "IsCaseMatched" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "GetCaseResult" needs to be exported by the entry point index.d.ts - // - // (undocumented) - request(endpoint: E, params?: P, credential?: string | null | undefined): Promise extends true ? GetCaseResult : IsCaseMatched extends true ? GetCaseResult : IsCaseMatched extends true ? GetCaseResult : IsCaseMatched extends true ? GetCaseResult : IsCaseMatched extends true ? GetCaseResult : IsCaseMatched extends true ? GetCaseResult : IsCaseMatched extends true ? GetCaseResult : IsCaseMatched extends true ? GetCaseResult : IsCaseMatched extends true ? GetCaseResult : IsCaseMatched extends true ? GetCaseResult : Endpoints[E]['res']['$switch']['$default'] : Endpoints[E]['res']>; -} - -// @public (undocumented) -type APIError = { - id: string; - code: string; - message: string; - kind: 'client' | 'server'; - info: Record; -}; - -// @public (undocumented) -type App = TODO_2; - -// @public (undocumented) -type AuthSession = { - id: ID; - app: App; - token: string; -}; - -// @public (undocumented) -type Blocking = { - id: ID; - createdAt: DateString; - blockeeId: User['id']; - blockee: UserDetailed; -}; - -// @public (undocumented) -type Channel = { - id: ID; -}; - -// Warning: (ae-forgotten-export) The symbol "AnyOf" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -export abstract class ChannelConnection = any> extends EventEmitter { - constructor(stream: Stream, channel: string, name?: string); - // (undocumented) - channel: string; - // (undocumented) - abstract dispose(): void; - // (undocumented) - abstract id: string; - // (undocumented) - inCount: number; - // (undocumented) - name?: string; - // (undocumented) - outCount: number; - // (undocumented) - send(type: T, body: Channel['receives'][T]): void; - // (undocumented) - protected stream: Stream; -} - -// @public (undocumented) -export type Channels = { - main: { - params: null; - events: { - notification: (payload: Notification_2) => void; - mention: (payload: Note) => void; - reply: (payload: Note) => void; - renote: (payload: Note) => void; - follow: (payload: User) => void; - followed: (payload: User) => void; - unfollow: (payload: User) => void; - meUpdated: (payload: MeDetailed) => void; - pageEvent: (payload: PageEvent) => void; - urlUploadFinished: (payload: { - marker: string; - file: DriveFile; - }) => void; - readAllNotifications: () => void; - unreadNotification: (payload: Notification_2) => void; - unreadMention: (payload: Note['id']) => void; - readAllUnreadMentions: () => void; - unreadSpecifiedNote: (payload: Note['id']) => void; - readAllUnreadSpecifiedNotes: () => void; - readAllMessagingMessages: () => void; - messagingMessage: (payload: MessagingMessage) => void; - unreadMessagingMessage: (payload: MessagingMessage) => void; - readAllAntennas: () => void; - unreadAntenna: (payload: Antenna) => void; - readAllAnnouncements: () => void; - readAllChannels: () => void; - unreadChannel: (payload: Note['id']) => void; - myTokenRegenerated: () => void; - reversiNoInvites: () => void; - reversiInvited: (payload: FIXME) => void; - signin: (payload: FIXME) => void; - registryUpdated: (payload: { - scope?: string[]; - key: string; - value: any | null; - }) => void; - driveFileCreated: (payload: DriveFile) => void; - readAntenna: (payload: Antenna) => void; - }; - receives: null; - }; - homeTimeline: { - params: null; - events: { - note: (payload: Note) => void; - }; - receives: null; - }; - localTimeline: { - params: null; - events: { - note: (payload: Note) => void; - }; - receives: null; - }; - hybridTimeline: { - params: null; - events: { - note: (payload: Note) => void; - }; - receives: null; - }; - recommendedTimeline: { - params: null; - events: { - note: (payload: Note) => void; - }; - receives: null; - }; - globalTimeline: { - params: null; - events: { - note: (payload: Note) => void; - }; - receives: null; - }; - messaging: { - params: { - otherparty?: User['id'] | null; - group?: UserGroup['id'] | null; - }; - events: { - message: (payload: MessagingMessage) => void; - deleted: (payload: MessagingMessage['id']) => void; - read: (payload: MessagingMessage['id'][]) => void; - typers: (payload: User[]) => void; - }; - receives: { - read: { - id: MessagingMessage['id']; - }; - }; - }; - serverStats: { - params: null; - events: { - stats: (payload: FIXME) => void; - }; - receives: { - requestLog: { - id: string | number; - length: number; - }; - }; - }; - queueStats: { - params: null; - events: { - stats: (payload: FIXME) => void; - }; - receives: { - requestLog: { - id: string | number; - length: number; - }; - }; - }; -}; - -// @public (undocumented) -type Clip = TODO_2; - -// @public (undocumented) -type CustomEmoji = { - id: string; - name: string; - url: string; - category: string; - aliases: string[]; -}; - -// @public (undocumented) -type DateString = string; - -// @public (undocumented) -type DetailedInstanceMetadata = LiteInstanceMetadata & { - features: Record; -}; - -// @public (undocumented) -type DriveFile = { - id: ID; - createdAt: DateString; - isSensitive: boolean; - name: string; - thumbnailUrl: string; - url: string; - type: string; - size: number; - md5: string; - blurhash: string; - properties: Record; -}; - -// @public (undocumented) -type DriveFolder = TODO_2; - -// @public (undocumented) -export type Endpoints = { - 'admin/abuse-user-reports': { - req: TODO; - res: TODO; - }; - 'admin/delete-all-files-of-a-user': { - req: { - userId: User['id']; - }; - res: null; - }; - 'admin/delete-logs': { - req: NoParams; - res: null; - }; - 'admin/get-index-stats': { - req: TODO; - res: TODO; - }; - 'admin/get-table-stats': { - req: TODO; - res: TODO; - }; - 'admin/invite': { - req: TODO; - res: TODO; - }; - 'admin/logs': { - req: TODO; - res: TODO; - }; - 'admin/reset-password': { - req: TODO; - res: TODO; - }; - 'admin/resolve-abuse-user-report': { - req: TODO; - res: TODO; - }; - 'admin/resync-chart': { - req: TODO; - res: TODO; - }; - 'admin/send-email': { - req: TODO; - res: TODO; - }; - 'admin/server-info': { - req: TODO; - res: TODO; - }; - 'admin/show-moderation-logs': { - req: TODO; - res: TODO; - }; - 'admin/show-user': { - req: TODO; - res: TODO; - }; - 'admin/show-users': { - req: TODO; - res: TODO; - }; - 'admin/silence-user': { - req: TODO; - res: TODO; - }; - 'admin/suspend-user': { - req: TODO; - res: TODO; - }; - 'admin/unsilence-user': { - req: TODO; - res: TODO; - }; - 'admin/unsuspend-user': { - req: TODO; - res: TODO; - }; - 'admin/update-meta': { - req: TODO; - res: TODO; - }; - 'admin/vacuum': { - req: TODO; - res: TODO; - }; - 'admin/accounts/create': { - req: TODO; - res: TODO; - }; - 'admin/ad/create': { - req: TODO; - res: TODO; - }; - 'admin/ad/delete': { - req: { - id: Ad['id']; - }; - res: null; - }; - 'admin/ad/list': { - req: TODO; - res: TODO; - }; - 'admin/ad/update': { - req: TODO; - res: TODO; - }; - 'admin/announcements/create': { - req: TODO; - res: TODO; - }; - 'admin/announcements/delete': { - req: { - id: Announcement['id']; - }; - res: null; - }; - 'admin/announcements/list': { - req: TODO; - res: TODO; - }; - 'admin/announcements/update': { - req: TODO; - res: TODO; - }; - 'admin/drive/clean-remote-files': { - req: TODO; - res: TODO; - }; - 'admin/drive/cleanup': { - req: TODO; - res: TODO; - }; - 'admin/drive/files': { - req: TODO; - res: TODO; - }; - 'admin/drive/show-file': { - req: TODO; - res: TODO; - }; - 'admin/emoji/add': { - req: TODO; - res: TODO; - }; - 'admin/emoji/copy': { - req: TODO; - res: TODO; - }; - 'admin/emoji/list-remote': { - req: TODO; - res: TODO; - }; - 'admin/emoji/list': { - req: TODO; - res: TODO; - }; - 'admin/emoji/remove': { - req: TODO; - res: TODO; - }; - 'admin/emoji/update': { - req: TODO; - res: TODO; - }; - 'admin/federation/delete-all-files': { - req: { - host: string; - }; - res: null; - }; - 'admin/federation/refresh-remote-instance-metadata': { - req: TODO; - res: TODO; - }; - 'admin/federation/remove-all-following': { - req: TODO; - res: TODO; - }; - 'admin/federation/update-instance': { - req: TODO; - res: TODO; - }; - 'admin/moderators/add': { - req: TODO; - res: TODO; - }; - 'admin/moderators/remove': { - req: TODO; - res: TODO; - }; - 'admin/promo/create': { - req: TODO; - res: TODO; - }; - 'admin/queue/clear': { - req: TODO; - res: TODO; - }; - 'admin/queue/deliver-delayed': { - req: TODO; - res: TODO; - }; - 'admin/queue/inbox-delayed': { - req: TODO; - res: TODO; - }; - 'admin/queue/jobs': { - req: TODO; - res: TODO; - }; - 'admin/queue/stats': { - req: TODO; - res: TODO; - }; - 'admin/relays/add': { - req: TODO; - res: TODO; - }; - 'admin/relays/list': { - req: TODO; - res: TODO; - }; - 'admin/relays/remove': { - req: TODO; - res: TODO; - }; - 'announcements': { - req: { - limit?: number; - withUnreads?: boolean; - sinceId?: Announcement['id']; - untilId?: Announcement['id']; - }; - res: Announcement[]; - }; - 'antennas/create': { - req: TODO; - res: Antenna; - }; - 'antennas/delete': { - req: { - antennaId: Antenna['id']; - }; - res: null; - }; - 'antennas/list': { - req: NoParams; - res: Antenna[]; - }; - 'antennas/notes': { - req: { - antennaId: Antenna['id']; - limit?: number; - sinceId?: Note['id']; - untilId?: Note['id']; - }; - res: Note[]; - }; - 'antennas/show': { - req: { - antennaId: Antenna['id']; - }; - res: Antenna; - }; - 'antennas/update': { - req: TODO; - res: Antenna; - }; - 'ap/get': { - req: { - uri: string; - }; - res: Record; - }; - 'ap/show': { - req: { - uri: string; - }; - res: { - type: 'Note'; - object: Note; - } | { - type: 'User'; - object: UserDetailed; - }; - }; - 'app/create': { - req: TODO; - res: App; - }; - 'app/show': { - req: { - appId: App['id']; - }; - res: App; - }; - 'auth/accept': { - req: { - token: string; - }; - res: null; - }; - 'auth/session/generate': { - req: { - appSecret: string; - }; - res: { - token: string; - url: string; - }; - }; - 'auth/session/show': { - req: { - token: string; - }; - res: AuthSession; - }; - 'auth/session/userkey': { - req: { - appSecret: string; - token: string; - }; - res: { - accessToken: string; - user: User; - }; - }; - 'blocking/create': { - req: { - userId: User['id']; - }; - res: UserDetailed; - }; - 'blocking/delete': { - req: { - userId: User['id']; - }; - res: UserDetailed; - }; - 'blocking/list': { - req: { - limit?: number; - sinceId?: Blocking['id']; - untilId?: Blocking['id']; - }; - res: Blocking[]; - }; - 'channels/create': { - req: TODO; - res: TODO; - }; - 'channels/featured': { - req: TODO; - res: TODO; - }; - 'channels/follow': { - req: TODO; - res: TODO; - }; - 'channels/followed': { - req: TODO; - res: TODO; - }; - 'channels/owned': { - req: TODO; - res: TODO; - }; - 'channels/pin-note': { - req: TODO; - res: TODO; - }; - 'channels/show': { - req: TODO; - res: TODO; - }; - 'channels/timeline': { - req: TODO; - res: TODO; - }; - 'channels/unfollow': { - req: TODO; - res: TODO; - }; - 'channels/update': { - req: TODO; - res: TODO; - }; - 'charts/active-users': { - req: { - span: 'day' | 'hour'; - limit?: number; - offset?: number | null; - }; - res: { - local: { - users: number[]; - }; - remote: { - users: number[]; - }; - }; - }; - 'charts/drive': { - req: { - span: 'day' | 'hour'; - limit?: number; - offset?: number | null; - }; - res: { - local: { - decCount: number[]; - decSize: number[]; - incCount: number[]; - incSize: number[]; - totalCount: number[]; - totalSize: number[]; - }; - remote: { - decCount: number[]; - decSize: number[]; - incCount: number[]; - incSize: number[]; - totalCount: number[]; - totalSize: number[]; - }; - }; - }; - 'charts/federation': { - req: { - span: 'day' | 'hour'; - limit?: number; - offset?: number | null; - }; - res: { - instance: { - dec: number[]; - inc: number[]; - total: number[]; - }; - }; - }; - 'charts/hashtag': { - req: { - span: 'day' | 'hour'; - limit?: number; - offset?: number | null; - }; - res: TODO; - }; - 'charts/instance': { - req: { - span: 'day' | 'hour'; - limit?: number; - offset?: number | null; - host: string; - }; - res: { - drive: { - decFiles: number[]; - decUsage: number[]; - incFiles: number[]; - incUsage: number[]; - totalFiles: number[]; - totalUsage: number[]; - }; - followers: { - dec: number[]; - inc: number[]; - total: number[]; - }; - following: { - dec: number[]; - inc: number[]; - total: number[]; - }; - notes: { - dec: number[]; - inc: number[]; - total: number[]; - diffs: { - normal: number[]; - renote: number[]; - reply: number[]; - }; - }; - requests: { - failed: number[]; - received: number[]; - succeeded: number[]; - }; - users: { - dec: number[]; - inc: number[]; - total: number[]; - }; - }; - }; - 'charts/network': { - req: { - span: 'day' | 'hour'; - limit?: number; - offset?: number | null; - }; - res: TODO; - }; - 'charts/notes': { - req: { - span: 'day' | 'hour'; - limit?: number; - offset?: number | null; - }; - res: { - local: { - dec: number[]; - inc: number[]; - total: number[]; - diffs: { - normal: number[]; - renote: number[]; - reply: number[]; - }; - }; - remote: { - dec: number[]; - inc: number[]; - total: number[]; - diffs: { - normal: number[]; - renote: number[]; - reply: number[]; - }; - }; - }; - }; - 'charts/user/drive': { - req: { - span: 'day' | 'hour'; - limit?: number; - offset?: number | null; - userId: User['id']; - }; - res: { - decCount: number[]; - decSize: number[]; - incCount: number[]; - incSize: number[]; - totalCount: number[]; - totalSize: number[]; - }; - }; - 'charts/user/following': { - req: { - span: 'day' | 'hour'; - limit?: number; - offset?: number | null; - userId: User['id']; - }; - res: TODO; - }; - 'charts/user/notes': { - req: { - span: 'day' | 'hour'; - limit?: number; - offset?: number | null; - userId: User['id']; - }; - res: { - dec: number[]; - inc: number[]; - total: number[]; - diffs: { - normal: number[]; - renote: number[]; - reply: number[]; - }; - }; - }; - 'charts/user/reactions': { - req: { - span: 'day' | 'hour'; - limit?: number; - offset?: number | null; - userId: User['id']; - }; - res: TODO; - }; - 'charts/users': { - req: { - span: 'day' | 'hour'; - limit?: number; - offset?: number | null; - }; - res: { - local: { - dec: number[]; - inc: number[]; - total: number[]; - }; - remote: { - dec: number[]; - inc: number[]; - total: number[]; - }; - }; - }; - 'clips/add-note': { - req: TODO; - res: TODO; - }; - 'clips/create': { - req: TODO; - res: TODO; - }; - 'clips/delete': { - req: { - clipId: Clip['id']; - }; - res: null; - }; - 'clips/list': { - req: TODO; - res: TODO; - }; - 'clips/notes': { - req: TODO; - res: TODO; - }; - 'clips/show': { - req: TODO; - res: TODO; - }; - 'clips/update': { - req: TODO; - res: TODO; - }; - 'drive': { - req: NoParams; - res: { - capacity: number; - usage: number; - }; - }; - 'drive/files': { - req: { - folderId?: DriveFolder['id'] | null; - type?: DriveFile['type'] | null; - limit?: number; - sinceId?: DriveFile['id']; - untilId?: DriveFile['id']; - }; - res: DriveFile[]; - }; - 'drive/files/attached-notes': { - req: TODO; - res: TODO; - }; - 'drive/files/check-existence': { - req: TODO; - res: TODO; - }; - 'drive/files/create': { - req: TODO; - res: TODO; - }; - 'drive/files/delete': { - req: { - fileId: DriveFile['id']; - }; - res: null; - }; - 'drive/files/find-by-hash': { - req: TODO; - res: TODO; - }; - 'drive/files/find': { - req: { - name: string; - folderId?: DriveFolder['id'] | null; - }; - res: DriveFile[]; - }; - 'drive/files/show': { - req: { - fileId?: DriveFile['id']; - url?: string; - }; - res: DriveFile; - }; - 'drive/files/update': { - req: { - fileId: DriveFile['id']; - folderId?: DriveFolder['id'] | null; - name?: string; - isSensitive?: boolean; - comment?: string | null; - }; - res: DriveFile; - }; - 'drive/files/upload-from-url': { - req: { - url: string; - folderId?: DriveFolder['id'] | null; - isSensitive?: boolean; - comment?: string | null; - marker?: string | null; - force?: boolean; - }; - res: null; - }; - 'drive/folders': { - req: { - folderId?: DriveFolder['id'] | null; - limit?: number; - sinceId?: DriveFile['id']; - untilId?: DriveFile['id']; - }; - res: DriveFolder[]; - }; - 'drive/folders/create': { - req: { - name?: string; - parentId?: DriveFolder['id'] | null; - }; - res: DriveFolder; - }; - 'drive/folders/delete': { - req: { - folderId: DriveFolder['id']; - }; - res: null; - }; - 'drive/folders/find': { - req: { - name: string; - parentId?: DriveFolder['id'] | null; - }; - res: DriveFolder[]; - }; - 'drive/folders/show': { - req: { - folderId: DriveFolder['id']; - }; - res: DriveFolder; - }; - 'drive/folders/update': { - req: { - folderId: DriveFolder['id']; - name?: string; - parentId?: DriveFolder['id'] | null; - }; - res: DriveFolder; - }; - 'drive/stream': { - req: { - type?: DriveFile['type'] | null; - limit?: number; - sinceId?: DriveFile['id']; - untilId?: DriveFile['id']; - }; - res: DriveFile[]; - }; - 'endpoint': { - req: { - endpoint: string; - }; - res: { - params: { - name: string; - type: string; - }[]; - }; - }; - 'endpoints': { - req: NoParams; - res: string[]; - }; - 'federation/dns': { - req: { - host: string; - }; - res: { - a: string[]; - aaaa: string[]; - cname: string[]; - txt: string[]; - }; - }; - 'federation/followers': { - req: { - host: string; - limit?: number; - sinceId?: Following['id']; - untilId?: Following['id']; - }; - res: FollowingFolloweePopulated[]; - }; - 'federation/following': { - req: { - host: string; - limit?: number; - sinceId?: Following['id']; - untilId?: Following['id']; - }; - res: FollowingFolloweePopulated[]; - }; - 'federation/instances': { - req: { - host?: string | null; - blocked?: boolean | null; - notResponding?: boolean | null; - suspended?: boolean | null; - federating?: boolean | null; - subscribing?: boolean | null; - publishing?: boolean | null; - limit?: number; - offset?: number; - sort?: '+pubSub' | '-pubSub' | '+notes' | '-notes' | '+users' | '-users' | '+following' | '-following' | '+followers' | '-followers' | '+caughtAt' | '-caughtAt' | '+lastCommunicatedAt' | '-lastCommunicatedAt' | '+driveUsage' | '-driveUsage' | '+driveFiles' | '-driveFiles'; - }; - res: Instance[]; - }; - 'federation/show-instance': { - req: { - host: string; - }; - res: Instance; - }; - 'federation/update-remote-user': { - req: { - userId: User['id']; - }; - res: null; - }; - 'federation/users': { - req: { - host: string; - limit?: number; - sinceId?: User['id']; - untilId?: User['id']; - }; - res: UserDetailed[]; - }; - 'following/create': { - req: { - userId: User['id']; - }; - res: User; - }; - 'following/delete': { - req: { - userId: User['id']; - }; - res: User; - }; - 'following/requests/accept': { - req: { - userId: User['id']; - }; - res: null; - }; - 'following/requests/cancel': { - req: { - userId: User['id']; - }; - res: User; - }; - 'following/requests/list': { - req: NoParams; - res: FollowRequest[]; - }; - 'following/requests/reject': { - req: { - userId: User['id']; - }; - res: null; - }; - 'gallery/featured': { - req: TODO; - res: TODO; - }; - 'gallery/popular': { - req: TODO; - res: TODO; - }; - 'gallery/posts': { - req: TODO; - res: TODO; - }; - 'gallery/posts/create': { - req: TODO; - res: TODO; - }; - 'gallery/posts/delete': { - req: { - postId: GalleryPost['id']; - }; - res: null; - }; - 'gallery/posts/like': { - req: TODO; - res: TODO; - }; - 'gallery/posts/show': { - req: TODO; - res: TODO; - }; - 'gallery/posts/unlike': { - req: TODO; - res: TODO; - }; - 'gallery/posts/update': { - req: TODO; - res: TODO; - }; - 'games/reversi/games': { - req: TODO; - res: TODO; - }; - 'games/reversi/games/show': { - req: TODO; - res: TODO; - }; - 'games/reversi/games/surrender': { - req: TODO; - res: TODO; - }; - 'games/reversi/invitations': { - req: TODO; - res: TODO; - }; - 'games/reversi/match': { - req: TODO; - res: TODO; - }; - 'games/reversi/match/cancel': { - req: TODO; - res: TODO; - }; - 'get-online-users-count': { - req: NoParams; - res: { - count: number; - }; - }; - 'hashtags/list': { - req: TODO; - res: TODO; - }; - 'hashtags/search': { - req: TODO; - res: TODO; - }; - 'hashtags/show': { - req: TODO; - res: TODO; - }; - 'hashtags/trend': { - req: TODO; - res: TODO; - }; - 'hashtags/users': { - req: TODO; - res: TODO; - }; - 'i': { - req: NoParams; - res: User; - }; - 'i/apps': { - req: TODO; - res: TODO; - }; - 'i/authorized-apps': { - req: TODO; - res: TODO; - }; - 'i/change-password': { - req: TODO; - res: TODO; - }; - 'i/delete-account': { - req: { - password: string; - }; - res: null; - }; - 'i/export-blocking': { - req: TODO; - res: TODO; - }; - 'i/export-following': { - req: TODO; - res: TODO; - }; - 'i/export-mute': { - req: TODO; - res: TODO; - }; - 'i/export-notes': { - req: TODO; - res: TODO; - }; - 'i/export-user-lists': { - req: TODO; - res: TODO; - }; - 'i/favorites': { - req: { - limit?: number; - sinceId?: NoteFavorite['id']; - untilId?: NoteFavorite['id']; - }; - res: NoteFavorite[]; - }; - 'i/gallery/likes': { - req: TODO; - res: TODO; - }; - 'i/gallery/posts': { - req: TODO; - res: TODO; - }; - 'i/get-word-muted-notes-count': { - req: TODO; - res: TODO; - }; - 'i/import-following': { - req: TODO; - res: TODO; - }; - 'i/import-user-lists': { - req: TODO; - res: TODO; - }; - 'i/notifications': { - req: { - limit?: number; - sinceId?: Notification_2['id']; - untilId?: Notification_2['id']; - following?: boolean; - markAsRead?: boolean; - includeTypes?: Notification_2['type'][]; - excludeTypes?: Notification_2['type'][]; - }; - res: Notification_2[]; - }; - 'i/page-likes': { - req: TODO; - res: TODO; - }; - 'i/pages': { - req: TODO; - res: TODO; - }; - 'i/pin': { - req: { - noteId: Note['id']; - }; - res: MeDetailed; - }; - 'i/read-all-messaging-messages': { - req: TODO; - res: TODO; - }; - 'i/read-all-unread-notes': { - req: TODO; - res: TODO; - }; - 'i/read-announcement': { - req: TODO; - res: TODO; - }; - 'i/regenerate-token': { - req: { - password: string; - }; - res: null; - }; - 'i/registry/get-all': { - req: { - scope?: string[]; - }; - res: Record; - }; - 'i/registry/get-detail': { - req: { - key: string; - scope?: string[]; - }; - res: { - updatedAt: DateString; - value: any; - }; - }; - 'i/registry/get': { - req: { - key: string; - scope?: string[]; - }; - res: any; - }; - 'i/registry/keys-with-type': { - req: { - scope?: string[]; - }; - res: Record; - }; - 'i/registry/keys': { - req: { - scope?: string[]; - }; - res: string[]; - }; - 'i/registry/remove': { - req: { - key: string; - scope?: string[]; - }; - res: null; - }; - 'i/registry/scopes': { - req: NoParams; - res: string[][]; - }; - 'i/registry/set': { - req: { - key: string; - value: any; - scope?: string[]; - }; - res: null; - }; - 'i/revoke-token': { - req: TODO; - res: TODO; - }; - 'i/signin-history': { - req: { - limit?: number; - sinceId?: Signin['id']; - untilId?: Signin['id']; - }; - res: Signin[]; - }; - 'i/unpin': { - req: { - noteId: Note['id']; - }; - res: MeDetailed; - }; - 'i/update-email': { - req: { - password: string; - email?: string | null; - }; - res: MeDetailed; - }; - 'i/update': { - req: { - name?: string | null; - description?: string | null; - lang?: string | null; - location?: string | null; - birthday?: string | null; - avatarId?: DriveFile['id'] | null; - bannerId?: DriveFile['id'] | null; - fields?: { - name: string; - value: string; - }[]; - isLocked?: boolean; - isExplorable?: boolean; - hideOnlineStatus?: boolean; - carefulBot?: boolean; - autoAcceptFollowed?: boolean; - noCrawle?: boolean; - isBot?: boolean; - isCat?: boolean; - injectFeaturedNote?: boolean; - receiveAnnouncementEmail?: boolean; - alwaysMarkNsfw?: boolean; - mutedWords?: string[][]; - mutingNotificationTypes?: Notification_2['type'][]; - emailNotificationTypes?: string[]; - }; - res: MeDetailed; - }; - 'i/user-group-invites': { - req: TODO; - res: TODO; - }; - 'i/2fa/done': { - req: TODO; - res: TODO; - }; - 'i/2fa/key-done': { - req: TODO; - res: TODO; - }; - 'i/2fa/password-less': { - req: TODO; - res: TODO; - }; - 'i/2fa/register-key': { - req: TODO; - res: TODO; - }; - 'i/2fa/register': { - req: TODO; - res: TODO; - }; - 'i/2fa/remove-key': { - req: TODO; - res: TODO; - }; - 'i/2fa/unregister': { - req: TODO; - res: TODO; - }; - 'messaging/history': { - req: { - limit?: number; - group?: boolean; - }; - res: MessagingMessage[]; - }; - 'messaging/messages': { - req: { - userId?: User['id']; - groupId?: UserGroup['id']; - limit?: number; - sinceId?: MessagingMessage['id']; - untilId?: MessagingMessage['id']; - markAsRead?: boolean; - }; - res: MessagingMessage[]; - }; - 'messaging/messages/create': { - req: { - userId?: User['id']; - groupId?: UserGroup['id']; - text?: string; - fileId?: DriveFile['id']; - }; - res: MessagingMessage; - }; - 'messaging/messages/delete': { - req: { - messageId: MessagingMessage['id']; - }; - res: null; - }; - 'messaging/messages/read': { - req: { - messageId: MessagingMessage['id']; - }; - res: null; - }; - 'meta': { - req: { - detail?: boolean; - }; - res: { - $switch: { - $cases: [ - [ - { - detail: true; - }, - DetailedInstanceMetadata - ], - [ - { - detail: false; - }, - LiteInstanceMetadata - ], - [ - { - detail: boolean; - }, - LiteInstanceMetadata | DetailedInstanceMetadata - ] - ]; - $default: LiteInstanceMetadata; - }; - }; - }; - 'miauth/gen-token': { - req: TODO; - res: TODO; - }; - 'mute/create': { - req: TODO; - res: TODO; - }; - 'mute/delete': { - req: { - userId: User['id']; - }; - res: null; - }; - 'mute/list': { - req: TODO; - res: TODO; - }; - 'my/apps': { - req: TODO; - res: TODO; - }; - 'notes': { - req: { - limit?: number; - sinceId?: Note['id']; - untilId?: Note['id']; - }; - res: Note[]; - }; - 'notes/children': { - req: { - noteId: Note['id']; - limit?: number; - sinceId?: Note['id']; - untilId?: Note['id']; - }; - res: Note[]; - }; - 'notes/clips': { - req: TODO; - res: TODO; - }; - 'notes/conversation': { - req: TODO; - res: TODO; - }; - 'notes/create': { - req: { - visibility?: 'public' | 'home' | 'followers' | 'specified'; - visibleUserIds?: User['id'][]; - text?: null | string; - cw?: null | string; - viaMobile?: boolean; - localOnly?: boolean; - fileIds?: DriveFile['id'][]; - replyId?: null | Note['id']; - renoteId?: null | Note['id']; - channelId?: null | Channel['id']; - poll?: null | { - choices: string[]; - multiple?: boolean; - expiresAt?: null | number; - expiredAfter?: null | number; - }; - }; - res: { - createdNote: Note; - }; - }; - 'notes/delete': { - req: { - noteId: Note['id']; - }; - res: null; - }; - 'notes/favorites/create': { - req: { - noteId: Note['id']; - }; - res: null; - }; - 'notes/favorites/delete': { - req: { - noteId: Note['id']; - }; - res: null; - }; - 'notes/featured': { - req: TODO; - res: Note[]; - }; - 'notes/global-timeline': { - req: { - limit?: number; - sinceId?: Note['id']; - untilId?: Note['id']; - sinceDate?: number; - untilDate?: number; - }; - res: Note[]; - }; - 'notes/recommended-timeline': { - req: { - limit?: number; - sinceId?: Note['id']; - untilId?: Note['id']; - sinceDate?: number; - untilDate?: number; - }; - res: Note[]; - }; - 'notes/hybrid-timeline': { - req: { - limit?: number; - sinceId?: Note['id']; - untilId?: Note['id']; - sinceDate?: number; - untilDate?: number; - }; - res: Note[]; - }; - 'notes/local-timeline': { - req: { - limit?: number; - sinceId?: Note['id']; - untilId?: Note['id']; - sinceDate?: number; - untilDate?: number; - }; - res: Note[]; - }; - 'notes/mentions': { - req: { - following?: boolean; - limit?: number; - sinceId?: Note['id']; - untilId?: Note['id']; - }; - res: Note[]; - }; - 'notes/polls/recommendation': { - req: TODO; - res: TODO; - }; - 'notes/polls/vote': { - req: { - noteId: Note['id']; - choice: number; - }; - res: null; - }; - 'notes/reactions': { - req: { - noteId: Note['id']; - type?: string | null; - limit?: number; - }; - res: NoteReaction[]; - }; - 'notes/reactions/create': { - req: { - noteId: Note['id']; - reaction: string; - }; - res: null; - }; - 'notes/reactions/delete': { - req: { - noteId: Note['id']; - }; - res: null; - }; - 'notes/renotes': { - req: { - limit?: number; - sinceId?: Note['id']; - untilId?: Note['id']; - noteId: Note['id']; - }; - res: Note[]; - }; - 'notes/replies': { - req: { - limit?: number; - sinceId?: Note['id']; - untilId?: Note['id']; - noteId: Note['id']; - }; - res: Note[]; - }; - 'notes/search-by-tag': { - req: TODO; - res: TODO; - }; - 'notes/search': { - req: TODO; - res: TODO; - }; - 'notes/show': { - req: { - noteId: Note['id']; - }; - res: Note; - }; - 'notes/state': { - req: TODO; - res: TODO; - }; - 'notes/timeline': { - req: { - limit?: number; - sinceId?: Note['id']; - untilId?: Note['id']; - sinceDate?: number; - untilDate?: number; - }; - res: Note[]; - }; - 'notes/unrenote': { - req: { - noteId: Note['id']; - }; - res: null; - }; - 'notes/user-list-timeline': { - req: { - listId: UserList['id']; - limit?: number; - sinceId?: Note['id']; - untilId?: Note['id']; - sinceDate?: number; - untilDate?: number; - }; - res: Note[]; - }; - 'notes/watching/create': { - req: TODO; - res: TODO; - }; - 'notes/watching/delete': { - req: { - noteId: Note['id']; - }; - res: null; - }; - 'notifications/create': { - req: { - body: string; - header?: string | null; - icon?: string | null; - }; - res: null; - }; - 'notifications/mark-all-as-read': { - req: NoParams; - res: null; - }; - 'notifications/read': { - req: { - notificationId: Notification_2['id']; - }; - res: null; - }; - 'page-push': { - req: { - pageId: Page['id']; - event: string; - var?: any; - }; - res: null; - }; - 'pages/create': { - req: TODO; - res: Page; - }; - 'pages/delete': { - req: { - pageId: Page['id']; - }; - res: null; - }; - 'pages/featured': { - req: NoParams; - res: Page[]; - }; - 'pages/like': { - req: { - pageId: Page['id']; - }; - res: null; - }; - 'pages/show': { - req: { - pageId?: Page['id']; - name?: string; - username?: string; - }; - res: Page; - }; - 'pages/unlike': { - req: { - pageId: Page['id']; - }; - res: null; - }; - 'pages/update': { - req: TODO; - res: null; - }; - 'ping': { - req: NoParams; - res: { - pong: number; - }; - }; - 'pinned-users': { - req: TODO; - res: TODO; - }; - 'promo/read': { - req: TODO; - res: TODO; - }; - 'request-reset-password': { - req: { - username: string; - email: string; - }; - res: null; - }; - 'reset-password': { - req: { - token: string; - password: string; - }; - res: null; - }; - 'room/show': { - req: TODO; - res: TODO; - }; - 'room/update': { - req: TODO; - res: TODO; - }; - 'stats': { - req: NoParams; - res: Stats; - }; - 'server-info': { - req: NoParams; - res: ServerInfo; - }; - 'sw/register': { - req: TODO; - res: TODO; - }; - 'username/available': { - req: { - username: string; - }; - res: { - available: boolean; - }; - }; - 'users': { - req: { - limit?: number; - offset?: number; - sort?: UserSorting; - origin?: OriginType; - }; - res: User[]; - }; - 'users/clips': { - req: TODO; - res: TODO; - }; - 'users/followers': { - req: { - userId?: User['id']; - username?: User['username']; - host?: User['host'] | null; - limit?: number; - sinceId?: Following['id']; - untilId?: Following['id']; - }; - res: FollowingFollowerPopulated[]; - }; - 'users/following': { - req: { - userId?: User['id']; - username?: User['username']; - host?: User['host'] | null; - limit?: number; - sinceId?: Following['id']; - untilId?: Following['id']; - }; - res: FollowingFolloweePopulated[]; - }; - 'users/gallery/posts': { - req: TODO; - res: TODO; - }; - 'users/get-frequently-replied-users': { - req: TODO; - res: TODO; - }; - 'users/groups/create': { - req: TODO; - res: TODO; - }; - 'users/groups/delete': { - req: { - groupId: UserGroup['id']; - }; - res: null; - }; - 'users/groups/invitations/accept': { - req: TODO; - res: TODO; - }; - 'users/groups/invitations/reject': { - req: TODO; - res: TODO; - }; - 'users/groups/invite': { - req: TODO; - res: TODO; - }; - 'users/groups/joined': { - req: TODO; - res: TODO; - }; - 'users/groups/owned': { - req: TODO; - res: TODO; - }; - 'users/groups/pull': { - req: TODO; - res: TODO; - }; - 'users/groups/show': { - req: TODO; - res: TODO; - }; - 'users/groups/transfer': { - req: TODO; - res: TODO; - }; - 'users/groups/update': { - req: TODO; - res: TODO; - }; - 'users/lists/create': { - req: { - name: string; - }; - res: UserList; - }; - 'users/lists/delete': { - req: { - listId: UserList['id']; - }; - res: null; - }; - 'users/lists/list': { - req: NoParams; - res: UserList[]; - }; - 'users/lists/pull': { - req: { - listId: UserList['id']; - userId: User['id']; - }; - res: null; - }; - 'users/lists/push': { - req: { - listId: UserList['id']; - userId: User['id']; - }; - res: null; - }; - 'users/lists/show': { - req: { - listId: UserList['id']; - }; - res: UserList; - }; - 'users/lists/update': { - req: { - listId: UserList['id']; - name: string; - }; - res: UserList; - }; - 'users/notes': { - req: { - userId: User['id']; - limit?: number; - sinceId?: Note['id']; - untilId?: Note['id']; - sinceDate?: number; - untilDate?: number; - }; - res: Note[]; - }; - 'users/pages': { - req: TODO; - res: TODO; - }; - 'users/recommendation': { - req: TODO; - res: TODO; - }; - 'users/relation': { - req: TODO; - res: TODO; - }; - 'users/report-abuse': { - req: TODO; - res: TODO; - }; - 'users/search-by-username-and-host': { - req: TODO; - res: TODO; - }; - 'users/search': { - req: TODO; - res: TODO; - }; - 'users/show': { - req: ShowUserReq | { - userIds: User['id'][]; - }; - res: { - $switch: { - $cases: [ - [ - { - userIds: User['id'][]; - }, - UserDetailed[] - ] - ]; - $default: UserDetailed; - }; - }; - }; - 'users/stats': { - req: TODO; - res: TODO; - }; -}; - -declare namespace entities { - export { - ID, - DateString, - User, - UserLite, - UserDetailed, - UserGroup, - UserList, - MeDetailed, - DriveFile, - DriveFolder, - GalleryPost, - Note, - NoteReaction, - Notification_2 as Notification, - MessagingMessage, - CustomEmoji, - LiteInstanceMetadata, - DetailedInstanceMetadata, - InstanceMetadata, - ServerInfo, - Stats, - Page, - PageEvent, - Announcement, - Antenna, - App, - AuthSession, - Ad, - Clip, - NoteFavorite, - FollowRequest, - Channel, - Following, - FollowingFolloweePopulated, - FollowingFollowerPopulated, - Blocking, - Instance, - Signin, - UserSorting, - OriginType - } -} -export { entities } - -// @public (undocumented) -type FetchLike = (input: string, init?: { - method?: string; - body?: string; - credentials?: RequestCredentials; - cache?: RequestCache; -}) => Promise<{ - status: number; - json(): Promise; -}>; - -// @public (undocumented) -export const ffVisibility: readonly ["public", "followers", "private"]; - -// @public (undocumented) -type Following = { - id: ID; - createdAt: DateString; - followerId: User['id']; - followeeId: User['id']; -}; - -// @public (undocumented) -type FollowingFolloweePopulated = Following & { - followee: UserDetailed; -}; - -// @public (undocumented) -type FollowingFollowerPopulated = Following & { - follower: UserDetailed; -}; - -// @public (undocumented) -type FollowRequest = { - id: ID; - follower: User; - followee: User; -}; - -// @public (undocumented) -type GalleryPost = TODO_2; - -// @public (undocumented) -type ID = string; - -// @public (undocumented) -type Instance = { - id: ID; - caughtAt: DateString; - host: string; - usersCount: number; - notesCount: number; - followingCount: number; - followersCount: number; - driveUsage: number; - driveFiles: number; - latestRequestSentAt: DateString | null; - latestStatus: number | null; - latestRequestReceivedAt: DateString | null; - lastCommunicatedAt: DateString; - isNotResponding: boolean; - isSuspended: boolean; - softwareName: string | null; - softwareVersion: string | null; - openRegistrations: boolean | null; - name: string | null; - description: string | null; - maintainerName: string | null; - maintainerEmail: string | null; - iconUrl: string | null; - faviconUrl: string | null; - themeColor: string | null; - infoUpdatedAt: DateString | null; -}; - -// @public (undocumented) -type InstanceMetadata = LiteInstanceMetadata | DetailedInstanceMetadata; - -// @public (undocumented) -function isAPIError(reason: any): reason is APIError; - -// @public (undocumented) -type LiteInstanceMetadata = { - maintainerName: string | null; - maintainerEmail: string | null; - version: string; - name: string | null; - uri: string; - description: string | null; - tosUrl: string | null; - disableRegistration: boolean; - disableLocalTimeline: boolean; - disableRecommendedTimeline: boolean; - disableGlobalTimeline: boolean; - driveCapacityPerLocalUserMb: number; - driveCapacityPerRemoteUserMb: number; - enableHcaptcha: boolean; - hcaptchaSiteKey: string | null; - enableRecaptcha: boolean; - recaptchaSiteKey: string | null; - swPublickey: string | null; - maxNoteTextLength: number; - enableEmail: boolean; - enableTwitterIntegration: boolean; - enableGithubIntegration: boolean; - enableDiscordIntegration: boolean; - enableServiceWorker: boolean; - emojis: CustomEmoji[]; - ads: { - id: ID; - ratio: number; - place: string; - url: string; - imageUrl: string; - }[]; -}; - -// @public (undocumented) -type MeDetailed = UserDetailed & { - avatarId: DriveFile['id']; - bannerId: DriveFile['id']; - autoAcceptFollowed: boolean; - alwaysMarkNsfw: boolean; - carefulBot: boolean; - emailNotificationTypes: string[]; - hasPendingReceivedFollowRequest: boolean; - hasUnreadAnnouncement: boolean; - hasUnreadAntenna: boolean; - hasUnreadChannel: boolean; - hasUnreadMentions: boolean; - hasUnreadMessagingMessage: boolean; - hasUnreadNotification: boolean; - hasUnreadSpecifiedNotes: boolean; - hideOnlineStatus: boolean; - injectFeaturedNote: boolean; - integrations: Record; - isDeleted: boolean; - isExplorable: boolean; - mutedWords: string[][]; - mutingNotificationTypes: string[]; - noCrawle: boolean; - receiveAnnouncementEmail: boolean; - usePasswordLessLogin: boolean; - [other: string]: any; -}; - -// @public (undocumented) -type MessagingMessage = { - id: ID; - createdAt: DateString; - file: DriveFile | null; - fileId: DriveFile['id'] | null; - isRead: boolean; - reads: User['id'][]; - text: string | null; - user: User; - userId: User['id']; - recipient?: User | null; - recipientId: User['id'] | null; - group?: UserGroup | null; - groupId: UserGroup['id'] | null; -}; - -// @public (undocumented) -export const mutedNoteReasons: readonly ["word", "manual", "spam", "other"]; - -// @public (undocumented) -type Note = { - id: ID; - createdAt: DateString; - text: string | null; - cw: string | null; - user: User; - userId: User['id']; - reply?: Note; - replyId: Note['id']; - renote?: Note; - renoteId: Note['id']; - files: DriveFile[]; - fileIds: DriveFile['id'][]; - visibility: 'public' | 'home' | 'followers' | 'specified'; - visibleUserIds?: User['id'][]; - localOnly?: boolean; - myReaction?: string; - reactions: Record; - renoteCount: number; - repliesCount: number; - poll?: { - expiresAt: DateString | null; - multiple: boolean; - choices: { - isVoted: boolean; - text: string; - votes: number; - }[]; - }; - emojis: { - name: string; - url: string; - }[]; - uri?: string; - url?: string; - isHidden?: boolean; -}; - -// @public (undocumented) -type NoteFavorite = { - id: ID; - createdAt: DateString; - noteId: Note['id']; - note: Note; -}; - -// @public (undocumented) -type NoteReaction = { - id: ID; - createdAt: DateString; - user: UserLite; - type: string; -}; - -// @public (undocumented) -export const noteVisibilities: readonly ["public", "home", "followers", "specified"]; - -// @public (undocumented) -type Notification_2 = { - id: ID; - createdAt: DateString; - isRead: boolean; -} & ({ - type: 'reaction'; - reaction: string; - user: User; - userId: User['id']; - note: Note; -} | { - type: 'reply'; - user: User; - userId: User['id']; - note: Note; -} | { - type: 'renote'; - user: User; - userId: User['id']; - note: Note; -} | { - type: 'quote'; - user: User; - userId: User['id']; - note: Note; -} | { - type: 'mention'; - user: User; - userId: User['id']; - note: Note; -} | { - type: 'pollVote'; - user: User; - userId: User['id']; - note: Note; -} | { - type: 'follow'; - user: User; - userId: User['id']; -} | { - type: 'followRequestAccepted'; - user: User; - userId: User['id']; -} | { - type: 'receiveFollowRequest'; - user: User; - userId: User['id']; -} | { - type: 'groupInvited'; - invitation: UserGroup; - user: User; - userId: User['id']; -} | { - type: 'app'; - header?: string | null; - body: string; - icon?: string | null; -}); - -// @public (undocumented) -export const notificationTypes: readonly ["follow", "mention", "reply", "renote", "quote", "reaction", "pollVote", "receiveFollowRequest", "followRequestAccepted", "groupInvited", "app"]; - -// @public (undocumented) -type OriginType = 'combined' | 'local' | 'remote'; - -// @public (undocumented) -type Page = { - id: ID; - createdAt: DateString; - updatedAt: DateString; - userId: User['id']; - user: User; - content: Record[]; - variables: Record[]; - title: string; - name: string; - summary: string | null; - hideTitleWhenPinned: boolean; - alignCenter: boolean; - font: string; - script: string; - eyeCatchingImageId: DriveFile['id'] | null; - eyeCatchingImage: DriveFile | null; - attachedFiles: any; - likedCount: number; - isLiked?: boolean; -}; - -// @public (undocumented) -type PageEvent = { - pageId: Page['id']; - event: string; - var: any; - userId: User['id']; - user: User; -}; - -// @public (undocumented) -export const permissions: string[]; - -// @public (undocumented) -type ServerInfo = { - machine: string; - cpu: { - model: string; - cores: number; - }; - mem: { - total: number; - }; - fs: { - total: number; - used: number; - }; -}; - -// @public (undocumented) -type Signin = { - id: ID; - createdAt: DateString; - ip: string; - headers: Record; - success: boolean; -}; - -// @public (undocumented) -type Stats = { - notesCount: number; - originalNotesCount: number; - usersCount: number; - originalUsersCount: number; - instances: number; - driveUsageLocal: number; - driveUsageRemote: number; -}; - -// Warning: (ae-forgotten-export) The symbol "StreamEvents" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -export class Stream extends EventEmitter { - constructor(origin: string, user: { - token: string; - } | null, options?: { - WebSocket?: any; - }); - // (undocumented) - close(): void; - // Warning: (ae-forgotten-export) The symbol "NonSharedConnection" needs to be exported by the entry point index.d.ts - // - // (undocumented) - disconnectToChannel(connection: NonSharedConnection): void; - // Warning: (ae-forgotten-export) The symbol "SharedConnection" needs to be exported by the entry point index.d.ts - // - // (undocumented) - removeSharedConnection(connection: SharedConnection): void; - // Warning: (ae-forgotten-export) The symbol "Pool" needs to be exported by the entry point index.d.ts - // - // (undocumented) - removeSharedConnectionPool(pool: Pool): void; - // (undocumented) - send(typeOrPayload: any, payload?: any): void; - // (undocumented) - state: 'initializing' | 'reconnecting' | 'connected'; - // (undocumented) - useChannel(channel: C, params?: Channels[C]['params'], name?: string): ChannelConnection; -} - -// @public (undocumented) -type User = UserLite | UserDetailed; - -// @public (undocumented) -type UserDetailed = UserLite & { - bannerBlurhash: string | null; - bannerColor: string | null; - bannerUrl: string | null; - birthday: string | null; - createdAt: DateString; - description: string | null; - ffVisibility: 'public' | 'followers' | 'private'; - fields: { - name: string; - value: string; - }[]; - followersCount: number; - followingCount: number; - hasPendingFollowRequestFromYou: boolean; - hasPendingFollowRequestToYou: boolean; - isAdmin: boolean; - isBlocked: boolean; - isBlocking: boolean; - isBot: boolean; - isCat: boolean; - isFollowed: boolean; - isFollowing: boolean; - isLocked: boolean; - isModerator: boolean; - isMuted: boolean; - isSilenced: boolean; - isSuspended: boolean; - lang: string | null; - lastFetchedAt?: DateString; - location: string | null; - notesCount: number; - pinnedNoteIds: ID[]; - pinnedNotes: Note[]; - pinnedPage: Page | null; - pinnedPageId: string | null; - publicReactions: boolean; - securityKeys: boolean; - twoFactorEnabled: boolean; - updatedAt: DateString | null; - uri: string | null; - url: string | null; -}; - -// @public (undocumented) -type UserGroup = TODO_2; - -// @public (undocumented) -type UserList = { - id: ID; - createdAt: DateString; - name: string; - userIds: User['id'][]; -}; - -// @public (undocumented) -type UserLite = { - id: ID; - username: string; - host: string | null; - name: string; - onlineStatus: 'online' | 'active' | 'offline' | 'unknown'; - avatarUrl: string; - avatarBlurhash: string; - emojis: { - name: string; - url: string; - }[]; - instance?: { - name: Instance['name']; - softwareName: Instance['softwareName']; - softwareVersion: Instance['softwareVersion']; - iconUrl: Instance['iconUrl']; - faviconUrl: Instance['faviconUrl']; - themeColor: Instance['themeColor']; - }; -}; - -// @public (undocumented) -type UserSorting = '+follower' | '-follower' | '+createdAt' | '-createdAt' | '+updatedAt' | '-updatedAt'; - -// Warnings were encountered during analysis: -// -// src/api.types.ts:16:32 - (ae-forgotten-export) The symbol "TODO" needs to be exported by the entry point index.d.ts -// src/api.types.ts:18:25 - (ae-forgotten-export) The symbol "NoParams" needs to be exported by the entry point index.d.ts -// src/api.types.ts:595:18 - (ae-forgotten-export) The symbol "ShowUserReq" needs to be exported by the entry point index.d.ts -// src/streaming.types.ts:35:4 - (ae-forgotten-export) The symbol "FIXME" needs to be exported by the entry point index.d.ts - -// (No @packageDocumentation comment for this package) - -``` diff --git a/fe_calckey/frontend/calckey-js/markdown/calckey-js.acct.md b/fe_calckey/frontend/calckey-js/markdown/calckey-js.acct.md deleted file mode 100644 index b984c95..0000000 --- a/fe_calckey/frontend/calckey-js/markdown/calckey-js.acct.md +++ /dev/null @@ -1,14 +0,0 @@ - - -[Home](./index.md) > [calckey-js](./calckey-js.md) > [Acct](./calckey-js.acct.md) - -## Acct type - -**Signature:** - -```typescript -export declare type Acct = { - username: string; - host: string | null; -}; -``` diff --git a/fe_calckey/frontend/calckey-js/markdown/calckey-js.api.apiclient._constructor_.md b/fe_calckey/frontend/calckey-js/markdown/calckey-js.api.apiclient._constructor_.md deleted file mode 100644 index 5255777..0000000 --- a/fe_calckey/frontend/calckey-js/markdown/calckey-js.api.apiclient._constructor_.md +++ /dev/null @@ -1,24 +0,0 @@ - - -[Home](./index.md) > [calckey-js](./calckey-js.md) > [api](./calckey-js.api.md) > [APIClient](./calckey-js.api.apiclient.md) > [(constructor)](./calckey-js.api.apiclient._constructor_.md) - -## api.APIClient.(constructor) - -Constructs a new instance of the `APIClient` class - -**Signature:** - -```typescript -constructor(opts: { - origin: APIClient["origin"]; - credential?: APIClient["credential"]; - fetch?: APIClient["fetch"] | null | undefined; - }); -``` - -## Parameters - -| Parameter | Type | Description | -| --- | --- | --- | -| opts | { origin: [APIClient](./calckey-js.api.apiclient.md)\["origin"\]; credential?: [APIClient](./calckey-js.api.apiclient.md)\["credential"\]; fetch?: [APIClient](./calckey-js.api.apiclient.md)\["fetch"\] \| null \| undefined; } | | - diff --git a/fe_calckey/frontend/calckey-js/markdown/calckey-js.api.apiclient.credential.md b/fe_calckey/frontend/calckey-js/markdown/calckey-js.api.apiclient.credential.md deleted file mode 100644 index 4ecdf94..0000000 --- a/fe_calckey/frontend/calckey-js/markdown/calckey-js.api.apiclient.credential.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [calckey-js](./calckey-js.md) > [api](./calckey-js.api.md) > [APIClient](./calckey-js.api.apiclient.md) > [credential](./calckey-js.api.apiclient.credential.md) - -## api.APIClient.credential property - -**Signature:** - -```typescript -credential: string | null | undefined; -``` diff --git a/fe_calckey/frontend/calckey-js/markdown/calckey-js.api.apiclient.fetch.md b/fe_calckey/frontend/calckey-js/markdown/calckey-js.api.apiclient.fetch.md deleted file mode 100644 index 7f03062..0000000 --- a/fe_calckey/frontend/calckey-js/markdown/calckey-js.api.apiclient.fetch.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [calckey-js](./calckey-js.md) > [api](./calckey-js.api.md) > [APIClient](./calckey-js.api.apiclient.md) > [fetch](./calckey-js.api.apiclient.fetch.md) - -## api.APIClient.fetch property - -**Signature:** - -```typescript -fetch: FetchLike; -``` diff --git a/fe_calckey/frontend/calckey-js/markdown/calckey-js.api.apiclient.md b/fe_calckey/frontend/calckey-js/markdown/calckey-js.api.apiclient.md deleted file mode 100644 index 902db5c..0000000 --- a/fe_calckey/frontend/calckey-js/markdown/calckey-js.api.apiclient.md +++ /dev/null @@ -1,32 +0,0 @@ - - -[Home](./index.md) > [calckey-js](./calckey-js.md) > [api](./calckey-js.api.md) > [APIClient](./calckey-js.api.apiclient.md) - -## api.APIClient class - -**Signature:** - -```typescript -export declare class APIClient -``` - -## Constructors - -| Constructor | Modifiers | Description | -| --- | --- | --- | -| [(constructor)(opts)](./calckey-js.api.apiclient._constructor_.md) | | Constructs a new instance of the APIClient class | - -## Properties - -| Property | Modifiers | Type | Description | -| --- | --- | --- | --- | -| [credential](./calckey-js.api.apiclient.credential.md) | | string \| null \| undefined | | -| [fetch](./calckey-js.api.apiclient.fetch.md) | | [FetchLike](./calckey-js.api.fetchlike.md) | | -| [origin](./calckey-js.api.apiclient.origin.md) | | string | | - -## Methods - -| Method | Modifiers | Description | -| --- | --- | --- | -| [request(endpoint, params, credential)](./calckey-js.api.apiclient.request.md) | | | - diff --git a/fe_calckey/frontend/calckey-js/markdown/calckey-js.api.apiclient.origin.md b/fe_calckey/frontend/calckey-js/markdown/calckey-js.api.apiclient.origin.md deleted file mode 100644 index bd7ed15..0000000 --- a/fe_calckey/frontend/calckey-js/markdown/calckey-js.api.apiclient.origin.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [calckey-js](./calckey-js.md) > [api](./calckey-js.api.md) > [APIClient](./calckey-js.api.apiclient.md) > [origin](./calckey-js.api.apiclient.origin.md) - -## api.APIClient.origin property - -**Signature:** - -```typescript -origin: string; -``` diff --git a/fe_calckey/frontend/calckey-js/markdown/calckey-js.api.apiclient.request.md b/fe_calckey/frontend/calckey-js/markdown/calckey-js.api.apiclient.request.md deleted file mode 100644 index d2696cf..0000000 --- a/fe_calckey/frontend/calckey-js/markdown/calckey-js.api.apiclient.request.md +++ /dev/null @@ -1,57 +0,0 @@ - - -[Home](./index.md) > [calckey-js](./calckey-js.md) > [api](./calckey-js.api.md) > [APIClient](./calckey-js.api.apiclient.md) > [request](./calckey-js.api.apiclient.request.md) - -## api.APIClient.request() method - -**Signature:** - -```typescript -request( - endpoint: E, - params?: P, - credential?: string | null | undefined, - ): Promise< - Endpoints[E]["res"] extends { - $switch: { - $cases: [any, any][]; - $default: any; - }; - } - ? IsCaseMatched extends true - ? GetCaseResult - : IsCaseMatched extends true - ? GetCaseResult - : IsCaseMatched extends true - ? GetCaseResult - : IsCaseMatched extends true - ? GetCaseResult - : IsCaseMatched extends true - ? GetCaseResult - : IsCaseMatched extends true - ? GetCaseResult - : IsCaseMatched extends true - ? GetCaseResult - : IsCaseMatched extends true - ? GetCaseResult - : IsCaseMatched extends true - ? GetCaseResult - : IsCaseMatched extends true - ? GetCaseResult - : Endpoints[E]["res"]["$switch"]["$default"] - : Endpoints[E]["res"] - >; -``` - -## Parameters - -| Parameter | Type | Description | -| --- | --- | --- | -| endpoint | E | | -| params | P | _(Optional)_ | -| credential | string \| null \| undefined | _(Optional)_ | - -**Returns:** - -Promise< [Endpoints](./calckey-js.endpoints.md)\[E\]\["res"\] extends { $switch: { $cases: \[any, any\]\[\]; $default: any; }; } ? IsCaseMatched<E, P, 0> extends true ? GetCaseResult<E, P, 0> : IsCaseMatched<E, P, 1> extends true ? GetCaseResult<E, P, 1> : IsCaseMatched<E, P, 2> extends true ? GetCaseResult<E, P, 2> : IsCaseMatched<E, P, 3> extends true ? GetCaseResult<E, P, 3> : IsCaseMatched<E, P, 4> extends true ? GetCaseResult<E, P, 4> : IsCaseMatched<E, P, 5> extends true ? GetCaseResult<E, P, 5> : IsCaseMatched<E, P, 6> extends true ? GetCaseResult<E, P, 6> : IsCaseMatched<E, P, 7> extends true ? GetCaseResult<E, P, 7> : IsCaseMatched<E, P, 8> extends true ? GetCaseResult<E, P, 8> : IsCaseMatched<E, P, 9> extends true ? GetCaseResult<E, P, 9> : [Endpoints](./calckey-js.endpoints.md)\[E\]\["res"\]\["$switch"\]\["$default"\] : [Endpoints](./calckey-js.endpoints.md)\[E\]\["res"\] > - diff --git a/fe_calckey/frontend/calckey-js/markdown/calckey-js.api.apierror.md b/fe_calckey/frontend/calckey-js/markdown/calckey-js.api.apierror.md deleted file mode 100644 index 9cb31a1..0000000 --- a/fe_calckey/frontend/calckey-js/markdown/calckey-js.api.apierror.md +++ /dev/null @@ -1,17 +0,0 @@ - - -[Home](./index.md) > [calckey-js](./calckey-js.md) > [api](./calckey-js.api.md) > [APIError](./calckey-js.api.apierror.md) - -## api.APIError type - -**Signature:** - -```typescript -export declare type APIError = { - id: string; - code: string; - message: string; - kind: "client" | "server"; - info: Record; -}; -``` diff --git a/fe_calckey/frontend/calckey-js/markdown/calckey-js.api.fetchlike.md b/fe_calckey/frontend/calckey-js/markdown/calckey-js.api.fetchlike.md deleted file mode 100644 index 3838393..0000000 --- a/fe_calckey/frontend/calckey-js/markdown/calckey-js.api.fetchlike.md +++ /dev/null @@ -1,22 +0,0 @@ - - -[Home](./index.md) > [calckey-js](./calckey-js.md) > [api](./calckey-js.api.md) > [FetchLike](./calckey-js.api.fetchlike.md) - -## api.FetchLike type - -**Signature:** - -```typescript -export declare type FetchLike = ( - input: string, - init?: { - method?: string; - body?: string; - credentials?: RequestCredentials; - cache?: RequestCache; - }, -) => Promise<{ - status: number; - json(): Promise; -}>; -``` diff --git a/fe_calckey/frontend/calckey-js/markdown/calckey-js.api.isapierror.md b/fe_calckey/frontend/calckey-js/markdown/calckey-js.api.isapierror.md deleted file mode 100644 index 3e331b5..0000000 --- a/fe_calckey/frontend/calckey-js/markdown/calckey-js.api.isapierror.md +++ /dev/null @@ -1,22 +0,0 @@ - - -[Home](./index.md) > [calckey-js](./calckey-js.md) > [api](./calckey-js.api.md) > [isAPIError](./calckey-js.api.isapierror.md) - -## api.isAPIError() function - -**Signature:** - -```typescript -export declare function isAPIError(reason: any): reason is APIError; -``` - -## Parameters - -| Parameter | Type | Description | -| --- | --- | --- | -| reason | any | | - -**Returns:** - -reason is [APIError](./calckey-js.api.apierror.md) - diff --git a/fe_calckey/frontend/calckey-js/markdown/calckey-js.api.md b/fe_calckey/frontend/calckey-js/markdown/calckey-js.api.md deleted file mode 100644 index a9be8b2..0000000 --- a/fe_calckey/frontend/calckey-js/markdown/calckey-js.api.md +++ /dev/null @@ -1,25 +0,0 @@ - - -[Home](./index.md) > [calckey-js](./calckey-js.md) > [api](./calckey-js.api.md) - -## api namespace - -## Classes - -| Class | Description | -| --- | --- | -| [APIClient](./calckey-js.api.apiclient.md) | | - -## Functions - -| Function | Description | -| --- | --- | -| [isAPIError(reason)](./calckey-js.api.isapierror.md) | | - -## Type Aliases - -| Type Alias | Description | -| --- | --- | -| [APIError](./calckey-js.api.apierror.md) | | -| [FetchLike](./calckey-js.api.fetchlike.md) | | - diff --git a/fe_calckey/frontend/calckey-js/markdown/calckey-js.channelconnection._constructor_.md b/fe_calckey/frontend/calckey-js/markdown/calckey-js.channelconnection._constructor_.md deleted file mode 100644 index 54ab315..0000000 --- a/fe_calckey/frontend/calckey-js/markdown/calckey-js.channelconnection._constructor_.md +++ /dev/null @@ -1,22 +0,0 @@ - - -[Home](./index.md) > [calckey-js](./calckey-js.md) > [ChannelConnection](./calckey-js.channelconnection.md) > [(constructor)](./calckey-js.channelconnection._constructor_.md) - -## ChannelConnection.(constructor) - -Constructs a new instance of the `Connection` class - -**Signature:** - -```typescript -constructor(stream: Stream, channel: string, name?: string); -``` - -## Parameters - -| Parameter | Type | Description | -| --- | --- | --- | -| stream | [Stream](./calckey-js.stream.md) | | -| channel | string | | -| name | string | _(Optional)_ | - diff --git a/fe_calckey/frontend/calckey-js/markdown/calckey-js.channelconnection.channel.md b/fe_calckey/frontend/calckey-js/markdown/calckey-js.channelconnection.channel.md deleted file mode 100644 index 8ef958e..0000000 --- a/fe_calckey/frontend/calckey-js/markdown/calckey-js.channelconnection.channel.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [calckey-js](./calckey-js.md) > [ChannelConnection](./calckey-js.channelconnection.md) > [channel](./calckey-js.channelconnection.channel.md) - -## ChannelConnection.channel property - -**Signature:** - -```typescript -channel: string; -``` diff --git a/fe_calckey/frontend/calckey-js/markdown/calckey-js.channelconnection.dispose.md b/fe_calckey/frontend/calckey-js/markdown/calckey-js.channelconnection.dispose.md deleted file mode 100644 index 3086a8a..0000000 --- a/fe_calckey/frontend/calckey-js/markdown/calckey-js.channelconnection.dispose.md +++ /dev/null @@ -1,15 +0,0 @@ - - -[Home](./index.md) > [calckey-js](./calckey-js.md) > [ChannelConnection](./calckey-js.channelconnection.md) > [dispose](./calckey-js.channelconnection.dispose.md) - -## ChannelConnection.dispose() method - -**Signature:** - -```typescript -abstract dispose(): void; -``` -**Returns:** - -void - diff --git a/fe_calckey/frontend/calckey-js/markdown/calckey-js.channelconnection.id.md b/fe_calckey/frontend/calckey-js/markdown/calckey-js.channelconnection.id.md deleted file mode 100644 index f1a7893..0000000 --- a/fe_calckey/frontend/calckey-js/markdown/calckey-js.channelconnection.id.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [calckey-js](./calckey-js.md) > [ChannelConnection](./calckey-js.channelconnection.md) > [id](./calckey-js.channelconnection.id.md) - -## ChannelConnection.id property - -**Signature:** - -```typescript -abstract id: string; -``` diff --git a/fe_calckey/frontend/calckey-js/markdown/calckey-js.channelconnection.incount.md b/fe_calckey/frontend/calckey-js/markdown/calckey-js.channelconnection.incount.md deleted file mode 100644 index 960c055..0000000 --- a/fe_calckey/frontend/calckey-js/markdown/calckey-js.channelconnection.incount.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [calckey-js](./calckey-js.md) > [ChannelConnection](./calckey-js.channelconnection.md) > [inCount](./calckey-js.channelconnection.incount.md) - -## ChannelConnection.inCount property - -**Signature:** - -```typescript -inCount: number; -``` diff --git a/fe_calckey/frontend/calckey-js/markdown/calckey-js.channelconnection.md b/fe_calckey/frontend/calckey-js/markdown/calckey-js.channelconnection.md deleted file mode 100644 index 7a93e20..0000000 --- a/fe_calckey/frontend/calckey-js/markdown/calckey-js.channelconnection.md +++ /dev/null @@ -1,39 +0,0 @@ - - -[Home](./index.md) > [calckey-js](./calckey-js.md) > [ChannelConnection](./calckey-js.channelconnection.md) - -## ChannelConnection class - -**Signature:** - -```typescript -export declare abstract class Connection< - Channel extends AnyOf = any, -> extends EventEmitter -``` -**Extends:** EventEmitter<Channel\["events"\]> - -## Constructors - -| Constructor | Modifiers | Description | -| --- | --- | --- | -| [(constructor)(stream, channel, name)](./calckey-js.channelconnection._constructor_.md) | | Constructs a new instance of the Connection class | - -## Properties - -| Property | Modifiers | Type | Description | -| --- | --- | --- | --- | -| [channel](./calckey-js.channelconnection.channel.md) | | string | | -| [id](./calckey-js.channelconnection.id.md) | abstract | string | | -| [inCount](./calckey-js.channelconnection.incount.md) | | number | | -| [name?](./calckey-js.channelconnection.name.md) | | string | _(Optional)_ | -| [outCount](./calckey-js.channelconnection.outcount.md) | | number | | -| [stream](./calckey-js.channelconnection.stream.md) | protected | [Stream](./calckey-js.stream.md) | | - -## Methods - -| Method | Modifiers | Description | -| --- | --- | --- | -| [dispose()](./calckey-js.channelconnection.dispose.md) | abstract | | -| [send(type, body)](./calckey-js.channelconnection.send.md) | | | - diff --git a/fe_calckey/frontend/calckey-js/markdown/calckey-js.channelconnection.name.md b/fe_calckey/frontend/calckey-js/markdown/calckey-js.channelconnection.name.md deleted file mode 100644 index 088d96e..0000000 --- a/fe_calckey/frontend/calckey-js/markdown/calckey-js.channelconnection.name.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [calckey-js](./calckey-js.md) > [ChannelConnection](./calckey-js.channelconnection.md) > [name](./calckey-js.channelconnection.name.md) - -## ChannelConnection.name property - -**Signature:** - -```typescript -name?: string; -``` diff --git a/fe_calckey/frontend/calckey-js/markdown/calckey-js.channelconnection.outcount.md b/fe_calckey/frontend/calckey-js/markdown/calckey-js.channelconnection.outcount.md deleted file mode 100644 index b85435c..0000000 --- a/fe_calckey/frontend/calckey-js/markdown/calckey-js.channelconnection.outcount.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [calckey-js](./calckey-js.md) > [ChannelConnection](./calckey-js.channelconnection.md) > [outCount](./calckey-js.channelconnection.outcount.md) - -## ChannelConnection.outCount property - -**Signature:** - -```typescript -outCount: number; -``` diff --git a/fe_calckey/frontend/calckey-js/markdown/calckey-js.channelconnection.send.md b/fe_calckey/frontend/calckey-js/markdown/calckey-js.channelconnection.send.md deleted file mode 100644 index 4f80473..0000000 --- a/fe_calckey/frontend/calckey-js/markdown/calckey-js.channelconnection.send.md +++ /dev/null @@ -1,26 +0,0 @@ - - -[Home](./index.md) > [calckey-js](./calckey-js.md) > [ChannelConnection](./calckey-js.channelconnection.md) > [send](./calckey-js.channelconnection.send.md) - -## ChannelConnection.send() method - -**Signature:** - -```typescript -send( - type: T, - body: Channel["receives"][T], - ): void; -``` - -## Parameters - -| Parameter | Type | Description | -| --- | --- | --- | -| type | T | | -| body | Channel\["receives"\]\[T\] | | - -**Returns:** - -void - diff --git a/fe_calckey/frontend/calckey-js/markdown/calckey-js.channelconnection.stream.md b/fe_calckey/frontend/calckey-js/markdown/calckey-js.channelconnection.stream.md deleted file mode 100644 index d363c76..0000000 --- a/fe_calckey/frontend/calckey-js/markdown/calckey-js.channelconnection.stream.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [calckey-js](./calckey-js.md) > [ChannelConnection](./calckey-js.channelconnection.md) > [stream](./calckey-js.channelconnection.stream.md) - -## ChannelConnection.stream property - -**Signature:** - -```typescript -protected stream: Stream; -``` diff --git a/fe_calckey/frontend/calckey-js/markdown/calckey-js.channels.md b/fe_calckey/frontend/calckey-js/markdown/calckey-js.channels.md deleted file mode 100644 index 963c431..0000000 --- a/fe_calckey/frontend/calckey-js/markdown/calckey-js.channels.md +++ /dev/null @@ -1,143 +0,0 @@ - - -[Home](./index.md) > [calckey-js](./calckey-js.md) > [Channels](./calckey-js.channels.md) - -## Channels type - -**Signature:** - -```typescript -export declare type Channels = { - main: { - params: null; - events: { - notification: (payload: Notification) => void; - mention: (payload: Note) => void; - reply: (payload: Note) => void; - renote: (payload: Note) => void; - follow: (payload: User) => void; - followed: (payload: User) => void; - unfollow: (payload: User) => void; - meUpdated: (payload: MeDetailed) => void; - pageEvent: (payload: PageEvent) => void; - urlUploadFinished: (payload: { - marker: string; - file: DriveFile; - }) => void; - readAllNotifications: () => void; - unreadNotification: (payload: Notification) => void; - unreadMention: (payload: Note["id"]) => void; - readAllUnreadMentions: () => void; - unreadSpecifiedNote: (payload: Note["id"]) => void; - readAllUnreadSpecifiedNotes: () => void; - readAllMessagingMessages: () => void; - messagingMessage: (payload: MessagingMessage) => void; - unreadMessagingMessage: (payload: MessagingMessage) => void; - readAllAntennas: () => void; - unreadAntenna: (payload: Antenna) => void; - readAllAnnouncements: () => void; - readAllChannels: () => void; - unreadChannel: (payload: Note["id"]) => void; - myTokenRegenerated: () => void; - reversiNoInvites: () => void; - reversiInvited: (payload: FIXME) => void; - signin: (payload: FIXME) => void; - registryUpdated: (payload: { - scope?: string[]; - key: string; - value: any | null; - }) => void; - driveFileCreated: (payload: DriveFile) => void; - readAntenna: (payload: Antenna) => void; - }; - receives: null; - }; - homeTimeline: { - params: null; - events: { - note: (payload: Note) => void; - }; - receives: null; - }; - localTimeline: { - params: null; - events: { - note: (payload: Note) => void; - }; - receives: null; - }; - hybridTimeline: { - params: null; - events: { - note: (payload: Note) => void; - }; - receives: null; - }; - recommendedTimeline: { - params: null; - events: { - note: (payload: Note) => void; - }; - receives: null; - }; - globalTimeline: { - params: null; - events: { - note: (payload: Note) => void; - }; - receives: null; - }; - antenna: { - params: { - antennaId: Antenna["id"]; - }; - events: { - note: (payload: Note) => void; - }; - receives: null; - }; - messaging: { - params: { - otherparty?: User["id"] | null; - group?: UserGroup["id"] | null; - }; - events: { - message: (payload: MessagingMessage) => void; - deleted: (payload: MessagingMessage["id"]) => void; - read: (payload: MessagingMessage["id"][]) => void; - typers: (payload: User[]) => void; - }; - receives: { - read: { - id: MessagingMessage["id"]; - }; - }; - }; - serverStats: { - params: null; - events: { - stats: (payload: FIXME) => void; - }; - receives: { - requestLog: { - id: string | number; - length: number; - }; - }; - }; - queueStats: { - params: null; - events: { - stats: (payload: FIXME) => void; - }; - receives: { - requestLog: { - id: string | number; - length: number; - }; - }; - }; -}; -``` -**References:** [Note](./calckey-js.entities.note.md), [User](./calckey-js.entities.user.md), [MeDetailed](./calckey-js.entities.medetailed.md), [PageEvent](./calckey-js.entities.pageevent.md), [DriveFile](./calckey-js.entities.drivefile.md), [MessagingMessage](./calckey-js.entities.messagingmessage.md), [Antenna](./calckey-js.entities.antenna.md), [UserGroup](./calckey-js.entities.usergroup.md) - diff --git a/fe_calckey/frontend/calckey-js/markdown/calckey-js.endpoints.md b/fe_calckey/frontend/calckey-js/markdown/calckey-js.endpoints.md deleted file mode 100644 index 7d342ef..0000000 --- a/fe_calckey/frontend/calckey-js/markdown/calckey-js.endpoints.md +++ /dev/null @@ -1,1907 +0,0 @@ - - -[Home](./index.md) > [calckey-js](./calckey-js.md) > [Endpoints](./calckey-js.endpoints.md) - -## Endpoints type - -**Signature:** - -```typescript -export declare type Endpoints = { - "admin/abuse-user-reports": { - req: TODO; - res: TODO; - }; - "admin/delete-all-files-of-a-user": { - req: { - userId: User["id"]; - }; - res: null; - }; - "admin/delete-logs": { - req: NoParams; - res: null; - }; - "admin/get-index-stats": { - req: TODO; - res: TODO; - }; - "admin/get-table-stats": { - req: TODO; - res: TODO; - }; - "admin/invite": { - req: TODO; - res: TODO; - }; - "admin/logs": { - req: TODO; - res: TODO; - }; - "admin/meta": { - req: TODO; - res: TODO; - }; - "admin/reset-password": { - req: TODO; - res: TODO; - }; - "admin/resolve-abuse-user-report": { - req: TODO; - res: TODO; - }; - "admin/resync-chart": { - req: TODO; - res: TODO; - }; - "admin/send-email": { - req: TODO; - res: TODO; - }; - "admin/server-info": { - req: TODO; - res: TODO; - }; - "admin/show-moderation-logs": { - req: TODO; - res: TODO; - }; - "admin/show-user": { - req: TODO; - res: TODO; - }; - "admin/show-users": { - req: TODO; - res: TODO; - }; - "admin/silence-user": { - req: TODO; - res: TODO; - }; - "admin/suspend-user": { - req: TODO; - res: TODO; - }; - "admin/unsilence-user": { - req: TODO; - res: TODO; - }; - "admin/unsuspend-user": { - req: TODO; - res: TODO; - }; - "admin/update-meta": { - req: TODO; - res: TODO; - }; - "admin/vacuum": { - req: TODO; - res: TODO; - }; - "admin/accounts/create": { - req: TODO; - res: TODO; - }; - "admin/ad/create": { - req: TODO; - res: TODO; - }; - "admin/ad/delete": { - req: { - id: Ad["id"]; - }; - res: null; - }; - "admin/ad/list": { - req: TODO; - res: TODO; - }; - "admin/ad/update": { - req: TODO; - res: TODO; - }; - "admin/announcements/create": { - req: TODO; - res: TODO; - }; - "admin/announcements/delete": { - req: { - id: Announcement["id"]; - }; - res: null; - }; - "admin/announcements/list": { - req: TODO; - res: TODO; - }; - "admin/announcements/update": { - req: TODO; - res: TODO; - }; - "admin/drive/clean-remote-files": { - req: TODO; - res: TODO; - }; - "admin/drive/cleanup": { - req: TODO; - res: TODO; - }; - "admin/drive/files": { - req: TODO; - res: TODO; - }; - "admin/drive/show-file": { - req: TODO; - res: TODO; - }; - "admin/emoji/add": { - req: TODO; - res: TODO; - }; - "admin/emoji/copy": { - req: TODO; - res: TODO; - }; - "admin/emoji/list-remote": { - req: TODO; - res: TODO; - }; - "admin/emoji/list": { - req: TODO; - res: TODO; - }; - "admin/emoji/remove": { - req: TODO; - res: TODO; - }; - "admin/emoji/update": { - req: TODO; - res: TODO; - }; - "admin/federation/delete-all-files": { - req: { - host: string; - }; - res: null; - }; - "admin/federation/refresh-remote-instance-metadata": { - req: TODO; - res: TODO; - }; - "admin/federation/remove-all-following": { - req: TODO; - res: TODO; - }; - "admin/federation/update-instance": { - req: TODO; - res: TODO; - }; - "admin/moderators/add": { - req: TODO; - res: TODO; - }; - "admin/moderators/remove": { - req: TODO; - res: TODO; - }; - "admin/promo/create": { - req: TODO; - res: TODO; - }; - "admin/queue/clear": { - req: TODO; - res: TODO; - }; - "admin/queue/deliver-delayed": { - req: TODO; - res: TODO; - }; - "admin/queue/inbox-delayed": { - req: TODO; - res: TODO; - }; - "admin/queue/jobs": { - req: TODO; - res: TODO; - }; - "admin/queue/stats": { - req: TODO; - res: TODO; - }; - "admin/relays/add": { - req: TODO; - res: TODO; - }; - "admin/relays/list": { - req: TODO; - res: TODO; - }; - "admin/relays/remove": { - req: TODO; - res: TODO; - }; - announcements: { - req: { - limit?: number; - withUnreads?: boolean; - sinceId?: Announcement["id"]; - untilId?: Announcement["id"]; - }; - res: Announcement[]; - }; - "antennas/create": { - req: TODO; - res: Antenna; - }; - "antennas/delete": { - req: { - antennaId: Antenna["id"]; - }; - res: null; - }; - "antennas/list": { - req: NoParams; - res: Antenna[]; - }; - "antennas/notes": { - req: { - antennaId: Antenna["id"]; - limit?: number; - sinceId?: Note["id"]; - untilId?: Note["id"]; - }; - res: Note[]; - }; - "antennas/show": { - req: { - antennaId: Antenna["id"]; - }; - res: Antenna; - }; - "antennas/update": { - req: TODO; - res: Antenna; - }; - "antennas/mark-read": { - req: TODO; - res: Antenna; - }; - "ap/get": { - req: { - uri: string; - }; - res: Record; - }; - "ap/show": { - req: { - uri: string; - }; - res: - | { - type: "Note"; - object: Note; - } - | { - type: "User"; - object: UserDetailed; - }; - }; - "app/create": { - req: TODO; - res: App; - }; - "app/show": { - req: { - appId: App["id"]; - }; - res: App; - }; - "auth/accept": { - req: { - token: string; - }; - res: null; - }; - "auth/session/generate": { - req: { - appSecret: string; - }; - res: { - token: string; - url: string; - }; - }; - "auth/session/show": { - req: { - token: string; - }; - res: AuthSession; - }; - "auth/session/userkey": { - req: { - appSecret: string; - token: string; - }; - res: { - accessToken: string; - user: User; - }; - }; - "blocking/create": { - req: { - userId: User["id"]; - }; - res: UserDetailed; - }; - "blocking/delete": { - req: { - userId: User["id"]; - }; - res: UserDetailed; - }; - "blocking/list": { - req: { - limit?: number; - sinceId?: Blocking["id"]; - untilId?: Blocking["id"]; - }; - res: Blocking[]; - }; - "channels/create": { - req: TODO; - res: TODO; - }; - "channels/featured": { - req: TODO; - res: TODO; - }; - "channels/follow": { - req: TODO; - res: TODO; - }; - "channels/followed": { - req: TODO; - res: TODO; - }; - "channels/owned": { - req: TODO; - res: TODO; - }; - "channels/pin-note": { - req: TODO; - res: TODO; - }; - "channels/show": { - req: TODO; - res: TODO; - }; - "channels/timeline": { - req: TODO; - res: TODO; - }; - "channels/unfollow": { - req: TODO; - res: TODO; - }; - "channels/update": { - req: TODO; - res: TODO; - }; - "charts/active-users": { - req: { - span: "day" | "hour"; - limit?: number; - offset?: number | null; - }; - res: { - local: { - users: number[]; - }; - remote: { - users: number[]; - }; - }; - }; - "charts/drive": { - req: { - span: "day" | "hour"; - limit?: number; - offset?: number | null; - }; - res: { - local: { - decCount: number[]; - decSize: number[]; - incCount: number[]; - incSize: number[]; - totalCount: number[]; - totalSize: number[]; - }; - remote: { - decCount: number[]; - decSize: number[]; - incCount: number[]; - incSize: number[]; - totalCount: number[]; - totalSize: number[]; - }; - }; - }; - "charts/federation": { - req: { - span: "day" | "hour"; - limit?: number; - offset?: number | null; - }; - res: { - instance: { - dec: number[]; - inc: number[]; - total: number[]; - }; - }; - }; - "charts/hashtag": { - req: { - span: "day" | "hour"; - limit?: number; - offset?: number | null; - }; - res: TODO; - }; - "charts/instance": { - req: { - span: "day" | "hour"; - limit?: number; - offset?: number | null; - host: string; - }; - res: { - drive: { - decFiles: number[]; - decUsage: number[]; - incFiles: number[]; - incUsage: number[]; - totalFiles: number[]; - totalUsage: number[]; - }; - followers: { - dec: number[]; - inc: number[]; - total: number[]; - }; - following: { - dec: number[]; - inc: number[]; - total: number[]; - }; - notes: { - dec: number[]; - inc: number[]; - total: number[]; - diffs: { - normal: number[]; - renote: number[]; - reply: number[]; - }; - }; - requests: { - failed: number[]; - received: number[]; - succeeded: number[]; - }; - users: { - dec: number[]; - inc: number[]; - total: number[]; - }; - }; - }; - "charts/network": { - req: { - span: "day" | "hour"; - limit?: number; - offset?: number | null; - }; - res: TODO; - }; - "charts/notes": { - req: { - span: "day" | "hour"; - limit?: number; - offset?: number | null; - }; - res: { - local: { - dec: number[]; - inc: number[]; - total: number[]; - diffs: { - normal: number[]; - renote: number[]; - reply: number[]; - }; - }; - remote: { - dec: number[]; - inc: number[]; - total: number[]; - diffs: { - normal: number[]; - renote: number[]; - reply: number[]; - }; - }; - }; - }; - "charts/user/drive": { - req: { - span: "day" | "hour"; - limit?: number; - offset?: number | null; - userId: User["id"]; - }; - res: { - decCount: number[]; - decSize: number[]; - incCount: number[]; - incSize: number[]; - totalCount: number[]; - totalSize: number[]; - }; - }; - "charts/user/following": { - req: { - span: "day" | "hour"; - limit?: number; - offset?: number | null; - userId: User["id"]; - }; - res: TODO; - }; - "charts/user/notes": { - req: { - span: "day" | "hour"; - limit?: number; - offset?: number | null; - userId: User["id"]; - }; - res: { - dec: number[]; - inc: number[]; - total: number[]; - diffs: { - normal: number[]; - renote: number[]; - reply: number[]; - }; - }; - }; - "charts/user/reactions": { - req: { - span: "day" | "hour"; - limit?: number; - offset?: number | null; - userId: User["id"]; - }; - res: TODO; - }; - "charts/users": { - req: { - span: "day" | "hour"; - limit?: number; - offset?: number | null; - }; - res: { - local: { - dec: number[]; - inc: number[]; - total: number[]; - }; - remote: { - dec: number[]; - inc: number[]; - total: number[]; - }; - }; - }; - "clips/add-note": { - req: TODO; - res: TODO; - }; - "clips/create": { - req: TODO; - res: TODO; - }; - "clips/delete": { - req: { - clipId: Clip["id"]; - }; - res: null; - }; - "clips/list": { - req: TODO; - res: TODO; - }; - "clips/notes": { - req: TODO; - res: TODO; - }; - "clips/show": { - req: TODO; - res: TODO; - }; - "clips/update": { - req: TODO; - res: TODO; - }; - drive: { - req: NoParams; - res: { - capacity: number; - usage: number; - }; - }; - "drive/files": { - req: { - folderId?: DriveFolder["id"] | null; - type?: DriveFile["type"] | null; - limit?: number; - sinceId?: DriveFile["id"]; - untilId?: DriveFile["id"]; - }; - res: DriveFile[]; - }; - "drive/files/attached-notes": { - req: TODO; - res: TODO; - }; - "drive/files/check-existence": { - req: TODO; - res: TODO; - }; - "drive/files/create": { - req: TODO; - res: TODO; - }; - "drive/files/delete": { - req: { - fileId: DriveFile["id"]; - }; - res: null; - }; - "drive/files/find-by-hash": { - req: TODO; - res: TODO; - }; - "drive/files/find": { - req: { - name: string; - folderId?: DriveFolder["id"] | null; - }; - res: DriveFile[]; - }; - "drive/files/show": { - req: { - fileId?: DriveFile["id"]; - url?: string; - }; - res: DriveFile; - }; - "drive/files/update": { - req: { - fileId: DriveFile["id"]; - folderId?: DriveFolder["id"] | null; - name?: string; - isSensitive?: boolean; - comment?: string | null; - }; - res: DriveFile; - }; - "drive/files/upload-from-url": { - req: { - url: string; - folderId?: DriveFolder["id"] | null; - isSensitive?: boolean; - comment?: string | null; - marker?: string | null; - force?: boolean; - }; - res: null; - }; - "drive/folders": { - req: { - folderId?: DriveFolder["id"] | null; - limit?: number; - sinceId?: DriveFile["id"]; - untilId?: DriveFile["id"]; - }; - res: DriveFolder[]; - }; - "drive/folders/create": { - req: { - name?: string; - parentId?: DriveFolder["id"] | null; - }; - res: DriveFolder; - }; - "drive/folders/delete": { - req: { - folderId: DriveFolder["id"]; - }; - res: null; - }; - "drive/folders/find": { - req: { - name: string; - parentId?: DriveFolder["id"] | null; - }; - res: DriveFolder[]; - }; - "drive/folders/show": { - req: { - folderId: DriveFolder["id"]; - }; - res: DriveFolder; - }; - "drive/folders/update": { - req: { - folderId: DriveFolder["id"]; - name?: string; - parentId?: DriveFolder["id"] | null; - }; - res: DriveFolder; - }; - "drive/stream": { - req: { - type?: DriveFile["type"] | null; - limit?: number; - sinceId?: DriveFile["id"]; - untilId?: DriveFile["id"]; - }; - res: DriveFile[]; - }; - endpoint: { - req: { - endpoint: string; - }; - res: { - params: { - name: string; - type: string; - }[]; - }; - }; - endpoints: { - req: NoParams; - res: string[]; - }; - "federation/dns": { - req: { - host: string; - }; - res: { - a: string[]; - aaaa: string[]; - cname: string[]; - txt: string[]; - }; - }; - "federation/followers": { - req: { - host: string; - limit?: number; - sinceId?: Following["id"]; - untilId?: Following["id"]; - }; - res: FollowingFolloweePopulated[]; - }; - "federation/following": { - req: { - host: string; - limit?: number; - sinceId?: Following["id"]; - untilId?: Following["id"]; - }; - res: FollowingFolloweePopulated[]; - }; - "federation/instances": { - req: { - host?: string | null; - blocked?: boolean | null; - notResponding?: boolean | null; - suspended?: boolean | null; - federating?: boolean | null; - subscribing?: boolean | null; - publishing?: boolean | null; - limit?: number; - offset?: number; - sort?: - | "+pubSub" - | "-pubSub" - | "+notes" - | "-notes" - | "+users" - | "-users" - | "+following" - | "-following" - | "+followers" - | "-followers" - | "+caughtAt" - | "-caughtAt" - | "+lastCommunicatedAt" - | "-lastCommunicatedAt" - | "+driveUsage" - | "-driveUsage" - | "+driveFiles" - | "-driveFiles"; - }; - res: Instance[]; - }; - "federation/show-instance": { - req: { - host: string; - }; - res: Instance; - }; - "federation/update-remote-user": { - req: { - userId: User["id"]; - }; - res: null; - }; - "federation/users": { - req: { - host: string; - limit?: number; - sinceId?: User["id"]; - untilId?: User["id"]; - }; - res: UserDetailed[]; - }; - "following/create": { - req: { - userId: User["id"]; - }; - res: User; - }; - "following/delete": { - req: { - userId: User["id"]; - }; - res: User; - }; - "following/requests/accept": { - req: { - userId: User["id"]; - }; - res: null; - }; - "following/requests/cancel": { - req: { - userId: User["id"]; - }; - res: User; - }; - "following/requests/list": { - req: NoParams; - res: FollowRequest[]; - }; - "following/requests/reject": { - req: { - userId: User["id"]; - }; - res: null; - }; - "gallery/featured": { - req: TODO; - res: TODO; - }; - "gallery/popular": { - req: TODO; - res: TODO; - }; - "gallery/posts": { - req: TODO; - res: TODO; - }; - "gallery/posts/create": { - req: TODO; - res: TODO; - }; - "gallery/posts/delete": { - req: { - postId: GalleryPost["id"]; - }; - res: null; - }; - "gallery/posts/like": { - req: TODO; - res: TODO; - }; - "gallery/posts/show": { - req: TODO; - res: TODO; - }; - "gallery/posts/unlike": { - req: TODO; - res: TODO; - }; - "gallery/posts/update": { - req: TODO; - res: TODO; - }; - "games/reversi/games": { - req: TODO; - res: TODO; - }; - "games/reversi/games/show": { - req: TODO; - res: TODO; - }; - "games/reversi/games/surrender": { - req: TODO; - res: TODO; - }; - "games/reversi/invitations": { - req: TODO; - res: TODO; - }; - "games/reversi/match": { - req: TODO; - res: TODO; - }; - "games/reversi/match/cancel": { - req: TODO; - res: TODO; - }; - "get-online-users-count": { - req: NoParams; - res: { - count: number; - }; - }; - "hashtags/list": { - req: TODO; - res: TODO; - }; - "hashtags/search": { - req: TODO; - res: TODO; - }; - "hashtags/show": { - req: TODO; - res: TODO; - }; - "hashtags/trend": { - req: TODO; - res: TODO; - }; - "hashtags/users": { - req: TODO; - res: TODO; - }; - i: { - req: NoParams; - res: User; - }; - "i/apps": { - req: TODO; - res: TODO; - }; - "i/authorized-apps": { - req: TODO; - res: TODO; - }; - "i/change-password": { - req: TODO; - res: TODO; - }; - "i/delete-account": { - req: { - password: string; - }; - res: null; - }; - "i/export-blocking": { - req: TODO; - res: TODO; - }; - "i/export-following": { - req: TODO; - res: TODO; - }; - "i/export-mute": { - req: TODO; - res: TODO; - }; - "i/export-notes": { - req: TODO; - res: TODO; - }; - "i/export-user-lists": { - req: TODO; - res: TODO; - }; - "i/favorites": { - req: { - limit?: number; - sinceId?: NoteFavorite["id"]; - untilId?: NoteFavorite["id"]; - }; - res: NoteFavorite[]; - }; - "i/gallery/likes": { - req: TODO; - res: TODO; - }; - "i/gallery/posts": { - req: TODO; - res: TODO; - }; - "i/get-word-muted-notes-count": { - req: TODO; - res: TODO; - }; - "i/import-following": { - req: TODO; - res: TODO; - }; - "i/import-user-lists": { - req: TODO; - res: TODO; - }; - "i/move": { - req: TODO; - res: TODO; - }; - "i/known-as": { - req: TODO; - res: TODO; - }; - "i/notifications": { - req: { - limit?: number; - sinceId?: Notification["id"]; - untilId?: Notification["id"]; - following?: boolean; - markAsRead?: boolean; - includeTypes?: Notification["type"][]; - excludeTypes?: Notification["type"][]; - }; - res: Notification[]; - }; - "i/page-likes": { - req: TODO; - res: TODO; - }; - "i/pages": { - req: TODO; - res: TODO; - }; - "i/pin": { - req: { - noteId: Note["id"]; - }; - res: MeDetailed; - }; - "i/read-all-messaging-messages": { - req: TODO; - res: TODO; - }; - "i/read-all-unread-notes": { - req: TODO; - res: TODO; - }; - "i/read-announcement": { - req: TODO; - res: TODO; - }; - "i/regenerate-token": { - req: { - password: string; - }; - res: null; - }; - "i/registry/get-all": { - req: { - scope?: string[]; - }; - res: Record; - }; - "i/registry/get-detail": { - req: { - key: string; - scope?: string[]; - }; - res: { - updatedAt: DateString; - value: any; - }; - }; - "i/registry/get": { - req: { - key: string; - scope?: string[]; - }; - res: any; - }; - "i/registry/keys-with-type": { - req: { - scope?: string[]; - }; - res: Record< - string, - "null" | "array" | "number" | "string" | "boolean" | "object" - >; - }; - "i/registry/keys": { - req: { - scope?: string[]; - }; - res: string[]; - }; - "i/registry/remove": { - req: { - key: string; - scope?: string[]; - }; - res: null; - }; - "i/registry/scopes": { - req: NoParams; - res: string[][]; - }; - "i/registry/set": { - req: { - key: string; - value: any; - scope?: string[]; - }; - res: null; - }; - "i/revoke-token": { - req: TODO; - res: TODO; - }; - "i/signin-history": { - req: { - limit?: number; - sinceId?: Signin["id"]; - untilId?: Signin["id"]; - }; - res: Signin[]; - }; - "i/unpin": { - req: { - noteId: Note["id"]; - }; - res: MeDetailed; - }; - "i/update-email": { - req: { - password: string; - email?: string | null; - }; - res: MeDetailed; - }; - "i/update": { - req: { - name?: string | null; - description?: string | null; - lang?: string | null; - location?: string | null; - birthday?: string | null; - avatarId?: DriveFile["id"] | null; - bannerId?: DriveFile["id"] | null; - fields?: { - name: string; - value: string; - }[]; - isLocked?: boolean; - isExplorable?: boolean; - hideOnlineStatus?: boolean; - carefulBot?: boolean; - autoAcceptFollowed?: boolean; - noCrawle?: boolean; - preventAiLearning?: boolean; - isBot?: boolean; - isCat?: boolean; - injectFeaturedNote?: boolean; - receiveAnnouncementEmail?: boolean; - alwaysMarkNsfw?: boolean; - mutedWords?: string[][]; - mutingNotificationTypes?: Notification["type"][]; - emailNotificationTypes?: string[]; - }; - res: MeDetailed; - }; - "i/user-group-invites": { - req: TODO; - res: TODO; - }; - "i/2fa/done": { - req: TODO; - res: TODO; - }; - "i/2fa/key-done": { - req: TODO; - res: TODO; - }; - "i/2fa/password-less": { - req: TODO; - res: TODO; - }; - "i/2fa/register-key": { - req: TODO; - res: TODO; - }; - "i/2fa/register": { - req: TODO; - res: TODO; - }; - "i/2fa/update-key": { - req: TODO; - res: TODO; - }; - "i/2fa/remove-key": { - req: TODO; - res: TODO; - }; - "i/2fa/unregister": { - req: TODO; - res: TODO; - }; - "messaging/history": { - req: { - limit?: number; - group?: boolean; - }; - res: MessagingMessage[]; - }; - "messaging/messages": { - req: { - userId?: User["id"]; - groupId?: UserGroup["id"]; - limit?: number; - sinceId?: MessagingMessage["id"]; - untilId?: MessagingMessage["id"]; - markAsRead?: boolean; - }; - res: MessagingMessage[]; - }; - "messaging/messages/create": { - req: { - userId?: User["id"]; - groupId?: UserGroup["id"]; - text?: string; - fileId?: DriveFile["id"]; - }; - res: MessagingMessage; - }; - "messaging/messages/delete": { - req: { - messageId: MessagingMessage["id"]; - }; - res: null; - }; - "messaging/messages/read": { - req: { - messageId: MessagingMessage["id"]; - }; - res: null; - }; - meta: { - req: { - detail?: boolean; - }; - res: { - $switch: { - $cases: [ - [ - { - detail: true; - }, - DetailedInstanceMetadata, - ], - [ - { - detail: false; - }, - LiteInstanceMetadata, - ], - [ - { - detail: boolean; - }, - LiteInstanceMetadata | DetailedInstanceMetadata, - ], - ]; - $default: LiteInstanceMetadata; - }; - }; - }; - "miauth/gen-token": { - req: TODO; - res: TODO; - }; - "mute/create": { - req: TODO; - res: TODO; - }; - "mute/delete": { - req: { - userId: User["id"]; - }; - res: null; - }; - "mute/list": { - req: TODO; - res: TODO; - }; - "renote-mute/create": { - req: TODO; - res: TODO; - }; - "renote-mute/delete": { - req: { - userId: User["id"]; - }; - res: null; - }; - "renote-mute/list": { - req: TODO; - res: TODO; - }; - "my/apps": { - req: TODO; - res: TODO; - }; - notes: { - req: { - limit?: number; - sinceId?: Note["id"]; - untilId?: Note["id"]; - }; - res: Note[]; - }; - "notes/children": { - req: { - noteId: Note["id"]; - limit?: number; - sinceId?: Note["id"]; - untilId?: Note["id"]; - }; - res: Note[]; - }; - "notes/clips": { - req: TODO; - res: TODO; - }; - "notes/conversation": { - req: TODO; - res: TODO; - }; - "notes/create": { - req: NoteSubmitReq; - res: { - createdNote: Note; - }; - }; - "notes/delete": { - req: { - noteId: Note["id"]; - }; - res: null; - }; - "notes/edit": { - req: NoteSubmitReq; - res: { - createdNote: Note; - }; - }; - "notes/favorites/create": { - req: { - noteId: Note["id"]; - }; - res: null; - }; - "notes/favorites/delete": { - req: { - noteId: Note["id"]; - }; - res: null; - }; - "notes/featured": { - req: TODO; - res: Note[]; - }; - "notes/global-timeline": { - req: { - limit?: number; - sinceId?: Note["id"]; - untilId?: Note["id"]; - sinceDate?: number; - untilDate?: number; - }; - res: Note[]; - }; - "notes/recommended-timeline": { - req: { - limit?: number; - sinceId?: Note["id"]; - untilId?: Note["id"]; - sinceDate?: number; - untilDate?: number; - }; - res: Note[]; - }; - "notes/hybrid-timeline": { - req: { - limit?: number; - sinceId?: Note["id"]; - untilId?: Note["id"]; - sinceDate?: number; - untilDate?: number; - }; - res: Note[]; - }; - "notes/local-timeline": { - req: { - limit?: number; - sinceId?: Note["id"]; - untilId?: Note["id"]; - sinceDate?: number; - untilDate?: number; - }; - res: Note[]; - }; - "notes/mentions": { - req: { - following?: boolean; - limit?: number; - sinceId?: Note["id"]; - untilId?: Note["id"]; - }; - res: Note[]; - }; - "notes/polls/recommendation": { - req: TODO; - res: TODO; - }; - "notes/polls/vote": { - req: { - noteId: Note["id"]; - choice: number; - }; - res: null; - }; - "notes/reactions": { - req: { - noteId: Note["id"]; - type?: string | null; - limit?: number; - }; - res: NoteReaction[]; - }; - "notes/reactions/create": { - req: { - noteId: Note["id"]; - reaction: string; - }; - res: null; - }; - "notes/reactions/delete": { - req: { - noteId: Note["id"]; - }; - res: null; - }; - "notes/renotes": { - req: { - limit?: number; - sinceId?: Note["id"]; - untilId?: Note["id"]; - noteId: Note["id"]; - }; - res: Note[]; - }; - "notes/replies": { - req: { - limit?: number; - sinceId?: Note["id"]; - untilId?: Note["id"]; - noteId: Note["id"]; - }; - res: Note[]; - }; - "notes/search-by-tag": { - req: TODO; - res: TODO; - }; - "notes/search": { - req: TODO; - res: TODO; - }; - "notes/show": { - req: { - noteId: Note["id"]; - }; - res: Note; - }; - "notes/state": { - req: TODO; - res: TODO; - }; - "notes/timeline": { - req: { - limit?: number; - sinceId?: Note["id"]; - untilId?: Note["id"]; - sinceDate?: number; - untilDate?: number; - }; - res: Note[]; - }; - "notes/unrenote": { - req: { - noteId: Note["id"]; - }; - res: null; - }; - "notes/user-list-timeline": { - req: { - listId: UserList["id"]; - limit?: number; - sinceId?: Note["id"]; - untilId?: Note["id"]; - sinceDate?: number; - untilDate?: number; - }; - res: Note[]; - }; - "notes/watching/create": { - req: TODO; - res: TODO; - }; - "notes/watching/delete": { - req: { - noteId: Note["id"]; - }; - res: null; - }; - "notifications/create": { - req: { - body: string; - header?: string | null; - icon?: string | null; - }; - res: null; - }; - "notifications/mark-all-as-read": { - req: NoParams; - res: null; - }; - "notifications/read": { - req: { - notificationId: Notification["id"]; - }; - res: null; - }; - "page-push": { - req: { - pageId: Page["id"]; - event: string; - var?: any; - }; - res: null; - }; - "pages/create": { - req: TODO; - res: Page; - }; - "pages/delete": { - req: { - pageId: Page["id"]; - }; - res: null; - }; - "pages/featured": { - req: NoParams; - res: Page[]; - }; - "pages/like": { - req: { - pageId: Page["id"]; - }; - res: null; - }; - "pages/show": { - req: { - pageId?: Page["id"]; - name?: string; - username?: string; - }; - res: Page; - }; - "pages/unlike": { - req: { - pageId: Page["id"]; - }; - res: null; - }; - "pages/update": { - req: TODO; - res: null; - }; - ping: { - req: NoParams; - res: { - pong: number; - }; - }; - "pinned-users": { - req: TODO; - res: TODO; - }; - "promo/read": { - req: TODO; - res: TODO; - }; - "request-reset-password": { - req: { - username: string; - email: string; - }; - res: null; - }; - "reset-password": { - req: { - token: string; - password: string; - }; - res: null; - }; - "room/show": { - req: TODO; - res: TODO; - }; - "room/update": { - req: TODO; - res: TODO; - }; - stats: { - req: NoParams; - res: Stats; - }; - "server-info": { - req: NoParams; - res: ServerInfo; - }; - "sw/register": { - req: TODO; - res: TODO; - }; - "username/available": { - req: { - username: string; - }; - res: { - available: boolean; - }; - }; - users: { - req: { - limit?: number; - offset?: number; - sort?: UserSorting; - origin?: OriginType; - }; - res: User[]; - }; - "users/clips": { - req: TODO; - res: TODO; - }; - "users/followers": { - req: { - userId?: User["id"]; - username?: User["username"]; - host?: User["host"] | null; - limit?: number; - sinceId?: Following["id"]; - untilId?: Following["id"]; - }; - res: FollowingFollowerPopulated[]; - }; - "users/following": { - req: { - userId?: User["id"]; - username?: User["username"]; - host?: User["host"] | null; - limit?: number; - sinceId?: Following["id"]; - untilId?: Following["id"]; - }; - res: FollowingFolloweePopulated[]; - }; - "users/gallery/posts": { - req: TODO; - res: TODO; - }; - "users/get-frequently-replied-users": { - req: TODO; - res: TODO; - }; - "users/groups/create": { - req: TODO; - res: TODO; - }; - "users/groups/delete": { - req: { - groupId: UserGroup["id"]; - }; - res: null; - }; - "users/groups/invitations/accept": { - req: TODO; - res: TODO; - }; - "users/groups/invitations/reject": { - req: TODO; - res: TODO; - }; - "users/groups/invite": { - req: TODO; - res: TODO; - }; - "users/groups/joined": { - req: TODO; - res: TODO; - }; - "users/groups/owned": { - req: TODO; - res: TODO; - }; - "users/groups/pull": { - req: TODO; - res: TODO; - }; - "users/groups/show": { - req: TODO; - res: TODO; - }; - "users/groups/transfer": { - req: TODO; - res: TODO; - }; - "users/groups/update": { - req: TODO; - res: TODO; - }; - "users/lists/create": { - req: { - name: string; - }; - res: UserList; - }; - "users/lists/delete": { - req: { - listId: UserList["id"]; - }; - res: null; - }; - "users/lists/list": { - req: NoParams; - res: UserList[]; - }; - "users/lists/pull": { - req: { - listId: UserList["id"]; - userId: User["id"]; - }; - res: null; - }; - "users/lists/push": { - req: { - listId: UserList["id"]; - userId: User["id"]; - }; - res: null; - }; - "users/lists/show": { - req: { - listId: UserList["id"]; - }; - res: UserList; - }; - "users/lists/update": { - req: { - listId: UserList["id"]; - name: string; - }; - res: UserList; - }; - "users/notes": { - req: { - userId: User["id"]; - limit?: number; - sinceId?: Note["id"]; - untilId?: Note["id"]; - sinceDate?: number; - untilDate?: number; - }; - res: Note[]; - }; - "users/pages": { - req: TODO; - res: TODO; - }; - "users/recommendation": { - req: TODO; - res: TODO; - }; - "users/relation": { - req: TODO; - res: TODO; - }; - "users/report-abuse": { - req: TODO; - res: TODO; - }; - "users/search-by-username-and-host": { - req: TODO; - res: TODO; - }; - "users/search": { - req: TODO; - res: TODO; - }; - "users/show": { - req: - | ShowUserReq - | { - userIds: User["id"][]; - }; - res: { - $switch: { - $cases: [ - [ - { - userIds: User["id"][]; - }, - UserDetailed[], - ], - ]; - $default: UserDetailed; - }; - }; - }; - "users/stats": { - req: TODO; - res: TODO; - }; -}; -``` -**References:** [User](./calckey-js.entities.user.md), [Ad](./calckey-js.entities.ad.md), [Announcement](./calckey-js.entities.announcement.md), [Antenna](./calckey-js.entities.antenna.md), [Note](./calckey-js.entities.note.md), [UserDetailed](./calckey-js.entities.userdetailed.md), [App](./calckey-js.entities.app.md), [AuthSession](./calckey-js.entities.authsession.md), [Blocking](./calckey-js.entities.blocking.md), [Clip](./calckey-js.entities.clip.md), [DriveFolder](./calckey-js.entities.drivefolder.md), [DriveFile](./calckey-js.entities.drivefile.md), [Following](./calckey-js.entities.following.md), [FollowingFolloweePopulated](./calckey-js.entities.followingfolloweepopulated.md), [Instance](./calckey-js.entities.instance.md), [FollowRequest](./calckey-js.entities.followrequest.md), [GalleryPost](./calckey-js.entities.gallerypost.md), [NoteFavorite](./calckey-js.entities.notefavorite.md), [MeDetailed](./calckey-js.entities.medetailed.md), [DateString](./calckey-js.entities.datestring.md), [Signin](./calckey-js.entities.signin.md), [MessagingMessage](./calckey-js.entities.messagingmessage.md), [UserGroup](./calckey-js.entities.usergroup.md), [DetailedInstanceMetadata](./calckey-js.entities.detailedinstancemetadata.md), [LiteInstanceMetadata](./calckey-js.entities.liteinstancemetadata.md), [NoteReaction](./calckey-js.entities.notereaction.md), [UserList](./calckey-js.entities.userlist.md), [Page](./calckey-js.entities.page.md), [Stats](./calckey-js.entities.stats.md), [ServerInfo](./calckey-js.entities.serverinfo.md), [UserSorting](./calckey-js.entities.usersorting.md), [OriginType](./calckey-js.entities.origintype.md), [FollowingFollowerPopulated](./calckey-js.entities.followingfollowerpopulated.md) - diff --git a/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.ad.md b/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.ad.md deleted file mode 100644 index f68e17d..0000000 --- a/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.ad.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [calckey-js](./calckey-js.md) > [entities](./calckey-js.entities.md) > [Ad](./calckey-js.entities.ad.md) - -## entities.Ad type - -**Signature:** - -```typescript -export declare type Ad = TODO; -``` diff --git a/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.announcement.md b/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.announcement.md deleted file mode 100644 index a7385aa..0000000 --- a/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.announcement.md +++ /dev/null @@ -1,21 +0,0 @@ - - -[Home](./index.md) > [calckey-js](./calckey-js.md) > [entities](./calckey-js.entities.md) > [Announcement](./calckey-js.entities.announcement.md) - -## entities.Announcement type - -**Signature:** - -```typescript -export declare type Announcement = { - id: ID; - createdAt: DateString; - updatedAt: DateString | null; - text: string; - title: string; - imageUrl: string | null; - isRead?: boolean; -}; -``` -**References:** [ID](./calckey-js.entities.id.md), [DateString](./calckey-js.entities.datestring.md) - diff --git a/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.antenna.md b/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.antenna.md deleted file mode 100644 index a4fa297..0000000 --- a/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.antenna.md +++ /dev/null @@ -1,29 +0,0 @@ - - -[Home](./index.md) > [calckey-js](./calckey-js.md) > [entities](./calckey-js.entities.md) > [Antenna](./calckey-js.entities.antenna.md) - -## entities.Antenna type - -**Signature:** - -```typescript -export declare type Antenna = { - id: ID; - createdAt: DateString; - name: string; - keywords: string[][]; - excludeKeywords: string[][]; - src: "home" | "all" | "users" | "list" | "group" | "instances"; - userListId: ID | null; - userGroupId: ID | null; - users: string[]; - instances: string[]; - caseSensitive: boolean; - notify: boolean; - withReplies: boolean; - withFile: boolean; - hasUnreadNote: boolean; -}; -``` -**References:** [ID](./calckey-js.entities.id.md), [DateString](./calckey-js.entities.datestring.md) - diff --git a/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.app.md b/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.app.md deleted file mode 100644 index 32416ce..0000000 --- a/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.app.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [calckey-js](./calckey-js.md) > [entities](./calckey-js.entities.md) > [App](./calckey-js.entities.app.md) - -## entities.App type - -**Signature:** - -```typescript -export declare type App = TODO; -``` diff --git a/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.authsession.md b/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.authsession.md deleted file mode 100644 index c14955d..0000000 --- a/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.authsession.md +++ /dev/null @@ -1,17 +0,0 @@ - - -[Home](./index.md) > [calckey-js](./calckey-js.md) > [entities](./calckey-js.entities.md) > [AuthSession](./calckey-js.entities.authsession.md) - -## entities.AuthSession type - -**Signature:** - -```typescript -export declare type AuthSession = { - id: ID; - app: App; - token: string; -}; -``` -**References:** [ID](./calckey-js.entities.id.md), [App](./calckey-js.entities.app.md) - diff --git a/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.blocking.md b/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.blocking.md deleted file mode 100644 index d8c3add..0000000 --- a/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.blocking.md +++ /dev/null @@ -1,18 +0,0 @@ - - -[Home](./index.md) > [calckey-js](./calckey-js.md) > [entities](./calckey-js.entities.md) > [Blocking](./calckey-js.entities.blocking.md) - -## entities.Blocking type - -**Signature:** - -```typescript -export declare type Blocking = { - id: ID; - createdAt: DateString; - blockeeId: User["id"]; - blockee: UserDetailed; -}; -``` -**References:** [ID](./calckey-js.entities.id.md), [DateString](./calckey-js.entities.datestring.md), [User](./calckey-js.entities.user.md), [UserDetailed](./calckey-js.entities.userdetailed.md) - diff --git a/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.channel.md b/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.channel.md deleted file mode 100644 index d69ce6e..0000000 --- a/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.channel.md +++ /dev/null @@ -1,15 +0,0 @@ - - -[Home](./index.md) > [calckey-js](./calckey-js.md) > [entities](./calckey-js.entities.md) > [Channel](./calckey-js.entities.channel.md) - -## entities.Channel type - -**Signature:** - -```typescript -export declare type Channel = { - id: ID; -}; -``` -**References:** [ID](./calckey-js.entities.id.md) - diff --git a/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.clip.md b/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.clip.md deleted file mode 100644 index facd676..0000000 --- a/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.clip.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [calckey-js](./calckey-js.md) > [entities](./calckey-js.entities.md) > [Clip](./calckey-js.entities.clip.md) - -## entities.Clip type - -**Signature:** - -```typescript -export declare type Clip = TODO; -``` diff --git a/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.customemoji.md b/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.customemoji.md deleted file mode 100644 index 07ee6c5..0000000 --- a/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.customemoji.md +++ /dev/null @@ -1,17 +0,0 @@ - - -[Home](./index.md) > [calckey-js](./calckey-js.md) > [entities](./calckey-js.entities.md) > [CustomEmoji](./calckey-js.entities.customemoji.md) - -## entities.CustomEmoji type - -**Signature:** - -```typescript -export declare type CustomEmoji = { - id: string; - name: string; - url: string; - category: string; - aliases: string[]; -}; -``` diff --git a/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.datestring.md b/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.datestring.md deleted file mode 100644 index 8ea7776..0000000 --- a/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.datestring.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [calckey-js](./calckey-js.md) > [entities](./calckey-js.entities.md) > [DateString](./calckey-js.entities.datestring.md) - -## entities.DateString type - -**Signature:** - -```typescript -export declare type DateString = string; -``` diff --git a/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.detailedinstancemetadata.md b/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.detailedinstancemetadata.md deleted file mode 100644 index c37cab0..0000000 --- a/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.detailedinstancemetadata.md +++ /dev/null @@ -1,15 +0,0 @@ - - -[Home](./index.md) > [calckey-js](./calckey-js.md) > [entities](./calckey-js.entities.md) > [DetailedInstanceMetadata](./calckey-js.entities.detailedinstancemetadata.md) - -## entities.DetailedInstanceMetadata type - -**Signature:** - -```typescript -export declare type DetailedInstanceMetadata = LiteInstanceMetadata & { - features: Record; -}; -``` -**References:** [LiteInstanceMetadata](./calckey-js.entities.liteinstancemetadata.md) - diff --git a/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.drivefile.md b/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.drivefile.md deleted file mode 100644 index bb89fd6..0000000 --- a/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.drivefile.md +++ /dev/null @@ -1,26 +0,0 @@ - - -[Home](./index.md) > [calckey-js](./calckey-js.md) > [entities](./calckey-js.entities.md) > [DriveFile](./calckey-js.entities.drivefile.md) - -## entities.DriveFile type - -**Signature:** - -```typescript -export declare type DriveFile = { - id: ID; - createdAt: DateString; - isSensitive: boolean; - name: string; - thumbnailUrl: string; - url: string; - type: string; - size: number; - md5: string; - blurhash: string; - comment: string | null; - properties: Record; -}; -``` -**References:** [ID](./calckey-js.entities.id.md), [DateString](./calckey-js.entities.datestring.md) - diff --git a/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.drivefolder.md b/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.drivefolder.md deleted file mode 100644 index c0102e5..0000000 --- a/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.drivefolder.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [calckey-js](./calckey-js.md) > [entities](./calckey-js.entities.md) > [DriveFolder](./calckey-js.entities.drivefolder.md) - -## entities.DriveFolder type - -**Signature:** - -```typescript -export declare type DriveFolder = TODO; -``` diff --git a/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.following.md b/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.following.md deleted file mode 100644 index cd8bbc7..0000000 --- a/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.following.md +++ /dev/null @@ -1,18 +0,0 @@ - - -[Home](./index.md) > [calckey-js](./calckey-js.md) > [entities](./calckey-js.entities.md) > [Following](./calckey-js.entities.following.md) - -## entities.Following type - -**Signature:** - -```typescript -export declare type Following = { - id: ID; - createdAt: DateString; - followerId: User["id"]; - followeeId: User["id"]; -}; -``` -**References:** [ID](./calckey-js.entities.id.md), [DateString](./calckey-js.entities.datestring.md), [User](./calckey-js.entities.user.md) - diff --git a/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.followingfolloweepopulated.md b/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.followingfolloweepopulated.md deleted file mode 100644 index c75ffec..0000000 --- a/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.followingfolloweepopulated.md +++ /dev/null @@ -1,15 +0,0 @@ - - -[Home](./index.md) > [calckey-js](./calckey-js.md) > [entities](./calckey-js.entities.md) > [FollowingFolloweePopulated](./calckey-js.entities.followingfolloweepopulated.md) - -## entities.FollowingFolloweePopulated type - -**Signature:** - -```typescript -export declare type FollowingFolloweePopulated = Following & { - followee: UserDetailed; -}; -``` -**References:** [Following](./calckey-js.entities.following.md), [UserDetailed](./calckey-js.entities.userdetailed.md) - diff --git a/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.followingfollowerpopulated.md b/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.followingfollowerpopulated.md deleted file mode 100644 index a847ed2..0000000 --- a/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.followingfollowerpopulated.md +++ /dev/null @@ -1,15 +0,0 @@ - - -[Home](./index.md) > [calckey-js](./calckey-js.md) > [entities](./calckey-js.entities.md) > [FollowingFollowerPopulated](./calckey-js.entities.followingfollowerpopulated.md) - -## entities.FollowingFollowerPopulated type - -**Signature:** - -```typescript -export declare type FollowingFollowerPopulated = Following & { - follower: UserDetailed; -}; -``` -**References:** [Following](./calckey-js.entities.following.md), [UserDetailed](./calckey-js.entities.userdetailed.md) - diff --git a/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.followrequest.md b/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.followrequest.md deleted file mode 100644 index 7fce741..0000000 --- a/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.followrequest.md +++ /dev/null @@ -1,17 +0,0 @@ - - -[Home](./index.md) > [calckey-js](./calckey-js.md) > [entities](./calckey-js.entities.md) > [FollowRequest](./calckey-js.entities.followrequest.md) - -## entities.FollowRequest type - -**Signature:** - -```typescript -export declare type FollowRequest = { - id: ID; - follower: User; - followee: User; -}; -``` -**References:** [ID](./calckey-js.entities.id.md), [User](./calckey-js.entities.user.md) - diff --git a/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.gallerypost.md b/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.gallerypost.md deleted file mode 100644 index 0440a39..0000000 --- a/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.gallerypost.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [calckey-js](./calckey-js.md) > [entities](./calckey-js.entities.md) > [GalleryPost](./calckey-js.entities.gallerypost.md) - -## entities.GalleryPost type - -**Signature:** - -```typescript -export declare type GalleryPost = TODO; -``` diff --git a/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.id.md b/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.id.md deleted file mode 100644 index ae0dd28..0000000 --- a/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.id.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [calckey-js](./calckey-js.md) > [entities](./calckey-js.entities.md) > [ID](./calckey-js.entities.id.md) - -## entities.ID type - -**Signature:** - -```typescript -export declare type ID = string; -``` diff --git a/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.instance.md b/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.instance.md deleted file mode 100644 index 0638c35..0000000 --- a/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.instance.md +++ /dev/null @@ -1,40 +0,0 @@ - - -[Home](./index.md) > [calckey-js](./calckey-js.md) > [entities](./calckey-js.entities.md) > [Instance](./calckey-js.entities.instance.md) - -## entities.Instance type - -**Signature:** - -```typescript -export declare type Instance = { - id: ID; - caughtAt: DateString; - host: string; - usersCount: number; - notesCount: number; - followingCount: number; - followersCount: number; - driveUsage: number; - driveFiles: number; - latestRequestSentAt: DateString | null; - latestStatus: number | null; - latestRequestReceivedAt: DateString | null; - lastCommunicatedAt: DateString; - isNotResponding: boolean; - isSuspended: boolean; - softwareName: string | null; - softwareVersion: string | null; - openRegistrations: boolean | null; - name: string | null; - description: string | null; - maintainerName: string | null; - maintainerEmail: string | null; - iconUrl: string | null; - faviconUrl: string | null; - themeColor: string | null; - infoUpdatedAt: DateString | null; -}; -``` -**References:** [ID](./calckey-js.entities.id.md), [DateString](./calckey-js.entities.datestring.md) - diff --git a/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.instancemetadata.md b/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.instancemetadata.md deleted file mode 100644 index 92a3a04..0000000 --- a/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.instancemetadata.md +++ /dev/null @@ -1,15 +0,0 @@ - - -[Home](./index.md) > [calckey-js](./calckey-js.md) > [entities](./calckey-js.entities.md) > [InstanceMetadata](./calckey-js.entities.instancemetadata.md) - -## entities.InstanceMetadata type - -**Signature:** - -```typescript -export declare type InstanceMetadata = - | LiteInstanceMetadata - | DetailedInstanceMetadata; -``` -**References:** [LiteInstanceMetadata](./calckey-js.entities.liteinstancemetadata.md), [DetailedInstanceMetadata](./calckey-js.entities.detailedinstancemetadata.md) - diff --git a/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.liteinstancemetadata.md b/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.liteinstancemetadata.md deleted file mode 100644 index 7cbebc0..0000000 --- a/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.liteinstancemetadata.md +++ /dev/null @@ -1,46 +0,0 @@ - - -[Home](./index.md) > [calckey-js](./calckey-js.md) > [entities](./calckey-js.entities.md) > [LiteInstanceMetadata](./calckey-js.entities.liteinstancemetadata.md) - -## entities.LiteInstanceMetadata type - -**Signature:** - -```typescript -export declare type LiteInstanceMetadata = { - maintainerName: string | null; - maintainerEmail: string | null; - version: string; - name: string | null; - uri: string; - description: string | null; - tosUrl: string | null; - disableRegistration: boolean; - disableLocalTimeline: boolean; - disableRecommendedTimeline: boolean; - disableGlobalTimeline: boolean; - driveCapacityPerLocalUserMb: number; - driveCapacityPerRemoteUserMb: number; - enableHcaptcha: boolean; - hcaptchaSiteKey: string | null; - enableRecaptcha: boolean; - recaptchaSiteKey: string | null; - swPublickey: string | null; - maxNoteTextLength: number; - enableEmail: boolean; - enableTwitterIntegration: boolean; - enableGithubIntegration: boolean; - enableDiscordIntegration: boolean; - enableServiceWorker: boolean; - emojis: CustomEmoji[]; - ads: { - id: ID; - ratio: number; - place: string; - url: string; - imageUrl: string; - }[]; -}; -``` -**References:** [CustomEmoji](./calckey-js.entities.customemoji.md), [ID](./calckey-js.entities.id.md) - diff --git a/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.md b/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.md deleted file mode 100644 index 250a95a..0000000 --- a/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.md +++ /dev/null @@ -1,51 +0,0 @@ - - -[Home](./index.md) > [calckey-js](./calckey-js.md) > [entities](./calckey-js.entities.md) - -## entities namespace - -## Type Aliases - -| Type Alias | Description | -| --- | --- | -| [Ad](./calckey-js.entities.ad.md) | | -| [Announcement](./calckey-js.entities.announcement.md) | | -| [Antenna](./calckey-js.entities.antenna.md) | | -| [App](./calckey-js.entities.app.md) | | -| [AuthSession](./calckey-js.entities.authsession.md) | | -| [Blocking](./calckey-js.entities.blocking.md) | | -| [Channel](./calckey-js.entities.channel.md) | | -| [Clip](./calckey-js.entities.clip.md) | | -| [CustomEmoji](./calckey-js.entities.customemoji.md) | | -| [DateString](./calckey-js.entities.datestring.md) | | -| [DetailedInstanceMetadata](./calckey-js.entities.detailedinstancemetadata.md) | | -| [DriveFile](./calckey-js.entities.drivefile.md) | | -| [DriveFolder](./calckey-js.entities.drivefolder.md) | | -| [Following](./calckey-js.entities.following.md) | | -| [FollowingFolloweePopulated](./calckey-js.entities.followingfolloweepopulated.md) | | -| [FollowingFollowerPopulated](./calckey-js.entities.followingfollowerpopulated.md) | | -| [FollowRequest](./calckey-js.entities.followrequest.md) | | -| [GalleryPost](./calckey-js.entities.gallerypost.md) | | -| [ID](./calckey-js.entities.id.md) | | -| [Instance](./calckey-js.entities.instance.md) | | -| [InstanceMetadata](./calckey-js.entities.instancemetadata.md) | | -| [LiteInstanceMetadata](./calckey-js.entities.liteinstancemetadata.md) | | -| [MeDetailed](./calckey-js.entities.medetailed.md) | | -| [MessagingMessage](./calckey-js.entities.messagingmessage.md) | | -| [Note](./calckey-js.entities.note.md) | | -| [NoteFavorite](./calckey-js.entities.notefavorite.md) | | -| [NoteReaction](./calckey-js.entities.notereaction.md) | | -| [Notification](./calckey-js.entities.notification.md) | | -| [OriginType](./calckey-js.entities.origintype.md) | | -| [Page](./calckey-js.entities.page.md) | | -| [PageEvent](./calckey-js.entities.pageevent.md) | | -| [ServerInfo](./calckey-js.entities.serverinfo.md) | | -| [Signin](./calckey-js.entities.signin.md) | | -| [Stats](./calckey-js.entities.stats.md) | | -| [User](./calckey-js.entities.user.md) | | -| [UserDetailed](./calckey-js.entities.userdetailed.md) | | -| [UserGroup](./calckey-js.entities.usergroup.md) | | -| [UserList](./calckey-js.entities.userlist.md) | | -| [UserLite](./calckey-js.entities.userlite.md) | | -| [UserSorting](./calckey-js.entities.usersorting.md) | | - diff --git a/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.medetailed.md b/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.medetailed.md deleted file mode 100644 index 0d6b0c4..0000000 --- a/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.medetailed.md +++ /dev/null @@ -1,40 +0,0 @@ - - -[Home](./index.md) > [calckey-js](./calckey-js.md) > [entities](./calckey-js.entities.md) > [MeDetailed](./calckey-js.entities.medetailed.md) - -## entities.MeDetailed type - -**Signature:** - -```typescript -export declare type MeDetailed = UserDetailed & { - avatarId: DriveFile["id"]; - bannerId: DriveFile["id"]; - autoAcceptFollowed: boolean; - alwaysMarkNsfw: boolean; - carefulBot: boolean; - emailNotificationTypes: string[]; - hasPendingReceivedFollowRequest: boolean; - hasUnreadAnnouncement: boolean; - hasUnreadAntenna: boolean; - hasUnreadChannel: boolean; - hasUnreadMentions: boolean; - hasUnreadMessagingMessage: boolean; - hasUnreadNotification: boolean; - hasUnreadSpecifiedNotes: boolean; - hideOnlineStatus: boolean; - injectFeaturedNote: boolean; - integrations: Record; - isDeleted: boolean; - isExplorable: boolean; - mutedWords: string[][]; - mutingNotificationTypes: string[]; - noCrawle: boolean; - preventAiLearning: boolean; - receiveAnnouncementEmail: boolean; - usePasswordLessLogin: boolean; - [other: string]: any; -}; -``` -**References:** [UserDetailed](./calckey-js.entities.userdetailed.md), [DriveFile](./calckey-js.entities.drivefile.md) - diff --git a/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.messagingmessage.md b/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.messagingmessage.md deleted file mode 100644 index 100f0e3..0000000 --- a/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.messagingmessage.md +++ /dev/null @@ -1,27 +0,0 @@ - - -[Home](./index.md) > [calckey-js](./calckey-js.md) > [entities](./calckey-js.entities.md) > [MessagingMessage](./calckey-js.entities.messagingmessage.md) - -## entities.MessagingMessage type - -**Signature:** - -```typescript -export declare type MessagingMessage = { - id: ID; - createdAt: DateString; - file: DriveFile | null; - fileId: DriveFile["id"] | null; - isRead: boolean; - reads: User["id"][]; - text: string | null; - user: User; - userId: User["id"]; - recipient?: User | null; - recipientId: User["id"] | null; - group?: UserGroup | null; - groupId: UserGroup["id"] | null; -}; -``` -**References:** [ID](./calckey-js.entities.id.md), [DateString](./calckey-js.entities.datestring.md), [DriveFile](./calckey-js.entities.drivefile.md), [User](./calckey-js.entities.user.md), [UserGroup](./calckey-js.entities.usergroup.md) - diff --git a/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.note.md b/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.note.md deleted file mode 100644 index 7faf70e..0000000 --- a/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.note.md +++ /dev/null @@ -1,51 +0,0 @@ - - -[Home](./index.md) > [calckey-js](./calckey-js.md) > [entities](./calckey-js.entities.md) > [Note](./calckey-js.entities.note.md) - -## entities.Note type - -**Signature:** - -```typescript -export declare type Note = { - id: ID; - createdAt: DateString; - text: string | null; - cw: string | null; - user: User; - userId: User["id"]; - reply?: Note; - replyId: Note["id"]; - renote?: Note; - renoteId: Note["id"]; - files: DriveFile[]; - fileIds: DriveFile["id"][]; - visibility: "public" | "home" | "followers" | "specified"; - visibleUserIds?: User["id"][]; - localOnly?: boolean; - channel?: Channel["id"]; - myReaction?: string; - reactions: Record; - renoteCount: number; - repliesCount: number; - poll?: { - expiresAt: DateString | null; - multiple: boolean; - choices: { - isVoted: boolean; - text: string; - votes: number; - }[]; - }; - emojis: { - name: string; - url: string; - }[]; - uri?: string; - url?: string; - updatedAt?: DateString; - isHidden?: boolean; -}; -``` -**References:** [ID](./calckey-js.entities.id.md), [DateString](./calckey-js.entities.datestring.md), [User](./calckey-js.entities.user.md), [Note](./calckey-js.entities.note.md), [DriveFile](./calckey-js.entities.drivefile.md), [Channel](./calckey-js.entities.channel.md) - diff --git a/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.notefavorite.md b/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.notefavorite.md deleted file mode 100644 index 8773389..0000000 --- a/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.notefavorite.md +++ /dev/null @@ -1,18 +0,0 @@ - - -[Home](./index.md) > [calckey-js](./calckey-js.md) > [entities](./calckey-js.entities.md) > [NoteFavorite](./calckey-js.entities.notefavorite.md) - -## entities.NoteFavorite type - -**Signature:** - -```typescript -export declare type NoteFavorite = { - id: ID; - createdAt: DateString; - noteId: Note["id"]; - note: Note; -}; -``` -**References:** [ID](./calckey-js.entities.id.md), [DateString](./calckey-js.entities.datestring.md), [Note](./calckey-js.entities.note.md) - diff --git a/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.notereaction.md b/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.notereaction.md deleted file mode 100644 index 3c89089..0000000 --- a/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.notereaction.md +++ /dev/null @@ -1,18 +0,0 @@ - - -[Home](./index.md) > [calckey-js](./calckey-js.md) > [entities](./calckey-js.entities.md) > [NoteReaction](./calckey-js.entities.notereaction.md) - -## entities.NoteReaction type - -**Signature:** - -```typescript -export declare type NoteReaction = { - id: ID; - createdAt: DateString; - user: UserLite; - type: string; -}; -``` -**References:** [ID](./calckey-js.entities.id.md), [DateString](./calckey-js.entities.datestring.md), [UserLite](./calckey-js.entities.userlite.md) - diff --git a/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.notification.md b/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.notification.md deleted file mode 100644 index cf9896a..0000000 --- a/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.notification.md +++ /dev/null @@ -1,82 +0,0 @@ - - -[Home](./index.md) > [calckey-js](./calckey-js.md) > [entities](./calckey-js.entities.md) > [Notification](./calckey-js.entities.notification.md) - -## entities.Notification type - -**Signature:** - -```typescript -export declare type Notification = { - id: ID; - createdAt: DateString; - isRead: boolean; -} & ( - | { - type: "reaction"; - reaction: string; - user: User; - userId: User["id"]; - note: Note; - } - | { - type: "reply"; - user: User; - userId: User["id"]; - note: Note; - } - | { - type: "renote"; - user: User; - userId: User["id"]; - note: Note; - } - | { - type: "quote"; - user: User; - userId: User["id"]; - note: Note; - } - | { - type: "mention"; - user: User; - userId: User["id"]; - note: Note; - } - | { - type: "pollVote"; - user: User; - userId: User["id"]; - note: Note; - } - | { - type: "follow"; - user: User; - userId: User["id"]; - } - | { - type: "followRequestAccepted"; - user: User; - userId: User["id"]; - } - | { - type: "receiveFollowRequest"; - user: User; - userId: User["id"]; - } - | { - type: "groupInvited"; - invitation: UserGroup; - user: User; - userId: User["id"]; - } - | { - type: "app"; - header?: string | null; - body: string; - icon?: string | null; - } -); -``` -**References:** [ID](./calckey-js.entities.id.md), [DateString](./calckey-js.entities.datestring.md), [User](./calckey-js.entities.user.md), [Note](./calckey-js.entities.note.md), [UserGroup](./calckey-js.entities.usergroup.md) - diff --git a/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.origintype.md b/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.origintype.md deleted file mode 100644 index ce3d68e..0000000 --- a/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.origintype.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [calckey-js](./calckey-js.md) > [entities](./calckey-js.entities.md) > [OriginType](./calckey-js.entities.origintype.md) - -## entities.OriginType type - -**Signature:** - -```typescript -export declare type OriginType = "combined" | "local" | "remote"; -``` diff --git a/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.page.md b/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.page.md deleted file mode 100644 index 3d6c48e..0000000 --- a/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.page.md +++ /dev/null @@ -1,33 +0,0 @@ - - -[Home](./index.md) > [calckey-js](./calckey-js.md) > [entities](./calckey-js.entities.md) > [Page](./calckey-js.entities.page.md) - -## entities.Page type - -**Signature:** - -```typescript -export declare type Page = { - id: ID; - createdAt: DateString; - updatedAt: DateString; - userId: User["id"]; - user: User; - content: Record[]; - variables: Record[]; - title: string; - name: string; - summary: string | null; - hideTitleWhenPinned: boolean; - alignCenter: boolean; - font: string; - script: string; - eyeCatchingImageId: DriveFile["id"] | null; - eyeCatchingImage: DriveFile | null; - attachedFiles: any; - likedCount: number; - isLiked?: boolean; -}; -``` -**References:** [ID](./calckey-js.entities.id.md), [DateString](./calckey-js.entities.datestring.md), [User](./calckey-js.entities.user.md), [DriveFile](./calckey-js.entities.drivefile.md) - diff --git a/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.pageevent.md b/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.pageevent.md deleted file mode 100644 index c01947c..0000000 --- a/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.pageevent.md +++ /dev/null @@ -1,19 +0,0 @@ - - -[Home](./index.md) > [calckey-js](./calckey-js.md) > [entities](./calckey-js.entities.md) > [PageEvent](./calckey-js.entities.pageevent.md) - -## entities.PageEvent type - -**Signature:** - -```typescript -export declare type PageEvent = { - pageId: Page["id"]; - event: string; - var: any; - userId: User["id"]; - user: User; -}; -``` -**References:** [Page](./calckey-js.entities.page.md), [User](./calckey-js.entities.user.md) - diff --git a/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.serverinfo.md b/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.serverinfo.md deleted file mode 100644 index 0fbed1a..0000000 --- a/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.serverinfo.md +++ /dev/null @@ -1,24 +0,0 @@ - - -[Home](./index.md) > [calckey-js](./calckey-js.md) > [entities](./calckey-js.entities.md) > [ServerInfo](./calckey-js.entities.serverinfo.md) - -## entities.ServerInfo type - -**Signature:** - -```typescript -export declare type ServerInfo = { - machine: string; - cpu: { - model: string; - cores: number; - }; - mem: { - total: number; - }; - fs: { - total: number; - used: number; - }; -}; -``` diff --git a/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.signin.md b/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.signin.md deleted file mode 100644 index d1f0118..0000000 --- a/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.signin.md +++ /dev/null @@ -1,19 +0,0 @@ - - -[Home](./index.md) > [calckey-js](./calckey-js.md) > [entities](./calckey-js.entities.md) > [Signin](./calckey-js.entities.signin.md) - -## entities.Signin type - -**Signature:** - -```typescript -export declare type Signin = { - id: ID; - createdAt: DateString; - ip: string; - headers: Record; - success: boolean; -}; -``` -**References:** [ID](./calckey-js.entities.id.md), [DateString](./calckey-js.entities.datestring.md) - diff --git a/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.stats.md b/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.stats.md deleted file mode 100644 index aa4057b..0000000 --- a/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.stats.md +++ /dev/null @@ -1,19 +0,0 @@ - - -[Home](./index.md) > [calckey-js](./calckey-js.md) > [entities](./calckey-js.entities.md) > [Stats](./calckey-js.entities.stats.md) - -## entities.Stats type - -**Signature:** - -```typescript -export declare type Stats = { - notesCount: number; - originalNotesCount: number; - usersCount: number; - originalUsersCount: number; - instances: number; - driveUsageLocal: number; - driveUsageRemote: number; -}; -``` diff --git a/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.user.md b/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.user.md deleted file mode 100644 index 0b1446b..0000000 --- a/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.user.md +++ /dev/null @@ -1,13 +0,0 @@ - - -[Home](./index.md) > [calckey-js](./calckey-js.md) > [entities](./calckey-js.entities.md) > [User](./calckey-js.entities.user.md) - -## entities.User type - -**Signature:** - -```typescript -export declare type User = UserLite | UserDetailed; -``` -**References:** [UserLite](./calckey-js.entities.userlite.md), [UserDetailed](./calckey-js.entities.userdetailed.md) - diff --git a/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.userdetailed.md b/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.userdetailed.md deleted file mode 100644 index a4a957a..0000000 --- a/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.userdetailed.md +++ /dev/null @@ -1,56 +0,0 @@ - - -[Home](./index.md) > [calckey-js](./calckey-js.md) > [entities](./calckey-js.entities.md) > [UserDetailed](./calckey-js.entities.userdetailed.md) - -## entities.UserDetailed type - -**Signature:** - -```typescript -export declare type UserDetailed = UserLite & { - bannerBlurhash: string | null; - bannerColor: string | null; - bannerUrl: string | null; - birthday: string | null; - createdAt: DateString; - description: string | null; - ffVisibility: "public" | "followers" | "private"; - fields: { - name: string; - value: string; - }[]; - followersCount: number; - followingCount: number; - hasPendingFollowRequestFromYou: boolean; - hasPendingFollowRequestToYou: boolean; - isAdmin: boolean; - isBlocked: boolean; - isBlocking: boolean; - isBot: boolean; - isCat: boolean; - isFollowed: boolean; - isFollowing: boolean; - isLocked: boolean; - isModerator: boolean; - isMuted: boolean; - isRenoteMuted: boolean; - isSilenced: boolean; - isSuspended: boolean; - lang: string | null; - lastFetchedAt?: DateString; - location: string | null; - notesCount: number; - pinnedNoteIds: ID[]; - pinnedNotes: Note[]; - pinnedPage: Page | null; - pinnedPageId: string | null; - publicReactions: boolean; - securityKeys: boolean; - twoFactorEnabled: boolean; - updatedAt: DateString | null; - uri: string | null; - url: string | null; -}; -``` -**References:** [UserLite](./calckey-js.entities.userlite.md), [DateString](./calckey-js.entities.datestring.md), [ID](./calckey-js.entities.id.md), [Note](./calckey-js.entities.note.md), [Page](./calckey-js.entities.page.md) - diff --git a/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.usergroup.md b/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.usergroup.md deleted file mode 100644 index 2408278..0000000 --- a/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.usergroup.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [calckey-js](./calckey-js.md) > [entities](./calckey-js.entities.md) > [UserGroup](./calckey-js.entities.usergroup.md) - -## entities.UserGroup type - -**Signature:** - -```typescript -export declare type UserGroup = TODO; -``` diff --git a/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.userlist.md b/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.userlist.md deleted file mode 100644 index 6b1960b..0000000 --- a/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.userlist.md +++ /dev/null @@ -1,18 +0,0 @@ - - -[Home](./index.md) > [calckey-js](./calckey-js.md) > [entities](./calckey-js.entities.md) > [UserList](./calckey-js.entities.userlist.md) - -## entities.UserList type - -**Signature:** - -```typescript -export declare type UserList = { - id: ID; - createdAt: DateString; - name: string; - userIds: User["id"][]; -}; -``` -**References:** [ID](./calckey-js.entities.id.md), [DateString](./calckey-js.entities.datestring.md), [User](./calckey-js.entities.user.md) - diff --git a/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.userlite.md b/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.userlite.md deleted file mode 100644 index 5d0e28f..0000000 --- a/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.userlite.md +++ /dev/null @@ -1,35 +0,0 @@ - - -[Home](./index.md) > [calckey-js](./calckey-js.md) > [entities](./calckey-js.entities.md) > [UserLite](./calckey-js.entities.userlite.md) - -## entities.UserLite type - -**Signature:** - -```typescript -export declare type UserLite = { - id: ID; - username: string; - host: string | null; - name: string; - onlineStatus: "online" | "active" | "offline" | "unknown"; - avatarUrl: string; - avatarBlurhash: string; - alsoKnownAs: string[]; - movedToUri: any; - emojis: { - name: string; - url: string; - }[]; - instance?: { - name: Instance["name"]; - softwareName: Instance["softwareName"]; - softwareVersion: Instance["softwareVersion"]; - iconUrl: Instance["iconUrl"]; - faviconUrl: Instance["faviconUrl"]; - themeColor: Instance["themeColor"]; - }; -}; -``` -**References:** [ID](./calckey-js.entities.id.md), [Instance](./calckey-js.entities.instance.md) - diff --git a/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.usersorting.md b/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.usersorting.md deleted file mode 100644 index 3ca7ad4..0000000 --- a/fe_calckey/frontend/calckey-js/markdown/calckey-js.entities.usersorting.md +++ /dev/null @@ -1,17 +0,0 @@ - - -[Home](./index.md) > [calckey-js](./calckey-js.md) > [entities](./calckey-js.entities.md) > [UserSorting](./calckey-js.entities.usersorting.md) - -## entities.UserSorting type - -**Signature:** - -```typescript -export declare type UserSorting = - | "+follower" - | "-follower" - | "+createdAt" - | "-createdAt" - | "+updatedAt" - | "-updatedAt"; -``` diff --git a/fe_calckey/frontend/calckey-js/markdown/calckey-js.ffvisibility.md b/fe_calckey/frontend/calckey-js/markdown/calckey-js.ffvisibility.md deleted file mode 100644 index 03da275..0000000 --- a/fe_calckey/frontend/calckey-js/markdown/calckey-js.ffvisibility.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [calckey-js](./calckey-js.md) > [ffVisibility](./calckey-js.ffvisibility.md) - -## ffVisibility variable - -**Signature:** - -```typescript -ffVisibility: readonly ["public", "followers", "private"] -``` diff --git a/fe_calckey/frontend/calckey-js/markdown/calckey-js.md b/fe_calckey/frontend/calckey-js/markdown/calckey-js.md deleted file mode 100644 index ac4b113..0000000 --- a/fe_calckey/frontend/calckey-js/markdown/calckey-js.md +++ /dev/null @@ -1,43 +0,0 @@ - - -[Home](./index.md) > [calckey-js](./calckey-js.md) - -## calckey-js package - -## Classes - -| Class | Description | -| --- | --- | -| [Stream](./calckey-js.stream.md) | | - -## Abstract Classes - -| Abstract Class | Description | -| --- | --- | -| [ChannelConnection](./calckey-js.channelconnection.md) | | - -## Namespaces - -| Namespace | Description | -| --- | --- | -| [api](./calckey-js.api.md) | | -| [entities](./calckey-js.entities.md) | | - -## Variables - -| Variable | Description | -| --- | --- | -| [ffVisibility](./calckey-js.ffvisibility.md) | | -| [mutedNoteReasons](./calckey-js.mutednotereasons.md) | | -| [noteVisibilities](./calckey-js.notevisibilities.md) | | -| [notificationTypes](./calckey-js.notificationtypes.md) | | -| [permissions](./calckey-js.permissions.md) | | - -## Type Aliases - -| Type Alias | Description | -| --- | --- | -| [Acct](./calckey-js.acct.md) | | -| [Channels](./calckey-js.channels.md) | | -| [Endpoints](./calckey-js.endpoints.md) | | - diff --git a/fe_calckey/frontend/calckey-js/markdown/calckey-js.mutednotereasons.md b/fe_calckey/frontend/calckey-js/markdown/calckey-js.mutednotereasons.md deleted file mode 100644 index b0fb617..0000000 --- a/fe_calckey/frontend/calckey-js/markdown/calckey-js.mutednotereasons.md +++ /dev/null @@ -1,16 +0,0 @@ - - -[Home](./index.md) > [calckey-js](./calckey-js.md) > [mutedNoteReasons](./calckey-js.mutednotereasons.md) - -## mutedNoteReasons variable - -**Signature:** - -```typescript -mutedNoteReasons: readonly [ - "word", - "manual", - "spam", - "other", -] -``` diff --git a/fe_calckey/frontend/calckey-js/markdown/calckey-js.notevisibilities.md b/fe_calckey/frontend/calckey-js/markdown/calckey-js.notevisibilities.md deleted file mode 100644 index 9fff881..0000000 --- a/fe_calckey/frontend/calckey-js/markdown/calckey-js.notevisibilities.md +++ /dev/null @@ -1,16 +0,0 @@ - - -[Home](./index.md) > [calckey-js](./calckey-js.md) > [noteVisibilities](./calckey-js.notevisibilities.md) - -## noteVisibilities variable - -**Signature:** - -```typescript -noteVisibilities: readonly [ - "public", - "home", - "followers", - "specified", -] -``` diff --git a/fe_calckey/frontend/calckey-js/markdown/calckey-js.notificationtypes.md b/fe_calckey/frontend/calckey-js/markdown/calckey-js.notificationtypes.md deleted file mode 100644 index 57d8c73..0000000 --- a/fe_calckey/frontend/calckey-js/markdown/calckey-js.notificationtypes.md +++ /dev/null @@ -1,24 +0,0 @@ - - -[Home](./index.md) > [calckey-js](./calckey-js.md) > [notificationTypes](./calckey-js.notificationtypes.md) - -## notificationTypes variable - -**Signature:** - -```typescript -notificationTypes: readonly [ - "follow", - "mention", - "reply", - "renote", - "quote", - "reaction", - "pollVote", - "pollEnded", - "receiveFollowRequest", - "followRequestAccepted", - "groupInvited", - "app", -] -``` diff --git a/fe_calckey/frontend/calckey-js/markdown/calckey-js.permissions.md b/fe_calckey/frontend/calckey-js/markdown/calckey-js.permissions.md deleted file mode 100644 index 611bfde..0000000 --- a/fe_calckey/frontend/calckey-js/markdown/calckey-js.permissions.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [calckey-js](./calckey-js.md) > [permissions](./calckey-js.permissions.md) - -## permissions variable - -**Signature:** - -```typescript -permissions: string[] -``` diff --git a/fe_calckey/frontend/calckey-js/markdown/calckey-js.stream._constructor_.md b/fe_calckey/frontend/calckey-js/markdown/calckey-js.stream._constructor_.md deleted file mode 100644 index 8cc0298..0000000 --- a/fe_calckey/frontend/calckey-js/markdown/calckey-js.stream._constructor_.md +++ /dev/null @@ -1,30 +0,0 @@ - - -[Home](./index.md) > [calckey-js](./calckey-js.md) > [Stream](./calckey-js.stream.md) > [(constructor)](./calckey-js.stream._constructor_.md) - -## Stream.(constructor) - -Constructs a new instance of the `Stream` class - -**Signature:** - -```typescript -constructor( - origin: string, - user: { - token: string; - } | null, - options?: { - WebSocket?: any; - }, - ); -``` - -## Parameters - -| Parameter | Type | Description | -| --- | --- | --- | -| origin | string | | -| user | { token: string; } \| null | | -| options | { WebSocket?: any; } | _(Optional)_ | - diff --git a/fe_calckey/frontend/calckey-js/markdown/calckey-js.stream.close.md b/fe_calckey/frontend/calckey-js/markdown/calckey-js.stream.close.md deleted file mode 100644 index 0160503..0000000 --- a/fe_calckey/frontend/calckey-js/markdown/calckey-js.stream.close.md +++ /dev/null @@ -1,15 +0,0 @@ - - -[Home](./index.md) > [calckey-js](./calckey-js.md) > [Stream](./calckey-js.stream.md) > [close](./calckey-js.stream.close.md) - -## Stream.close() method - -**Signature:** - -```typescript -close(): void; -``` -**Returns:** - -void - diff --git a/fe_calckey/frontend/calckey-js/markdown/calckey-js.stream.disconnecttochannel.md b/fe_calckey/frontend/calckey-js/markdown/calckey-js.stream.disconnecttochannel.md deleted file mode 100644 index 0d1e5bd..0000000 --- a/fe_calckey/frontend/calckey-js/markdown/calckey-js.stream.disconnecttochannel.md +++ /dev/null @@ -1,22 +0,0 @@ - - -[Home](./index.md) > [calckey-js](./calckey-js.md) > [Stream](./calckey-js.stream.md) > [disconnectToChannel](./calckey-js.stream.disconnecttochannel.md) - -## Stream.disconnectToChannel() method - -**Signature:** - -```typescript -disconnectToChannel(connection: NonSharedConnection): void; -``` - -## Parameters - -| Parameter | Type | Description | -| --- | --- | --- | -| connection | NonSharedConnection | | - -**Returns:** - -void - diff --git a/fe_calckey/frontend/calckey-js/markdown/calckey-js.stream.md b/fe_calckey/frontend/calckey-js/markdown/calckey-js.stream.md deleted file mode 100644 index c6f1492..0000000 --- a/fe_calckey/frontend/calckey-js/markdown/calckey-js.stream.md +++ /dev/null @@ -1,36 +0,0 @@ - - -[Home](./index.md) > [calckey-js](./calckey-js.md) > [Stream](./calckey-js.stream.md) - -## Stream class - -**Signature:** - -```typescript -export default class Stream extends EventEmitter -``` -**Extends:** EventEmitter<StreamEvents> - -## Constructors - -| Constructor | Modifiers | Description | -| --- | --- | --- | -| [(constructor)(origin, user, options)](./calckey-js.stream._constructor_.md) | | Constructs a new instance of the Stream class | - -## Properties - -| Property | Modifiers | Type | Description | -| --- | --- | --- | --- | -| [state](./calckey-js.stream.state.md) | | "initializing" \| "reconnecting" \| "connected" | | - -## Methods - -| Method | Modifiers | Description | -| --- | --- | --- | -| [close()](./calckey-js.stream.close.md) | | | -| [disconnectToChannel(connection)](./calckey-js.stream.disconnecttochannel.md) | | | -| [removeSharedConnection(connection)](./calckey-js.stream.removesharedconnection.md) | | | -| [removeSharedConnectionPool(pool)](./calckey-js.stream.removesharedconnectionpool.md) | | | -| [send(typeOrPayload, payload)](./calckey-js.stream.send.md) | | | -| [useChannel(channel, params, name)](./calckey-js.stream.usechannel.md) | | | - diff --git a/fe_calckey/frontend/calckey-js/markdown/calckey-js.stream.removesharedconnection.md b/fe_calckey/frontend/calckey-js/markdown/calckey-js.stream.removesharedconnection.md deleted file mode 100644 index 46fed5a..0000000 --- a/fe_calckey/frontend/calckey-js/markdown/calckey-js.stream.removesharedconnection.md +++ /dev/null @@ -1,22 +0,0 @@ - - -[Home](./index.md) > [calckey-js](./calckey-js.md) > [Stream](./calckey-js.stream.md) > [removeSharedConnection](./calckey-js.stream.removesharedconnection.md) - -## Stream.removeSharedConnection() method - -**Signature:** - -```typescript -removeSharedConnection(connection: SharedConnection): void; -``` - -## Parameters - -| Parameter | Type | Description | -| --- | --- | --- | -| connection | SharedConnection | | - -**Returns:** - -void - diff --git a/fe_calckey/frontend/calckey-js/markdown/calckey-js.stream.removesharedconnectionpool.md b/fe_calckey/frontend/calckey-js/markdown/calckey-js.stream.removesharedconnectionpool.md deleted file mode 100644 index 4af9713..0000000 --- a/fe_calckey/frontend/calckey-js/markdown/calckey-js.stream.removesharedconnectionpool.md +++ /dev/null @@ -1,22 +0,0 @@ - - -[Home](./index.md) > [calckey-js](./calckey-js.md) > [Stream](./calckey-js.stream.md) > [removeSharedConnectionPool](./calckey-js.stream.removesharedconnectionpool.md) - -## Stream.removeSharedConnectionPool() method - -**Signature:** - -```typescript -removeSharedConnectionPool(pool: Pool): void; -``` - -## Parameters - -| Parameter | Type | Description | -| --- | --- | --- | -| pool | Pool | | - -**Returns:** - -void - diff --git a/fe_calckey/frontend/calckey-js/markdown/calckey-js.stream.send.md b/fe_calckey/frontend/calckey-js/markdown/calckey-js.stream.send.md deleted file mode 100644 index a822538..0000000 --- a/fe_calckey/frontend/calckey-js/markdown/calckey-js.stream.send.md +++ /dev/null @@ -1,23 +0,0 @@ - - -[Home](./index.md) > [calckey-js](./calckey-js.md) > [Stream](./calckey-js.stream.md) > [send](./calckey-js.stream.send.md) - -## Stream.send() method - -**Signature:** - -```typescript -send(typeOrPayload: any, payload?: any): void; -``` - -## Parameters - -| Parameter | Type | Description | -| --- | --- | --- | -| typeOrPayload | any | | -| payload | any | _(Optional)_ | - -**Returns:** - -void - diff --git a/fe_calckey/frontend/calckey-js/markdown/calckey-js.stream.state.md b/fe_calckey/frontend/calckey-js/markdown/calckey-js.stream.state.md deleted file mode 100644 index b14d2f2..0000000 --- a/fe_calckey/frontend/calckey-js/markdown/calckey-js.stream.state.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [calckey-js](./calckey-js.md) > [Stream](./calckey-js.stream.md) > [state](./calckey-js.stream.state.md) - -## Stream.state property - -**Signature:** - -```typescript -state: "initializing" | "reconnecting" | "connected"; -``` diff --git a/fe_calckey/frontend/calckey-js/markdown/calckey-js.stream.usechannel.md b/fe_calckey/frontend/calckey-js/markdown/calckey-js.stream.usechannel.md deleted file mode 100644 index 331b60b..0000000 --- a/fe_calckey/frontend/calckey-js/markdown/calckey-js.stream.usechannel.md +++ /dev/null @@ -1,28 +0,0 @@ - - -[Home](./index.md) > [calckey-js](./calckey-js.md) > [Stream](./calckey-js.stream.md) > [useChannel](./calckey-js.stream.usechannel.md) - -## Stream.useChannel() method - -**Signature:** - -```typescript -useChannel( - channel: C, - params?: Channels[C]["params"], - name?: string, - ): Connection; -``` - -## Parameters - -| Parameter | Type | Description | -| --- | --- | --- | -| channel | C | | -| params | [Channels](./calckey-js.channels.md)\[C\]\["params"\] | _(Optional)_ | -| name | string | _(Optional)_ | - -**Returns:** - -[Connection](./calckey-js.channelconnection.md)<[Channels](./calckey-js.channels.md)\[C\]> - diff --git a/fe_calckey/frontend/calckey-js/markdown/index.md b/fe_calckey/frontend/calckey-js/markdown/index.md deleted file mode 100644 index 20c7819..0000000 --- a/fe_calckey/frontend/calckey-js/markdown/index.md +++ /dev/null @@ -1,12 +0,0 @@ - - -[Home](./index.md) - -## API Reference - -## Packages - -| Package | Description | -| --- | --- | -| [calckey-js](./calckey-js.md) | | - diff --git a/fe_calckey/frontend/calckey-js/package.json b/fe_calckey/frontend/calckey-js/package.json index 6a1c2bd..b4993d7 100644 --- a/fe_calckey/frontend/calckey-js/package.json +++ b/fe_calckey/frontend/calckey-js/package.json @@ -6,19 +6,13 @@ "types": "./built/index.d.ts", "scripts": { "build": "pnpm swc src -d built -D", - "render": "pnpm run build && pnpm run api && pnpm run api-prod && cp temp/calckey-js.api.json etc/ && pnpm run api-doc", - "tsd": "tsc && tsd", - "api": "pnpm api-extractor run --local --verbose", - "api-prod": "pnpm api-extractor run --verbose", - "api-doc": "pnpm api-documenter markdown -i ./etc/" + "tsd": "tsc && tsd" }, "repository": { "type": "git", "url": "https://codeberg.org/calckey/calckey.git" }, "devDependencies": { - "@microsoft/api-extractor": "^7.36.0", - "@microsoft/api-documenter": "^7.22.21", "@swc/cli": "^0.1.62", "@swc/core": "^1.3.62", "@types/node": "20.3.1", diff --git a/fe_calckey/frontend/calckey-js/src/entities.ts b/fe_calckey/frontend/calckey-js/src/entities.ts index 9585235..b0b1d9a 100644 --- a/fe_calckey/frontend/calckey-js/src/entities.ts +++ b/fe_calckey/frontend/calckey-js/src/entities.ts @@ -97,7 +97,6 @@ export type MeDetailed = UserDetailed & { hasUnreadSpecifiedNotes: boolean; hideOnlineStatus: boolean; injectFeaturedNote: boolean; - integrations: Record; isDeleted: boolean; isExplorable: boolean; mutedWords: string[][]; @@ -290,9 +289,6 @@ export type LiteInstanceMetadata = { swPublickey: string | null; maxNoteTextLength: number; enableEmail: boolean; - enableTwitterIntegration: boolean; - enableGithubIntegration: boolean; - enableDiscordIntegration: boolean; enableServiceWorker: boolean; emojis: CustomEmoji[]; ads: { diff --git a/fe_calckey/frontend/client/src/account.ts b/fe_calckey/frontend/client/src/account.ts index 6d85829..167e1e4 100644 --- a/fe_calckey/frontend/client/src/account.ts +++ b/fe_calckey/frontend/client/src/account.ts @@ -14,281 +14,291 @@ const accountData = localStorage.getItem("account"); // TODO: 外部からはreadonlyに export const $i = accountData - ? reactive(JSON.parse(accountData) as Account) - : null; + ? reactive(JSON.parse(accountData) as Account) + : null; export const iAmModerator = $i != null && ($i.isAdmin || $i.isModerator); export const iAmAdmin = $i?.isAdmin; export async function signout() { - waiting(); - localStorage.removeItem("account"); + waiting(); + localStorage.removeItem("account"); - await removeAccount($i.id); + await removeAccount($i.id); - const accounts = await getAccounts(); + const accounts = await getAccounts(); - //#region Remove service worker registration - try { - if (navigator.serviceWorker.controller) { - const registration = await navigator.serviceWorker.ready; - const push = await registration.pushManager.getSubscription(); - if (push) { - await fetch(`${apiUrl}/sw/unregister`, { - method: "POST", - body: JSON.stringify({ - i: $i.token, - endpoint: push.endpoint, - }), - }); - } - } + //#region Remove service worker registration + try { + if (navigator.serviceWorker.controller) { + const registration = await navigator.serviceWorker.ready; + const push = await registration.pushManager.getSubscription(); + if (push) { + await fetch(`${apiUrl}/sw/unregister`, { + method: "POST", + body: JSON.stringify({ + i: $i.token, + endpoint: push.endpoint, + }), + }); + } + } - if (accounts.length === 0) { - await navigator.serviceWorker.getRegistrations().then((registrations) => { - return Promise.all( - registrations.map((registration) => registration.unregister()), - ); - }); - } - } catch (err) {} - //#endregion + if (accounts.length === 0) { + await navigator.serviceWorker + .getRegistrations() + .then((registrations) => { + return Promise.all( + registrations.map((registration) => + registration.unregister() + ) + ); + }); + } + } catch (err) {} + //#endregion - document.cookie = "igi=; path=/"; + document.cookie = "igi=; path=/"; - if (accounts.length > 0) login(accounts[0].token); - else unisonReload("/"); + if (accounts.length > 0) login(accounts[0].token); + else unisonReload("/"); } export async function getAccounts(): Promise< - { id: Account["id"]; token: Account["token"] }[] + { id: Account["id"]; token: Account["token"] }[] > { - return (await get("accounts")) || []; + return (await get("accounts")) || []; } export async function addAccount(id: Account["id"], token: Account["token"]) { - const accounts = await getAccounts(); - if (!accounts.some((x) => x.id === id)) { - await set("accounts", accounts.concat([{ id, token }])); - } + const accounts = await getAccounts(); + if (!accounts.some((x) => x.id === id)) { + await set("accounts", accounts.concat([{ id, token }])); + } } export async function removeAccount(id: Account["id"]) { - const accounts = await getAccounts(); - accounts.splice( - accounts.findIndex((x) => x.id === id), - 1, - ); + const accounts = await getAccounts(); + accounts.splice( + accounts.findIndex((x) => x.id === id), + 1 + ); - if (accounts.length > 0) await set("accounts", accounts); - else await del("accounts"); + if (accounts.length > 0) await set("accounts", accounts); + else await del("accounts"); } function fetchAccount(token: string): Promise { - return new Promise((done, fail) => { - // Fetch user - fetch(`${apiUrl}/i`, { - method: "POST", - body: JSON.stringify({ - i: token, - }), - }) - .then((res) => res.json()) - .then((res) => { - if (res.error) { - if (res.error.id === "a8c724b3-6e9c-4b46-b1a8-bc3ed6258370") { - showSuspendedDialog().then(() => { - signout(); - }); - } else { - alert({ - type: "error", - title: i18n.ts.failedToFetchAccountInformation, - text: JSON.stringify(res.error), - }); - } - } else { - res.token = token; - done(res); - } - }) - .catch(fail); - }); + return new Promise((done, fail) => { + // Fetch user + fetch(`${apiUrl}/i`, { + method: "POST", + body: JSON.stringify({ + i: token, + }), + }) + .then((res) => res.json()) + .then((res) => { + if (res.error) { + if ( + res.error.id === "a8c724b3-6e9c-4b46-b1a8-bc3ed6258370" + ) { + showSuspendedDialog().then(() => { + signout(); + }); + } else { + alert({ + type: "error", + title: i18n.ts.failedToFetchAccountInformation, + text: JSON.stringify(res.error), + }); + } + } else { + res.token = token; + done(res); + } + }) + .catch(fail); + }); } export function updateAccount(accountData) { - for (const [key, value] of Object.entries(accountData)) { - $i[key] = value; - } - localStorage.setItem("account", JSON.stringify($i)); + for (const [key, value] of Object.entries(accountData)) { + $i[key] = value; + } + localStorage.setItem("account", JSON.stringify($i)); } export function refreshAccount() { - return fetchAccount($i.token).then(updateAccount); + return fetchAccount($i.token).then(updateAccount); } export async function login(token: Account["token"], redirect?: string) { - waiting(); - if (_DEV_) console.log("logging as token ", token); - const me = await fetchAccount(token); - localStorage.setItem("account", JSON.stringify(me)); - document.cookie = `token=${token}; path=/; max-age=31536000`; // bull dashboardの認証とかで使う - await addAccount(me.id, token); + waiting(); + if (_DEV_) console.log("logging as token ", token); + const me = await fetchAccount(token); + localStorage.setItem("account", JSON.stringify(me)); + document.cookie = `token=${token}; path=/; max-age=31536000`; // bull dashboardの認証とかで使う + await addAccount(me.id, token); - if (redirect) { - // 他のタブは再読み込みするだけ - reloadChannel.postMessage(null); - // このページはredirectで指定された先に移動 - location.href = redirect; - return; - } + if (redirect) { + // 他のタブは再読み込みするだけ + reloadChannel.postMessage(null); + // このページはredirectで指定された先に移動 + location.href = redirect; + return; + } - unisonReload(); + unisonReload(); } export async function openAccountMenu( - opts: { - includeCurrentAccount?: boolean; - withExtraOperation: boolean; - active?: misskey.entities.UserDetailed["id"]; - onChoose?: (account: misskey.entities.UserDetailed) => void; - }, - ev: MouseEvent, + opts: { + includeCurrentAccount?: boolean; + withExtraOperation: boolean; + active?: misskey.entities.UserDetailed["id"]; + onChoose?: (account: misskey.entities.UserDetailed) => void; + }, + ev: MouseEvent ) { - function showSigninDialog() { - popup( - defineAsyncComponent(() => import("@/components/MkSigninDialog.vue")), - {}, - { - done: (res) => { - addAccount(res.id, res.i); - success(); - }, - }, - "closed", - ); - } + function showSigninDialog() { + popup( + defineAsyncComponent( + () => import("@/components/MkSigninDialog.vue") + ), + {}, + { + done: (res) => { + addAccount(res.id, res.i); + success(); + }, + }, + "closed" + ); + } - function createAccount() { - popup( - defineAsyncComponent(() => import("@/components/MkSignupDialog.vue")), - {}, - { - done: (res) => { - addAccount(res.id, res.i); - switchAccountWithToken(res.i); - }, - }, - "closed", - ); - } + function createAccount() { + popup( + defineAsyncComponent( + () => import("@/components/MkSignupDialog.vue") + ), + {}, + { + done: (res) => { + addAccount(res.id, res.i); + switchAccountWithToken(res.i); + }, + }, + "closed" + ); + } - async function switchAccount(account: misskey.entities.UserDetailed) { - const storedAccounts = await getAccounts(); - const token = storedAccounts.find((x) => x.id === account.id).token; - switchAccountWithToken(token); - } + async function switchAccount(account: misskey.entities.UserDetailed) { + const storedAccounts = await getAccounts(); + const token = storedAccounts.find((x) => x.id === account.id).token; + switchAccountWithToken(token); + } - function switchAccountWithToken(token: string) { - login(token); - } + function switchAccountWithToken(token: string) { + login(token); + } - const storedAccounts = await getAccounts().then((accounts) => - accounts.filter((x) => x.id !== $i.id), - ); - const accountsPromise = api("users/show", { - userIds: storedAccounts.map((x) => x.id), - }); + const storedAccounts = await getAccounts().then((accounts) => + accounts.filter((x) => x.id !== $i.id) + ); + const accountsPromise = api("users/show", { + userIds: storedAccounts.map((x) => x.id), + }); - function createItem(account: misskey.entities.UserDetailed) { - return { - type: "user", - user: account, - active: opts.active != null ? opts.active === account.id : false, - action: () => { - if (opts.onChoose) { - opts.onChoose(account); - } else { - switchAccount(account); - } - }, - }; - } + function createItem(account: misskey.entities.UserDetailed) { + return { + type: "user", + user: account, + active: opts.active != null ? opts.active === account.id : false, + action: () => { + if (opts.onChoose) { + opts.onChoose(account); + } else { + switchAccount(account); + } + }, + }; + } - const accountItemPromises = storedAccounts.map( - (a) => - new Promise((res) => { - accountsPromise.then((accounts) => { - const account = accounts.find((x) => x.id === a.id); - if (account == null) return res(null); - res(createItem(account)); - }); - }), - ); + const accountItemPromises = storedAccounts.map( + (a) => + new Promise((res) => { + accountsPromise.then((accounts) => { + const account = accounts.find((x) => x.id === a.id); + if (account == null) return res(null); + res(createItem(account)); + }); + }) + ); - if (opts.withExtraOperation) { - popupMenu( - [ - ...[ - { - type: "link", - text: i18n.ts.profile, - to: `/@${$i.username}`, - avatar: $i, - }, - null, - ...(opts.includeCurrentAccount ? [createItem($i)] : []), - ...accountItemPromises, - { - type: "parent", - icon: "ph-plus ph-bold ph-lg", - text: i18n.ts.addAccount, - children: [ - { - text: i18n.ts.existingAccount, - action: () => { - showSigninDialog(); - }, - }, - { - text: i18n.ts.createAccount, - action: () => { - createAccount(); - }, - }, - ], - }, - { - type: "link", - icon: "ph-users ph-bold ph-lg", - text: i18n.ts.manageAccounts, - to: "/settings/accounts", - }, - { - type: "button", - icon: "ph-sign-out ph-bold ph-lg", - text: i18n.ts.logout, - action: () => { - signout(); - }, - }, - ], - ], - ev.currentTarget ?? ev.target, - { - align: "left", - }, - ); - } else { - popupMenu( - [ - ...(opts.includeCurrentAccount ? [createItem($i)] : []), - ...accountItemPromises, - ], - ev.currentTarget ?? ev.target, - { - align: "left", - }, - ); - } + if (opts.withExtraOperation) { + popupMenu( + [ + ...[ + { + type: "link", + text: i18n.ts.profile, + to: `/@${$i.username}`, + avatar: $i, + }, + null, + ...(opts.includeCurrentAccount ? [createItem($i)] : []), + ...accountItemPromises, + { + type: "parent", + icon: "ph-plus ph-bold ph-lg", + text: i18n.ts.addAccount, + children: [ + { + text: i18n.ts.existingAccount, + action: () => { + showSigninDialog(); + }, + }, + { + text: i18n.ts.createAccount, + action: () => { + createAccount(); + }, + }, + ], + }, + { + type: "link", + icon: "ph-users ph-bold ph-lg", + text: i18n.ts.manageAccounts, + to: "/settings/accounts", + }, + { + type: "button", + icon: "ph-sign-out ph-bold ph-lg", + text: i18n.ts.logout, + action: () => { + signout(); + }, + }, + ], + ], + ev.currentTarget ?? ev.target, + { + align: "left", + } + ); + } else { + popupMenu( + [ + ...(opts.includeCurrentAccount ? [createItem($i)] : []), + ...accountItemPromises, + ], + ev.currentTarget ?? ev.target, + { + align: "left", + } + ); + } } diff --git a/fe_calckey/frontend/client/src/components/MkAbuseReport.vue b/fe_calckey/frontend/client/src/components/MkAbuseReport.vue index ccb85d7..3a08429 100644 --- a/fe_calckey/frontend/client/src/components/MkAbuseReport.vue +++ b/fe_calckey/frontend/client/src/components/MkAbuseReport.vue @@ -1,67 +1,67 @@ diff --git a/fe_calckey/frontend/client/src/components/MkAbuseReportWindow.vue b/fe_calckey/frontend/client/src/components/MkAbuseReportWindow.vue index 19b8ba5..f1b42c8 100644 --- a/fe_calckey/frontend/client/src/components/MkAbuseReportWindow.vue +++ b/fe_calckey/frontend/client/src/components/MkAbuseReportWindow.vue @@ -1,42 +1,42 @@ diff --git a/fe_calckey/frontend/client/src/components/MkAnalogClock.vue b/fe_calckey/frontend/client/src/components/MkAnalogClock.vue index 43d81f2..e5cdf2e 100644 --- a/fe_calckey/frontend/client/src/components/MkAnalogClock.vue +++ b/fe_calckey/frontend/client/src/components/MkAnalogClock.vue @@ -1,62 +1,62 @@ diff --git a/fe_calckey/frontend/client/src/components/MkAutocomplete.vue b/fe_calckey/frontend/client/src/components/MkAutocomplete.vue index 37207a1..694b0a8 100644 --- a/fe_calckey/frontend/client/src/components/MkAutocomplete.vue +++ b/fe_calckey/frontend/client/src/components/MkAutocomplete.vue @@ -1,96 +1,96 @@ diff --git a/fe_calckey/frontend/client/src/components/MkAvatars.vue b/fe_calckey/frontend/client/src/components/MkAvatars.vue index d92eee2..e2df194 100644 --- a/fe_calckey/frontend/client/src/components/MkAvatars.vue +++ b/fe_calckey/frontend/client/src/components/MkAvatars.vue @@ -1,9 +1,9 @@ diff --git a/fe_calckey/frontend/client/src/components/MkButton.vue b/fe_calckey/frontend/client/src/components/MkButton.vue index aa0adb5..e5734e1 100644 --- a/fe_calckey/frontend/client/src/components/MkButton.vue +++ b/fe_calckey/frontend/client/src/components/MkButton.vue @@ -1,254 +1,254 @@ diff --git a/fe_calckey/frontend/client/src/components/MkCaptcha.vue b/fe_calckey/frontend/client/src/components/MkCaptcha.vue index 554d4ac..f185fe2 100644 --- a/fe_calckey/frontend/client/src/components/MkCaptcha.vue +++ b/fe_calckey/frontend/client/src/components/MkCaptcha.vue @@ -1,8 +1,8 @@ diff --git a/fe_calckey/frontend/client/src/components/MkChart.vue b/fe_calckey/frontend/client/src/components/MkChart.vue index 310d980..a4d4cdc 100644 --- a/fe_calckey/frontend/client/src/components/MkChart.vue +++ b/fe_calckey/frontend/client/src/components/MkChart.vue @@ -1,30 +1,30 @@ diff --git a/fe_calckey/frontend/client/src/components/MkChartTooltip.vue b/fe_calckey/frontend/client/src/components/MkChartTooltip.vue index 659dc6d..86e6b9b 100644 --- a/fe_calckey/frontend/client/src/components/MkChartTooltip.vue +++ b/fe_calckey/frontend/client/src/components/MkChartTooltip.vue @@ -1,30 +1,30 @@ diff --git a/fe_calckey/frontend/client/src/components/MkCheatSheetDialog.vue b/fe_calckey/frontend/client/src/components/MkCheatSheetDialog.vue index 3b723cd..251b071 100644 --- a/fe_calckey/frontend/client/src/components/MkCheatSheetDialog.vue +++ b/fe_calckey/frontend/client/src/components/MkCheatSheetDialog.vue @@ -1,13 +1,13 @@ diff --git a/fe_calckey/frontend/client/src/components/MkCode.core.vue b/fe_calckey/frontend/client/src/components/MkCode.core.vue index c397a95..1904406 100644 --- a/fe_calckey/frontend/client/src/components/MkCode.core.vue +++ b/fe_calckey/frontend/client/src/components/MkCode.core.vue @@ -1,9 +1,9 @@ diff --git a/fe_calckey/frontend/client/src/components/MkCode.vue b/fe_calckey/frontend/client/src/components/MkCode.vue index f012b53..f8de2da 100644 --- a/fe_calckey/frontend/client/src/components/MkCode.vue +++ b/fe_calckey/frontend/client/src/components/MkCode.vue @@ -1,17 +1,17 @@ diff --git a/fe_calckey/frontend/client/src/components/MkContainer.vue b/fe_calckey/frontend/client/src/components/MkContainer.vue index 62c198c..427d6a8 100644 --- a/fe_calckey/frontend/client/src/components/MkContainer.vue +++ b/fe_calckey/frontend/client/src/components/MkContainer.vue @@ -1,62 +1,62 @@ diff --git a/fe_calckey/frontend/client/src/components/MkContextMenu.vue b/fe_calckey/frontend/client/src/components/MkContextMenu.vue index 3e94dd5..6a6f311 100644 --- a/fe_calckey/frontend/client/src/components/MkContextMenu.vue +++ b/fe_calckey/frontend/client/src/components/MkContextMenu.vue @@ -1,14 +1,14 @@ diff --git a/fe_calckey/frontend/client/src/components/MkCropperDialog.vue b/fe_calckey/frontend/client/src/components/MkCropperDialog.vue index cce9485..17f9db4 100644 --- a/fe_calckey/frontend/client/src/components/MkCropperDialog.vue +++ b/fe_calckey/frontend/client/src/components/MkCropperDialog.vue @@ -1,36 +1,36 @@ diff --git a/fe_calckey/frontend/client/src/components/MkCwButton.vue b/fe_calckey/frontend/client/src/components/MkCwButton.vue index f7fcb1d..a74edc7 100644 --- a/fe_calckey/frontend/client/src/components/MkCwButton.vue +++ b/fe_calckey/frontend/client/src/components/MkCwButton.vue @@ -1,15 +1,15 @@ diff --git a/fe_calckey/frontend/client/src/components/MkDateSeparatedList.vue b/fe_calckey/frontend/client/src/components/MkDateSeparatedList.vue index 7ecc918..2bb9715 100644 --- a/fe_calckey/frontend/client/src/components/MkDateSeparatedList.vue +++ b/fe_calckey/frontend/client/src/components/MkDateSeparatedList.vue @@ -5,210 +5,210 @@ import { i18n } from "@/i18n"; import { defaultStore } from "@/store"; export default defineComponent({ - props: { - items: { - type: Array as PropType< - { id: string; createdAt: string; _shouldInsertAd_: boolean }[] - >, - required: true, - }, - direction: { - type: String, - required: false, - default: "down", - }, - reversed: { - type: Boolean, - required: false, - default: false, - }, - noGap: { - type: Boolean, - required: false, - default: false, - }, - ad: { - type: Boolean, - required: false, - default: false, - }, - }, + props: { + items: { + type: Array as PropType< + { id: string; createdAt: string; _shouldInsertAd_: boolean }[] + >, + required: true, + }, + direction: { + type: String, + required: false, + default: "down", + }, + reversed: { + type: Boolean, + required: false, + default: false, + }, + noGap: { + type: Boolean, + required: false, + default: false, + }, + ad: { + type: Boolean, + required: false, + default: false, + }, + }, - setup(props, { slots, expose }) { - function getDateText(time: string) { - const date = new Date(time).getDate(); - const month = new Date(time).getMonth() + 1; - return i18n.t("monthAndDay", { - month: month.toString(), - day: date.toString(), - }); - } + setup(props, { slots, expose }) { + function getDateText(time: string) { + const date = new Date(time).getDate(); + const month = new Date(time).getMonth() + 1; + return i18n.t("monthAndDay", { + month: month.toString(), + day: date.toString(), + }); + } - if (props.items.length === 0) return; + if (props.items.length === 0) return; - const renderChildren = () => - props.items.map((item, i) => { - if (!slots || !slots.default) return; + const renderChildren = () => + props.items.map((item, i) => { + if (!slots || !slots.default) return; - const el = slots.default({ - item: item, - })[0]; - if (el.key == null && item.id) el.key = item.id; + const el = slots.default({ + item: item, + })[0]; + if (el.key == null && item.id) el.key = item.id; - if ( - i !== props.items.length - 1 && - new Date(item.createdAt).getDate() !== - new Date(props.items[i + 1].createdAt).getDate() - ) { - const separator = h( - "div", - { - class: "separator", - key: item.id + ":separator", - }, - h( - "p", - { - class: "date", - }, - [ - h("span", [ - h("i", { - class: "ph-caret-up ph-bold ph-lg icon", - }), - getDateText(item.createdAt), - ]), - h("span", [ - getDateText(props.items[i + 1].createdAt), - h("i", { - class: "ph-caret-down ph-bold ph-lg icon", - }), - ]), - ] - ) - ); + if ( + i !== props.items.length - 1 && + new Date(item.createdAt).getDate() !== + new Date(props.items[i + 1].createdAt).getDate() + ) { + const separator = h( + "div", + { + class: "separator", + key: item.id + ":separator", + }, + h( + "p", + { + class: "date", + }, + [ + h("span", [ + h("i", { + class: "ph-caret-up ph-bold ph-lg icon", + }), + getDateText(item.createdAt), + ]), + h("span", [ + getDateText(props.items[i + 1].createdAt), + h("i", { + class: "ph-caret-down ph-bold ph-lg icon", + }), + ]), + ] + ) + ); - return [el, separator]; - } else { - if (props.ad && item._shouldInsertAd_) { - return [ - h(MkAd, { - class: "a", // advertiseの意(ブロッカー対策) - key: item.id + ":ad", - prefer: ["inline", "inline-big"], - }), - el, - ]; - } else { - return el; - } - } - }); + return [el, separator]; + } else { + if (props.ad && item._shouldInsertAd_) { + return [ + h(MkAd, { + class: "a", // advertiseの意(ブロッカー対策) + key: item.id + ":ad", + prefer: ["inline", "inline-big"], + }), + el, + ]; + } else { + return el; + } + } + }); - return () => - h( - defaultStore.state.animation ? TransitionGroup : "div", - defaultStore.state.animation - ? { - class: "sqadhkmv" + (props.noGap ? " noGap" : ""), - name: "list", - tag: "div", - "data-direction": props.direction, - "data-reversed": props.reversed ? "true" : "false", - } - : { - class: "sqadhkmv" + (props.noGap ? " noGap" : ""), - }, - { default: renderChildren } - ); - }, + return () => + h( + defaultStore.state.animation ? TransitionGroup : "div", + defaultStore.state.animation + ? { + class: "sqadhkmv" + (props.noGap ? " noGap" : ""), + name: "list", + tag: "div", + "data-direction": props.direction, + "data-reversed": props.reversed ? "true" : "false", + } + : { + class: "sqadhkmv" + (props.noGap ? " noGap" : ""), + }, + { default: renderChildren } + ); + }, }); diff --git a/fe_calckey/frontend/client/src/components/MkDialog.vue b/fe_calckey/frontend/client/src/components/MkDialog.vue index f870005..eedbc4a 100644 --- a/fe_calckey/frontend/client/src/components/MkDialog.vue +++ b/fe_calckey/frontend/client/src/components/MkDialog.vue @@ -1,191 +1,191 @@ diff --git a/fe_calckey/frontend/client/src/components/MkDigitalClock.vue b/fe_calckey/frontend/client/src/components/MkDigitalClock.vue index c4edecb..4acb174 100644 --- a/fe_calckey/frontend/client/src/components/MkDigitalClock.vue +++ b/fe_calckey/frontend/client/src/components/MkDigitalClock.vue @@ -1,29 +1,29 @@ diff --git a/fe_calckey/frontend/client/src/components/MkDrive.file.vue b/fe_calckey/frontend/client/src/components/MkDrive.file.vue index ab3953f..7bc1034 100644 --- a/fe_calckey/frontend/client/src/components/MkDrive.file.vue +++ b/fe_calckey/frontend/client/src/components/MkDrive.file.vue @@ -1,40 +1,40 @@ diff --git a/fe_calckey/frontend/client/src/components/MkDrive.folder.vue b/fe_calckey/frontend/client/src/components/MkDrive.folder.vue index aff6219..b834f78 100644 --- a/fe_calckey/frontend/client/src/components/MkDrive.folder.vue +++ b/fe_calckey/frontend/client/src/components/MkDrive.folder.vue @@ -1,39 +1,39 @@ diff --git a/fe_calckey/frontend/client/src/components/MkDrive.navFolder.vue b/fe_calckey/frontend/client/src/components/MkDrive.navFolder.vue index aa0bea1..bb00c14 100644 --- a/fe_calckey/frontend/client/src/components/MkDrive.navFolder.vue +++ b/fe_calckey/frontend/client/src/components/MkDrive.navFolder.vue @@ -1,16 +1,16 @@ diff --git a/fe_calckey/frontend/client/src/components/MkDrive.vue b/fe_calckey/frontend/client/src/components/MkDrive.vue index d52e796..e62be05 100644 --- a/fe_calckey/frontend/client/src/components/MkDrive.vue +++ b/fe_calckey/frontend/client/src/components/MkDrive.vue @@ -1,144 +1,144 @@ diff --git a/fe_calckey/frontend/client/src/components/MkDriveFileThumbnail.vue b/fe_calckey/frontend/client/src/components/MkDriveFileThumbnail.vue index 48b5428..96ca279 100644 --- a/fe_calckey/frontend/client/src/components/MkDriveFileThumbnail.vue +++ b/fe_calckey/frontend/client/src/components/MkDriveFileThumbnail.vue @@ -1,42 +1,42 @@ diff --git a/fe_calckey/frontend/client/src/components/MkDriveSelectDialog.vue b/fe_calckey/frontend/client/src/components/MkDriveSelectDialog.vue index 6b419e2..c7b3d64 100644 --- a/fe_calckey/frontend/client/src/components/MkDriveSelectDialog.vue +++ b/fe_calckey/frontend/client/src/components/MkDriveSelectDialog.vue @@ -1,38 +1,38 @@ diff --git a/fe_calckey/frontend/client/src/components/MkDriveWindow.vue b/fe_calckey/frontend/client/src/components/MkDriveWindow.vue index 9b94e67..b86015b 100644 --- a/fe_calckey/frontend/client/src/components/MkDriveWindow.vue +++ b/fe_calckey/frontend/client/src/components/MkDriveWindow.vue @@ -1,16 +1,16 @@ diff --git a/fe_calckey/frontend/client/src/components/MkEmojiPicker.section.vue b/fe_calckey/frontend/client/src/components/MkEmojiPicker.section.vue index ffe891a..30cb6d7 100644 --- a/fe_calckey/frontend/client/src/components/MkEmojiPicker.section.vue +++ b/fe_calckey/frontend/client/src/components/MkEmojiPicker.section.vue @@ -1,43 +1,43 @@ diff --git a/fe_calckey/frontend/client/src/components/MkEmojiPicker.vue b/fe_calckey/frontend/client/src/components/MkEmojiPicker.vue index 260898e..ae172d5 100644 --- a/fe_calckey/frontend/client/src/components/MkEmojiPicker.vue +++ b/fe_calckey/frontend/client/src/components/MkEmojiPicker.vue @@ -1,164 +1,164 @@ diff --git a/fe_calckey/frontend/client/src/components/MkEmojiPickerDialog.vue b/fe_calckey/frontend/client/src/components/MkEmojiPickerDialog.vue index 4cff9f2..8bf0667 100644 --- a/fe_calckey/frontend/client/src/components/MkEmojiPickerDialog.vue +++ b/fe_calckey/frontend/client/src/components/MkEmojiPickerDialog.vue @@ -1,33 +1,33 @@ diff --git a/fe_calckey/frontend/client/src/components/MkFeaturedPhotos.vue b/fe_calckey/frontend/client/src/components/MkFeaturedPhotos.vue index 3faf38c..13dc3eb 100644 --- a/fe_calckey/frontend/client/src/components/MkFeaturedPhotos.vue +++ b/fe_calckey/frontend/client/src/components/MkFeaturedPhotos.vue @@ -1,9 +1,9 @@ diff --git a/fe_calckey/frontend/client/src/components/MkFileListForAdmin.vue b/fe_calckey/frontend/client/src/components/MkFileListForAdmin.vue index 1d485a1..97c5e2e 100644 --- a/fe_calckey/frontend/client/src/components/MkFileListForAdmin.vue +++ b/fe_calckey/frontend/client/src/components/MkFileListForAdmin.vue @@ -1,54 +1,54 @@ diff --git a/fe_calckey/frontend/client/src/components/MkFileTypeIcon.vue b/fe_calckey/frontend/client/src/components/MkFileTypeIcon.vue index 388b6d7..b899314 100644 --- a/fe_calckey/frontend/client/src/components/MkFileTypeIcon.vue +++ b/fe_calckey/frontend/client/src/components/MkFileTypeIcon.vue @@ -1,16 +1,16 @@ diff --git a/fe_calckey/frontend/client/src/components/MkFollowButton.vue b/fe_calckey/frontend/client/src/components/MkFollowButton.vue index a1c2317..fd123cf 100644 --- a/fe_calckey/frontend/client/src/components/MkFollowButton.vue +++ b/fe_calckey/frontend/client/src/components/MkFollowButton.vue @@ -1,63 +1,63 @@ diff --git a/fe_calckey/frontend/client/src/components/MkForgotPassword.vue b/fe_calckey/frontend/client/src/components/MkForgotPassword.vue index 07f0866..b718023 100644 --- a/fe_calckey/frontend/client/src/components/MkForgotPassword.vue +++ b/fe_calckey/frontend/client/src/components/MkForgotPassword.vue @@ -1,64 +1,64 @@ diff --git a/fe_calckey/frontend/client/src/components/MkFormDialog.vue b/fe_calckey/frontend/client/src/components/MkFormDialog.vue index 9b1cab7..5aa270e 100644 --- a/fe_calckey/frontend/client/src/components/MkFormDialog.vue +++ b/fe_calckey/frontend/client/src/components/MkFormDialog.vue @@ -1,157 +1,157 @@ diff --git a/fe_calckey/frontend/client/src/components/MkFormula.vue b/fe_calckey/frontend/client/src/components/MkFormula.vue index 2dacad1..37e89d8 100644 --- a/fe_calckey/frontend/client/src/components/MkFormula.vue +++ b/fe_calckey/frontend/client/src/components/MkFormula.vue @@ -1,5 +1,5 @@ diff --git a/fe_calckey/frontend/client/src/components/MkFormulaCore.vue b/fe_calckey/frontend/client/src/components/MkFormulaCore.vue index 2db4c7d..2aa1976 100644 --- a/fe_calckey/frontend/client/src/components/MkFormulaCore.vue +++ b/fe_calckey/frontend/client/src/components/MkFormulaCore.vue @@ -1,6 +1,6 @@ diff --git a/fe_calckey/frontend/client/src/components/MkGalleryPostPreview.vue b/fe_calckey/frontend/client/src/components/MkGalleryPostPreview.vue index 2ef339a..a62ee64 100644 --- a/fe_calckey/frontend/client/src/components/MkGalleryPostPreview.vue +++ b/fe_calckey/frontend/client/src/components/MkGalleryPostPreview.vue @@ -1,21 +1,21 @@ diff --git a/fe_calckey/frontend/client/src/components/MkHeatmap.vue b/fe_calckey/frontend/client/src/components/MkHeatmap.vue index 2d2aef2..0e86bda 100644 --- a/fe_calckey/frontend/client/src/components/MkHeatmap.vue +++ b/fe_calckey/frontend/client/src/components/MkHeatmap.vue @@ -1,20 +1,20 @@ diff --git a/fe_calckey/frontend/client/src/components/MkImageViewer.vue b/fe_calckey/frontend/client/src/components/MkImageViewer.vue index 51173d9..ef6eb7d 100644 --- a/fe_calckey/frontend/client/src/components/MkImageViewer.vue +++ b/fe_calckey/frontend/client/src/components/MkImageViewer.vue @@ -1,28 +1,28 @@ diff --git a/fe_calckey/frontend/client/src/components/MkInfo.vue b/fe_calckey/frontend/client/src/components/MkInfo.vue index ba3a606..c4eba52 100644 --- a/fe_calckey/frontend/client/src/components/MkInfo.vue +++ b/fe_calckey/frontend/client/src/components/MkInfo.vue @@ -1,21 +1,21 @@ diff --git a/fe_calckey/frontend/client/src/components/MkInstanceCardMini.vue b/fe_calckey/frontend/client/src/components/MkInstanceCardMini.vue index 6bc46c0..04fc1b3 100644 --- a/fe_calckey/frontend/client/src/components/MkInstanceCardMini.vue +++ b/fe_calckey/frontend/client/src/components/MkInstanceCardMini.vue @@ -1,26 +1,26 @@ diff --git a/fe_calckey/frontend/client/src/components/MkInstanceSelectDialog.vue b/fe_calckey/frontend/client/src/components/MkInstanceSelectDialog.vue index c79879d..9ef4985 100644 --- a/fe_calckey/frontend/client/src/components/MkInstanceSelectDialog.vue +++ b/fe_calckey/frontend/client/src/components/MkInstanceSelectDialog.vue @@ -1,58 +1,58 @@ diff --git a/fe_calckey/frontend/client/src/components/MkInstanceStats.vue b/fe_calckey/frontend/client/src/components/MkInstanceStats.vue index 70397a6..2782666 100644 --- a/fe_calckey/frontend/client/src/components/MkInstanceStats.vue +++ b/fe_calckey/frontend/client/src/components/MkInstanceStats.vue @@ -1,104 +1,104 @@ diff --git a/fe_calckey/frontend/client/src/components/MkInstanceTicker.vue b/fe_calckey/frontend/client/src/components/MkInstanceTicker.vue index 6deb428..0d7b633 100644 --- a/fe_calckey/frontend/client/src/components/MkInstanceTicker.vue +++ b/fe_calckey/frontend/client/src/components/MkInstanceTicker.vue @@ -1,13 +1,13 @@ diff --git a/fe_calckey/frontend/client/src/components/MkKeyValue.vue b/fe_calckey/frontend/client/src/components/MkKeyValue.vue index 3db05f0..0c8b1ef 100644 --- a/fe_calckey/frontend/client/src/components/MkKeyValue.vue +++ b/fe_calckey/frontend/client/src/components/MkKeyValue.vue @@ -1,21 +1,21 @@ diff --git a/fe_calckey/frontend/client/src/components/MkLaunchPad.vue b/fe_calckey/frontend/client/src/components/MkLaunchPad.vue index b1f42ec..e54ac4f 100644 --- a/fe_calckey/frontend/client/src/components/MkLaunchPad.vue +++ b/fe_calckey/frontend/client/src/components/MkLaunchPad.vue @@ -1,54 +1,54 @@ diff --git a/fe_calckey/frontend/client/src/components/MkLink.vue b/fe_calckey/frontend/client/src/components/MkLink.vue index e26e1ed..1f919f4 100644 --- a/fe_calckey/frontend/client/src/components/MkLink.vue +++ b/fe_calckey/frontend/client/src/components/MkLink.vue @@ -1,20 +1,20 @@ diff --git a/fe_calckey/frontend/client/src/components/MkMarquee.vue b/fe_calckey/frontend/client/src/components/MkMarquee.vue index d99ad95..01da3ab 100644 --- a/fe_calckey/frontend/client/src/components/MkMarquee.vue +++ b/fe_calckey/frontend/client/src/components/MkMarquee.vue @@ -2,107 +2,107 @@ import { h, onMounted, onUnmounted, ref, watch } from "vue"; export default { - name: "MarqueeText", - props: { - duration: { - type: Number, - default: 15, - }, - repeat: { - type: Number, - default: 2, - }, - paused: { - type: Boolean, - default: false, - }, - reverse: { - type: Boolean, - default: false, - }, - }, - setup(props) { - const contentEl = ref(); + name: "MarqueeText", + props: { + duration: { + type: Number, + default: 15, + }, + repeat: { + type: Number, + default: 2, + }, + paused: { + type: Boolean, + default: false, + }, + reverse: { + type: Boolean, + default: false, + }, + }, + setup(props) { + const contentEl = ref(); - function calc() { - const eachLength = contentEl.value.offsetWidth / props.repeat; - const factor = 3000; - const duration = props.duration / ((1 / eachLength) * factor); + function calc() { + const eachLength = contentEl.value.offsetWidth / props.repeat; + const factor = 3000; + const duration = props.duration / ((1 / eachLength) * factor); - contentEl.value.style.animationDuration = `${duration}s`; - } + contentEl.value.style.animationDuration = `${duration}s`; + } - watch(() => props.duration, calc); + watch(() => props.duration, calc); - onMounted(() => { - calc(); - }); + onMounted(() => { + calc(); + }); - onUnmounted(() => {}); + onUnmounted(() => {}); - return { - contentEl, - }; - }, - render({ $slots, $style, $props: { duration, repeat, paused, reverse } }) { - return h("div", { class: [$style.wrap] }, [ - h( - "span", - { - ref: "contentEl", - class: [paused ? $style.paused : undefined, $style.content], - }, - Array(repeat).fill( - h( - "span", - { - class: $style.text, - style: { - animationDirection: reverse - ? "reverse" - : undefined, - }, - }, - $slots.default() - ) - ) - ), - ]); - }, + return { + contentEl, + }; + }, + render({ $slots, $style, $props: { duration, repeat, paused, reverse } }) { + return h("div", { class: [$style.wrap] }, [ + h( + "span", + { + ref: "contentEl", + class: [paused ? $style.paused : undefined, $style.content], + }, + Array(repeat).fill( + h( + "span", + { + class: $style.text, + style: { + animationDirection: reverse + ? "reverse" + : undefined, + }, + }, + $slots.default() + ) + ) + ), + ]); + }, }; diff --git a/fe_calckey/frontend/client/src/components/MkMediaBanner.vue b/fe_calckey/frontend/client/src/components/MkMediaBanner.vue index 5764558..a8420be 100644 --- a/fe_calckey/frontend/client/src/components/MkMediaBanner.vue +++ b/fe_calckey/frontend/client/src/components/MkMediaBanner.vue @@ -1,58 +1,58 @@ diff --git a/fe_calckey/frontend/client/src/components/MkMediaCaption.vue b/fe_calckey/frontend/client/src/components/MkMediaCaption.vue index 44f7b55..0e57cbe 100644 --- a/fe_calckey/frontend/client/src/components/MkMediaCaption.vue +++ b/fe_calckey/frontend/client/src/components/MkMediaCaption.vue @@ -1,68 +1,68 @@ diff --git a/fe_calckey/frontend/client/src/components/MkMediaImage.vue b/fe_calckey/frontend/client/src/components/MkMediaImage.vue index 9097a47..70b33dc 100644 --- a/fe_calckey/frontend/client/src/components/MkMediaImage.vue +++ b/fe_calckey/frontend/client/src/components/MkMediaImage.vue @@ -1,40 +1,40 @@ diff --git a/fe_calckey/frontend/client/src/components/MkMediaList.vue b/fe_calckey/frontend/client/src/components/MkMediaList.vue index c01ccd5..4f3a7d5 100644 --- a/fe_calckey/frontend/client/src/components/MkMediaList.vue +++ b/fe_calckey/frontend/client/src/components/MkMediaList.vue @@ -1,39 +1,39 @@ diff --git a/fe_calckey/frontend/client/src/components/MkMediaVideo.vue b/fe_calckey/frontend/client/src/components/MkMediaVideo.vue index 21f8ace..dbabd90 100644 --- a/fe_calckey/frontend/client/src/components/MkMediaVideo.vue +++ b/fe_calckey/frontend/client/src/components/MkMediaVideo.vue @@ -1,54 +1,54 @@ diff --git a/fe_calckey/frontend/client/src/components/MkMention.vue b/fe_calckey/frontend/client/src/components/MkMention.vue index 59e0fb9..1b3c9bc 100644 --- a/fe_calckey/frontend/client/src/components/MkMention.vue +++ b/fe_calckey/frontend/client/src/components/MkMention.vue @@ -1,36 +1,36 @@ diff --git a/fe_calckey/frontend/client/src/components/MkMenu.child.vue b/fe_calckey/frontend/client/src/components/MkMenu.child.vue index 83ae6b5..8953bfb 100644 --- a/fe_calckey/frontend/client/src/components/MkMenu.child.vue +++ b/fe_calckey/frontend/client/src/components/MkMenu.child.vue @@ -1,78 +1,78 @@ diff --git a/fe_calckey/frontend/client/src/components/MkMenu.vue b/fe_calckey/frontend/client/src/components/MkMenu.vue index 2d8fde6..f829fe8 100644 --- a/fe_calckey/frontend/client/src/components/MkMenu.vue +++ b/fe_calckey/frontend/client/src/components/MkMenu.vue @@ -1,199 +1,199 @@ diff --git a/fe_calckey/frontend/client/src/components/MkMiniChart.vue b/fe_calckey/frontend/client/src/components/MkMiniChart.vue index b7db265..f9c0ec8 100644 --- a/fe_calckey/frontend/client/src/components/MkMiniChart.vue +++ b/fe_calckey/frontend/client/src/components/MkMiniChart.vue @@ -1,27 +1,27 @@ diff --git a/fe_calckey/frontend/client/src/components/MkModal.vue b/fe_calckey/frontend/client/src/components/MkModal.vue index e814c91..628a2e0 100644 --- a/fe_calckey/frontend/client/src/components/MkModal.vue +++ b/fe_calckey/frontend/client/src/components/MkModal.vue @@ -1,79 +1,79 @@ diff --git a/fe_calckey/frontend/client/src/components/MkModalPageWindow.vue b/fe_calckey/frontend/client/src/components/MkModalPageWindow.vue index bf4d8d0..1c9a65f 100644 --- a/fe_calckey/frontend/client/src/components/MkModalPageWindow.vue +++ b/fe_calckey/frontend/client/src/components/MkModalPageWindow.vue @@ -1,50 +1,50 @@ diff --git a/fe_calckey/frontend/client/src/components/MkModalWindow.vue b/fe_calckey/frontend/client/src/components/MkModalWindow.vue index 740f84d..755ae43 100644 --- a/fe_calckey/frontend/client/src/components/MkModalWindow.vue +++ b/fe_calckey/frontend/client/src/components/MkModalWindow.vue @@ -1,64 +1,64 @@ diff --git a/fe_calckey/frontend/client/src/components/MkMoved.vue b/fe_calckey/frontend/client/src/components/MkMoved.vue index b2f8095..ad22cd7 100644 --- a/fe_calckey/frontend/client/src/components/MkMoved.vue +++ b/fe_calckey/frontend/client/src/components/MkMoved.vue @@ -1,12 +1,12 @@ diff --git a/fe_calckey/frontend/client/src/components/MkNote.vue b/fe_calckey/frontend/client/src/components/MkNote.vue index dfddae9..9cf100a 100644 --- a/fe_calckey/frontend/client/src/components/MkNote.vue +++ b/fe_calckey/frontend/client/src/components/MkNote.vue @@ -1,237 +1,237 @@ diff --git a/fe_calckey/frontend/client/src/components/MkNoteDetailed.vue b/fe_calckey/frontend/client/src/components/MkNoteDetailed.vue index 2058161..443ac7b 100644 --- a/fe_calckey/frontend/client/src/components/MkNoteDetailed.vue +++ b/fe_calckey/frontend/client/src/components/MkNoteDetailed.vue @@ -1,163 +1,163 @@ diff --git a/fe_calckey/frontend/client/src/components/MkNoteHeader.vue b/fe_calckey/frontend/client/src/components/MkNoteHeader.vue index b25ffa3..12bbef6 100644 --- a/fe_calckey/frontend/client/src/components/MkNoteHeader.vue +++ b/fe_calckey/frontend/client/src/components/MkNoteHeader.vue @@ -1,49 +1,49 @@ diff --git a/fe_calckey/frontend/client/src/components/MkNotePreview.vue b/fe_calckey/frontend/client/src/components/MkNotePreview.vue index 607df89..ee99308 100644 --- a/fe_calckey/frontend/client/src/components/MkNotePreview.vue +++ b/fe_calckey/frontend/client/src/components/MkNotePreview.vue @@ -1,22 +1,22 @@ diff --git a/fe_calckey/frontend/client/src/components/MkNoteSimple.vue b/fe_calckey/frontend/client/src/components/MkNoteSimple.vue index 49b5f93..74fafe5 100644 --- a/fe_calckey/frontend/client/src/components/MkNoteSimple.vue +++ b/fe_calckey/frontend/client/src/components/MkNoteSimple.vue @@ -1,13 +1,13 @@ diff --git a/fe_calckey/frontend/client/src/components/MkNoteSub.vue b/fe_calckey/frontend/client/src/components/MkNoteSub.vue index 12b8ac4..d540dc4 100644 --- a/fe_calckey/frontend/client/src/components/MkNoteSub.vue +++ b/fe_calckey/frontend/client/src/components/MkNoteSub.vue @@ -1,179 +1,179 @@ diff --git a/fe_calckey/frontend/client/src/components/MkNotes.vue b/fe_calckey/frontend/client/src/components/MkNotes.vue index bf3631c..9d2e271 100644 --- a/fe_calckey/frontend/client/src/components/MkNotes.vue +++ b/fe_calckey/frontend/client/src/components/MkNotes.vue @@ -1,37 +1,37 @@ diff --git a/fe_calckey/frontend/client/src/components/MkNotification.vue b/fe_calckey/frontend/client/src/components/MkNotification.vue index ac51008..5e212ca 100644 --- a/fe_calckey/frontend/client/src/components/MkNotification.vue +++ b/fe_calckey/frontend/client/src/components/MkNotification.vue @@ -1,275 +1,275 @@ diff --git a/fe_calckey/frontend/client/src/components/MkNotificationSettingWindow.vue b/fe_calckey/frontend/client/src/components/MkNotificationSettingWindow.vue index 00a61bb..7a2e0af 100644 --- a/fe_calckey/frontend/client/src/components/MkNotificationSettingWindow.vue +++ b/fe_calckey/frontend/client/src/components/MkNotificationSettingWindow.vue @@ -1,41 +1,41 @@ diff --git a/fe_calckey/frontend/client/src/components/MkNotificationToast.vue b/fe_calckey/frontend/client/src/components/MkNotificationToast.vue index ba95e11..8fbefbd 100644 --- a/fe_calckey/frontend/client/src/components/MkNotificationToast.vue +++ b/fe_calckey/frontend/client/src/components/MkNotificationToast.vue @@ -1,17 +1,17 @@ diff --git a/fe_calckey/frontend/client/src/components/MkNotifications.vue b/fe_calckey/frontend/client/src/components/MkNotifications.vue index 439a1d4..6177e15 100644 --- a/fe_calckey/frontend/client/src/components/MkNotifications.vue +++ b/fe_calckey/frontend/client/src/components/MkNotifications.vue @@ -1,58 +1,58 @@ diff --git a/fe_calckey/frontend/client/src/components/MkNumber.vue b/fe_calckey/frontend/client/src/components/MkNumber.vue index 5fa0f76..aeeac92 100644 --- a/fe_calckey/frontend/client/src/components/MkNumber.vue +++ b/fe_calckey/frontend/client/src/components/MkNumber.vue @@ -1,5 +1,5 @@ diff --git a/fe_calckey/frontend/client/src/components/MkNumberDiff.vue b/fe_calckey/frontend/client/src/components/MkNumberDiff.vue index 11b0ad3..b7439e4 100644 --- a/fe_calckey/frontend/client/src/components/MkNumberDiff.vue +++ b/fe_calckey/frontend/client/src/components/MkNumberDiff.vue @@ -1,8 +1,8 @@ diff --git a/fe_calckey/frontend/client/src/components/MkObjectView.value.vue b/fe_calckey/frontend/client/src/components/MkObjectView.value.vue index 8b02422..40754ad 100644 --- a/fe_calckey/frontend/client/src/components/MkObjectView.value.vue +++ b/fe_calckey/frontend/client/src/components/MkObjectView.value.vue @@ -1,58 +1,58 @@ diff --git a/fe_calckey/frontend/client/src/components/MkObjectView.vue b/fe_calckey/frontend/client/src/components/MkObjectView.vue index b3fce68..28f5efd 100644 --- a/fe_calckey/frontend/client/src/components/MkObjectView.vue +++ b/fe_calckey/frontend/client/src/components/MkObjectView.vue @@ -1,7 +1,7 @@ diff --git a/fe_calckey/frontend/client/src/components/MkPagePreview.vue b/fe_calckey/frontend/client/src/components/MkPagePreview.vue index 034c6fe..c08e460 100644 --- a/fe_calckey/frontend/client/src/components/MkPagePreview.vue +++ b/fe_calckey/frontend/client/src/components/MkPagePreview.vue @@ -1,36 +1,36 @@ diff --git a/fe_calckey/frontend/client/src/components/MkPageWindow.vue b/fe_calckey/frontend/client/src/components/MkPageWindow.vue index a5951fd..47265af 100644 --- a/fe_calckey/frontend/client/src/components/MkPageWindow.vue +++ b/fe_calckey/frontend/client/src/components/MkPageWindow.vue @@ -1,32 +1,32 @@ diff --git a/fe_calckey/frontend/client/src/components/MkPagination.vue b/fe_calckey/frontend/client/src/components/MkPagination.vue index 4caea73..e675958 100644 --- a/fe_calckey/frontend/client/src/components/MkPagination.vue +++ b/fe_calckey/frontend/client/src/components/MkPagination.vue @@ -1,128 +1,128 @@ diff --git a/fe_calckey/frontend/client/src/components/MkPoll.vue b/fe_calckey/frontend/client/src/components/MkPoll.vue index 1fdbc7a..3e789f8 100644 --- a/fe_calckey/frontend/client/src/components/MkPoll.vue +++ b/fe_calckey/frontend/client/src/components/MkPoll.vue @@ -1,54 +1,54 @@ diff --git a/fe_calckey/frontend/client/src/components/MkPollEditor.vue b/fe_calckey/frontend/client/src/components/MkPollEditor.vue index 95cc113..4783f9e 100644 --- a/fe_calckey/frontend/client/src/components/MkPollEditor.vue +++ b/fe_calckey/frontend/client/src/components/MkPollEditor.vue @@ -1,73 +1,73 @@ diff --git a/fe_calckey/frontend/client/src/components/MkPopupMenu.vue b/fe_calckey/frontend/client/src/components/MkPopupMenu.vue index 12a1822..934e53d 100644 --- a/fe_calckey/frontend/client/src/components/MkPopupMenu.vue +++ b/fe_calckey/frontend/client/src/components/MkPopupMenu.vue @@ -1,26 +1,26 @@ diff --git a/fe_calckey/frontend/client/src/components/MkPostFormAttaches.vue b/fe_calckey/frontend/client/src/components/MkPostFormAttaches.vue index 7cf397e..ea9d5bc 100644 --- a/fe_calckey/frontend/client/src/components/MkPostFormAttaches.vue +++ b/fe_calckey/frontend/client/src/components/MkPostFormAttaches.vue @@ -1,33 +1,33 @@ diff --git a/fe_calckey/frontend/client/src/components/MkPostFormDialog.vue b/fe_calckey/frontend/client/src/components/MkPostFormDialog.vue index 24b7bac..7ffa0bd 100644 --- a/fe_calckey/frontend/client/src/components/MkPostFormDialog.vue +++ b/fe_calckey/frontend/client/src/components/MkPostFormDialog.vue @@ -1,21 +1,21 @@ diff --git a/fe_calckey/frontend/client/src/components/MkPushNotificationAllowButton.vue b/fe_calckey/frontend/client/src/components/MkPushNotificationAllowButton.vue index 0b2c4f6..4004a59 100644 --- a/fe_calckey/frontend/client/src/components/MkPushNotificationAllowButton.vue +++ b/fe_calckey/frontend/client/src/components/MkPushNotificationAllowButton.vue @@ -1,55 +1,55 @@ diff --git a/fe_calckey/frontend/client/src/components/MkQuoteButton.vue b/fe_calckey/frontend/client/src/components/MkQuoteButton.vue index 4710d01..a2015bc 100644 --- a/fe_calckey/frontend/client/src/components/MkQuoteButton.vue +++ b/fe_calckey/frontend/client/src/components/MkQuoteButton.vue @@ -1,12 +1,12 @@ diff --git a/fe_calckey/frontend/client/src/components/MkReactedUsers.vue b/fe_calckey/frontend/client/src/components/MkReactedUsers.vue index 23d3aaa..2462dcc 100644 --- a/fe_calckey/frontend/client/src/components/MkReactedUsers.vue +++ b/fe_calckey/frontend/client/src/components/MkReactedUsers.vue @@ -1,37 +1,37 @@ diff --git a/fe_calckey/frontend/client/src/components/MkReactionIcon.vue b/fe_calckey/frontend/client/src/components/MkReactionIcon.vue index eb19a55..3440ab2 100644 --- a/fe_calckey/frontend/client/src/components/MkReactionIcon.vue +++ b/fe_calckey/frontend/client/src/components/MkReactionIcon.vue @@ -1,19 +1,19 @@ diff --git a/fe_calckey/frontend/client/src/components/MkReactionTooltip.vue b/fe_calckey/frontend/client/src/components/MkReactionTooltip.vue index e3db05c..4a95b5d 100644 --- a/fe_calckey/frontend/client/src/components/MkReactionTooltip.vue +++ b/fe_calckey/frontend/client/src/components/MkReactionTooltip.vue @@ -1,20 +1,20 @@ diff --git a/fe_calckey/frontend/client/src/components/MkReactionsViewer.details.vue b/fe_calckey/frontend/client/src/components/MkReactionsViewer.details.vue index 96dd051..b6aead9 100644 --- a/fe_calckey/frontend/client/src/components/MkReactionsViewer.details.vue +++ b/fe_calckey/frontend/client/src/components/MkReactionsViewer.details.vue @@ -1,31 +1,31 @@ diff --git a/fe_calckey/frontend/client/src/components/MkReactionsViewer.reaction.vue b/fe_calckey/frontend/client/src/components/MkReactionsViewer.reaction.vue index 461628a..3b80069 100644 --- a/fe_calckey/frontend/client/src/components/MkReactionsViewer.reaction.vue +++ b/fe_calckey/frontend/client/src/components/MkReactionsViewer.reaction.vue @@ -1,23 +1,23 @@ diff --git a/fe_calckey/frontend/client/src/components/MkReactionsViewer.vue b/fe_calckey/frontend/client/src/components/MkReactionsViewer.vue index fc108b4..be8a768 100644 --- a/fe_calckey/frontend/client/src/components/MkReactionsViewer.vue +++ b/fe_calckey/frontend/client/src/components/MkReactionsViewer.vue @@ -1,14 +1,14 @@ diff --git a/fe_calckey/frontend/client/src/components/MkRenoteButton.vue b/fe_calckey/frontend/client/src/components/MkRenoteButton.vue index 101c800..f0303d5 100644 --- a/fe_calckey/frontend/client/src/components/MkRenoteButton.vue +++ b/fe_calckey/frontend/client/src/components/MkRenoteButton.vue @@ -1,18 +1,18 @@ diff --git a/fe_calckey/frontend/client/src/components/MkRipple.vue b/fe_calckey/frontend/client/src/components/MkRipple.vue index d055caa..e6530fd 100644 --- a/fe_calckey/frontend/client/src/components/MkRipple.vue +++ b/fe_calckey/frontend/client/src/components/MkRipple.vue @@ -1,76 +1,76 @@ diff --git a/fe_calckey/frontend/client/src/components/MkSample.vue b/fe_calckey/frontend/client/src/components/MkSample.vue index cf0c321..dc6387c 100644 --- a/fe_calckey/frontend/client/src/components/MkSample.vue +++ b/fe_calckey/frontend/client/src/components/MkSample.vue @@ -1,30 +1,30 @@ diff --git a/fe_calckey/frontend/client/src/components/MkShowMoreButton.vue b/fe_calckey/frontend/client/src/components/MkShowMoreButton.vue index e2d9b7d..e6a2e33 100644 --- a/fe_calckey/frontend/client/src/components/MkShowMoreButton.vue +++ b/fe_calckey/frontend/client/src/components/MkShowMoreButton.vue @@ -1,77 +1,77 @@ diff --git a/fe_calckey/frontend/client/src/components/MkSignin.vue b/fe_calckey/frontend/client/src/components/MkSignin.vue index 27de73c..7270af9 100644 --- a/fe_calckey/frontend/client/src/components/MkSignin.vue +++ b/fe_calckey/frontend/client/src/components/MkSignin.vue @@ -1,160 +1,128 @@ diff --git a/fe_calckey/frontend/client/src/components/MkSigninDialog.vue b/fe_calckey/frontend/client/src/components/MkSigninDialog.vue index 7989255..361b2cb 100644 --- a/fe_calckey/frontend/client/src/components/MkSigninDialog.vue +++ b/fe_calckey/frontend/client/src/components/MkSigninDialog.vue @@ -1,14 +1,14 @@ diff --git a/fe_calckey/frontend/client/src/components/MkSignup.vue b/fe_calckey/frontend/client/src/components/MkSignup.vue index c93e581..29abb60 100644 --- a/fe_calckey/frontend/client/src/components/MkSignup.vue +++ b/fe_calckey/frontend/client/src/components/MkSignup.vue @@ -1,286 +1,286 @@ diff --git a/fe_calckey/frontend/client/src/components/MkSignupDialog.vue b/fe_calckey/frontend/client/src/components/MkSignupDialog.vue index 282b8f9..12ed89c 100644 --- a/fe_calckey/frontend/client/src/components/MkSignupDialog.vue +++ b/fe_calckey/frontend/client/src/components/MkSignupDialog.vue @@ -1,22 +1,22 @@ diff --git a/fe_calckey/frontend/client/src/components/MkSparkle.vue b/fe_calckey/frontend/client/src/components/MkSparkle.vue index a5a9053..4e0e13e 100644 --- a/fe_calckey/frontend/client/src/components/MkSparkle.vue +++ b/fe_calckey/frontend/client/src/components/MkSparkle.vue @@ -1,9 +1,9 @@ diff --git a/fe_calckey/frontend/client/src/components/MkStarButton.vue b/fe_calckey/frontend/client/src/components/MkStarButton.vue index ecfbf2e..b2e0de9 100644 --- a/fe_calckey/frontend/client/src/components/MkStarButton.vue +++ b/fe_calckey/frontend/client/src/components/MkStarButton.vue @@ -1,40 +1,40 @@ diff --git a/fe_calckey/frontend/client/src/components/MkStarButtonNoEmoji.vue b/fe_calckey/frontend/client/src/components/MkStarButtonNoEmoji.vue index e76bc09..f90b48c 100644 --- a/fe_calckey/frontend/client/src/components/MkStarButtonNoEmoji.vue +++ b/fe_calckey/frontend/client/src/components/MkStarButtonNoEmoji.vue @@ -1,43 +1,43 @@ diff --git a/fe_calckey/frontend/client/src/components/MkSubNoteContent.vue b/fe_calckey/frontend/client/src/components/MkSubNoteContent.vue index 586c367..646ec8f 100644 --- a/fe_calckey/frontend/client/src/components/MkSubNoteContent.vue +++ b/fe_calckey/frontend/client/src/components/MkSubNoteContent.vue @@ -1,178 +1,178 @@ diff --git a/fe_calckey/frontend/client/src/components/MkSuperMenu.vue b/fe_calckey/frontend/client/src/components/MkSuperMenu.vue index 14974bb..90b2390 100644 --- a/fe_calckey/frontend/client/src/components/MkSuperMenu.vue +++ b/fe_calckey/frontend/client/src/components/MkSuperMenu.vue @@ -1,178 +1,178 @@ diff --git a/fe_calckey/frontend/client/src/components/MkTab.vue b/fe_calckey/frontend/client/src/components/MkTab.vue index 7e7e12b..5191714 100644 --- a/fe_calckey/frontend/client/src/components/MkTab.vue +++ b/fe_calckey/frontend/client/src/components/MkTab.vue @@ -2,154 +2,154 @@ import { defineComponent, h, resolveDirective, withDirectives } from "vue"; export default defineComponent({ - props: { - modelValue: { - required: true, - }, - style: { - required: false, - }, - }, - render() { - const options = this.$slots.default(); + props: { + modelValue: { + required: true, + }, + style: { + required: false, + }, + }, + render() { + const options = this.$slots.default(); - return h( - "div", - { - class: [ - "pxhvhrfw", - { chips: this.style === "chips" }, - { underline: this.style === "underline" }, - ], - role: "tablist", - }, - options.map((option) => - withDirectives( - h( - "button", - { - class: "_button", - role: "tab", - key: option.key, - "aria-selected": - this.modelValue === option.props?.value - ? "true" - : "false", - onClick: () => { - this.$emit( - "update:modelValue", - option.props?.value - ); - }, - }, - option.children - ), - [[resolveDirective("click-anime")]] - ) - ) - ); - }, + return h( + "div", + { + class: [ + "pxhvhrfw", + { chips: this.style === "chips" }, + { underline: this.style === "underline" }, + ], + role: "tablist", + }, + options.map((option) => + withDirectives( + h( + "button", + { + class: "_button", + role: "tab", + key: option.key, + "aria-selected": + this.modelValue === option.props?.value + ? "true" + : "false", + onClick: () => { + this.$emit( + "update:modelValue", + option.props?.value + ); + }, + }, + option.children + ), + [[resolveDirective("click-anime")]] + ) + ) + ); + }, }); diff --git a/fe_calckey/frontend/client/src/components/MkTagCloud.vue b/fe_calckey/frontend/client/src/components/MkTagCloud.vue index ec0e8d1..7ae6751 100644 --- a/fe_calckey/frontend/client/src/components/MkTagCloud.vue +++ b/fe_calckey/frontend/client/src/components/MkTagCloud.vue @@ -1,19 +1,19 @@ diff --git a/fe_calckey/frontend/client/src/components/MkTimeline.vue b/fe_calckey/frontend/client/src/components/MkTimeline.vue index 0e87976..08a6c2e 100644 --- a/fe_calckey/frontend/client/src/components/MkTimeline.vue +++ b/fe_calckey/frontend/client/src/components/MkTimeline.vue @@ -1,20 +1,20 @@ diff --git a/fe_calckey/frontend/client/src/components/MkTokenGenerateWindow.vue b/fe_calckey/frontend/client/src/components/MkTokenGenerateWindow.vue index 77caa26..6324ff7 100644 --- a/fe_calckey/frontend/client/src/components/MkTokenGenerateWindow.vue +++ b/fe_calckey/frontend/client/src/components/MkTokenGenerateWindow.vue @@ -1,45 +1,45 @@ diff --git a/fe_calckey/frontend/client/src/components/MkTooltip.vue b/fe_calckey/frontend/client/src/components/MkTooltip.vue index c528a2f..e41aa21 100644 --- a/fe_calckey/frontend/client/src/components/MkTooltip.vue +++ b/fe_calckey/frontend/client/src/components/MkTooltip.vue @@ -1,21 +1,21 @@ diff --git a/fe_calckey/frontend/client/src/components/MkTutorialDialog.vue b/fe_calckey/frontend/client/src/components/MkTutorialDialog.vue index b4d8eee..2c9a9c9 100644 --- a/fe_calckey/frontend/client/src/components/MkTutorialDialog.vue +++ b/fe_calckey/frontend/client/src/components/MkTutorialDialog.vue @@ -1,208 +1,208 @@ diff --git a/fe_calckey/frontend/client/src/components/MkUpdated.vue b/fe_calckey/frontend/client/src/components/MkUpdated.vue index d63ba96..2e24be5 100644 --- a/fe_calckey/frontend/client/src/components/MkUpdated.vue +++ b/fe_calckey/frontend/client/src/components/MkUpdated.vue @@ -1,35 +1,35 @@ diff --git a/fe_calckey/frontend/client/src/components/MkUrlPreviewPopup.vue b/fe_calckey/frontend/client/src/components/MkUrlPreviewPopup.vue index 76d0143..6ce75f2 100644 --- a/fe_calckey/frontend/client/src/components/MkUrlPreviewPopup.vue +++ b/fe_calckey/frontend/client/src/components/MkUrlPreviewPopup.vue @@ -1,15 +1,15 @@ diff --git a/fe_calckey/frontend/client/src/components/MkUserCardMini.vue b/fe_calckey/frontend/client/src/components/MkUserCardMini.vue index 6552af0..2600a10 100644 --- a/fe_calckey/frontend/client/src/components/MkUserCardMini.vue +++ b/fe_calckey/frontend/client/src/components/MkUserCardMini.vue @@ -1,26 +1,26 @@ diff --git a/fe_calckey/frontend/client/src/components/MkUserInfo.vue b/fe_calckey/frontend/client/src/components/MkUserInfo.vue index 9c2763e..32035b9 100644 --- a/fe_calckey/frontend/client/src/components/MkUserInfo.vue +++ b/fe_calckey/frontend/client/src/components/MkUserInfo.vue @@ -1,54 +1,54 @@ diff --git a/fe_calckey/frontend/client/src/components/MkUserList.vue b/fe_calckey/frontend/client/src/components/MkUserList.vue index 99815e4..479ad5e 100644 --- a/fe_calckey/frontend/client/src/components/MkUserList.vue +++ b/fe_calckey/frontend/client/src/components/MkUserList.vue @@ -1,27 +1,27 @@ diff --git a/fe_calckey/frontend/client/src/components/MkUserPreview.vue b/fe_calckey/frontend/client/src/components/MkUserPreview.vue index bea0268..de1569b 100644 --- a/fe_calckey/frontend/client/src/components/MkUserPreview.vue +++ b/fe_calckey/frontend/client/src/components/MkUserPreview.vue @@ -1,119 +1,119 @@ diff --git a/fe_calckey/frontend/client/src/components/MkUserSelectDialog.vue b/fe_calckey/frontend/client/src/components/MkUserSelectDialog.vue index 14553ca..dc6deb8 100644 --- a/fe_calckey/frontend/client/src/components/MkUserSelectDialog.vue +++ b/fe_calckey/frontend/client/src/components/MkUserSelectDialog.vue @@ -1,90 +1,90 @@ diff --git a/fe_calckey/frontend/client/src/components/MkUsersTooltip.vue b/fe_calckey/frontend/client/src/components/MkUsersTooltip.vue index 78a4f90..214d606 100644 --- a/fe_calckey/frontend/client/src/components/MkUsersTooltip.vue +++ b/fe_calckey/frontend/client/src/components/MkUsersTooltip.vue @@ -1,20 +1,20 @@ diff --git a/fe_calckey/frontend/client/src/components/MkVisibility.vue b/fe_calckey/frontend/client/src/components/MkVisibility.vue index 591dc65..eeb737f 100644 --- a/fe_calckey/frontend/client/src/components/MkVisibility.vue +++ b/fe_calckey/frontend/client/src/components/MkVisibility.vue @@ -1,27 +1,27 @@ diff --git a/fe_calckey/frontend/client/src/components/MkVisibilityPicker.vue b/fe_calckey/frontend/client/src/components/MkVisibilityPicker.vue index f4529fa..82dda59 100644 --- a/fe_calckey/frontend/client/src/components/MkVisibilityPicker.vue +++ b/fe_calckey/frontend/client/src/components/MkVisibilityPicker.vue @@ -1,124 +1,124 @@ diff --git a/fe_calckey/frontend/client/src/components/MkWaitingDialog.vue b/fe_calckey/frontend/client/src/components/MkWaitingDialog.vue index acd394c..e724bb5 100644 --- a/fe_calckey/frontend/client/src/components/MkWaitingDialog.vue +++ b/fe_calckey/frontend/client/src/components/MkWaitingDialog.vue @@ -1,32 +1,32 @@ diff --git a/fe_calckey/frontend/client/src/components/MkWidgets.vue b/fe_calckey/frontend/client/src/components/MkWidgets.vue index d48fc53..99740e1 100644 --- a/fe_calckey/frontend/client/src/components/MkWidgets.vue +++ b/fe_calckey/frontend/client/src/components/MkWidgets.vue @@ -1,78 +1,78 @@ diff --git a/fe_calckey/frontend/client/src/components/MkWindow.vue b/fe_calckey/frontend/client/src/components/MkWindow.vue index e6509ac..be466c6 100644 --- a/fe_calckey/frontend/client/src/components/MkWindow.vue +++ b/fe_calckey/frontend/client/src/components/MkWindow.vue @@ -1,117 +1,117 @@ diff --git a/fe_calckey/frontend/client/src/components/form/checkbox.vue b/fe_calckey/frontend/client/src/components/form/checkbox.vue index a4d9716..a82bf15 100644 --- a/fe_calckey/frontend/client/src/components/form/checkbox.vue +++ b/fe_calckey/frontend/client/src/components/form/checkbox.vue @@ -1,26 +1,26 @@ diff --git a/fe_calckey/frontend/client/src/components/form/folder.vue b/fe_calckey/frontend/client/src/components/form/folder.vue index fb0b081..cd15604 100644 --- a/fe_calckey/frontend/client/src/components/form/folder.vue +++ b/fe_calckey/frontend/client/src/components/form/folder.vue @@ -1,88 +1,88 @@ diff --git a/fe_calckey/frontend/client/src/components/form/input.vue b/fe_calckey/frontend/client/src/components/form/input.vue index 55d69f7..941e6e2 100644 --- a/fe_calckey/frontend/client/src/components/form/input.vue +++ b/fe_calckey/frontend/client/src/components/form/input.vue @@ -1,59 +1,59 @@ diff --git a/fe_calckey/frontend/client/src/components/form/link.vue b/fe_calckey/frontend/client/src/components/form/link.vue index 01acb29..688decc 100644 --- a/fe_calckey/frontend/client/src/components/form/link.vue +++ b/fe_calckey/frontend/client/src/components/form/link.vue @@ -1,101 +1,101 @@ diff --git a/fe_calckey/frontend/client/src/components/form/radio.vue b/fe_calckey/frontend/client/src/components/form/radio.vue index d2b3c34..9951748 100644 --- a/fe_calckey/frontend/client/src/components/form/radio.vue +++ b/fe_calckey/frontend/client/src/components/form/radio.vue @@ -1,132 +1,132 @@ diff --git a/fe_calckey/frontend/client/src/components/form/radios.vue b/fe_calckey/frontend/client/src/components/form/radios.vue index 4b96d72..280646a 100644 --- a/fe_calckey/frontend/client/src/components/form/radios.vue +++ b/fe_calckey/frontend/client/src/components/form/radios.vue @@ -3,115 +3,115 @@ import { defineComponent, h } from "vue"; import MkRadio from "./radio.vue"; export default defineComponent({ - components: { - MkRadio, - }, - props: { - modelValue: { - required: false, - }, - }, - data() { - return { - value: this.modelValue, - }; - }, - watch: { - value() { - this.$emit("update:modelValue", this.value); - }, - }, - render() { - let options = this.$slots.default(); - const label = this.$slots.label && this.$slots.label(); - const caption = this.$slots.caption && this.$slots.caption(); + components: { + MkRadio, + }, + props: { + modelValue: { + required: false, + }, + }, + data() { + return { + value: this.modelValue, + }; + }, + watch: { + value() { + this.$emit("update:modelValue", this.value); + }, + }, + render() { + let options = this.$slots.default(); + const label = this.$slots.label && this.$slots.label(); + const caption = this.$slots.caption && this.$slots.caption(); - // なぜかFragmentになることがあるため - if (options.length === 1 && options[0].props == null) - options = options[0].children; + // なぜかFragmentになることがあるため + if (options.length === 1 && options[0].props == null) + options = options[0].children; - return h( - "fieldset", - { - class: "novjtcto", - }, - [ - ...(label - ? [ - h( - "legend", - { - class: "label", - }, - [label] - ), - ] - : []), - h( - "div", - { - class: "body", - }, - options.map((option) => - h( - MkRadio, - { - key: option.key, - value: option.props?.value, - disabled: option.props?.disabled, - modelValue: this.value, - "onUpdate:modelValue": (value) => - (this.value = value), - }, - option.children - ) - ) - ), - ...(caption - ? [ - h( - "div", - { - class: "caption", - }, - [caption] - ), - ] - : []), - ] - ); - }, + return h( + "fieldset", + { + class: "novjtcto", + }, + [ + ...(label + ? [ + h( + "legend", + { + class: "label", + }, + [label] + ), + ] + : []), + h( + "div", + { + class: "body", + }, + options.map((option) => + h( + MkRadio, + { + key: option.key, + value: option.props?.value, + disabled: option.props?.disabled, + modelValue: this.value, + "onUpdate:modelValue": (value) => + (this.value = value), + }, + option.children + ) + ) + ), + ...(caption + ? [ + h( + "div", + { + class: "caption", + }, + [caption] + ), + ] + : []), + ] + ); + }, }); diff --git a/fe_calckey/frontend/client/src/components/form/range.vue b/fe_calckey/frontend/client/src/components/form/range.vue index a384c51..f5d649a 100644 --- a/fe_calckey/frontend/client/src/components/form/range.vue +++ b/fe_calckey/frontend/client/src/components/form/range.vue @@ -1,37 +1,37 @@ @@ -102,110 +102,110 @@ function tooltipHide() { @use "sass:math"; .timctyfi { - position: relative; + position: relative; - > .label { - font-size: 0.85em; - padding: 0 0 8px 0; - user-select: none; + > .label { + font-size: 0.85em; + padding: 0 0 8px 0; + user-select: none; - &:empty { - display: none; - } - } + &:empty { + display: none; + } + } - > .caption { - font-size: 0.85em; - padding: 8px 0 0 0; - color: var(--fgTransparentWeak); + > .caption { + font-size: 0.85em; + padding: 8px 0 0 0; + color: var(--fgTransparentWeak); - &:empty { - display: none; - } - } + &:empty { + display: none; + } + } - $thumbHeight: 20px; - $thumbWidth: 20px; + $thumbHeight: 20px; + $thumbWidth: 20px; - > .body { - padding: 10px 12px; - background: var(--panel); - border: solid 1px var(--panel); - border-radius: 6px; + > .body { + padding: 10px 12px; + background: var(--panel); + border: solid 1px var(--panel); + border-radius: 6px; - > .container { - position: relative; - height: $thumbHeight; + > .container { + position: relative; + height: $thumbHeight; - @mixin track { - height: 3px; - background: rgba(0, 0, 0, 0.1); - border-radius: 999px; - } + @mixin track { + height: 3px; + background: rgba(0, 0, 0, 0.1); + border-radius: 999px; + } - @mixin fill { - background-color: var(--accent); - } + @mixin fill { + background-color: var(--accent); + } - @mixin thumb { - width: $thumbWidth; - height: $thumbHeight; - background: var(--accent); - border-radius: 999px; + @mixin thumb { + width: $thumbWidth; + height: $thumbHeight; + background: var(--accent); + border-radius: 999px; - &:hover { - background: var(--accentLighten); - } - } - > input { - width: 100%; - background: none; + &:hover { + background: var(--accentLighten); + } + } + > input { + width: 100%; + background: none; - &::-webkit-slider-runnable-track { - @include track; - } - &::-moz-range-track { - @include track; - } - &::-ms-track { - @include track; - } + &::-webkit-slider-runnable-track { + @include track; + } + &::-moz-range-track { + @include track; + } + &::-ms-track { + @include track; + } - &::-moz-range-progress { - @include fill; - } - &::-ms-fill-lower { - @include fill; - } + &::-moz-range-progress { + @include fill; + } + &::-ms-fill-lower { + @include fill; + } - &::-webkit-slider-thumb { - margin-top: -6.5px; - @include thumb; - } - &::-moz-range-thumb { - @include thumb; - } - &::-ms-thumb { - @include thumb; - } - } - } - } + &::-webkit-slider-thumb { + margin-top: -6.5px; + @include thumb; + } + &::-moz-range-thumb { + @include thumb; + } + &::-ms-thumb { + @include thumb; + } + } + } + } - &.easing { - > .body { - > .container { - > .track { - > .highlight { - transition: width 0.2s cubic-bezier(0, 0, 0, 1); - } - } + &.easing { + > .body { + > .container { + > .track { + > .highlight { + transition: width 0.2s cubic-bezier(0, 0, 0, 1); + } + } - > .thumb { - transition: left 0.2s cubic-bezier(0, 0, 0, 1); - } - } - } - } + > .thumb { + transition: left 0.2s cubic-bezier(0, 0, 0, 1); + } + } + } + } } diff --git a/fe_calckey/frontend/client/src/components/form/section.vue b/fe_calckey/frontend/client/src/components/form/section.vue index c1d858b..33a4110 100644 --- a/fe_calckey/frontend/client/src/components/form/section.vue +++ b/fe_calckey/frontend/client/src/components/form/section.vue @@ -1,43 +1,43 @@ diff --git a/fe_calckey/frontend/client/src/components/form/select.vue b/fe_calckey/frontend/client/src/components/form/select.vue index db4bbb2..89e69d6 100644 --- a/fe_calckey/frontend/client/src/components/form/select.vue +++ b/fe_calckey/frontend/client/src/components/form/select.vue @@ -1,57 +1,57 @@ diff --git a/fe_calckey/frontend/client/src/components/form/slot.vue b/fe_calckey/frontend/client/src/components/form/slot.vue index f570fa6..ddc373a 100644 --- a/fe_calckey/frontend/client/src/components/form/slot.vue +++ b/fe_calckey/frontend/client/src/components/form/slot.vue @@ -1,41 +1,41 @@ diff --git a/fe_calckey/frontend/client/src/components/form/split.vue b/fe_calckey/frontend/client/src/components/form/split.vue index 40d1d43..011e838 100644 --- a/fe_calckey/frontend/client/src/components/form/split.vue +++ b/fe_calckey/frontend/client/src/components/form/split.vue @@ -1,17 +1,17 @@ diff --git a/fe_calckey/frontend/client/src/components/form/switch.vue b/fe_calckey/frontend/client/src/components/form/switch.vue index 511d472..159613b 100644 --- a/fe_calckey/frontend/client/src/components/form/switch.vue +++ b/fe_calckey/frontend/client/src/components/form/switch.vue @@ -1,134 +1,134 @@ diff --git a/fe_calckey/frontend/client/src/components/form/textarea.vue b/fe_calckey/frontend/client/src/components/form/textarea.vue index 459df36..a832645 100644 --- a/fe_calckey/frontend/client/src/components/form/textarea.vue +++ b/fe_calckey/frontend/client/src/components/form/textarea.vue @@ -1,280 +1,280 @@ diff --git a/fe_calckey/frontend/client/src/components/global/MkA.vue b/fe_calckey/frontend/client/src/components/global/MkA.vue index d276a4d..b35013f 100644 --- a/fe_calckey/frontend/client/src/components/global/MkA.vue +++ b/fe_calckey/frontend/client/src/components/global/MkA.vue @@ -1,12 +1,12 @@ diff --git a/fe_calckey/frontend/client/src/components/global/MkAcct.vue b/fe_calckey/frontend/client/src/components/global/MkAcct.vue index c77ad6a..14d91cc 100644 --- a/fe_calckey/frontend/client/src/components/global/MkAcct.vue +++ b/fe_calckey/frontend/client/src/components/global/MkAcct.vue @@ -1,12 +1,12 @@ diff --git a/fe_calckey/frontend/client/src/components/global/MkAvatar.vue b/fe_calckey/frontend/client/src/components/global/MkAvatar.vue index d904ece..5e75b28 100644 --- a/fe_calckey/frontend/client/src/components/global/MkAvatar.vue +++ b/fe_calckey/frontend/client/src/components/global/MkAvatar.vue @@ -1,38 +1,38 @@ diff --git a/fe_calckey/frontend/client/src/components/global/MkEllipsis.vue b/fe_calckey/frontend/client/src/components/global/MkEllipsis.vue index 6226c12..edbff01 100644 --- a/fe_calckey/frontend/client/src/components/global/MkEllipsis.vue +++ b/fe_calckey/frontend/client/src/components/global/MkEllipsis.vue @@ -1,36 +1,36 @@ diff --git a/fe_calckey/frontend/client/src/components/global/MkEmoji.vue b/fe_calckey/frontend/client/src/components/global/MkEmoji.vue index eb08ff5..baac77c 100644 --- a/fe_calckey/frontend/client/src/components/global/MkEmoji.vue +++ b/fe_calckey/frontend/client/src/components/global/MkEmoji.vue @@ -1,23 +1,23 @@ diff --git a/fe_calckey/frontend/client/src/components/global/MkError.vue b/fe_calckey/frontend/client/src/components/global/MkError.vue index 38d6244..90cab0c 100644 --- a/fe_calckey/frontend/client/src/components/global/MkError.vue +++ b/fe_calckey/frontend/client/src/components/global/MkError.vue @@ -1,20 +1,20 @@ @@ -52,78 +52,78 @@ const props = withDefaults( /* Credit to https://codepen.io/supah/pen/BjYLdW */ @keyframes spin { - 0% { - transform: rotate(0deg); - } - 100% { - transform: rotate(360deg); - } + 0% { + transform: rotate(0deg); + } + 100% { + transform: rotate(360deg); + } } @keyframes dash { - 0% { - stroke-dasharray: 1, 150; - stroke-dashoffset: 0; - } - 50% { - stroke-dasharray: 90, 150; - stroke-dashoffset: -35; - } - 100% { - stroke-dasharray: 90, 150; - stroke-dashoffset: -124; - } + 0% { + stroke-dasharray: 1, 150; + stroke-dashoffset: 0; + } + 50% { + stroke-dasharray: 90, 150; + stroke-dashoffset: -35; + } + 100% { + stroke-dasharray: 90, 150; + stroke-dashoffset: -124; + } } .root { - padding: 32px; - text-align: center; - cursor: wait; + padding: 32px; + text-align: center; + cursor: wait; - --size: 40px; + --size: 40px; - &.colored { - color: var(--accent); - } + &.colored { + color: var(--accent); + } - &.inline { - display: inline; - padding: 0; - --size: 32px; - } + &.inline { + display: inline; + padding: 0; + --size: 32px; + } - &.mini { - padding: 16px; - --size: 32px; - } - &.em { - display: inline-block; - vertical-align: middle; - padding: 0; - --size: 1em; - } + &.mini { + padding: 16px; + --size: 32px; + } + &.em { + display: inline-block; + vertical-align: middle; + padding: 0; + --size: 1em; + } } .container { - position: relative; - width: var(--size); - height: var(--size); - margin: 0 auto; + position: relative; + width: var(--size); + height: var(--size); + margin: 0 auto; } .spinner { - position: absolute; - top: 0; - left: 0; - z-index: 999; - width: var(--size); - height: var(--size); - animation: spin 2s linear infinite; + position: absolute; + top: 0; + left: 0; + z-index: 999; + width: var(--size); + height: var(--size); + animation: spin 2s linear infinite; } .path { - stroke: var(--accent); - stroke-linecap: round; - animation: dash 1.2s ease-in-out infinite; + stroke: var(--accent); + stroke-linecap: round; + animation: dash 1.2s ease-in-out infinite; } diff --git a/fe_calckey/frontend/client/src/components/global/MkMisskeyFlavoredMarkdown.vue b/fe_calckey/frontend/client/src/components/global/MkMisskeyFlavoredMarkdown.vue index 4ecb058..1b5d9e8 100644 --- a/fe_calckey/frontend/client/src/components/global/MkMisskeyFlavoredMarkdown.vue +++ b/fe_calckey/frontend/client/src/components/global/MkMisskeyFlavoredMarkdown.vue @@ -1,17 +1,17 @@ diff --git a/fe_calckey/frontend/client/src/components/global/MkPageHeader.vue b/fe_calckey/frontend/client/src/components/global/MkPageHeader.vue index 08c27bc..2c049e8 100644 --- a/fe_calckey/frontend/client/src/components/global/MkPageHeader.vue +++ b/fe_calckey/frontend/client/src/components/global/MkPageHeader.vue @@ -1,136 +1,136 @@ diff --git a/fe_calckey/frontend/client/src/components/global/MkSpacer.vue b/fe_calckey/frontend/client/src/components/global/MkSpacer.vue index 2c3ce81..c57d04d 100644 --- a/fe_calckey/frontend/client/src/components/global/MkSpacer.vue +++ b/fe_calckey/frontend/client/src/components/global/MkSpacer.vue @@ -1,9 +1,9 @@ diff --git a/fe_calckey/frontend/client/src/components/global/MkStickyContainer.vue b/fe_calckey/frontend/client/src/components/global/MkStickyContainer.vue index 0818dd3..31d2863 100644 --- a/fe_calckey/frontend/client/src/components/global/MkStickyContainer.vue +++ b/fe_calckey/frontend/client/src/components/global/MkStickyContainer.vue @@ -1,12 +1,12 @@ diff --git a/fe_calckey/frontend/client/src/components/global/MkTime.vue b/fe_calckey/frontend/client/src/components/global/MkTime.vue index 72a51f1..1f50960 100644 --- a/fe_calckey/frontend/client/src/components/global/MkTime.vue +++ b/fe_calckey/frontend/client/src/components/global/MkTime.vue @@ -1,12 +1,12 @@ diff --git a/fe_calckey/frontend/client/src/components/global/MkUrl.vue b/fe_calckey/frontend/client/src/components/global/MkUrl.vue index 5f2a81e..8843e74 100644 --- a/fe_calckey/frontend/client/src/components/global/MkUrl.vue +++ b/fe_calckey/frontend/client/src/components/global/MkUrl.vue @@ -1,32 +1,32 @@ diff --git a/fe_calckey/frontend/client/src/components/global/RouterView.vue b/fe_calckey/frontend/client/src/components/global/RouterView.vue index 0fa244f..05fee65 100644 --- a/fe_calckey/frontend/client/src/components/global/RouterView.vue +++ b/fe_calckey/frontend/client/src/components/global/RouterView.vue @@ -1,79 +1,79 @@ diff --git a/fe_calckey/frontend/client/src/components/global/i18n.ts b/fe_calckey/frontend/client/src/components/global/i18n.ts index 4475b62..1c6e736 100644 --- a/fe_calckey/frontend/client/src/components/global/i18n.ts +++ b/fe_calckey/frontend/client/src/components/global/i18n.ts @@ -1,51 +1,52 @@ import { h, defineComponent } from "vue"; export default defineComponent({ - props: { - src: { - type: String, - required: true, - }, - tag: { - type: String, - required: false, - default: "span", - }, - textTag: { - type: String, - required: false, - default: null, - }, - }, - render() { - let str = this.src; - const parsed = [] as (string | { arg: string })[]; - while (true) { - const nextBracketOpen = str.indexOf("{"); - const nextBracketClose = str.indexOf("}"); + props: { + src: { + type: String, + required: true, + }, + tag: { + type: String, + required: false, + default: "span", + }, + textTag: { + type: String, + required: false, + default: null, + }, + }, + render() { + let str = this.src; + const parsed = [] as (string | { arg: string })[]; + while (true) { + const nextBracketOpen = str.indexOf("{"); + const nextBracketClose = str.indexOf("}"); - if (nextBracketOpen === -1) { - parsed.push(str); - break; - } else { - if (nextBracketOpen > 0) parsed.push(str.substr(0, nextBracketOpen)); - parsed.push({ - arg: str.substring(nextBracketOpen + 1, nextBracketClose), - }); - } + if (nextBracketOpen === -1) { + parsed.push(str); + break; + } else { + if (nextBracketOpen > 0) + parsed.push(str.substr(0, nextBracketOpen)); + parsed.push({ + arg: str.substring(nextBracketOpen + 1, nextBracketClose), + }); + } - str = str.substr(nextBracketClose + 1); - } + str = str.substr(nextBracketClose + 1); + } - return h( - this.tag, - parsed.map((x) => - typeof x === "string" - ? this.textTag - ? h(this.textTag, x) - : x - : this.$slots[x.arg](), - ), - ); - }, + return h( + this.tag, + parsed.map((x) => + typeof x === "string" + ? this.textTag + ? h(this.textTag, x) + : x + : this.$slots[x.arg]() + ) + ); + }, }); diff --git a/fe_calckey/frontend/client/src/components/index.ts b/fe_calckey/frontend/client/src/components/index.ts index 7da095e..e033155 100644 --- a/fe_calckey/frontend/client/src/components/index.ts +++ b/fe_calckey/frontend/client/src/components/index.ts @@ -19,43 +19,43 @@ import MkSpacer from "./global/MkSpacer.vue"; import MkStickyContainer from "./global/MkStickyContainer.vue"; export default function (app: App) { - app.component("I18n", I18n); - app.component("RouterView", RouterView); - app.component("Mfm", Mfm); - app.component("MkA", MkA); - app.component("MkAcct", MkAcct); - app.component("MkAvatar", MkAvatar); - app.component("MkEmoji", MkEmoji); - app.component("MkUserName", MkUserName); - app.component("MkEllipsis", MkEllipsis); - app.component("MkTime", MkTime); - app.component("MkUrl", MkUrl); - app.component("MkLoading", MkLoading); - app.component("MkError", MkError); - app.component("MkAd", MkAd); - app.component("MkPageHeader", MkPageHeader); - app.component("MkSpacer", MkSpacer); - app.component("MkStickyContainer", MkStickyContainer); + app.component("I18n", I18n); + app.component("RouterView", RouterView); + app.component("Mfm", Mfm); + app.component("MkA", MkA); + app.component("MkAcct", MkAcct); + app.component("MkAvatar", MkAvatar); + app.component("MkEmoji", MkEmoji); + app.component("MkUserName", MkUserName); + app.component("MkEllipsis", MkEllipsis); + app.component("MkTime", MkTime); + app.component("MkUrl", MkUrl); + app.component("MkLoading", MkLoading); + app.component("MkError", MkError); + app.component("MkAd", MkAd); + app.component("MkPageHeader", MkPageHeader); + app.component("MkSpacer", MkSpacer); + app.component("MkStickyContainer", MkStickyContainer); } declare module "@vue/runtime-core" { - export interface GlobalComponents { - I18n: typeof I18n; - RouterView: typeof RouterView; - Mfm: typeof Mfm; - MkA: typeof MkA; - MkAcct: typeof MkAcct; - MkAvatar: typeof MkAvatar; - MkEmoji: typeof MkEmoji; - MkUserName: typeof MkUserName; - MkEllipsis: typeof MkEllipsis; - MkTime: typeof MkTime; - MkUrl: typeof MkUrl; - MkLoading: typeof MkLoading; - MkError: typeof MkError; - MkAd: typeof MkAd; - MkPageHeader: typeof MkPageHeader; - MkSpacer: typeof MkSpacer; - MkStickyContainer: typeof MkStickyContainer; - } + export interface GlobalComponents { + I18n: typeof I18n; + RouterView: typeof RouterView; + Mfm: typeof Mfm; + MkA: typeof MkA; + MkAcct: typeof MkAcct; + MkAvatar: typeof MkAvatar; + MkEmoji: typeof MkEmoji; + MkUserName: typeof MkUserName; + MkEllipsis: typeof MkEllipsis; + MkTime: typeof MkTime; + MkUrl: typeof MkUrl; + MkLoading: typeof MkLoading; + MkError: typeof MkError; + MkAd: typeof MkAd; + MkPageHeader: typeof MkPageHeader; + MkSpacer: typeof MkSpacer; + MkStickyContainer: typeof MkStickyContainer; + } } diff --git a/fe_calckey/frontend/client/src/components/mfm.ts b/fe_calckey/frontend/client/src/components/mfm.ts index 3d2e393..17849a1 100644 --- a/fe_calckey/frontend/client/src/components/mfm.ts +++ b/fe_calckey/frontend/client/src/components/mfm.ts @@ -15,530 +15,615 @@ import { reducedMotion } from "@/scripts/reduced-motion"; import { defaultStore } from "@/store"; export default defineComponent({ - props: { - text: { - type: String, - required: true, - }, - plain: { - type: Boolean, - default: false, - }, - nowrap: { - type: Boolean, - default: false, - }, - author: { - type: Object, - default: null, - }, - i: { - type: Object, - default: null, - }, - customEmojis: { - required: false, - }, - isNote: { - type: Boolean, - default: true, - }, - }, + props: { + text: { + type: String, + required: true, + }, + plain: { + type: Boolean, + default: false, + }, + nowrap: { + type: Boolean, + default: false, + }, + author: { + type: Object, + default: null, + }, + i: { + type: Object, + default: null, + }, + customEmojis: { + required: false, + }, + isNote: { + type: Boolean, + default: true, + }, + }, - render() { - if (this.text == null || this.text === "") return; + render() { + if (this.text == null || this.text === "") return; - const isPlain = this.plain; + const isPlain = this.plain; - const ast = (isPlain ? mfm.parseSimple : mfm.parse)(this.text); + const ast = (isPlain ? mfm.parseSimple : mfm.parse)(this.text); - const validTime = (t: string | null | undefined) => { - if (t == null) return null; - return t.match(/^[0-9.]+s$/) ? t : null; - }; + const validTime = (t: string | null | undefined) => { + if (t == null) return null; + return t.match(/^[0-9.]+s$/) ? t : null; + }; - const validNumber = (n: string | null | undefined) => { - if (n == null) return null; - const parsed = parseFloat(n); - return !isNaN(parsed) && isFinite(parsed) && parsed > 0; - }; - // const validEase = (e: string | null | undefined) => { - // if (e == null) return null; - // return e.match(/(steps)?\(-?[0-9.]+,-?[0-9.]+,-?[0-9.]+,-?[0-9.]+\)/) - // ? (e.startsWith("steps") ? e : "cubic-bezier" + e) - // : null - // } + const validNumber = (n: string | null | undefined) => { + if (n == null) return null; + const parsed = parseFloat(n); + return !isNaN(parsed) && isFinite(parsed) && parsed > 0; + }; + // const validEase = (e: string | null | undefined) => { + // if (e == null) return null; + // return e.match(/(steps)?\(-?[0-9.]+,-?[0-9.]+,-?[0-9.]+,-?[0-9.]+\)/) + // ? (e.startsWith("steps") ? e : "cubic-bezier" + e) + // : null + // } - const genEl = (ast: mfm.MfmNode[]) => - concat( - ast.map((token, index): VNode[] => { - switch (token.type) { - case "text": { - const text = token.props.text.replace(/(\r\n|\n|\r)/g, "\n"); + const genEl = (ast: mfm.MfmNode[]) => + concat( + ast.map((token, index): VNode[] => { + switch (token.type) { + case "text": { + const text = token.props.text.replace( + /(\r\n|\n|\r)/g, + "\n" + ); - if (!this.plain) { - const res = []; - for (const t of text.split("\n")) { - res.push(h("br")); - res.push(t); - } - res.shift(); - return res; - } else { - return [text.replace(/\n/g, " ")]; - } - } + if (!this.plain) { + const res = []; + for (const t of text.split("\n")) { + res.push(h("br")); + res.push(t); + } + res.shift(); + return res; + } else { + return [text.replace(/\n/g, " ")]; + } + } - case "bold": { - return [h("b", genEl(token.children))]; - } + case "bold": { + return [h("b", genEl(token.children))]; + } - case "strike": { - return [h("del", genEl(token.children))]; - } + case "strike": { + return [h("del", genEl(token.children))]; + } - case "italic": { - return h( - "i", - { - style: "font-style: oblique;", - }, - genEl(token.children), - ); - } + case "italic": { + return h( + "i", + { + style: "font-style: oblique;", + }, + genEl(token.children) + ); + } - case "fn": { - // TODO: CSSを文字列で組み立てていくと token.props.args.~~~ 経由でCSSインジェクションできるのでよしなにやる - let style: string; - switch (token.props.name) { - case "tada": { - const speed = validTime(token.props.args.speed) || "1s"; - const delay = validTime(token.props.args.delay) || "0s"; - const loop = validNumber(token.props.args.loop) || "infinite"; - // const ease = validEase(token.props.args.ease) || "linear"; - style = `font-size: 150%; animation: tada ${speed} ${delay} linear ${loop} both;`; - break; - } - case "jelly": { - const speed = validTime(token.props.args.speed) || "1s"; - const delay = validTime(token.props.args.delay) || "0s"; - const loop = validNumber(token.props.args.loop) || "infinite"; - style = `animation: mfm-rubberBand ${speed} ${delay} linear ${loop} both;`; - break; - } - case "twitch": { - const speed = validTime(token.props.args.speed) || "0.5s"; - const delay = validTime(token.props.args.delay) || "0s"; - const loop = validNumber(token.props.args.loop) || "infinite"; - style = `animation: mfm-twitch ${speed} ${delay} ease ${loop};`; - break; - } - case "shake": { - const speed = validTime(token.props.args.speed) || "0.5s"; - const delay = validTime(token.props.args.delay) || "0s"; - const loop = validNumber(token.props.args.loop) || "infinite"; - style = `animation: mfm-shake ${speed} ${delay} ease ${loop};`; - break; - } - case "spin": { - const direction = token.props.args.left - ? "reverse" - : token.props.args.alternate - ? "alternate" - : "normal"; - const anime = token.props.args.x - ? "mfm-spinX" - : token.props.args.y - ? "mfm-spinY" - : "mfm-spin"; - const speed = validTime(token.props.args.speed) || "1.5s"; - const delay = validTime(token.props.args.delay) || "0s"; - const loop = validNumber(token.props.args.loop) || "infinite"; - style = `animation: ${anime} ${speed} ${delay} linear ${loop}; animation-direction: ${direction};`; - break; - } - case "jump": { - const speed = validTime(token.props.args.speed) || "0.75s"; - const delay = validTime(token.props.args.delay) || "0s"; - const loop = validNumber(token.props.args.loop) || "infinite"; - style = `animation: mfm-jump ${speed} ${delay} linear ${loop};`; - break; - } - case "bounce": { - const speed = validTime(token.props.args.speed) || "0.75s"; - const delay = validTime(token.props.args.delay) || "0s"; - const loop = validNumber(token.props.args.loop) || "infinite"; - style = `animation: mfm-bounce ${speed} ${delay} linear ${loop}; transform-origin: center bottom;`; - break; - } - case "rainbow": { - const speed = validTime(token.props.args.speed) || "1s"; - const delay = validTime(token.props.args.delay) || "0s"; - const loop = validNumber(token.props.args.loop) || "infinite"; - style = `animation: mfm-rainbow ${speed} ${delay} linear ${loop};`; - break; - } - case "sparkle": { - if (reducedMotion()) { - return genEl(token.children); - } - return h(MkSparkle, {}, genEl(token.children)); - } - case "fade": { - const direction = token.props.args.out - ? "alternate-reverse" - : "alternate"; - const speed = validTime(token.props.args.speed) || "1.5s"; - const delay = validTime(token.props.args.delay) || "0s"; - const loop = validNumber(token.props.args.loop) || "infinite"; - style = `animation: mfm-fade ${speed} ${delay} linear ${loop}; animation-direction: ${direction};`; - break; - } - case "flip": { - const transform = - token.props.args.h && token.props.args.v - ? "scale(-1, -1)" - : token.props.args.v - ? "scaleY(-1)" - : "scaleX(-1)"; - style = `transform: ${transform};`; - break; - } - case "x2": { - return h( - "span", - { - class: "mfm-x2", - }, - genEl(token.children), - ); - } - case "x3": { - return h( - "span", - { - class: "mfm-x3", - }, - genEl(token.children), - ); - } - case "x4": { - return h( - "span", - { - class: "mfm-x4", - }, - genEl(token.children), - ); - } - case "font": { - const family = token.props.args.serif - ? "serif" - : token.props.args.monospace - ? "monospace" - : token.props.args.cursive - ? "cursive" - : token.props.args.fantasy - ? "fantasy" - : token.props.args.emoji - ? "emoji" - : token.props.args.math - ? "math" - : null; - if (family) style = `font-family: ${family};`; - break; - } - case "blur": { - return h( - "span", - { - class: "_blur_text", - }, - genEl(token.children), - ); - } - case "rotate": { - const rotate = token.props.args.x - ? "perspective(128px) rotateX" - : token.props.args.y - ? "perspective(128px) rotateY" - : "rotate"; - const degrees = parseInt(token.props.args.deg) || "90"; - style = `transform: ${rotate}(${degrees}deg); transform-origin: center center;`; - break; - } - case "position": { - const x = parseFloat(token.props.args.x ?? "0"); - const y = parseFloat(token.props.args.y ?? "0"); - style = `transform: translateX(${x}em) translateY(${y}em);`; - break; - } - case "crop": { - const top = parseFloat(token.props.args.top ?? "0"); - const right = parseFloat(token.props.args.right ?? "0"); - const bottom = parseFloat(token.props.args.bottom ?? "0"); - const left = parseFloat(token.props.args.left ?? "0"); - style = `clip-path: inset(${top}% ${right}% ${bottom}% ${left}%);`; - break; - } - case "scale": { - const x = Math.min(parseFloat(token.props.args.x ?? "1"), 5); - const y = Math.min(parseFloat(token.props.args.y ?? "1"), 5); - style = `transform: scale(${x}, ${y});`; - break; - } - case "fg": { - let color = token.props.args.color; - if (!/^[0-9a-f]{3,6}$/i.test(color)) color = "f00"; - style = `color: #${color};`; - break; - } - case "bg": { - let color = token.props.args.color; - if (!/^[0-9a-f]{3,6}$/i.test(color)) color = "f00"; - style = `background-color: #${color};`; - break; - } - case "small": { - return h( - "small", - { - style: "opacity: 0.7;", - }, - genEl(token.children), - ); - } - case "center": { - return h( - "div", - { - style: "text-align: center;", - }, - genEl(token.children), - ); - } - } - if (style == null) { - return h("span", {}, [ - "$[", - token.props.name, - " ", - ...genEl(token.children), - "]", - ]); - } else { - return h( - "span", - { - style: `display: inline-block;${style}`, - }, - genEl(token.children), - ); - } - } + case "fn": { + // TODO: CSSを文字列で組み立てていくと token.props.args.~~~ 経由でCSSインジェクションできるのでよしなにやる + let style: string; + switch (token.props.name) { + case "tada": { + const speed = + validTime(token.props.args.speed) || + "1s"; + const delay = + validTime(token.props.args.delay) || + "0s"; + const loop = + validNumber(token.props.args.loop) || + "infinite"; + // const ease = validEase(token.props.args.ease) || "linear"; + style = `font-size: 150%; animation: tada ${speed} ${delay} linear ${loop} both;`; + break; + } + case "jelly": { + const speed = + validTime(token.props.args.speed) || + "1s"; + const delay = + validTime(token.props.args.delay) || + "0s"; + const loop = + validNumber(token.props.args.loop) || + "infinite"; + style = `animation: mfm-rubberBand ${speed} ${delay} linear ${loop} both;`; + break; + } + case "twitch": { + const speed = + validTime(token.props.args.speed) || + "0.5s"; + const delay = + validTime(token.props.args.delay) || + "0s"; + const loop = + validNumber(token.props.args.loop) || + "infinite"; + style = `animation: mfm-twitch ${speed} ${delay} ease ${loop};`; + break; + } + case "shake": { + const speed = + validTime(token.props.args.speed) || + "0.5s"; + const delay = + validTime(token.props.args.delay) || + "0s"; + const loop = + validNumber(token.props.args.loop) || + "infinite"; + style = `animation: mfm-shake ${speed} ${delay} ease ${loop};`; + break; + } + case "spin": { + const direction = token.props.args.left + ? "reverse" + : token.props.args.alternate + ? "alternate" + : "normal"; + const anime = token.props.args.x + ? "mfm-spinX" + : token.props.args.y + ? "mfm-spinY" + : "mfm-spin"; + const speed = + validTime(token.props.args.speed) || + "1.5s"; + const delay = + validTime(token.props.args.delay) || + "0s"; + const loop = + validNumber(token.props.args.loop) || + "infinite"; + style = `animation: ${anime} ${speed} ${delay} linear ${loop}; animation-direction: ${direction};`; + break; + } + case "jump": { + const speed = + validTime(token.props.args.speed) || + "0.75s"; + const delay = + validTime(token.props.args.delay) || + "0s"; + const loop = + validNumber(token.props.args.loop) || + "infinite"; + style = `animation: mfm-jump ${speed} ${delay} linear ${loop};`; + break; + } + case "bounce": { + const speed = + validTime(token.props.args.speed) || + "0.75s"; + const delay = + validTime(token.props.args.delay) || + "0s"; + const loop = + validNumber(token.props.args.loop) || + "infinite"; + style = `animation: mfm-bounce ${speed} ${delay} linear ${loop}; transform-origin: center bottom;`; + break; + } + case "rainbow": { + const speed = + validTime(token.props.args.speed) || + "1s"; + const delay = + validTime(token.props.args.delay) || + "0s"; + const loop = + validNumber(token.props.args.loop) || + "infinite"; + style = `animation: mfm-rainbow ${speed} ${delay} linear ${loop};`; + break; + } + case "sparkle": { + if (reducedMotion()) { + return genEl(token.children); + } + return h( + MkSparkle, + {}, + genEl(token.children) + ); + } + case "fade": { + const direction = token.props.args.out + ? "alternate-reverse" + : "alternate"; + const speed = + validTime(token.props.args.speed) || + "1.5s"; + const delay = + validTime(token.props.args.delay) || + "0s"; + const loop = + validNumber(token.props.args.loop) || + "infinite"; + style = `animation: mfm-fade ${speed} ${delay} linear ${loop}; animation-direction: ${direction};`; + break; + } + case "flip": { + const transform = + token.props.args.h && token.props.args.v + ? "scale(-1, -1)" + : token.props.args.v + ? "scaleY(-1)" + : "scaleX(-1)"; + style = `transform: ${transform};`; + break; + } + case "x2": { + return h( + "span", + { + class: "mfm-x2", + }, + genEl(token.children) + ); + } + case "x3": { + return h( + "span", + { + class: "mfm-x3", + }, + genEl(token.children) + ); + } + case "x4": { + return h( + "span", + { + class: "mfm-x4", + }, + genEl(token.children) + ); + } + case "font": { + const family = token.props.args.serif + ? "serif" + : token.props.args.monospace + ? "monospace" + : token.props.args.cursive + ? "cursive" + : token.props.args.fantasy + ? "fantasy" + : token.props.args.emoji + ? "emoji" + : token.props.args.math + ? "math" + : null; + if (family) + style = `font-family: ${family};`; + break; + } + case "blur": { + return h( + "span", + { + class: "_blur_text", + }, + genEl(token.children) + ); + } + case "rotate": { + const rotate = token.props.args.x + ? "perspective(128px) rotateX" + : token.props.args.y + ? "perspective(128px) rotateY" + : "rotate"; + const degrees = + parseInt(token.props.args.deg) || "90"; + style = `transform: ${rotate}(${degrees}deg); transform-origin: center center;`; + break; + } + case "position": { + const x = parseFloat( + token.props.args.x ?? "0" + ); + const y = parseFloat( + token.props.args.y ?? "0" + ); + style = `transform: translateX(${x}em) translateY(${y}em);`; + break; + } + case "crop": { + const top = parseFloat( + token.props.args.top ?? "0" + ); + const right = parseFloat( + token.props.args.right ?? "0" + ); + const bottom = parseFloat( + token.props.args.bottom ?? "0" + ); + const left = parseFloat( + token.props.args.left ?? "0" + ); + style = `clip-path: inset(${top}% ${right}% ${bottom}% ${left}%);`; + break; + } + case "scale": { + const x = Math.min( + parseFloat(token.props.args.x ?? "1"), + 5 + ); + const y = Math.min( + parseFloat(token.props.args.y ?? "1"), + 5 + ); + style = `transform: scale(${x}, ${y});`; + break; + } + case "fg": { + let color = token.props.args.color; + if (!/^[0-9a-f]{3,6}$/i.test(color)) + color = "f00"; + style = `color: #${color};`; + break; + } + case "bg": { + let color = token.props.args.color; + if (!/^[0-9a-f]{3,6}$/i.test(color)) + color = "f00"; + style = `background-color: #${color};`; + break; + } + case "small": { + return h( + "small", + { + style: "opacity: 0.7;", + }, + genEl(token.children) + ); + } + case "center": { + return h( + "div", + { + style: "text-align: center;", + }, + genEl(token.children) + ); + } + } + if (style == null) { + return h("span", {}, [ + "$[", + token.props.name, + " ", + ...genEl(token.children), + "]", + ]); + } else { + return h( + "span", + { + style: `display: inline-block;${style}`, + }, + genEl(token.children) + ); + } + } - case "small": { - return [ - h( - "small", - { - style: "opacity: 0.7;", - }, - genEl(token.children), - ), - ]; - } + case "small": { + return [ + h( + "small", + { + style: "opacity: 0.7;", + }, + genEl(token.children) + ), + ]; + } - case "center": { - return [ - h( - "div", - { - style: "text-align: center;", - }, - genEl(token.children), - ), - ]; - } + case "center": { + return [ + h( + "div", + { + style: "text-align: center;", + }, + genEl(token.children) + ), + ]; + } - case "url": { - return [ - h(MkUrl, { - key: Math.random(), - url: token.props.url, - rel: "nofollow noopener", - }), - ]; - } + case "url": { + return [ + h(MkUrl, { + key: Math.random(), + url: token.props.url, + rel: "nofollow noopener", + }), + ]; + } - case "link": { - return [ - h( - MkLink, - { - key: Math.random(), - url: token.props.url, - rel: "nofollow noopener", - }, - genEl(token.children), - ), - ]; - } + case "link": { + return [ + h( + MkLink, + { + key: Math.random(), + url: token.props.url, + rel: "nofollow noopener", + }, + genEl(token.children) + ), + ]; + } - case "mention": { - return [ - h(MkMention, { - key: Math.random(), - host: - (token.props.host == null && - this.author && - this.author.host != null - ? this.author.host - : token.props.host) || host, - username: token.props.username, - }), - ]; - } + case "mention": { + return [ + h(MkMention, { + key: Math.random(), + host: + (token.props.host == null && + this.author && + this.author.host != null + ? this.author.host + : token.props.host) || host, + username: token.props.username, + }), + ]; + } - case "hashtag": { - return [ - h( - MkA, - { - key: Math.random(), - to: `/tags/${encodeURIComponent(token.props.hashtag)}`, - style: "color:var(--hashtag);", - }, - `#${token.props.hashtag}`, - ), - ]; - } + case "hashtag": { + return [ + h( + MkA, + { + key: Math.random(), + to: `/tags/${encodeURIComponent( + token.props.hashtag + )}`, + style: "color:var(--hashtag);", + }, + `#${token.props.hashtag}` + ), + ]; + } - case "blockCode": { - return [ - h(MkCode, { - key: Math.random(), - code: token.props.code, - lang: token.props.lang, - }), - ]; - } + case "blockCode": { + return [ + h(MkCode, { + key: Math.random(), + code: token.props.code, + lang: token.props.lang, + }), + ]; + } - case "inlineCode": { - return [ - h(MkCode, { - key: Math.random(), - code: token.props.code, - inline: true, - }), - ]; - } + case "inlineCode": { + return [ + h(MkCode, { + key: Math.random(), + code: token.props.code, + inline: true, + }), + ]; + } - case "quote": { - if (!this.nowrap) { - return [h("blockquote", genEl(token.children))]; - } else { - return [ - h( - "span", - { - class: "quote", - }, - genEl(token.children), - ), - ]; - } - } + case "quote": { + if (!this.nowrap) { + return [h("blockquote", genEl(token.children))]; + } else { + return [ + h( + "span", + { + class: "quote", + }, + genEl(token.children) + ), + ]; + } + } - case "emojiCode": { - return [ - h(MkEmoji, { - key: Math.random(), - emoji: `:${token.props.name}:`, - customEmojis: this.customEmojis, - normal: this.plain, - }), - ]; - } + case "emojiCode": { + return [ + h(MkEmoji, { + key: Math.random(), + emoji: `:${token.props.name}:`, + customEmojis: this.customEmojis, + normal: this.plain, + }), + ]; + } - case "unicodeEmoji": { - return [ - h(MkEmoji, { - key: Math.random(), - emoji: token.props.emoji, - customEmojis: this.customEmojis, - normal: this.plain, - }), - ]; - } + case "unicodeEmoji": { + return [ + h(MkEmoji, { + key: Math.random(), + emoji: token.props.emoji, + customEmojis: this.customEmojis, + normal: this.plain, + }), + ]; + } - case "mathInline": { - return [ - h(MkFormula, { - key: Math.random(), - formula: token.props.formula, - block: false, - }), - ]; - } + case "mathInline": { + return [ + h(MkFormula, { + key: Math.random(), + formula: token.props.formula, + block: false, + }), + ]; + } - case "mathBlock": { - return [ - h(MkFormula, { - key: Math.random(), - formula: token.props.formula, - block: true, - }), - ]; - } + case "mathBlock": { + return [ + h(MkFormula, { + key: Math.random(), + formula: token.props.formula, + block: true, + }), + ]; + } - case "search": { + case "search": { + const sentinel = "#"; + let ast2 = (isPlain ? mfm.parseSimple : mfm.parse)( + token.props.content + sentinel + ); + if ( + ast2[ast2.length - 1].type === "text" && + ast2[ast2.length - 1].props.text.endsWith( + sentinel + ) + ) { + ast2[ast2.length - 1].props.text = ast2[ + ast2.length - 1 + ].props.text.slice(0, -1); + } - const sentinel = "#"; - let ast2 = (isPlain ? mfm.parseSimple : mfm.parse)( - token.props.content + sentinel, - ); - if ( - ast2[ast2.length - 1].type === "text" && - ast2[ast2.length - 1].props.text.endsWith(sentinel) - ) { - ast2[ast2.length - 1].props.text = ast2[ast2.length - 1].props.text.slice(0, -1); - } + let prefix = "\n"; + if ( + index === 0 || + [ + "blockCode", + "center", + "mathBlock", + "quote", + "search", + ].includes(ast[index - 1].type) + ) { + prefix = ""; + } - let prefix = "\n"; - if ( - index === 0 || - [ - "blockCode", - "center", - "mathBlock", - "quote", - "search", - ].includes(ast[index - 1].type) - ) { - prefix = ""; - } + return [prefix, ...genEl(ast2)]; + } - return [ - prefix, - ...genEl(ast2) - ]; - } + case "plain": { + return [h("span", genEl(token.children))]; + } - case "plain": { - return [h("span", genEl(token.children))]; - } + default: { + console.error("unrecognized ast type:", token.type); - default: { - console.error("unrecognized ast type:", token.type); + return []; + } + } + }) + ); - return []; - } - } - }), - ); - - // Parse ast to DOM - return h("span", genEl(ast)); - }, + // Parse ast to DOM + return h("span", genEl(ast)); + }, }); diff --git a/fe_calckey/frontend/client/src/components/page/page.block.vue b/fe_calckey/frontend/client/src/components/page/page.block.vue index edeb33a..6f65c73 100644 --- a/fe_calckey/frontend/client/src/components/page/page.block.vue +++ b/fe_calckey/frontend/client/src/components/page/page.block.vue @@ -1,11 +1,11 @@ diff --git a/fe_calckey/frontend/client/src/components/page/page.button.vue b/fe_calckey/frontend/client/src/components/page/page.button.vue index b3c42eb..7c45492 100644 --- a/fe_calckey/frontend/client/src/components/page/page.button.vue +++ b/fe_calckey/frontend/client/src/components/page/page.button.vue @@ -1,9 +1,9 @@ diff --git a/fe_calckey/frontend/client/src/components/page/page.canvas.vue b/fe_calckey/frontend/client/src/components/page/page.canvas.vue index 1ed96e2..87109c2 100644 --- a/fe_calckey/frontend/client/src/components/page/page.canvas.vue +++ b/fe_calckey/frontend/client/src/components/page/page.canvas.vue @@ -1,7 +1,7 @@ diff --git a/fe_calckey/frontend/client/src/components/page/page.counter.vue b/fe_calckey/frontend/client/src/components/page/page.counter.vue index 9ee49fe..d564d71 100644 --- a/fe_calckey/frontend/client/src/components/page/page.counter.vue +++ b/fe_calckey/frontend/client/src/components/page/page.counter.vue @@ -1,9 +1,9 @@ diff --git a/fe_calckey/frontend/client/src/components/page/page.if.vue b/fe_calckey/frontend/client/src/components/page/page.if.vue index 7cc25f2..026c374 100644 --- a/fe_calckey/frontend/client/src/components/page/page.if.vue +++ b/fe_calckey/frontend/client/src/components/page/page.if.vue @@ -1,13 +1,13 @@ diff --git a/fe_calckey/frontend/client/src/components/page/page.image.vue b/fe_calckey/frontend/client/src/components/page/page.image.vue index 0b82975..7ac4af4 100644 --- a/fe_calckey/frontend/client/src/components/page/page.image.vue +++ b/fe_calckey/frontend/client/src/components/page/page.image.vue @@ -1,14 +1,14 @@ diff --git a/fe_calckey/frontend/client/src/components/page/page.note.vue b/fe_calckey/frontend/client/src/components/page/page.note.vue index 9e10d0f..d796962 100644 --- a/fe_calckey/frontend/client/src/components/page/page.note.vue +++ b/fe_calckey/frontend/client/src/components/page/page.note.vue @@ -1,16 +1,16 @@ diff --git a/fe_calckey/frontend/client/src/components/page/page.number-input.vue b/fe_calckey/frontend/client/src/components/page/page.number-input.vue index 3426cf6..fb11932 100644 --- a/fe_calckey/frontend/client/src/components/page/page.number-input.vue +++ b/fe_calckey/frontend/client/src/components/page/page.number-input.vue @@ -1,14 +1,14 @@ diff --git a/fe_calckey/frontend/client/src/components/page/page.post.vue b/fe_calckey/frontend/client/src/components/page/page.post.vue index ee30da1..71407e6 100644 --- a/fe_calckey/frontend/client/src/components/page/page.post.vue +++ b/fe_calckey/frontend/client/src/components/page/page.post.vue @@ -1,16 +1,16 @@ diff --git a/fe_calckey/frontend/client/src/components/page/page.radio-button.vue b/fe_calckey/frontend/client/src/components/page/page.radio-button.vue index 3d3878e..eef4adf 100644 --- a/fe_calckey/frontend/client/src/components/page/page.radio-button.vue +++ b/fe_calckey/frontend/client/src/components/page/page.radio-button.vue @@ -1,15 +1,15 @@ diff --git a/fe_calckey/frontend/client/src/components/page/page.section.vue b/fe_calckey/frontend/client/src/components/page/page.section.vue index 04de165..a8a3719 100644 --- a/fe_calckey/frontend/client/src/components/page/page.section.vue +++ b/fe_calckey/frontend/client/src/components/page/page.section.vue @@ -1,17 +1,17 @@ diff --git a/fe_calckey/frontend/client/src/components/page/page.switch.vue b/fe_calckey/frontend/client/src/components/page/page.switch.vue index 7a00694..13fd7b2 100644 --- a/fe_calckey/frontend/client/src/components/page/page.switch.vue +++ b/fe_calckey/frontend/client/src/components/page/page.switch.vue @@ -1,11 +1,11 @@ diff --git a/fe_calckey/frontend/client/src/components/page/page.text-input.vue b/fe_calckey/frontend/client/src/components/page/page.text-input.vue index eb76d18..3048a3b 100644 --- a/fe_calckey/frontend/client/src/components/page/page.text-input.vue +++ b/fe_calckey/frontend/client/src/components/page/page.text-input.vue @@ -1,14 +1,14 @@ diff --git a/fe_calckey/frontend/client/src/components/page/page.text.vue b/fe_calckey/frontend/client/src/components/page/page.text.vue index c380f48..8d01481 100644 --- a/fe_calckey/frontend/client/src/components/page/page.text.vue +++ b/fe_calckey/frontend/client/src/components/page/page.text.vue @@ -1,8 +1,8 @@ diff --git a/fe_calckey/frontend/client/src/components/page/page.textarea-input.vue b/fe_calckey/frontend/client/src/components/page/page.textarea-input.vue index fab665c..e0ca64c 100644 --- a/fe_calckey/frontend/client/src/components/page/page.textarea-input.vue +++ b/fe_calckey/frontend/client/src/components/page/page.textarea-input.vue @@ -1,12 +1,12 @@ diff --git a/fe_calckey/frontend/client/src/components/page/page.textarea.vue b/fe_calckey/frontend/client/src/components/page/page.textarea.vue index aa72032..21f8178 100644 --- a/fe_calckey/frontend/client/src/components/page/page.textarea.vue +++ b/fe_calckey/frontend/client/src/components/page/page.textarea.vue @@ -1,5 +1,5 @@ diff --git a/fe_calckey/frontend/client/src/components/page/page.vue b/fe_calckey/frontend/client/src/components/page/page.vue index f2079c9..21be7ea 100644 --- a/fe_calckey/frontend/client/src/components/page/page.vue +++ b/fe_calckey/frontend/client/src/components/page/page.vue @@ -1,26 +1,26 @@ diff --git a/fe_calckey/frontend/client/src/config.ts b/fe_calckey/frontend/client/src/config.ts index 52fc761..e89e20c 100644 --- a/fe_calckey/frontend/client/src/config.ts +++ b/fe_calckey/frontend/client/src/config.ts @@ -1,6 +1,6 @@ const address = new URL(location.href); const siteName = ( - document.querySelector('meta[property="og:site_name"]') as HTMLMetaElement + document.querySelector('meta[property="og:site_name"]') as HTMLMetaElement )?.content; export const host = _HOST || address.host; @@ -9,8 +9,8 @@ export const url = _REMOTE_URL || address.origin; export const apiUrl = `${url}/api`; export const feApiUrl = `${url}/fe-api`; export const wsUrl = `${url - .replace("http://", "ws://") - .replace("https://", "wss://")}/streaming`; + .replace("http://", "ws://") + .replace("https://", "wss://")}/streaming`; export const lang = localStorage.getItem("lang"); export const langs = _LANGS_; export const locale = JSON.parse(localStorage.getItem("locale")); diff --git a/fe_calckey/frontend/client/src/const.ts b/fe_calckey/frontend/client/src/const.ts index a73e097..f9cf328 100644 --- a/fe_calckey/frontend/client/src/const.ts +++ b/fe_calckey/frontend/client/src/const.ts @@ -2,41 +2,41 @@ // ここに含まれないものは application/octet-stream としてレスポンスされる // SVGはXSSを生むので許可しない export const FILE_TYPE_BROWSERSAFE = [ - // Images - "image/png", - "image/gif", - "image/jpeg", - "image/webp", - "image/apng", - "image/bmp", - "image/tiff", - "image/x-icon", - "image/avif", + // Images + "image/png", + "image/gif", + "image/jpeg", + "image/webp", + "image/apng", + "image/bmp", + "image/tiff", + "image/x-icon", + "image/avif", - // OggS - "audio/opus", - "video/ogg", - "audio/ogg", - "application/ogg", + // OggS + "audio/opus", + "video/ogg", + "audio/ogg", + "application/ogg", - // ISO/IEC base media file format - "video/quicktime", - "video/mp4", - "audio/mp4", - "video/x-m4v", - "audio/x-m4a", - "video/3gpp", - "video/3gpp2", + // ISO/IEC base media file format + "video/quicktime", + "video/mp4", + "audio/mp4", + "video/x-m4v", + "audio/x-m4a", + "video/3gpp", + "video/3gpp2", - "video/mpeg", - "audio/mpeg", + "video/mpeg", + "audio/mpeg", - "video/webm", - "audio/webm", + "video/webm", + "audio/webm", - "audio/aac", - "audio/x-flac", - "audio/vnd.wave", + "audio/aac", + "audio/x-flac", + "audio/vnd.wave", ]; /* https://github.com/sindresorhus/file-type/blob/main/supported.js diff --git a/fe_calckey/frontend/client/src/directives/adaptive-border.ts b/fe_calckey/frontend/client/src/directives/adaptive-border.ts index c882c49..1c606e5 100644 --- a/fe_calckey/frontend/client/src/directives/adaptive-border.ts +++ b/fe_calckey/frontend/client/src/directives/adaptive-border.ts @@ -1,29 +1,31 @@ import { Directive } from "vue"; export default { - mounted(src, binding, vn) { - const getBgColor = (el: HTMLElement) => { - const style = window.getComputedStyle(el); - if ( - style.backgroundColor && - !["rgba(0, 0, 0, 0)", "rgba(0,0,0,0)", "transparent"].includes( - style.backgroundColor, - ) - ) { - return style.backgroundColor; - } else { - return el.parentElement ? getBgColor(el.parentElement) : "transparent"; - } - }; + mounted(src, binding, vn) { + const getBgColor = (el: HTMLElement) => { + const style = window.getComputedStyle(el); + if ( + style.backgroundColor && + !["rgba(0, 0, 0, 0)", "rgba(0,0,0,0)", "transparent"].includes( + style.backgroundColor + ) + ) { + return style.backgroundColor; + } else { + return el.parentElement + ? getBgColor(el.parentElement) + : "transparent"; + } + }; - const parentBg = getBgColor(src.parentElement); + const parentBg = getBgColor(src.parentElement); - const myBg = window.getComputedStyle(src).backgroundColor; + const myBg = window.getComputedStyle(src).backgroundColor; - if (parentBg === myBg) { - src.style.borderColor = "var(--divider)"; - } else { - src.style.borderColor = myBg; - } - }, + if (parentBg === myBg) { + src.style.borderColor = "var(--divider)"; + } else { + src.style.borderColor = myBg; + } + }, } as Directive; diff --git a/fe_calckey/frontend/client/src/directives/anim.ts b/fe_calckey/frontend/client/src/directives/anim.ts index 9e69e11..0a05169 100644 --- a/fe_calckey/frontend/client/src/directives/anim.ts +++ b/fe_calckey/frontend/client/src/directives/anim.ts @@ -1,18 +1,18 @@ import { Directive } from "vue"; export default { - beforeMount(src, binding, vn) { - src.style.opacity = "0"; - src.style.transform = "scale(0.9)"; - // ページネーションと相性が悪いので - //if (typeof binding.value === 'number') src.style.transitionDelay = `${binding.value * 30}ms`; - src.classList.add("_zoom"); - }, + beforeMount(src, binding, vn) { + src.style.opacity = "0"; + src.style.transform = "scale(0.9)"; + // ページネーションと相性が悪いので + //if (typeof binding.value === 'number') src.style.transitionDelay = `${binding.value * 30}ms`; + src.classList.add("_zoom"); + }, - mounted(src, binding, vn) { - window.setTimeout(() => { - src.style.opacity = "1"; - src.style.transform = "none"; - }, 1); - }, + mounted(src, binding, vn) { + window.setTimeout(() => { + src.style.opacity = "1"; + src.style.transform = "none"; + }, 1); + }, } as Directive; diff --git a/fe_calckey/frontend/client/src/directives/appear.ts b/fe_calckey/frontend/client/src/directives/appear.ts index 16f3218..fa88b92 100644 --- a/fe_calckey/frontend/client/src/directives/appear.ts +++ b/fe_calckey/frontend/client/src/directives/appear.ts @@ -1,22 +1,22 @@ import { Directive } from "vue"; export default { - mounted(src, binding, vn) { - const fn = binding.value; - if (fn == null) return; + mounted(src, binding, vn) { + const fn = binding.value; + if (fn == null) return; - const observer = new IntersectionObserver((entries) => { - if (entries.some((entry) => entry.isIntersecting)) { - fn(); - } - }); + const observer = new IntersectionObserver((entries) => { + if (entries.some((entry) => entry.isIntersecting)) { + fn(); + } + }); - observer.observe(src); + observer.observe(src); - src._observer_ = observer; - }, + src._observer_ = observer; + }, - unmounted(src, binding, vn) { - if (src._observer_) src._observer_.disconnect(); - }, + unmounted(src, binding, vn) { + if (src._observer_) src._observer_.disconnect(); + }, } as Directive; diff --git a/fe_calckey/frontend/client/src/directives/click-anime.ts b/fe_calckey/frontend/client/src/directives/click-anime.ts index ee1cc59..9a31351 100644 --- a/fe_calckey/frontend/client/src/directives/click-anime.ts +++ b/fe_calckey/frontend/client/src/directives/click-anime.ts @@ -2,8 +2,8 @@ import { Directive } from "vue"; import { defaultStore } from "@/store"; export default { - mounted(el, binding, vn) { - /* + mounted(el, binding, vn) { + /* if (!defaultStore.state.animation) return; el.classList.add('_anime_bounce_standBy'); @@ -27,5 +27,5 @@ export default { el.classList.add('_anime_bounce_standBy'); }); */ - }, + }, } as Directive; diff --git a/fe_calckey/frontend/client/src/directives/focus.ts b/fe_calckey/frontend/client/src/directives/focus.ts index 36b2c2d..a5303c1 100644 --- a/fe_calckey/frontend/client/src/directives/focus.ts +++ b/fe_calckey/frontend/client/src/directives/focus.ts @@ -1,3 +1,3 @@ export default { - mounted: (el) => el.focus(), + mounted: (el) => el.focus(), }; diff --git a/fe_calckey/frontend/client/src/directives/follow-append.ts b/fe_calckey/frontend/client/src/directives/follow-append.ts index 1c50062..1f7de8f 100644 --- a/fe_calckey/frontend/client/src/directives/follow-append.ts +++ b/fe_calckey/frontend/client/src/directives/follow-append.ts @@ -2,38 +2,38 @@ import { Directive } from "vue"; import { getScrollContainer, getScrollPosition } from "@/scripts/scroll"; export default { - mounted(src, binding, vn) { - if (binding.value === false) return; + mounted(src, binding, vn) { + if (binding.value === false) return; - let isBottom = true; + let isBottom = true; - const container = getScrollContainer(src)!; - container.addEventListener( - "scroll", - () => { - const pos = getScrollPosition(container); - const viewHeight = container.clientHeight; - const height = container.scrollHeight; - isBottom = pos + viewHeight > height - 32; - }, - { passive: true }, - ); - container.scrollTop = container.scrollHeight; + const container = getScrollContainer(src)!; + container.addEventListener( + "scroll", + () => { + const pos = getScrollPosition(container); + const viewHeight = container.clientHeight; + const height = container.scrollHeight; + isBottom = pos + viewHeight > height - 32; + }, + { passive: true } + ); + container.scrollTop = container.scrollHeight; - const ro = new ResizeObserver((entries, observer) => { - if (isBottom) { - const height = container.scrollHeight; - container.scrollTop = height; - } - }); + const ro = new ResizeObserver((entries, observer) => { + if (isBottom) { + const height = container.scrollHeight; + container.scrollTop = height; + } + }); - ro.observe(src); + ro.observe(src); - // TODO: 新たにプロパティを作るのをやめMapを使う - src._ro_ = ro; - }, + // TODO: 新たにプロパティを作るのをやめMapを使う + src._ro_ = ro; + }, - unmounted(src, binding, vn) { - if (src._ro_) src._ro_.unobserve(src); - }, + unmounted(src, binding, vn) { + if (src._ro_) src._ro_.unobserve(src); + }, } as Directive; diff --git a/fe_calckey/frontend/client/src/directives/get-size.ts b/fe_calckey/frontend/client/src/directives/get-size.ts index 69278a2..a0990c0 100644 --- a/fe_calckey/frontend/client/src/directives/get-size.ts +++ b/fe_calckey/frontend/client/src/directives/get-size.ts @@ -1,57 +1,57 @@ import { Directive } from "vue"; const mountings = new Map< - Element, - { - resize: ResizeObserver; - intersection?: IntersectionObserver; - fn: (w: number, h: number) => void; - } + Element, + { + resize: ResizeObserver; + intersection?: IntersectionObserver; + fn: (w: number, h: number) => void; + } >(); function calc(src: Element) { - const info = mountings.get(src); - const height = src.clientHeight; - const width = src.clientWidth; + const info = mountings.get(src); + const height = src.clientHeight; + const width = src.clientWidth; - if (!info) return; + if (!info) return; - // アクティベート前などでsrcが描画されていない場合 - if (!height) { - // IntersectionObserverで表示検出する - if (!info.intersection) { - info.intersection = new IntersectionObserver((entries) => { - if (entries.some((entry) => entry.isIntersecting)) calc(src); - }); - } - info.intersection.observe(src); - return; - } - if (info.intersection) { - info.intersection.disconnect(); - info.intersection = undefined; - } + // アクティベート前などでsrcが描画されていない場合 + if (!height) { + // IntersectionObserverで表示検出する + if (!info.intersection) { + info.intersection = new IntersectionObserver((entries) => { + if (entries.some((entry) => entry.isIntersecting)) calc(src); + }); + } + info.intersection.observe(src); + return; + } + if (info.intersection) { + info.intersection.disconnect(); + info.intersection = undefined; + } - info.fn(width, height); + info.fn(width, height); } export default { - mounted(src, binding, vn) { - const resize = new ResizeObserver((entries, observer) => { - calc(src); - }); - resize.observe(src); + mounted(src, binding, vn) { + const resize = new ResizeObserver((entries, observer) => { + calc(src); + }); + resize.observe(src); - mountings.set(src, { resize, fn: binding.value }); - calc(src); - }, + mountings.set(src, { resize, fn: binding.value }); + calc(src); + }, - unmounted(src, binding, vn) { - binding.value(0, 0); - const info = mountings.get(src); - if (!info) return; - info.resize.disconnect(); - if (info.intersection) info.intersection.disconnect(); - mountings.delete(src); - }, + unmounted(src, binding, vn) { + binding.value(0, 0); + const info = mountings.get(src); + if (!info) return; + info.resize.disconnect(); + if (info.intersection) info.intersection.disconnect(); + mountings.delete(src); + }, } as Directive void>; diff --git a/fe_calckey/frontend/client/src/directives/hotkey.ts b/fe_calckey/frontend/client/src/directives/hotkey.ts index 8df74c4..6619421 100644 --- a/fe_calckey/frontend/client/src/directives/hotkey.ts +++ b/fe_calckey/frontend/client/src/directives/hotkey.ts @@ -2,23 +2,23 @@ import { Directive } from "vue"; import { makeHotkey } from "../scripts/hotkey"; export default { - mounted(el, binding) { - el._hotkey_global = binding.modifiers.global === true; + mounted(el, binding) { + el._hotkey_global = binding.modifiers.global === true; - el._keyHandler = makeHotkey(binding.value); + el._keyHandler = makeHotkey(binding.value); - if (el._hotkey_global) { - document.addEventListener("keydown", el._keyHandler); - } else { - el.addEventListener("keydown", el._keyHandler); - } - }, + if (el._hotkey_global) { + document.addEventListener("keydown", el._keyHandler); + } else { + el.addEventListener("keydown", el._keyHandler); + } + }, - unmounted(el) { - if (el._hotkey_global) { - document.removeEventListener("keydown", el._keyHandler); - } else { - el.removeEventListener("keydown", el._keyHandler); - } - }, + unmounted(el) { + if (el._hotkey_global) { + document.removeEventListener("keydown", el._keyHandler); + } else { + el.removeEventListener("keydown", el._keyHandler); + } + }, } as Directive; diff --git a/fe_calckey/frontend/client/src/directives/index.ts b/fe_calckey/frontend/client/src/directives/index.ts index 77639e2..6bedcaf 100644 --- a/fe_calckey/frontend/client/src/directives/index.ts +++ b/fe_calckey/frontend/client/src/directives/index.ts @@ -14,17 +14,17 @@ import adaptiveBorder from "./adaptive-border"; import focus from "./focus"; export default function (app: App) { - app.directive("userPreview", userPreview); - app.directive("user-preview", userPreview); - app.directive("size", size); - app.directive("get-size", getSize); - app.directive("ripple", ripple); - app.directive("tooltip", tooltip); - app.directive("hotkey", hotkey); - app.directive("appear", appear); - app.directive("anim", anim); - app.directive("click-anime", clickAnime); - app.directive("panel", panel); - app.directive("adaptive-border", adaptiveBorder); - app.directive("focus", focus); + app.directive("userPreview", userPreview); + app.directive("user-preview", userPreview); + app.directive("size", size); + app.directive("get-size", getSize); + app.directive("ripple", ripple); + app.directive("tooltip", tooltip); + app.directive("hotkey", hotkey); + app.directive("appear", appear); + app.directive("anim", anim); + app.directive("click-anime", clickAnime); + app.directive("panel", panel); + app.directive("adaptive-border", adaptiveBorder); + app.directive("focus", focus); } diff --git a/fe_calckey/frontend/client/src/directives/panel.ts b/fe_calckey/frontend/client/src/directives/panel.ts index 229f726..510b0cc 100644 --- a/fe_calckey/frontend/client/src/directives/panel.ts +++ b/fe_calckey/frontend/client/src/directives/panel.ts @@ -1,31 +1,33 @@ import { Directive } from "vue"; export default { - mounted(src, binding, vn) { - const getBgColor = (el: HTMLElement) => { - const style = window.getComputedStyle(el); - if ( - style.backgroundColor && - !["rgba(0, 0, 0, 0)", "rgba(0,0,0,0)", "transparent"].includes( - style.backgroundColor, - ) - ) { - return style.backgroundColor; - } else { - return el.parentElement ? getBgColor(el.parentElement) : "transparent"; - } - }; + mounted(src, binding, vn) { + const getBgColor = (el: HTMLElement) => { + const style = window.getComputedStyle(el); + if ( + style.backgroundColor && + !["rgba(0, 0, 0, 0)", "rgba(0,0,0,0)", "transparent"].includes( + style.backgroundColor + ) + ) { + return style.backgroundColor; + } else { + return el.parentElement + ? getBgColor(el.parentElement) + : "transparent"; + } + }; - const parentBg = getBgColor(src.parentElement); + const parentBg = getBgColor(src.parentElement); - const myBg = getComputedStyle(document.documentElement).getPropertyValue( - "--panel", - ); + const myBg = getComputedStyle( + document.documentElement + ).getPropertyValue("--panel"); - if (parentBg === myBg) { - src.style.backgroundColor = "var(--bg)"; - } else { - src.style.backgroundColor = "var(--panel)"; - } - }, + if (parentBg === myBg) { + src.style.backgroundColor = "var(--bg)"; + } else { + src.style.backgroundColor = "var(--panel)"; + } + }, } as Directive; diff --git a/fe_calckey/frontend/client/src/directives/ripple.ts b/fe_calckey/frontend/client/src/directives/ripple.ts index 395f1a0..9fc072a 100644 --- a/fe_calckey/frontend/client/src/directives/ripple.ts +++ b/fe_calckey/frontend/client/src/directives/ripple.ts @@ -2,17 +2,17 @@ import Ripple from "@/components/MkRipple.vue"; import { popup } from "@/os"; export default { - mounted(el, binding, vn) { - // 明示的に false であればバインドしない - if (binding.value === false) return; + mounted(el, binding, vn) { + // 明示的に false であればバインドしない + if (binding.value === false) return; - el.addEventListener("click", () => { - const rect = el.getBoundingClientRect(); + el.addEventListener("click", () => { + const rect = el.getBoundingClientRect(); - const x = rect.left + el.offsetWidth / 2; - const y = rect.top + el.offsetHeight / 2; + const x = rect.left + el.offsetWidth / 2; + const y = rect.top + el.offsetHeight / 2; - popup(Ripple, { x, y }, {}, "end"); - }); - }, + popup(Ripple, { x, y }, {}, "end"); + }); + }, }; diff --git a/fe_calckey/frontend/client/src/directives/size.ts b/fe_calckey/frontend/client/src/directives/size.ts index 90d868c..0b7954d 100644 --- a/fe_calckey/frontend/client/src/directives/size.ts +++ b/fe_calckey/frontend/client/src/directives/size.ts @@ -4,116 +4,120 @@ type Value = { max?: number[]; min?: number[] }; //const observers = new Map(); const mountings = new Map< - Element, - { - value: Value; - resize: ResizeObserver; - intersection?: IntersectionObserver; - previousWidth: number; - } + Element, + { + value: Value; + resize: ResizeObserver; + intersection?: IntersectionObserver; + previousWidth: number; + } >(); type ClassOrder = { - add: string[]; - remove: string[]; + add: string[]; + remove: string[]; }; const cache = new Map(); function getClassOrder(width: number, queue: Value): ClassOrder { - const getMaxClass = (v: number) => `max-width_${v}px`; - const getMinClass = (v: number) => `min-width_${v}px`; + const getMaxClass = (v: number) => `max-width_${v}px`; + const getMinClass = (v: number) => `min-width_${v}px`; - return { - add: [ - ...(queue.max - ? queue.max.filter((v) => width <= v).map(getMaxClass) - : []), - ...(queue.min - ? queue.min.filter((v) => width >= v).map(getMinClass) - : []), - ], - remove: [ - ...(queue.max ? queue.max.filter((v) => width > v).map(getMaxClass) : []), - ...(queue.min ? queue.min.filter((v) => width < v).map(getMinClass) : []), - ], - }; + return { + add: [ + ...(queue.max + ? queue.max.filter((v) => width <= v).map(getMaxClass) + : []), + ...(queue.min + ? queue.min.filter((v) => width >= v).map(getMinClass) + : []), + ], + remove: [ + ...(queue.max + ? queue.max.filter((v) => width > v).map(getMaxClass) + : []), + ...(queue.min + ? queue.min.filter((v) => width < v).map(getMinClass) + : []), + ], + }; } function applyClassOrder(el: Element, order: ClassOrder) { - el.classList.add(...order.add); - el.classList.remove(...order.remove); + el.classList.add(...order.add); + el.classList.remove(...order.remove); } function getOrderName(width: number, queue: Value): string { - return `${width}|${queue.max ? queue.max.join(",") : ""}|${ - queue.min ? queue.min.join(",") : "" - }`; + return `${width}|${queue.max ? queue.max.join(",") : ""}|${ + queue.min ? queue.min.join(",") : "" + }`; } function calc(el: Element) { - const info = mountings.get(el); - const width = el.clientWidth; + const info = mountings.get(el); + const width = el.clientWidth; - if (!info || info.previousWidth === width) return; + if (!info || info.previousWidth === width) return; - // アクティベート前などでsrcが描画されていない場合 - if (!width) { - // IntersectionObserverで表示検出する - if (!info.intersection) { - info.intersection = new IntersectionObserver((entries) => { - if (entries.some((entry) => entry.isIntersecting)) calc(el); - }); - } - info.intersection.observe(el); - return; - } - if (info.intersection) { - info.intersection.disconnect(); - info.intersection = undefined; - } + // アクティベート前などでsrcが描画されていない場合 + if (!width) { + // IntersectionObserverで表示検出する + if (!info.intersection) { + info.intersection = new IntersectionObserver((entries) => { + if (entries.some((entry) => entry.isIntersecting)) calc(el); + }); + } + info.intersection.observe(el); + return; + } + if (info.intersection) { + info.intersection.disconnect(); + info.intersection = undefined; + } - mountings.set(el, Object.assign(info, { previousWidth: width })); + mountings.set(el, Object.assign(info, { previousWidth: width })); - const cached = cache.get(getOrderName(width, info.value)); - if (cached) { - applyClassOrder(el, cached); - } else { - const order = getClassOrder(width, info.value); - cache.set(getOrderName(width, info.value), order); - applyClassOrder(el, order); - } + const cached = cache.get(getOrderName(width, info.value)); + if (cached) { + applyClassOrder(el, cached); + } else { + const order = getClassOrder(width, info.value); + cache.set(getOrderName(width, info.value), order); + applyClassOrder(el, order); + } } export default { - mounted(src, binding, vn) { - const resize = new ResizeObserver((entries, observer) => { - calc(src); - }); + mounted(src, binding, vn) { + const resize = new ResizeObserver((entries, observer) => { + calc(src); + }); - mountings.set(src, { - value: binding.value, - resize, - previousWidth: 0, - }); + mountings.set(src, { + value: binding.value, + resize, + previousWidth: 0, + }); - calc(src); - resize.observe(src); - }, + calc(src); + resize.observe(src); + }, - updated(src, binding, vn) { - mountings.set( - src, - Object.assign({}, mountings.get(src), { value: binding.value }), - ); - calc(src); - }, + updated(src, binding, vn) { + mountings.set( + src, + Object.assign({}, mountings.get(src), { value: binding.value }) + ); + calc(src); + }, - unmounted(src, binding, vn) { - const info = mountings.get(src); - if (!info) return; - info.resize.disconnect(); - if (info.intersection) info.intersection.disconnect(); - mountings.delete(src); - }, + unmounted(src, binding, vn) { + const info = mountings.get(src); + if (!info) return; + info.resize.disconnect(); + if (info.intersection) info.intersection.disconnect(); + mountings.delete(src); + }, } as Directive; diff --git a/fe_calckey/frontend/client/src/directives/tooltip.ts b/fe_calckey/frontend/client/src/directives/tooltip.ts index e2db3fb..0e3ae3f 100644 --- a/fe_calckey/frontend/client/src/directives/tooltip.ts +++ b/fe_calckey/frontend/client/src/directives/tooltip.ts @@ -10,112 +10,114 @@ const start = isTouchUsing ? "touchstart" : "mouseover"; const end = isTouchUsing ? "touchend" : "mouseleave"; export default { - mounted(el: HTMLElement, binding, vn) { - const delay = binding.modifiers.noDelay ? 0 : 100; + mounted(el: HTMLElement, binding, vn) { + const delay = binding.modifiers.noDelay ? 0 : 100; - const self = ((el as any)._tooltipDirective_ = {} as any); + const self = ((el as any)._tooltipDirective_ = {} as any); - self.text = binding.value as string; - self._close = null; - self.showTimer = null; - self.hideTimer = null; - self.checkTimer = null; + self.text = binding.value as string; + self._close = null; + self.showTimer = null; + self.hideTimer = null; + self.checkTimer = null; - if (!binding.modifiers.noLabel) { - if (!document.body.contains(el)) return; - if (self.text == null) return; - el.setAttribute("aria-label", self.text); - } + if (!binding.modifiers.noLabel) { + if (!document.body.contains(el)) return; + if (self.text == null) return; + el.setAttribute("aria-label", self.text); + } - self.close = () => { - if (self._close) { - window.clearInterval(self.checkTimer); - self._close(); - self._close = null; - } - }; + self.close = () => { + if (self._close) { + window.clearInterval(self.checkTimer); + self._close(); + self._close = null; + } + }; - if (binding.arg === "dialog") { - el.addEventListener("click", (ev) => { - ev.preventDefault(); - ev.stopPropagation(); - alert({ - type: "info", - text: binding.value, - }); - return false; - }); - } + if (binding.arg === "dialog") { + el.addEventListener("click", (ev) => { + ev.preventDefault(); + ev.stopPropagation(); + alert({ + type: "info", + text: binding.value, + }); + return false; + }); + } - self.show = () => { - if (!document.body.contains(el)) return; - if (self._close) return; - if (self.text == null) return; + self.show = () => { + if (!document.body.contains(el)) return; + if (self._close) return; + if (self.text == null) return; - const showing = ref(true); - popup( - defineAsyncComponent(() => import("@/components/MkTooltip.vue")), - { - showing, - text: self.text, - asMfm: binding.modifiers.mfm, - direction: binding.modifiers.left - ? "left" - : binding.modifiers.right - ? "right" - : binding.modifiers.top - ? "top" - : binding.modifiers.bottom - ? "bottom" - : "top", - targetElement: el, - }, - {}, - "closed", - ); + const showing = ref(true); + popup( + defineAsyncComponent( + () => import("@/components/MkTooltip.vue") + ), + { + showing, + text: self.text, + asMfm: binding.modifiers.mfm, + direction: binding.modifiers.left + ? "left" + : binding.modifiers.right + ? "right" + : binding.modifiers.top + ? "top" + : binding.modifiers.bottom + ? "bottom" + : "top", + targetElement: el, + }, + {}, + "closed" + ); - self._close = () => { - showing.value = false; - }; - }; + self._close = () => { + showing.value = false; + }; + }; - el.addEventListener("selectstart", (ev) => { - ev.preventDefault(); - }); + el.addEventListener("selectstart", (ev) => { + ev.preventDefault(); + }); - function showTooltip() { - window.clearTimeout(self.showTimer); - window.clearTimeout(self.hideTimer); - self.showTimer = window.setTimeout(self.show, delay); - } - function hideTooltip() { - window.clearTimeout(self.showTimer); - window.clearTimeout(self.hideTimer); - self.hideTimer = window.setTimeout(self.close, delay); - } + function showTooltip() { + window.clearTimeout(self.showTimer); + window.clearTimeout(self.hideTimer); + self.showTimer = window.setTimeout(self.show, delay); + } + function hideTooltip() { + window.clearTimeout(self.showTimer); + window.clearTimeout(self.hideTimer); + self.hideTimer = window.setTimeout(self.close, delay); + } - el.addEventListener(start, showTooltip, { passive: true }); - el.addEventListener("focusin", showTooltip, { passive: true }); + el.addEventListener(start, showTooltip, { passive: true }); + el.addEventListener("focusin", showTooltip, { passive: true }); - el.addEventListener(end, hideTooltip, { passive: true }); - el.addEventListener("focusout", hideTooltip, { passive: true }); + el.addEventListener(end, hideTooltip, { passive: true }); + el.addEventListener("focusout", hideTooltip, { passive: true }); - mainRouter.on("change", hideTooltip); + mainRouter.on("change", hideTooltip); - el.addEventListener("click", () => { - window.clearTimeout(self.showTimer); - self.close(); - }); - }, + el.addEventListener("click", () => { + window.clearTimeout(self.showTimer); + self.close(); + }); + }, - updated(el, binding) { - const self = el._tooltipDirective_; - self.text = binding.value as string; - }, + updated(el, binding) { + const self = el._tooltipDirective_; + self.text = binding.value as string; + }, - unmounted(el, binding, vn) { - const self = el._tooltipDirective_; - window.clearInterval(self.checkTimer); - self.close(); - }, + unmounted(el, binding, vn) { + const self = el._tooltipDirective_; + window.clearInterval(self.checkTimer); + self.close(); + }, } as Directive; diff --git a/fe_calckey/frontend/client/src/directives/user-preview.ts b/fe_calckey/frontend/client/src/directives/user-preview.ts index a021093..46e5034 100644 --- a/fe_calckey/frontend/client/src/directives/user-preview.ts +++ b/fe_calckey/frontend/client/src/directives/user-preview.ts @@ -3,121 +3,123 @@ import autobind from "autobind-decorator"; import { popup } from "@/os"; export class UserPreview { - private el; - private user; - private showTimer; - private hideTimer; - private checkTimer; - private promise; + private el; + private user; + private showTimer; + private hideTimer; + private checkTimer; + private promise; - constructor(el, user) { - this.el = el; - this.user = user; + constructor(el, user) { + this.el = el; + this.user = user; - this.attach(); - } + this.attach(); + } - @autobind - private show() { - if (!document.body.contains(this.el)) return; - if (this.promise) return; + @autobind + private show() { + if (!document.body.contains(this.el)) return; + if (this.promise) return; - const showing = ref(true); + const showing = ref(true); - popup( - defineAsyncComponent(() => import("@/components/MkUserPreview.vue")), - { - showing, - q: this.user, - source: this.el, - }, - { - mouseover: () => { - window.clearTimeout(this.hideTimer); - }, - mouseleave: () => { - window.clearTimeout(this.showTimer); - this.hideTimer = window.setTimeout(this.close, 500); - }, - }, - "closed", - ); + popup( + defineAsyncComponent( + () => import("@/components/MkUserPreview.vue") + ), + { + showing, + q: this.user, + source: this.el, + }, + { + mouseover: () => { + window.clearTimeout(this.hideTimer); + }, + mouseleave: () => { + window.clearTimeout(this.showTimer); + this.hideTimer = window.setTimeout(this.close, 500); + }, + }, + "closed" + ); - this.promise = { - cancel: () => { - showing.value = false; - }, - }; + this.promise = { + cancel: () => { + showing.value = false; + }, + }; - this.checkTimer = window.setInterval(() => { - if (!document.body.contains(this.el)) { - window.clearTimeout(this.showTimer); - window.clearTimeout(this.hideTimer); - this.close(); - } - }, 1000); - } + this.checkTimer = window.setInterval(() => { + if (!document.body.contains(this.el)) { + window.clearTimeout(this.showTimer); + window.clearTimeout(this.hideTimer); + this.close(); + } + }, 1000); + } - @autobind - private close() { - if (this.promise) { - window.clearInterval(this.checkTimer); - this.promise.cancel(); - this.promise = null; - } - } + @autobind + private close() { + if (this.promise) { + window.clearInterval(this.checkTimer); + this.promise.cancel(); + this.promise = null; + } + } - @autobind - private onMouseover() { - window.clearTimeout(this.showTimer); - window.clearTimeout(this.hideTimer); - this.showTimer = window.setTimeout(this.show, 500); - } + @autobind + private onMouseover() { + window.clearTimeout(this.showTimer); + window.clearTimeout(this.hideTimer); + this.showTimer = window.setTimeout(this.show, 500); + } - @autobind - private onMouseleave() { - window.clearTimeout(this.showTimer); - window.clearTimeout(this.hideTimer); - this.hideTimer = window.setTimeout(this.close, 500); - } + @autobind + private onMouseleave() { + window.clearTimeout(this.showTimer); + window.clearTimeout(this.hideTimer); + this.hideTimer = window.setTimeout(this.close, 500); + } - @autobind - private onClick() { - window.clearTimeout(this.showTimer); - this.close(); - } + @autobind + private onClick() { + window.clearTimeout(this.showTimer); + this.close(); + } - @autobind - public attach() { - this.el.addEventListener("mouseover", this.onMouseover); - this.el.addEventListener("mouseleave", this.onMouseleave); - this.el.addEventListener("click", this.onClick); - } + @autobind + public attach() { + this.el.addEventListener("mouseover", this.onMouseover); + this.el.addEventListener("mouseleave", this.onMouseleave); + this.el.addEventListener("click", this.onClick); + } - @autobind - public detach() { - this.el.removeEventListener("mouseover", this.onMouseover); - this.el.removeEventListener("mouseleave", this.onMouseleave); - this.el.removeEventListener("click", this.onClick); - window.clearInterval(this.checkTimer); - } + @autobind + public detach() { + this.el.removeEventListener("mouseover", this.onMouseover); + this.el.removeEventListener("mouseleave", this.onMouseleave); + this.el.removeEventListener("click", this.onClick); + window.clearInterval(this.checkTimer); + } } export default { - mounted(el: HTMLElement, binding, vn) { - if (binding.value == null) return; + mounted(el: HTMLElement, binding, vn) { + if (binding.value == null) return; - // TODO: 新たにプロパティを作るのをやめMapを使う - // ただメモリ的には↓の方が省メモリかもしれないので検討中 - const self = ((el as any)._userPreviewDirective_ = {} as any); + // TODO: 新たにプロパティを作るのをやめMapを使う + // ただメモリ的には↓の方が省メモリかもしれないので検討中 + const self = ((el as any)._userPreviewDirective_ = {} as any); - self.preview = new UserPreview(el, binding.value); - }, + self.preview = new UserPreview(el, binding.value); + }, - unmounted(el, binding, vn) { - if (binding.value == null) return; + unmounted(el, binding, vn) { + if (binding.value == null) return; - const self = el._userPreviewDirective_; - self.preview.detach(); - }, + const self = el._userPreviewDirective_; + self.preview.detach(); + }, } as Directive; diff --git a/fe_calckey/frontend/client/src/filters/bytes.ts b/fe_calckey/frontend/client/src/filters/bytes.ts index 45cd7bf..2a63629 100644 --- a/fe_calckey/frontend/client/src/filters/bytes.ts +++ b/fe_calckey/frontend/client/src/filters/bytes.ts @@ -1,13 +1,13 @@ export default (v, digits = 0) => { - if (v == null) return "?"; - const sizes = ["B", "KB", "MB", "GB", "TB"]; - if (v === 0) return "0"; - const isMinus = v < 0; - if (isMinus) v = -v; - const i = Math.floor(Math.log(v) / Math.log(1024)); - return ( - (isMinus ? "-" : "") + - (v / Math.pow(1024, i)).toFixed(digits).replace(/\.0+$/, "") + - sizes[i] - ); + if (v == null) return "?"; + const sizes = ["B", "KB", "MB", "GB", "TB"]; + if (v === 0) return "0"; + const isMinus = v < 0; + if (isMinus) v = -v; + const i = Math.floor(Math.log(v) / Math.log(1024)); + return ( + (isMinus ? "-" : "") + + (v / Math.pow(1024, i)).toFixed(digits).replace(/\.0+$/, "") + + sizes[i] + ); }; diff --git a/fe_calckey/frontend/client/src/filters/note.ts b/fe_calckey/frontend/client/src/filters/note.ts index 5677f6b..2c5402e 100644 --- a/fe_calckey/frontend/client/src/filters/note.ts +++ b/fe_calckey/frontend/client/src/filters/note.ts @@ -1,3 +1,3 @@ export const notePage = (note) => { - return `/notes/${note.id}`; + return `/notes/${note.id}`; }; diff --git a/fe_calckey/frontend/client/src/filters/user.ts b/fe_calckey/frontend/client/src/filters/user.ts index 99c96cb..e032b04 100644 --- a/fe_calckey/frontend/client/src/filters/user.ts +++ b/fe_calckey/frontend/client/src/filters/user.ts @@ -3,13 +3,13 @@ import * as Acct from "calckey-js/built/acct"; import { url } from "@/config"; export const acct = (user: misskey.Acct) => { - return Acct.toString(user); + return Acct.toString(user); }; export const userName = (user: misskey.entities.User) => { - return user.name || user.username; + return user.name || user.username; }; export const userPage = (user: misskey.Acct, path?, absolute = false) => { - return `${absolute ? url : ""}/@${acct(user)}${path ? `/${path}` : ""}`; + return `${absolute ? url : ""}/@${acct(user)}${path ? `/${path}` : ""}`; }; diff --git a/fe_calckey/frontend/client/src/i18n.ts b/fe_calckey/frontend/client/src/i18n.ts index 5b0a7f9..67c48f8 100644 --- a/fe_calckey/frontend/client/src/i18n.ts +++ b/fe_calckey/frontend/client/src/i18n.ts @@ -6,8 +6,8 @@ export const i18n = markRaw(new I18n(locale)); // このファイルに書きたくないけどここに書かないと何故かVeturが認識しない declare module "@vue/runtime-core" { - interface ComponentCustomProperties { - $t: typeof i18n["t"]; - $ts: typeof i18n["locale"]; - } + interface ComponentCustomProperties { + $t: (typeof i18n)["t"]; + $ts: (typeof i18n)["locale"]; + } } diff --git a/fe_calckey/frontend/client/src/init.ts b/fe_calckey/frontend/client/src/init.ts index afde340..ca0c1a9 100644 --- a/fe_calckey/frontend/client/src/init.ts +++ b/fe_calckey/frontend/client/src/init.ts @@ -12,20 +12,20 @@ import "@phosphor-icons/web/fill"; //#region account indexedDB migration import { set } from "@/scripts/idb-proxy"; -const accounts = localStorage.getItem("accounts") +const accounts = localStorage.getItem("accounts"); if (accounts) { - set("accounts", JSON.parse(accounts)); - localStorage.removeItem("accounts"); + set("accounts", JSON.parse(accounts)); + localStorage.removeItem("accounts"); } //#endregion import { - computed, - createApp, - watch, - markRaw, - version as vueVersion, - defineAsyncComponent, + computed, + createApp, + watch, + markRaw, + version as vueVersion, + defineAsyncComponent, } from "vue"; import { compareVersions } from "compare-versions"; @@ -52,426 +52,430 @@ import { getUrlWithoutLoginId } from "@/scripts/login-id"; import { getAccountFromId } from "@/scripts/get-account-from-id"; function checkForSplash() { - const splash = document.getElementById("splash"); - // 念のためnullチェック(HTMLが古い場合があるため(そのうち消す)) - if (splash) { - splash.style.opacity = "0"; - splash.style.pointerEvents = "none"; - splash.addEventListener("transitionend", () => { - splash.remove(); - }); - } + const splash = document.getElementById("splash"); + // 念のためnullチェック(HTMLが古い場合があるため(そのうち消す)) + if (splash) { + splash.style.opacity = "0"; + splash.style.pointerEvents = "none"; + splash.addEventListener("transitionend", () => { + splash.remove(); + }); + } } (async () => { - console.info(`Calckey v${version}`); + console.info(`Calckey v${version}`); - if (_DEV_) { - console.warn("Development mode!!!"); + if (_DEV_) { + console.warn("Development mode!!!"); - console.info(`vue ${vueVersion}`); + console.info(`vue ${vueVersion}`); - (window as any).$i = $i; - (window as any).$store = defaultStore; + (window as any).$i = $i; + (window as any).$store = defaultStore; - window.addEventListener("error", (event) => { - console.error(event); - /* + window.addEventListener("error", (event) => { + console.error(event); + /* alert({ type: 'error', title: 'DEV: Unhandled error', text: event.message }); */ - }); + }); - window.addEventListener("unhandledrejection", (event) => { - console.error(event); - /* + window.addEventListener("unhandledrejection", (event) => { + console.error(event); + /* alert({ type: 'error', title: 'DEV: Unhandled promise rejection', text: event.reason }); */ - }); - } + }); + } - // タッチデバイスでCSSの:hoverを機能させる - document.addEventListener("touchend", () => {}, { passive: true }); + // タッチデバイスでCSSの:hoverを機能させる + document.addEventListener("touchend", () => {}, { passive: true }); - // 一斉リロード - reloadChannel.addEventListener("message", (path) => { - if (path !== null) location.href = path; - else location.reload(); - }); + // 一斉リロード + reloadChannel.addEventListener("message", (path) => { + if (path !== null) location.href = path; + else location.reload(); + }); - //#region SEE: https://css-tricks.com/the-trick-to-viewport-units-on-mobile/ - // TODO: いつの日にか消したい - const vh = window.innerHeight * 0.01; - document.documentElement.style.setProperty("--vh", `${vh}px`); - window.addEventListener("resize", () => { - const vh = window.innerHeight * 0.01; - document.documentElement.style.setProperty("--vh", `${vh}px`); - }); - //#endregion + //#region SEE: https://css-tricks.com/the-trick-to-viewport-units-on-mobile/ + // TODO: いつの日にか消したい + const vh = window.innerHeight * 0.01; + document.documentElement.style.setProperty("--vh", `${vh}px`); + window.addEventListener("resize", () => { + const vh = window.innerHeight * 0.01; + document.documentElement.style.setProperty("--vh", `${vh}px`); + }); + //#endregion - //#region Set lang attr - const html = document.documentElement; - html.setAttribute("lang", lang || "en-US"); - //#endregion + //#region Set lang attr + const html = document.documentElement; + html.setAttribute("lang", lang || "en-US"); + //#endregion - //#region loginId - const params = new URLSearchParams(location.search); - const loginId = params.get("loginId"); + //#region loginId + const params = new URLSearchParams(location.search); + const loginId = params.get("loginId"); - if (loginId) { - const target = getUrlWithoutLoginId(location.href); + if (loginId) { + const target = getUrlWithoutLoginId(location.href); - if (!$i || $i.id !== loginId) { - const account = await getAccountFromId(loginId); - if (account) { - await login(account.token, target); - } - } + if (!$i || $i.id !== loginId) { + const account = await getAccountFromId(loginId); + if (account) { + await login(account.token, target); + } + } - history.replaceState({ misskey: "loginId" }, "", target); - } + history.replaceState({ misskey: "loginId" }, "", target); + } - //#endregion + //#endregion - //#region Fetch user - if ($i?.token) { - if (_DEV_) { - console.log("account cache found. refreshing..."); - } + //#region Fetch user + if ($i?.token) { + if (_DEV_) { + console.log("account cache found. refreshing..."); + } - refreshAccount(); - } else { - if (_DEV_) { - console.log("no account cache found."); - } + refreshAccount(); + } else { + if (_DEV_) { + console.log("no account cache found."); + } - // 連携ログインの場合用にCookieを参照する - const i = (document.cookie.match(/igi=(\w+)/) || [null, null])[1]; + // 連携ログインの場合用にCookieを参照する + const i = (document.cookie.match(/igi=(\w+)/) || [null, null])[1]; - if (i != null && i !== "null") { - if (_DEV_) { - console.log("signing..."); - } + if (i != null && i !== "null") { + if (_DEV_) { + console.log("signing..."); + } - try { - document.body.innerHTML = "
Please wait...
"; - await login(i); - } catch (err) { - // Render the error screen - // TODO: ちゃんとしたコンポーネントをレンダリングする(v10とかのトラブルシューティングゲーム付きのやつみたいな) - document.body.innerHTML = '
Oops!
'; - } - } else { - if (_DEV_) { - console.log("not signed in"); - } - } - } - //#endregion + try { + document.body.innerHTML = "
Please wait...
"; + await login(i); + } catch (err) { + // Render the error screen + // TODO: ちゃんとしたコンポーネントをレンダリングする(v10とかのトラブルシューティングゲーム付きのやつみたいな) + document.body.innerHTML = '
Oops!
'; + } + } else { + if (_DEV_) { + console.log("not signed in"); + } + } + } + //#endregion - const fetchInstanceMetaPromise = fetchInstance(); + const fetchInstanceMetaPromise = fetchInstance(); - fetchInstanceMetaPromise.then(() => { - localStorage.setItem("v", instance.version); + fetchInstanceMetaPromise.then(() => { + localStorage.setItem("v", instance.version); - // Init service worker - initializeSw(); - }); + // Init service worker + initializeSw(); + }); - const app = createApp( - window.location.search === "?zen" - ? defineAsyncComponent(() => import("@/ui/zen.vue")) - : !$i - ? defineAsyncComponent(() => import("@/ui/visitor.vue")) - : ui === "deck" - ? defineAsyncComponent(() => import("@/ui/deck.vue")) - : defineAsyncComponent(() => import("@/ui/universal.vue")), - ); + const app = createApp( + window.location.search === "?zen" + ? defineAsyncComponent(() => import("@/ui/zen.vue")) + : !$i + ? defineAsyncComponent(() => import("@/ui/visitor.vue")) + : ui === "deck" + ? defineAsyncComponent(() => import("@/ui/deck.vue")) + : defineAsyncComponent(() => import("@/ui/universal.vue")) + ); - if (_DEV_) { - app.config.performance = true; - } + if (_DEV_) { + app.config.performance = true; + } - app.config.globalProperties = { - $i, - $store: defaultStore, - $instance: instance, - $t: i18n.t, - $ts: i18n.ts, - }; + app.config.globalProperties = { + $i, + $store: defaultStore, + $instance: instance, + $t: i18n.t, + $ts: i18n.ts, + }; - widgets(app); - directives(app); - components(app); + widgets(app); + directives(app); + components(app); - checkForSplash(); + checkForSplash(); - // https://github.com/misskey-dev/misskey/pull/8575#issuecomment-1114239210 - // なぜかinit.tsの内容が2回実行されることがあるため、mountするdivを1つに制限する - const rootEl = (() => { - const MISSKEY_MOUNT_DIV_ID = "calckey_app"; + // https://github.com/misskey-dev/misskey/pull/8575#issuecomment-1114239210 + // なぜかinit.tsの内容が2回実行されることがあるため、mountするdivを1つに制限する + const rootEl = (() => { + const MISSKEY_MOUNT_DIV_ID = "calckey_app"; - const currentEl = document.getElementById(MISSKEY_MOUNT_DIV_ID); + const currentEl = document.getElementById(MISSKEY_MOUNT_DIV_ID); - if (currentEl) { - console.warn("multiple import detected"); - return currentEl; - } + if (currentEl) { + console.warn("multiple import detected"); + return currentEl; + } - const rootEl = document.createElement("div"); - rootEl.id = MISSKEY_MOUNT_DIV_ID; - document.body.appendChild(rootEl); - return rootEl; - })(); + const rootEl = document.createElement("div"); + rootEl.id = MISSKEY_MOUNT_DIV_ID; + document.body.appendChild(rootEl); + return rootEl; + })(); - app.mount(rootEl); + app.mount(rootEl); - // boot.jsのやつを解除 - window.onerror = null; - window.onunhandledrejection = null; + // boot.jsのやつを解除 + window.onerror = null; + window.onunhandledrejection = null; - reactionPicker.init(); + reactionPicker.init(); - checkForSplash(); + checkForSplash(); - // クライアントが更新されたか? - const lastVersion = localStorage.getItem("lastVersion"); + // クライアントが更新されたか? + const lastVersion = localStorage.getItem("lastVersion"); - if (lastVersion !== version) { - localStorage.setItem("lastVersion", version); + if (lastVersion !== version) { + localStorage.setItem("lastVersion", version); - // テーマリビルドするため - localStorage.removeItem("theme"); + // テーマリビルドするため + localStorage.removeItem("theme"); - try { - // 変なバージョン文字列来るとcompareVersionsでエラーになるため - if ( - lastVersion != null && - compareVersions(version, lastVersion) === 1 && - defaultStore.state.showUpdates - ) { - // ログインしてる場合だけ - if ($i) { - popup( - defineAsyncComponent(() => import("@/components/MkUpdated.vue")), - {}, - {}, - "closed", - ); - } - } - } catch (err) { - console.error(err); - } - } + try { + // 変なバージョン文字列来るとcompareVersionsでエラーになるため + if ( + lastVersion != null && + compareVersions(version, lastVersion) === 1 && + defaultStore.state.showUpdates + ) { + // ログインしてる場合だけ + if ($i) { + popup( + defineAsyncComponent( + () => import("@/components/MkUpdated.vue") + ), + {}, + {}, + "closed" + ); + } + } + } catch (err) { + console.error(err); + } + } - // NOTE: この処理は必ず↑のクライアント更新時処理より後に来ること(テーマ再構築のため) - watch( - defaultStore.reactiveState.darkMode, - (darkMode) => { - applyTheme( - darkMode - ? ColdDeviceStorage.get("darkTheme") - : ColdDeviceStorage.get("lightTheme"), - ); - }, - { immediate: localStorage.theme == null }, - ); + // NOTE: この処理は必ず↑のクライアント更新時処理より後に来ること(テーマ再構築のため) + watch( + defaultStore.reactiveState.darkMode, + (darkMode) => { + applyTheme( + darkMode + ? ColdDeviceStorage.get("darkTheme") + : ColdDeviceStorage.get("lightTheme") + ); + }, + { immediate: localStorage.theme == null } + ); - const darkTheme = computed(ColdDeviceStorage.makeGetterSetter("darkTheme")); - const lightTheme = computed(ColdDeviceStorage.makeGetterSetter("lightTheme")); + const darkTheme = computed(ColdDeviceStorage.makeGetterSetter("darkTheme")); + const lightTheme = computed( + ColdDeviceStorage.makeGetterSetter("lightTheme") + ); - watch(darkTheme, (theme) => { - if (defaultStore.state.darkMode) { - applyTheme(theme); - } - }); + watch(darkTheme, (theme) => { + if (defaultStore.state.darkMode) { + applyTheme(theme); + } + }); - watch(lightTheme, (theme) => { - if (!defaultStore.state.darkMode) { - applyTheme(theme); - } - }); + watch(lightTheme, (theme) => { + if (!defaultStore.state.darkMode) { + applyTheme(theme); + } + }); - //#region Sync dark mode - if (ColdDeviceStorage.get("syncDeviceDarkMode")) { - defaultStore.set("darkMode", isDeviceDarkmode()); - } - window.matchMedia("(prefers-color-scheme: dark)").onchange = (mql) => { - if (ColdDeviceStorage.get("syncDeviceDarkMode")) { - defaultStore.set("darkMode", mql.matches); - } - }; - //#endregion + //#region Sync dark mode + if (ColdDeviceStorage.get("syncDeviceDarkMode")) { + defaultStore.set("darkMode", isDeviceDarkmode()); + } + window.matchMedia("(prefers-color-scheme: dark)").onchange = (mql) => { + if (ColdDeviceStorage.get("syncDeviceDarkMode")) { + defaultStore.set("darkMode", mql.matches); + } + }; + //#endregion - fetchInstanceMetaPromise.then(() => { - if (defaultStore.state.themeInitial) { - if (instance.defaultLightTheme != null) - ColdDeviceStorage.set( - "lightTheme", - JSON.parse(instance.defaultLightTheme), - ); - if (instance.defaultDarkTheme != null) - ColdDeviceStorage.set( - "darkTheme", - JSON.parse(instance.defaultDarkTheme), - ); - defaultStore.set("themeInitial", false); - } - }); + fetchInstanceMetaPromise.then(() => { + if (defaultStore.state.themeInitial) { + if (instance.defaultLightTheme != null) + ColdDeviceStorage.set( + "lightTheme", + JSON.parse(instance.defaultLightTheme) + ); + if (instance.defaultDarkTheme != null) + ColdDeviceStorage.set( + "darkTheme", + JSON.parse(instance.defaultDarkTheme) + ); + defaultStore.set("themeInitial", false); + } + }); - watch( - defaultStore.reactiveState.useBlurEffectForModal, - (v) => { - document.documentElement.style.setProperty( - "--modalBgFilter", - v ? "blur(4px)" : "none", - ); - }, - { immediate: true }, - ); + watch( + defaultStore.reactiveState.useBlurEffectForModal, + (v) => { + document.documentElement.style.setProperty( + "--modalBgFilter", + v ? "blur(4px)" : "none" + ); + }, + { immediate: true } + ); - watch( - defaultStore.reactiveState.useBlurEffect, - (v) => { - if (v && deviceKind !== "smartphone") { - document.documentElement.style.removeProperty("--blur"); - } else { - document.documentElement.style.setProperty("--blur", "none"); - } - }, - { immediate: true }, - ); + watch( + defaultStore.reactiveState.useBlurEffect, + (v) => { + if (v && deviceKind !== "smartphone") { + document.documentElement.style.removeProperty("--blur"); + } else { + document.documentElement.style.setProperty("--blur", "none"); + } + }, + { immediate: true } + ); - let reloadDialogShowing = false; - stream.on("_disconnected_", async () => { - if (defaultStore.state.serverDisconnectedBehavior === "reload") { - location.reload(); - } else if (defaultStore.state.serverDisconnectedBehavior === "dialog") { - if (reloadDialogShowing) return; - reloadDialogShowing = true; - const { canceled } = await confirm({ - type: "warning", - title: i18n.ts.disconnectedFromServer, - text: i18n.ts.reloadConfirm, - }); - reloadDialogShowing = false; - if (!canceled) { - location.reload(); - } - } - }); + let reloadDialogShowing = false; + stream.on("_disconnected_", async () => { + if (defaultStore.state.serverDisconnectedBehavior === "reload") { + location.reload(); + } else if (defaultStore.state.serverDisconnectedBehavior === "dialog") { + if (reloadDialogShowing) return; + reloadDialogShowing = true; + const { canceled } = await confirm({ + type: "warning", + title: i18n.ts.disconnectedFromServer, + text: i18n.ts.reloadConfirm, + }); + reloadDialogShowing = false; + if (!canceled) { + location.reload(); + } + } + }); - stream.on("emojiAdded", (emojiData) => { - // TODO - //store.commit('instance/set', ); - }); + stream.on("emojiAdded", (emojiData) => { + // TODO + //store.commit('instance/set', ); + }); - for (const plugin of ColdDeviceStorage.get("plugins").filter( - (p) => p.active, - )) { - import("./plugin").then(({ install }) => { - install(plugin); - }); - } + for (const plugin of ColdDeviceStorage.get("plugins").filter( + (p) => p.active + )) { + import("./plugin").then(({ install }) => { + install(plugin); + }); + } - const hotkeys = { - d: (): void => { - defaultStore.set("darkMode", !defaultStore.state.darkMode); - }, - s: search, - }; + const hotkeys = { + d: (): void => { + defaultStore.set("darkMode", !defaultStore.state.darkMode); + }, + s: search, + }; - if ($i) { - // only add post shortcuts if logged in - hotkeys["p|n"] = post; + if ($i) { + // only add post shortcuts if logged in + hotkeys["p|n"] = post; - if ($i.isDeleted) { - alert({ - type: "warning", - text: i18n.ts.accountDeletionInProgress, - }); - } + if ($i.isDeleted) { + alert({ + type: "warning", + text: i18n.ts.accountDeletionInProgress, + }); + } - const lastUsed = localStorage.getItem("lastUsed"); - if (lastUsed) { - const lastUsedDate = parseInt(lastUsed, 10); - // 二時間以上前なら - if (Date.now() - lastUsedDate > 1000 * 60 * 60 * 2) { - toast( - i18n.t("welcomeBackWithName", { - name: $i.name || $i.username, - }), - ); - } - } - localStorage.setItem("lastUsed", Date.now().toString()); + const lastUsed = localStorage.getItem("lastUsed"); + if (lastUsed) { + const lastUsedDate = parseInt(lastUsed, 10); + // 二時間以上前なら + if (Date.now() - lastUsedDate > 1000 * 60 * 60 * 2) { + toast( + i18n.t("welcomeBackWithName", { + name: $i.name || $i.username, + }) + ); + } + } + localStorage.setItem("lastUsed", Date.now().toString()); - if ("Notification" in window) { - // 許可を得ていなかったらリクエスト - if (Notification.permission === "default") { - Notification.requestPermission(); - } - } + if ("Notification" in window) { + // 許可を得ていなかったらリクエスト + if (Notification.permission === "default") { + Notification.requestPermission(); + } + } - const main = markRaw(stream.useChannel("main", null, "System")); + const main = markRaw(stream.useChannel("main", null, "System")); - // 自分の情報が更新されたとき - main.on("meUpdated", (i) => { - updateAccount(i); - }); + // 自分の情報が更新されたとき + main.on("meUpdated", (i) => { + updateAccount(i); + }); - main.on("readAllNotifications", () => { - updateAccount({ hasUnreadNotification: false }); - }); + main.on("readAllNotifications", () => { + updateAccount({ hasUnreadNotification: false }); + }); - main.on("unreadNotification", () => { - updateAccount({ hasUnreadNotification: true }); - }); + main.on("unreadNotification", () => { + updateAccount({ hasUnreadNotification: true }); + }); - main.on("unreadMention", () => { - updateAccount({ hasUnreadMentions: true }); - }); + main.on("unreadMention", () => { + updateAccount({ hasUnreadMentions: true }); + }); - main.on("readAllUnreadMentions", () => { - updateAccount({ hasUnreadMentions: false }); - }); + main.on("readAllUnreadMentions", () => { + updateAccount({ hasUnreadMentions: false }); + }); - main.on("unreadSpecifiedNote", () => { - updateAccount({ hasUnreadSpecifiedNotes: true }); - }); + main.on("unreadSpecifiedNote", () => { + updateAccount({ hasUnreadSpecifiedNotes: true }); + }); - main.on("readAllUnreadSpecifiedNotes", () => { - updateAccount({ hasUnreadSpecifiedNotes: false }); - }); + main.on("readAllUnreadSpecifiedNotes", () => { + updateAccount({ hasUnreadSpecifiedNotes: false }); + }); - main.on("readAllAntennas", () => { - updateAccount({ hasUnreadAntenna: false }); - }); + main.on("readAllAntennas", () => { + updateAccount({ hasUnreadAntenna: false }); + }); - main.on("unreadAntenna", () => { - updateAccount({ hasUnreadAntenna: true }); - sound.play("antenna"); - }); + main.on("unreadAntenna", () => { + updateAccount({ hasUnreadAntenna: true }); + sound.play("antenna"); + }); - main.on("readAllAnnouncements", () => { - updateAccount({ hasUnreadAnnouncement: false }); - }); + main.on("readAllAnnouncements", () => { + updateAccount({ hasUnreadAnnouncement: false }); + }); - // トークンが再生成されたとき - // このままではMisskeyが利用できないので強制的にサインアウトさせる - main.on("myTokenRegenerated", () => { - signout(); - }); - } + // トークンが再生成されたとき + // このままではMisskeyが利用できないので強制的にサインアウトさせる + main.on("myTokenRegenerated", () => { + signout(); + }); + } - // shortcut - document.addEventListener("keydown", makeHotkey(hotkeys)); + // shortcut + document.addEventListener("keydown", makeHotkey(hotkeys)); })(); diff --git a/fe_calckey/frontend/client/src/instance.ts b/fe_calckey/frontend/client/src/instance.ts index 69df633..e6a2396 100644 --- a/fe_calckey/frontend/client/src/instance.ts +++ b/fe_calckey/frontend/client/src/instance.ts @@ -8,48 +8,48 @@ const instanceData = localStorage.getItem("instance"); // TODO: instanceをリアクティブにするかは再考の余地あり export const instance: Misskey.entities.DetailedInstanceMetadata = reactive( - instanceData - ? JSON.parse(instanceData) - : { - // TODO: set default values - }, + instanceData + ? JSON.parse(instanceData) + : { + // TODO: set default values + } ); export async function fetchInstance() { - const meta = await api("meta", { - detail: true, - }); + const meta = await api("meta", { + detail: true, + }); - for (const [k, v] of Object.entries(meta)) { - instance[k] = v; - } + for (const [k, v] of Object.entries(meta)) { + instance[k] = v; + } - localStorage.setItem("instance", JSON.stringify(instance)); + localStorage.setItem("instance", JSON.stringify(instance)); } export const emojiCategories = computed(() => { - if (instance.emojis == null) return []; - const categories = new Set(); - for (const emoji of instance.emojis) { - categories.add(emoji.category); - } - return Array.from(categories); + if (instance.emojis == null) return []; + const categories = new Set(); + for (const emoji of instance.emojis) { + categories.add(emoji.category); + } + return Array.from(categories); }); export const emojiTags = computed(() => { - if (instance.emojis == null) return []; - const tags = new Set(); - for (const emoji of instance.emojis) { - for (const tag of emoji.aliases) { - tags.add(tag); - } - } - return Array.from(tags); + if (instance.emojis == null) return []; + const tags = new Set(); + for (const emoji of instance.emojis) { + for (const tag of emoji.aliases) { + tags.add(tag); + } + } + return Array.from(tags); }); // このファイルに書きたくないけどここに書かないと何故かVeturが認識しない declare module "@vue/runtime-core" { - interface ComponentCustomProperties { - $instance: typeof instance; - } + interface ComponentCustomProperties { + $instance: typeof instance; + } } diff --git a/fe_calckey/frontend/client/src/navbar.ts b/fe_calckey/frontend/client/src/navbar.ts index 2070985..e11d758 100644 --- a/fe_calckey/frontend/client/src/navbar.ts +++ b/fe_calckey/frontend/client/src/navbar.ts @@ -7,49 +7,51 @@ import { ui } from "@/config"; import { unisonReload } from "@/scripts/unison-reload"; export const navbarItemDef = reactive({ - notifications: { - title: "notifications", - icon: "ph-bell ph-bold ph-lg", - show: computed(() => $i != null), - indicated: computed(() => $i?.hasUnreadNotification), - to: "/my/notifications", - }, - drive: { - title: "drive", - icon: "ph-cloud ph-bold ph-lg", - show: computed(() => $i != null), - to: "/my/drive", - }, - followRequests: { - title: "followRequests", - icon: "ph-hand-waving ph-bold ph-lg", - show: computed(() => $i?.isLocked || $i?.hasPendingReceivedFollowRequest), - indicated: computed(() => $i?.hasPendingReceivedFollowRequest), - to: "/my/follow-requests", - }, - explore: { - title: "explore", - icon: "ph-compass ph-bold ph-lg", - to: "/explore", - }, - announcements: { - title: "announcements", - icon: "ph-megaphone-simple ph-bold ph-lg", - indicated: computed(() => $i?.hasUnreadAnnouncement), - to: "/announcements", - }, - search: { - title: "search", - icon: "ph-magnifying-glass ph-bold ph-lg", - action: () => search(), - }, - lists: { - title: "lists", - icon: "ph-list-bullets ph-bold ph-lg", - show: computed(() => $i != null), - to: "/my/lists", - }, - /* + notifications: { + title: "notifications", + icon: "ph-bell ph-bold ph-lg", + show: computed(() => $i != null), + indicated: computed(() => $i?.hasUnreadNotification), + to: "/my/notifications", + }, + drive: { + title: "drive", + icon: "ph-cloud ph-bold ph-lg", + show: computed(() => $i != null), + to: "/my/drive", + }, + followRequests: { + title: "followRequests", + icon: "ph-hand-waving ph-bold ph-lg", + show: computed( + () => $i?.isLocked || $i?.hasPendingReceivedFollowRequest + ), + indicated: computed(() => $i?.hasPendingReceivedFollowRequest), + to: "/my/follow-requests", + }, + explore: { + title: "explore", + icon: "ph-compass ph-bold ph-lg", + to: "/explore", + }, + announcements: { + title: "announcements", + icon: "ph-megaphone-simple ph-bold ph-lg", + indicated: computed(() => $i?.hasUnreadAnnouncement), + to: "/announcements", + }, + search: { + title: "search", + icon: "ph-magnifying-glass ph-bold ph-lg", + action: () => search(), + }, + lists: { + title: "lists", + icon: "ph-list-bullets ph-bold ph-lg", + show: computed(() => $i != null), + to: "/my/lists", + }, + /* groups: { title: 'groups', icon: 'ph-users-three ph-bold ph-lg', @@ -57,79 +59,79 @@ export const navbarItemDef = reactive({ to: '/my/groups', }, */ - antennas: { - title: "antennas", - icon: "ph-flying-saucer ph-bold ph-lg", - show: computed(() => $i != null), - to: "/my/antennas", - }, - favorites: { - title: "favorites", - icon: "ph-bookmark-simple ph-bold ph-lg", - show: computed(() => $i != null), - to: "/my/favorites", - }, - pages: { - title: "pages", - icon: "ph-file-text ph-bold ph-lg", - to: "/pages", - }, - gallery: { - title: "gallery", - icon: "ph-image-square ph-bold ph-lg", - to: "/gallery", - }, - clips: { - title: "clips", - icon: "ph-paperclip ph-bold ph-lg", - show: computed(() => $i != null), - to: "/my/clips", - }, - groups: { - title: "groups", - icon: "ph-users-three ph-bold ph-lg", - to: "/my/groups", - }, - ui: { - title: "switchUi", - icon: "ph-layout ph-bold ph-lg", - action: (ev) => { - os.popupMenu( - [ - { - text: i18n.ts.default, - active: ui === "default" || ui === null, - action: () => { - localStorage.setItem("ui", "default"); - unisonReload(); - }, - }, - { - text: i18n.ts.classic, - active: ui === "classic", - action: () => { - localStorage.setItem("ui", "classic"); - unisonReload(); - }, - }, - { - text: i18n.ts.deck, - active: ui === "deck", - action: () => { - localStorage.setItem("ui", "deck"); - unisonReload(); - }, - }, - ], - ev.currentTarget ?? ev.target, - ); - }, - }, - reload: { - title: "reload", - icon: "ph-arrows-clockwise ph-bold ph-lg", - action: (ev) => { - location.reload(); - }, - }, + antennas: { + title: "antennas", + icon: "ph-flying-saucer ph-bold ph-lg", + show: computed(() => $i != null), + to: "/my/antennas", + }, + favorites: { + title: "favorites", + icon: "ph-bookmark-simple ph-bold ph-lg", + show: computed(() => $i != null), + to: "/my/favorites", + }, + pages: { + title: "pages", + icon: "ph-file-text ph-bold ph-lg", + to: "/pages", + }, + gallery: { + title: "gallery", + icon: "ph-image-square ph-bold ph-lg", + to: "/gallery", + }, + clips: { + title: "clips", + icon: "ph-paperclip ph-bold ph-lg", + show: computed(() => $i != null), + to: "/my/clips", + }, + groups: { + title: "groups", + icon: "ph-users-three ph-bold ph-lg", + to: "/my/groups", + }, + ui: { + title: "switchUi", + icon: "ph-layout ph-bold ph-lg", + action: (ev) => { + os.popupMenu( + [ + { + text: i18n.ts.default, + active: ui === "default" || ui === null, + action: () => { + localStorage.setItem("ui", "default"); + unisonReload(); + }, + }, + { + text: i18n.ts.classic, + active: ui === "classic", + action: () => { + localStorage.setItem("ui", "classic"); + unisonReload(); + }, + }, + { + text: i18n.ts.deck, + active: ui === "deck", + action: () => { + localStorage.setItem("ui", "deck"); + unisonReload(); + }, + }, + ], + ev.currentTarget ?? ev.target + ); + }, + }, + reload: { + title: "reload", + icon: "ph-arrows-clockwise ph-bold ph-lg", + action: (ev) => { + location.reload(); + }, + }, }); diff --git a/fe_calckey/frontend/client/src/nirax.ts b/fe_calckey/frontend/client/src/nirax.ts index 7e481f1..2e4f0f3 100644 --- a/fe_calckey/frontend/client/src/nirax.ts +++ b/fe_calckey/frontend/client/src/nirax.ts @@ -6,282 +6,290 @@ import { pleaseLogin } from "@/scripts/please-login"; import { safeURIDecode } from "@/scripts/safe-uri-decode"; type RouteDef = { - path: string; - component: Component; - query?: Record; - loginRequired?: boolean; - name?: string; - hash?: string; - globalCacheKey?: string; - children?: RouteDef[]; + path: string; + component: Component; + query?: Record; + loginRequired?: boolean; + name?: string; + hash?: string; + globalCacheKey?: string; + children?: RouteDef[]; }; type ParsedPath = ( - | string - | { - name: string; - startsWith?: string; - wildcard?: boolean; - optional?: boolean; - } + | string + | { + name: string; + startsWith?: string; + wildcard?: boolean; + optional?: boolean; + } )[]; export type Resolved = { - route: RouteDef; - props: Map; - child?: Resolved; + route: RouteDef; + props: Map; + child?: Resolved; }; function parsePath(path: string): ParsedPath { - const res = [] as ParsedPath; + const res = [] as ParsedPath; - path = path.substring(1); + path = path.substring(1); - for (const part of path.split("/")) { - if (part.includes(":")) { - const prefix = part.substring(0, part.indexOf(":")); - const placeholder = part.substring(part.indexOf(":") + 1); - const wildcard = placeholder.includes("(*)"); - const optional = placeholder.endsWith("?"); - res.push({ - name: placeholder.replace("(*)", "").replace("?", ""), - startsWith: prefix !== "" ? prefix : undefined, - wildcard, - optional, - }); - } else if (part.length !== 0) { - res.push(part); - } - } + for (const part of path.split("/")) { + if (part.includes(":")) { + const prefix = part.substring(0, part.indexOf(":")); + const placeholder = part.substring(part.indexOf(":") + 1); + const wildcard = placeholder.includes("(*)"); + const optional = placeholder.endsWith("?"); + res.push({ + name: placeholder.replace("(*)", "").replace("?", ""), + startsWith: prefix !== "" ? prefix : undefined, + wildcard, + optional, + }); + } else if (part.length !== 0) { + res.push(part); + } + } - return res; + return res; } export class Router extends EventEmitter<{ - change: (ctx: { - beforePath: string; - path: string; - resolved: Resolved; - key: string; - }) => void; - replace: (ctx: { - path: string; - key: string; - }) => void; - push: (ctx: { - beforePath: string; - path: string; - route: RouteDef | null; - props: Map | null; - key: string; - }) => void; - same: () => void; + change: (ctx: { + beforePath: string; + path: string; + resolved: Resolved; + key: string; + }) => void; + replace: (ctx: { path: string; key: string }) => void; + push: (ctx: { + beforePath: string; + path: string; + route: RouteDef | null; + props: Map | null; + key: string; + }) => void; + same: () => void; }> { - private routes: RouteDef[]; - public current: Resolved; - public currentRef: ShallowRef = shallowRef(); - public currentRoute: ShallowRef = shallowRef(); - private currentPath: string; - private currentKey = Date.now().toString(); + private routes: RouteDef[]; + public current: Resolved; + public currentRef: ShallowRef = shallowRef(); + public currentRoute: ShallowRef = shallowRef(); + private currentPath: string; + private currentKey = Date.now().toString(); - public navHook: ((path: string, flag?: any) => boolean) | null = null; + public navHook: ((path: string, flag?: any) => boolean) | null = null; - constructor(routes: Router["routes"], currentPath: Router["currentPath"]) { - super(); + constructor(routes: Router["routes"], currentPath: Router["currentPath"]) { + super(); - this.routes = routes; - this.currentPath = currentPath; - this.navigate(currentPath, null, false); - } + this.routes = routes; + this.currentPath = currentPath; + this.navigate(currentPath, null, false); + } - public resolve(path: string): Resolved | null { - let queryString: string | null = null; - let hash: string | null = null; - if (path[0] === "/") path = path.substring(1); - if (path.includes("#")) { - hash = path.substring(path.indexOf("#") + 1); - path = path.substring(0, path.indexOf("#")); - } - if (path.includes("?")) { - queryString = path.substring(path.indexOf("?") + 1); - path = path.substring(0, path.indexOf("?")); - } + public resolve(path: string): Resolved | null { + let queryString: string | null = null; + let hash: string | null = null; + if (path[0] === "/") path = path.substring(1); + if (path.includes("#")) { + hash = path.substring(path.indexOf("#") + 1); + path = path.substring(0, path.indexOf("#")); + } + if (path.includes("?")) { + queryString = path.substring(path.indexOf("?") + 1); + path = path.substring(0, path.indexOf("?")); + } - if (_DEV_) console.log("Routing: ", path, queryString); + if (_DEV_) console.log("Routing: ", path, queryString); - function check(routes: RouteDef[], _parts: string[]): Resolved | null { - forEachRouteLoop: for (const route of routes) { - let parts = [..._parts]; - const props = new Map(); + function check(routes: RouteDef[], _parts: string[]): Resolved | null { + forEachRouteLoop: for (const route of routes) { + let parts = [..._parts]; + const props = new Map(); - pathMatchLoop: for (const p of parsePath(route.path)) { - if (typeof p === "string") { - if (p === parts[0]) { - parts.shift(); - } else { - continue forEachRouteLoop; - } - } else { - if (parts[0] == null && !p.optional) { - continue forEachRouteLoop; - } - if (p.wildcard) { - if (parts.length !== 0) { - props.set(p.name, safeURIDecode(parts.join("/"))); - parts = []; - } - break pathMatchLoop; - } else { - if (p.startsWith) { - if (parts[0] == null || !parts[0].startsWith(p.startsWith)) - continue forEachRouteLoop; + pathMatchLoop: for (const p of parsePath(route.path)) { + if (typeof p === "string") { + if (p === parts[0]) { + parts.shift(); + } else { + continue forEachRouteLoop; + } + } else { + if (parts[0] == null && !p.optional) { + continue forEachRouteLoop; + } + if (p.wildcard) { + if (parts.length !== 0) { + props.set( + p.name, + safeURIDecode(parts.join("/")) + ); + parts = []; + } + break pathMatchLoop; + } else { + if (p.startsWith) { + if ( + parts[0] == null || + !parts[0].startsWith(p.startsWith) + ) + continue forEachRouteLoop; - props.set( - p.name, - safeURIDecode(parts[0].substring(p.startsWith.length)), - ); - parts.shift(); - } else { - if (parts[0]) { - props.set(p.name, safeURIDecode(parts[0])); - } - parts.shift(); - } - } - } - } + props.set( + p.name, + safeURIDecode( + parts[0].substring(p.startsWith.length) + ) + ); + parts.shift(); + } else { + if (parts[0]) { + props.set(p.name, safeURIDecode(parts[0])); + } + parts.shift(); + } + } + } + } - if (parts.length === 0) { - if (route.children) { - const child = check(route.children, []); - if (child) { - return { - route, - props, - child, - }; - } else { - continue forEachRouteLoop; - } - } + if (parts.length === 0) { + if (route.children) { + const child = check(route.children, []); + if (child) { + return { + route, + props, + child, + }; + } else { + continue forEachRouteLoop; + } + } - if (route.hash != null && hash != null) { - props.set(route.hash, safeURIDecode(hash)); - } + if (route.hash != null && hash != null) { + props.set(route.hash, safeURIDecode(hash)); + } - if (route.query != null && queryString != null) { - const queryObject = [ - ...new URLSearchParams(queryString).entries(), - ].reduce((obj, entry) => ({ ...obj, [entry[0]]: entry[1] }), {}); + if (route.query != null && queryString != null) { + const queryObject = [ + ...new URLSearchParams(queryString).entries(), + ].reduce( + (obj, entry) => ({ ...obj, [entry[0]]: entry[1] }), + {} + ); - for (const q in route.query) { - const as = route.query[q]; - if (queryObject[q]) { - props.set(as, safeURIDecode(queryObject[q])); - } - } - } + for (const q in route.query) { + const as = route.query[q]; + if (queryObject[q]) { + props.set(as, safeURIDecode(queryObject[q])); + } + } + } - return { - route, - props, - }; - } else { - if (route.children) { - const child = check(route.children, parts); - if (child) { - return { - route, - props, - child, - }; - } else { - } - } else { - } - } - } + return { + route, + props, + }; + } else { + if (route.children) { + const child = check(route.children, parts); + if (child) { + return { + route, + props, + child, + }; + } else { + } + } else { + } + } + } - return null; - } + return null; + } - const _parts = path.split("/").filter((part) => part.length !== 0); + const _parts = path.split("/").filter((part) => part.length !== 0); - return check(this.routes, _parts); - } + return check(this.routes, _parts); + } - private navigate( - path: string, - key: string | null | undefined, - emitChange = true, - ) { - const beforePath = this.currentPath; - this.currentPath = path; + private navigate( + path: string, + key: string | null | undefined, + emitChange = true + ) { + const beforePath = this.currentPath; + this.currentPath = path; - const res = this.resolve(this.currentPath); + const res = this.resolve(this.currentPath); - if (res == null) { - throw new Error(`no route found for: ${path}`); - } + if (res == null) { + throw new Error(`no route found for: ${path}`); + } - if (res.route.loginRequired) { - pleaseLogin("/"); - } + if (res.route.loginRequired) { + pleaseLogin("/"); + } - const isSamePath = beforePath === path; - if (isSamePath && key == null) key = this.currentKey; - this.current = res; - this.currentRef.value = res; - this.currentRoute.value = res.route; - this.currentKey = res.route.globalCacheKey ?? key ?? path; + const isSamePath = beforePath === path; + if (isSamePath && key == null) key = this.currentKey; + this.current = res; + this.currentRef.value = res; + this.currentRoute.value = res.route; + this.currentKey = res.route.globalCacheKey ?? key ?? path; - if (emitChange) { - this.emit("change", { - beforePath, - path, - resolved: res, - key: this.currentKey, - }); - } + if (emitChange) { + this.emit("change", { + beforePath, + path, + resolved: res, + key: this.currentKey, + }); + } - return res; - } + return res; + } - public getCurrentPath() { - return this.currentPath; - } + public getCurrentPath() { + return this.currentPath; + } - public getCurrentKey() { - return this.currentKey; - } + public getCurrentKey() { + return this.currentKey; + } - public push(path: string, flag?: any) { - const beforePath = this.currentPath; - if (path === beforePath) { - this.emit("same"); - return; - } - if (this.navHook) { - const cancel = this.navHook(path, flag); - if (cancel) return; - } - const res = this.navigate(path, null); - this.emit("push", { - beforePath, - path, - route: res.route, - props: res.props, - key: this.currentKey, - }); - } + public push(path: string, flag?: any) { + const beforePath = this.currentPath; + if (path === beforePath) { + this.emit("same"); + return; + } + if (this.navHook) { + const cancel = this.navHook(path, flag); + if (cancel) return; + } + const res = this.navigate(path, null); + this.emit("push", { + beforePath, + path, + route: res.route, + props: res.props, + key: this.currentKey, + }); + } - public replace(path: string, key?: string | null, emitEvent = true) { - this.navigate(path, key); - if (emitEvent) { - this.emit("replace", { - path, - key: this.currentKey, - }); - } - } + public replace(path: string, key?: string | null, emitEvent = true) { + this.navigate(path, key); + if (emitEvent) { + this.emit("replace", { + path, + key: this.currentKey, + }); + } + } } diff --git a/fe_calckey/frontend/client/src/pages/_empty_.vue b/fe_calckey/frontend/client/src/pages/_empty_.vue index 3dee6cd..7666b6e 100644 --- a/fe_calckey/frontend/client/src/pages/_empty_.vue +++ b/fe_calckey/frontend/client/src/pages/_empty_.vue @@ -1,5 +1,5 @@ diff --git a/fe_calckey/frontend/client/src/pages/_loading_.vue b/fe_calckey/frontend/client/src/pages/_loading_.vue index 832c059..28a1f50 100644 --- a/fe_calckey/frontend/client/src/pages/_loading_.vue +++ b/fe_calckey/frontend/client/src/pages/_loading_.vue @@ -1,5 +1,5 @@ diff --git a/fe_calckey/frontend/client/src/pages/about-calckey.vue b/fe_calckey/frontend/client/src/pages/about-calckey.vue index 5442d83..b5e0183 100644 --- a/fe_calckey/frontend/client/src/pages/about-calckey.vue +++ b/fe_calckey/frontend/client/src/pages/about-calckey.vue @@ -1,132 +1,132 @@ diff --git a/fe_calckey/frontend/client/src/pages/about.emojis.vue b/fe_calckey/frontend/client/src/pages/about.emojis.vue index 90d9fb8..2a36d04 100644 --- a/fe_calckey/frontend/client/src/pages/about.emojis.vue +++ b/fe_calckey/frontend/client/src/pages/about.emojis.vue @@ -1,49 +1,49 @@ diff --git a/fe_calckey/frontend/client/src/pages/about.federation.vue b/fe_calckey/frontend/client/src/pages/about.federation.vue index ca9a6d7..244d95d 100644 --- a/fe_calckey/frontend/client/src/pages/about.federation.vue +++ b/fe_calckey/frontend/client/src/pages/about.federation.vue @@ -1,107 +1,107 @@ diff --git a/fe_calckey/frontend/client/src/pages/about.vue b/fe_calckey/frontend/client/src/pages/about.vue index 3e951c0..76c6557 100644 --- a/fe_calckey/frontend/client/src/pages/about.vue +++ b/fe_calckey/frontend/client/src/pages/about.vue @@ -1,165 +1,165 @@ diff --git a/fe_calckey/frontend/client/src/pages/admin-file.vue b/fe_calckey/frontend/client/src/pages/admin-file.vue index 63a8132..5b7d4d8 100644 --- a/fe_calckey/frontend/client/src/pages/admin-file.vue +++ b/fe_calckey/frontend/client/src/pages/admin-file.vue @@ -1,159 +1,159 @@ diff --git a/fe_calckey/frontend/client/src/pages/admin/_header_.vue b/fe_calckey/frontend/client/src/pages/admin/_header_.vue index a1a8c97..daddf19 100644 --- a/fe_calckey/frontend/client/src/pages/admin/_header_.vue +++ b/fe_calckey/frontend/client/src/pages/admin/_header_.vue @@ -1,69 +1,69 @@ diff --git a/fe_calckey/frontend/client/src/pages/admin/abuses.vue b/fe_calckey/frontend/client/src/pages/admin/abuses.vue index 27d8a70..fa58655 100644 --- a/fe_calckey/frontend/client/src/pages/admin/abuses.vue +++ b/fe_calckey/frontend/client/src/pages/admin/abuses.vue @@ -1,65 +1,65 @@ diff --git a/fe_calckey/frontend/client/src/pages/admin/announcements.vue b/fe_calckey/frontend/client/src/pages/admin/announcements.vue index 9853158..c90c1ae 100644 --- a/fe_calckey/frontend/client/src/pages/admin/announcements.vue +++ b/fe_calckey/frontend/client/src/pages/admin/announcements.vue @@ -1,56 +1,56 @@ diff --git a/fe_calckey/frontend/client/src/pages/admin/bot-protection.vue b/fe_calckey/frontend/client/src/pages/admin/bot-protection.vue index f47300e..c7f158e 100644 --- a/fe_calckey/frontend/client/src/pages/admin/bot-protection.vue +++ b/fe_calckey/frontend/client/src/pages/admin/bot-protection.vue @@ -1,76 +1,76 @@ diff --git a/fe_calckey/frontend/client/src/pages/admin/custom-css.vue b/fe_calckey/frontend/client/src/pages/admin/custom-css.vue index 2362c1f..95bd07b 100644 --- a/fe_calckey/frontend/client/src/pages/admin/custom-css.vue +++ b/fe_calckey/frontend/client/src/pages/admin/custom-css.vue @@ -1,19 +1,19 @@ diff --git a/fe_calckey/frontend/client/src/pages/admin/database.vue b/fe_calckey/frontend/client/src/pages/admin/database.vue index 4154e90..5dcd32d 100644 --- a/fe_calckey/frontend/client/src/pages/admin/database.vue +++ b/fe_calckey/frontend/client/src/pages/admin/database.vue @@ -1,36 +1,36 @@ diff --git a/fe_calckey/frontend/client/src/pages/admin/email-settings.vue b/fe_calckey/frontend/client/src/pages/admin/email-settings.vue index 3eaee55..d50379e 100644 --- a/fe_calckey/frontend/client/src/pages/admin/email-settings.vue +++ b/fe_calckey/frontend/client/src/pages/admin/email-settings.vue @@ -1,93 +1,93 @@ diff --git a/fe_calckey/frontend/client/src/pages/admin/emoji-edit-dialog.vue b/fe_calckey/frontend/client/src/pages/admin/emoji-edit-dialog.vue index 053f3d3..52c2e6d 100644 --- a/fe_calckey/frontend/client/src/pages/admin/emoji-edit-dialog.vue +++ b/fe_calckey/frontend/client/src/pages/admin/emoji-edit-dialog.vue @@ -1,43 +1,43 @@ diff --git a/fe_calckey/frontend/client/src/pages/admin/emojis.vue b/fe_calckey/frontend/client/src/pages/admin/emojis.vue index 2db08cf..0c2d5f7 100644 --- a/fe_calckey/frontend/client/src/pages/admin/emojis.vue +++ b/fe_calckey/frontend/client/src/pages/admin/emojis.vue @@ -1,165 +1,165 @@ diff --git a/fe_calckey/frontend/client/src/pages/admin/experiments.vue b/fe_calckey/frontend/client/src/pages/admin/experiments.vue index 0c9a258..0652bd5 100644 --- a/fe_calckey/frontend/client/src/pages/admin/experiments.vue +++ b/fe_calckey/frontend/client/src/pages/admin/experiments.vue @@ -1,42 +1,42 @@ diff --git a/fe_calckey/frontend/client/src/pages/admin/federation.vue b/fe_calckey/frontend/client/src/pages/admin/federation.vue index d288a56..98b4db4 100644 --- a/fe_calckey/frontend/client/src/pages/admin/federation.vue +++ b/fe_calckey/frontend/client/src/pages/admin/federation.vue @@ -1,17 +1,17 @@ diff --git a/fe_calckey/frontend/client/src/pages/admin/files.vue b/fe_calckey/frontend/client/src/pages/admin/files.vue index e808ab6..ee6a1ee 100644 --- a/fe_calckey/frontend/client/src/pages/admin/files.vue +++ b/fe_calckey/frontend/client/src/pages/admin/files.vue @@ -1,82 +1,82 @@ diff --git a/fe_calckey/frontend/client/src/pages/admin/hashtags.vue b/fe_calckey/frontend/client/src/pages/admin/hashtags.vue index d10ee44..59265d1 100644 --- a/fe_calckey/frontend/client/src/pages/admin/hashtags.vue +++ b/fe_calckey/frontend/client/src/pages/admin/hashtags.vue @@ -1,28 +1,28 @@ diff --git a/fe_calckey/frontend/client/src/pages/admin/index.vue b/fe_calckey/frontend/client/src/pages/admin/index.vue index 0de8e2f..54ae401 100644 --- a/fe_calckey/frontend/client/src/pages/admin/index.vue +++ b/fe_calckey/frontend/client/src/pages/admin/index.vue @@ -233,12 +233,6 @@ const menuDef = $computed(() => [ to: "/admin/relays", active: currentPage?.route.name === "relays", }, - { - icon: "ph-plug ph-bold ph-lg", - text: i18n.ts.integration, - to: "/admin/integrations", - active: currentPage?.route.name === "integrations", - }, { icon: "ph-prohibit ph-bold ph-lg", text: i18n.ts.instanceBlocking, diff --git a/fe_calckey/frontend/client/src/pages/admin/instance-block.vue b/fe_calckey/frontend/client/src/pages/admin/instance-block.vue index f3c4f54..24a43f0 100644 --- a/fe_calckey/frontend/client/src/pages/admin/instance-block.vue +++ b/fe_calckey/frontend/client/src/pages/admin/instance-block.vue @@ -1,45 +1,45 @@ diff --git a/fe_calckey/frontend/client/src/pages/admin/integrations.discord.vue b/fe_calckey/frontend/client/src/pages/admin/integrations.discord.vue deleted file mode 100644 index 2bf0470..0000000 --- a/fe_calckey/frontend/client/src/pages/admin/integrations.discord.vue +++ /dev/null @@ -1,69 +0,0 @@ - - - diff --git a/fe_calckey/frontend/client/src/pages/admin/integrations.github.vue b/fe_calckey/frontend/client/src/pages/admin/integrations.github.vue deleted file mode 100644 index 67c57a7..0000000 --- a/fe_calckey/frontend/client/src/pages/admin/integrations.github.vue +++ /dev/null @@ -1,69 +0,0 @@ - - - diff --git a/fe_calckey/frontend/client/src/pages/admin/integrations.vue b/fe_calckey/frontend/client/src/pages/admin/integrations.vue deleted file mode 100644 index 510b32a..0000000 --- a/fe_calckey/frontend/client/src/pages/admin/integrations.vue +++ /dev/null @@ -1,69 +0,0 @@ - - - diff --git a/fe_calckey/frontend/client/src/pages/admin/object-storage.vue b/fe_calckey/frontend/client/src/pages/admin/object-storage.vue index 46760b8..23334cd 100644 --- a/fe_calckey/frontend/client/src/pages/admin/object-storage.vue +++ b/fe_calckey/frontend/client/src/pages/admin/object-storage.vue @@ -1,145 +1,145 @@ diff --git a/fe_calckey/frontend/client/src/pages/admin/other-settings.vue b/fe_calckey/frontend/client/src/pages/admin/other-settings.vue index 1d74e75..18a770f 100644 --- a/fe_calckey/frontend/client/src/pages/admin/other-settings.vue +++ b/fe_calckey/frontend/client/src/pages/admin/other-settings.vue @@ -1,15 +1,15 @@ diff --git a/fe_calckey/frontend/client/src/pages/admin/overview.active-users.vue b/fe_calckey/frontend/client/src/pages/admin/overview.active-users.vue index 25dcac4..0f3c3fb 100644 --- a/fe_calckey/frontend/client/src/pages/admin/overview.active-users.vue +++ b/fe_calckey/frontend/client/src/pages/admin/overview.active-users.vue @@ -1,19 +1,19 @@ diff --git a/fe_calckey/frontend/client/src/pages/admin/overview.ap-requests.vue b/fe_calckey/frontend/client/src/pages/admin/overview.ap-requests.vue index c655336..6b19345 100644 --- a/fe_calckey/frontend/client/src/pages/admin/overview.ap-requests.vue +++ b/fe_calckey/frontend/client/src/pages/admin/overview.ap-requests.vue @@ -1,17 +1,17 @@ diff --git a/fe_calckey/frontend/client/src/pages/admin/overview.federation.vue b/fe_calckey/frontend/client/src/pages/admin/overview.federation.vue index ab4dd2c..f38ae9a 100644 --- a/fe_calckey/frontend/client/src/pages/admin/overview.federation.vue +++ b/fe_calckey/frontend/client/src/pages/admin/overview.federation.vue @@ -1,58 +1,58 @@ diff --git a/fe_calckey/frontend/client/src/pages/admin/overview.heatmap.vue b/fe_calckey/frontend/client/src/pages/admin/overview.heatmap.vue index e926fdc..301cfae 100644 --- a/fe_calckey/frontend/client/src/pages/admin/overview.heatmap.vue +++ b/fe_calckey/frontend/client/src/pages/admin/overview.heatmap.vue @@ -1,20 +1,20 @@ diff --git a/fe_calckey/frontend/client/src/pages/admin/overview.metrics.vue b/fe_calckey/frontend/client/src/pages/admin/overview.metrics.vue index cfd4974..c937ca1 100644 --- a/fe_calckey/frontend/client/src/pages/admin/overview.metrics.vue +++ b/fe_calckey/frontend/client/src/pages/admin/overview.metrics.vue @@ -1,56 +1,56 @@ diff --git a/fe_calckey/frontend/client/src/pages/admin/overview.moderators.vue b/fe_calckey/frontend/client/src/pages/admin/overview.moderators.vue index a29cc20..e0702c9 100644 --- a/fe_calckey/frontend/client/src/pages/admin/overview.moderators.vue +++ b/fe_calckey/frontend/client/src/pages/admin/overview.moderators.vue @@ -1,27 +1,27 @@ diff --git a/fe_calckey/frontend/client/src/pages/admin/overview.pie.vue b/fe_calckey/frontend/client/src/pages/admin/overview.pie.vue index 9de9f5c..b66a6c7 100644 --- a/fe_calckey/frontend/client/src/pages/admin/overview.pie.vue +++ b/fe_calckey/frontend/client/src/pages/admin/overview.pie.vue @@ -1,5 +1,5 @@ diff --git a/fe_calckey/frontend/client/src/pages/admin/overview.queue-chart.vue b/fe_calckey/frontend/client/src/pages/admin/overview.queue-chart.vue index ebc344f..7bcc653 100644 --- a/fe_calckey/frontend/client/src/pages/admin/overview.queue-chart.vue +++ b/fe_calckey/frontend/client/src/pages/admin/overview.queue-chart.vue @@ -1,25 +1,25 @@ diff --git a/fe_calckey/frontend/client/src/pages/admin/overview.queue.chart.vue b/fe_calckey/frontend/client/src/pages/admin/overview.queue.chart.vue index 01a0d0e..3d207f7 100644 --- a/fe_calckey/frontend/client/src/pages/admin/overview.queue.chart.vue +++ b/fe_calckey/frontend/client/src/pages/admin/overview.queue.chart.vue @@ -1,5 +1,5 @@ diff --git a/fe_calckey/frontend/client/src/pages/admin/overview.queue.vue b/fe_calckey/frontend/client/src/pages/admin/overview.queue.vue index 5b00388..4aba642 100644 --- a/fe_calckey/frontend/client/src/pages/admin/overview.queue.vue +++ b/fe_calckey/frontend/client/src/pages/admin/overview.queue.vue @@ -1,44 +1,44 @@ diff --git a/fe_calckey/frontend/client/src/pages/admin/overview.stats.vue b/fe_calckey/frontend/client/src/pages/admin/overview.stats.vue index b6d9e0b..d7ee9c9 100644 --- a/fe_calckey/frontend/client/src/pages/admin/overview.stats.vue +++ b/fe_calckey/frontend/client/src/pages/admin/overview.stats.vue @@ -1,80 +1,80 @@ diff --git a/fe_calckey/frontend/client/src/pages/admin/overview.user.vue b/fe_calckey/frontend/client/src/pages/admin/overview.user.vue index 89370ce..6f95d95 100644 --- a/fe_calckey/frontend/client/src/pages/admin/overview.user.vue +++ b/fe_calckey/frontend/client/src/pages/admin/overview.user.vue @@ -1,19 +1,19 @@ diff --git a/fe_calckey/frontend/client/src/pages/admin/overview.users.vue b/fe_calckey/frontend/client/src/pages/admin/overview.users.vue index 9017eb2..3ca8b96 100644 --- a/fe_calckey/frontend/client/src/pages/admin/overview.users.vue +++ b/fe_calckey/frontend/client/src/pages/admin/overview.users.vue @@ -1,22 +1,22 @@ diff --git a/fe_calckey/frontend/client/src/pages/admin/overview.vue b/fe_calckey/frontend/client/src/pages/admin/overview.vue index d880225..6fa43d2 100644 --- a/fe_calckey/frontend/client/src/pages/admin/overview.vue +++ b/fe_calckey/frontend/client/src/pages/admin/overview.vue @@ -1,71 +1,71 @@ diff --git a/fe_calckey/frontend/client/src/pages/admin/promotions.vue b/fe_calckey/frontend/client/src/pages/admin/promotions.vue index 50e7646..ce61a8b 100644 --- a/fe_calckey/frontend/client/src/pages/admin/promotions.vue +++ b/fe_calckey/frontend/client/src/pages/admin/promotions.vue @@ -1,65 +1,65 @@ diff --git a/fe_calckey/frontend/client/src/pages/admin/proxy-account.vue b/fe_calckey/frontend/client/src/pages/admin/proxy-account.vue index 87b3c68..3ce0ca8 100644 --- a/fe_calckey/frontend/client/src/pages/admin/proxy-account.vue +++ b/fe_calckey/frontend/client/src/pages/admin/proxy-account.vue @@ -1,34 +1,34 @@ diff --git a/fe_calckey/frontend/client/src/pages/admin/queue.chart.chart.vue b/fe_calckey/frontend/client/src/pages/admin/queue.chart.chart.vue index bb7d3c1..3f97abb 100644 --- a/fe_calckey/frontend/client/src/pages/admin/queue.chart.chart.vue +++ b/fe_calckey/frontend/client/src/pages/admin/queue.chart.chart.vue @@ -1,25 +1,25 @@ diff --git a/fe_calckey/frontend/client/src/pages/admin/queue.chart.vue b/fe_calckey/frontend/client/src/pages/admin/queue.chart.vue index ee4f372..fa919ef 100644 --- a/fe_calckey/frontend/client/src/pages/admin/queue.chart.vue +++ b/fe_calckey/frontend/client/src/pages/admin/queue.chart.vue @@ -1,60 +1,60 @@ diff --git a/fe_calckey/frontend/client/src/pages/admin/queue.vue b/fe_calckey/frontend/client/src/pages/admin/queue.vue index b8920f3..37d44fa 100644 --- a/fe_calckey/frontend/client/src/pages/admin/queue.vue +++ b/fe_calckey/frontend/client/src/pages/admin/queue.vue @@ -1,17 +1,17 @@ diff --git a/fe_calckey/frontend/client/src/pages/admin/relays.vue b/fe_calckey/frontend/client/src/pages/admin/relays.vue index 2565ac1..ec05f58 100644 --- a/fe_calckey/frontend/client/src/pages/admin/relays.vue +++ b/fe_calckey/frontend/client/src/pages/admin/relays.vue @@ -1,45 +1,45 @@ diff --git a/fe_calckey/frontend/client/src/pages/admin/security.vue b/fe_calckey/frontend/client/src/pages/admin/security.vue index b93c803..fcf3d56 100644 --- a/fe_calckey/frontend/client/src/pages/admin/security.vue +++ b/fe_calckey/frontend/client/src/pages/admin/security.vue @@ -1,257 +1,257 @@ diff --git a/fe_calckey/frontend/client/src/pages/admin/settings.vue b/fe_calckey/frontend/client/src/pages/admin/settings.vue index e67c44b..98aee83 100644 --- a/fe_calckey/frontend/client/src/pages/admin/settings.vue +++ b/fe_calckey/frontend/client/src/pages/admin/settings.vue @@ -1,397 +1,397 @@ diff --git a/fe_calckey/frontend/client/src/pages/admin/users.vue b/fe_calckey/frontend/client/src/pages/admin/users.vue index cf956c6..0dbadc5 100644 --- a/fe_calckey/frontend/client/src/pages/admin/users.vue +++ b/fe_calckey/frontend/client/src/pages/admin/users.vue @@ -1,124 +1,124 @@ diff --git a/fe_calckey/frontend/client/src/pages/announcements.vue b/fe_calckey/frontend/client/src/pages/announcements.vue index 8e99750..dfd969e 100644 --- a/fe_calckey/frontend/client/src/pages/announcements.vue +++ b/fe_calckey/frontend/client/src/pages/announcements.vue @@ -1,40 +1,40 @@ diff --git a/fe_calckey/frontend/client/src/pages/antenna-timeline.vue b/fe_calckey/frontend/client/src/pages/antenna-timeline.vue index 2100be8..76344be 100644 --- a/fe_calckey/frontend/client/src/pages/antenna-timeline.vue +++ b/fe_calckey/frontend/client/src/pages/antenna-timeline.vue @@ -1,32 +1,32 @@ diff --git a/fe_calckey/frontend/client/src/pages/api-console.vue b/fe_calckey/frontend/client/src/pages/api-console.vue index 214145d..9a12502 100644 --- a/fe_calckey/frontend/client/src/pages/api-console.vue +++ b/fe_calckey/frontend/client/src/pages/api-console.vue @@ -1,46 +1,46 @@ diff --git a/fe_calckey/frontend/client/src/pages/auth.form.vue b/fe_calckey/frontend/client/src/pages/auth.form.vue index 189650f..c276ec3 100644 --- a/fe_calckey/frontend/client/src/pages/auth.form.vue +++ b/fe_calckey/frontend/client/src/pages/auth.form.vue @@ -1,28 +1,28 @@ diff --git a/fe_calckey/frontend/client/src/pages/auth.vue b/fe_calckey/frontend/client/src/pages/auth.vue index 8762f54..7b82e31 100644 --- a/fe_calckey/frontend/client/src/pages/auth.vue +++ b/fe_calckey/frontend/client/src/pages/auth.vue @@ -1,48 +1,48 @@ diff --git a/fe_calckey/frontend/client/src/pages/clip.vue b/fe_calckey/frontend/client/src/pages/clip.vue index bd6788b..9e62adc 100644 --- a/fe_calckey/frontend/client/src/pages/clip.vue +++ b/fe_calckey/frontend/client/src/pages/clip.vue @@ -1,30 +1,30 @@ diff --git a/fe_calckey/frontend/client/src/pages/drive.vue b/fe_calckey/frontend/client/src/pages/drive.vue index 8aeb97b..15b4d9f 100644 --- a/fe_calckey/frontend/client/src/pages/drive.vue +++ b/fe_calckey/frontend/client/src/pages/drive.vue @@ -1,7 +1,7 @@ diff --git a/fe_calckey/frontend/client/src/pages/emojis.emoji.vue b/fe_calckey/frontend/client/src/pages/emojis.emoji.vue index c8b7d64..d487095 100644 --- a/fe_calckey/frontend/client/src/pages/emojis.emoji.vue +++ b/fe_calckey/frontend/client/src/pages/emojis.emoji.vue @@ -1,11 +1,11 @@ diff --git a/fe_calckey/frontend/client/src/pages/explore.featured.vue b/fe_calckey/frontend/client/src/pages/explore.featured.vue index 2d21bfc..013d6d0 100644 --- a/fe_calckey/frontend/client/src/pages/explore.featured.vue +++ b/fe_calckey/frontend/client/src/pages/explore.featured.vue @@ -1,15 +1,15 @@ diff --git a/fe_calckey/frontend/client/src/pages/explore.vue b/fe_calckey/frontend/client/src/pages/explore.vue index 9202d78..a3e03ff 100644 --- a/fe_calckey/frontend/client/src/pages/explore.vue +++ b/fe_calckey/frontend/client/src/pages/explore.vue @@ -1,40 +1,40 @@ diff --git a/fe_calckey/frontend/client/src/pages/favorites.vue b/fe_calckey/frontend/client/src/pages/favorites.vue index 84b5979..a5266a0 100644 --- a/fe_calckey/frontend/client/src/pages/favorites.vue +++ b/fe_calckey/frontend/client/src/pages/favorites.vue @@ -1,37 +1,37 @@ diff --git a/fe_calckey/frontend/client/src/pages/follow-requests.vue b/fe_calckey/frontend/client/src/pages/follow-requests.vue index e320914..3a4c961 100644 --- a/fe_calckey/frontend/client/src/pages/follow-requests.vue +++ b/fe_calckey/frontend/client/src/pages/follow-requests.vue @@ -1,82 +1,82 @@ diff --git a/fe_calckey/frontend/client/src/pages/follow.vue b/fe_calckey/frontend/client/src/pages/follow.vue index 6af698f..48f4ef2 100644 --- a/fe_calckey/frontend/client/src/pages/follow.vue +++ b/fe_calckey/frontend/client/src/pages/follow.vue @@ -1,5 +1,5 @@ diff --git a/fe_calckey/frontend/client/src/pages/gallery/index.vue b/fe_calckey/frontend/client/src/pages/gallery/index.vue index 92fb223..374009e 100644 --- a/fe_calckey/frontend/client/src/pages/gallery/index.vue +++ b/fe_calckey/frontend/client/src/pages/gallery/index.vue @@ -1,109 +1,109 @@ diff --git a/fe_calckey/frontend/client/src/pages/gallery/post.vue b/fe_calckey/frontend/client/src/pages/gallery/post.vue index 9a48a5e..e47cd8f 100644 --- a/fe_calckey/frontend/client/src/pages/gallery/post.vue +++ b/fe_calckey/frontend/client/src/pages/gallery/post.vue @@ -1,147 +1,147 @@ diff --git a/fe_calckey/frontend/client/src/pages/instance-info.vue b/fe_calckey/frontend/client/src/pages/instance-info.vue index 73c1051..f4ccce2 100644 --- a/fe_calckey/frontend/client/src/pages/instance-info.vue +++ b/fe_calckey/frontend/client/src/pages/instance-info.vue @@ -1,340 +1,340 @@ diff --git a/fe_calckey/frontend/client/src/pages/mfm-cheat-sheet.vue b/fe_calckey/frontend/client/src/pages/mfm-cheat-sheet.vue index bf85af4..e92b81d 100644 --- a/fe_calckey/frontend/client/src/pages/mfm-cheat-sheet.vue +++ b/fe_calckey/frontend/client/src/pages/mfm-cheat-sheet.vue @@ -1,155 +1,155 @@ diff --git a/fe_calckey/frontend/client/src/pages/miauth.vue b/fe_calckey/frontend/client/src/pages/miauth.vue index bf4c254..f075ca8 100644 --- a/fe_calckey/frontend/client/src/pages/miauth.vue +++ b/fe_calckey/frontend/client/src/pages/miauth.vue @@ -1,53 +1,53 @@ diff --git a/fe_calckey/frontend/client/src/pages/my-antennas/create.vue b/fe_calckey/frontend/client/src/pages/my-antennas/create.vue index 040a6b0..39950e8 100644 --- a/fe_calckey/frontend/client/src/pages/my-antennas/create.vue +++ b/fe_calckey/frontend/client/src/pages/my-antennas/create.vue @@ -1,9 +1,9 @@ diff --git a/fe_calckey/frontend/client/src/pages/my-antennas/edit.vue b/fe_calckey/frontend/client/src/pages/my-antennas/edit.vue index 97c433f..2309d17 100644 --- a/fe_calckey/frontend/client/src/pages/my-antennas/edit.vue +++ b/fe_calckey/frontend/client/src/pages/my-antennas/edit.vue @@ -1,11 +1,11 @@ diff --git a/fe_calckey/frontend/client/src/pages/my-antennas/editor.vue b/fe_calckey/frontend/client/src/pages/my-antennas/editor.vue index 27889b4..52da64e 100644 --- a/fe_calckey/frontend/client/src/pages/my-antennas/editor.vue +++ b/fe_calckey/frontend/client/src/pages/my-antennas/editor.vue @@ -1,116 +1,116 @@ diff --git a/fe_calckey/frontend/client/src/pages/my-antennas/index.vue b/fe_calckey/frontend/client/src/pages/my-antennas/index.vue index 259c6db..feef954 100644 --- a/fe_calckey/frontend/client/src/pages/my-antennas/index.vue +++ b/fe_calckey/frontend/client/src/pages/my-antennas/index.vue @@ -1,57 +1,57 @@ diff --git a/fe_calckey/frontend/client/src/pages/my-clips/index.vue b/fe_calckey/frontend/client/src/pages/my-clips/index.vue index f88ee5a..bc54e1c 100644 --- a/fe_calckey/frontend/client/src/pages/my-clips/index.vue +++ b/fe_calckey/frontend/client/src/pages/my-clips/index.vue @@ -1,40 +1,40 @@ diff --git a/fe_calckey/frontend/client/src/pages/my-groups/group.vue b/fe_calckey/frontend/client/src/pages/my-groups/group.vue index 192572d..feeb1d3 100644 --- a/fe_calckey/frontend/client/src/pages/my-groups/group.vue +++ b/fe_calckey/frontend/client/src/pages/my-groups/group.vue @@ -1,38 +1,38 @@ diff --git a/fe_calckey/frontend/client/src/pages/my-groups/index.vue b/fe_calckey/frontend/client/src/pages/my-groups/index.vue index ce04f9f..a6d4534 100644 --- a/fe_calckey/frontend/client/src/pages/my-groups/index.vue +++ b/fe_calckey/frontend/client/src/pages/my-groups/index.vue @@ -1,51 +1,51 @@ diff --git a/fe_calckey/frontend/client/src/pages/my-lists/index.vue b/fe_calckey/frontend/client/src/pages/my-lists/index.vue index cb3a74f..396e026 100644 --- a/fe_calckey/frontend/client/src/pages/my-lists/index.vue +++ b/fe_calckey/frontend/client/src/pages/my-lists/index.vue @@ -1,44 +1,44 @@ diff --git a/fe_calckey/frontend/client/src/pages/my-lists/list.vue b/fe_calckey/frontend/client/src/pages/my-lists/list.vue index e90776d..8fa51b2 100644 --- a/fe_calckey/frontend/client/src/pages/my-lists/list.vue +++ b/fe_calckey/frontend/client/src/pages/my-lists/list.vue @@ -1,67 +1,67 @@ diff --git a/fe_calckey/frontend/client/src/pages/no-graze.vue b/fe_calckey/frontend/client/src/pages/no-graze.vue index b6e01eb..3c09be6 100644 --- a/fe_calckey/frontend/client/src/pages/no-graze.vue +++ b/fe_calckey/frontend/client/src/pages/no-graze.vue @@ -1,17 +1,17 @@ diff --git a/fe_calckey/frontend/client/src/pages/note.vue b/fe_calckey/frontend/client/src/pages/note.vue index c127ad0..56bf9ba 100644 --- a/fe_calckey/frontend/client/src/pages/note.vue +++ b/fe_calckey/frontend/client/src/pages/note.vue @@ -1,71 +1,71 @@ diff --git a/fe_calckey/frontend/client/src/pages/notifications.vue b/fe_calckey/frontend/client/src/pages/notifications.vue index bda42a8..056a3f0 100644 --- a/fe_calckey/frontend/client/src/pages/notifications.vue +++ b/fe_calckey/frontend/client/src/pages/notifications.vue @@ -1,54 +1,54 @@ diff --git a/fe_calckey/frontend/client/src/pages/page-editor/els/page-editor.el.button.vue b/fe_calckey/frontend/client/src/pages/page-editor/els/page-editor.el.button.vue index bd3c0e6..44fd4bf 100644 --- a/fe_calckey/frontend/client/src/pages/page-editor/els/page-editor.el.button.vue +++ b/fe_calckey/frontend/client/src/pages/page-editor/els/page-editor.el.button.vue @@ -1,98 +1,98 @@ diff --git a/fe_calckey/frontend/client/src/pages/page-editor/els/page-editor.el.canvas.vue b/fe_calckey/frontend/client/src/pages/page-editor/els/page-editor.el.canvas.vue index 3909044..fef4ec6 100644 --- a/fe_calckey/frontend/client/src/pages/page-editor/els/page-editor.el.canvas.vue +++ b/fe_calckey/frontend/client/src/pages/page-editor/els/page-editor.el.canvas.vue @@ -1,33 +1,33 @@ diff --git a/fe_calckey/frontend/client/src/pages/page-editor/els/page-editor.el.counter.vue b/fe_calckey/frontend/client/src/pages/page-editor/els/page-editor.el.counter.vue index 8a387a1..e04874c 100644 --- a/fe_calckey/frontend/client/src/pages/page-editor/els/page-editor.el.counter.vue +++ b/fe_calckey/frontend/client/src/pages/page-editor/els/page-editor.el.counter.vue @@ -1,31 +1,31 @@ diff --git a/fe_calckey/frontend/client/src/pages/page-editor/els/page-editor.el.if.vue b/fe_calckey/frontend/client/src/pages/page-editor/els/page-editor.el.if.vue index b4a262f..4bd6c43 100644 --- a/fe_calckey/frontend/client/src/pages/page-editor/els/page-editor.el.if.vue +++ b/fe_calckey/frontend/client/src/pages/page-editor/els/page-editor.el.if.vue @@ -1,47 +1,47 @@ diff --git a/fe_calckey/frontend/client/src/pages/page-editor/els/page-editor.el.image.vue b/fe_calckey/frontend/client/src/pages/page-editor/els/page-editor.el.image.vue index 023df80..6340dd3 100644 --- a/fe_calckey/frontend/client/src/pages/page-editor/els/page-editor.el.image.vue +++ b/fe_calckey/frontend/client/src/pages/page-editor/els/page-editor.el.image.vue @@ -1,25 +1,25 @@ diff --git a/fe_calckey/frontend/client/src/pages/page-editor/els/page-editor.el.note.vue b/fe_calckey/frontend/client/src/pages/page-editor/els/page-editor.el.note.vue index b961850..800166f 100644 --- a/fe_calckey/frontend/client/src/pages/page-editor/els/page-editor.el.note.vue +++ b/fe_calckey/frontend/client/src/pages/page-editor/els/page-editor.el.note.vue @@ -1,37 +1,37 @@ diff --git a/fe_calckey/frontend/client/src/pages/page-editor/els/page-editor.el.number-input.vue b/fe_calckey/frontend/client/src/pages/page-editor/els/page-editor.el.number-input.vue index aab3ba5..0f6ae09 100644 --- a/fe_calckey/frontend/client/src/pages/page-editor/els/page-editor.el.number-input.vue +++ b/fe_calckey/frontend/client/src/pages/page-editor/els/page-editor.el.number-input.vue @@ -1,31 +1,31 @@ diff --git a/fe_calckey/frontend/client/src/pages/page-editor/els/page-editor.el.post.vue b/fe_calckey/frontend/client/src/pages/page-editor/els/page-editor.el.post.vue index 27129d6..ba9bbf9 100644 --- a/fe_calckey/frontend/client/src/pages/page-editor/els/page-editor.el.post.vue +++ b/fe_calckey/frontend/client/src/pages/page-editor/els/page-editor.el.post.vue @@ -1,28 +1,28 @@ diff --git a/fe_calckey/frontend/client/src/pages/page-editor/els/page-editor.el.radio-button.vue b/fe_calckey/frontend/client/src/pages/page-editor/els/page-editor.el.radio-button.vue index 62254b7..353ceb3 100644 --- a/fe_calckey/frontend/client/src/pages/page-editor/els/page-editor.el.radio-button.vue +++ b/fe_calckey/frontend/client/src/pages/page-editor/els/page-editor.el.radio-button.vue @@ -1,35 +1,35 @@ diff --git a/fe_calckey/frontend/client/src/pages/page-editor/els/page-editor.el.section.vue b/fe_calckey/frontend/client/src/pages/page-editor/els/page-editor.el.section.vue index 3db5a7d..1cd30de 100644 --- a/fe_calckey/frontend/client/src/pages/page-editor/els/page-editor.el.section.vue +++ b/fe_calckey/frontend/client/src/pages/page-editor/els/page-editor.el.section.vue @@ -1,22 +1,22 @@ diff --git a/fe_calckey/frontend/client/src/pages/page-editor/els/page-editor.el.switch.vue b/fe_calckey/frontend/client/src/pages/page-editor/els/page-editor.el.switch.vue index 78302e9..446829a 100644 --- a/fe_calckey/frontend/client/src/pages/page-editor/els/page-editor.el.switch.vue +++ b/fe_calckey/frontend/client/src/pages/page-editor/els/page-editor.el.switch.vue @@ -1,30 +1,30 @@ diff --git a/fe_calckey/frontend/client/src/pages/page-editor/els/page-editor.el.text-input.vue b/fe_calckey/frontend/client/src/pages/page-editor/els/page-editor.el.text-input.vue index e2b14b8..983f973 100644 --- a/fe_calckey/frontend/client/src/pages/page-editor/els/page-editor.el.text-input.vue +++ b/fe_calckey/frontend/client/src/pages/page-editor/els/page-editor.el.text-input.vue @@ -1,30 +1,30 @@ diff --git a/fe_calckey/frontend/client/src/pages/page-editor/els/page-editor.el.text.vue b/fe_calckey/frontend/client/src/pages/page-editor/els/page-editor.el.text.vue index 08572b3..98da0d9 100644 --- a/fe_calckey/frontend/client/src/pages/page-editor/els/page-editor.el.text.vue +++ b/fe_calckey/frontend/client/src/pages/page-editor/els/page-editor.el.text.vue @@ -1,14 +1,14 @@ diff --git a/fe_calckey/frontend/client/src/pages/page-editor/els/page-editor.el.textarea-input.vue b/fe_calckey/frontend/client/src/pages/page-editor/els/page-editor.el.textarea-input.vue index 5f020f7..5a51660 100644 --- a/fe_calckey/frontend/client/src/pages/page-editor/els/page-editor.el.textarea-input.vue +++ b/fe_calckey/frontend/client/src/pages/page-editor/els/page-editor.el.textarea-input.vue @@ -1,30 +1,30 @@ diff --git a/fe_calckey/frontend/client/src/pages/page-editor/els/page-editor.el.textarea.vue b/fe_calckey/frontend/client/src/pages/page-editor/els/page-editor.el.textarea.vue index 3c956f0..46a4f24 100644 --- a/fe_calckey/frontend/client/src/pages/page-editor/els/page-editor.el.textarea.vue +++ b/fe_calckey/frontend/client/src/pages/page-editor/els/page-editor.el.textarea.vue @@ -1,14 +1,14 @@ diff --git a/fe_calckey/frontend/client/src/pages/page-editor/page-editor.blocks.vue b/fe_calckey/frontend/client/src/pages/page-editor/page-editor.blocks.vue index 2200b4a..a711cb7 100644 --- a/fe_calckey/frontend/client/src/pages/page-editor/page-editor.blocks.vue +++ b/fe_calckey/frontend/client/src/pages/page-editor/page-editor.blocks.vue @@ -1,23 +1,23 @@ diff --git a/fe_calckey/frontend/client/src/pages/page-editor/page-editor.container.vue b/fe_calckey/frontend/client/src/pages/page-editor/page-editor.container.vue index 400c705..0fa654b 100644 --- a/fe_calckey/frontend/client/src/pages/page-editor/page-editor.container.vue +++ b/fe_calckey/frontend/client/src/pages/page-editor/page-editor.container.vue @@ -1,45 +1,45 @@ diff --git a/fe_calckey/frontend/client/src/pages/page-editor/page-editor.script-block.vue b/fe_calckey/frontend/client/src/pages/page-editor/page-editor.script-block.vue index 7d88ec7..c4a6c70 100644 --- a/fe_calckey/frontend/client/src/pages/page-editor/page-editor.script-block.vue +++ b/fe_calckey/frontend/client/src/pages/page-editor/page-editor.script-block.vue @@ -1,151 +1,151 @@ diff --git a/fe_calckey/frontend/client/src/pages/page-editor/page-editor.vue b/fe_calckey/frontend/client/src/pages/page-editor/page-editor.vue index da951b7..c1d805d 100644 --- a/fe_calckey/frontend/client/src/pages/page-editor/page-editor.vue +++ b/fe_calckey/frontend/client/src/pages/page-editor/page-editor.vue @@ -1,163 +1,163 @@ diff --git a/fe_calckey/frontend/client/src/pages/page.vue b/fe_calckey/frontend/client/src/pages/page.vue index 57e963a..95262c9 100644 --- a/fe_calckey/frontend/client/src/pages/page.vue +++ b/fe_calckey/frontend/client/src/pages/page.vue @@ -1,165 +1,165 @@ diff --git a/fe_calckey/frontend/client/src/pages/pages.vue b/fe_calckey/frontend/client/src/pages/pages.vue index 1724ab2..89f7063 100644 --- a/fe_calckey/frontend/client/src/pages/pages.vue +++ b/fe_calckey/frontend/client/src/pages/pages.vue @@ -1,83 +1,83 @@ diff --git a/fe_calckey/frontend/client/src/pages/preview.vue b/fe_calckey/frontend/client/src/pages/preview.vue index 41e662f..6857e67 100644 --- a/fe_calckey/frontend/client/src/pages/preview.vue +++ b/fe_calckey/frontend/client/src/pages/preview.vue @@ -1,7 +1,7 @@ diff --git a/fe_calckey/frontend/client/src/pages/registry.keys.vue b/fe_calckey/frontend/client/src/pages/registry.keys.vue index bdc2584..46c24f8 100644 --- a/fe_calckey/frontend/client/src/pages/registry.keys.vue +++ b/fe_calckey/frontend/client/src/pages/registry.keys.vue @@ -1,42 +1,42 @@ diff --git a/fe_calckey/frontend/client/src/pages/registry.value.vue b/fe_calckey/frontend/client/src/pages/registry.value.vue index b95061c..01b8bb5 100644 --- a/fe_calckey/frontend/client/src/pages/registry.value.vue +++ b/fe_calckey/frontend/client/src/pages/registry.value.vue @@ -1,56 +1,56 @@ diff --git a/fe_calckey/frontend/client/src/pages/registry.vue b/fe_calckey/frontend/client/src/pages/registry.vue index 7bb300c..89c59ff 100644 --- a/fe_calckey/frontend/client/src/pages/registry.vue +++ b/fe_calckey/frontend/client/src/pages/registry.vue @@ -1,26 +1,26 @@ diff --git a/fe_calckey/frontend/client/src/pages/reset-password.vue b/fe_calckey/frontend/client/src/pages/reset-password.vue index 3f57e89..ae39659 100644 --- a/fe_calckey/frontend/client/src/pages/reset-password.vue +++ b/fe_calckey/frontend/client/src/pages/reset-password.vue @@ -1,32 +1,32 @@ diff --git a/fe_calckey/frontend/client/src/pages/scratchpad.vue b/fe_calckey/frontend/client/src/pages/scratchpad.vue index 06c6a8c..650f207 100644 --- a/fe_calckey/frontend/client/src/pages/scratchpad.vue +++ b/fe_calckey/frontend/client/src/pages/scratchpad.vue @@ -1,39 +1,39 @@ diff --git a/fe_calckey/frontend/client/src/pages/search.vue b/fe_calckey/frontend/client/src/pages/search.vue index bfb5851..72b8417 100644 --- a/fe_calckey/frontend/client/src/pages/search.vue +++ b/fe_calckey/frontend/client/src/pages/search.vue @@ -1,43 +1,43 @@ diff --git a/fe_calckey/frontend/client/src/pages/settings/2fa.qrdialog.vue b/fe_calckey/frontend/client/src/pages/settings/2fa.qrdialog.vue index 5f14d06..c4c399b 100644 --- a/fe_calckey/frontend/client/src/pages/settings/2fa.qrdialog.vue +++ b/fe_calckey/frontend/client/src/pages/settings/2fa.qrdialog.vue @@ -1,52 +1,52 @@ diff --git a/fe_calckey/frontend/client/src/pages/settings/2fa.vue b/fe_calckey/frontend/client/src/pages/settings/2fa.vue index 56a4cca..83d0a82 100644 --- a/fe_calckey/frontend/client/src/pages/settings/2fa.vue +++ b/fe_calckey/frontend/client/src/pages/settings/2fa.vue @@ -1,123 +1,123 @@ diff --git a/fe_calckey/frontend/client/src/pages/settings/account-info.vue b/fe_calckey/frontend/client/src/pages/settings/account-info.vue index faaee07..3c84b4e 100644 --- a/fe_calckey/frontend/client/src/pages/settings/account-info.vue +++ b/fe_calckey/frontend/client/src/pages/settings/account-info.vue @@ -1,175 +1,175 @@ diff --git a/fe_calckey/frontend/client/src/pages/settings/accounts.vue b/fe_calckey/frontend/client/src/pages/settings/accounts.vue index 3010354..ab802b3 100644 --- a/fe_calckey/frontend/client/src/pages/settings/accounts.vue +++ b/fe_calckey/frontend/client/src/pages/settings/accounts.vue @@ -1,31 +1,31 @@ diff --git a/fe_calckey/frontend/client/src/pages/settings/api.vue b/fe_calckey/frontend/client/src/pages/settings/api.vue index a694c45..aa128fd 100644 --- a/fe_calckey/frontend/client/src/pages/settings/api.vue +++ b/fe_calckey/frontend/client/src/pages/settings/api.vue @@ -1,18 +1,18 @@ diff --git a/fe_calckey/frontend/client/src/pages/settings/apps.vue b/fe_calckey/frontend/client/src/pages/settings/apps.vue index f42bb77..ba63c78 100644 --- a/fe_calckey/frontend/client/src/pages/settings/apps.vue +++ b/fe_calckey/frontend/client/src/pages/settings/apps.vue @@ -1,57 +1,57 @@ diff --git a/fe_calckey/frontend/client/src/pages/settings/custom-css.vue b/fe_calckey/frontend/client/src/pages/settings/custom-css.vue index e24ff33..3861b27 100644 --- a/fe_calckey/frontend/client/src/pages/settings/custom-css.vue +++ b/fe_calckey/frontend/client/src/pages/settings/custom-css.vue @@ -1,17 +1,17 @@ diff --git a/fe_calckey/frontend/client/src/pages/settings/custom-katex-macro.vue b/fe_calckey/frontend/client/src/pages/settings/custom-katex-macro.vue index 88a8e2c..5924f2a 100644 --- a/fe_calckey/frontend/client/src/pages/settings/custom-katex-macro.vue +++ b/fe_calckey/frontend/client/src/pages/settings/custom-katex-macro.vue @@ -1,23 +1,23 @@ diff --git a/fe_calckey/frontend/client/src/pages/settings/deck.vue b/fe_calckey/frontend/client/src/pages/settings/deck.vue index 821c5ed..742aa3b 100644 --- a/fe_calckey/frontend/client/src/pages/settings/deck.vue +++ b/fe_calckey/frontend/client/src/pages/settings/deck.vue @@ -1,20 +1,20 @@ diff --git a/fe_calckey/frontend/client/src/pages/settings/delete-account.vue b/fe_calckey/frontend/client/src/pages/settings/delete-account.vue index 574806c..0cd4782 100644 --- a/fe_calckey/frontend/client/src/pages/settings/delete-account.vue +++ b/fe_calckey/frontend/client/src/pages/settings/delete-account.vue @@ -1,22 +1,22 @@ diff --git a/fe_calckey/frontend/client/src/pages/settings/drive.vue b/fe_calckey/frontend/client/src/pages/settings/drive.vue index 42961fd..2d94081 100644 --- a/fe_calckey/frontend/client/src/pages/settings/drive.vue +++ b/fe_calckey/frontend/client/src/pages/settings/drive.vue @@ -1,74 +1,74 @@ @@ -159,16 +159,16 @@ definePageMetadata({ @use "sass:math"; .uawsfosz { - > .meter { - $size: 12px; - background: rgba(0, 0, 0, 0.1); - border-radius: math.div($size, 2); - overflow: hidden; + > .meter { + $size: 12px; + background: rgba(0, 0, 0, 0.1); + border-radius: math.div($size, 2); + overflow: hidden; - > div { - height: $size; - border-radius: math.div($size, 2); - } - } + > div { + height: $size; + border-radius: math.div($size, 2); + } + } } diff --git a/fe_calckey/frontend/client/src/pages/settings/email.vue b/fe_calckey/frontend/client/src/pages/settings/email.vue index fef21c1..6c73191 100644 --- a/fe_calckey/frontend/client/src/pages/settings/email.vue +++ b/fe_calckey/frontend/client/src/pages/settings/email.vue @@ -1,63 +1,63 @@ diff --git a/fe_calckey/frontend/client/src/pages/settings/import-export.vue b/fe_calckey/frontend/client/src/pages/settings/import-export.vue index b2ac12c..efbc1df 100644 --- a/fe_calckey/frontend/client/src/pages/settings/import-export.vue +++ b/fe_calckey/frontend/client/src/pages/settings/import-export.vue @@ -1,180 +1,180 @@ diff --git a/fe_calckey/frontend/client/src/pages/settings/index.vue b/fe_calckey/frontend/client/src/pages/settings/index.vue index 429186c..47d3dad 100644 --- a/fe_calckey/frontend/client/src/pages/settings/index.vue +++ b/fe_calckey/frontend/client/src/pages/settings/index.vue @@ -1,77 +1,64 @@ diff --git a/fe_calckey/frontend/client/src/pages/settings/integration.vue b/fe_calckey/frontend/client/src/pages/settings/integration.vue deleted file mode 100644 index 4a413e3..0000000 --- a/fe_calckey/frontend/client/src/pages/settings/integration.vue +++ /dev/null @@ -1,130 +0,0 @@ - - - diff --git a/fe_calckey/frontend/client/src/pages/settings/migration.vue b/fe_calckey/frontend/client/src/pages/settings/migration.vue index df65e6e..d6b25ed 100644 --- a/fe_calckey/frontend/client/src/pages/settings/migration.vue +++ b/fe_calckey/frontend/client/src/pages/settings/migration.vue @@ -1,53 +1,53 @@ diff --git a/fe_calckey/frontend/client/src/pages/settings/mute-block.vue b/fe_calckey/frontend/client/src/pages/settings/mute-block.vue index 81e9ec8..c1bd502 100644 --- a/fe_calckey/frontend/client/src/pages/settings/mute-block.vue +++ b/fe_calckey/frontend/client/src/pages/settings/mute-block.vue @@ -1,42 +1,42 @@ diff --git a/fe_calckey/frontend/client/src/pages/settings/navbar.vue b/fe_calckey/frontend/client/src/pages/settings/navbar.vue index 10aeb97..5a9989a 100644 --- a/fe_calckey/frontend/client/src/pages/settings/navbar.vue +++ b/fe_calckey/frontend/client/src/pages/settings/navbar.vue @@ -1,32 +1,32 @@ diff --git a/fe_calckey/frontend/client/src/pages/settings/notifications.vue b/fe_calckey/frontend/client/src/pages/settings/notifications.vue index 57a054d..7aa11ef 100644 --- a/fe_calckey/frontend/client/src/pages/settings/notifications.vue +++ b/fe_calckey/frontend/client/src/pages/settings/notifications.vue @@ -1,51 +1,51 @@ diff --git a/fe_calckey/frontend/client/src/pages/settings/other.vue b/fe_calckey/frontend/client/src/pages/settings/other.vue index 6a06949..179cf58 100644 --- a/fe_calckey/frontend/client/src/pages/settings/other.vue +++ b/fe_calckey/frontend/client/src/pages/settings/other.vue @@ -1,31 +1,31 @@ diff --git a/fe_calckey/frontend/client/src/pages/settings/plugin.install.vue b/fe_calckey/frontend/client/src/pages/settings/plugin.install.vue index ab678cf..b9b3e5a 100644 --- a/fe_calckey/frontend/client/src/pages/settings/plugin.install.vue +++ b/fe_calckey/frontend/client/src/pages/settings/plugin.install.vue @@ -1,20 +1,20 @@ diff --git a/fe_calckey/frontend/client/src/pages/settings/plugin.vue b/fe_calckey/frontend/client/src/pages/settings/plugin.vue index 6120c48..eee0199 100644 --- a/fe_calckey/frontend/client/src/pages/settings/plugin.vue +++ b/fe_calckey/frontend/client/src/pages/settings/plugin.vue @@ -1,62 +1,62 @@ diff --git a/fe_calckey/frontend/client/src/pages/settings/privacy.vue b/fe_calckey/frontend/client/src/pages/settings/privacy.vue index 07ae24e..90b5649 100644 --- a/fe_calckey/frontend/client/src/pages/settings/privacy.vue +++ b/fe_calckey/frontend/client/src/pages/settings/privacy.vue @@ -1,136 +1,136 @@ diff --git a/fe_calckey/frontend/client/src/pages/settings/profile.vue b/fe_calckey/frontend/client/src/pages/settings/profile.vue index 17ce2d1..6e8d810 100644 --- a/fe_calckey/frontend/client/src/pages/settings/profile.vue +++ b/fe_calckey/frontend/client/src/pages/settings/profile.vue @@ -1,160 +1,160 @@ diff --git a/fe_calckey/frontend/client/src/pages/settings/reaction.vue b/fe_calckey/frontend/client/src/pages/settings/reaction.vue index 8d8bca8..6011ae7 100644 --- a/fe_calckey/frontend/client/src/pages/settings/reaction.vue +++ b/fe_calckey/frontend/client/src/pages/settings/reaction.vue @@ -1,125 +1,125 @@ diff --git a/fe_calckey/frontend/client/src/pages/settings/security.vue b/fe_calckey/frontend/client/src/pages/settings/security.vue index 88ef2ba..3c82ee4 100644 --- a/fe_calckey/frontend/client/src/pages/settings/security.vue +++ b/fe_calckey/frontend/client/src/pages/settings/security.vue @@ -1,55 +1,55 @@ diff --git a/fe_calckey/frontend/client/src/pages/settings/statusbar.statusbar.vue b/fe_calckey/frontend/client/src/pages/settings/statusbar.statusbar.vue index b64f167..57d5a01 100644 --- a/fe_calckey/frontend/client/src/pages/settings/statusbar.statusbar.vue +++ b/fe_calckey/frontend/client/src/pages/settings/statusbar.statusbar.vue @@ -1,144 +1,144 @@ diff --git a/fe_calckey/frontend/client/src/pages/settings/statusbar.vue b/fe_calckey/frontend/client/src/pages/settings/statusbar.vue index 96a80e8..7fcd2d4 100644 --- a/fe_calckey/frontend/client/src/pages/settings/statusbar.vue +++ b/fe_calckey/frontend/client/src/pages/settings/statusbar.vue @@ -1,12 +1,12 @@ diff --git a/fe_calckey/frontend/client/src/pages/settings/theme.install.vue b/fe_calckey/frontend/client/src/pages/settings/theme.install.vue index 0428de0..3109b29 100644 --- a/fe_calckey/frontend/client/src/pages/settings/theme.install.vue +++ b/fe_calckey/frontend/client/src/pages/settings/theme.install.vue @@ -1,30 +1,30 @@ diff --git a/fe_calckey/frontend/client/src/pages/settings/theme.manage.vue b/fe_calckey/frontend/client/src/pages/settings/theme.manage.vue index a1b675e..4d0f31f 100644 --- a/fe_calckey/frontend/client/src/pages/settings/theme.manage.vue +++ b/fe_calckey/frontend/client/src/pages/settings/theme.manage.vue @@ -1,57 +1,57 @@ diff --git a/fe_calckey/frontend/client/src/pages/settings/theme.vue b/fe_calckey/frontend/client/src/pages/settings/theme.vue index 9ed3001..b2defc6 100644 --- a/fe_calckey/frontend/client/src/pages/settings/theme.vue +++ b/fe_calckey/frontend/client/src/pages/settings/theme.vue @@ -1,157 +1,157 @@ diff --git a/fe_calckey/frontend/client/src/pages/settings/webhook.edit.vue b/fe_calckey/frontend/client/src/pages/settings/webhook.edit.vue index 9d171c4..5f6382a 100644 --- a/fe_calckey/frontend/client/src/pages/settings/webhook.edit.vue +++ b/fe_calckey/frontend/client/src/pages/settings/webhook.edit.vue @@ -1,56 +1,56 @@ diff --git a/fe_calckey/frontend/client/src/pages/settings/webhook.new.vue b/fe_calckey/frontend/client/src/pages/settings/webhook.new.vue index 3ff25c3..91502e2 100644 --- a/fe_calckey/frontend/client/src/pages/settings/webhook.new.vue +++ b/fe_calckey/frontend/client/src/pages/settings/webhook.new.vue @@ -1,54 +1,54 @@ diff --git a/fe_calckey/frontend/client/src/pages/settings/webhook.vue b/fe_calckey/frontend/client/src/pages/settings/webhook.vue index 156db5f..d5eb79c 100644 --- a/fe_calckey/frontend/client/src/pages/settings/webhook.vue +++ b/fe_calckey/frontend/client/src/pages/settings/webhook.vue @@ -1,54 +1,54 @@ diff --git a/fe_calckey/frontend/client/src/pages/settings/word-mute.vue b/fe_calckey/frontend/client/src/pages/settings/word-mute.vue index 9c69358..57d11bf 100644 --- a/fe_calckey/frontend/client/src/pages/settings/word-mute.vue +++ b/fe_calckey/frontend/client/src/pages/settings/word-mute.vue @@ -1,52 +1,52 @@ diff --git a/fe_calckey/frontend/client/src/pages/share.vue b/fe_calckey/frontend/client/src/pages/share.vue index 5b4231f..6c8c435 100644 --- a/fe_calckey/frontend/client/src/pages/share.vue +++ b/fe_calckey/frontend/client/src/pages/share.vue @@ -1,32 +1,32 @@ diff --git a/fe_calckey/frontend/client/src/pages/signup-complete.vue b/fe_calckey/frontend/client/src/pages/signup-complete.vue index deb1f78..2f96972 100644 --- a/fe_calckey/frontend/client/src/pages/signup-complete.vue +++ b/fe_calckey/frontend/client/src/pages/signup-complete.vue @@ -1,7 +1,7 @@ diff --git a/fe_calckey/frontend/client/src/pages/tag.vue b/fe_calckey/frontend/client/src/pages/tag.vue index e5d8c67..bf1f908 100644 --- a/fe_calckey/frontend/client/src/pages/tag.vue +++ b/fe_calckey/frontend/client/src/pages/tag.vue @@ -1,43 +1,43 @@ diff --git a/fe_calckey/frontend/client/src/pages/theme-editor.vue b/fe_calckey/frontend/client/src/pages/theme-editor.vue index 28a50f9..fb2bbe2 100644 --- a/fe_calckey/frontend/client/src/pages/theme-editor.vue +++ b/fe_calckey/frontend/client/src/pages/theme-editor.vue @@ -1,145 +1,145 @@ diff --git a/fe_calckey/frontend/client/src/pages/timeline.vue b/fe_calckey/frontend/client/src/pages/timeline.vue index 2633d0e..4d17646 100644 --- a/fe_calckey/frontend/client/src/pages/timeline.vue +++ b/fe_calckey/frontend/client/src/pages/timeline.vue @@ -1,27 +1,27 @@ diff --git a/fe_calckey/frontend/client/src/pages/user-info.vue b/fe_calckey/frontend/client/src/pages/user-info.vue index 7a4ebde..66a8423 100644 --- a/fe_calckey/frontend/client/src/pages/user-info.vue +++ b/fe_calckey/frontend/client/src/pages/user-info.vue @@ -1,341 +1,341 @@ diff --git a/fe_calckey/frontend/client/src/pages/user-list-timeline.vue b/fe_calckey/frontend/client/src/pages/user-list-timeline.vue index 7b33e8c..acd0100 100644 --- a/fe_calckey/frontend/client/src/pages/user-list-timeline.vue +++ b/fe_calckey/frontend/client/src/pages/user-list-timeline.vue @@ -1,27 +1,27 @@ diff --git a/fe_calckey/frontend/client/src/pages/user/clips.vue b/fe_calckey/frontend/client/src/pages/user/clips.vue index 5eb5748..47bf5f6 100644 --- a/fe_calckey/frontend/client/src/pages/user/clips.vue +++ b/fe_calckey/frontend/client/src/pages/user/clips.vue @@ -1,26 +1,26 @@ diff --git a/fe_calckey/frontend/client/src/pages/user/follow-list.vue b/fe_calckey/frontend/client/src/pages/user/follow-list.vue index b4715d8..0adedae 100644 --- a/fe_calckey/frontend/client/src/pages/user/follow-list.vue +++ b/fe_calckey/frontend/client/src/pages/user/follow-list.vue @@ -1,25 +1,25 @@ diff --git a/fe_calckey/frontend/client/src/pages/user/followers.vue b/fe_calckey/frontend/client/src/pages/user/followers.vue index b229227..0e245fc 100644 --- a/fe_calckey/frontend/client/src/pages/user/followers.vue +++ b/fe_calckey/frontend/client/src/pages/user/followers.vue @@ -1,28 +1,28 @@ diff --git a/fe_calckey/frontend/client/src/pages/user/following.vue b/fe_calckey/frontend/client/src/pages/user/following.vue index be994f8..e596f81 100644 --- a/fe_calckey/frontend/client/src/pages/user/following.vue +++ b/fe_calckey/frontend/client/src/pages/user/following.vue @@ -1,28 +1,28 @@ diff --git a/fe_calckey/frontend/client/src/pages/user/gallery.vue b/fe_calckey/frontend/client/src/pages/user/gallery.vue index 47a4ab7..81fc85e 100644 --- a/fe_calckey/frontend/client/src/pages/user/gallery.vue +++ b/fe_calckey/frontend/client/src/pages/user/gallery.vue @@ -1,16 +1,16 @@ diff --git a/fe_calckey/frontend/client/src/pages/user/home.vue b/fe_calckey/frontend/client/src/pages/user/home.vue index ba6ebc5..ec64cc4 100644 --- a/fe_calckey/frontend/client/src/pages/user/home.vue +++ b/fe_calckey/frontend/client/src/pages/user/home.vue @@ -1,347 +1,347 @@ diff --git a/fe_calckey/frontend/client/src/pages/user/index.activity.vue b/fe_calckey/frontend/client/src/pages/user/index.activity.vue index 1e57ece..489e3d0 100644 --- a/fe_calckey/frontend/client/src/pages/user/index.activity.vue +++ b/fe_calckey/frontend/client/src/pages/user/index.activity.vue @@ -1,31 +1,31 @@ diff --git a/fe_calckey/frontend/client/src/pages/user/index.photos.vue b/fe_calckey/frontend/client/src/pages/user/index.photos.vue index 77bab8f..0726c28 100644 --- a/fe_calckey/frontend/client/src/pages/user/index.photos.vue +++ b/fe_calckey/frontend/client/src/pages/user/index.photos.vue @@ -1,30 +1,30 @@ diff --git a/fe_calckey/frontend/client/src/pages/user/index.timeline.vue b/fe_calckey/frontend/client/src/pages/user/index.timeline.vue index 1792b63..9478f5e 100644 --- a/fe_calckey/frontend/client/src/pages/user/index.timeline.vue +++ b/fe_calckey/frontend/client/src/pages/user/index.timeline.vue @@ -1,14 +1,14 @@ diff --git a/fe_calckey/frontend/client/src/pages/user/index.vue b/fe_calckey/frontend/client/src/pages/user/index.vue index 2452f1d..ce55b89 100644 --- a/fe_calckey/frontend/client/src/pages/user/index.vue +++ b/fe_calckey/frontend/client/src/pages/user/index.vue @@ -1,31 +1,31 @@ diff --git a/fe_calckey/frontend/client/src/pages/user/pages.vue b/fe_calckey/frontend/client/src/pages/user/pages.vue index ff9777a..ae511c5 100644 --- a/fe_calckey/frontend/client/src/pages/user/pages.vue +++ b/fe_calckey/frontend/client/src/pages/user/pages.vue @@ -1,14 +1,14 @@ diff --git a/fe_calckey/frontend/client/src/pages/user/reactions.vue b/fe_calckey/frontend/client/src/pages/user/reactions.vue index 4ae1472..93fb187 100644 --- a/fe_calckey/frontend/client/src/pages/user/reactions.vue +++ b/fe_calckey/frontend/client/src/pages/user/reactions.vue @@ -1,26 +1,26 @@ diff --git a/fe_calckey/frontend/client/src/pages/verify-email.vue b/fe_calckey/frontend/client/src/pages/verify-email.vue index b5830ae..cf13f64 100644 --- a/fe_calckey/frontend/client/src/pages/verify-email.vue +++ b/fe_calckey/frontend/client/src/pages/verify-email.vue @@ -1,7 +1,7 @@ diff --git a/fe_calckey/frontend/client/src/pages/welcome.entrance.a.vue b/fe_calckey/frontend/client/src/pages/welcome.entrance.a.vue index 3866b08..a84e676 100644 --- a/fe_calckey/frontend/client/src/pages/welcome.entrance.a.vue +++ b/fe_calckey/frontend/client/src/pages/welcome.entrance.a.vue @@ -1,100 +1,100 @@ diff --git a/fe_calckey/frontend/client/src/pages/welcome.entrance.b.vue b/fe_calckey/frontend/client/src/pages/welcome.entrance.b.vue index 82651ae..fea0e8a 100644 --- a/fe_calckey/frontend/client/src/pages/welcome.entrance.b.vue +++ b/fe_calckey/frontend/client/src/pages/welcome.entrance.b.vue @@ -1,70 +1,70 @@ diff --git a/fe_calckey/frontend/client/src/pages/welcome.entrance.c.vue b/fe_calckey/frontend/client/src/pages/welcome.entrance.c.vue index 686165a..bf493d6 100644 --- a/fe_calckey/frontend/client/src/pages/welcome.entrance.c.vue +++ b/fe_calckey/frontend/client/src/pages/welcome.entrance.c.vue @@ -1,95 +1,95 @@ diff --git a/fe_calckey/frontend/client/src/pages/welcome.setup.vue b/fe_calckey/frontend/client/src/pages/welcome.setup.vue index 97008e2..ff57024 100644 --- a/fe_calckey/frontend/client/src/pages/welcome.setup.vue +++ b/fe_calckey/frontend/client/src/pages/welcome.setup.vue @@ -1,44 +1,44 @@ diff --git a/fe_calckey/frontend/client/src/pages/welcome.timeline.vue b/fe_calckey/frontend/client/src/pages/welcome.timeline.vue index 26f5fa4..25de18d 100644 --- a/fe_calckey/frontend/client/src/pages/welcome.timeline.vue +++ b/fe_calckey/frontend/client/src/pages/welcome.timeline.vue @@ -1,39 +1,39 @@ diff --git a/fe_calckey/frontend/client/src/pages/welcome.vue b/fe_calckey/frontend/client/src/pages/welcome.vue index 564c6d1..66c4713 100644 --- a/fe_calckey/frontend/client/src/pages/welcome.vue +++ b/fe_calckey/frontend/client/src/pages/welcome.vue @@ -1,8 +1,8 @@ diff --git a/fe_calckey/frontend/client/src/pizzax.ts b/fe_calckey/frontend/client/src/pizzax.ts index 1c3817d..9c776e5 100644 --- a/fe_calckey/frontend/client/src/pizzax.ts +++ b/fe_calckey/frontend/client/src/pizzax.ts @@ -6,11 +6,11 @@ import { api } from "./os"; import { stream } from "./stream"; type StateDef = Record< - string, - { - where: "account" | "device" | "deviceAccount"; - default: any; - } + string, + { + where: "account" | "device" | "deviceAccount"; + default: any; + } >; type ArrayElement = A extends readonly (infer T)[] ? T : never; @@ -18,232 +18,240 @@ type ArrayElement = A extends readonly (infer T)[] ? T : never; const connection = $i && stream.useChannel("main"); export class Storage { - public readonly key: string; - public readonly keyForLocalStorage: string; + public readonly key: string; + public readonly keyForLocalStorage: string; - public readonly def: T; + public readonly def: T; - // TODO: これが実装されたらreadonlyにしたい: https://github.com/microsoft/TypeScript/issues/37487 - public readonly state: { - [K in keyof T]: T[K]["default"]; - }; - public readonly reactiveState: { - [K in keyof T]: Ref; - }; + // TODO: これが実装されたらreadonlyにしたい: https://github.com/microsoft/TypeScript/issues/37487 + public readonly state: { + [K in keyof T]: T[K]["default"]; + }; + public readonly reactiveState: { + [K in keyof T]: Ref; + }; - constructor(key: string, def: T) { - this.key = key; - this.keyForLocalStorage = `pizzax::${key}`; - this.def = def; + constructor(key: string, def: T) { + this.key = key; + this.keyForLocalStorage = `pizzax::${key}`; + this.def = def; - // TODO: indexedDBにする - const deviceState = JSON.parse( - localStorage.getItem(this.keyForLocalStorage) || "{}", - ); - const deviceAccountState = $i - ? JSON.parse( - localStorage.getItem(`${this.keyForLocalStorage}::${$i.id}`) || "{}", - ) - : {}; - const registryCache = $i - ? JSON.parse( - localStorage.getItem(`${this.keyForLocalStorage}::cache::${$i.id}`) || - "{}", - ) - : {}; + // TODO: indexedDBにする + const deviceState = JSON.parse( + localStorage.getItem(this.keyForLocalStorage) || "{}" + ); + const deviceAccountState = $i + ? JSON.parse( + localStorage.getItem( + `${this.keyForLocalStorage}::${$i.id}` + ) || "{}" + ) + : {}; + const registryCache = $i + ? JSON.parse( + localStorage.getItem( + `${this.keyForLocalStorage}::cache::${$i.id}` + ) || "{}" + ) + : {}; - const state = {}; - const reactiveState = {}; - for (const [k, v] of Object.entries(def)) { - if ( - v.where === "device" && - Object.prototype.hasOwnProperty.call(deviceState, k) - ) { - state[k] = deviceState[k]; - } else if ( - v.where === "account" && - $i && - Object.prototype.hasOwnProperty.call(registryCache, k) - ) { - state[k] = registryCache[k]; - } else if ( - v.where === "deviceAccount" && - Object.prototype.hasOwnProperty.call(deviceAccountState, k) - ) { - state[k] = deviceAccountState[k]; - } else { - state[k] = v.default; - if (_DEV_) console.log("Use default value", k, v.default); - } - } - for (const [k, v] of Object.entries(state)) { - reactiveState[k] = ref(v); - } - this.state = state as any; - this.reactiveState = reactiveState as any; + const state = {}; + const reactiveState = {}; + for (const [k, v] of Object.entries(def)) { + if ( + v.where === "device" && + Object.prototype.hasOwnProperty.call(deviceState, k) + ) { + state[k] = deviceState[k]; + } else if ( + v.where === "account" && + $i && + Object.prototype.hasOwnProperty.call(registryCache, k) + ) { + state[k] = registryCache[k]; + } else if ( + v.where === "deviceAccount" && + Object.prototype.hasOwnProperty.call(deviceAccountState, k) + ) { + state[k] = deviceAccountState[k]; + } else { + state[k] = v.default; + if (_DEV_) console.log("Use default value", k, v.default); + } + } + for (const [k, v] of Object.entries(state)) { + reactiveState[k] = ref(v); + } + this.state = state as any; + this.reactiveState = reactiveState as any; - if ($i) { - // なぜかsetTimeoutしないとapi関数内でエラーになる(おそらく循環参照してることに原因がありそう) - window.setTimeout(() => { - api("i/registry/get-all", { scope: ["client", this.key] }).then( - (kvs) => { - const cache = {}; - for (const [k, v] of Object.entries(def)) { - if (v.where === "account") { - if (Object.prototype.hasOwnProperty.call(kvs, k)) { - state[k] = kvs[k]; - reactiveState[k].value = kvs[k]; - cache[k] = kvs[k]; - } else { - state[k] = v.default; - reactiveState[k].value = v.default; - } - } - } - localStorage.setItem( - `${this.keyForLocalStorage}::cache::${$i.id}`, - JSON.stringify(cache), - ); - }, - ); - }, 1); - // streamingのuser storage updateイベントを監視して更新 - connection?.on( - "registryUpdated", - ({ - scope, - key, - value, - }: { - scope: string[]; - key: keyof T; - value: T[typeof key]["default"]; - }) => { - if ( - scope.length !== 2 || - scope[0] !== "client" || - scope[1] !== this.key || - this.state[key] === value - ) - return; + if ($i) { + // なぜかsetTimeoutしないとapi関数内でエラーになる(おそらく循環参照してることに原因がありそう) + window.setTimeout(() => { + api("i/registry/get-all", { scope: ["client", this.key] }).then( + (kvs) => { + const cache = {}; + for (const [k, v] of Object.entries(def)) { + if (v.where === "account") { + if ( + Object.prototype.hasOwnProperty.call(kvs, k) + ) { + state[k] = kvs[k]; + reactiveState[k].value = kvs[k]; + cache[k] = kvs[k]; + } else { + state[k] = v.default; + reactiveState[k].value = v.default; + } + } + } + localStorage.setItem( + `${this.keyForLocalStorage}::cache::${$i.id}`, + JSON.stringify(cache) + ); + } + ); + }, 1); + // streamingのuser storage updateイベントを監視して更新 + connection?.on( + "registryUpdated", + ({ + scope, + key, + value, + }: { + scope: string[]; + key: keyof T; + value: T[typeof key]["default"]; + }) => { + if ( + scope.length !== 2 || + scope[0] !== "client" || + scope[1] !== this.key || + this.state[key] === value + ) + return; - this.state[key] = value; - this.reactiveState[key].value = value; + this.state[key] = value; + this.reactiveState[key].value = value; - const cache = JSON.parse( - localStorage.getItem( - `${this.keyForLocalStorage}::cache::${$i.id}`, - ) || "{}", - ); - if (cache[key] !== value) { - cache[key] = value; - localStorage.setItem( - `${this.keyForLocalStorage}::cache::${$i.id}`, - JSON.stringify(cache), - ); - } - }, - ); - } - } + const cache = JSON.parse( + localStorage.getItem( + `${this.keyForLocalStorage}::cache::${$i.id}` + ) || "{}" + ); + if (cache[key] !== value) { + cache[key] = value; + localStorage.setItem( + `${this.keyForLocalStorage}::cache::${$i.id}`, + JSON.stringify(cache) + ); + } + } + ); + } + } - public set(key: K, value: T[K]["default"]): void { - if (_DEV_) console.log("set", key, value); + public set(key: K, value: T[K]["default"]): void { + if (_DEV_) console.log("set", key, value); - this.state[key] = value; - this.reactiveState[key].value = value; + this.state[key] = value; + this.reactiveState[key].value = value; - switch (this.def[key].where) { - case "device": { - const deviceState = JSON.parse( - localStorage.getItem(this.keyForLocalStorage) || "{}", - ); - deviceState[key] = value; - localStorage.setItem( - this.keyForLocalStorage, - JSON.stringify(deviceState), - ); - break; - } - case "deviceAccount": { - if ($i == null) break; - const deviceAccountState = JSON.parse( - localStorage.getItem(`${this.keyForLocalStorage}::${$i.id}`) || "{}", - ); - deviceAccountState[key] = value; - localStorage.setItem( - `${this.keyForLocalStorage}::${$i.id}`, - JSON.stringify(deviceAccountState), - ); - break; - } - case "account": { - if ($i == null) break; - const cache = JSON.parse( - localStorage.getItem(`${this.keyForLocalStorage}::cache::${$i.id}`) || - "{}", - ); - cache[key] = value; - localStorage.setItem( - `${this.keyForLocalStorage}::cache::${$i.id}`, - JSON.stringify(cache), - ); - api("i/registry/set", { - scope: ["client", this.key], - key: key, - value: value, - }); - break; - } - } - } + switch (this.def[key].where) { + case "device": { + const deviceState = JSON.parse( + localStorage.getItem(this.keyForLocalStorage) || "{}" + ); + deviceState[key] = value; + localStorage.setItem( + this.keyForLocalStorage, + JSON.stringify(deviceState) + ); + break; + } + case "deviceAccount": { + if ($i == null) break; + const deviceAccountState = JSON.parse( + localStorage.getItem( + `${this.keyForLocalStorage}::${$i.id}` + ) || "{}" + ); + deviceAccountState[key] = value; + localStorage.setItem( + `${this.keyForLocalStorage}::${$i.id}`, + JSON.stringify(deviceAccountState) + ); + break; + } + case "account": { + if ($i == null) break; + const cache = JSON.parse( + localStorage.getItem( + `${this.keyForLocalStorage}::cache::${$i.id}` + ) || "{}" + ); + cache[key] = value; + localStorage.setItem( + `${this.keyForLocalStorage}::cache::${$i.id}`, + JSON.stringify(cache) + ); + api("i/registry/set", { + scope: ["client", this.key], + key: key, + value: value, + }); + break; + } + } + } - public push( - key: K, - value: ArrayElement, - ): void { - const currentState = this.state[key]; - this.set(key, [...currentState, value]); - } + public push( + key: K, + value: ArrayElement + ): void { + const currentState = this.state[key]; + this.set(key, [...currentState, value]); + } - public reset(key: keyof T) { - this.set(key, this.def[key].default); - } + public reset(key: keyof T) { + this.set(key, this.def[key].default); + } - /** - * 特定のキーの、簡易的なgetter/setterを作ります - * 主にvue場で設定コントロールのmodelとして使う用 - */ - public makeGetterSetter( - key: K, - getter?: (v: T[K]) => unknown, - setter?: (v: unknown) => T[K], - ) { - const valueRef = ref(this.state[key]); + /** + * 特定のキーの、簡易的なgetter/setterを作ります + * 主にvue場で設定コントロールのmodelとして使う用 + */ + public makeGetterSetter( + key: K, + getter?: (v: T[K]) => unknown, + setter?: (v: unknown) => T[K] + ) { + const valueRef = ref(this.state[key]); - const stop = watch(this.reactiveState[key], (val) => { - valueRef.value = val; - }); + const stop = watch(this.reactiveState[key], (val) => { + valueRef.value = val; + }); - // NOTE: vueコンポーネント内で呼ばれない限りは、onUnmounted は無意味なのでメモリリークする - onUnmounted(() => { - stop(); - }); + // NOTE: vueコンポーネント内で呼ばれない限りは、onUnmounted は無意味なのでメモリリークする + onUnmounted(() => { + stop(); + }); - // TODO: VueのcustomRef使うと良い感じになるかも - return { - get: () => { - if (getter) { - return getter(valueRef.value); - } else { - return valueRef.value; - } - }, - set: (value: unknown) => { - const val = setter ? setter(value) : value; - this.set(key, val); - valueRef.value = val; - }, - }; - } + // TODO: VueのcustomRef使うと良い感じになるかも + return { + get: () => { + if (getter) { + return getter(valueRef.value); + } else { + return valueRef.value; + } + }, + set: (value: unknown) => { + const val = setter ? setter(value) : value; + this.set(key, val); + valueRef.value = val; + }, + }; + } } diff --git a/fe_calckey/frontend/client/src/plugin.ts b/fe_calckey/frontend/client/src/plugin.ts index 2e1297a..c518f0a 100644 --- a/fe_calckey/frontend/client/src/plugin.ts +++ b/fe_calckey/frontend/client/src/plugin.ts @@ -4,173 +4,185 @@ import { jsToVal } from "@syuilo/aiscript/built/interpreter/util"; import { createAiScriptEnv } from "@/scripts/aiscript/api"; import { inputText } from "@/os"; import { - noteActions, - notePostInterruptors, - noteViewInterruptors, - postFormActions, - userActions, + noteActions, + notePostInterruptors, + noteViewInterruptors, + postFormActions, + userActions, } from "@/store"; const pluginContexts = new Map(); export function install(plugin) { - console.info("Plugin installed:", plugin.name, `v${plugin.version}`); + console.info("Plugin installed:", plugin.name, `v${plugin.version}`); - const aiscript = new AiScript( - createPluginEnv({ - plugin: plugin, - storageKey: `plugins:${plugin.id}`, - }), - { - in: (q) => { - return new Promise((ok) => { - inputText({ - title: q, - }).then(({ canceled, result: a }) => { - ok(a); - }); - }); - }, - out: (value) => { - console.log(value); - }, - log: (type, params) => {}, - }, - ); + const aiscript = new AiScript( + createPluginEnv({ + plugin: plugin, + storageKey: `plugins:${plugin.id}`, + }), + { + in: (q) => { + return new Promise((ok) => { + inputText({ + title: q, + }).then(({ canceled, result: a }) => { + ok(a); + }); + }); + }, + out: (value) => { + console.log(value); + }, + log: (type, params) => {}, + } + ); - initPlugin({ plugin, aiscript }); + initPlugin({ plugin, aiscript }); - aiscript.exec(deserialize(plugin.ast)); + aiscript.exec(deserialize(plugin.ast)); } function createPluginEnv(opts) { - const config = new Map(); - for (const [k, v] of Object.entries(opts.plugin.config || {})) { - config.set( - k, - jsToVal( - typeof opts.plugin.configData[k] !== "undefined" - ? opts.plugin.configData[k] - : v.default, - ), - ); - } + const config = new Map(); + for (const [k, v] of Object.entries(opts.plugin.config || {})) { + config.set( + k, + jsToVal( + typeof opts.plugin.configData[k] !== "undefined" + ? opts.plugin.configData[k] + : v.default + ) + ); + } - return { - ...createAiScriptEnv({ ...opts, token: opts.plugin.token }), - //#region Deprecated - "Mk:register_post_form_action": values.FN_NATIVE(([title, handler]) => { - registerPostFormAction({ - pluginId: opts.plugin.id, - title: title.value, - handler, - }); - }), - "Mk:register_user_action": values.FN_NATIVE(([title, handler]) => { - registerUserAction({ - pluginId: opts.plugin.id, - title: title.value, - handler, - }); - }), - "Mk:register_note_action": values.FN_NATIVE(([title, handler]) => { - registerNoteAction({ - pluginId: opts.plugin.id, - title: title.value, - handler, - }); - }), - //#endregion - "Plugin:register_post_form_action": values.FN_NATIVE(([title, handler]) => { - registerPostFormAction({ - pluginId: opts.plugin.id, - title: title.value, - handler, - }); - }), - "Plugin:register_user_action": values.FN_NATIVE(([title, handler]) => { - registerUserAction({ - pluginId: opts.plugin.id, - title: title.value, - handler, - }); - }), - "Plugin:register_note_action": values.FN_NATIVE(([title, handler]) => { - registerNoteAction({ - pluginId: opts.plugin.id, - title: title.value, - handler, - }); - }), - "Plugin:register_note_view_interruptor": values.FN_NATIVE(([handler]) => { - registerNoteViewInterruptor({ pluginId: opts.plugin.id, handler }); - }), - "Plugin:register_note_post_interruptor": values.FN_NATIVE(([handler]) => { - registerNotePostInterruptor({ pluginId: opts.plugin.id, handler }); - }), - "Plugin:open_url": values.FN_NATIVE(([url]) => { - window.open(url.value, "_blank"); - }), - "Plugin:config": values.OBJ(config), - }; + return { + ...createAiScriptEnv({ ...opts, token: opts.plugin.token }), + //#region Deprecated + "Mk:register_post_form_action": values.FN_NATIVE(([title, handler]) => { + registerPostFormAction({ + pluginId: opts.plugin.id, + title: title.value, + handler, + }); + }), + "Mk:register_user_action": values.FN_NATIVE(([title, handler]) => { + registerUserAction({ + pluginId: opts.plugin.id, + title: title.value, + handler, + }); + }), + "Mk:register_note_action": values.FN_NATIVE(([title, handler]) => { + registerNoteAction({ + pluginId: opts.plugin.id, + title: title.value, + handler, + }); + }), + //#endregion + "Plugin:register_post_form_action": values.FN_NATIVE( + ([title, handler]) => { + registerPostFormAction({ + pluginId: opts.plugin.id, + title: title.value, + handler, + }); + } + ), + "Plugin:register_user_action": values.FN_NATIVE(([title, handler]) => { + registerUserAction({ + pluginId: opts.plugin.id, + title: title.value, + handler, + }); + }), + "Plugin:register_note_action": values.FN_NATIVE(([title, handler]) => { + registerNoteAction({ + pluginId: opts.plugin.id, + title: title.value, + handler, + }); + }), + "Plugin:register_note_view_interruptor": values.FN_NATIVE( + ([handler]) => { + registerNoteViewInterruptor({ + pluginId: opts.plugin.id, + handler, + }); + } + ), + "Plugin:register_note_post_interruptor": values.FN_NATIVE( + ([handler]) => { + registerNotePostInterruptor({ + pluginId: opts.plugin.id, + handler, + }); + } + ), + "Plugin:open_url": values.FN_NATIVE(([url]) => { + window.open(url.value, "_blank"); + }), + "Plugin:config": values.OBJ(config), + }; } function initPlugin({ plugin, aiscript }) { - pluginContexts.set(plugin.id, aiscript); + pluginContexts.set(plugin.id, aiscript); } function registerPostFormAction({ pluginId, title, handler }) { - postFormActions.push({ - title, - handler: (form, update) => { - pluginContexts.get(pluginId).execFn(handler, [ - utils.jsToVal(form), - values.FN_NATIVE(([key, value]) => { - update(key.value, value.value); - }), - ]); - }, - }); + postFormActions.push({ + title, + handler: (form, update) => { + pluginContexts.get(pluginId).execFn(handler, [ + utils.jsToVal(form), + values.FN_NATIVE(([key, value]) => { + update(key.value, value.value); + }), + ]); + }, + }); } function registerUserAction({ pluginId, title, handler }) { - userActions.push({ - title, - handler: (user) => { - pluginContexts.get(pluginId).execFn(handler, [utils.jsToVal(user)]); - }, - }); + userActions.push({ + title, + handler: (user) => { + pluginContexts.get(pluginId).execFn(handler, [utils.jsToVal(user)]); + }, + }); } function registerNoteAction({ pluginId, title, handler }) { - noteActions.push({ - title, - handler: (note) => { - pluginContexts.get(pluginId).execFn(handler, [utils.jsToVal(note)]); - }, - }); + noteActions.push({ + title, + handler: (note) => { + pluginContexts.get(pluginId).execFn(handler, [utils.jsToVal(note)]); + }, + }); } function registerNoteViewInterruptor({ pluginId, handler }) { - noteViewInterruptors.push({ - handler: async (note) => { - return utils.valToJs( - await pluginContexts - .get(pluginId) - .execFn(handler, [utils.jsToVal(note)]), - ); - }, - }); + noteViewInterruptors.push({ + handler: async (note) => { + return utils.valToJs( + await pluginContexts + .get(pluginId) + .execFn(handler, [utils.jsToVal(note)]) + ); + }, + }); } function registerNotePostInterruptor({ pluginId, handler }) { - notePostInterruptors.push({ - handler: async (note) => { - return utils.valToJs( - await pluginContexts - .get(pluginId) - .execFn(handler, [utils.jsToVal(note)]), - ); - }, - }); + notePostInterruptors.push({ + handler: async (note) => { + return utils.valToJs( + await pluginContexts + .get(pluginId) + .execFn(handler, [utils.jsToVal(note)]) + ); + }, + }); } diff --git a/fe_calckey/frontend/client/src/router.ts b/fe_calckey/frontend/client/src/router.ts index 36adc5e..4dd9107 100644 --- a/fe_calckey/frontend/client/src/router.ts +++ b/fe_calckey/frontend/client/src/router.ts @@ -4,641 +4,672 @@ import { $i, iAmModerator } from "@/account"; import MkLoading from "@/pages/_loading_.vue"; import MkError from "@/pages/_error_.vue"; import { api } from "@/os"; -import { ui } from "@/config"; function getGuestTimelineStatus() { - api("meta", { - detail: false, - }).then((meta) => { - return meta.enableGuestTimeline; - }); + api("meta", { + detail: false, + }).then((meta) => { + return meta.enableGuestTimeline; + }); } const guestTimeline = getGuestTimelineStatus(); const page = (loader: AsyncComponentLoader) => - defineAsyncComponent({ - loader: loader, - loadingComponent: MkLoading, - errorComponent: MkError, - }); + defineAsyncComponent({ + loader: loader, + loadingComponent: MkLoading, + errorComponent: MkError, + }); export const routes = [ - { - path: "/@:initUser/pages/:initPageName/view-source", - component: page(() => import("./pages/page-editor/page-editor.vue")), - }, - { - path: "/@:username/pages/:pageName", - component: page(() => import("./pages/page.vue")), - }, - { - path: "/@:acct/following", - component: page(() => import("./pages/user/following.vue")), - }, - { - path: "/@:acct/followers", - component: page(() => import("./pages/user/followers.vue")), - }, - { - name: "user", - path: "/@:acct/:page?", - component: page(() => import("./pages/user/index.vue")), - }, - { - name: "note", - path: "/notes/:noteId", - component: page(() => import("./pages/note.vue")), - }, - { - path: "/clips/:clipId", - component: page(() => import("./pages/clip.vue")), - }, - { - path: "/user-info/:userId", - component: page(() => import("./pages/user-info.vue")), - }, - { - path: "/instance-info/:host", - component: page(() => import("./pages/instance-info.vue")), - }, - { - path: "/public/local", - component: page(() => import("./pages/no-graze.vue")), - }, - { - name: "settings", - path: "/settings", - component: page(() => import("./pages/settings/index.vue")), - loginRequired: true, - children: [ - { - path: "/profile", - name: "profile", - component: page(() => import("./pages/settings/profile.vue")), - }, - { - path: "/privacy", - name: "privacy", - component: page(() => import("./pages/settings/privacy.vue")), - }, - { - path: "/reaction", - name: "reaction", - component: page(() => import("./pages/settings/reaction.vue")), - }, - { - path: "/drive", - name: "drive", - component: page(() => import("./pages/settings/drive.vue")), - }, - { - path: "/notifications", - name: "notifications", - component: page(() => import("./pages/settings/notifications.vue")), - }, - { - path: "/email", - name: "email", - component: page(() => import("./pages/settings/email.vue")), - }, - { - path: "/integration", - name: "integration", - component: page(() => import("./pages/settings/integration.vue")), - }, - { - path: "/security", - name: "security", - component: page(() => import("./pages/settings/security.vue")), - }, - { - path: "/general", - name: "general", - component: page(() => import("./pages/settings/general.vue")), - }, - { - path: "/theme/install", - name: "theme", - component: page(() => import("./pages/settings/theme.install.vue")), - }, - { - path: "/theme/manage", - name: "theme", - component: page(() => import("./pages/settings/theme.manage.vue")), - }, - { - path: "/theme", - name: "theme", - component: page(() => import("./pages/settings/theme.vue")), - }, - { - path: "/custom-css", - name: "custom-css", - component: page(() => import("./pages/settings/custom-css.vue")), - }, - { - path: "/custom-katex-macro", - name: "custom-katex-macro", - component: page( - () => import("./pages/settings/custom-katex-macro.vue"), - ), - }, - { - path: "/account-info", - name: "account-info", - component: page(() => import("./pages/settings/account-info.vue")), - }, - { - path: "/navbar", - name: "navbar", - component: page(() => import("./pages/settings/navbar.vue")), - }, - { - path: "/statusbar", - name: "statusbar", - component: page(() => import("./pages/settings/statusbar.vue")), - }, - { - path: "/sounds", - name: "sounds", - component: page(() => import("./pages/settings/sounds.vue")), - }, - { - path: "/plugin/install", - name: "plugin", - component: page(() => import("./pages/settings/plugin.install.vue")), - }, - { - path: "/plugin", - name: "plugin", - component: page(() => import("./pages/settings/plugin.vue")), - }, - { - path: "/import-export", - name: "import-export", - component: page(() => import("./pages/settings/import-export.vue")), - }, - { - path: "/instance-mute", - name: "instance-mute", - component: page(() => import("./pages/settings/instance-mute.vue")), - }, - { - path: "/mute-block", - name: "mute-block", - component: page(() => import("./pages/settings/mute-block.vue")), - }, - { - path: "/word-mute", - name: "word-mute", - component: page(() => import("./pages/settings/word-mute.vue")), - }, - { - path: "/api", - name: "api", - component: page(() => import("./pages/settings/api.vue")), - }, - { - path: "/apps", - name: "apps", - component: page(() => import("./pages/settings/apps.vue")), - }, - { - path: "/webhook/edit/:webhookId", - name: "webhook", - component: page(() => import("./pages/settings/webhook.edit.vue")), - }, - { - path: "/webhook/new", - name: "webhook", - component: page(() => import("./pages/settings/webhook.new.vue")), - }, - { - path: "/webhook", - name: "webhook", - component: page(() => import("./pages/settings/webhook.vue")), - }, - { - path: "/deck", - name: "deck", - component: page(() => import("./pages/settings/deck.vue")), - }, - { - path: "/delete-account", - name: "delete-account", - component: page(() => import("./pages/settings/delete-account.vue")), - }, - { - path: "/preferences-backups", - name: "preferences-backups", - component: page( - () => import("./pages/settings/preferences-backups.vue"), - ), - }, - { - path: "/migration", - name: "migration", - component: page(() => import("./pages/settings/migration.vue")), - }, - { - path: "/custom-css", - name: "general", - component: page(() => import("./pages/settings/custom-css.vue")), - }, - { - path: "/custom-katex-macro", - name: "general", - component: page( - () => import("./pages/settings/custom-katex-macro.vue"), - ), - }, - { - path: "/accounts", - name: "profile", - component: page(() => import("./pages/settings/accounts.vue")), - }, - { - path: "/account-info", - name: "other", - component: page(() => import("./pages/settings/account-info.vue")), - }, - { - path: "/delete-account", - name: "other", - component: page(() => import("./pages/settings/delete-account.vue")), - }, - { - path: "/other", - name: "other", - component: page(() => import("./pages/settings/other.vue")), - }, - { - path: "/", - component: page(() => import("./pages/_empty_.vue")), - }, - ], - }, - { - path: "/reset-password/:token?", - component: page(() => import("./pages/reset-password.vue")), - }, - { - path: "/signup-complete/:code", - component: page(() => import("./pages/signup-complete.vue")), - }, - { - path: "/verify-email/:code", - component: page(() => import("./pages/verify-email.vue")), - }, - { - path: "/announcements", - component: page(() => import("./pages/announcements.vue")), - }, - { - path: "/about", - component: page(() => import("./pages/about.vue")), - hash: "initialTab", - }, - { - path: "/about-calckey", - component: page(() => import("./pages/about-calckey.vue")), - }, - { - path: "/theme-editor", - component: page(() => import("./pages/theme-editor.vue")), - loginRequired: true, - }, - { - path: "/explore/tags/:tag", - component: page(() => import("./pages/explore.vue")), - }, - { - path: "/explore", - component: page(() => import("./pages/explore.vue")), - }, - { - path: "/search", - component: page(() => import("./pages/search.vue")), - query: { - q: "query" - }, - }, - { - path: "/authorize-follow", - component: page(() => import("./pages/follow.vue")), - loginRequired: true, - }, - { - path: "/share", - component: page(() => import("./pages/share.vue")), - loginRequired: true, - }, - { - path: "/api-console", - component: page(() => import("./pages/api-console.vue")), - loginRequired: true, - }, - { - path: "/mfm-cheat-sheet", - component: page(() => import("./pages/mfm-cheat-sheet.vue")), - }, - { - path: "/scratchpad", - component: page(() => import("./pages/scratchpad.vue")), - }, - { - path: "/preview", - component: page(() => import("./pages/preview.vue")), - }, - { - path: "/auth/:token", - component: page(() => import("./pages/auth.vue")), - }, - { - path: "/miauth/:session", - component: page(() => import("./pages/miauth.vue")), - query: { - callback: "callback", - name: "name", - icon: "icon", - permission: "permission", - }, - }, - { - path: "/tags/:tag", - component: page(() => import("./pages/tag.vue")), - }, - { - path: "/pages/new", - component: page(() => import("./pages/page-editor/page-editor.vue")), - loginRequired: true, - }, - { - path: "/pages/edit/:initPageId", - component: page(() => import("./pages/page-editor/page-editor.vue")), - loginRequired: true, - }, - { - path: "/pages", - component: page(() => import("./pages/pages.vue")), - }, - { - path: "/gallery/:postId/edit", - component: page(() => import("./pages/gallery/edit.vue")), - loginRequired: true, - }, - { - path: "/gallery/new", - component: page(() => import("./pages/gallery/edit.vue")), - loginRequired: true, - }, - { - path: "/gallery/:postId", - component: page(() => import("./pages/gallery/post.vue")), - }, - { - path: "/gallery", - component: page(() => import("./pages/gallery/index.vue")), - }, - { - path: "/registry/keys/system/:path(*)?", - component: page(() => import("./pages/registry.keys.vue")), - }, - { - path: "/registry/value/system/:path(*)?", - component: page(() => import("./pages/registry.value.vue")), - }, - { - path: "/registry", - component: page(() => import("./pages/registry.vue")), - }, - { - path: "/admin/file/:fileId", - component: iAmModerator - ? page(() => import("./pages/admin-file.vue")) - : page(() => import("./pages/not-found.vue")), - }, - { - path: "/admin", - component: iAmModerator - ? page(() => import("./pages/admin/index.vue")) - : page(() => import("./pages/not-found.vue")), - children: [ - { - path: "/overview", - name: "overview", - component: page(() => import("./pages/admin/overview.vue")), - }, - { - path: "/users", - name: "users", - component: page(() => import("./pages/admin/users.vue")), - }, - { - path: "/hashtags", - name: "hashtags", - component: page(() => import("./pages/admin/hashtags.vue")), - }, - { - path: "/emojis", - name: "emojis", - component: page(() => import("./pages/admin/emojis.vue")), - }, - { - path: "/federation", - name: "federation", - component: page(() => import("./pages/admin/federation.vue")), - }, - { - path: "/queue", - name: "queue", - component: page(() => import("./pages/admin/queue.vue")), - }, - { - path: "/files", - name: "files", - component: page(() => import("./pages/admin/files.vue")), - }, - { - path: "/announcements", - name: "announcements", - component: page(() => import("./pages/admin/announcements.vue")), - }, - { - path: "/ads", - name: "ads", - component: page(() => import("./pages/admin/promotions.vue")), - }, - { - path: "/database", - name: "database", - component: page(() => import("./pages/admin/database.vue")), - }, - { - path: "/abuses", - name: "abuses", - component: page(() => import("./pages/admin/abuses.vue")), - }, - { - path: "/settings", - name: "settings", - component: page(() => import("./pages/admin/settings.vue")), - }, - { - path: "/email-settings", - name: "email-settings", - component: page(() => import("./pages/admin/email-settings.vue")), - }, - { - path: "/object-storage", - name: "object-storage", - component: page(() => import("./pages/admin/object-storage.vue")), - }, - { - path: "/security", - name: "security", - component: page(() => import("./pages/admin/security.vue")), - }, - { - path: "/relays", - name: "relays", - component: page(() => import("./pages/admin/relays.vue")), - }, - { - path: "/integrations", - name: "integrations", - component: page(() => import("./pages/admin/integrations.vue")), - }, - { - path: "/instance-block", - name: "instance-block", - component: page(() => import("./pages/admin/instance-block.vue")), - }, - { - path: "/proxy-account", - name: "proxy-account", - component: page(() => import("./pages/admin/proxy-account.vue")), - }, - { - path: "/other-settings", - name: "other-settings", - component: page(() => import("./pages/admin/other-settings.vue")), - }, - { - path: "/other-settings", - name: "other-settings", - component: page(() => import("./pages/admin/custom-css.vue")), - }, - { - path: "/experiments", - name: "experiments", - component: page(() => import("./pages/admin/experiments.vue")), - }, - { - path: "/", - component: page(() => import("./pages/_empty_.vue")), - }, - ], - }, - { - path: "/my/notifications", - component: page(() => import("./pages/notifications.vue")), - loginRequired: true, - }, - { - path: "/my/favorites", - component: page(() => import("./pages/favorites.vue")), - loginRequired: true, - }, - { - path: "/my/drive/folder/:folder", - component: page(() => import("./pages/drive.vue")), - loginRequired: true, - }, - { - path: "/my/drive", - component: page(() => import("./pages/drive.vue")), - loginRequired: true, - }, - { - path: "/my/follow-requests", - component: page(() => import("./pages/follow-requests.vue")), - loginRequired: true, - }, - { - path: "/my/lists/:listId", - component: page(() => import("./pages/my-lists/list.vue")), - loginRequired: true, - }, - { - path: "/my/lists", - component: page(() => import("./pages/my-lists/index.vue")), - loginRequired: true, - }, - { - path: "/my/clips", - component: page(() => import("./pages/my-clips/index.vue")), - loginRequired: true, - }, - { - path: "/my/groups", - component: page(() => import("./pages/my-groups/index.vue")), - loginRequired: true, - }, - { - path: "/my/groups/:groupId", - component: page(() => import("./pages/my-groups/group.vue")), - loginRequired: true, - }, - { - path: "/my/antennas/create", - component: page(() => import("./pages/my-antennas/create.vue")), - loginRequired: true, - }, - { - path: "/my/antennas/:antennaId", - component: page(() => import("./pages/my-antennas/edit.vue")), - loginRequired: true, - }, - { - path: "/my/antennas", - component: page(() => import("./pages/my-antennas/index.vue")), - loginRequired: true, - }, - { - path: "/timeline/list/:listId", - component: page(() => import("./pages/user-list-timeline.vue")), - loginRequired: true, - }, - { - path: "/timeline/antenna/:antennaId", - component: page(() => import("./pages/antenna-timeline.vue")), - loginRequired: true, - }, - { - name: "index", - path: "/", - component: $i - ? page(() => import("./pages/timeline.vue")) - : page(() => import("./pages/welcome.vue")), - globalCacheKey: "index", - }, - { - path: "/:(*)", - component: page(() => import("./pages/not-found.vue")), - }, + { + path: "/@:initUser/pages/:initPageName/view-source", + component: page(() => import("./pages/page-editor/page-editor.vue")), + }, + { + path: "/@:username/pages/:pageName", + component: page(() => import("./pages/page.vue")), + }, + { + path: "/@:acct/following", + component: page(() => import("./pages/user/following.vue")), + }, + { + path: "/@:acct/followers", + component: page(() => import("./pages/user/followers.vue")), + }, + { + name: "user", + path: "/@:acct/:page?", + component: page(() => import("./pages/user/index.vue")), + }, + { + name: "note", + path: "/notes/:noteId", + component: page(() => import("./pages/note.vue")), + }, + { + path: "/clips/:clipId", + component: page(() => import("./pages/clip.vue")), + }, + { + path: "/user-info/:userId", + component: page(() => import("./pages/user-info.vue")), + }, + { + path: "/instance-info/:host", + component: page(() => import("./pages/instance-info.vue")), + }, + { + path: "/public/local", + component: page(() => import("./pages/no-graze.vue")), + }, + { + name: "settings", + path: "/settings", + component: page(() => import("./pages/settings/index.vue")), + loginRequired: true, + children: [ + { + path: "/profile", + name: "profile", + component: page(() => import("./pages/settings/profile.vue")), + }, + { + path: "/privacy", + name: "privacy", + component: page(() => import("./pages/settings/privacy.vue")), + }, + { + path: "/reaction", + name: "reaction", + component: page(() => import("./pages/settings/reaction.vue")), + }, + { + path: "/drive", + name: "drive", + component: page(() => import("./pages/settings/drive.vue")), + }, + { + path: "/notifications", + name: "notifications", + component: page( + () => import("./pages/settings/notifications.vue") + ), + }, + { + path: "/email", + name: "email", + component: page(() => import("./pages/settings/email.vue")), + }, + { + path: "/security", + name: "security", + component: page(() => import("./pages/settings/security.vue")), + }, + { + path: "/general", + name: "general", + component: page(() => import("./pages/settings/general.vue")), + }, + { + path: "/theme/install", + name: "theme", + component: page( + () => import("./pages/settings/theme.install.vue") + ), + }, + { + path: "/theme/manage", + name: "theme", + component: page( + () => import("./pages/settings/theme.manage.vue") + ), + }, + { + path: "/theme", + name: "theme", + component: page(() => import("./pages/settings/theme.vue")), + }, + { + path: "/custom-css", + name: "custom-css", + component: page( + () => import("./pages/settings/custom-css.vue") + ), + }, + { + path: "/custom-katex-macro", + name: "custom-katex-macro", + component: page( + () => import("./pages/settings/custom-katex-macro.vue") + ), + }, + { + path: "/account-info", + name: "account-info", + component: page( + () => import("./pages/settings/account-info.vue") + ), + }, + { + path: "/navbar", + name: "navbar", + component: page(() => import("./pages/settings/navbar.vue")), + }, + { + path: "/statusbar", + name: "statusbar", + component: page(() => import("./pages/settings/statusbar.vue")), + }, + { + path: "/sounds", + name: "sounds", + component: page(() => import("./pages/settings/sounds.vue")), + }, + { + path: "/plugin/install", + name: "plugin", + component: page( + () => import("./pages/settings/plugin.install.vue") + ), + }, + { + path: "/plugin", + name: "plugin", + component: page(() => import("./pages/settings/plugin.vue")), + }, + { + path: "/import-export", + name: "import-export", + component: page( + () => import("./pages/settings/import-export.vue") + ), + }, + { + path: "/instance-mute", + name: "instance-mute", + component: page( + () => import("./pages/settings/instance-mute.vue") + ), + }, + { + path: "/mute-block", + name: "mute-block", + component: page( + () => import("./pages/settings/mute-block.vue") + ), + }, + { + path: "/word-mute", + name: "word-mute", + component: page(() => import("./pages/settings/word-mute.vue")), + }, + { + path: "/api", + name: "api", + component: page(() => import("./pages/settings/api.vue")), + }, + { + path: "/apps", + name: "apps", + component: page(() => import("./pages/settings/apps.vue")), + }, + { + path: "/webhook/edit/:webhookId", + name: "webhook", + component: page( + () => import("./pages/settings/webhook.edit.vue") + ), + }, + { + path: "/webhook/new", + name: "webhook", + component: page( + () => import("./pages/settings/webhook.new.vue") + ), + }, + { + path: "/webhook", + name: "webhook", + component: page(() => import("./pages/settings/webhook.vue")), + }, + { + path: "/deck", + name: "deck", + component: page(() => import("./pages/settings/deck.vue")), + }, + { + path: "/delete-account", + name: "delete-account", + component: page( + () => import("./pages/settings/delete-account.vue") + ), + }, + { + path: "/preferences-backups", + name: "preferences-backups", + component: page( + () => import("./pages/settings/preferences-backups.vue") + ), + }, + { + path: "/migration", + name: "migration", + component: page(() => import("./pages/settings/migration.vue")), + }, + { + path: "/custom-css", + name: "general", + component: page( + () => import("./pages/settings/custom-css.vue") + ), + }, + { + path: "/custom-katex-macro", + name: "general", + component: page( + () => import("./pages/settings/custom-katex-macro.vue") + ), + }, + { + path: "/accounts", + name: "profile", + component: page(() => import("./pages/settings/accounts.vue")), + }, + { + path: "/account-info", + name: "other", + component: page( + () => import("./pages/settings/account-info.vue") + ), + }, + { + path: "/delete-account", + name: "other", + component: page( + () => import("./pages/settings/delete-account.vue") + ), + }, + { + path: "/other", + name: "other", + component: page(() => import("./pages/settings/other.vue")), + }, + { + path: "/", + component: page(() => import("./pages/_empty_.vue")), + }, + ], + }, + { + path: "/reset-password/:token?", + component: page(() => import("./pages/reset-password.vue")), + }, + { + path: "/signup-complete/:code", + component: page(() => import("./pages/signup-complete.vue")), + }, + { + path: "/verify-email/:code", + component: page(() => import("./pages/verify-email.vue")), + }, + { + path: "/announcements", + component: page(() => import("./pages/announcements.vue")), + }, + { + path: "/about", + component: page(() => import("./pages/about.vue")), + hash: "initialTab", + }, + { + path: "/about-calckey", + component: page(() => import("./pages/about-calckey.vue")), + }, + { + path: "/theme-editor", + component: page(() => import("./pages/theme-editor.vue")), + loginRequired: true, + }, + { + path: "/explore/tags/:tag", + component: page(() => import("./pages/explore.vue")), + }, + { + path: "/explore", + component: page(() => import("./pages/explore.vue")), + }, + { + path: "/search", + component: page(() => import("./pages/search.vue")), + query: { + q: "query", + }, + }, + { + path: "/authorize-follow", + component: page(() => import("./pages/follow.vue")), + loginRequired: true, + }, + { + path: "/share", + component: page(() => import("./pages/share.vue")), + loginRequired: true, + }, + { + path: "/api-console", + component: page(() => import("./pages/api-console.vue")), + loginRequired: true, + }, + { + path: "/mfm-cheat-sheet", + component: page(() => import("./pages/mfm-cheat-sheet.vue")), + }, + { + path: "/scratchpad", + component: page(() => import("./pages/scratchpad.vue")), + }, + { + path: "/preview", + component: page(() => import("./pages/preview.vue")), + }, + { + path: "/auth/:token", + component: page(() => import("./pages/auth.vue")), + }, + { + path: "/miauth/:session", + component: page(() => import("./pages/miauth.vue")), + query: { + callback: "callback", + name: "name", + icon: "icon", + permission: "permission", + }, + }, + { + path: "/tags/:tag", + component: page(() => import("./pages/tag.vue")), + }, + { + path: "/pages/new", + component: page(() => import("./pages/page-editor/page-editor.vue")), + loginRequired: true, + }, + { + path: "/pages/edit/:initPageId", + component: page(() => import("./pages/page-editor/page-editor.vue")), + loginRequired: true, + }, + { + path: "/pages", + component: page(() => import("./pages/pages.vue")), + }, + { + path: "/gallery/:postId/edit", + component: page(() => import("./pages/gallery/edit.vue")), + loginRequired: true, + }, + { + path: "/gallery/new", + component: page(() => import("./pages/gallery/edit.vue")), + loginRequired: true, + }, + { + path: "/gallery/:postId", + component: page(() => import("./pages/gallery/post.vue")), + }, + { + path: "/gallery", + component: page(() => import("./pages/gallery/index.vue")), + }, + { + path: "/registry/keys/system/:path(*)?", + component: page(() => import("./pages/registry.keys.vue")), + }, + { + path: "/registry/value/system/:path(*)?", + component: page(() => import("./pages/registry.value.vue")), + }, + { + path: "/registry", + component: page(() => import("./pages/registry.vue")), + }, + { + path: "/admin/file/:fileId", + component: iAmModerator + ? page(() => import("./pages/admin-file.vue")) + : page(() => import("./pages/not-found.vue")), + }, + { + path: "/admin", + component: iAmModerator + ? page(() => import("./pages/admin/index.vue")) + : page(() => import("./pages/not-found.vue")), + children: [ + { + path: "/overview", + name: "overview", + component: page(() => import("./pages/admin/overview.vue")), + }, + { + path: "/users", + name: "users", + component: page(() => import("./pages/admin/users.vue")), + }, + { + path: "/hashtags", + name: "hashtags", + component: page(() => import("./pages/admin/hashtags.vue")), + }, + { + path: "/emojis", + name: "emojis", + component: page(() => import("./pages/admin/emojis.vue")), + }, + { + path: "/federation", + name: "federation", + component: page(() => import("./pages/admin/federation.vue")), + }, + { + path: "/queue", + name: "queue", + component: page(() => import("./pages/admin/queue.vue")), + }, + { + path: "/files", + name: "files", + component: page(() => import("./pages/admin/files.vue")), + }, + { + path: "/announcements", + name: "announcements", + component: page( + () => import("./pages/admin/announcements.vue") + ), + }, + { + path: "/ads", + name: "ads", + component: page(() => import("./pages/admin/promotions.vue")), + }, + { + path: "/database", + name: "database", + component: page(() => import("./pages/admin/database.vue")), + }, + { + path: "/abuses", + name: "abuses", + component: page(() => import("./pages/admin/abuses.vue")), + }, + { + path: "/settings", + name: "settings", + component: page(() => import("./pages/admin/settings.vue")), + }, + { + path: "/email-settings", + name: "email-settings", + component: page( + () => import("./pages/admin/email-settings.vue") + ), + }, + { + path: "/object-storage", + name: "object-storage", + component: page( + () => import("./pages/admin/object-storage.vue") + ), + }, + { + path: "/security", + name: "security", + component: page(() => import("./pages/admin/security.vue")), + }, + { + path: "/relays", + name: "relays", + component: page(() => import("./pages/admin/relays.vue")), + }, + { + path: "/instance-block", + name: "instance-block", + component: page( + () => import("./pages/admin/instance-block.vue") + ), + }, + { + path: "/proxy-account", + name: "proxy-account", + component: page( + () => import("./pages/admin/proxy-account.vue") + ), + }, + { + path: "/other-settings", + name: "other-settings", + component: page( + () => import("./pages/admin/other-settings.vue") + ), + }, + { + path: "/other-settings", + name: "other-settings", + component: page(() => import("./pages/admin/custom-css.vue")), + }, + { + path: "/experiments", + name: "experiments", + component: page(() => import("./pages/admin/experiments.vue")), + }, + { + path: "/", + component: page(() => import("./pages/_empty_.vue")), + }, + ], + }, + { + path: "/my/notifications", + component: page(() => import("./pages/notifications.vue")), + loginRequired: true, + }, + { + path: "/my/favorites", + component: page(() => import("./pages/favorites.vue")), + loginRequired: true, + }, + { + path: "/my/drive/folder/:folder", + component: page(() => import("./pages/drive.vue")), + loginRequired: true, + }, + { + path: "/my/drive", + component: page(() => import("./pages/drive.vue")), + loginRequired: true, + }, + { + path: "/my/follow-requests", + component: page(() => import("./pages/follow-requests.vue")), + loginRequired: true, + }, + { + path: "/my/lists/:listId", + component: page(() => import("./pages/my-lists/list.vue")), + loginRequired: true, + }, + { + path: "/my/lists", + component: page(() => import("./pages/my-lists/index.vue")), + loginRequired: true, + }, + { + path: "/my/clips", + component: page(() => import("./pages/my-clips/index.vue")), + loginRequired: true, + }, + { + path: "/my/groups", + component: page(() => import("./pages/my-groups/index.vue")), + loginRequired: true, + }, + { + path: "/my/groups/:groupId", + component: page(() => import("./pages/my-groups/group.vue")), + loginRequired: true, + }, + { + path: "/my/antennas/create", + component: page(() => import("./pages/my-antennas/create.vue")), + loginRequired: true, + }, + { + path: "/my/antennas/:antennaId", + component: page(() => import("./pages/my-antennas/edit.vue")), + loginRequired: true, + }, + { + path: "/my/antennas", + component: page(() => import("./pages/my-antennas/index.vue")), + loginRequired: true, + }, + { + path: "/timeline/list/:listId", + component: page(() => import("./pages/user-list-timeline.vue")), + loginRequired: true, + }, + { + path: "/timeline/antenna/:antennaId", + component: page(() => import("./pages/antenna-timeline.vue")), + loginRequired: true, + }, + { + name: "index", + path: "/", + component: $i + ? page(() => import("./pages/timeline.vue")) + : page(() => import("./pages/welcome.vue")), + globalCacheKey: "index", + }, + { + path: "/:(*)", + component: page(() => import("./pages/not-found.vue")), + }, ]; export const mainRouter = new Router( - routes, - location.pathname + location.search + location.hash, + routes, + location.pathname + location.search + location.hash ); window.history.replaceState( - { key: mainRouter.getCurrentKey() }, - "", - location.href, + { key: mainRouter.getCurrentKey() }, + "", + location.href ); // TODO: このファイルでスクロール位置も管理する設計だとdeckに対応できないのでなんとかする @@ -647,43 +678,43 @@ window.history.replaceState( const scrollPosStore = new Map(); window.setInterval(() => { - scrollPosStore.set(window.history.state?.key, window.scrollY); + scrollPosStore.set(window.history.state?.key, window.scrollY); }, 1000); mainRouter.addListener("push", (ctx) => { - window.history.pushState({ key: ctx.key }, "", ctx.path); - const scrollPos = scrollPosStore.get(ctx.key) ?? 0; - window.scroll({ top: scrollPos, behavior: "instant" }); - if (scrollPos !== 0) { - window.setTimeout(() => { - // 遷移直後はタイミングによってはコンポーネントが復元し切ってない可能性も考えられるため少し時間を空けて再度スクロール - window.scroll({ top: scrollPos, behavior: "instant" }); - }, 100); - } + window.history.pushState({ key: ctx.key }, "", ctx.path); + const scrollPos = scrollPosStore.get(ctx.key) ?? 0; + window.scroll({ top: scrollPos, behavior: "instant" }); + if (scrollPos !== 0) { + window.setTimeout(() => { + // 遷移直後はタイミングによってはコンポーネントが復元し切ってない可能性も考えられるため少し時間を空けて再度スクロール + window.scroll({ top: scrollPos, behavior: "instant" }); + }, 100); + } }); mainRouter.addListener("replace", (ctx) => { - window.history.replaceState({ key: ctx.key }, "", ctx.path); + window.history.replaceState({ key: ctx.key }, "", ctx.path); }); mainRouter.addListener("same", () => { - window.scroll({ top: 0, behavior: "smooth" }); + window.scroll({ top: 0, behavior: "smooth" }); }); window.addEventListener("popstate", (event) => { - mainRouter.replace( - location.pathname + location.search + location.hash, - event.state?.key, - false, - ); - const scrollPos = scrollPosStore.get(event.state?.key) ?? 0; - window.scroll({ top: scrollPos, behavior: "instant" }); - window.setTimeout(() => { - // 遷移直後はタイミングによってはコンポーネントが復元し切ってない可能性も考えられるため少し時間を空けて再度スクロール - window.scroll({ top: scrollPos, behavior: "instant" }); - }, 100); + mainRouter.replace( + location.pathname + location.search + location.hash, + event.state?.key, + false + ); + const scrollPos = scrollPosStore.get(event.state?.key) ?? 0; + window.scroll({ top: scrollPos, behavior: "instant" }); + window.setTimeout(() => { + // 遷移直後はタイミングによってはコンポーネントが復元し切ってない可能性も考えられるため少し時間を空けて再度スクロール + window.scroll({ top: scrollPos, behavior: "instant" }); + }, 100); }); export function useRouter(): Router { - return inject("router", null) ?? mainRouter; + return inject("router", null) ?? mainRouter; } diff --git a/fe_calckey/frontend/client/src/scripts/2fa.ts b/fe_calckey/frontend/client/src/scripts/2fa.ts index 14d59be..b892e43 100644 --- a/fe_calckey/frontend/client/src/scripts/2fa.ts +++ b/fe_calckey/frontend/client/src/scripts/2fa.ts @@ -1,26 +1,26 @@ export function byteify(string: string, encoding: "ascii" | "base64" | "hex") { - switch (encoding) { - case "ascii": - return Uint8Array.from(string, (c) => c.charCodeAt(0)); - case "base64": - return Uint8Array.from( - atob(string.replace(/-/g, "+").replace(/_/g, "/")), - (c) => c.charCodeAt(0), - ); - case "hex": - return new Uint8Array( - string.match(/.{1,2}/g).map((byte) => parseInt(byte, 16)), - ); - } + switch (encoding) { + case "ascii": + return Uint8Array.from(string, (c) => c.charCodeAt(0)); + case "base64": + return Uint8Array.from( + atob(string.replace(/-/g, "+").replace(/_/g, "/")), + (c) => c.charCodeAt(0) + ); + case "hex": + return new Uint8Array( + string.match(/.{1,2}/g).map((byte) => parseInt(byte, 16)) + ); + } } export function hexify(buffer: ArrayBuffer) { - return Array.from(new Uint8Array(buffer)).reduce( - (str, byte) => str + byte.toString(16).padStart(2, "0"), - "", - ); + return Array.from(new Uint8Array(buffer)).reduce( + (str, byte) => str + byte.toString(16).padStart(2, "0"), + "" + ); } export function stringify(buffer: ArrayBuffer) { - return String.fromCharCode(...new Uint8Array(buffer)); + return String.fromCharCode(...new Uint8Array(buffer)); } diff --git a/fe_calckey/frontend/client/src/scripts/aiscript/api.ts b/fe_calckey/frontend/client/src/scripts/aiscript/api.ts index 9ec2db9..27fc12a 100644 --- a/fe_calckey/frontend/client/src/scripts/aiscript/api.ts +++ b/fe_calckey/frontend/client/src/scripts/aiscript/api.ts @@ -3,56 +3,59 @@ import * as os from "@/os"; import { $i } from "@/account"; export function createAiScriptEnv(opts) { - let apiRequests = 0; - return { - USER_ID: $i ? values.STR($i.id) : values.NULL, - USER_NAME: $i ? values.STR($i.name) : values.NULL, - USER_USERNAME: $i ? values.STR($i.username) : values.NULL, - "Mk:dialog": values.FN_NATIVE(async ([title, text, type]) => { - await os.alert({ - type: type ? type.value : "info", - title: title.value, - text: text.value, - }); - }), - "Mk:confirm": values.FN_NATIVE(async ([title, text, type]) => { - const confirm = await os.confirm({ - type: type ? type.value : "question", - title: title.value, - text: text.value, - }); - return confirm.canceled ? values.FALSE : values.TRUE; - }), - "Mk:api": values.FN_NATIVE(async ([ep, param, token]) => { - if (token) { - utils.assertString(token); - // バグがあればundefinedもあり得るため念のため - if (typeof token.value !== "string") throw new Error("invalid token"); - } - apiRequests++; - if (apiRequests > 16) return values.NULL; - const res = await os.api( - ep.value, - utils.valToJs(param), - token ? token.value : opts.token || null, - ); - return utils.jsToVal(res); - }), - "Mk:save": values.FN_NATIVE(([key, value]) => { - utils.assertString(key); - localStorage.setItem( - `aiscript:${opts.storageKey}:${key.value}`, - JSON.stringify(utils.valToJs(value)), - ); - return values.NULL; - }), - "Mk:load": values.FN_NATIVE(([key]) => { - utils.assertString(key); - return utils.jsToVal( - JSON.parse( - localStorage.getItem(`aiscript:${opts.storageKey}:${key.value}`), - ), - ); - }), - }; + let apiRequests = 0; + return { + USER_ID: $i ? values.STR($i.id) : values.NULL, + USER_NAME: $i ? values.STR($i.name) : values.NULL, + USER_USERNAME: $i ? values.STR($i.username) : values.NULL, + "Mk:dialog": values.FN_NATIVE(async ([title, text, type]) => { + await os.alert({ + type: type ? type.value : "info", + title: title.value, + text: text.value, + }); + }), + "Mk:confirm": values.FN_NATIVE(async ([title, text, type]) => { + const confirm = await os.confirm({ + type: type ? type.value : "question", + title: title.value, + text: text.value, + }); + return confirm.canceled ? values.FALSE : values.TRUE; + }), + "Mk:api": values.FN_NATIVE(async ([ep, param, token]) => { + if (token) { + utils.assertString(token); + // バグがあればundefinedもあり得るため念のため + if (typeof token.value !== "string") + throw new Error("invalid token"); + } + apiRequests++; + if (apiRequests > 16) return values.NULL; + const res = await os.api( + ep.value, + utils.valToJs(param), + token ? token.value : opts.token || null + ); + return utils.jsToVal(res); + }), + "Mk:save": values.FN_NATIVE(([key, value]) => { + utils.assertString(key); + localStorage.setItem( + `aiscript:${opts.storageKey}:${key.value}`, + JSON.stringify(utils.valToJs(value)) + ); + return values.NULL; + }), + "Mk:load": values.FN_NATIVE(([key]) => { + utils.assertString(key); + return utils.jsToVal( + JSON.parse( + localStorage.getItem( + `aiscript:${opts.storageKey}:${key.value}` + ) + ) + ); + }), + }; } diff --git a/fe_calckey/frontend/client/src/scripts/array.ts b/fe_calckey/frontend/client/src/scripts/array.ts index bc6f4d4..9cf0edb 100644 --- a/fe_calckey/frontend/client/src/scripts/array.ts +++ b/fe_calckey/frontend/client/src/scripts/array.ts @@ -5,21 +5,21 @@ import { EndoRelation, Predicate } from "./relation"; */ export function countIf(f: Predicate, xs: T[]): number { - return xs.filter(f).length; + return xs.filter(f).length; } /** * Count the number of elements that is equal to the element */ export function count(a: T, xs: T[]): number { - return countIf((x) => x === a, xs); + return countIf((x) => x === a, xs); } /** * Concatenate an array of arrays */ export function concat(xss: T[][]): T[] { - return ([] as T[]).concat(...xss); + return ([] as T[]).concat(...xss); } /** @@ -27,14 +27,14 @@ export function concat(xss: T[][]): T[] { * @param sep The element to be interspersed */ export function intersperse(sep: T, xs: T[]): T[] { - return concat(xs.map((x) => [sep, x])).slice(1); + return concat(xs.map((x) => [sep, x])).slice(1); } /** * Returns the array of elements that is not equal to the element */ export function erase(a: T, xs: T[]): T[] { - return xs.filter((x) => x !== a); + return xs.filter((x) => x !== a); } /** @@ -42,36 +42,36 @@ export function erase(a: T, xs: T[]): T[] { * The order of result values are determined by the first array. */ export function difference(xs: T[], ys: T[]): T[] { - return xs.filter((x) => !ys.includes(x)); + return xs.filter((x) => !ys.includes(x)); } /** * Remove all but the first element from every group of equivalent elements */ export function unique(xs: T[]): T[] { - return [...new Set(xs)]; + return [...new Set(xs)]; } export function uniqueBy( - values: TValue[], - keySelector: (value: TValue) => TKey, + values: TValue[], + keySelector: (value: TValue) => TKey ): TValue[] { - const map = new Map(); + const map = new Map(); - for (const value of values) { - const key = keySelector(value); - if (!map.has(key)) map.set(key, value); - } + for (const value of values) { + const key = keySelector(value); + if (!map.has(key)) map.set(key, value); + } - return [...map.values()]; + return [...map.values()]; } export function sum(xs: number[]): number { - return xs.reduce((a, b) => a + b, 0); + return xs.reduce((a, b) => a + b, 0); } export function maximum(xs: number[]): number { - return Math.max(...xs); + return Math.max(...xs); } /** @@ -79,15 +79,15 @@ export function maximum(xs: number[]): number { * The concatenation of the result is equal to the argument. */ export function groupBy(f: EndoRelation, xs: T[]): T[][] { - const groups = [] as T[][]; - for (const x of xs) { - if (groups.length !== 0 && f(groups[groups.length - 1][0], x)) { - groups[groups.length - 1].push(x); - } else { - groups.push([x]); - } - } - return groups; + const groups = [] as T[][]; + for (const x of xs) { + if (groups.length !== 0 && f(groups[groups.length - 1][0], x)) { + groups[groups.length - 1].push(x); + } else { + groups.push([x]); + } + } + return groups; } /** @@ -95,58 +95,58 @@ export function groupBy(f: EndoRelation, xs: T[]): T[][] { * The concatenation of the result is equal to the argument. */ export function groupOn(f: (x: T) => S, xs: T[]): T[][] { - return groupBy((a, b) => f(a) === f(b), xs); + return groupBy((a, b) => f(a) === f(b), xs); } export function groupByX(collections: T[], keySelector: (x: T) => string) { - return collections.reduce((obj: Record, item: T) => { - const key = keySelector(item); - if (typeof obj[key] === "undefined") { - obj[key] = []; - } + return collections.reduce((obj: Record, item: T) => { + const key = keySelector(item); + if (typeof obj[key] === "undefined") { + obj[key] = []; + } - obj[key].push(item); + obj[key].push(item); - return obj; - }, {}); + return obj; + }, {}); } /** * Compare two arrays by lexicographical order */ export function lessThan(xs: number[], ys: number[]): boolean { - for (let i = 0; i < Math.min(xs.length, ys.length); i++) { - if (xs[i] < ys[i]) return true; - if (xs[i] > ys[i]) return false; - } - return xs.length < ys.length; + for (let i = 0; i < Math.min(xs.length, ys.length); i++) { + if (xs[i] < ys[i]) return true; + if (xs[i] > ys[i]) return false; + } + return xs.length < ys.length; } /** * Returns the longest prefix of elements that satisfy the predicate */ export function takeWhile(f: Predicate, xs: T[]): T[] { - const ys = []; - for (const x of xs) { - if (f(x)) { - ys.push(x); - } else { - break; - } - } - return ys; + const ys = []; + for (const x of xs) { + if (f(x)) { + ys.push(x); + } else { + break; + } + } + return ys; } export function cumulativeSum(xs: number[]): number[] { - const ys = Array.from(xs); // deep copy - for (let i = 1; i < ys.length; i++) ys[i] += ys[i - 1]; - return ys; + const ys = Array.from(xs); // deep copy + for (let i = 1; i < ys.length; i++) ys[i] += ys[i - 1]; + return ys; } export function toArray(x: T | T[] | undefined): T[] { - return Array.isArray(x) ? x : x != null ? [x] : []; + return Array.isArray(x) ? x : x != null ? [x] : []; } export function toSingle(x: T | T[] | undefined): T | undefined { - return Array.isArray(x) ? x[0] : x; + return Array.isArray(x) ? x[0] : x; } diff --git a/fe_calckey/frontend/client/src/scripts/autocomplete.ts b/fe_calckey/frontend/client/src/scripts/autocomplete.ts index 59b8d34..54a39ff 100644 --- a/fe_calckey/frontend/client/src/scripts/autocomplete.ts +++ b/fe_calckey/frontend/client/src/scripts/autocomplete.ts @@ -4,279 +4,290 @@ import { toASCII } from "punycode/"; import { popup } from "@/os"; export class Autocomplete { - private suggestion: { - x: Ref; - y: Ref; - q: Ref; - close: () => void; - } | null; - private textarea: HTMLInputElement | HTMLTextAreaElement; - private currentType: string; - private textRef: Ref; - private opening: boolean; + private suggestion: { + x: Ref; + y: Ref; + q: Ref; + close: () => void; + } | null; + private textarea: HTMLInputElement | HTMLTextAreaElement; + private currentType: string; + private textRef: Ref; + private opening: boolean; - private get text(): string { - return this.textRef.value; - } + private get text(): string { + return this.textRef.value; + } - private set text(text: string) { - this.textRef.value = text; - } + private set text(text: string) { + this.textRef.value = text; + } - /** - * 対象のテキストエリアを与えてインスタンスを初期化します。 - */ - constructor( - textarea: HTMLInputElement | HTMLTextAreaElement, - textRef: Ref, - ) { - //#region BIND - this.onInput = this.onInput.bind(this); - this.complete = this.complete.bind(this); - this.close = this.close.bind(this); - //#endregion + /** + * 対象のテキストエリアを与えてインスタンスを初期化します。 + */ + constructor( + textarea: HTMLInputElement | HTMLTextAreaElement, + textRef: Ref + ) { + //#region BIND + this.onInput = this.onInput.bind(this); + this.complete = this.complete.bind(this); + this.close = this.close.bind(this); + //#endregion - this.suggestion = null; - this.textarea = textarea; - this.textRef = textRef; - this.opening = false; + this.suggestion = null; + this.textarea = textarea; + this.textRef = textRef; + this.opening = false; - this.attach(); - } + this.attach(); + } - /** - * このインスタンスにあるテキストエリアの入力のキャプチャを開始します。 - */ - public attach() { - this.textarea.addEventListener("input", this.onInput); - } + /** + * このインスタンスにあるテキストエリアの入力のキャプチャを開始します。 + */ + public attach() { + this.textarea.addEventListener("input", this.onInput); + } - /** - * このインスタンスにあるテキストエリアの入力のキャプチャを解除します。 - */ - public detach() { - this.textarea.removeEventListener("input", this.onInput); - this.close(); - } + /** + * このインスタンスにあるテキストエリアの入力のキャプチャを解除します。 + */ + public detach() { + this.textarea.removeEventListener("input", this.onInput); + this.close(); + } - /** - * テキスト入力時 - */ - private onInput() { - const caretPos = this.textarea.selectionStart; - const text = this.text.substr(0, caretPos).split("\n").pop()!; + /** + * テキスト入力時 + */ + private onInput() { + const caretPos = this.textarea.selectionStart; + const text = this.text.substr(0, caretPos).split("\n").pop()!; - const mentionIndex = text.lastIndexOf("@"); - const hashtagIndex = text.lastIndexOf("#"); - const emojiIndex = text.lastIndexOf(":"); - const mfmTagIndex = text.lastIndexOf("$"); + const mentionIndex = text.lastIndexOf("@"); + const hashtagIndex = text.lastIndexOf("#"); + const emojiIndex = text.lastIndexOf(":"); + const mfmTagIndex = text.lastIndexOf("$"); - const max = Math.max(mentionIndex, hashtagIndex, emojiIndex, mfmTagIndex); + const max = Math.max( + mentionIndex, + hashtagIndex, + emojiIndex, + mfmTagIndex + ); - if (max === -1) { - this.close(); - return; - } + if (max === -1) { + this.close(); + return; + } - const isMention = mentionIndex !== -1; - const isHashtag = hashtagIndex !== -1; - const isMfmTag = mfmTagIndex !== -1; - const isEmoji = - emojiIndex !== -1 && text.split(/:[a-z0-9_+\-]+:/).pop()!.includes(":"); + const isMention = mentionIndex !== -1; + const isHashtag = hashtagIndex !== -1; + const isMfmTag = mfmTagIndex !== -1; + const isEmoji = + emojiIndex !== -1 && + text + .split(/:[a-z0-9_+\-]+:/) + .pop()! + .includes(":"); - let opened = false; + let opened = false; - if (isMention) { - const username = text.substr(mentionIndex + 1); - if (username !== "" && username.match(/^[a-zA-Z0-9_]+$/)) { - this.open("user", username); - opened = true; - } else if (username === "") { - this.open("user", null); - opened = true; - } - } + if (isMention) { + const username = text.substr(mentionIndex + 1); + if (username !== "" && username.match(/^[a-zA-Z0-9_]+$/)) { + this.open("user", username); + opened = true; + } else if (username === "") { + this.open("user", null); + opened = true; + } + } - if (isHashtag && !opened) { - const hashtag = text.substr(hashtagIndex + 1); - if (!hashtag.includes(" ")) { - this.open("hashtag", hashtag); - opened = true; - } - } + if (isHashtag && !opened) { + const hashtag = text.substr(hashtagIndex + 1); + if (!hashtag.includes(" ")) { + this.open("hashtag", hashtag); + opened = true; + } + } - if (isEmoji && !opened) { - const emoji = text.substr(emojiIndex + 1); - if (!emoji.includes(" ")) { - this.open("emoji", emoji); - opened = true; - } - } + if (isEmoji && !opened) { + const emoji = text.substr(emojiIndex + 1); + if (!emoji.includes(" ")) { + this.open("emoji", emoji); + opened = true; + } + } - if (isMfmTag && !opened) { - const mfmTag = text.substr(mfmTagIndex + 1); - if (!mfmTag.includes(" ")) { - this.open("mfmTag", mfmTag.replace("[", "")); - opened = true; - } - } + if (isMfmTag && !opened) { + const mfmTag = text.substr(mfmTagIndex + 1); + if (!mfmTag.includes(" ")) { + this.open("mfmTag", mfmTag.replace("[", "")); + opened = true; + } + } - if (!opened) { - this.close(); - } - } + if (!opened) { + this.close(); + } + } - /** - * サジェストを提示します。 - */ - private async open(type: string, q: string | null) { - if (type !== this.currentType) { - this.close(); - } - if (this.opening) return; - this.opening = true; - this.currentType = type; + /** + * サジェストを提示します。 + */ + private async open(type: string, q: string | null) { + if (type !== this.currentType) { + this.close(); + } + if (this.opening) return; + this.opening = true; + this.currentType = type; - //#region サジェストを表示すべき位置を計算 - const caretPosition = getCaretCoordinates( - this.textarea, - this.textarea.selectionStart, - ); + //#region サジェストを表示すべき位置を計算 + const caretPosition = getCaretCoordinates( + this.textarea, + this.textarea.selectionStart + ); - const rect = this.textarea.getBoundingClientRect(); + const rect = this.textarea.getBoundingClientRect(); - const x = rect.left + caretPosition.left - this.textarea.scrollLeft; - const y = rect.top + caretPosition.top - this.textarea.scrollTop; - //#endregion + const x = rect.left + caretPosition.left - this.textarea.scrollLeft; + const y = rect.top + caretPosition.top - this.textarea.scrollTop; + //#endregion - if (this.suggestion) { - this.suggestion.x.value = x; - this.suggestion.y.value = y; - this.suggestion.q.value = q; + if (this.suggestion) { + this.suggestion.x.value = x; + this.suggestion.y.value = y; + this.suggestion.q.value = q; - this.opening = false; - } else { - const _x = ref(x); - const _y = ref(y); - const _q = ref(q); + this.opening = false; + } else { + const _x = ref(x); + const _y = ref(y); + const _q = ref(q); - const { dispose } = await popup( - defineAsyncComponent(() => import("@/components/MkAutocomplete.vue")), - { - textarea: this.textarea, - close: this.close, - type: type, - q: _q, - x: _x, - y: _y, - }, - { - done: (res) => { - this.complete(res); - }, - }, - ); + const { dispose } = await popup( + defineAsyncComponent( + () => import("@/components/MkAutocomplete.vue") + ), + { + textarea: this.textarea, + close: this.close, + type: type, + q: _q, + x: _x, + y: _y, + }, + { + done: (res) => { + this.complete(res); + }, + } + ); - this.suggestion = { - q: _q, - x: _x, - y: _y, - close: () => dispose(), - }; + this.suggestion = { + q: _q, + x: _x, + y: _y, + close: () => dispose(), + }; - this.opening = false; - } - } + this.opening = false; + } + } - /** - * サジェストを閉じます。 - */ - private close() { - if (this.suggestion == null) return; + /** + * サジェストを閉じます。 + */ + private close() { + if (this.suggestion == null) return; - this.suggestion.close(); - this.suggestion = null; + this.suggestion.close(); + this.suggestion = null; - this.textarea.focus(); - } + this.textarea.focus(); + } - /** - * オートコンプリートする - */ - private complete({ type, value }) { - this.close(); + /** + * オートコンプリートする + */ + private complete({ type, value }) { + this.close(); - const caret = this.textarea.selectionStart; + const caret = this.textarea.selectionStart; - if (type === "user") { - const source = this.text; + if (type === "user") { + const source = this.text; - const before = source.substr(0, caret); - const trimmedBefore = before.substring(0, before.lastIndexOf("@")); - const after = source.substr(caret); + const before = source.substr(0, caret); + const trimmedBefore = before.substring(0, before.lastIndexOf("@")); + const after = source.substr(caret); - const acct = - value.host === null - ? value.username - : `${value.username}@${toASCII(value.host)}`; + const acct = + value.host === null + ? value.username + : `${value.username}@${toASCII(value.host)}`; - // 挿入 - this.text = `${trimmedBefore}@${acct} ${after}`; + // 挿入 + this.text = `${trimmedBefore}@${acct} ${after}`; - // キャレットを戻す - nextTick(() => { - this.textarea.focus(); - const pos = trimmedBefore.length + (acct.length + 2); - this.textarea.setSelectionRange(pos, pos); - }); - } else if (type === "hashtag") { - const source = this.text; + // キャレットを戻す + nextTick(() => { + this.textarea.focus(); + const pos = trimmedBefore.length + (acct.length + 2); + this.textarea.setSelectionRange(pos, pos); + }); + } else if (type === "hashtag") { + const source = this.text; - const before = source.substr(0, caret); - const trimmedBefore = before.substring(0, before.lastIndexOf("#")); - const after = source.substr(caret); + const before = source.substr(0, caret); + const trimmedBefore = before.substring(0, before.lastIndexOf("#")); + const after = source.substr(caret); - // 挿入 - this.text = `${trimmedBefore}#${value} ${after}`; + // 挿入 + this.text = `${trimmedBefore}#${value} ${after}`; - // キャレットを戻す - nextTick(() => { - this.textarea.focus(); - const pos = trimmedBefore.length + (value.length + 2); - this.textarea.setSelectionRange(pos, pos); - }); - } else if (type === "emoji") { - const source = this.text; + // キャレットを戻す + nextTick(() => { + this.textarea.focus(); + const pos = trimmedBefore.length + (value.length + 2); + this.textarea.setSelectionRange(pos, pos); + }); + } else if (type === "emoji") { + const source = this.text; - const before = source.substr(0, caret); - const trimmedBefore = before.substring(0, before.lastIndexOf(":")); - const after = source.substr(caret); + const before = source.substr(0, caret); + const trimmedBefore = before.substring(0, before.lastIndexOf(":")); + const after = source.substr(caret); - // 挿入 - this.text = trimmedBefore + value + after; + // 挿入 + this.text = trimmedBefore + value + after; - // キャレットを戻す - nextTick(() => { - this.textarea.focus(); - const pos = trimmedBefore.length + value.length; - this.textarea.setSelectionRange(pos, pos); - }); - } else if (type === "mfmTag") { - const source = this.text; + // キャレットを戻す + nextTick(() => { + this.textarea.focus(); + const pos = trimmedBefore.length + value.length; + this.textarea.setSelectionRange(pos, pos); + }); + } else if (type === "mfmTag") { + const source = this.text; - const before = source.substr(0, caret); - const trimmedBefore = before.substring(0, before.lastIndexOf("$")); - const after = source.substr(caret); + const before = source.substr(0, caret); + const trimmedBefore = before.substring(0, before.lastIndexOf("$")); + const after = source.substr(caret); - // 挿入 - this.text = `${trimmedBefore}$[${value} ]${after}`; + // 挿入 + this.text = `${trimmedBefore}$[${value} ]${after}`; - // キャレットを戻す - nextTick(() => { - this.textarea.focus(); - const pos = trimmedBefore.length + (value.length + 3); - this.textarea.setSelectionRange(pos, pos); - }); - } - } + // キャレットを戻す + nextTick(() => { + this.textarea.focus(); + const pos = trimmedBefore.length + (value.length + 3); + this.textarea.setSelectionRange(pos, pos); + }); + } + } } diff --git a/fe_calckey/frontend/client/src/scripts/chart-vline.ts b/fe_calckey/frontend/client/src/scripts/chart-vline.ts index 94ba0ab..03634de 100644 --- a/fe_calckey/frontend/client/src/scripts/chart-vline.ts +++ b/fe_calckey/frontend/client/src/scripts/chart-vline.ts @@ -1,24 +1,24 @@ import { Plugin } from "chart.js"; export const chartVLine = (vLineColor: string) => - ({ - id: "vLine", - beforeDraw(chart, args, options) { - if (chart.tooltip?._active?.length) { - const ctx = chart.ctx; - const xs = chart.tooltip._active.map((a) => a.element.x); - const x = xs.reduce((a, b) => a + b, 0) / xs.length; - const topY = chart.scales.y.top; - const bottomY = chart.scales.y.bottom; + ({ + id: "vLine", + beforeDraw(chart, args, options) { + if (chart.tooltip?._active?.length) { + const ctx = chart.ctx; + const xs = chart.tooltip._active.map((a) => a.element.x); + const x = xs.reduce((a, b) => a + b, 0) / xs.length; + const topY = chart.scales.y.top; + const bottomY = chart.scales.y.bottom; - ctx.save(); - ctx.beginPath(); - ctx.moveTo(x, bottomY); - ctx.lineTo(x, topY); - ctx.lineWidth = 1; - ctx.strokeStyle = vLineColor; - ctx.stroke(); - ctx.restore(); - } - }, - }) as Plugin; + ctx.save(); + ctx.beginPath(); + ctx.moveTo(x, bottomY); + ctx.lineTo(x, topY); + ctx.lineWidth = 1; + ctx.strokeStyle = vLineColor; + ctx.stroke(); + ctx.restore(); + } + }, + } as Plugin); diff --git a/fe_calckey/frontend/client/src/scripts/check-word-mute.ts b/fe_calckey/frontend/client/src/scripts/check-word-mute.ts index f789d0c..349b8ee 100644 --- a/fe_calckey/frontend/client/src/scripts/check-word-mute.ts +++ b/fe_calckey/frontend/client/src/scripts/check-word-mute.ts @@ -1,94 +1,96 @@ export type Muted = { - muted: boolean; - matched: string[]; - what?: string; // "note" || "reply" || "renote" || "quote" + muted: boolean; + matched: string[]; + what?: string; // "note" || "reply" || "renote" || "quote" }; const NotMuted = { muted: false, matched: [] }; function checkWordMute( - note: NoteLike, - mutedWords: Array, + note: NoteLike, + mutedWords: Array ): Muted { - let text = `${note.cw ?? ""} ${note.text ?? ""}`; - if (note.files != null) - text += ` ${note.files.map((f) => f.comment ?? "").join(" ")}`; - text = text.trim(); + let text = `${note.cw ?? ""} ${note.text ?? ""}`; + if (note.files != null) + text += ` ${note.files.map((f) => f.comment ?? "").join(" ")}`; + text = text.trim(); - if (text === "") return NotMuted; + if (text === "") return NotMuted; - let result = { muted: false, matched: [] }; + let result = { muted: false, matched: [] }; - for (const mutePattern of mutedWords) { - if (Array.isArray(mutePattern)) { - // Clean up - const keywords = mutePattern.filter((keyword) => keyword !== ""); + for (const mutePattern of mutedWords) { + if (Array.isArray(mutePattern)) { + // Clean up + const keywords = mutePattern.filter((keyword) => keyword !== ""); - if ( - keywords.length > 0 && - keywords.every((keyword) => text.includes(keyword)) - ) { - result.muted = true; - result.matched.push(...keywords); - } - } else { - // represents RegExp - const regexp = mutePattern.match(/^\/(.+)\/(.*)$/); + if ( + keywords.length > 0 && + keywords.every((keyword) => text.includes(keyword)) + ) { + result.muted = true; + result.matched.push(...keywords); + } + } else { + // represents RegExp + const regexp = mutePattern.match(/^\/(.+)\/(.*)$/); - // This should never happen due to input sanitisation. - if (!regexp) { - console.warn(`Found invalid regex in word mutes: ${mutePattern}`); - continue; - } + // This should never happen due to input sanitisation. + if (!regexp) { + console.warn( + `Found invalid regex in word mutes: ${mutePattern}` + ); + continue; + } - try { - if (new RegExp(regexp[1], regexp[2]).test(text)) { - result.muted = true; - result.matched.push(mutePattern); - } - } catch (err) { - // This should never happen due to input sanitisation. - } - } - } + try { + if (new RegExp(regexp[1], regexp[2]).test(text)) { + result.muted = true; + result.matched.push(mutePattern); + } + } catch (err) { + // This should never happen due to input sanitisation. + } + } + } - result.matched = [...new Set(result.matched)]; - return result; + result.matched = [...new Set(result.matched)]; + return result; } export function getWordSoftMute( - note: Record, - me: Record | null | undefined, - mutedWords: Array, + note: Record, + me: Record | null | undefined, + mutedWords: Array ): Muted { - // 自分自身 - if (me && note.userId === me.id) { - return NotMuted; - } + // 自分自身 + if (me && note.userId === me.id) { + return NotMuted; + } - if (mutedWords.length > 0) { - let noteMuted = checkWordMute(note, mutedWords); - if (noteMuted.muted) { - noteMuted.what = "note"; - return noteMuted; - } + if (mutedWords.length > 0) { + let noteMuted = checkWordMute(note, mutedWords); + if (noteMuted.muted) { + noteMuted.what = "note"; + return noteMuted; + } - if (note.renote) { - let renoteMuted = checkWordMute(note.renote, mutedWords); - if (renoteMuted.muted) { - renoteMuted.what = note.text == null ? "renote" : "quote"; - return renoteMuted; - } - } + if (note.renote) { + let renoteMuted = checkWordMute(note.renote, mutedWords); + if (renoteMuted.muted) { + renoteMuted.what = note.text == null ? "renote" : "quote"; + return renoteMuted; + } + } - if (note.reply) { - let replyMuted = checkWordMute(note.reply, mutedWords); - if (replyMuted.muted) { - replyMuted.what = "reply"; - return replyMuted; - } - } - } + if (note.reply) { + let replyMuted = checkWordMute(note.reply, mutedWords); + if (replyMuted.muted) { + replyMuted.what = "reply"; + return replyMuted; + } + } + } - return NotMuted; + return NotMuted; } diff --git a/fe_calckey/frontend/client/src/scripts/clone.ts b/fe_calckey/frontend/client/src/scripts/clone.ts index 4322e2e..32a648e 100644 --- a/fe_calckey/frontend/client/src/scripts/clone.ts +++ b/fe_calckey/frontend/client/src/scripts/clone.ts @@ -2,23 +2,23 @@ // SEE: http://var.blog.jp/archives/86038606.html type Cloneable = - | string - | number - | boolean - | null - | { [key: string]: Cloneable } - | Cloneable[]; + | string + | number + | boolean + | null + | { [key: string]: Cloneable } + | Cloneable[]; export function deepClone(x: T): T { - if (typeof x === "object") { - if (x === null) return x; - if (Array.isArray(x)) return x.map(deepClone) as T; - const obj = {} as Record; - for (const [k, v] of Object.entries(x)) { - obj[k] = deepClone(v); - } - return obj as T; - } else { - return x; - } + if (typeof x === "object") { + if (x === null) return x; + if (Array.isArray(x)) return x.map(deepClone) as T; + const obj = {} as Record; + for (const [k, v] of Object.entries(x)) { + obj[k] = deepClone(v); + } + return obj as T; + } else { + return x; + } } diff --git a/fe_calckey/frontend/client/src/scripts/collect-page-vars.ts b/fe_calckey/frontend/client/src/scripts/collect-page-vars.ts index e7d4a6d..c990fcd 100644 --- a/fe_calckey/frontend/client/src/scripts/collect-page-vars.ts +++ b/fe_calckey/frontend/client/src/scripts/collect-page-vars.ts @@ -1,48 +1,48 @@ export function collectPageVars(content) { - const pageVars = []; - const collect = (xs: any[]) => { - for (const x of xs) { - if (x.type === "textInput") { - pageVars.push({ - name: x.name, - type: "string", - value: x.default || "", - }); - } else if (x.type === "textareaInput") { - pageVars.push({ - name: x.name, - type: "string", - value: x.default || "", - }); - } else if (x.type === "numberInput") { - pageVars.push({ - name: x.name, - type: "number", - value: x.default || 0, - }); - } else if (x.type === "switch") { - pageVars.push({ - name: x.name, - type: "boolean", - value: x.default, - }); - } else if (x.type === "counter") { - pageVars.push({ - name: x.name, - type: "number", - value: 0, - }); - } else if (x.type === "radioButton") { - pageVars.push({ - name: x.name, - type: "string", - value: x.default || "", - }); - } else if (x.children) { - collect(x.children); - } - } - }; - collect(content); - return pageVars; + const pageVars = []; + const collect = (xs: any[]) => { + for (const x of xs) { + if (x.type === "textInput") { + pageVars.push({ + name: x.name, + type: "string", + value: x.default || "", + }); + } else if (x.type === "textareaInput") { + pageVars.push({ + name: x.name, + type: "string", + value: x.default || "", + }); + } else if (x.type === "numberInput") { + pageVars.push({ + name: x.name, + type: "number", + value: x.default || 0, + }); + } else if (x.type === "switch") { + pageVars.push({ + name: x.name, + type: "boolean", + value: x.default, + }); + } else if (x.type === "counter") { + pageVars.push({ + name: x.name, + type: "number", + value: 0, + }); + } else if (x.type === "radioButton") { + pageVars.push({ + name: x.name, + type: "string", + value: x.default || "", + }); + } else if (x.children) { + collect(x.children); + } + } + }; + collect(content); + return pageVars; } diff --git a/fe_calckey/frontend/client/src/scripts/color.ts b/fe_calckey/frontend/client/src/scripts/color.ts index 10a99a5..729c49b 100644 --- a/fe_calckey/frontend/client/src/scripts/color.ts +++ b/fe_calckey/frontend/client/src/scripts/color.ts @@ -1,7 +1,7 @@ export const alpha = (hex: string, a: number): string => { - const result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex)!; - const r = parseInt(result[1], 16); - const g = parseInt(result[2], 16); - const b = parseInt(result[3], 16); - return `rgba(${r}, ${g}, ${b}, ${a})`; + const result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex)!; + const r = parseInt(result[1], 16); + const g = parseInt(result[2], 16); + const b = parseInt(result[3], 16); + return `rgba(${r}, ${g}, ${b}, ${a})`; }; diff --git a/fe_calckey/frontend/client/src/scripts/contains.ts b/fe_calckey/frontend/client/src/scripts/contains.ts index 256e09d..3d6fa3b 100644 --- a/fe_calckey/frontend/client/src/scripts/contains.ts +++ b/fe_calckey/frontend/client/src/scripts/contains.ts @@ -1,9 +1,9 @@ export default (parent, child, checkSame = true) => { - if (checkSame && parent === child) return true; - let node = child.parentNode; - while (node) { - if (node === parent) return true; - node = node.parentNode; - } - return false; + if (checkSame && parent === child) return true; + let node = child.parentNode; + while (node) { + if (node === parent) return true; + node = node.parentNode; + } + return false; }; diff --git a/fe_calckey/frontend/client/src/scripts/copy-to-clipboard.ts b/fe_calckey/frontend/client/src/scripts/copy-to-clipboard.ts index a4835d8..415bbf4 100644 --- a/fe_calckey/frontend/client/src/scripts/copy-to-clipboard.ts +++ b/fe_calckey/frontend/client/src/scripts/copy-to-clipboard.ts @@ -2,32 +2,32 @@ * Clipboardに値をコピー(TODO: 文字列以外も対応) */ export default (val) => { - // 空div 生成 - const tmp = document.createElement("div"); - // 選択用のタグ生成 - const pre = document.createElement("pre"); + // 空div 生成 + const tmp = document.createElement("div"); + // 選択用のタグ生成 + const pre = document.createElement("pre"); - // 親要素のCSSで user-select: none だとコピーできないので書き換える - pre.style.webkitUserSelect = "auto"; - pre.style.userSelect = "auto"; + // 親要素のCSSで user-select: none だとコピーできないので書き換える + pre.style.webkitUserSelect = "auto"; + pre.style.userSelect = "auto"; - tmp.appendChild(pre).textContent = val; + tmp.appendChild(pre).textContent = val; - // 要素を画面外へ - const s = tmp.style; - s.position = "fixed"; - s.right = "200%"; + // 要素を画面外へ + const s = tmp.style; + s.position = "fixed"; + s.right = "200%"; - // body に追加 - document.body.appendChild(tmp); - // 要素を選択 - document.getSelection().selectAllChildren(tmp); + // body に追加 + document.body.appendChild(tmp); + // 要素を選択 + document.getSelection().selectAllChildren(tmp); - // クリップボードにコピー - const result = document.execCommand("copy"); + // クリップボードにコピー + const result = document.execCommand("copy"); - // 要素削除 - document.body.removeChild(tmp); + // 要素削除 + document.body.removeChild(tmp); - return result; + return result; }; diff --git a/fe_calckey/frontend/client/src/scripts/device-kind.ts b/fe_calckey/frontend/client/src/scripts/device-kind.ts index 8c62924..c53d824 100644 --- a/fe_calckey/frontend/client/src/scripts/device-kind.ts +++ b/fe_calckey/frontend/client/src/scripts/device-kind.ts @@ -2,14 +2,14 @@ import { defaultStore } from "@/store"; const ua = navigator.userAgent.toLowerCase(); const isTablet = - /ipad/.test(ua) || - (/mobile|iphone|android/.test(ua) && window.innerWidth > 700); + /ipad/.test(ua) || + (/mobile|iphone|android/.test(ua) && window.innerWidth > 700); const isSmartphone = !isTablet && /mobile|iphone|android/.test(ua); export const deviceKind = defaultStore.state.overridedDeviceKind - ? defaultStore.state.overridedDeviceKind - : isSmartphone - ? "smartphone" - : isTablet - ? "tablet" - : "desktop"; + ? defaultStore.state.overridedDeviceKind + : isSmartphone + ? "smartphone" + : isTablet + ? "tablet" + : "desktop"; diff --git a/fe_calckey/frontend/client/src/scripts/emojilist.ts b/fe_calckey/frontend/client/src/scripts/emojilist.ts index a5ad7e3..ed99e68 100644 --- a/fe_calckey/frontend/client/src/scripts/emojilist.ts +++ b/fe_calckey/frontend/client/src/scripts/emojilist.ts @@ -4,121 +4,122 @@ import keywordSet from "emojilib"; import { defaultStore } from "@/store"; export type UnicodeEmojiDef = { - emoji: string; - category: typeof unicodeEmojiCategories[number]; - skin_tone_support: boolean; - slug: string; - keywords?: string[]; + emoji: string; + category: (typeof unicodeEmojiCategories)[number]; + skin_tone_support: boolean; + slug: string; + keywords?: string[]; }; export const unicodeEmojiCategories = [ - "emotion", - "people", - "animals_and_nature", - "food_and_drink", - "activity", - "travel_and_places", - "objects", - "symbols", - "flags", + "emotion", + "people", + "animals_and_nature", + "food_and_drink", + "activity", + "travel_and_places", + "objects", + "symbols", + "flags", ] as const; export const categoryMapping = { - "Smileys & Emotion": "emotion", - "People & Body": "people", - "Animals & Nature": "animals_and_nature", - "Food & Drink": "food_and_drink", - Activities: "activity", - "Travel & Places": "travel_and_places", - Objects: "objects", - Symbols: "symbols", - Flags: "flags", + "Smileys & Emotion": "emotion", + "People & Body": "people", + "Animals & Nature": "animals_and_nature", + "Food & Drink": "food_and_drink", + Activities: "activity", + "Travel & Places": "travel_and_places", + Objects: "objects", + Symbols: "symbols", + Flags: "flags", } as const; export const unicodeEmojiSkinTones = [ - "#FFDC5E", - "#F7DFCF", - "#F3D3A3", - "#D6AE89", - "#B17F56", - "#7D523C", + "#FFDC5E", + "#F7DFCF", + "#F3D3A3", + "#D6AE89", + "#B17F56", + "#7D523C", ]; export function addSkinTone(emoji: string, skinTone?: number) { - const chosenSkinTone = skinTone || defaultStore.state.reactionPickerSkinTone; - const skinToneModifiers = [ - "", - emojiComponents.light_skin_tone, - emojiComponents.medium_light_skin_tone, - emojiComponents.medium_skin_tone, - emojiComponents.medium_dark_skin_tone, - emojiComponents.dark_skin_tone, - ]; - return emoji + (skinToneModifiers[chosenSkinTone - 1] || ""); + const chosenSkinTone = + skinTone || defaultStore.state.reactionPickerSkinTone; + const skinToneModifiers = [ + "", + emojiComponents.light_skin_tone, + emojiComponents.medium_light_skin_tone, + emojiComponents.medium_skin_tone, + emojiComponents.medium_dark_skin_tone, + emojiComponents.dark_skin_tone, + ]; + return emoji + (skinToneModifiers[chosenSkinTone - 1] || ""); } const unicodeFifteenEmojis = [ - "🫨", - "🩷", - "🩵", - "🩶", - "🫷", - "🫸", - "🫎", - "🫏", - "🪽", - "🐦‍⬛", - "🪿", - "🪼", - "🪻", - "🫚", - "🫛", - "🪭", - "🪮", - "🪇", - "🪈", - "🪯", - "🛜", + "🫨", + "🩷", + "🩵", + "🩶", + "🫷", + "🫸", + "🫎", + "🫏", + "🪽", + "🐦‍⬛", + "🪿", + "🪼", + "🪻", + "🫚", + "🫛", + "🪭", + "🪮", + "🪇", + "🪈", + "🪯", + "🛜", ]; const newData = {}; Object.keys(data).forEach((originalCategory) => { - const newCategory = categoryMapping[originalCategory]; - if (newCategory) { - newData[newCategory] = newData[newCategory] || []; - Object.keys(data[originalCategory]).forEach((emojiIndex) => { - const emojiObj = { ...data[originalCategory][emojiIndex] }; - if (unicodeFifteenEmojis.includes(emojiObj.emoji)) { - return; - } - emojiObj.category = newCategory; - emojiObj.keywords = keywordSet[emojiObj.emoji]; - newData[newCategory].push(emojiObj); - }); - } + const newCategory = categoryMapping[originalCategory]; + if (newCategory) { + newData[newCategory] = newData[newCategory] || []; + Object.keys(data[originalCategory]).forEach((emojiIndex) => { + const emojiObj = { ...data[originalCategory][emojiIndex] }; + if (unicodeFifteenEmojis.includes(emojiObj.emoji)) { + return; + } + emojiObj.category = newCategory; + emojiObj.keywords = keywordSet[emojiObj.emoji]; + newData[newCategory].push(emojiObj); + }); + } }); export const emojilist: UnicodeEmojiDef[] = Object.keys(newData).reduce( - (acc, category) => { - const categoryItems = newData[category].map((item) => { - return { - emoji: item.emoji, - slug: item.slug, - category: item.category, - skin_tone_support: item.skin_tone_support || false, - keywords: item.keywords || [], - }; - }); - return acc.concat(categoryItems); - }, - [], + (acc, category) => { + const categoryItems = newData[category].map((item) => { + return { + emoji: item.emoji, + slug: item.slug, + category: item.category, + skin_tone_support: item.skin_tone_support || false, + keywords: item.keywords || [], + }; + }); + return acc.concat(categoryItems); + }, + [] ); export function getNicelyLabeledCategory(internalName) { - return ( - Object.keys(categoryMapping).find( - (key) => categoryMapping[key] === internalName, - ) || internalName - ); + return ( + Object.keys(categoryMapping).find( + (key) => categoryMapping[key] === internalName + ) || internalName + ); } diff --git a/fe_calckey/frontend/client/src/scripts/extract-avg-color-from-blurhash.ts b/fe_calckey/frontend/client/src/scripts/extract-avg-color-from-blurhash.ts index 9f758cd..245fdc1 100644 --- a/fe_calckey/frontend/client/src/scripts/extract-avg-color-from-blurhash.ts +++ b/fe_calckey/frontend/client/src/scripts/extract-avg-color-from-blurhash.ts @@ -1,13 +1,13 @@ export function extractAvgColorFromBlurhash(hash: string) { - return typeof hash === "string" - ? `#${[...hash.slice(2, 6)] - .map((x) => - "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz#$%*+,-.:;=?@[]^_{|}~".indexOf( - x, - ), - ) - .reduce((a, c) => a * 83 + c, 0) - .toString(16) - .padStart(6, "0")}` - : undefined; + return typeof hash === "string" + ? `#${[...hash.slice(2, 6)] + .map((x) => + "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz#$%*+,-.:;=?@[]^_{|}~".indexOf( + x + ) + ) + .reduce((a, c) => a * 83 + c, 0) + .toString(16) + .padStart(6, "0")}` + : undefined; } diff --git a/fe_calckey/frontend/client/src/scripts/extract-mentions.ts b/fe_calckey/frontend/client/src/scripts/extract-mentions.ts index 259f78e..66a0208 100644 --- a/fe_calckey/frontend/client/src/scripts/extract-mentions.ts +++ b/fe_calckey/frontend/client/src/scripts/extract-mentions.ts @@ -3,11 +3,11 @@ import * as mfm from "mfm-js"; export function extractMentions( - nodes: mfm.MfmNode[], + nodes: mfm.MfmNode[] ): mfm.MfmMention["props"][] { - // TODO: 重複を削除 - const mentionNodes = mfm.extract(nodes, (node) => node.type === "mention"); - const mentions = mentionNodes.map((x) => x.props); + // TODO: 重複を削除 + const mentionNodes = mfm.extract(nodes, (node) => node.type === "mention"); + const mentions = mentionNodes.map((x) => x.props); - return mentions; + return mentions; } diff --git a/fe_calckey/frontend/client/src/scripts/extract-mfm.ts b/fe_calckey/frontend/client/src/scripts/extract-mfm.ts index c62547c..f2885a7 100644 --- a/fe_calckey/frontend/client/src/scripts/extract-mfm.ts +++ b/fe_calckey/frontend/client/src/scripts/extract-mfm.ts @@ -1,22 +1,22 @@ import * as mfm from "mfm-js"; const animatedMfm = [ - "tada", - "jelly", - "twitch", - "shake", - "spin", - "jump", - "bounce", - "rainbow", - "fade", + "tada", + "jelly", + "twitch", + "shake", + "spin", + "jump", + "bounce", + "rainbow", + "fade", ]; export function extractMfmWithAnimation(nodes: mfm.MfmNode[]): string[] { - const mfmNodes = mfm.extract(nodes, (node) => { - return node.type === "fn" && animatedMfm.indexOf(node.props.name) > -1; - }); - const mfms = mfmNodes.map((x) => x.props.fn); + const mfmNodes = mfm.extract(nodes, (node) => { + return node.type === "fn" && animatedMfm.indexOf(node.props.name) > -1; + }); + const mfms = mfmNodes.map((x) => x.props.fn); - return mfms; + return mfms; } diff --git a/fe_calckey/frontend/client/src/scripts/extract-url-from-mfm.ts b/fe_calckey/frontend/client/src/scripts/extract-url-from-mfm.ts index 0c580b6..c3940fb 100644 --- a/fe_calckey/frontend/client/src/scripts/extract-url-from-mfm.ts +++ b/fe_calckey/frontend/client/src/scripts/extract-url-from-mfm.ts @@ -6,21 +6,21 @@ import { unique } from "@/scripts/array"; const removeHash = (x: string) => x.replace(/#[^#]*$/, ""); export function extractUrlFromMfm( - nodes: mfm.MfmNode[], - respectSilentFlag = true, + nodes: mfm.MfmNode[], + respectSilentFlag = true ): string[] { - const urlNodes = mfm.extract(nodes, (node) => { - return ( - node.type === "url" || - (node.type === "link" && !(respectSilentFlag && node.props.silent)) - ); - }); - const urls: string[] = unique(urlNodes.map((x) => x.props.url)); + const urlNodes = mfm.extract(nodes, (node) => { + return ( + node.type === "url" || + (node.type === "link" && !(respectSilentFlag && node.props.silent)) + ); + }); + const urls: string[] = unique(urlNodes.map((x) => x.props.url)); - return urls.reduce((array, url) => { - const urlWithoutHash = removeHash(url); - if (!array.map((x) => removeHash(x)).includes(urlWithoutHash)) - array.push(url); - return array; - }, [] as string[]); + return urls.reduce((array, url) => { + const urlWithoutHash = removeHash(url); + if (!array.map((x) => removeHash(x)).includes(urlWithoutHash)) + array.push(url); + return array; + }, [] as string[]); } diff --git a/fe_calckey/frontend/client/src/scripts/focus.ts b/fe_calckey/frontend/client/src/scripts/focus.ts index 878132f..2bee4c3 100644 --- a/fe_calckey/frontend/client/src/scripts/focus.ts +++ b/fe_calckey/frontend/client/src/scripts/focus.ts @@ -1,27 +1,27 @@ export function focusPrev(el: Element | null, self = false, scroll = true) { - if (el == null) return; - if (!self) el = el.previousElementSibling; - if (el) { - if (el.hasAttribute("tabindex")) { - (el as HTMLElement).focus({ - preventScroll: !scroll, - }); - } else { - focusPrev(el.previousElementSibling, true); - } - } + if (el == null) return; + if (!self) el = el.previousElementSibling; + if (el) { + if (el.hasAttribute("tabindex")) { + (el as HTMLElement).focus({ + preventScroll: !scroll, + }); + } else { + focusPrev(el.previousElementSibling, true); + } + } } export function focusNext(el: Element | null, self = false, scroll = true) { - if (el == null) return; - if (!self) el = el.nextElementSibling; - if (el) { - if (el.hasAttribute("tabindex")) { - (el as HTMLElement).focus({ - preventScroll: !scroll, - }); - } else { - focusPrev(el.nextElementSibling, true); - } - } + if (el == null) return; + if (!self) el = el.nextElementSibling; + if (el) { + if (el.hasAttribute("tabindex")) { + (el as HTMLElement).focus({ + preventScroll: !scroll, + }); + } else { + focusPrev(el.nextElementSibling, true); + } + } } diff --git a/fe_calckey/frontend/client/src/scripts/form.ts b/fe_calckey/frontend/client/src/scripts/form.ts index dc7393d..0caf3ec 100644 --- a/fe_calckey/frontend/client/src/scripts/form.ts +++ b/fe_calckey/frontend/client/src/scripts/form.ts @@ -1,72 +1,72 @@ export type FormItem = - | { - label?: string; - type: "string"; - default: string | null; - hidden?: boolean; - multiline?: boolean; - } - | { - label?: string; - type: "number"; - default: number | null; - hidden?: boolean; - step?: number; - } - | { - label?: string; - type: "boolean"; - default: boolean | null; - hidden?: boolean; - } - | { - label?: string; - type: "enum"; - default: string | null; - hidden?: boolean; - enum: string[]; - } - | { - label?: string; - type: "radio"; - default: unknown | null; - hidden?: boolean; - options: { - label: string; - value: unknown; - }[]; - } - | { - label?: string; - type: "object"; - default: Record | null; - hidden: true; - } - | { - label?: string; - type: "array"; - default: unknown[] | null; - hidden: true; - }; + | { + label?: string; + type: "string"; + default: string | null; + hidden?: boolean; + multiline?: boolean; + } + | { + label?: string; + type: "number"; + default: number | null; + hidden?: boolean; + step?: number; + } + | { + label?: string; + type: "boolean"; + default: boolean | null; + hidden?: boolean; + } + | { + label?: string; + type: "enum"; + default: string | null; + hidden?: boolean; + enum: string[]; + } + | { + label?: string; + type: "radio"; + default: unknown | null; + hidden?: boolean; + options: { + label: string; + value: unknown; + }[]; + } + | { + label?: string; + type: "object"; + default: Record | null; + hidden: true; + } + | { + label?: string; + type: "array"; + default: unknown[] | null; + hidden: true; + }; export type Form = Record; type GetItemType = Item["type"] extends "string" - ? string - : Item["type"] extends "number" - ? number - : Item["type"] extends "boolean" - ? boolean - : Item["type"] extends "radio" - ? unknown - : Item["type"] extends "enum" - ? string - : Item["type"] extends "array" - ? unknown[] - : Item["type"] extends "object" - ? Record - : never; + ? string + : Item["type"] extends "number" + ? number + : Item["type"] extends "boolean" + ? boolean + : Item["type"] extends "radio" + ? unknown + : Item["type"] extends "enum" + ? string + : Item["type"] extends "array" + ? unknown[] + : Item["type"] extends "object" + ? Record + : never; export type GetFormResultType = { - [P in keyof F]: GetItemType; + [P in keyof F]: GetItemType; }; diff --git a/fe_calckey/frontend/client/src/scripts/format-time-string.ts b/fe_calckey/frontend/client/src/scripts/format-time-string.ts index f2f0d70..844b58a 100644 --- a/fe_calckey/frontend/client/src/scripts/format-time-string.ts +++ b/fe_calckey/frontend/client/src/scripts/format-time-string.ts @@ -1,81 +1,82 @@ const defaultLocaleStringFormats: { [index: string]: string } = { - weekday: "narrow", - era: "narrow", - year: "numeric", - month: "numeric", - day: "numeric", - hour: "numeric", - minute: "numeric", - second: "numeric", - timeZoneName: "short", + weekday: "narrow", + era: "narrow", + year: "numeric", + month: "numeric", + day: "numeric", + hour: "numeric", + minute: "numeric", + second: "numeric", + timeZoneName: "short", }; function formatLocaleString(date: Date, format: string): string { - return format.replace( - /\{\{(\w+)(:(\w+))?\}\}/g, - (match: string, kind: string, unused?, option?: string) => { - if ( - [ - "weekday", - "era", - "year", - "month", - "day", - "hour", - "minute", - "second", - "timeZoneName", - ].includes(kind) - ) { - return date.toLocaleString(window.navigator.language, { - [kind]: option ? option : defaultLocaleStringFormats[kind], - }); - } else { - return match; - } - }, - ); + return format.replace( + /\{\{(\w+)(:(\w+))?\}\}/g, + (match: string, kind: string, unused?, option?: string) => { + if ( + [ + "weekday", + "era", + "year", + "month", + "day", + "hour", + "minute", + "second", + "timeZoneName", + ].includes(kind) + ) { + return date.toLocaleString(window.navigator.language, { + [kind]: option ? option : defaultLocaleStringFormats[kind], + }); + } else { + return match; + } + } + ); } export function formatDateTimeString(date: Date, format: string): string { - return format - .replace(/yyyy/g, date.getFullYear().toString()) - .replace(/yy/g, date.getFullYear().toString().slice(-2)) - .replace( - /MMMM/g, - date.toLocaleString(window.navigator.language, { month: "long" }), - ) - .replace( - /MMM/g, - date.toLocaleString(window.navigator.language, { month: "short" }), - ) - .replace(/MM/g, `0${date.getMonth() + 1}`.slice(-2)) - .replace(/M/g, (date.getMonth() + 1).toString()) - .replace(/dd/g, `0${date.getDate()}`.slice(-2)) - .replace(/d/g, date.getDate().toString()) - .replace(/HH/g, `0${date.getHours()}`.slice(-2)) - .replace(/H/g, date.getHours().toString()) - .replace(/hh/g, `0${date.getHours() % 12 || 12}`.slice(-2)) - .replace(/h/g, (date.getHours() % 12 || 12).toString()) - .replace(/mm/g, `0${date.getMinutes()}`.slice(-2)) - .replace(/m/g, date.getMinutes().toString()) - .replace(/ss/g, `0${date.getSeconds()}`.slice(-2)) - .replace(/s/g, date.getSeconds().toString()) - .replace(/tt/g, date.getHours() >= 12 ? "PM" : "AM"); + return format + .replace(/yyyy/g, date.getFullYear().toString()) + .replace(/yy/g, date.getFullYear().toString().slice(-2)) + .replace( + /MMMM/g, + date.toLocaleString(window.navigator.language, { month: "long" }) + ) + .replace( + /MMM/g, + date.toLocaleString(window.navigator.language, { month: "short" }) + ) + .replace(/MM/g, `0${date.getMonth() + 1}`.slice(-2)) + .replace(/M/g, (date.getMonth() + 1).toString()) + .replace(/dd/g, `0${date.getDate()}`.slice(-2)) + .replace(/d/g, date.getDate().toString()) + .replace(/HH/g, `0${date.getHours()}`.slice(-2)) + .replace(/H/g, date.getHours().toString()) + .replace(/hh/g, `0${date.getHours() % 12 || 12}`.slice(-2)) + .replace(/h/g, (date.getHours() % 12 || 12).toString()) + .replace(/mm/g, `0${date.getMinutes()}`.slice(-2)) + .replace(/m/g, date.getMinutes().toString()) + .replace(/ss/g, `0${date.getSeconds()}`.slice(-2)) + .replace(/s/g, date.getSeconds().toString()) + .replace(/tt/g, date.getHours() >= 12 ? "PM" : "AM"); } export function formatTimeString(date: Date, format: string): string { - return format.replace( - /\[(([^\[]|\[\])*)\]|(([yMdHhmst])\4{0,3})/g, - ( - match: string, - localeformat?: string, - unused?, - datetimeformat?: string, - ) => { - if (localeformat) return formatLocaleString(date, localeformat); - if (datetimeformat) return formatDateTimeString(date, datetimeformat); - return match; - }, - ); + return format.replace( + /\[(([^\[]|\[\])*)\]|(([yMdHhmst])\4{0,3})/g, + ( + match: string, + localeformat?: string, + unused?, + datetimeformat?: string + ) => { + if (localeformat) return formatLocaleString(date, localeformat); + if (datetimeformat) + return formatDateTimeString(date, datetimeformat); + return match; + } + ); } diff --git a/fe_calckey/frontend/client/src/scripts/gen-search-query.ts b/fe_calckey/frontend/client/src/scripts/gen-search-query.ts index 822572d..95f0bf0 100644 --- a/fe_calckey/frontend/client/src/scripts/gen-search-query.ts +++ b/fe_calckey/frontend/client/src/scripts/gen-search-query.ts @@ -2,37 +2,37 @@ import * as Acct from "calckey-js/built/acct"; import { host as localHost } from "@/config"; export async function genSearchQuery(v: any, q: string) { - let host: string; - let userId: string; - if (q.split(" ").some((x) => x.startsWith("@"))) { - for (const at of q - .split(" ") - .filter((x) => x.startsWith("@")) - .map((x) => x.substr(1))) { - if (at.includes(".")) { - if (at === localHost || at === ".") { - host = null; - } else { - host = at; - } - } else { - const user = await v.os - .api("users/show", Acct.parse(at)) - .catch((x) => null); - if (user) { - userId = user.id; - } else { - // todo: show error - } - } - } - } - return { - query: q - .split(" ") - .filter((x) => !(x.startsWith("/") || x.startsWith("@"))) - .join(" "), - host: host, - userId: userId, - }; + let host: string; + let userId: string; + if (q.split(" ").some((x) => x.startsWith("@"))) { + for (const at of q + .split(" ") + .filter((x) => x.startsWith("@")) + .map((x) => x.substr(1))) { + if (at.includes(".")) { + if (at === localHost || at === ".") { + host = null; + } else { + host = at; + } + } else { + const user = await v.os + .api("users/show", Acct.parse(at)) + .catch((x) => null); + if (user) { + userId = user.id; + } else { + // todo: show error + } + } + } + } + return { + query: q + .split(" ") + .filter((x) => !(x.startsWith("/") || x.startsWith("@"))) + .join(" "), + host: host, + userId: userId, + }; } diff --git a/fe_calckey/frontend/client/src/scripts/get-account-from-id.ts b/fe_calckey/frontend/client/src/scripts/get-account-from-id.ts index c46cd13..9e47efa 100644 --- a/fe_calckey/frontend/client/src/scripts/get-account-from-id.ts +++ b/fe_calckey/frontend/client/src/scripts/get-account-from-id.ts @@ -1,7 +1,7 @@ import { get } from "@/scripts/idb-proxy"; export async function getAccountFromId(id: string) { - const accounts = (await get("accounts")) as { token: string; id: string }[]; - if (!accounts) console.log("Accounts are not recorded"); - return accounts.find((account) => account.id === id); + const accounts = (await get("accounts")) as { token: string; id: string }[]; + if (!accounts) console.log("Accounts are not recorded"); + return accounts.find((account) => account.id === id); } diff --git a/fe_calckey/frontend/client/src/scripts/get-note-menu.ts b/fe_calckey/frontend/client/src/scripts/get-note-menu.ts index 51b2199..f744608 100644 --- a/fe_calckey/frontend/client/src/scripts/get-note-menu.ts +++ b/fe_calckey/frontend/client/src/scripts/get-note-menu.ts @@ -11,368 +11,386 @@ import { shareAvailable } from "@/scripts/share-available"; import { getUserMenu } from "@/scripts/get-user-menu"; export function getNoteMenu(props: { - note: misskey.entities.Note; - menuButton: Ref; - translation: Ref; - translating: Ref; - isDeleted: Ref; - currentClipPage?: Ref; + note: misskey.entities.Note; + menuButton: Ref; + translation: Ref; + translating: Ref; + isDeleted: Ref; + currentClipPage?: Ref; }) { - const isRenote = - props.note.renote != null && - props.note.text == null && - props.note.fileIds.length === 0 && - props.note.poll == null; + const isRenote = + props.note.renote != null && + props.note.text == null && + props.note.fileIds.length === 0 && + props.note.poll == null; - const appearNote = isRenote - ? (props.note.renote as misskey.entities.Note) - : props.note; + const appearNote = isRenote + ? (props.note.renote as misskey.entities.Note) + : props.note; - function del(): void { - os.confirm({ - type: "warning", - text: i18n.ts.noteDeleteConfirm, - }).then(({ canceled }) => { - if (canceled) return; + function del(): void { + os.confirm({ + type: "warning", + text: i18n.ts.noteDeleteConfirm, + }).then(({ canceled }) => { + if (canceled) return; - os.api("notes/delete", { - noteId: appearNote.id, - }); - }); - } + os.api("notes/delete", { + noteId: appearNote.id, + }); + }); + } - function delEdit(): void { - os.confirm({ - type: "warning", - text: i18n.ts.deleteAndEditConfirm, - }).then(({ canceled }) => { - if (canceled) return; + function delEdit(): void { + os.confirm({ + type: "warning", + text: i18n.ts.deleteAndEditConfirm, + }).then(({ canceled }) => { + if (canceled) return; - os.api("notes/delete", { - noteId: appearNote.id, - }); + os.api("notes/delete", { + noteId: appearNote.id, + }); - os.post({ - initialNote: appearNote, - renote: appearNote.renote, - reply: appearNote.reply, - }); - }); - } + os.post({ + initialNote: appearNote, + renote: appearNote.renote, + reply: appearNote.reply, + }); + }); + } - function edit(): void { - os.post({ - initialNote: appearNote, - renote: appearNote.renote, - reply: appearNote.reply, - editId: appearNote.id, - }); - } + function edit(): void { + os.post({ + initialNote: appearNote, + renote: appearNote.renote, + reply: appearNote.reply, + editId: appearNote.id, + }); + } - function toggleFavorite(favorite: boolean): void { - os.apiWithDialog( - favorite ? "notes/favorites/create" : "notes/favorites/delete", - { - noteId: appearNote.id, - }, - ); - } + function toggleFavorite(favorite: boolean): void { + os.apiWithDialog( + favorite ? "notes/favorites/create" : "notes/favorites/delete", + { + noteId: appearNote.id, + } + ); + } - function toggleWatch(watch: boolean): void { - os.apiWithDialog( - watch ? "notes/watching/create" : "notes/watching/delete", - { - noteId: appearNote.id, - }, - ); - } + function toggleWatch(watch: boolean): void { + os.apiWithDialog( + watch ? "notes/watching/create" : "notes/watching/delete", + { + noteId: appearNote.id, + } + ); + } - function toggleThreadMute(mute: boolean): void { - os.apiWithDialog( - mute ? "notes/thread-muting/create" : "notes/thread-muting/delete", - { - noteId: appearNote.id, - }, - ); - } + function toggleThreadMute(mute: boolean): void { + os.apiWithDialog( + mute ? "notes/thread-muting/create" : "notes/thread-muting/delete", + { + noteId: appearNote.id, + } + ); + } - function copyContent(): void { - copyToClipboard(appearNote.text); - os.success(); - } + function copyContent(): void { + copyToClipboard(appearNote.text); + os.success(); + } - function copyLink(): void { - copyToClipboard(`${url}/notes/${appearNote.id}`); - os.success(); - } + function copyLink(): void { + copyToClipboard(`${url}/notes/${appearNote.id}`); + os.success(); + } - function copyOriginal(): void { - copyToClipboard(appearNote.url ?? appearNote.uri); - os.success(); - } + function copyOriginal(): void { + copyToClipboard(appearNote.url ?? appearNote.uri); + os.success(); + } - function togglePin(pin: boolean): void { - os.apiWithDialog( - pin ? "i/pin" : "i/unpin", - { - noteId: appearNote.id, - }, - undefined, - ).catch((res) => { - if (res.id === "72dab508-c64d-498f-8740-a8eec1ba385a") { - os.alert({ - type: "error", - text: i18n.ts.pinLimitExceeded, - }); - } - }); - } + function togglePin(pin: boolean): void { + os.apiWithDialog( + pin ? "i/pin" : "i/unpin", + { + noteId: appearNote.id, + }, + undefined + ).catch((res) => { + if (res.id === "72dab508-c64d-498f-8740-a8eec1ba385a") { + os.alert({ + type: "error", + text: i18n.ts.pinLimitExceeded, + }); + } + }); + } - async function clip(): Promise { - const clips = await os.api("clips/list"); - os.popupMenu( - [ - { - icon: "ph-plus ph-bold ph-lg", - text: i18n.ts.createNew, - action: async () => { - const { canceled, result } = await os.form(i18n.ts.createNewClip, { - name: { - type: "string", - label: i18n.ts.name, - }, - description: { - type: "string", - required: false, - multiline: true, - label: i18n.ts.description, - }, - isPublic: { - type: "boolean", - label: i18n.ts.public, - default: false, - }, - }); - if (canceled) return; + async function clip(): Promise { + const clips = await os.api("clips/list"); + os.popupMenu( + [ + { + icon: "ph-plus ph-bold ph-lg", + text: i18n.ts.createNew, + action: async () => { + const { canceled, result } = await os.form( + i18n.ts.createNewClip, + { + name: { + type: "string", + label: i18n.ts.name, + }, + description: { + type: "string", + required: false, + multiline: true, + label: i18n.ts.description, + }, + isPublic: { + type: "boolean", + label: i18n.ts.public, + default: false, + }, + } + ); + if (canceled) return; - const clip = await os.apiWithDialog("clips/create", result); + const clip = await os.apiWithDialog( + "clips/create", + result + ); - os.apiWithDialog("clips/add-note", { - clipId: clip.id, - noteId: appearNote.id, - }); - }, - }, - null, - ...clips.map((clip) => ({ - text: clip.name, - action: () => { - os.promiseDialog( - os.api("clips/add-note", { - clipId: clip.id, - noteId: appearNote.id, - }), - null, - async (err) => { - if (err.id === "734806c4-542c-463a-9311-15c512803965") { - const confirm = await os.confirm({ - type: "warning", - text: i18n.t("confirmToUnclipAlreadyClippedNote", { - name: clip.name, - }), - }); - if (!confirm.canceled) { - os.apiWithDialog("clips/remove-note", { - clipId: clip.id, - noteId: appearNote.id, - }); - if (props.currentClipPage?.value.id === clip.id) - props.isDeleted.value = true; - } - } else { - os.alert({ - type: "error", - text: err.message + "\n" + err.id, - }); - } - }, - ); - }, - })), - ], - props.menuButton.value, - {}, - ).then(focus); - } + os.apiWithDialog("clips/add-note", { + clipId: clip.id, + noteId: appearNote.id, + }); + }, + }, + null, + ...clips.map((clip) => ({ + text: clip.name, + action: () => { + os.promiseDialog( + os.api("clips/add-note", { + clipId: clip.id, + noteId: appearNote.id, + }), + null, + async (err) => { + if ( + err.id === + "734806c4-542c-463a-9311-15c512803965" + ) { + const confirm = await os.confirm({ + type: "warning", + text: i18n.t( + "confirmToUnclipAlreadyClippedNote", + { + name: clip.name, + } + ), + }); + if (!confirm.canceled) { + os.apiWithDialog("clips/remove-note", { + clipId: clip.id, + noteId: appearNote.id, + }); + if ( + props.currentClipPage?.value.id === + clip.id + ) + props.isDeleted.value = true; + } + } else { + os.alert({ + type: "error", + text: err.message + "\n" + err.id, + }); + } + } + ); + }, + })), + ], + props.menuButton.value, + {} + ).then(focus); + } - async function unclip(): Promise { - os.apiWithDialog("clips/remove-note", { - clipId: props.currentClipPage.value.id, - noteId: appearNote.id, - }); - props.isDeleted.value = true; - } + async function unclip(): Promise { + os.apiWithDialog("clips/remove-note", { + clipId: props.currentClipPage.value.id, + noteId: appearNote.id, + }); + props.isDeleted.value = true; + } - async function promote(): Promise { - const { canceled, result: days } = await os.inputNumber({ - title: i18n.ts.numberOfDays, - }); + async function promote(): Promise { + const { canceled, result: days } = await os.inputNumber({ + title: i18n.ts.numberOfDays, + }); - if (canceled) return; + if (canceled) return; - os.apiWithDialog("admin/promo/create", { - noteId: appearNote.id, - expiresAt: Date.now() + 86400000 * days, - }); - } + os.apiWithDialog("admin/promo/create", { + noteId: appearNote.id, + expiresAt: Date.now() + 86400000 * days, + }); + } - function share(): void { - navigator.share({ - title: i18n.t("noteOf", { user: appearNote.user.name }), - text: appearNote.text, - url: `${url}/notes/${appearNote.id}`, - }); - } + function share(): void { + navigator.share({ + title: i18n.t("noteOf", { user: appearNote.user.name }), + text: appearNote.text, + url: `${url}/notes/${appearNote.id}`, + }); + } - async function translate(): Promise { - if (props.translation.value != null) return; - props.translating.value = true; - const res = await os.api("notes/translate", { - noteId: appearNote.id, - targetLang: localStorage.getItem("lang") || navigator.language, - }); - props.translating.value = false; - props.translation.value = res; - } + async function translate(): Promise { + if (props.translation.value != null) return; + props.translating.value = true; + const res = await os.api("notes/translate", { + noteId: appearNote.id, + targetLang: localStorage.getItem("lang") || navigator.language, + }); + props.translating.value = false; + props.translation.value = res; + } - let menu; - if ($i) { - const statePromise = os.api("notes/state", { - noteId: appearNote.id, - }); + let menu; + if ($i) { + const statePromise = os.api("notes/state", { + noteId: appearNote.id, + }); - const isAppearAuthor = appearNote.userId === $i.id; - const isModerator = $i.isAdmin || $i.isModerator; + const isAppearAuthor = appearNote.userId === $i.id; + const isModerator = $i.isAdmin || $i.isModerator; - menu = [ - ...(props.currentClipPage?.value.userId === $i.id - ? [ - { - icon: "ph-minus-circle ph-bold ph-lg", - text: i18n.ts.unclip, - danger: true, - action: unclip, - }, - null, - ] - : []), - statePromise.then((state) => - state?.isFavorited - ? { - icon: "ph-bookmark-simple ph-bold ph-lg", - text: i18n.ts.unfavorite, - action: () => toggleFavorite(false), - } - : { - icon: "ph-bookmark-simple ph-bold ph-lg", - text: i18n.ts.favorite, - action: () => toggleFavorite(true), - }, - ), - { - icon: "ph-paperclip ph-bold ph-lg", - text: i18n.ts.clip, - action: () => clip(), - }, - !isAppearAuthor - ? statePromise.then((state) => - state.isWatching - ? { - icon: "ph-eye-slash ph-bold ph-lg", - text: i18n.ts.unwatch, - action: () => toggleWatch(false), - } - : { - icon: "ph-eye ph-bold ph-lg", - text: i18n.ts.watch, - action: () => toggleWatch(true), - }, - ) - : undefined, - statePromise.then((state) => - state.isMutedThread - ? { - icon: "ph-speaker-x ph-bold ph-lg", - text: i18n.ts.unmuteThread, - action: () => toggleThreadMute(false), - } - : { - icon: "ph-speaker-x ph-bold ph-lg", - text: i18n.ts.muteThread, - action: () => toggleThreadMute(true), - }, - ), - isAppearAuthor - ? ($i.pinnedNoteIds || []).includes(appearNote.id) - ? { - icon: "ph-push-pin ph-bold ph-lg", - text: i18n.ts.unpin, - action: () => togglePin(false), - } - : { - icon: "ph-push-pin ph-bold ph-lg", - text: i18n.ts.pin, - action: () => togglePin(true), - } - : undefined, - instance.translatorAvailable - ? { - icon: "ph-translate ph-bold ph-lg", - text: i18n.ts.translate, - action: translate, - } - : undefined, - appearNote.url || appearNote.uri - ? { - icon: "ph-arrow-square-out ph-bold ph-lg", - text: i18n.ts.showOnRemote, - action: () => { - window.open(appearNote.url || appearNote.uri, "_blank"); - }, - } - : undefined, - { - type: "parent", - icon: "ph-share-network ph-bold ph-lg", - text: i18n.ts.share, - children: [ - { - icon: "ph-clipboard-text ph-bold ph-lg", - text: i18n.ts.copyContent, - action: copyContent, - }, - { - icon: "ph-link-simple ph-bold ph-lg", - text: i18n.ts.copyLink, - action: copyLink, - }, - appearNote.url || appearNote.uri - ? { - icon: "ph-link-simple ph-bold ph-lg", - text: `${i18n.ts.copyLink} (${i18n.ts.remote})`, - action: copyOriginal, - } - : undefined, - shareAvailable() - ? { - icon: "ph-share-network ph-bold ph-lg", - text: i18n.ts.share, - action: share, - } - : undefined, - ], - }, - /* + menu = [ + ...(props.currentClipPage?.value.userId === $i.id + ? [ + { + icon: "ph-minus-circle ph-bold ph-lg", + text: i18n.ts.unclip, + danger: true, + action: unclip, + }, + null, + ] + : []), + statePromise.then((state) => + state?.isFavorited + ? { + icon: "ph-bookmark-simple ph-bold ph-lg", + text: i18n.ts.unfavorite, + action: () => toggleFavorite(false), + } + : { + icon: "ph-bookmark-simple ph-bold ph-lg", + text: i18n.ts.favorite, + action: () => toggleFavorite(true), + } + ), + { + icon: "ph-paperclip ph-bold ph-lg", + text: i18n.ts.clip, + action: () => clip(), + }, + !isAppearAuthor + ? statePromise.then((state) => + state.isWatching + ? { + icon: "ph-eye-slash ph-bold ph-lg", + text: i18n.ts.unwatch, + action: () => toggleWatch(false), + } + : { + icon: "ph-eye ph-bold ph-lg", + text: i18n.ts.watch, + action: () => toggleWatch(true), + } + ) + : undefined, + statePromise.then((state) => + state.isMutedThread + ? { + icon: "ph-speaker-x ph-bold ph-lg", + text: i18n.ts.unmuteThread, + action: () => toggleThreadMute(false), + } + : { + icon: "ph-speaker-x ph-bold ph-lg", + text: i18n.ts.muteThread, + action: () => toggleThreadMute(true), + } + ), + isAppearAuthor + ? ($i.pinnedNoteIds || []).includes(appearNote.id) + ? { + icon: "ph-push-pin ph-bold ph-lg", + text: i18n.ts.unpin, + action: () => togglePin(false), + } + : { + icon: "ph-push-pin ph-bold ph-lg", + text: i18n.ts.pin, + action: () => togglePin(true), + } + : undefined, + instance.translatorAvailable + ? { + icon: "ph-translate ph-bold ph-lg", + text: i18n.ts.translate, + action: translate, + } + : undefined, + appearNote.url || appearNote.uri + ? { + icon: "ph-arrow-square-out ph-bold ph-lg", + text: i18n.ts.showOnRemote, + action: () => { + window.open( + appearNote.url || appearNote.uri, + "_blank" + ); + }, + } + : undefined, + { + type: "parent", + icon: "ph-share-network ph-bold ph-lg", + text: i18n.ts.share, + children: [ + { + icon: "ph-clipboard-text ph-bold ph-lg", + text: i18n.ts.copyContent, + action: copyContent, + }, + { + icon: "ph-link-simple ph-bold ph-lg", + text: i18n.ts.copyLink, + action: copyLink, + }, + appearNote.url || appearNote.uri + ? { + icon: "ph-link-simple ph-bold ph-lg", + text: `${i18n.ts.copyLink} (${i18n.ts.remote})`, + action: copyOriginal, + } + : undefined, + shareAvailable() + ? { + icon: "ph-share-network ph-bold ph-lg", + text: i18n.ts.share, + action: share, + } + : undefined, + ], + }, + /* ...($i.isModerator || $i.isAdmin ? [ null, { @@ -382,113 +400,119 @@ export function getNoteMenu(props: { }] : [] ),*/ - null, - !isAppearAuthor - ? { - icon: "ph-warning-circle ph-bold ph-lg", - text: i18n.ts.reportAbuse, - action: () => { - const u = - appearNote.url || - appearNote.uri || - `${url}/notes/${appearNote.id}`; - os.popup( - defineAsyncComponent( - () => import("@/components/MkAbuseReportWindow.vue"), - ), - { - user: appearNote.user, - initialComment: `Note: ${u}\n-----\n`, - }, - {}, - "closed", - ); - }, - } - : undefined, - instance.features.postEditing && isAppearAuthor - ? { - icon: "ph-pencil-line ph-bold ph-lg", - text: i18n.ts.edit, - accent: true, - action: edit, - } - : undefined, - isAppearAuthor - ? { - icon: "ph-eraser ph-bold ph-lg", - text: i18n.ts.deleteAndEdit, - action: delEdit, - } - : undefined, - isAppearAuthor || isModerator - ? { - icon: "ph-trash ph-bold ph-lg", - text: i18n.ts.delete, - danger: true, - action: del, - } - : undefined, - !isAppearAuthor ? null : undefined, - !isAppearAuthor - ? { - type: "parent", - icon: "ph-user ph-bold ph-lg", - text: i18n.ts.user, - children: getUserMenu(appearNote.user), - } - : undefined, - ].filter((x) => x !== undefined); - } else { - menu = [ - appearNote.url || appearNote.uri - ? { - icon: "ph-arrow-square-out ph-bold ph-lg", - text: i18n.ts.showOnRemote, - action: () => { - window.open(appearNote.url || appearNote.uri, "_blank"); - }, - } - : undefined, - { - icon: "ph-clipboard-text ph-bold ph-lg", - text: i18n.ts.copyContent, - action: copyContent, - }, - { - icon: "ph-link-simple ph-bold ph-lg", - text: i18n.ts.copyLink, - action: copyLink, - }, - appearNote.url || appearNote.uri - ? { - icon: "ph-link-simple ph-bold ph-lg", - text: `${i18n.ts.copyLink} (${i18n.ts.remote})`, - action: copyOriginal, - } - : undefined, - shareAvailable() - ? { - icon: "ph-share-network ph-bold ph-lg", - text: i18n.ts.share, - action: share, - } - : undefined, - ].filter((x) => x !== undefined); - } + null, + !isAppearAuthor + ? { + icon: "ph-warning-circle ph-bold ph-lg", + text: i18n.ts.reportAbuse, + action: () => { + const u = + appearNote.url || + appearNote.uri || + `${url}/notes/${appearNote.id}`; + os.popup( + defineAsyncComponent( + () => + import( + "@/components/MkAbuseReportWindow.vue" + ) + ), + { + user: appearNote.user, + initialComment: `Note: ${u}\n-----\n`, + }, + {}, + "closed" + ); + }, + } + : undefined, + instance.features.postEditing && isAppearAuthor + ? { + icon: "ph-pencil-line ph-bold ph-lg", + text: i18n.ts.edit, + accent: true, + action: edit, + } + : undefined, + isAppearAuthor + ? { + icon: "ph-eraser ph-bold ph-lg", + text: i18n.ts.deleteAndEdit, + action: delEdit, + } + : undefined, + isAppearAuthor || isModerator + ? { + icon: "ph-trash ph-bold ph-lg", + text: i18n.ts.delete, + danger: true, + action: del, + } + : undefined, + !isAppearAuthor ? null : undefined, + !isAppearAuthor + ? { + type: "parent", + icon: "ph-user ph-bold ph-lg", + text: i18n.ts.user, + children: getUserMenu(appearNote.user), + } + : undefined, + ].filter((x) => x !== undefined); + } else { + menu = [ + appearNote.url || appearNote.uri + ? { + icon: "ph-arrow-square-out ph-bold ph-lg", + text: i18n.ts.showOnRemote, + action: () => { + window.open( + appearNote.url || appearNote.uri, + "_blank" + ); + }, + } + : undefined, + { + icon: "ph-clipboard-text ph-bold ph-lg", + text: i18n.ts.copyContent, + action: copyContent, + }, + { + icon: "ph-link-simple ph-bold ph-lg", + text: i18n.ts.copyLink, + action: copyLink, + }, + appearNote.url || appearNote.uri + ? { + icon: "ph-link-simple ph-bold ph-lg", + text: `${i18n.ts.copyLink} (${i18n.ts.remote})`, + action: copyOriginal, + } + : undefined, + shareAvailable() + ? { + icon: "ph-share-network ph-bold ph-lg", + text: i18n.ts.share, + action: share, + } + : undefined, + ].filter((x) => x !== undefined); + } - if (noteActions.length > 0) { - menu = menu.concat([ - null, - ...noteActions.map((action) => ({ - icon: "ph-plug ph-bold ph-lg", - text: action.title, - action: () => { - action.handler(appearNote); - }, - })), - ]); - } + if (noteActions.length > 0) { + menu = menu.concat([ + null, + ...noteActions.map((action) => ({ + icon: "ph-plug ph-bold ph-lg", + text: action.title, + action: () => { + action.handler(appearNote); + }, + })), + ]); + } - return menu; + return menu; } diff --git a/fe_calckey/frontend/client/src/scripts/get-note-summary.ts b/fe_calckey/frontend/client/src/scripts/get-note-summary.ts index bbbe4af..7c6063e 100644 --- a/fe_calckey/frontend/client/src/scripts/get-note-summary.ts +++ b/fe_calckey/frontend/client/src/scripts/get-note-summary.ts @@ -6,33 +6,33 @@ import { i18n } from "@/i18n"; * @param {*} note (packされた)投稿 */ export const getNoteSummary = (note: misskey.entities.Note): string => { - /* + /* if (note.deletedAt) { return `(${i18n.ts.deletedNote})`; } */ - let summary = ""; + let summary = ""; - // 本文 - if (note.cw != null) { - summary += note.cw; - } else { - summary += note.text ? note.text : ""; - } + // 本文 + if (note.cw != null) { + summary += note.cw; + } else { + summary += note.text ? note.text : ""; + } - // ファイルが添付されているとき - if ((note.files || []).length !== 0) { - const len = note.files?.length; - summary += ` 📎${len !== 1 ? ` (${len})` : ""}`; - } + // ファイルが添付されているとき + if ((note.files || []).length !== 0) { + const len = note.files?.length; + summary += ` 📎${len !== 1 ? ` (${len})` : ""}`; + } - // 投票が添付されているとき - if (note.poll) { - summary += " 📊"; - } + // 投票が添付されているとき + if (note.poll) { + summary += " 📊"; + } - /* + /* // 返信のとき if (note.replyId) { @@ -54,5 +54,5 @@ export const getNoteSummary = (note: misskey.entities.Note): string => { */ - return summary.trim(); + return summary.trim(); }; diff --git a/fe_calckey/frontend/client/src/scripts/get-static-image-url.ts b/fe_calckey/frontend/client/src/scripts/get-static-image-url.ts index 6560744..64041f1 100644 --- a/fe_calckey/frontend/client/src/scripts/get-static-image-url.ts +++ b/fe_calckey/frontend/client/src/scripts/get-static-image-url.ts @@ -2,15 +2,15 @@ import { url as instanceUrl } from "@/config"; import * as url from "@/scripts/url"; export function getStaticImageUrl(baseUrl: string): string { - const u = new URL(baseUrl); - if (u.href.startsWith(`${instanceUrl}/proxy/`)) { - // もう既にproxyっぽそうだったらsearchParams付けるだけ - u.searchParams.set("static", "1"); - return u.href; - } - const dummy = `${u.host}${u.pathname}`; // 拡張子がないとキャッシュしてくれないCDNがあるので - return `${instanceUrl}/proxy/${dummy}?${url.query({ - url: u.href, - static: "1", - })}`; + const u = new URL(baseUrl); + if (u.href.startsWith(`${instanceUrl}/proxy/`)) { + // もう既にproxyっぽそうだったらsearchParams付けるだけ + u.searchParams.set("static", "1"); + return u.href; + } + const dummy = `${u.host}${u.pathname}`; // 拡張子がないとキャッシュしてくれないCDNがあるので + return `${instanceUrl}/proxy/${dummy}?${url.query({ + url: u.href, + static: "1", + })}`; } diff --git a/fe_calckey/frontend/client/src/scripts/get-user-menu.ts b/fe_calckey/frontend/client/src/scripts/get-user-menu.ts index c39a9db..c2c9189 100644 --- a/fe_calckey/frontend/client/src/scripts/get-user-menu.ts +++ b/fe_calckey/frontend/client/src/scripts/get-user-menu.ts @@ -10,348 +10,352 @@ import { mainRouter } from "@/router"; import { Router } from "@/nirax"; export function getUserMenu(user, router: Router = mainRouter) { - const meId = $i ? $i.id : null; + const meId = $i ? $i.id : null; - async function pushList() { - const t = i18n.ts.selectList; // なぜか後で参照すると null になるので最初にメモリに確保しておく - const lists = await os.api("users/lists/list"); - if (lists.length === 0) { - os.alert({ - type: "error", - text: i18n.ts.youHaveNoLists, - }); - return; - } - const { canceled, result: listId } = await os.select({ - title: t, - items: lists.map((list) => ({ - value: list.id, - text: list.name, - })), - }); - if (canceled) return; - os.apiWithDialog("users/lists/push", { - listId: listId, - userId: user.id, - }); - } + async function pushList() { + const t = i18n.ts.selectList; // なぜか後で参照すると null になるので最初にメモリに確保しておく + const lists = await os.api("users/lists/list"); + if (lists.length === 0) { + os.alert({ + type: "error", + text: i18n.ts.youHaveNoLists, + }); + return; + } + const { canceled, result: listId } = await os.select({ + title: t, + items: lists.map((list) => ({ + value: list.id, + text: list.name, + })), + }); + if (canceled) return; + os.apiWithDialog("users/lists/push", { + listId: listId, + userId: user.id, + }); + } - async function inviteGroup() { - const groups = await os.api("users/groups/owned"); - if (groups.length === 0) { - os.alert({ - type: "error", - text: i18n.ts.youHaveNoGroups, - }); - return; - } - const { canceled, result: groupId } = await os.select({ - title: i18n.ts.group, - items: groups.map((group) => ({ - value: group.id, - text: group.name, - })), - }); - if (canceled) return; - os.apiWithDialog("users/groups/invite", { - groupId: groupId, - userId: user.id, - }); - } + async function inviteGroup() { + const groups = await os.api("users/groups/owned"); + if (groups.length === 0) { + os.alert({ + type: "error", + text: i18n.ts.youHaveNoGroups, + }); + return; + } + const { canceled, result: groupId } = await os.select({ + title: i18n.ts.group, + items: groups.map((group) => ({ + value: group.id, + text: group.name, + })), + }); + if (canceled) return; + os.apiWithDialog("users/groups/invite", { + groupId: groupId, + userId: user.id, + }); + } - async function toggleMute() { - if (user.isMuted) { - os.apiWithDialog("mute/delete", { - userId: user.id, - }).then(() => { - user.isMuted = false; - }); - } else { - const { canceled, result: period } = await os.select({ - title: i18n.ts.mutePeriod, - items: [ - { - value: "indefinitely", - text: i18n.ts.indefinitely, - }, - { - value: "tenMinutes", - text: i18n.ts.tenMinutes, - }, - { - value: "oneHour", - text: i18n.ts.oneHour, - }, - { - value: "oneDay", - text: i18n.ts.oneDay, - }, - { - value: "oneWeek", - text: i18n.ts.oneWeek, - }, - ], - default: "indefinitely", - }); - if (canceled) return; + async function toggleMute() { + if (user.isMuted) { + os.apiWithDialog("mute/delete", { + userId: user.id, + }).then(() => { + user.isMuted = false; + }); + } else { + const { canceled, result: period } = await os.select({ + title: i18n.ts.mutePeriod, + items: [ + { + value: "indefinitely", + text: i18n.ts.indefinitely, + }, + { + value: "tenMinutes", + text: i18n.ts.tenMinutes, + }, + { + value: "oneHour", + text: i18n.ts.oneHour, + }, + { + value: "oneDay", + text: i18n.ts.oneDay, + }, + { + value: "oneWeek", + text: i18n.ts.oneWeek, + }, + ], + default: "indefinitely", + }); + if (canceled) return; - const expiresAt = - period === "indefinitely" - ? null - : period === "tenMinutes" - ? Date.now() + 1000 * 60 * 10 - : period === "oneHour" - ? Date.now() + 1000 * 60 * 60 - : period === "oneDay" - ? Date.now() + 1000 * 60 * 60 * 24 - : period === "oneWeek" - ? Date.now() + 1000 * 60 * 60 * 24 * 7 - : null; + const expiresAt = + period === "indefinitely" + ? null + : period === "tenMinutes" + ? Date.now() + 1000 * 60 * 10 + : period === "oneHour" + ? Date.now() + 1000 * 60 * 60 + : period === "oneDay" + ? Date.now() + 1000 * 60 * 60 * 24 + : period === "oneWeek" + ? Date.now() + 1000 * 60 * 60 * 24 * 7 + : null; - os.apiWithDialog("mute/create", { - userId: user.id, - expiresAt, - }).then(() => { - user.isMuted = true; - }); - } - } + os.apiWithDialog("mute/create", { + userId: user.id, + expiresAt, + }).then(() => { + user.isMuted = true; + }); + } + } - async function toggleRenoteMute(): Promise { - os.apiWithDialog( - user.isRenoteMuted ? "renote-mute/delete" : "renote-mute/create", - { - userId: user.id, - }, - ).then(() => { - user.isRenoteMuted = !user.isRenoteMuted; - }); - } + async function toggleRenoteMute(): Promise { + os.apiWithDialog( + user.isRenoteMuted ? "renote-mute/delete" : "renote-mute/create", + { + userId: user.id, + } + ).then(() => { + user.isRenoteMuted = !user.isRenoteMuted; + }); + } - async function toggleBlock(): Promise { - if ( - !(await getConfirmed( - user.isBlocking ? i18n.ts.unblockConfirm : i18n.ts.blockConfirm, - )) - ) - return; + async function toggleBlock(): Promise { + if ( + !(await getConfirmed( + user.isBlocking ? i18n.ts.unblockConfirm : i18n.ts.blockConfirm + )) + ) + return; - await os.apiWithDialog( - user.isBlocking ? "blocking/delete" : "blocking/create", - { - userId: user.id, - }, - ); - user.isBlocking = !user.isBlocking; - await os.api(user.isBlocking ? "mute/create" : "mute/delete", { - userId: user.id, - }); - user.isMuted = user.isBlocking; - if (user.isBlocking) { - await os.api("following/delete", { - userId: user.id, - }); - user.isFollowing = false; - } - } + await os.apiWithDialog( + user.isBlocking ? "blocking/delete" : "blocking/create", + { + userId: user.id, + } + ); + user.isBlocking = !user.isBlocking; + await os.api(user.isBlocking ? "mute/create" : "mute/delete", { + userId: user.id, + }); + user.isMuted = user.isBlocking; + if (user.isBlocking) { + await os.api("following/delete", { + userId: user.id, + }); + user.isFollowing = false; + } + } - async function toggleSilence() { - if ( - !(await getConfirmed( - i18n.t(user.isSilenced ? "unsilenceConfirm" : "silenceConfirm"), - )) - ) - return; + async function toggleSilence() { + if ( + !(await getConfirmed( + i18n.t(user.isSilenced ? "unsilenceConfirm" : "silenceConfirm") + )) + ) + return; - os.apiWithDialog( - user.isSilenced ? "admin/unsilence-user" : "admin/silence-user", - { - userId: user.id, - }, - ).then(() => { - user.isSilenced = !user.isSilenced; - }); - } + os.apiWithDialog( + user.isSilenced ? "admin/unsilence-user" : "admin/silence-user", + { + userId: user.id, + } + ).then(() => { + user.isSilenced = !user.isSilenced; + }); + } - async function toggleSuspend() { - if ( - !(await getConfirmed( - i18n.t(user.isSuspended ? "unsuspendConfirm" : "suspendConfirm"), - )) - ) - return; + async function toggleSuspend() { + if ( + !(await getConfirmed( + i18n.t(user.isSuspended ? "unsuspendConfirm" : "suspendConfirm") + )) + ) + return; - os.apiWithDialog( - user.isSuspended ? "admin/unsuspend-user" : "admin/suspend-user", - { - userId: user.id, - }, - ).then(() => { - user.isSuspended = !user.isSuspended; - }); - } + os.apiWithDialog( + user.isSuspended ? "admin/unsuspend-user" : "admin/suspend-user", + { + userId: user.id, + } + ).then(() => { + user.isSuspended = !user.isSuspended; + }); + } - function reportAbuse() { - os.popup( - defineAsyncComponent( - () => import("@/components/MkAbuseReportWindow.vue"), - ), - { - user: user, - }, - {}, - "closed", - ); - } + function reportAbuse() { + os.popup( + defineAsyncComponent( + () => import("@/components/MkAbuseReportWindow.vue") + ), + { + user: user, + }, + {}, + "closed" + ); + } - async function getConfirmed(text: string): Promise { - const confirm = await os.confirm({ - type: "warning", - title: "confirm", - text, - }); + async function getConfirmed(text: string): Promise { + const confirm = await os.confirm({ + type: "warning", + title: "confirm", + text, + }); - return !confirm.canceled; - } + return !confirm.canceled; + } - async function invalidateFollow() { - if (!(await getConfirmed(i18n.ts.breakFollowConfirm))) return; + async function invalidateFollow() { + if (!(await getConfirmed(i18n.ts.breakFollowConfirm))) return; - os.apiWithDialog("following/invalidate", { - userId: user.id, - }).then(() => { - user.isFollowed = !user.isFollowed; - }); - } + os.apiWithDialog("following/invalidate", { + userId: user.id, + }).then(() => { + user.isFollowed = !user.isFollowed; + }); + } - let menu = [ - { - type: "label", - text: user.host - ? `@${user.username}@${user.host || host}` - : `@${user.username}`, - }, - { - icon: "ph-at ph-bold ph-lg", - text: i18n.ts.copyUsername, - action: () => { - copyToClipboard(`@${user.username}@${user.host || host}`); - }, - }, - { - icon: "ph-info ph-bold ph-lg", - text: i18n.ts.info, - action: () => { - router.push(`/user-info/${user.id}`); - }, - }, - { - icon: "ph-envelope-simple-open ph-bold ph-lg", - text: i18n.ts.sendMessage, - action: () => { - os.post({ specified: user }); - }, - }, - { - icon: "ph-list-bullets ph-bold ph-lg", - text: i18n.ts.addToList, - action: pushList, - }, - meId !== user.id - ? { - icon: "ph-users-three ph-bold ph-lg", - text: i18n.ts.inviteToGroup, - action: inviteGroup, - } - : undefined, - null, - { - icon: user.isRenoteMuted - ? "ph-eye ph-bold ph-lg" - : "ph-eye-slash ph-bold ph-lg", - text: user.isRenoteMuted ? i18n.ts.renoteUnmute : i18n.ts.renoteMute, - action: toggleRenoteMute, - }, - ] as any; + let menu = [ + { + type: "label", + text: user.host + ? `@${user.username}@${user.host || host}` + : `@${user.username}`, + }, + { + icon: "ph-at ph-bold ph-lg", + text: i18n.ts.copyUsername, + action: () => { + copyToClipboard(`@${user.username}@${user.host || host}`); + }, + }, + { + icon: "ph-info ph-bold ph-lg", + text: i18n.ts.info, + action: () => { + router.push(`/user-info/${user.id}`); + }, + }, + { + icon: "ph-envelope-simple-open ph-bold ph-lg", + text: i18n.ts.sendMessage, + action: () => { + os.post({ specified: user }); + }, + }, + { + icon: "ph-list-bullets ph-bold ph-lg", + text: i18n.ts.addToList, + action: pushList, + }, + meId !== user.id + ? { + icon: "ph-users-three ph-bold ph-lg", + text: i18n.ts.inviteToGroup, + action: inviteGroup, + } + : undefined, + null, + { + icon: user.isRenoteMuted + ? "ph-eye ph-bold ph-lg" + : "ph-eye-slash ph-bold ph-lg", + text: user.isRenoteMuted + ? i18n.ts.renoteUnmute + : i18n.ts.renoteMute, + action: toggleRenoteMute, + }, + ] as any; - if ($i && meId !== user.id) { - menu = menu.concat([ - { - icon: user.isMuted - ? "ph-eye ph-bold ph-lg" - : "ph-eye-slash ph-bold ph-lg", - text: user.isMuted ? i18n.ts.unmute : i18n.ts.mute, - hidden: user.isBlocking === true, - action: toggleMute, - }, - { - icon: "ph-prohibit ph-bold ph-lg", - text: user.isBlocking ? i18n.ts.unblock : i18n.ts.block, - action: toggleBlock, - }, - ]); + if ($i && meId !== user.id) { + menu = menu.concat([ + { + icon: user.isMuted + ? "ph-eye ph-bold ph-lg" + : "ph-eye-slash ph-bold ph-lg", + text: user.isMuted ? i18n.ts.unmute : i18n.ts.mute, + hidden: user.isBlocking === true, + action: toggleMute, + }, + { + icon: "ph-prohibit ph-bold ph-lg", + text: user.isBlocking ? i18n.ts.unblock : i18n.ts.block, + action: toggleBlock, + }, + ]); - if (user.isFollowed) { - menu = menu.concat([ - { - icon: "ph-link-break ph-bold ph-lg", - text: i18n.ts.breakFollow, - action: invalidateFollow, - }, - ]); - } + if (user.isFollowed) { + menu = menu.concat([ + { + icon: "ph-link-break ph-bold ph-lg", + text: i18n.ts.breakFollow, + action: invalidateFollow, + }, + ]); + } - menu = menu.concat([ - null, - { - icon: "ph-warning-circle ph-bold ph-lg", - text: i18n.ts.reportAbuse, - action: reportAbuse, - }, - ]); + menu = menu.concat([ + null, + { + icon: "ph-warning-circle ph-bold ph-lg", + text: i18n.ts.reportAbuse, + action: reportAbuse, + }, + ]); - if (iAmModerator) { - menu = menu.concat([ - null, - { - icon: "ph-microphone-slash ph-bold ph-lg", - text: user.isSilenced ? i18n.ts.unsilence : i18n.ts.silence, - action: toggleSilence, - }, - { - icon: "ph-snowflake ph-bold ph-lg", - text: user.isSuspended ? i18n.ts.unsuspend : i18n.ts.suspend, - action: toggleSuspend, - }, - ]); - } - } + if (iAmModerator) { + menu = menu.concat([ + null, + { + icon: "ph-microphone-slash ph-bold ph-lg", + text: user.isSilenced ? i18n.ts.unsilence : i18n.ts.silence, + action: toggleSilence, + }, + { + icon: "ph-snowflake ph-bold ph-lg", + text: user.isSuspended + ? i18n.ts.unsuspend + : i18n.ts.suspend, + action: toggleSuspend, + }, + ]); + } + } - if ($i && meId === user.id) { - menu = menu.concat([ - null, - { - icon: "ph-pencil ph-bold ph-lg", - text: i18n.ts.editProfile, - action: () => { - router.push("/settings/profile"); - }, - }, - ]); - } + if ($i && meId === user.id) { + menu = menu.concat([ + null, + { + icon: "ph-pencil ph-bold ph-lg", + text: i18n.ts.editProfile, + action: () => { + router.push("/settings/profile"); + }, + }, + ]); + } - if (userActions.length > 0) { - menu = menu.concat([ - null, - ...userActions.map((action) => ({ - icon: "ph-plug ph-bold ph-lg", - text: action.title, - action: () => { - action.handler(user); - }, - })), - ]); - } + if (userActions.length > 0) { + menu = menu.concat([ + null, + ...userActions.map((action) => ({ + icon: "ph-plug ph-bold ph-lg", + text: action.title, + action: () => { + action.handler(user); + }, + })), + ]); + } - return menu; + return menu; } diff --git a/fe_calckey/frontend/client/src/scripts/get-user-name.ts b/fe_calckey/frontend/client/src/scripts/get-user-name.ts index 0f8916d..c8d4a2a 100644 --- a/fe_calckey/frontend/client/src/scripts/get-user-name.ts +++ b/fe_calckey/frontend/client/src/scripts/get-user-name.ts @@ -1,6 +1,6 @@ export default function (user: { - name?: string | null; - username: string; + name?: string | null; + username: string; }): string { - return user.name || user.username; + return user.name || user.username; } diff --git a/fe_calckey/frontend/client/src/scripts/helpMenu.ts b/fe_calckey/frontend/client/src/scripts/helpMenu.ts index 7e33c22..ceb5fe9 100644 --- a/fe_calckey/frontend/client/src/scripts/helpMenu.ts +++ b/fe_calckey/frontend/client/src/scripts/helpMenu.ts @@ -6,77 +6,77 @@ import XTutorial from "../components/MkTutorialDialog.vue"; import { i18n } from "@/i18n"; export function openHelpMenu_(ev: MouseEvent) { - os.popupMenu( - [ - { - text: instance.name ?? host, - type: "label", - }, - { - type: "link", - text: i18n.ts.instanceInfo, - icon: "ph-info ph-bold ph-lg", - to: "/about", - }, - { - type: "link", - text: i18n.ts.aboutMisskey, - icon: "ph-lightbulb ph-bold ph-lg", - to: "/about-calckey", - }, - { - type: "button", - text: i18n.ts.tos, - icon: "ph-scroll ph-bold ph-lg", - action: () => { - window.open(instance.tosUrl, "_blank"); - }, - }, - { - type: "button", - text: i18n.ts.apps, - icon: "ph-device-mobile ph-bold ph-lg", - action: () => { - window.open("https://calckey.org/apps", "_blank"); - }, - }, - { - type: "button", - action: async () => { - defaultStore.set("tutorial", 0); - os.popup(XTutorial, {}, {}, "closed"); - }, - text: i18n.ts.replayTutorial, - icon: "ph-circle-wavy-question ph-bold ph-lg", - }, - null, - { - type: "parent", - text: i18n.ts.developer, - icon: "ph-code ph-bold ph-lg", - children: [ - { - type: "link", - to: "/api-console", - text: "API Console", - icon: "ph-terminal-window ph-bold ph-lg", - }, - { - text: i18n.ts.document, - icon: "ph-file-doc ph-bold ph-lg", - action: () => { - window.open("/api-doc", "_blank"); - }, - }, - { - type: "link", - to: "/scratchpad", - text: "AiScript Scratchpad", - icon: "ph-scribble-loop ph-bold ph-lg", - }, - ], - }, - ], - ev.currentTarget ?? ev.target, - ); + os.popupMenu( + [ + { + text: instance.name ?? host, + type: "label", + }, + { + type: "link", + text: i18n.ts.instanceInfo, + icon: "ph-info ph-bold ph-lg", + to: "/about", + }, + { + type: "link", + text: i18n.ts.aboutMisskey, + icon: "ph-lightbulb ph-bold ph-lg", + to: "/about-calckey", + }, + { + type: "button", + text: i18n.ts.tos, + icon: "ph-scroll ph-bold ph-lg", + action: () => { + window.open(instance.tosUrl, "_blank"); + }, + }, + { + type: "button", + text: i18n.ts.apps, + icon: "ph-device-mobile ph-bold ph-lg", + action: () => { + window.open("https://calckey.org/apps", "_blank"); + }, + }, + { + type: "button", + action: async () => { + defaultStore.set("tutorial", 0); + os.popup(XTutorial, {}, {}, "closed"); + }, + text: i18n.ts.replayTutorial, + icon: "ph-circle-wavy-question ph-bold ph-lg", + }, + null, + { + type: "parent", + text: i18n.ts.developer, + icon: "ph-code ph-bold ph-lg", + children: [ + { + type: "link", + to: "/api-console", + text: "API Console", + icon: "ph-terminal-window ph-bold ph-lg", + }, + { + text: i18n.ts.document, + icon: "ph-file-doc ph-bold ph-lg", + action: () => { + window.open("/api-doc", "_blank"); + }, + }, + { + type: "link", + to: "/scratchpad", + text: "AiScript Scratchpad", + icon: "ph-scribble-loop ph-bold ph-lg", + }, + ], + }, + ], + ev.currentTarget ?? ev.target + ); } diff --git a/fe_calckey/frontend/client/src/scripts/hotkey.ts b/fe_calckey/frontend/client/src/scripts/hotkey.ts index 02d4157..091e3c0 100644 --- a/fe_calckey/frontend/client/src/scripts/hotkey.ts +++ b/fe_calckey/frontend/client/src/scripts/hotkey.ts @@ -5,100 +5,102 @@ type Callback = (ev: KeyboardEvent) => void; type Keymap = Record; type Pattern = { - which: string[]; - ctrl?: boolean; - shift?: boolean; - alt?: boolean; + which: string[]; + ctrl?: boolean; + shift?: boolean; + alt?: boolean; }; type Action = { - patterns: Pattern[]; - callback: Callback; - allowRepeat: boolean; + patterns: Pattern[]; + callback: Callback; + allowRepeat: boolean; }; const parseKeymap = (keymap: Keymap) => - Object.entries(keymap).map(([patterns, callback]): Action => { - const result = { - patterns: [], - callback, - allowRepeat: true, - } as Action; + Object.entries(keymap).map(([patterns, callback]): Action => { + const result = { + patterns: [], + callback, + allowRepeat: true, + } as Action; - if (patterns.match(/^\(.*\)$/) !== null) { - result.allowRepeat = false; - patterns = patterns.slice(1, -1); - } + if (patterns.match(/^\(.*\)$/) !== null) { + result.allowRepeat = false; + patterns = patterns.slice(1, -1); + } - result.patterns = patterns.split("|").map((part) => { - const pattern = { - which: [], - ctrl: false, - alt: false, - shift: false, - } as Pattern; + result.patterns = patterns.split("|").map((part) => { + const pattern = { + which: [], + ctrl: false, + alt: false, + shift: false, + } as Pattern; - const keys = part - .trim() - .split("+") - .map((x) => x.trim().toLowerCase()); - for (const key of keys) { - switch (key) { - case "ctrl": - pattern.ctrl = true; - break; - case "alt": - pattern.alt = true; - break; - case "shift": - pattern.shift = true; - break; - default: - pattern.which = keyCode(key).map((k) => k.toLowerCase()); - } - } + const keys = part + .trim() + .split("+") + .map((x) => x.trim().toLowerCase()); + for (const key of keys) { + switch (key) { + case "ctrl": + pattern.ctrl = true; + break; + case "alt": + pattern.alt = true; + break; + case "shift": + pattern.shift = true; + break; + default: + pattern.which = keyCode(key).map((k) => + k.toLowerCase() + ); + } + } - return pattern; - }); + return pattern; + }); - return result; - }); + return result; + }); const ignoreElemens = ["input", "textarea"]; function match(ev: KeyboardEvent, patterns: Action["patterns"]): boolean { - const key = ev.code.toLowerCase(); - return patterns.some( - (pattern) => - pattern.which.includes(key) && - pattern.ctrl === ev.ctrlKey && - pattern.shift === ev.shiftKey && - pattern.alt === ev.altKey && - !ev.metaKey, - ); + const key = ev.code.toLowerCase(); + return patterns.some( + (pattern) => + pattern.which.includes(key) && + pattern.ctrl === ev.ctrlKey && + pattern.shift === ev.shiftKey && + pattern.alt === ev.altKey && + !ev.metaKey + ); } export const makeHotkey = (keymap: Keymap) => { - const actions = parseKeymap(keymap); + const actions = parseKeymap(keymap); - return (ev: KeyboardEvent) => { - if (document.activeElement) { - if (ignoreElemens.some((el) => document.activeElement!.matches(el))) - return; - if (document.activeElement.attributes["contenteditable"]) return; - } + return (ev: KeyboardEvent) => { + if (document.activeElement) { + if (ignoreElemens.some((el) => document.activeElement!.matches(el))) + return; + if (document.activeElement.attributes["contenteditable"]) return; + } - for (const action of actions) { - const matched = match(ev, action.patterns); + for (const action of actions) { + const matched = match(ev, action.patterns); - if (matched) { - if (!action.allowRepeat && ev.repeat) return; + if (matched) { + if (!action.allowRepeat && ev.repeat) return; - ev.preventDefault(); - ev.stopPropagation(); - action.callback(ev); - break; - } - } - }; + ev.preventDefault(); + ev.stopPropagation(); + action.callback(ev); + break; + } + } + }; }; diff --git a/fe_calckey/frontend/client/src/scripts/hpml/block.ts b/fe_calckey/frontend/client/src/scripts/hpml/block.ts index 1cdb50b..efebb8d 100644 --- a/fe_calckey/frontend/client/src/scripts/hpml/block.ts +++ b/fe_calckey/frontend/client/src/scripts/hpml/block.ts @@ -1,128 +1,128 @@ // blocks export type BlockBase = { - id: string; - type: string; + id: string; + type: string; }; export type TextBlock = BlockBase & { - type: "text"; - text: string; + type: "text"; + text: string; }; export type SectionBlock = BlockBase & { - type: "section"; - title: string; - children: (Block | VarBlock)[]; + type: "section"; + title: string; + children: (Block | VarBlock)[]; }; export type ImageBlock = BlockBase & { - type: "image"; - fileId: string | null; + type: "image"; + fileId: string | null; }; export type ButtonBlock = BlockBase & { - type: "button"; - text: any; - primary: boolean; - action: string; - content: string; - event: string; - message: string; - var: string; - fn: string; + type: "button"; + text: any; + primary: boolean; + action: string; + content: string; + event: string; + message: string; + var: string; + fn: string; }; export type IfBlock = BlockBase & { - type: "if"; - var: string; - children: Block[]; + type: "if"; + var: string; + children: Block[]; }; export type TextareaBlock = BlockBase & { - type: "textarea"; - text: string; + type: "textarea"; + text: string; }; export type PostBlock = BlockBase & { - type: "post"; - text: string; - attachCanvasImage: boolean; - canvasId: string; + type: "post"; + text: string; + attachCanvasImage: boolean; + canvasId: string; }; export type CanvasBlock = BlockBase & { - type: "canvas"; - name: string; // canvas id - width: number; - height: number; + type: "canvas"; + name: string; // canvas id + width: number; + height: number; }; export type NoteBlock = BlockBase & { - type: "note"; - detailed: boolean; - note: string | null; + type: "note"; + detailed: boolean; + note: string | null; }; export type Block = - | TextBlock - | SectionBlock - | ImageBlock - | ButtonBlock - | IfBlock - | TextareaBlock - | PostBlock - | CanvasBlock - | NoteBlock - | VarBlock; + | TextBlock + | SectionBlock + | ImageBlock + | ButtonBlock + | IfBlock + | TextareaBlock + | PostBlock + | CanvasBlock + | NoteBlock + | VarBlock; // variable blocks export type VarBlockBase = BlockBase & { - name: string; + name: string; }; export type NumberInputVarBlock = VarBlockBase & { - type: "numberInput"; - text: string; + type: "numberInput"; + text: string; }; export type TextInputVarBlock = VarBlockBase & { - type: "textInput"; - text: string; + type: "textInput"; + text: string; }; export type SwitchVarBlock = VarBlockBase & { - type: "switch"; - text: string; + type: "switch"; + text: string; }; export type RadioButtonVarBlock = VarBlockBase & { - type: "radioButton"; - title: string; - values: string[]; + type: "radioButton"; + title: string; + values: string[]; }; export type CounterVarBlock = VarBlockBase & { - type: "counter"; - text: string; - inc: number; + type: "counter"; + text: string; + inc: number; }; export type VarBlock = - | NumberInputVarBlock - | TextInputVarBlock - | SwitchVarBlock - | RadioButtonVarBlock - | CounterVarBlock; + | NumberInputVarBlock + | TextInputVarBlock + | SwitchVarBlock + | RadioButtonVarBlock + | CounterVarBlock; const varBlock = [ - "numberInput", - "textInput", - "switch", - "radioButton", - "counter", + "numberInput", + "textInput", + "switch", + "radioButton", + "counter", ]; export function isVarBlock(block: Block): block is VarBlock { - return varBlock.includes(block.type); + return varBlock.includes(block.type); } diff --git a/fe_calckey/frontend/client/src/scripts/hpml/evaluator.ts b/fe_calckey/frontend/client/src/scripts/hpml/evaluator.ts index 6bd795c..60732f7 100644 --- a/fe_calckey/frontend/client/src/scripts/hpml/evaluator.ts +++ b/fe_calckey/frontend/client/src/scripts/hpml/evaluator.ts @@ -13,245 +13,252 @@ import { Expr, isLiteralValue, Variable } from "./expr"; * Hpml evaluator */ export class Hpml { - private variables: Variable[]; - private pageVars: PageVar[]; - private envVars: Record; - public aiscript?: AiScript; - public pageVarUpdatedCallback?: values.VFn; - public canvases: Record = {}; - public vars: Ref> = ref({}); - public page: Record; + private variables: Variable[]; + private pageVars: PageVar[]; + private envVars: Record; + public aiscript?: AiScript; + public pageVarUpdatedCallback?: values.VFn; + public canvases: Record = {}; + public vars: Ref> = ref({}); + public page: Record; - private opts: { - randomSeed: string; - visitor?: any; - url?: string; - enableAiScript: boolean; - }; + private opts: { + randomSeed: string; + visitor?: any; + url?: string; + enableAiScript: boolean; + }; - constructor(page: Hpml["page"], opts: Hpml["opts"]) { - this.page = page; - this.variables = this.page.variables; - this.pageVars = collectPageVars(this.page.content); - this.opts = opts; + constructor(page: Hpml["page"], opts: Hpml["opts"]) { + this.page = page; + this.variables = this.page.variables; + this.pageVars = collectPageVars(this.page.content); + this.opts = opts; - if (this.opts.enableAiScript) { - this.aiscript = markRaw( - new AiScript( - { - ...createAiScriptEnv({ - storageKey: `pages:${this.page.id}`, - }), - ...initAiLib(this), - }, - { - in: (q) => { - return new Promise((ok) => { - os.inputText({ - title: q, - }).then(({ canceled, result: a }) => { - ok(a); - }); - }); - }, - out: (value) => { - console.log(value); - }, - log: (type, params) => {}, - }, - ), - ); + if (this.opts.enableAiScript) { + this.aiscript = markRaw( + new AiScript( + { + ...createAiScriptEnv({ + storageKey: `pages:${this.page.id}`, + }), + ...initAiLib(this), + }, + { + in: (q) => { + return new Promise((ok) => { + os.inputText({ + title: q, + }).then(({ canceled, result: a }) => { + ok(a); + }); + }); + }, + out: (value) => { + console.log(value); + }, + log: (type, params) => {}, + } + ) + ); - this.aiscript.scope.opts.onUpdated = (name, value) => { - this.eval(); - }; - } + this.aiscript.scope.opts.onUpdated = (name, value) => { + this.eval(); + }; + } - const date = new Date(); + const date = new Date(); - this.envVars = { - AI: "kawaii", - VERSION: version, - URL: this.page - ? `${opts.url}/@${this.page.user.username}/pages/${this.page.name}` - : "", - LOGIN: opts.visitor != null, - NAME: opts.visitor ? opts.visitor.name || opts.visitor.username : "", - USERNAME: opts.visitor ? opts.visitor.username : "", - USERID: opts.visitor ? opts.visitor.id : "", - NOTES_COUNT: opts.visitor ? opts.visitor.notesCount : 0, - FOLLOWERS_COUNT: opts.visitor ? opts.visitor.followersCount : 0, - FOLLOWING_COUNT: opts.visitor ? opts.visitor.followingCount : 0, - IS_CAT: opts.visitor ? opts.visitor.isCat : false, - SEED: opts.randomSeed ? opts.randomSeed : "", - YMD: `${date.getFullYear()}/${date.getMonth() + 1}/${date.getDate()}`, - AISCRIPT_DISABLED: !this.opts.enableAiScript, - NULL: null, - }; + this.envVars = { + AI: "kawaii", + VERSION: version, + URL: this.page + ? `${opts.url}/@${this.page.user.username}/pages/${this.page.name}` + : "", + LOGIN: opts.visitor != null, + NAME: opts.visitor + ? opts.visitor.name || opts.visitor.username + : "", + USERNAME: opts.visitor ? opts.visitor.username : "", + USERID: opts.visitor ? opts.visitor.id : "", + NOTES_COUNT: opts.visitor ? opts.visitor.notesCount : 0, + FOLLOWERS_COUNT: opts.visitor ? opts.visitor.followersCount : 0, + FOLLOWING_COUNT: opts.visitor ? opts.visitor.followingCount : 0, + IS_CAT: opts.visitor ? opts.visitor.isCat : false, + SEED: opts.randomSeed ? opts.randomSeed : "", + YMD: `${date.getFullYear()}/${ + date.getMonth() + 1 + }/${date.getDate()}`, + AISCRIPT_DISABLED: !this.opts.enableAiScript, + NULL: null, + }; - this.eval(); - } + this.eval(); + } - @autobind - public eval() { - try { - this.vars.value = this.evaluateVars(); - } catch (err) { - //this.onError(e); - } - } + @autobind + public eval() { + try { + this.vars.value = this.evaluateVars(); + } catch (err) { + //this.onError(e); + } + } - @autobind - public interpolate(str: string) { - if (str == null) return null; - return str.replace(/{(.+?)}/g, (match) => { - const v = unref(this.vars)[match.slice(1, -1).trim()]; - return v == null ? "NULL" : v.toString(); - }); - } + @autobind + public interpolate(str: string) { + if (str == null) return null; + return str.replace(/{(.+?)}/g, (match) => { + const v = unref(this.vars)[match.slice(1, -1).trim()]; + return v == null ? "NULL" : v.toString(); + }); + } - @autobind - public callAiScript(fn: string) { - try { - if (this.aiscript) this.aiscript.execFn(this.aiscript.scope.get(fn), []); - } catch (err) {} - } + @autobind + public callAiScript(fn: string) { + try { + if (this.aiscript) + this.aiscript.execFn(this.aiscript.scope.get(fn), []); + } catch (err) {} + } - @autobind - public registerCanvas(id: string, canvas: any) { - this.canvases[id] = canvas; - } + @autobind + public registerCanvas(id: string, canvas: any) { + this.canvases[id] = canvas; + } - @autobind - public updatePageVar(name: string, value: any) { - const pageVar = this.pageVars.find((v) => v.name === name); - if (pageVar !== undefined) { - pageVar.value = value; - if (this.pageVarUpdatedCallback) { - if (this.aiscript) - this.aiscript.execFn(this.pageVarUpdatedCallback, [ - values.STR(name), - utils.jsToVal(value), - ]); - } - } else { - throw new HpmlError(`No such page var '${name}'`); - } - } + @autobind + public updatePageVar(name: string, value: any) { + const pageVar = this.pageVars.find((v) => v.name === name); + if (pageVar !== undefined) { + pageVar.value = value; + if (this.pageVarUpdatedCallback) { + if (this.aiscript) + this.aiscript.execFn(this.pageVarUpdatedCallback, [ + values.STR(name), + utils.jsToVal(value), + ]); + } + } else { + throw new HpmlError(`No such page var '${name}'`); + } + } - @autobind - public updateRandomSeed(seed: string) { - this.opts.randomSeed = seed; - this.envVars.SEED = seed; - } + @autobind + public updateRandomSeed(seed: string) { + this.opts.randomSeed = seed; + this.envVars.SEED = seed; + } - @autobind - private _interpolateScope(str: string, scope: HpmlScope) { - return str.replace(/{(.+?)}/g, (match) => { - const v = scope.getState(match.slice(1, -1).trim()); - return v == null ? "NULL" : v.toString(); - }); - } + @autobind + private _interpolateScope(str: string, scope: HpmlScope) { + return str.replace(/{(.+?)}/g, (match) => { + const v = scope.getState(match.slice(1, -1).trim()); + return v == null ? "NULL" : v.toString(); + }); + } - @autobind - public evaluateVars(): Record { - const values: Record = {}; + @autobind + public evaluateVars(): Record { + const values: Record = {}; - for (const [k, v] of Object.entries(this.envVars)) { - values[k] = v; - } + for (const [k, v] of Object.entries(this.envVars)) { + values[k] = v; + } - for (const v of this.pageVars) { - values[v.name] = v.value; - } + for (const v of this.pageVars) { + values[v.name] = v.value; + } - for (const v of this.variables) { - values[v.name] = this.evaluate(v, new HpmlScope([values])); - } + for (const v of this.variables) { + values[v.name] = this.evaluate(v, new HpmlScope([values])); + } - return values; - } + return values; + } - @autobind - private evaluate(expr: Expr, scope: HpmlScope): any { - if (isLiteralValue(expr)) { - if (expr.type === null) { - return null; - } + @autobind + private evaluate(expr: Expr, scope: HpmlScope): any { + if (isLiteralValue(expr)) { + if (expr.type === null) { + return null; + } - if (expr.type === "number") { - return parseInt(expr.value as any, 10); - } + if (expr.type === "number") { + return parseInt(expr.value as any, 10); + } - if (expr.type === "text" || expr.type === "multiLineText") { - return this._interpolateScope(expr.value || "", scope); - } + if (expr.type === "text" || expr.type === "multiLineText") { + return this._interpolateScope(expr.value || "", scope); + } - if (expr.type === "textList") { - return this._interpolateScope(expr.value || "", scope) - .trim() - .split("\n"); - } + if (expr.type === "textList") { + return this._interpolateScope(expr.value || "", scope) + .trim() + .split("\n"); + } - if (expr.type === "ref") { - return scope.getState(expr.value); - } + if (expr.type === "ref") { + return scope.getState(expr.value); + } - if (expr.type === "aiScriptVar") { - if (this.aiscript) { - try { - return utils.valToJs(this.aiscript.scope.get(expr.value)); - } catch (err) { - return null; - } - } else { - return null; - } - } + if (expr.type === "aiScriptVar") { + if (this.aiscript) { + try { + return utils.valToJs( + this.aiscript.scope.get(expr.value) + ); + } catch (err) { + return null; + } + } else { + return null; + } + } - // Define user function - if (expr.type === "fn") { - return { - slots: expr.value.slots.map((x) => x.name), - exec: (slotArg: Record) => { - return this.evaluate( - expr.value.expression, - scope.createChildScope(slotArg, expr.id), - ); - }, - } as Fn; - } - return; - } + // Define user function + if (expr.type === "fn") { + return { + slots: expr.value.slots.map((x) => x.name), + exec: (slotArg: Record) => { + return this.evaluate( + expr.value.expression, + scope.createChildScope(slotArg, expr.id) + ); + }, + } as Fn; + } + return; + } - // Call user function - if (expr.type.startsWith("fn:")) { - const fnName = expr.type.split(":")[1]; - const fn = scope.getState(fnName); - const args = {} as Record; - for (let i = 0; i < fn.slots.length; i++) { - const name = fn.slots[i]; - args[name] = this.evaluate(expr.args[i], scope); - } - return fn.exec(args); - } + // Call user function + if (expr.type.startsWith("fn:")) { + const fnName = expr.type.split(":")[1]; + const fn = scope.getState(fnName); + const args = {} as Record; + for (let i = 0; i < fn.slots.length; i++) { + const name = fn.slots[i]; + args[name] = this.evaluate(expr.args[i], scope); + } + return fn.exec(args); + } - if (expr.args === undefined) return null; + if (expr.args === undefined) return null; - const funcs = initHpmlLib( - expr, - scope, - this.opts.randomSeed, - this.opts.visitor, - ); + const funcs = initHpmlLib( + expr, + scope, + this.opts.randomSeed, + this.opts.visitor + ); - // Call function - const fnName = expr.type; - const fn = (funcs as any)[fnName]; - if (fn == null) { - throw new HpmlError(`No such function '${fnName}'`); - } else { - return fn(...expr.args.map((x) => this.evaluate(x, scope))); - } - } + // Call function + const fnName = expr.type; + const fn = (funcs as any)[fnName]; + if (fn == null) { + throw new HpmlError(`No such function '${fnName}'`); + } else { + return fn(...expr.args.map((x) => this.evaluate(x, scope))); + } + } } diff --git a/fe_calckey/frontend/client/src/scripts/hpml/expr.ts b/fe_calckey/frontend/client/src/scripts/hpml/expr.ts index a39ae4a..860965c 100644 --- a/fe_calckey/frontend/client/src/scripts/hpml/expr.ts +++ b/fe_calckey/frontend/client/src/scripts/hpml/expr.ts @@ -1,86 +1,86 @@ import { literalDefs, Type } from "."; export type ExprBase = { - id: string; + id: string; }; // value export type EmptyValue = ExprBase & { - type: null; - value: null; + type: null; + value: null; }; export type TextValue = ExprBase & { - type: "text"; - value: string; + type: "text"; + value: string; }; export type MultiLineTextValue = ExprBase & { - type: "multiLineText"; - value: string; + type: "multiLineText"; + value: string; }; export type TextListValue = ExprBase & { - type: "textList"; - value: string; + type: "textList"; + value: string; }; export type NumberValue = ExprBase & { - type: "number"; - value: number; + type: "number"; + value: number; }; export type RefValue = ExprBase & { - type: "ref"; - value: string; // value is variable name + type: "ref"; + value: string; // value is variable name }; export type AiScriptRefValue = ExprBase & { - type: "aiScriptVar"; - value: string; // value is variable name + type: "aiScriptVar"; + value: string; // value is variable name }; export type UserFnValue = ExprBase & { - type: "fn"; - value: UserFnInnerValue; + type: "fn"; + value: UserFnInnerValue; }; type UserFnInnerValue = { - slots: { - name: string; - type: Type; - }[]; - expression: Expr; + slots: { + name: string; + type: Type; + }[]; + expression: Expr; }; export type Value = - | EmptyValue - | TextValue - | MultiLineTextValue - | TextListValue - | NumberValue - | RefValue - | AiScriptRefValue - | UserFnValue; + | EmptyValue + | TextValue + | MultiLineTextValue + | TextListValue + | NumberValue + | RefValue + | AiScriptRefValue + | UserFnValue; export function isLiteralValue(expr: Expr): expr is Value { - if (expr.type == null) return true; - if (literalDefs[expr.type]) return true; - return false; + if (expr.type == null) return true; + if (literalDefs[expr.type]) return true; + return false; } // call function export type CallFn = ExprBase & { - // "fn:hoge" or string - type: string; - args: Expr[]; - value: null; + // "fn:hoge" or string + type: string; + args: Expr[]; + value: null; }; // variable export type Variable = (Value | CallFn) & { - name: string; + name: string; }; // expression diff --git a/fe_calckey/frontend/client/src/scripts/hpml/index.ts b/fe_calckey/frontend/client/src/scripts/hpml/index.ts index 914d714..77c1f4c 100644 --- a/fe_calckey/frontend/client/src/scripts/hpml/index.ts +++ b/fe_calckey/frontend/client/src/scripts/hpml/index.ts @@ -7,127 +7,134 @@ import { Hpml } from "./evaluator"; import { funcDefs } from "./lib"; export type Fn = { - slots: string[]; - exec: (args: Record) => ReturnType; + slots: string[]; + exec: (args: Record) => ReturnType; }; export type Type = "string" | "number" | "boolean" | "stringArray" | null; export const literalDefs: Record< - string, - { out: any; category: string; icon: any } + string, + { out: any; category: string; icon: any } > = { - text: { out: "string", category: "value", icon: "ph-quotes ph-bold ph-lg" }, - multiLineText: { - out: "string", - category: "value", - icon: "ph-align-left ph-bold ph-lg", - }, - textList: { - out: "stringArray", - category: "value", - icon: "ph-list ph-bold ph-lg", - }, - number: { - out: "number", - category: "value", - icon: "ph-sort-descending-up ph-bold ph-lg", - }, - ref: { out: null, category: "value", icon: "ph-magic-wand ph-bold ph-lg" }, - aiScriptVar: { - out: null, - category: "value", - icon: "ph-magic-wand ph-bold ph-lg", - }, - fn: { out: "function", category: "value", icon: "ph-radical ph-bold ph-lg" }, + text: { out: "string", category: "value", icon: "ph-quotes ph-bold ph-lg" }, + multiLineText: { + out: "string", + category: "value", + icon: "ph-align-left ph-bold ph-lg", + }, + textList: { + out: "stringArray", + category: "value", + icon: "ph-list ph-bold ph-lg", + }, + number: { + out: "number", + category: "value", + icon: "ph-sort-descending-up ph-bold ph-lg", + }, + ref: { out: null, category: "value", icon: "ph-magic-wand ph-bold ph-lg" }, + aiScriptVar: { + out: null, + category: "value", + icon: "ph-magic-wand ph-bold ph-lg", + }, + fn: { + out: "function", + category: "value", + icon: "ph-radical ph-bold ph-lg", + }, }; export const blockDefs = [ - ...Object.entries(literalDefs).map(([k, v]) => ({ - type: k, - out: v.out, - category: v.category, - icon: v.icon, - })), - ...Object.entries(funcDefs).map(([k, v]) => ({ - type: k, - out: v.out, - category: v.category, - icon: v.icon, - })), + ...Object.entries(literalDefs).map(([k, v]) => ({ + type: k, + out: v.out, + category: v.category, + icon: v.icon, + })), + ...Object.entries(funcDefs).map(([k, v]) => ({ + type: k, + out: v.out, + category: v.category, + icon: v.icon, + })), ]; export type PageVar = { name: string; value: any; type: Type }; export const envVarsDef: Record = { - AI: "string", - URL: "string", - VERSION: "string", - LOGIN: "boolean", - NAME: "string", - USERNAME: "string", - USERID: "string", - NOTES_COUNT: "number", - FOLLOWERS_COUNT: "number", - FOLLOWING_COUNT: "number", - IS_CAT: "boolean", - SEED: null, - YMD: "string", - AISCRIPT_DISABLED: "boolean", - NULL: null, + AI: "string", + URL: "string", + VERSION: "string", + LOGIN: "boolean", + NAME: "string", + USERNAME: "string", + USERID: "string", + NOTES_COUNT: "number", + FOLLOWERS_COUNT: "number", + FOLLOWING_COUNT: "number", + IS_CAT: "boolean", + SEED: null, + YMD: "string", + AISCRIPT_DISABLED: "boolean", + NULL: null, }; export class HpmlScope { - private layerdStates: Record[]; - public name: string; + private layerdStates: Record[]; + public name: string; - constructor( - layerdStates: HpmlScope["layerdStates"], - name?: HpmlScope["name"], - ) { - this.layerdStates = layerdStates; - this.name = name || "anonymous"; - } + constructor( + layerdStates: HpmlScope["layerdStates"], + name?: HpmlScope["name"] + ) { + this.layerdStates = layerdStates; + this.name = name || "anonymous"; + } - @autobind - public createChildScope( - states: Record, - name?: HpmlScope["name"], - ): HpmlScope { - const layer = [states, ...this.layerdStates]; - return new HpmlScope(layer, name); - } + @autobind + public createChildScope( + states: Record, + name?: HpmlScope["name"] + ): HpmlScope { + const layer = [states, ...this.layerdStates]; + return new HpmlScope(layer, name); + } - /** - * 指定した名前の変数の値を取得します - * @param name 変数名 - */ - @autobind - public getState(name: string): any { - for (const later of this.layerdStates) { - const state = later[name]; - if (state !== undefined) { - return state; - } - } + /** + * 指定した名前の変数の値を取得します + * @param name 変数名 + */ + @autobind + public getState(name: string): any { + for (const later of this.layerdStates) { + const state = later[name]; + if (state !== undefined) { + return state; + } + } - throw new HpmlError(`No such variable '${name}' in scope '${this.name}'`, { - scope: this.layerdStates, - }); - } + throw new HpmlError( + `No such variable '${name}' in scope '${this.name}'`, + { + scope: this.layerdStates, + } + ); + } } export class HpmlError extends Error { - public info?: any; + public info?: any; - constructor(message: string, info?: any) { - super(message); + constructor(message: string, info?: any) { + super(message); - this.info = info; + this.info = info; - // Maintains proper stack trace for where our error was thrown (only available on V8) - if (Error.captureStackTrace) { - Error.captureStackTrace(this, HpmlError); - } - } + // Maintains proper stack trace for where our error was thrown (only available on V8) + if (Error.captureStackTrace) { + Error.captureStackTrace(this, HpmlError); + } + } } diff --git a/fe_calckey/frontend/client/src/scripts/hpml/lib.ts b/fe_calckey/frontend/client/src/scripts/hpml/lib.ts index d0f774e..cd0da29 100644 --- a/fe_calckey/frontend/client/src/scripts/hpml/lib.ts +++ b/fe_calckey/frontend/client/src/scripts/hpml/lib.ts @@ -21,139 +21,161 @@ Chart.pluginService.register({ */ export function initAiLib(hpml: Hpml) { - return { - "MkPages:updated": values.FN_NATIVE(([callback]) => { - hpml.pageVarUpdatedCallback = callback as values.VFn; - }), - "MkPages:get_canvas": values.FN_NATIVE(([id]) => { - utils.assertString(id); - const canvas = hpml.canvases[id.value]; - const ctx = canvas.getContext("2d"); - return values.OBJ( - new Map([ - [ - "clear_rect", - values.FN_NATIVE(([x, y, width, height]) => { - ctx.clearRect(x.value, y.value, width.value, height.value); - }), - ], - [ - "fill_rect", - values.FN_NATIVE(([x, y, width, height]) => { - ctx.fillRect(x.value, y.value, width.value, height.value); - }), - ], - [ - "stroke_rect", - values.FN_NATIVE(([x, y, width, height]) => { - ctx.strokeRect(x.value, y.value, width.value, height.value); - }), - ], - [ - "fill_text", - values.FN_NATIVE(([text, x, y, width]) => { - ctx.fillText( - text.value, - x.value, - y.value, - width ? width.value : undefined, - ); - }), - ], - [ - "stroke_text", - values.FN_NATIVE(([text, x, y, width]) => { - ctx.strokeText( - text.value, - x.value, - y.value, - width ? width.value : undefined, - ); - }), - ], - [ - "set_line_width", - values.FN_NATIVE(([width]) => { - ctx.lineWidth = width.value; - }), - ], - [ - "set_font", - values.FN_NATIVE(([font]) => { - ctx.font = font.value; - }), - ], - [ - "set_fill_style", - values.FN_NATIVE(([style]) => { - ctx.fillStyle = style.value; - }), - ], - [ - "set_stroke_style", - values.FN_NATIVE(([style]) => { - ctx.strokeStyle = style.value; - }), - ], - [ - "begin_path", - values.FN_NATIVE(() => { - ctx.beginPath(); - }), - ], - [ - "close_path", - values.FN_NATIVE(() => { - ctx.closePath(); - }), - ], - [ - "move_to", - values.FN_NATIVE(([x, y]) => { - ctx.moveTo(x.value, y.value); - }), - ], - [ - "line_to", - values.FN_NATIVE(([x, y]) => { - ctx.lineTo(x.value, y.value); - }), - ], - [ - "arc", - values.FN_NATIVE(([x, y, radius, startAngle, endAngle]) => { - ctx.arc( - x.value, - y.value, - radius.value, - startAngle.value, - endAngle.value, - ); - }), - ], - [ - "rect", - values.FN_NATIVE(([x, y, width, height]) => { - ctx.rect(x.value, y.value, width.value, height.value); - }), - ], - [ - "fill", - values.FN_NATIVE(() => { - ctx.fill(); - }), - ], - [ - "stroke", - values.FN_NATIVE(() => { - ctx.stroke(); - }), - ], - ]), - ); - }), - "MkPages:chart": values.FN_NATIVE(([id, opts]) => { - /* TODO + return { + "MkPages:updated": values.FN_NATIVE(([callback]) => { + hpml.pageVarUpdatedCallback = callback as values.VFn; + }), + "MkPages:get_canvas": values.FN_NATIVE(([id]) => { + utils.assertString(id); + const canvas = hpml.canvases[id.value]; + const ctx = canvas.getContext("2d"); + return values.OBJ( + new Map([ + [ + "clear_rect", + values.FN_NATIVE(([x, y, width, height]) => { + ctx.clearRect( + x.value, + y.value, + width.value, + height.value + ); + }), + ], + [ + "fill_rect", + values.FN_NATIVE(([x, y, width, height]) => { + ctx.fillRect( + x.value, + y.value, + width.value, + height.value + ); + }), + ], + [ + "stroke_rect", + values.FN_NATIVE(([x, y, width, height]) => { + ctx.strokeRect( + x.value, + y.value, + width.value, + height.value + ); + }), + ], + [ + "fill_text", + values.FN_NATIVE(([text, x, y, width]) => { + ctx.fillText( + text.value, + x.value, + y.value, + width ? width.value : undefined + ); + }), + ], + [ + "stroke_text", + values.FN_NATIVE(([text, x, y, width]) => { + ctx.strokeText( + text.value, + x.value, + y.value, + width ? width.value : undefined + ); + }), + ], + [ + "set_line_width", + values.FN_NATIVE(([width]) => { + ctx.lineWidth = width.value; + }), + ], + [ + "set_font", + values.FN_NATIVE(([font]) => { + ctx.font = font.value; + }), + ], + [ + "set_fill_style", + values.FN_NATIVE(([style]) => { + ctx.fillStyle = style.value; + }), + ], + [ + "set_stroke_style", + values.FN_NATIVE(([style]) => { + ctx.strokeStyle = style.value; + }), + ], + [ + "begin_path", + values.FN_NATIVE(() => { + ctx.beginPath(); + }), + ], + [ + "close_path", + values.FN_NATIVE(() => { + ctx.closePath(); + }), + ], + [ + "move_to", + values.FN_NATIVE(([x, y]) => { + ctx.moveTo(x.value, y.value); + }), + ], + [ + "line_to", + values.FN_NATIVE(([x, y]) => { + ctx.lineTo(x.value, y.value); + }), + ], + [ + "arc", + values.FN_NATIVE( + ([x, y, radius, startAngle, endAngle]) => { + ctx.arc( + x.value, + y.value, + radius.value, + startAngle.value, + endAngle.value + ); + } + ), + ], + [ + "rect", + values.FN_NATIVE(([x, y, width, height]) => { + ctx.rect( + x.value, + y.value, + width.value, + height.value + ); + }), + ], + [ + "fill", + values.FN_NATIVE(() => { + ctx.fill(); + }), + ], + [ + "stroke", + values.FN_NATIVE(() => { + ctx.stroke(); + }), + ], + ]) + ); + }), + "MkPages:chart": values.FN_NATIVE(([id, opts]) => { + /* TODO utils.assertString(id); utils.assertObject(opts); const canvas = hpml.canvases[id.value]; @@ -228,329 +250,338 @@ export function initAiLib(hpml: Hpml) { } }); */ - }), - }; + }), + }; } export const funcDefs: Record< - string, - { in: any[]; out: any; category: string; icon: any } + string, + { in: any[]; out: any; category: string; icon: any } > = { - if: { - in: ["boolean", 0, 0], - out: 0, - category: "flow", - icon: "ph-share-network ph-bold ph-lg", - }, - for: { - in: ["number", "function"], - out: null, - category: "flow", - icon: "ph-recycle ph-bold ph-lg", - }, - not: { - in: ["boolean"], - out: "boolean", - category: "logical", - icon: "ph-flag ph-bold ph-lg", - }, - or: { - in: ["boolean", "boolean"], - out: "boolean", - category: "logical", - icon: "ph-flag ph-bold ph-lg", - }, - and: { - in: ["boolean", "boolean"], - out: "boolean", - category: "logical", - icon: "ph-flag ph-bold ph-lg", - }, - add: { - in: ["number", "number"], - out: "number", - category: "operation", - icon: "ph-plus ph-bold ph-lg", - }, - subtract: { - in: ["number", "number"], - out: "number", - category: "operation", - icon: "ph-minus ph-bold ph-lg", - }, - multiply: { - in: ["number", "number"], - out: "number", - category: "operation", - icon: "ph-x ph-bold ph-lg", - }, - divide: { - in: ["number", "number"], - out: "number", - category: "operation", - icon: "ph-divide ph-bold ph-lg", - }, - mod: { - in: ["number", "number"], - out: "number", - category: "operation", - icon: "ph-divide ph-bold ph-lg", - }, - round: { - in: ["number"], - out: "number", - category: "operation", - icon: "ph-calculator ph-bold ph-lg", - }, - eq: { - in: [0, 0], - out: "boolean", - category: "comparison", - icon: "ph-equals ph-bold ph-lg", - }, - notEq: { - in: [0, 0], - out: "boolean", - category: "comparison", - icon: "ph-prohibit-insert ph-bold ph-lg", - }, - gt: { - in: ["number", "number"], - out: "boolean", - category: "comparison", - icon: "ph-caret-right ph-bold ph-lg", - }, - lt: { - in: ["number", "number"], - out: "boolean", - category: "comparison", - icon: "ph-caret-left ph-bold ph-lg", - }, - gtEq: { - in: ["number", "number"], - out: "boolean", - category: "comparison", - icon: "ph-caret-double-right ph-bold ph-lg", - }, - ltEq: { - in: ["number", "number"], - out: "boolean", - category: "comparison", - icon: "ph-caret-double-right ph-bold ph-lg", - }, - strLen: { - in: ["string"], - out: "number", - category: "text", - icon: "ph-quotes ph-bold ph-lg", - }, - strPick: { - in: ["string", "number"], - out: "string", - category: "text", - icon: "ph-quotes ph-bold ph-lg", - }, - strReplace: { - in: ["string", "string", "string"], - out: "string", - category: "text", - icon: "ph-quotes ph-bold ph-lg", - }, - strReverse: { - in: ["string"], - out: "string", - category: "text", - icon: "ph-quotes ph-bold ph-lg", - }, - join: { - in: ["stringArray", "string"], - out: "string", - category: "text", - icon: "ph-quotes ph-bold ph-lg", - }, - stringToNumber: { - in: ["string"], - out: "number", - category: "convert", - icon: "ph-swap ph-bold ph-lg", - }, - numberToString: { - in: ["number"], - out: "string", - category: "convert", - icon: "ph-swap ph-bold ph-lg", - }, - splitStrByLine: { - in: ["string"], - out: "stringArray", - category: "convert", - icon: "ph-swap ph-bold ph-lg", - }, - pick: { - in: [null, "number"], - out: null, - category: "list", - icon: "ph-text-indent ph-bold ph-lg", - }, - listLen: { - in: [null], - out: "number", - category: "list", - icon: "ph-text-indent ph-bold ph-lg", - }, - rannum: { - in: ["number", "number"], - out: "number", - category: "random", - icon: "ph-dice-five ph-bold ph-lg", - }, - dailyRannum: { - in: ["number", "number"], - out: "number", - category: "random", - icon: "ph-dice-five ph-bold ph-lg", - }, - seedRannum: { - in: [null, "number", "number"], - out: "number", - category: "random", - icon: "ph-dice-five ph-bold ph-lg", - }, - random: { - in: ["number"], - out: "boolean", - category: "random", - icon: "ph-dice-five ph-bold ph-lg", - }, - dailyRandom: { - in: ["number"], - out: "boolean", - category: "random", - icon: "ph-dice-five ph-bold ph-lg", - }, - seedRandom: { - in: [null, "number"], - out: "boolean", - category: "random", - icon: "ph-dice-five ph-bold ph-lg", - }, - randomPick: { - in: [0], - out: 0, - category: "random", - icon: "ph-dice-five ph-bold ph-lg", - }, - dailyRandomPick: { - in: [0], - out: 0, - category: "random", - icon: "ph-dice-five ph-bold ph-lg", - }, - seedRandomPick: { - in: [null, 0], - out: 0, - category: "random", - icon: "ph-dice-five ph-bold ph-lg", - }, - DRPWPM: { - in: ["stringArray"], - out: "string", - category: "random", - icon: "ph-dice-five ph-bold ph-lg", - }, // dailyRandomPickWithProbabilityMapping + if: { + in: ["boolean", 0, 0], + out: 0, + category: "flow", + icon: "ph-share-network ph-bold ph-lg", + }, + for: { + in: ["number", "function"], + out: null, + category: "flow", + icon: "ph-recycle ph-bold ph-lg", + }, + not: { + in: ["boolean"], + out: "boolean", + category: "logical", + icon: "ph-flag ph-bold ph-lg", + }, + or: { + in: ["boolean", "boolean"], + out: "boolean", + category: "logical", + icon: "ph-flag ph-bold ph-lg", + }, + and: { + in: ["boolean", "boolean"], + out: "boolean", + category: "logical", + icon: "ph-flag ph-bold ph-lg", + }, + add: { + in: ["number", "number"], + out: "number", + category: "operation", + icon: "ph-plus ph-bold ph-lg", + }, + subtract: { + in: ["number", "number"], + out: "number", + category: "operation", + icon: "ph-minus ph-bold ph-lg", + }, + multiply: { + in: ["number", "number"], + out: "number", + category: "operation", + icon: "ph-x ph-bold ph-lg", + }, + divide: { + in: ["number", "number"], + out: "number", + category: "operation", + icon: "ph-divide ph-bold ph-lg", + }, + mod: { + in: ["number", "number"], + out: "number", + category: "operation", + icon: "ph-divide ph-bold ph-lg", + }, + round: { + in: ["number"], + out: "number", + category: "operation", + icon: "ph-calculator ph-bold ph-lg", + }, + eq: { + in: [0, 0], + out: "boolean", + category: "comparison", + icon: "ph-equals ph-bold ph-lg", + }, + notEq: { + in: [0, 0], + out: "boolean", + category: "comparison", + icon: "ph-prohibit-insert ph-bold ph-lg", + }, + gt: { + in: ["number", "number"], + out: "boolean", + category: "comparison", + icon: "ph-caret-right ph-bold ph-lg", + }, + lt: { + in: ["number", "number"], + out: "boolean", + category: "comparison", + icon: "ph-caret-left ph-bold ph-lg", + }, + gtEq: { + in: ["number", "number"], + out: "boolean", + category: "comparison", + icon: "ph-caret-double-right ph-bold ph-lg", + }, + ltEq: { + in: ["number", "number"], + out: "boolean", + category: "comparison", + icon: "ph-caret-double-right ph-bold ph-lg", + }, + strLen: { + in: ["string"], + out: "number", + category: "text", + icon: "ph-quotes ph-bold ph-lg", + }, + strPick: { + in: ["string", "number"], + out: "string", + category: "text", + icon: "ph-quotes ph-bold ph-lg", + }, + strReplace: { + in: ["string", "string", "string"], + out: "string", + category: "text", + icon: "ph-quotes ph-bold ph-lg", + }, + strReverse: { + in: ["string"], + out: "string", + category: "text", + icon: "ph-quotes ph-bold ph-lg", + }, + join: { + in: ["stringArray", "string"], + out: "string", + category: "text", + icon: "ph-quotes ph-bold ph-lg", + }, + stringToNumber: { + in: ["string"], + out: "number", + category: "convert", + icon: "ph-swap ph-bold ph-lg", + }, + numberToString: { + in: ["number"], + out: "string", + category: "convert", + icon: "ph-swap ph-bold ph-lg", + }, + splitStrByLine: { + in: ["string"], + out: "stringArray", + category: "convert", + icon: "ph-swap ph-bold ph-lg", + }, + pick: { + in: [null, "number"], + out: null, + category: "list", + icon: "ph-text-indent ph-bold ph-lg", + }, + listLen: { + in: [null], + out: "number", + category: "list", + icon: "ph-text-indent ph-bold ph-lg", + }, + rannum: { + in: ["number", "number"], + out: "number", + category: "random", + icon: "ph-dice-five ph-bold ph-lg", + }, + dailyRannum: { + in: ["number", "number"], + out: "number", + category: "random", + icon: "ph-dice-five ph-bold ph-lg", + }, + seedRannum: { + in: [null, "number", "number"], + out: "number", + category: "random", + icon: "ph-dice-five ph-bold ph-lg", + }, + random: { + in: ["number"], + out: "boolean", + category: "random", + icon: "ph-dice-five ph-bold ph-lg", + }, + dailyRandom: { + in: ["number"], + out: "boolean", + category: "random", + icon: "ph-dice-five ph-bold ph-lg", + }, + seedRandom: { + in: [null, "number"], + out: "boolean", + category: "random", + icon: "ph-dice-five ph-bold ph-lg", + }, + randomPick: { + in: [0], + out: 0, + category: "random", + icon: "ph-dice-five ph-bold ph-lg", + }, + dailyRandomPick: { + in: [0], + out: 0, + category: "random", + icon: "ph-dice-five ph-bold ph-lg", + }, + seedRandomPick: { + in: [null, 0], + out: 0, + category: "random", + icon: "ph-dice-five ph-bold ph-lg", + }, + DRPWPM: { + in: ["stringArray"], + out: "string", + category: "random", + icon: "ph-dice-five ph-bold ph-lg", + }, // dailyRandomPickWithProbabilityMapping }; export function initHpmlLib( - expr: Expr, - scope: HpmlScope, - randomSeed: string, - visitor?: any, + expr: Expr, + scope: HpmlScope, + randomSeed: string, + visitor?: any ) { - const date = new Date(); - const day = `${visitor ? visitor.id : ""} ${date.getFullYear()}/${ - date.getMonth() + 1 - }/${date.getDate()}`; + const date = new Date(); + const day = `${visitor ? visitor.id : ""} ${date.getFullYear()}/${ + date.getMonth() + 1 + }/${date.getDate()}`; - // SHOULD be fine to ignore since it's intended + function shape isn't defined - const funcs: Record = { - not: (a: boolean) => !a, - or: (a: boolean, b: boolean) => a || b, - and: (a: boolean, b: boolean) => a && b, - eq: (a: any, b: any) => a === b, - notEq: (a: any, b: any) => a !== b, - gt: (a: number, b: number) => a > b, - lt: (a: number, b: number) => a < b, - gtEq: (a: number, b: number) => a >= b, - ltEq: (a: number, b: number) => a <= b, - if: (bool: boolean, a: any, b: any) => (bool ? a : b), - for: (times: number, fn: Fn) => { - const result: any[] = []; - for (let i = 0; i < times; i++) { - result.push( - fn.exec({ - [fn.slots[0]]: i + 1, - }), - ); - } - return result; - }, - add: (a: number, b: number) => a + b, - subtract: (a: number, b: number) => a - b, - multiply: (a: number, b: number) => a * b, - divide: (a: number, b: number) => a / b, - mod: (a: number, b: number) => a % b, - round: (a: number) => Math.round(a), - strLen: (a: string) => a.length, - strPick: (a: string, b: number) => a[b - 1], - strReplace: (a: string, b: string, c: string) => a.split(b).join(c), - strReverse: (a: string) => a.split("").reverse().join(""), - join: (texts: string[], separator: string) => texts.join(separator || ""), - stringToNumber: (a: string) => parseInt(a), - numberToString: (a: number) => a.toString(), - splitStrByLine: (a: string) => a.split("\n"), - pick: (list: any[], i: number) => list[i - 1], - listLen: (list: any[]) => list.length, - random: (probability: number) => - Math.floor(seedrandom(`${randomSeed}:${expr.id}`)() * 100) < probability, - rannum: (min: number, max: number) => - min + - Math.floor(seedrandom(`${randomSeed}:${expr.id}`)() * (max - min + 1)), - randomPick: (list: any[]) => - list[Math.floor(seedrandom(`${randomSeed}:${expr.id}`)() * list.length)], - dailyRandom: (probability: number) => - Math.floor(seedrandom(`${day}:${expr.id}`)() * 100) < probability, - dailyRannum: (min: number, max: number) => - min + Math.floor(seedrandom(`${day}:${expr.id}`)() * (max - min + 1)), - dailyRandomPick: (list: any[]) => - list[Math.floor(seedrandom(`${day}:${expr.id}`)() * list.length)], - seedRandom: (seed: any, probability: number) => - Math.floor(seedrandom(seed)() * 100) < probability, - seedRannum: (seed: any, min: number, max: number) => - min + Math.floor(seedrandom(seed)() * (max - min + 1)), - seedRandomPick: (seed: any, list: any[]) => - list[Math.floor(seedrandom(seed)() * list.length)], - DRPWPM: (list: string[]) => { - const xs: any[] = []; - let totalFactor = 0; - for (const x of list) { - const parts = x.split(" "); - const factor = parseInt(parts.pop()!, 10); - const text = parts.join(" "); - totalFactor += factor; - xs.push({ factor, text }); - } - const r = seedrandom(`${day}:${expr.id}`)() * totalFactor; - let stackedFactor = 0; - for (const x of xs) { - if (r >= stackedFactor && r <= stackedFactor + x.factor) { - return x.text; - } else { - stackedFactor += x.factor; - } - } - return xs[0].text; - }, - }; + // SHOULD be fine to ignore since it's intended + function shape isn't defined + const funcs: Record = { + not: (a: boolean) => !a, + or: (a: boolean, b: boolean) => a || b, + and: (a: boolean, b: boolean) => a && b, + eq: (a: any, b: any) => a === b, + notEq: (a: any, b: any) => a !== b, + gt: (a: number, b: number) => a > b, + lt: (a: number, b: number) => a < b, + gtEq: (a: number, b: number) => a >= b, + ltEq: (a: number, b: number) => a <= b, + if: (bool: boolean, a: any, b: any) => (bool ? a : b), + for: (times: number, fn: Fn) => { + const result: any[] = []; + for (let i = 0; i < times; i++) { + result.push( + fn.exec({ + [fn.slots[0]]: i + 1, + }) + ); + } + return result; + }, + add: (a: number, b: number) => a + b, + subtract: (a: number, b: number) => a - b, + multiply: (a: number, b: number) => a * b, + divide: (a: number, b: number) => a / b, + mod: (a: number, b: number) => a % b, + round: (a: number) => Math.round(a), + strLen: (a: string) => a.length, + strPick: (a: string, b: number) => a[b - 1], + strReplace: (a: string, b: string, c: string) => a.split(b).join(c), + strReverse: (a: string) => a.split("").reverse().join(""), + join: (texts: string[], separator: string) => + texts.join(separator || ""), + stringToNumber: (a: string) => parseInt(a), + numberToString: (a: number) => a.toString(), + splitStrByLine: (a: string) => a.split("\n"), + pick: (list: any[], i: number) => list[i - 1], + listLen: (list: any[]) => list.length, + random: (probability: number) => + Math.floor(seedrandom(`${randomSeed}:${expr.id}`)() * 100) < + probability, + rannum: (min: number, max: number) => + min + + Math.floor( + seedrandom(`${randomSeed}:${expr.id}`)() * (max - min + 1) + ), + randomPick: (list: any[]) => + list[ + Math.floor( + seedrandom(`${randomSeed}:${expr.id}`)() * list.length + ) + ], + dailyRandom: (probability: number) => + Math.floor(seedrandom(`${day}:${expr.id}`)() * 100) < probability, + dailyRannum: (min: number, max: number) => + min + + Math.floor(seedrandom(`${day}:${expr.id}`)() * (max - min + 1)), + dailyRandomPick: (list: any[]) => + list[Math.floor(seedrandom(`${day}:${expr.id}`)() * list.length)], + seedRandom: (seed: any, probability: number) => + Math.floor(seedrandom(seed)() * 100) < probability, + seedRannum: (seed: any, min: number, max: number) => + min + Math.floor(seedrandom(seed)() * (max - min + 1)), + seedRandomPick: (seed: any, list: any[]) => + list[Math.floor(seedrandom(seed)() * list.length)], + DRPWPM: (list: string[]) => { + const xs: any[] = []; + let totalFactor = 0; + for (const x of list) { + const parts = x.split(" "); + const factor = parseInt(parts.pop()!, 10); + const text = parts.join(" "); + totalFactor += factor; + xs.push({ factor, text }); + } + const r = seedrandom(`${day}:${expr.id}`)() * totalFactor; + let stackedFactor = 0; + for (const x of xs) { + if (r >= stackedFactor && r <= stackedFactor + x.factor) { + return x.text; + } else { + stackedFactor += x.factor; + } + } + return xs[0].text; + }, + }; - return funcs; + return funcs; } diff --git a/fe_calckey/frontend/client/src/scripts/hpml/type-checker.ts b/fe_calckey/frontend/client/src/scripts/hpml/type-checker.ts index eaae600..1499974 100644 --- a/fe_calckey/frontend/client/src/scripts/hpml/type-checker.ts +++ b/fe_calckey/frontend/client/src/scripts/hpml/type-checker.ts @@ -4,193 +4,193 @@ import { Expr, isLiteralValue, Variable } from "./expr"; import { funcDefs } from "./lib"; type TypeError = { - arg: number; - expect: Type; - actual: Type; + arg: number; + expect: Type; + actual: Type; }; /** * Hpml type checker */ export class HpmlTypeChecker { - public variables: Variable[]; - public pageVars: PageVar[]; + public variables: Variable[]; + public pageVars: PageVar[]; - constructor( - variables: HpmlTypeChecker["variables"] = [], - pageVars: HpmlTypeChecker["pageVars"] = [], - ) { - this.variables = variables; - this.pageVars = pageVars; - } + constructor( + variables: HpmlTypeChecker["variables"] = [], + pageVars: HpmlTypeChecker["pageVars"] = [] + ) { + this.variables = variables; + this.pageVars = pageVars; + } - @autobind - public typeCheck(v: Expr): TypeError | null { - if (isLiteralValue(v)) return null; + @autobind + public typeCheck(v: Expr): TypeError | null { + if (isLiteralValue(v)) return null; - const def = funcDefs[v.type || ""]; - if (def == null) { - throw new Error(`Unknown type: ${v.type}`); - } + const def = funcDefs[v.type || ""]; + if (def == null) { + throw new Error(`Unknown type: ${v.type}`); + } - const generic: Type[] = []; + const generic: Type[] = []; - for (let i = 0; i < def.in.length; i++) { - const arg = def.in[i]; - const type = this.infer(v.args[i]); - if (type === null) continue; + for (let i = 0; i < def.in.length; i++) { + const arg = def.in[i]; + const type = this.infer(v.args[i]); + if (type === null) continue; - if (typeof arg === "number") { - if (generic[arg] === undefined) { - generic[arg] = type; - } else if (type !== generic[arg]) { - return { - arg: i, - expect: generic[arg], - actual: type, - }; - } - } else if (type !== arg) { - return { - arg: i, - expect: arg, - actual: type, - }; - } - } + if (typeof arg === "number") { + if (generic[arg] === undefined) { + generic[arg] = type; + } else if (type !== generic[arg]) { + return { + arg: i, + expect: generic[arg], + actual: type, + }; + } + } else if (type !== arg) { + return { + arg: i, + expect: arg, + actual: type, + }; + } + } - return null; - } + return null; + } - @autobind - public getExpectedType(v: Expr, slot: number): Type { - const def = funcDefs[v.type || ""]; - if (def == null) { - throw new Error(`Unknown type: ${v.type}`); - } + @autobind + public getExpectedType(v: Expr, slot: number): Type { + const def = funcDefs[v.type || ""]; + if (def == null) { + throw new Error(`Unknown type: ${v.type}`); + } - const generic: Type[] = []; + const generic: Type[] = []; - for (let i = 0; i < def.in.length; i++) { - const arg = def.in[i]; - const type = this.infer(v.args[i]); - if (type === null) continue; + for (let i = 0; i < def.in.length; i++) { + const arg = def.in[i]; + const type = this.infer(v.args[i]); + if (type === null) continue; - if (typeof arg === "number") { - if (generic[arg] === undefined) { - generic[arg] = type; - } - } - } + if (typeof arg === "number") { + if (generic[arg] === undefined) { + generic[arg] = type; + } + } + } - if (typeof def.in[slot] === "number") { - return generic[def.in[slot]] || null; - } else { - return def.in[slot]; - } - } + if (typeof def.in[slot] === "number") { + return generic[def.in[slot]] || null; + } else { + return def.in[slot]; + } + } - @autobind - public infer(v: Expr): Type { - if (v.type === null) return null; - if (v.type === "text") return "string"; - if (v.type === "multiLineText") return "string"; - if (v.type === "textList") return "stringArray"; - if (v.type === "number") return "number"; - if (v.type === "ref") { - const variable = this.variables.find((va) => va.name === v.value); - if (variable) { - return this.infer(variable); - } + @autobind + public infer(v: Expr): Type { + if (v.type === null) return null; + if (v.type === "text") return "string"; + if (v.type === "multiLineText") return "string"; + if (v.type === "textList") return "stringArray"; + if (v.type === "number") return "number"; + if (v.type === "ref") { + const variable = this.variables.find((va) => va.name === v.value); + if (variable) { + return this.infer(variable); + } - const pageVar = this.pageVars.find((va) => va.name === v.value); - if (pageVar) { - return pageVar.type; - } + const pageVar = this.pageVars.find((va) => va.name === v.value); + if (pageVar) { + return pageVar.type; + } - const envVar = envVarsDef[v.value || ""]; - if (envVar !== undefined) { - return envVar; - } + const envVar = envVarsDef[v.value || ""]; + if (envVar !== undefined) { + return envVar; + } - return null; - } - if (v.type === "aiScriptVar") return null; - if (v.type === "fn") return null; // todo - if (v.type.startsWith("fn:")) return null; // todo + return null; + } + if (v.type === "aiScriptVar") return null; + if (v.type === "fn") return null; // todo + if (v.type.startsWith("fn:")) return null; // todo - const generic: Type[] = []; + const generic: Type[] = []; - const def = funcDefs[v.type]; + const def = funcDefs[v.type]; - for (let i = 0; i < def.in.length; i++) { - const arg = def.in[i]; - if (typeof arg === "number") { - const type = this.infer(v.args[i]); + for (let i = 0; i < def.in.length; i++) { + const arg = def.in[i]; + if (typeof arg === "number") { + const type = this.infer(v.args[i]); - if (generic[arg] === undefined) { - generic[arg] = type; - } else { - if (type !== generic[arg]) { - generic[arg] = null; - } - } - } - } + if (generic[arg] === undefined) { + generic[arg] = type; + } else { + if (type !== generic[arg]) { + generic[arg] = null; + } + } + } + } - if (typeof def.out === "number") { - return generic[def.out]; - } else { - return def.out; - } - } + if (typeof def.out === "number") { + return generic[def.out]; + } else { + return def.out; + } + } - @autobind - public getVarByName(name: string): Variable { - const v = this.variables.find((x) => x.name === name); - if (v !== undefined) { - return v; - } else { - throw new Error(`No such variable '${name}'`); - } - } + @autobind + public getVarByName(name: string): Variable { + const v = this.variables.find((x) => x.name === name); + if (v !== undefined) { + return v; + } else { + throw new Error(`No such variable '${name}'`); + } + } - @autobind - public getVarsByType(type: Type): Variable[] { - if (type == null) return this.variables; - return this.variables.filter( - (x) => this.infer(x) === null || this.infer(x) === type, - ); - } + @autobind + public getVarsByType(type: Type): Variable[] { + if (type == null) return this.variables; + return this.variables.filter( + (x) => this.infer(x) === null || this.infer(x) === type + ); + } - @autobind - public getEnvVarsByType(type: Type): string[] { - if (type == null) return Object.keys(envVarsDef); - return Object.entries(envVarsDef) - .filter(([k, v]) => v === null || type === v) - .map(([k, v]) => k); - } + @autobind + public getEnvVarsByType(type: Type): string[] { + if (type == null) return Object.keys(envVarsDef); + return Object.entries(envVarsDef) + .filter(([k, v]) => v === null || type === v) + .map(([k, v]) => k); + } - @autobind - public getPageVarsByType(type: Type): string[] { - if (type == null) return this.pageVars.map((v) => v.name); - return this.pageVars.filter((v) => type === v.type).map((v) => v.name); - } + @autobind + public getPageVarsByType(type: Type): string[] { + if (type == null) return this.pageVars.map((v) => v.name); + return this.pageVars.filter((v) => type === v.type).map((v) => v.name); + } - @autobind - public isUsedName(name: string) { - if (this.variables.some((v) => v.name === name)) { - return true; - } + @autobind + public isUsedName(name: string) { + if (this.variables.some((v) => v.name === name)) { + return true; + } - if (this.pageVars.some((v) => v.name === name)) { - return true; - } + if (this.pageVars.some((v) => v.name === name)) { + return true; + } - if (envVarsDef[name]) { - return true; - } + if (envVarsDef[name]) { + return true; + } - return false; - } + return false; + } } diff --git a/fe_calckey/frontend/client/src/scripts/i18n.ts b/fe_calckey/frontend/client/src/scripts/i18n.ts index 8531b79..9bb508e 100644 --- a/fe_calckey/frontend/client/src/scripts/i18n.ts +++ b/fe_calckey/frontend/client/src/scripts/i18n.ts @@ -1,31 +1,31 @@ export class I18n> { - public ts: T; + public ts: T; - constructor(locale: T) { - this.ts = locale; + constructor(locale: T) { + this.ts = locale; - //#region BIND - this.t = this.t.bind(this); - //#endregion - } + //#region BIND + this.t = this.t.bind(this); + //#endregion + } - // string にしているのは、ドット区切りでのパス指定を許可するため - // なるべくこのメソッド使うよりもlocale直接参照の方がvueのキャッシュ効いてパフォーマンスが良いかも - public t(key: string, args?: Record): string { - try { - let str = key - .split(".") - .reduce((o, i) => o[i], this.ts) as unknown as string; + // string にしているのは、ドット区切りでのパス指定を許可するため + // なるべくこのメソッド使うよりもlocale直接参照の方がvueのキャッシュ効いてパフォーマンスが良いかも + public t(key: string, args?: Record): string { + try { + let str = key + .split(".") + .reduce((o, i) => o[i], this.ts) as unknown as string; - if (args) { - for (const [k, v] of Object.entries(args)) { - str = str.replace(`{${k}}`, v.toString()); - } - } - return str; - } catch (err) { - console.warn(`missing localization '${key}'`); - return key; - } - } + if (args) { + for (const [k, v] of Object.entries(args)) { + str = str.replace(`{${k}}`, v.toString()); + } + } + return str; + } catch (err) { + console.warn(`missing localization '${key}'`); + return key; + } + } } diff --git a/fe_calckey/frontend/client/src/scripts/idb-proxy.ts b/fe_calckey/frontend/client/src/scripts/idb-proxy.ts index a85faa0..4d941a1 100644 --- a/fe_calckey/frontend/client/src/scripts/idb-proxy.ts +++ b/fe_calckey/frontend/client/src/scripts/idb-proxy.ts @@ -7,26 +7,26 @@ const fallbackName = (key: string) => `idbfallback::${key}`; let idbAvailable = typeof window !== "undefined" ? !!window.indexedDB : true; if (idbAvailable) { - iset("idb-test", "test").catch((err) => { - console.error("idb error", err); - console.error("indexedDB is unavailable. It will use localStorage."); - idbAvailable = false; - }); + iset("idb-test", "test").catch((err) => { + console.error("idb error", err); + console.error("indexedDB is unavailable. It will use localStorage."); + idbAvailable = false; + }); } else { - console.error("indexedDB is unavailable. It will use localStorage."); + console.error("indexedDB is unavailable. It will use localStorage."); } export async function get(key: string) { - if (idbAvailable) return iget(key); - return JSON.parse(localStorage.getItem(fallbackName(key))); + if (idbAvailable) return iget(key); + return JSON.parse(localStorage.getItem(fallbackName(key))); } export async function set(key: string, val: any) { - if (idbAvailable) return iset(key, val); - return localStorage.setItem(fallbackName(key), JSON.stringify(val)); + if (idbAvailable) return iset(key, val); + return localStorage.setItem(fallbackName(key), JSON.stringify(val)); } export async function del(key: string) { - if (idbAvailable) return idel(key); - return localStorage.removeItem(fallbackName(key)); + if (idbAvailable) return idel(key); + return localStorage.removeItem(fallbackName(key)); } diff --git a/fe_calckey/frontend/client/src/scripts/index-posts.ts b/fe_calckey/frontend/client/src/scripts/index-posts.ts index 94b545e..8e8fec5 100644 --- a/fe_calckey/frontend/client/src/scripts/index-posts.ts +++ b/fe_calckey/frontend/client/src/scripts/index-posts.ts @@ -2,25 +2,25 @@ import { i18n } from "@/i18n"; import * as os from "@/os"; export async function indexPosts() { - const { canceled, result: index } = await os.inputText({ - title: i18n.ts.indexFrom, - text: i18n.ts.indexFromDescription, - }); - if (canceled) return; + const { canceled, result: index } = await os.inputText({ + title: i18n.ts.indexFrom, + text: i18n.ts.indexFromDescription, + }); + if (canceled) return; - if (index == null || index === "") { - await os.api("admin/search/index-all"); - await os.alert({ - type: "info", - text: i18n.ts.indexNotice, - }); - } else { - await os.api("admin/search/index-all", { - cursor: index, - }); - await os.alert({ - type: "info", - text: i18n.ts.indexNotice, - }); - } + if (index == null || index === "") { + await os.api("admin/search/index-all"); + await os.alert({ + type: "info", + text: i18n.ts.indexNotice, + }); + } else { + await os.api("admin/search/index-all", { + cursor: index, + }); + await os.alert({ + type: "info", + text: i18n.ts.indexNotice, + }); + } } diff --git a/fe_calckey/frontend/client/src/scripts/init-chart.ts b/fe_calckey/frontend/client/src/scripts/init-chart.ts index 32adf73..e58763b 100644 --- a/fe_calckey/frontend/client/src/scripts/init-chart.ts +++ b/fe_calckey/frontend/client/src/scripts/init-chart.ts @@ -1,20 +1,20 @@ import { - Chart, - ArcElement, - LineElement, - BarElement, - PointElement, - BarController, - LineController, - DoughnutController, - CategoryScale, - LinearScale, - TimeScale, - Legend, - Title, - Tooltip, - SubTitle, - Filler, + Chart, + ArcElement, + LineElement, + BarElement, + PointElement, + BarController, + LineController, + DoughnutController, + CategoryScale, + LinearScale, + TimeScale, + Legend, + Title, + Tooltip, + SubTitle, + Filler, } from "chart.js"; import gradient from "chartjs-plugin-gradient"; import zoomPlugin from "chartjs-plugin-zoom"; @@ -23,36 +23,36 @@ import { defaultStore } from "@/store"; import "chartjs-adapter-date-fns"; export function initChart() { - Chart.register( - ArcElement, - LineElement, - BarElement, - PointElement, - BarController, - LineController, - DoughnutController, - CategoryScale, - LinearScale, - TimeScale, - Legend, - Title, - Tooltip, - SubTitle, - Filler, - MatrixController, - MatrixElement, - zoomPlugin, - gradient, - ); + Chart.register( + ArcElement, + LineElement, + BarElement, + PointElement, + BarController, + LineController, + DoughnutController, + CategoryScale, + LinearScale, + TimeScale, + Legend, + Title, + Tooltip, + SubTitle, + Filler, + MatrixController, + MatrixElement, + zoomPlugin, + gradient + ); - // フォントカラー - Chart.defaults.color = getComputedStyle( - document.documentElement, - ).getPropertyValue("--fg"); + // フォントカラー + Chart.defaults.color = getComputedStyle( + document.documentElement + ).getPropertyValue("--fg"); - Chart.defaults.borderColor = defaultStore.state.darkMode - ? "rgba(255, 255, 255, 0.1)" - : "rgba(0, 0, 0, 0.1)"; + Chart.defaults.borderColor = defaultStore.state.darkMode + ? "rgba(255, 255, 255, 0.1)" + : "rgba(0, 0, 0, 0.1)"; - Chart.defaults.animation = false; + Chart.defaults.animation = false; } diff --git a/fe_calckey/frontend/client/src/scripts/initialize-sw.ts b/fe_calckey/frontend/client/src/scripts/initialize-sw.ts index 737f865..d03a6c6 100644 --- a/fe_calckey/frontend/client/src/scripts/initialize-sw.ts +++ b/fe_calckey/frontend/client/src/scripts/initialize-sw.ts @@ -1,13 +1,13 @@ import { lang } from "@/config"; export async function initializeSw() { - if (!("serviceWorker" in navigator)) return; + if (!("serviceWorker" in navigator)) return; - navigator.serviceWorker.register("/sw.js", { scope: "/", type: "classic" }); - navigator.serviceWorker.ready.then((registration) => { - registration.active?.postMessage({ - msg: "initialize", - lang, - }); - }); + navigator.serviceWorker.register("/sw.js", { scope: "/", type: "classic" }); + navigator.serviceWorker.ready.then((registration) => { + registration.active?.postMessage({ + msg: "initialize", + lang, + }); + }); } diff --git a/fe_calckey/frontend/client/src/scripts/intl-const.ts b/fe_calckey/frontend/client/src/scripts/intl-const.ts index ac73723..8571bf5 100644 --- a/fe_calckey/frontend/client/src/scripts/intl-const.ts +++ b/fe_calckey/frontend/client/src/scripts/intl-const.ts @@ -2,11 +2,11 @@ import { lang } from "@/config"; export const versatileLang = (lang ?? "ja-JP").replace("ja-KS", "ja-JP"); export const dateTimeFormat = new Intl.DateTimeFormat(versatileLang, { - year: "numeric", - month: "numeric", - day: "numeric", - hour: "numeric", - minute: "numeric", - second: "numeric", + year: "numeric", + month: "numeric", + day: "numeric", + hour: "numeric", + minute: "numeric", + second: "numeric", }); export const numberFormat = new Intl.NumberFormat(versatileLang); diff --git a/fe_calckey/frontend/client/src/scripts/is-device-darkmode.ts b/fe_calckey/frontend/client/src/scripts/is-device-darkmode.ts index 0f38515..ad0bc81 100644 --- a/fe_calckey/frontend/client/src/scripts/is-device-darkmode.ts +++ b/fe_calckey/frontend/client/src/scripts/is-device-darkmode.ts @@ -1,3 +1,3 @@ export function isDeviceDarkmode() { - return window.matchMedia("(prefers-color-scheme: dark)").matches; + return window.matchMedia("(prefers-color-scheme: dark)").matches; } diff --git a/fe_calckey/frontend/client/src/scripts/katex-macro.ts b/fe_calckey/frontend/client/src/scripts/katex-macro.ts index f91e657..3fe833d 100644 --- a/fe_calckey/frontend/client/src/scripts/katex-macro.ts +++ b/fe_calckey/frontend/client/src/scripts/katex-macro.ts @@ -1,319 +1,323 @@ type KaTeXMacro = { - args: number; - rule: (string | number)[]; + args: number; + rule: (string | number)[]; }; function parseSingleKaTeXMacro(src: string): [string, KaTeXMacro] { - const invalid: [string, KaTeXMacro] = ["", { args: 0, rule: [] }]; + const invalid: [string, KaTeXMacro] = ["", { args: 0, rule: [] }]; - const skipSpaces = (pos: number): number => { - while (src[pos] === " ") ++pos; - return pos; - }; + const skipSpaces = (pos: number): number => { + while (src[pos] === " ") ++pos; + return pos; + }; - if (!src.startsWith("\\newcommand") || src.slice(-1) !== "}") return invalid; + if (!src.startsWith("\\newcommand") || src.slice(-1) !== "}") + return invalid; - // current index we are checking (= "\\newcommand".length) - let currentPos = 11; - currentPos = skipSpaces(currentPos); + // current index we are checking (= "\\newcommand".length) + let currentPos = 11; + currentPos = skipSpaces(currentPos); - // parse {\name}, (\name), or [\name] - let bracket: string; - if (src[currentPos] === "{") bracket = "{}"; - else if (src[currentPos] === "(") bracket = "()"; - else if (src[currentPos] === "[") bracket = "[]"; - else return invalid; + // parse {\name}, (\name), or [\name] + let bracket: string; + if (src[currentPos] === "{") bracket = "{}"; + else if (src[currentPos] === "(") bracket = "()"; + else if (src[currentPos] === "[") bracket = "[]"; + else return invalid; - ++currentPos; - currentPos = skipSpaces(currentPos); + ++currentPos; + currentPos = skipSpaces(currentPos); - if (src[currentPos] !== "\\") return invalid; + if (src[currentPos] !== "\\") return invalid; - const closeNameBracketPos: number = src.indexOf(bracket[1], currentPos); - if (closeNameBracketPos === -1) return invalid; + const closeNameBracketPos: number = src.indexOf(bracket[1], currentPos); + if (closeNameBracketPos === -1) return invalid; - const name: string = src.slice(currentPos + 1, closeNameBracketPos).trim(); - if (!/^[a-zA-Z]+$/.test(name)) return invalid; + const name: string = src.slice(currentPos + 1, closeNameBracketPos).trim(); + if (!/^[a-zA-Z]+$/.test(name)) return invalid; - currentPos = skipSpaces(closeNameBracketPos + 1); + currentPos = skipSpaces(closeNameBracketPos + 1); - let macro: KaTeXMacro = { args: 0, rule: [] }; + let macro: KaTeXMacro = { args: 0, rule: [] }; - // parse [number of arguments] (optional) - if (src[currentPos] === "[") { - const closeArgsBracketPos: number = src.indexOf("]", currentPos); - macro.args = Number(src.slice(currentPos + 1, closeArgsBracketPos).trim()); - currentPos = closeArgsBracketPos + 1; + // parse [number of arguments] (optional) + if (src[currentPos] === "[") { + const closeArgsBracketPos: number = src.indexOf("]", currentPos); + macro.args = Number( + src.slice(currentPos + 1, closeArgsBracketPos).trim() + ); + currentPos = closeArgsBracketPos + 1; - if (Number.isNaN(macro.args) || macro.args < 0) return invalid; - } else if (src[currentPos] === "{") { - macro.args = 0; - } else { - return invalid; - } + if (Number.isNaN(macro.args) || macro.args < 0) return invalid; + } else if (src[currentPos] === "{") { + macro.args = 0; + } else { + return invalid; + } - currentPos = skipSpaces(currentPos); + currentPos = skipSpaces(currentPos); - // parse {rule} - if (src[currentPos] !== "{") return invalid; + // parse {rule} + if (src[currentPos] !== "{") return invalid; - ++currentPos; - currentPos = skipSpaces(currentPos); + ++currentPos; + currentPos = skipSpaces(currentPos); - while (currentPos < src.length - 1) { - let numbersignPos = -1; - let isEscaped = false; + while (currentPos < src.length - 1) { + let numbersignPos = -1; + let isEscaped = false; - for (let i = currentPos; i < src.length - 1; ++i) { - if (src[i] !== "\\" && src[i] !== "#") { - isEscaped = false; - continue; - } - if (src[i] === "\\") { - isEscaped = !isEscaped; - continue; - } - if (!isEscaped && src[i] === "#") { - numbersignPos = i; - break; - } - } - if (numbersignPos === -1) { - macro.rule.push(src.slice(currentPos, -1)); - break; - } + for (let i = currentPos; i < src.length - 1; ++i) { + if (src[i] !== "\\" && src[i] !== "#") { + isEscaped = false; + continue; + } + if (src[i] === "\\") { + isEscaped = !isEscaped; + continue; + } + if (!isEscaped && src[i] === "#") { + numbersignPos = i; + break; + } + } + if (numbersignPos === -1) { + macro.rule.push(src.slice(currentPos, -1)); + break; + } - const argIndexEndPos = - src.slice(numbersignPos + 1).search(/[^\d]/) + numbersignPos; - const argIndex: number = Number( - src.slice(numbersignPos + 1, argIndexEndPos + 1), - ); + const argIndexEndPos = + src.slice(numbersignPos + 1).search(/[^\d]/) + numbersignPos; + const argIndex: number = Number( + src.slice(numbersignPos + 1, argIndexEndPos + 1) + ); - if (Number.isNaN(argIndex) || argIndex < 1 || macro.args < argIndex) - return invalid; + if (Number.isNaN(argIndex) || argIndex < 1 || macro.args < argIndex) + return invalid; - if (currentPos !== numbersignPos) - macro.rule.push(src.slice(currentPos, numbersignPos)); - macro.rule.push(argIndex); + if (currentPos !== numbersignPos) + macro.rule.push(src.slice(currentPos, numbersignPos)); + macro.rule.push(argIndex); - currentPos = argIndexEndPos + 1; - } + currentPos = argIndexEndPos + 1; + } - if (macro.args === 0) return [name, macro]; - else return [name + bracket[0], macro]; + if (macro.args === 0) return [name, macro]; + else return [name + bracket[0], macro]; } export function parseKaTeXMacros(src: string): string { - let result: { [name: string]: KaTeXMacro } = {}; + let result: { [name: string]: KaTeXMacro } = {}; - for (const s of src.split("\n")) { - const [name, macro]: [string, KaTeXMacro] = parseSingleKaTeXMacro(s.trim()); - if (name !== "") result[name] = macro; - } + for (const s of src.split("\n")) { + const [name, macro]: [string, KaTeXMacro] = parseSingleKaTeXMacro( + s.trim() + ); + if (name !== "") result[name] = macro; + } - return JSON.stringify(result); + return JSON.stringify(result); } // returns [expanded text, whether something is expanded, how many times we can expand more] // the boolean value is used for multi-pass expansions (macros can expand to other macros) function expandKaTeXMacroOnce( - src: string, - macros: { [name: string]: KaTeXMacro }, - maxNumberOfExpansions: number, + src: string, + macros: { [name: string]: KaTeXMacro }, + maxNumberOfExpansions: number ): [string, boolean, number] { - const bracketKinds = 3; - const openBracketId: { [bracket: string]: number } = { - "(": 0, - "{": 1, - "[": 2, - }; - const closeBracketId: { [bracket: string]: number } = { - ")": 0, - "}": 1, - "]": 2, - }; - const openBracketFromId = ["(", "{", "["]; - const closeBracketFromId = [")", "}", "]"]; + const bracketKinds = 3; + const openBracketId: { [bracket: string]: number } = { + "(": 0, + "{": 1, + "[": 2, + }; + const closeBracketId: { [bracket: string]: number } = { + ")": 0, + "}": 1, + "]": 2, + }; + const openBracketFromId = ["(", "{", "["]; + const closeBracketFromId = [")", "}", "]"]; - // mappings from open brackets to their corresponding close brackets - type BracketMapping = { [openBracketPos: number]: number }; + // mappings from open brackets to their corresponding close brackets + type BracketMapping = { [openBracketPos: number]: number }; - const bracketMapping = ((): BracketMapping => { - let result: BracketMapping = {}; - const n = src.length; + const bracketMapping = ((): BracketMapping => { + let result: BracketMapping = {}; + const n = src.length; - let depths = new Array(bracketKinds).fill(0); // current bracket depth for "()", "{}", and "[]" - let buffer = Array.from(Array(bracketKinds), () => - Array(n), - ); + let depths = new Array(bracketKinds).fill(0); // current bracket depth for "()", "{}", and "[]" + let buffer = Array.from(Array(bracketKinds), () => + Array(n) + ); - let isEscaped = false; + let isEscaped = false; - for (let i = 0; i < n; ++i) { - if ( - !isEscaped && - src[i] === "\\" && - i + 1 < n && - ["{", "}", "\\"].includes(src[i + 1]) - ) { - isEscaped = true; - continue; - } - if ( - isEscaped || - (src[i] !== "\\" && - !openBracketFromId.includes(src[i]) && - !closeBracketFromId.includes(src[i])) - ) { - isEscaped = false; - continue; - } - isEscaped = false; + for (let i = 0; i < n; ++i) { + if ( + !isEscaped && + src[i] === "\\" && + i + 1 < n && + ["{", "}", "\\"].includes(src[i + 1]) + ) { + isEscaped = true; + continue; + } + if ( + isEscaped || + (src[i] !== "\\" && + !openBracketFromId.includes(src[i]) && + !closeBracketFromId.includes(src[i])) + ) { + isEscaped = false; + continue; + } + isEscaped = false; - if (openBracketFromId.includes(src[i])) { - const id: number = openBracketId[src[i]]; - buffer[id][depths[id]] = i; - ++depths[id]; - } else if (closeBracketFromId.includes(src[i])) { - const id: number = closeBracketId[src[i]]; - if (depths[id] > 0) { - --depths[id]; - result[buffer[id][depths[id]]] = i; - } - } - } + if (openBracketFromId.includes(src[i])) { + const id: number = openBracketId[src[i]]; + buffer[id][depths[id]] = i; + ++depths[id]; + } else if (closeBracketFromId.includes(src[i])) { + const id: number = closeBracketId[src[i]]; + if (depths[id] > 0) { + --depths[id]; + result[buffer[id][depths[id]]] = i; + } + } + } - return result; - })(); + return result; + })(); - function expandSingleKaTeXMacro( - expandedArgs: string[], - macroName: string, - ): string { - let result = ""; - for (const block of macros[macroName].rule) { - if (typeof block === "string") result += block; - else result += expandedArgs[block - 1]; - } - return result; - } + function expandSingleKaTeXMacro( + expandedArgs: string[], + macroName: string + ): string { + let result = ""; + for (const block of macros[macroName].rule) { + if (typeof block === "string") result += block; + else result += expandedArgs[block - 1]; + } + return result; + } - // only expand src.slice(beginPos, endPos) - function expandKaTeXMacroImpl( - beginPos: number, - endPos: number, - ): [string, boolean] { - if (endPos <= beginPos) return ["", false]; + // only expand src.slice(beginPos, endPos) + function expandKaTeXMacroImpl( + beginPos: number, + endPos: number + ): [string, boolean] { + if (endPos <= beginPos) return ["", false]; - const raw: string = src.slice(beginPos, endPos); - const fallback: string = raw; // returned for invalid inputs or too many expansions + const raw: string = src.slice(beginPos, endPos); + const fallback: string = raw; // returned for invalid inputs or too many expansions - if (maxNumberOfExpansions <= 0) return [fallback, false]; - --maxNumberOfExpansions; + if (maxNumberOfExpansions <= 0) return [fallback, false]; + --maxNumberOfExpansions; - // search for a custom macro - let checkedPos = beginPos - 1; - let macroName = ""; - let macroBackslashPos = 0; + // search for a custom macro + let checkedPos = beginPos - 1; + let macroName = ""; + let macroBackslashPos = 0; - // for macros w/o args: unused - // w/ args: the first open bracket ("(", "{", or "[") after cmd name - let macroArgBeginPos = 0; + // for macros w/o args: unused + // w/ args: the first open bracket ("(", "{", or "[") after cmd name + let macroArgBeginPos = 0; - // for macros w/o args: the end of cmd name - // w/ args: the closing bracket of the last arg - let macroArgEndPos = 0; + // for macros w/o args: the end of cmd name + // w/ args: the closing bracket of the last arg + let macroArgEndPos = 0; - while (checkedPos < endPos) { - checkedPos = src.indexOf("\\", checkedPos + 1); + while (checkedPos < endPos) { + checkedPos = src.indexOf("\\", checkedPos + 1); - // there is no macro to expand - if (checkedPos === -1) return [raw, false]; + // there is no macro to expand + if (checkedPos === -1) return [raw, false]; - // is it a custom macro? - let nonAlphaPos = - src.slice(checkedPos + 1).search(/[^A-Za-z]/) + checkedPos + 1; + // is it a custom macro? + let nonAlphaPos = + src.slice(checkedPos + 1).search(/[^A-Za-z]/) + checkedPos + 1; - if (nonAlphaPos === checkedPos) nonAlphaPos = endPos; + if (nonAlphaPos === checkedPos) nonAlphaPos = endPos; - let macroNameCandidate = src.slice(checkedPos + 1, nonAlphaPos); - if (macros.hasOwnProperty(macroNameCandidate)) { - // this is a custom macro without args - macroBackslashPos = checkedPos; - macroArgEndPos = nonAlphaPos - 1; - macroName = macroNameCandidate; - break; - } + let macroNameCandidate = src.slice(checkedPos + 1, nonAlphaPos); + if (macros.hasOwnProperty(macroNameCandidate)) { + // this is a custom macro without args + macroBackslashPos = checkedPos; + macroArgEndPos = nonAlphaPos - 1; + macroName = macroNameCandidate; + break; + } - let nextOpenBracketPos = endPos; - for (let i = 0; i < bracketKinds; ++i) { - const pos = src.indexOf(openBracketFromId[i], checkedPos + 1); - if (pos !== -1 && pos < nextOpenBracketPos) nextOpenBracketPos = pos; - } + let nextOpenBracketPos = endPos; + for (let i = 0; i < bracketKinds; ++i) { + const pos = src.indexOf(openBracketFromId[i], checkedPos + 1); + if (pos !== -1 && pos < nextOpenBracketPos) + nextOpenBracketPos = pos; + } - if (nextOpenBracketPos === endPos) continue; // there is no open bracket + if (nextOpenBracketPos === endPos) continue; // there is no open bracket - macroNameCandidate += src[nextOpenBracketPos]; + macroNameCandidate += src[nextOpenBracketPos]; - if (macros.hasOwnProperty(macroNameCandidate)) { - macroBackslashPos = checkedPos; - macroArgBeginPos = nextOpenBracketPos; - macroArgEndPos = nextOpenBracketPos; // to search the first arg from here - macroName = macroNameCandidate; - break; - } - } + if (macros.hasOwnProperty(macroNameCandidate)) { + macroBackslashPos = checkedPos; + macroArgBeginPos = nextOpenBracketPos; + macroArgEndPos = nextOpenBracketPos; // to search the first arg from here + macroName = macroNameCandidate; + break; + } + } - if (!macros.hasOwnProperty(macroName)) return [fallback, false]; + if (!macros.hasOwnProperty(macroName)) return [fallback, false]; - const numArgs: number = macros[macroName].args; - const openBracket: string = macroName.slice(-1); + const numArgs: number = macros[macroName].args; + const openBracket: string = macroName.slice(-1); - let expandedArgs = new Array(numArgs); + let expandedArgs = new Array(numArgs); - for (let i = 0; i < numArgs; ++i) { - // find the first open bracket after what we've searched - const nextOpenBracketPos = src.indexOf(openBracket, macroArgEndPos); - if (nextOpenBracketPos === -1) return [fallback, false]; // not enough arguments are provided - if (!bracketMapping[nextOpenBracketPos]) return [fallback, false]; // found open bracket doesn't correspond to any close bracket + for (let i = 0; i < numArgs; ++i) { + // find the first open bracket after what we've searched + const nextOpenBracketPos = src.indexOf(openBracket, macroArgEndPos); + if (nextOpenBracketPos === -1) return [fallback, false]; // not enough arguments are provided + if (!bracketMapping[nextOpenBracketPos]) return [fallback, false]; // found open bracket doesn't correspond to any close bracket - macroArgEndPos = bracketMapping[nextOpenBracketPos]; - expandedArgs[i] = expandKaTeXMacroImpl( - nextOpenBracketPos + 1, - macroArgEndPos, - )[0]; - } + macroArgEndPos = bracketMapping[nextOpenBracketPos]; + expandedArgs[i] = expandKaTeXMacroImpl( + nextOpenBracketPos + 1, + macroArgEndPos + )[0]; + } - return [ - src.slice(beginPos, macroBackslashPos) + - expandSingleKaTeXMacro(expandedArgs, macroName) + - expandKaTeXMacroImpl(macroArgEndPos + 1, endPos)[0], - true, - ]; - } + return [ + src.slice(beginPos, macroBackslashPos) + + expandSingleKaTeXMacro(expandedArgs, macroName) + + expandKaTeXMacroImpl(macroArgEndPos + 1, endPos)[0], + true, + ]; + } - const [expandedText, expandedFlag]: [string, boolean] = expandKaTeXMacroImpl( - 0, - src.length, - ); - return [expandedText, expandedFlag, maxNumberOfExpansions]; + const [expandedText, expandedFlag]: [string, boolean] = + expandKaTeXMacroImpl(0, src.length); + return [expandedText, expandedFlag, maxNumberOfExpansions]; } export function expandKaTeXMacro( - src: string, - macrosAsJSONString: string, - maxNumberOfExpansions: number, + src: string, + macrosAsJSONString: string, + maxNumberOfExpansions: number ): string { - const macros = JSON.parse(macrosAsJSONString); + const macros = JSON.parse(macrosAsJSONString); - let expandMore = true; + let expandMore = true; - while (expandMore && 0 < maxNumberOfExpansions) - [src, expandMore, maxNumberOfExpansions] = expandKaTeXMacroOnce( - src, - macros, - maxNumberOfExpansions, - ); + while (expandMore && 0 < maxNumberOfExpansions) + [src, expandMore, maxNumberOfExpansions] = expandKaTeXMacroOnce( + src, + macros, + maxNumberOfExpansions + ); - return src; + return src; } diff --git a/fe_calckey/frontend/client/src/scripts/keycode.ts b/fe_calckey/frontend/client/src/scripts/keycode.ts index 1cbaa7a..540eb34 100644 --- a/fe_calckey/frontend/client/src/scripts/keycode.ts +++ b/fe_calckey/frontend/client/src/scripts/keycode.ts @@ -1,22 +1,24 @@ export default (input: string): string[] => { - if ( - Object.keys(aliases).some((a) => a.toLowerCase() === input.toLowerCase()) - ) { - const codes = aliases[input]; - return Array.isArray(codes) ? codes : [codes]; - } else { - return [input]; - } + if ( + Object.keys(aliases).some( + (a) => a.toLowerCase() === input.toLowerCase() + ) + ) { + const codes = aliases[input]; + return Array.isArray(codes) ? codes : [codes]; + } else { + return [input]; + } }; export const aliases = { - esc: "Escape", - enter: ["Enter", "NumpadEnter"], - up: "ArrowUp", - down: "ArrowDown", - left: "ArrowLeft", - right: "ArrowRight", - plus: ["NumpadAdd", "Semicolon"], + esc: "Escape", + enter: ["Enter", "NumpadEnter"], + up: "ArrowUp", + down: "ArrowDown", + left: "ArrowLeft", + right: "ArrowRight", + plus: ["NumpadAdd", "Semicolon"], }; /*! @@ -25,11 +27,11 @@ export const aliases = { // lower case chars for (let i = 97; i < 123; i++) { - const char = String.fromCharCode(i); - aliases[char] = `Key${char.toUpperCase()}`; + const char = String.fromCharCode(i); + aliases[char] = `Key${char.toUpperCase()}`; } // numbers for (let i = 0; i < 10; i++) { - aliases[i] = [`Numpad${i}`, `Digit${i}`]; + aliases[i] = [`Numpad${i}`, `Digit${i}`]; } diff --git a/fe_calckey/frontend/client/src/scripts/langmap.ts b/fe_calckey/frontend/client/src/scripts/langmap.ts index 0831aec..8e8be20 100644 --- a/fe_calckey/frontend/client/src/scripts/langmap.ts +++ b/fe_calckey/frontend/client/src/scripts/langmap.ts @@ -1,666 +1,666 @@ // TODO: sharedに置いてバックエンドのと統合したい export const langmap = { - ach: { - nativeName: "Lwo", - }, - ady: { - nativeName: "Адыгэбзэ", - }, - af: { - nativeName: "Afrikaans", - }, - "af-NA": { - nativeName: "Afrikaans (Namibia)", - }, - "af-ZA": { - nativeName: "Afrikaans (South Africa)", - }, - ak: { - nativeName: "Tɕɥi", - }, - ar: { - nativeName: "العربية", - }, - "ar-AR": { - nativeName: "العربية", - }, - "ar-MA": { - nativeName: "العربية", - }, - "ar-SA": { - nativeName: "العربية (السعودية)", - }, - "ay-BO": { - nativeName: "Aymar aru", - }, - az: { - nativeName: "Azərbaycan dili", - }, - "az-AZ": { - nativeName: "Azərbaycan dili", - }, - "be-BY": { - nativeName: "Беларуская", - }, - bg: { - nativeName: "Български", - }, - "bg-BG": { - nativeName: "Български", - }, - bn: { - nativeName: "বাংলা", - }, - "bn-IN": { - nativeName: "বাংলা (ভারত)", - }, - "bn-BD": { - nativeName: "বাংলা(বাংলাদেশ)", - }, - br: { - nativeName: "Brezhoneg", - }, - "bs-BA": { - nativeName: "Bosanski", - }, - ca: { - nativeName: "Català", - }, - "ca-ES": { - nativeName: "Català", - }, - cak: { - nativeName: "Maya Kaqchikel", - }, - "ck-US": { - nativeName: "ᏣᎳᎩ (tsalagi)", - }, - cs: { - nativeName: "Čeština", - }, - "cs-CZ": { - nativeName: "Čeština", - }, - cy: { - nativeName: "Cymraeg", - }, - "cy-GB": { - nativeName: "Cymraeg", - }, - da: { - nativeName: "Dansk", - }, - "da-DK": { - nativeName: "Dansk", - }, - de: { - nativeName: "Deutsch", - }, - "de-AT": { - nativeName: "Deutsch (Österreich)", - }, - "de-DE": { - nativeName: "Deutsch (Deutschland)", - }, - "de-CH": { - nativeName: "Deutsch (Schweiz)", - }, - dsb: { - nativeName: "Dolnoserbšćina", - }, - el: { - nativeName: "Ελληνικά", - }, - "el-GR": { - nativeName: "Ελληνικά", - }, - en: { - nativeName: "English", - }, - "en-GB": { - nativeName: "English (UK)", - }, - "en-AU": { - nativeName: "English (Australia)", - }, - "en-CA": { - nativeName: "English (Canada)", - }, - "en-IE": { - nativeName: "English (Ireland)", - }, - "en-IN": { - nativeName: "English (India)", - }, - "en-PI": { - nativeName: "English (Pirate)", - }, - "en-SG": { - nativeName: "English (Singapore)", - }, - "en-UD": { - nativeName: "English (Upside Down)", - }, - "en-US": { - nativeName: "English (US)", - }, - "en-ZA": { - nativeName: "English (South Africa)", - }, - "en@pirate": { - nativeName: "English (Pirate)", - }, - eo: { - nativeName: "Esperanto", - }, - "eo-EO": { - nativeName: "Esperanto", - }, - es: { - nativeName: "Español", - }, - "es-AR": { - nativeName: "Español (Argentine)", - }, - "es-419": { - nativeName: "Español (Latinoamérica)", - }, - "es-CL": { - nativeName: "Español (Chile)", - }, - "es-CO": { - nativeName: "Español (Colombia)", - }, - "es-EC": { - nativeName: "Español (Ecuador)", - }, - "es-ES": { - nativeName: "Español (España)", - }, - "es-LA": { - nativeName: "Español (Latinoamérica)", - }, - "es-NI": { - nativeName: "Español (Nicaragua)", - }, - "es-MX": { - nativeName: "Español (México)", - }, - "es-US": { - nativeName: "Español (Estados Unidos)", - }, - "es-VE": { - nativeName: "Español (Venezuela)", - }, - et: { - nativeName: "eesti keel", - }, - "et-EE": { - nativeName: "Eesti (Estonia)", - }, - eu: { - nativeName: "Euskara", - }, - "eu-ES": { - nativeName: "Euskara", - }, - fa: { - nativeName: "فارسی", - }, - "fa-IR": { - nativeName: "فارسی", - }, - "fb-LT": { - nativeName: "Leet Speak", - }, - ff: { - nativeName: "Fulah", - }, - fi: { - nativeName: "Suomi", - }, - "fi-FI": { - nativeName: "Suomi", - }, - fo: { - nativeName: "Føroyskt", - }, - "fo-FO": { - nativeName: "Føroyskt (Færeyjar)", - }, - fr: { - nativeName: "Français", - }, - "fr-CA": { - nativeName: "Français (Canada)", - }, - "fr-FR": { - nativeName: "Français (France)", - }, - "fr-BE": { - nativeName: "Français (Belgique)", - }, - "fr-CH": { - nativeName: "Français (Suisse)", - }, - "fy-NL": { - nativeName: "Frysk", - }, - ga: { - nativeName: "Gaeilge", - }, - "ga-IE": { - nativeName: "Gaeilge", - }, - gd: { - nativeName: "Gàidhlig", - }, - gl: { - nativeName: "Galego", - }, - "gl-ES": { - nativeName: "Galego", - }, - "gn-PY": { - nativeName: "Avañe'ẽ", - }, - "gu-IN": { - nativeName: "ગુજરાતી", - }, - gv: { - nativeName: "Gaelg", - }, - "gx-GR": { - nativeName: "Ἑλληνική ἀρχαία", - }, - he: { - nativeName: "עברית‏", - }, - "he-IL": { - nativeName: "עברית‏", - }, - hi: { - nativeName: "हिन्दी", - }, - "hi-IN": { - nativeName: "हिन्दी", - }, - hr: { - nativeName: "Hrvatski", - }, - "hr-HR": { - nativeName: "Hrvatski", - }, - hsb: { - nativeName: "Hornjoserbšćina", - }, - ht: { - nativeName: "Kreyòl", - }, - hu: { - nativeName: "Magyar", - }, - "hu-HU": { - nativeName: "Magyar", - }, - hy: { - nativeName: "Հայերեն", - }, - "hy-AM": { - nativeName: "Հայերեն (Հայաստան)", - }, - id: { - nativeName: "Bahasa Indonesia", - }, - "id-ID": { - nativeName: "Bahasa Indonesia", - }, - is: { - nativeName: "Íslenska", - }, - "is-IS": { - nativeName: "Íslenska (Iceland)", - }, - it: { - nativeName: "Italiano", - }, - "it-IT": { - nativeName: "Italiano", - }, - ja: { - nativeName: "日本語", - }, - "ja-JP": { - nativeName: "日本語 (日本)", - }, - "jv-ID": { - nativeName: "Basa Jawa", - }, - "ka-GE": { - nativeName: "ქართული", - }, - "kk-KZ": { - nativeName: "Қазақша", - }, - km: { - nativeName: "ភាសាខ្មែរ", - }, - kl: { - nativeName: "kalaallisut", - }, - "km-KH": { - nativeName: "ភាសាខ្មែរ", - }, - kab: { - nativeName: "Taqbaylit", - }, - kn: { - nativeName: "ಕನ್ನಡ", - }, - "kn-IN": { - nativeName: "ಕನ್ನಡ (India)", - }, - ko: { - nativeName: "한국어", - }, - "ko-KR": { - nativeName: "한국어 (한국)", - }, - "ku-TR": { - nativeName: "Kurdî", - }, - kw: { - nativeName: "Kernewek", - }, - la: { - nativeName: "Latin", - }, - "la-VA": { - nativeName: "Latin", - }, - lb: { - nativeName: "Lëtzebuergesch", - }, - "li-NL": { - nativeName: "Lèmbörgs", - }, - lt: { - nativeName: "Lietuvių", - }, - "lt-LT": { - nativeName: "Lietuvių", - }, - lv: { - nativeName: "Latviešu", - }, - "lv-LV": { - nativeName: "Latviešu", - }, - mai: { - nativeName: "मैथिली, মৈথিলী", - }, - "mg-MG": { - nativeName: "Malagasy", - }, - mk: { - nativeName: "Македонски", - }, - "mk-MK": { - nativeName: "Македонски (Македонски)", - }, - ml: { - nativeName: "മലയാളം", - }, - "ml-IN": { - nativeName: "മലയാളം", - }, - "mn-MN": { - nativeName: "Монгол", - }, - mr: { - nativeName: "मराठी", - }, - "mr-IN": { - nativeName: "मराठी", - }, - ms: { - nativeName: "Bahasa Melayu", - }, - "ms-MY": { - nativeName: "Bahasa Melayu", - }, - mt: { - nativeName: "Malti", - }, - "mt-MT": { - nativeName: "Malti", - }, - my: { - nativeName: "ဗမာစကာ", - }, - no: { - nativeName: "Norsk", - }, - nb: { - nativeName: "Norsk (bokmål)", - }, - "nb-NO": { - nativeName: "Norsk (bokmål)", - }, - ne: { - nativeName: "नेपाली", - }, - "ne-NP": { - nativeName: "नेपाली", - }, - nl: { - nativeName: "Nederlands", - }, - "nl-BE": { - nativeName: "Nederlands (België)", - }, - "nl-NL": { - nativeName: "Nederlands (Nederland)", - }, - "nn-NO": { - nativeName: "Norsk (nynorsk)", - }, - oc: { - nativeName: "Occitan", - }, - "or-IN": { - nativeName: "ଓଡ଼ିଆ", - }, - pa: { - nativeName: "ਪੰਜਾਬੀ", - }, - "pa-IN": { - nativeName: "ਪੰਜਾਬੀ (ਭਾਰਤ ਨੂੰ)", - }, - pl: { - nativeName: "Polski", - }, - "pl-PL": { - nativeName: "Polski", - }, - "ps-AF": { - nativeName: "پښتو", - }, - pt: { - nativeName: "Português", - }, - "pt-BR": { - nativeName: "Português (Brasil)", - }, - "pt-PT": { - nativeName: "Português (Portugal)", - }, - "qu-PE": { - nativeName: "Qhichwa", - }, - "rm-CH": { - nativeName: "Rumantsch", - }, - ro: { - nativeName: "Română", - }, - "ro-RO": { - nativeName: "Română", - }, - ru: { - nativeName: "Русский", - }, - "ru-RU": { - nativeName: "Русский", - }, - "sa-IN": { - nativeName: "संस्कृतम्", - }, - "se-NO": { - nativeName: "Davvisámegiella", - }, - sh: { - nativeName: "српскохрватски", - }, - "si-LK": { - nativeName: "සිංහල", - }, - sk: { - nativeName: "Slovenčina", - }, - "sk-SK": { - nativeName: "Slovenčina (Slovakia)", - }, - sl: { - nativeName: "Slovenščina", - }, - "sl-SI": { - nativeName: "Slovenščina", - }, - "so-SO": { - nativeName: "Soomaaliga", - }, - sq: { - nativeName: "Shqip", - }, - "sq-AL": { - nativeName: "Shqip", - }, - sr: { - nativeName: "Српски", - }, - "sr-RS": { - nativeName: "Српски (Serbia)", - }, - su: { - nativeName: "Basa Sunda", - }, - sv: { - nativeName: "Svenska", - }, - "sv-SE": { - nativeName: "Svenska", - }, - sw: { - nativeName: "Kiswahili", - }, - "sw-KE": { - nativeName: "Kiswahili", - }, - ta: { - nativeName: "தமிழ்", - }, - "ta-IN": { - nativeName: "தமிழ்", - }, - te: { - nativeName: "తెలుగు", - }, - "te-IN": { - nativeName: "తెలుగు", - }, - tg: { - nativeName: "забо́ни тоҷикӣ́", - }, - "tg-TJ": { - nativeName: "тоҷикӣ", - }, - th: { - nativeName: "ภาษาไทย", - }, - "th-TH": { - nativeName: "ภาษาไทย (ประเทศไทย)", - }, - fil: { - nativeName: "Filipino", - }, - tlh: { - nativeName: "tlhIngan-Hol", - }, - tr: { - nativeName: "Türkçe", - }, - "tr-TR": { - nativeName: "Türkçe", - }, - "tt-RU": { - nativeName: "татарча", - }, - uk: { - nativeName: "Українська", - }, - "uk-UA": { - nativeName: "Українська", - }, - ur: { - nativeName: "اردو", - }, - "ur-PK": { - nativeName: "اردو", - }, - uz: { - nativeName: "O'zbek", - }, - "uz-UZ": { - nativeName: "O'zbek", - }, - vi: { - nativeName: "Tiếng Việt", - }, - "vi-VN": { - nativeName: "Tiếng Việt", - }, - "xh-ZA": { - nativeName: "isiXhosa", - }, - yi: { - nativeName: "ייִדיש", - }, - "yi-DE": { - nativeName: "ייִדיש (German)", - }, - zh: { - nativeName: "中文", - }, - "zh-Hans": { - nativeName: "中文简体", - }, - "zh-Hant": { - nativeName: "中文繁體", - }, - "zh-CN": { - nativeName: "中文(中国大陆)", - }, - "zh-HK": { - nativeName: "中文(香港)", - }, - "zh-SG": { - nativeName: "中文(新加坡)", - }, - "zh-TW": { - nativeName: "中文(台灣)", - }, - "zu-ZA": { - nativeName: "isiZulu", - }, + ach: { + nativeName: "Lwo", + }, + ady: { + nativeName: "Адыгэбзэ", + }, + af: { + nativeName: "Afrikaans", + }, + "af-NA": { + nativeName: "Afrikaans (Namibia)", + }, + "af-ZA": { + nativeName: "Afrikaans (South Africa)", + }, + ak: { + nativeName: "Tɕɥi", + }, + ar: { + nativeName: "العربية", + }, + "ar-AR": { + nativeName: "العربية", + }, + "ar-MA": { + nativeName: "العربية", + }, + "ar-SA": { + nativeName: "العربية (السعودية)", + }, + "ay-BO": { + nativeName: "Aymar aru", + }, + az: { + nativeName: "Azərbaycan dili", + }, + "az-AZ": { + nativeName: "Azərbaycan dili", + }, + "be-BY": { + nativeName: "Беларуская", + }, + bg: { + nativeName: "Български", + }, + "bg-BG": { + nativeName: "Български", + }, + bn: { + nativeName: "বাংলা", + }, + "bn-IN": { + nativeName: "বাংলা (ভারত)", + }, + "bn-BD": { + nativeName: "বাংলা(বাংলাদেশ)", + }, + br: { + nativeName: "Brezhoneg", + }, + "bs-BA": { + nativeName: "Bosanski", + }, + ca: { + nativeName: "Català", + }, + "ca-ES": { + nativeName: "Català", + }, + cak: { + nativeName: "Maya Kaqchikel", + }, + "ck-US": { + nativeName: "ᏣᎳᎩ (tsalagi)", + }, + cs: { + nativeName: "Čeština", + }, + "cs-CZ": { + nativeName: "Čeština", + }, + cy: { + nativeName: "Cymraeg", + }, + "cy-GB": { + nativeName: "Cymraeg", + }, + da: { + nativeName: "Dansk", + }, + "da-DK": { + nativeName: "Dansk", + }, + de: { + nativeName: "Deutsch", + }, + "de-AT": { + nativeName: "Deutsch (Österreich)", + }, + "de-DE": { + nativeName: "Deutsch (Deutschland)", + }, + "de-CH": { + nativeName: "Deutsch (Schweiz)", + }, + dsb: { + nativeName: "Dolnoserbšćina", + }, + el: { + nativeName: "Ελληνικά", + }, + "el-GR": { + nativeName: "Ελληνικά", + }, + en: { + nativeName: "English", + }, + "en-GB": { + nativeName: "English (UK)", + }, + "en-AU": { + nativeName: "English (Australia)", + }, + "en-CA": { + nativeName: "English (Canada)", + }, + "en-IE": { + nativeName: "English (Ireland)", + }, + "en-IN": { + nativeName: "English (India)", + }, + "en-PI": { + nativeName: "English (Pirate)", + }, + "en-SG": { + nativeName: "English (Singapore)", + }, + "en-UD": { + nativeName: "English (Upside Down)", + }, + "en-US": { + nativeName: "English (US)", + }, + "en-ZA": { + nativeName: "English (South Africa)", + }, + "en@pirate": { + nativeName: "English (Pirate)", + }, + eo: { + nativeName: "Esperanto", + }, + "eo-EO": { + nativeName: "Esperanto", + }, + es: { + nativeName: "Español", + }, + "es-AR": { + nativeName: "Español (Argentine)", + }, + "es-419": { + nativeName: "Español (Latinoamérica)", + }, + "es-CL": { + nativeName: "Español (Chile)", + }, + "es-CO": { + nativeName: "Español (Colombia)", + }, + "es-EC": { + nativeName: "Español (Ecuador)", + }, + "es-ES": { + nativeName: "Español (España)", + }, + "es-LA": { + nativeName: "Español (Latinoamérica)", + }, + "es-NI": { + nativeName: "Español (Nicaragua)", + }, + "es-MX": { + nativeName: "Español (México)", + }, + "es-US": { + nativeName: "Español (Estados Unidos)", + }, + "es-VE": { + nativeName: "Español (Venezuela)", + }, + et: { + nativeName: "eesti keel", + }, + "et-EE": { + nativeName: "Eesti (Estonia)", + }, + eu: { + nativeName: "Euskara", + }, + "eu-ES": { + nativeName: "Euskara", + }, + fa: { + nativeName: "فارسی", + }, + "fa-IR": { + nativeName: "فارسی", + }, + "fb-LT": { + nativeName: "Leet Speak", + }, + ff: { + nativeName: "Fulah", + }, + fi: { + nativeName: "Suomi", + }, + "fi-FI": { + nativeName: "Suomi", + }, + fo: { + nativeName: "Føroyskt", + }, + "fo-FO": { + nativeName: "Føroyskt (Færeyjar)", + }, + fr: { + nativeName: "Français", + }, + "fr-CA": { + nativeName: "Français (Canada)", + }, + "fr-FR": { + nativeName: "Français (France)", + }, + "fr-BE": { + nativeName: "Français (Belgique)", + }, + "fr-CH": { + nativeName: "Français (Suisse)", + }, + "fy-NL": { + nativeName: "Frysk", + }, + ga: { + nativeName: "Gaeilge", + }, + "ga-IE": { + nativeName: "Gaeilge", + }, + gd: { + nativeName: "Gàidhlig", + }, + gl: { + nativeName: "Galego", + }, + "gl-ES": { + nativeName: "Galego", + }, + "gn-PY": { + nativeName: "Avañe'ẽ", + }, + "gu-IN": { + nativeName: "ગુજરાતી", + }, + gv: { + nativeName: "Gaelg", + }, + "gx-GR": { + nativeName: "Ἑλληνική ἀρχαία", + }, + he: { + nativeName: "עברית‏", + }, + "he-IL": { + nativeName: "עברית‏", + }, + hi: { + nativeName: "हिन्दी", + }, + "hi-IN": { + nativeName: "हिन्दी", + }, + hr: { + nativeName: "Hrvatski", + }, + "hr-HR": { + nativeName: "Hrvatski", + }, + hsb: { + nativeName: "Hornjoserbšćina", + }, + ht: { + nativeName: "Kreyòl", + }, + hu: { + nativeName: "Magyar", + }, + "hu-HU": { + nativeName: "Magyar", + }, + hy: { + nativeName: "Հայերեն", + }, + "hy-AM": { + nativeName: "Հայերեն (Հայաստան)", + }, + id: { + nativeName: "Bahasa Indonesia", + }, + "id-ID": { + nativeName: "Bahasa Indonesia", + }, + is: { + nativeName: "Íslenska", + }, + "is-IS": { + nativeName: "Íslenska (Iceland)", + }, + it: { + nativeName: "Italiano", + }, + "it-IT": { + nativeName: "Italiano", + }, + ja: { + nativeName: "日本語", + }, + "ja-JP": { + nativeName: "日本語 (日本)", + }, + "jv-ID": { + nativeName: "Basa Jawa", + }, + "ka-GE": { + nativeName: "ქართული", + }, + "kk-KZ": { + nativeName: "Қазақша", + }, + km: { + nativeName: "ភាសាខ្មែរ", + }, + kl: { + nativeName: "kalaallisut", + }, + "km-KH": { + nativeName: "ភាសាខ្មែរ", + }, + kab: { + nativeName: "Taqbaylit", + }, + kn: { + nativeName: "ಕನ್ನಡ", + }, + "kn-IN": { + nativeName: "ಕನ್ನಡ (India)", + }, + ko: { + nativeName: "한국어", + }, + "ko-KR": { + nativeName: "한국어 (한국)", + }, + "ku-TR": { + nativeName: "Kurdî", + }, + kw: { + nativeName: "Kernewek", + }, + la: { + nativeName: "Latin", + }, + "la-VA": { + nativeName: "Latin", + }, + lb: { + nativeName: "Lëtzebuergesch", + }, + "li-NL": { + nativeName: "Lèmbörgs", + }, + lt: { + nativeName: "Lietuvių", + }, + "lt-LT": { + nativeName: "Lietuvių", + }, + lv: { + nativeName: "Latviešu", + }, + "lv-LV": { + nativeName: "Latviešu", + }, + mai: { + nativeName: "मैथिली, মৈথিলী", + }, + "mg-MG": { + nativeName: "Malagasy", + }, + mk: { + nativeName: "Македонски", + }, + "mk-MK": { + nativeName: "Македонски (Македонски)", + }, + ml: { + nativeName: "മലയാളം", + }, + "ml-IN": { + nativeName: "മലയാളം", + }, + "mn-MN": { + nativeName: "Монгол", + }, + mr: { + nativeName: "मराठी", + }, + "mr-IN": { + nativeName: "मराठी", + }, + ms: { + nativeName: "Bahasa Melayu", + }, + "ms-MY": { + nativeName: "Bahasa Melayu", + }, + mt: { + nativeName: "Malti", + }, + "mt-MT": { + nativeName: "Malti", + }, + my: { + nativeName: "ဗမာစကာ", + }, + no: { + nativeName: "Norsk", + }, + nb: { + nativeName: "Norsk (bokmål)", + }, + "nb-NO": { + nativeName: "Norsk (bokmål)", + }, + ne: { + nativeName: "नेपाली", + }, + "ne-NP": { + nativeName: "नेपाली", + }, + nl: { + nativeName: "Nederlands", + }, + "nl-BE": { + nativeName: "Nederlands (België)", + }, + "nl-NL": { + nativeName: "Nederlands (Nederland)", + }, + "nn-NO": { + nativeName: "Norsk (nynorsk)", + }, + oc: { + nativeName: "Occitan", + }, + "or-IN": { + nativeName: "ଓଡ଼ିଆ", + }, + pa: { + nativeName: "ਪੰਜਾਬੀ", + }, + "pa-IN": { + nativeName: "ਪੰਜਾਬੀ (ਭਾਰਤ ਨੂੰ)", + }, + pl: { + nativeName: "Polski", + }, + "pl-PL": { + nativeName: "Polski", + }, + "ps-AF": { + nativeName: "پښتو", + }, + pt: { + nativeName: "Português", + }, + "pt-BR": { + nativeName: "Português (Brasil)", + }, + "pt-PT": { + nativeName: "Português (Portugal)", + }, + "qu-PE": { + nativeName: "Qhichwa", + }, + "rm-CH": { + nativeName: "Rumantsch", + }, + ro: { + nativeName: "Română", + }, + "ro-RO": { + nativeName: "Română", + }, + ru: { + nativeName: "Русский", + }, + "ru-RU": { + nativeName: "Русский", + }, + "sa-IN": { + nativeName: "संस्कृतम्", + }, + "se-NO": { + nativeName: "Davvisámegiella", + }, + sh: { + nativeName: "српскохрватски", + }, + "si-LK": { + nativeName: "සිංහල", + }, + sk: { + nativeName: "Slovenčina", + }, + "sk-SK": { + nativeName: "Slovenčina (Slovakia)", + }, + sl: { + nativeName: "Slovenščina", + }, + "sl-SI": { + nativeName: "Slovenščina", + }, + "so-SO": { + nativeName: "Soomaaliga", + }, + sq: { + nativeName: "Shqip", + }, + "sq-AL": { + nativeName: "Shqip", + }, + sr: { + nativeName: "Српски", + }, + "sr-RS": { + nativeName: "Српски (Serbia)", + }, + su: { + nativeName: "Basa Sunda", + }, + sv: { + nativeName: "Svenska", + }, + "sv-SE": { + nativeName: "Svenska", + }, + sw: { + nativeName: "Kiswahili", + }, + "sw-KE": { + nativeName: "Kiswahili", + }, + ta: { + nativeName: "தமிழ்", + }, + "ta-IN": { + nativeName: "தமிழ்", + }, + te: { + nativeName: "తెలుగు", + }, + "te-IN": { + nativeName: "తెలుగు", + }, + tg: { + nativeName: "забо́ни тоҷикӣ́", + }, + "tg-TJ": { + nativeName: "тоҷикӣ", + }, + th: { + nativeName: "ภาษาไทย", + }, + "th-TH": { + nativeName: "ภาษาไทย (ประเทศไทย)", + }, + fil: { + nativeName: "Filipino", + }, + tlh: { + nativeName: "tlhIngan-Hol", + }, + tr: { + nativeName: "Türkçe", + }, + "tr-TR": { + nativeName: "Türkçe", + }, + "tt-RU": { + nativeName: "татарча", + }, + uk: { + nativeName: "Українська", + }, + "uk-UA": { + nativeName: "Українська", + }, + ur: { + nativeName: "اردو", + }, + "ur-PK": { + nativeName: "اردو", + }, + uz: { + nativeName: "O'zbek", + }, + "uz-UZ": { + nativeName: "O'zbek", + }, + vi: { + nativeName: "Tiếng Việt", + }, + "vi-VN": { + nativeName: "Tiếng Việt", + }, + "xh-ZA": { + nativeName: "isiXhosa", + }, + yi: { + nativeName: "ייִדיש", + }, + "yi-DE": { + nativeName: "ייִדיש (German)", + }, + zh: { + nativeName: "中文", + }, + "zh-Hans": { + nativeName: "中文简体", + }, + "zh-Hant": { + nativeName: "中文繁體", + }, + "zh-CN": { + nativeName: "中文(中国大陆)", + }, + "zh-HK": { + nativeName: "中文(香港)", + }, + "zh-SG": { + nativeName: "中文(新加坡)", + }, + "zh-TW": { + nativeName: "中文(台灣)", + }, + "zu-ZA": { + nativeName: "isiZulu", + }, }; diff --git a/fe_calckey/frontend/client/src/scripts/login-id.ts b/fe_calckey/frontend/client/src/scripts/login-id.ts index 0fe3457..ba1193f 100644 --- a/fe_calckey/frontend/client/src/scripts/login-id.ts +++ b/fe_calckey/frontend/client/src/scripts/login-id.ts @@ -1,11 +1,11 @@ export function getUrlWithLoginId(url: string, loginId: string) { - const u = new URL(url, origin); - u.searchParams.append("loginId", loginId); - return u.toString(); + const u = new URL(url, origin); + u.searchParams.append("loginId", loginId); + return u.toString(); } export function getUrlWithoutLoginId(url: string) { - const u = new URL(url); - u.searchParams.delete("loginId"); - return u.toString(); + const u = new URL(url); + u.searchParams.delete("loginId"); + return u.toString(); } diff --git a/fe_calckey/frontend/client/src/scripts/lookup-file.ts b/fe_calckey/frontend/client/src/scripts/lookup-file.ts index a151e09..f43d5d7 100644 --- a/fe_calckey/frontend/client/src/scripts/lookup-file.ts +++ b/fe_calckey/frontend/client/src/scripts/lookup-file.ts @@ -2,26 +2,26 @@ import { i18n } from "@/i18n"; import * as os from "@/os"; export async function lookupFile() { - const { canceled, result: q } = await os.inputText({ - title: i18n.ts.fileIdOrUrl, - }); - if (canceled) return; + const { canceled, result: q } = await os.inputText({ + title: i18n.ts.fileIdOrUrl, + }); + if (canceled) return; - os.api( - "admin/drive/show-file", - q.startsWith("http://") || q.startsWith("https://") - ? { url: q.trim() } - : { fileId: q.trim() }, - ) - .then((file) => { - os.pageWindow(`/admin/file/${file.id}`); - }) - .catch((err) => { - if (err.code === "NO_SUCH_FILE") { - os.alert({ - type: "error", - text: i18n.ts.notFound, - }); - } - }); + os.api( + "admin/drive/show-file", + q.startsWith("http://") || q.startsWith("https://") + ? { url: q.trim() } + : { fileId: q.trim() } + ) + .then((file) => { + os.pageWindow(`/admin/file/${file.id}`); + }) + .catch((err) => { + if (err.code === "NO_SUCH_FILE") { + os.alert({ + type: "error", + text: i18n.ts.notFound, + }); + } + }); } diff --git a/fe_calckey/frontend/client/src/scripts/lookup-instance.ts b/fe_calckey/frontend/client/src/scripts/lookup-instance.ts index 18f87b6..c3b73dc 100644 --- a/fe_calckey/frontend/client/src/scripts/lookup-instance.ts +++ b/fe_calckey/frontend/client/src/scripts/lookup-instance.ts @@ -2,24 +2,24 @@ import { i18n } from "@/i18n"; import * as os from "@/os"; export async function lookupInstance() { - const { canceled, result: q } = await os.inputText({ - title: i18n.ts.instance, - }); - if (canceled) return; + const { canceled, result: q } = await os.inputText({ + title: i18n.ts.instance, + }); + if (canceled) return; - os.api( - "federation/show-instance", - q.startsWith("http://") || q.startsWith("https://") - ? { host: q.replace("https://", "") } - : { host: q }, - ) - .then((instance) => { - os.pageWindow(`/instance-info/${instance.host}`); - }) - .catch(() => { - os.alert({ - type: "error", - text: i18n.ts.notFound, - }); - }); + os.api( + "federation/show-instance", + q.startsWith("http://") || q.startsWith("https://") + ? { host: q.replace("https://", "") } + : { host: q } + ) + .then((instance) => { + os.pageWindow(`/instance-info/${instance.host}`); + }) + .catch(() => { + os.alert({ + type: "error", + text: i18n.ts.notFound, + }); + }); } diff --git a/fe_calckey/frontend/client/src/scripts/lookup-user.ts b/fe_calckey/frontend/client/src/scripts/lookup-user.ts index 6c5494b..8597361 100644 --- a/fe_calckey/frontend/client/src/scripts/lookup-user.ts +++ b/fe_calckey/frontend/client/src/scripts/lookup-user.ts @@ -3,34 +3,34 @@ import { i18n } from "@/i18n"; import * as os from "@/os"; export async function lookupUser() { - const { canceled, result } = await os.inputText({ - title: i18n.ts.usernameOrUserId, - }); - if (canceled) return; + const { canceled, result } = await os.inputText({ + title: i18n.ts.usernameOrUserId, + }); + if (canceled) return; - const show = (user) => { - os.pageWindow(`/user-info/${user.id}`); - }; + const show = (user) => { + os.pageWindow(`/user-info/${user.id}`); + }; - const usernamePromise = os.api("users/show", Acct.parse(result)); - const idPromise = os.api("users/show", { userId: result }); - let _notFound = false; - const notFound = () => { - if (_notFound) { - os.alert({ - type: "error", - text: i18n.ts.noSuchUser, - }); - } else { - _notFound = true; - } - }; - usernamePromise.then(show).catch((err) => { - if (err.code === "NO_SUCH_USER") { - notFound(); - } - }); - idPromise.then(show).catch((err) => { - notFound(); - }); + const usernamePromise = os.api("users/show", Acct.parse(result)); + const idPromise = os.api("users/show", { userId: result }); + let _notFound = false; + const notFound = () => { + if (_notFound) { + os.alert({ + type: "error", + text: i18n.ts.noSuchUser, + }); + } else { + _notFound = true; + } + }; + usernamePromise.then(show).catch((err) => { + if (err.code === "NO_SUCH_USER") { + notFound(); + } + }); + idPromise.then(show).catch((err) => { + notFound(); + }); } diff --git a/fe_calckey/frontend/client/src/scripts/media-proxy.ts b/fe_calckey/frontend/client/src/scripts/media-proxy.ts index 6fafe2c..62b3459 100644 --- a/fe_calckey/frontend/client/src/scripts/media-proxy.ts +++ b/fe_calckey/frontend/client/src/scripts/media-proxy.ts @@ -2,17 +2,17 @@ import { query } from "@/scripts/url"; import { url } from "@/config"; export function getProxiedImageUrl(imageUrl: string, type?: "preview"): string { - return `${url}/proxy/image.webp?${query({ - url: imageUrl, - fallback: "1", - ...(type ? { [type]: "1" } : {}), - })}`; + return `${url}/proxy/image.webp?${query({ + url: imageUrl, + fallback: "1", + ...(type ? { [type]: "1" } : {}), + })}`; } export function getProxiedImageUrlNullable( - imageUrl: string | null | undefined, - type?: "preview", + imageUrl: string | null | undefined, + type?: "preview" ): string | null { - if (imageUrl == null) return null; - return getProxiedImageUrl(imageUrl, type); + if (imageUrl == null) return null; + return getProxiedImageUrl(imageUrl, type); } diff --git a/fe_calckey/frontend/client/src/scripts/mfm-tags.ts b/fe_calckey/frontend/client/src/scripts/mfm-tags.ts index 2fadcd8..9011a04 100644 --- a/fe_calckey/frontend/client/src/scripts/mfm-tags.ts +++ b/fe_calckey/frontend/client/src/scripts/mfm-tags.ts @@ -1,24 +1,24 @@ export const MFM_TAGS = [ - "tada", - "jelly", - "twitch", - "shake", - "spin", - "jump", - "bounce", - "flip", - "x2", - "x3", - "x4", - "scale", - "position", - "crop", - "fg", - "bg", - "font", - "blur", - "rainbow", - "sparkle", - "rotate", - "fade", + "tada", + "jelly", + "twitch", + "shake", + "spin", + "jump", + "bounce", + "flip", + "x2", + "x3", + "x4", + "scale", + "position", + "crop", + "fg", + "bg", + "font", + "blur", + "rainbow", + "sparkle", + "rotate", + "fade", ]; diff --git a/fe_calckey/frontend/client/src/scripts/page-metadata.ts b/fe_calckey/frontend/client/src/scripts/page-metadata.ts index edc8c76..6605823 100644 --- a/fe_calckey/frontend/client/src/scripts/page-metadata.ts +++ b/fe_calckey/frontend/client/src/scripts/page-metadata.ts @@ -1,58 +1,58 @@ import * as misskey from "calckey-js"; import { - ComputedRef, - inject, - isRef, - onActivated, - onMounted, - provide, - ref, - Ref, + ComputedRef, + inject, + isRef, + onActivated, + onMounted, + provide, + ref, + Ref, } from "vue"; export const setPageMetadata = Symbol("setPageMetadata"); export const pageMetadataProvider = Symbol("pageMetadataProvider"); export type PageMetadata = { - title: string; - subtitle?: string; - icon?: string | null; - avatar?: misskey.entities.User | null; - userName?: misskey.entities.User | null; - bg?: string; + title: string; + subtitle?: string; + icon?: string | null; + avatar?: misskey.entities.User | null; + userName?: misskey.entities.User | null; + bg?: string; }; export function definePageMetadata( - metadata: - | PageMetadata - | null - | Ref - | ComputedRef, + metadata: + | PageMetadata + | null + | Ref + | ComputedRef ): void { - const _metadata = isRef(metadata) ? metadata : ref(metadata); + const _metadata = isRef(metadata) ? metadata : ref(metadata); - provide(pageMetadataProvider, _metadata); + provide(pageMetadataProvider, _metadata); - const set = inject(setPageMetadata) as any; - if (set) { - set(_metadata); + const set = inject(setPageMetadata) as any; + if (set) { + set(_metadata); - onMounted(() => { - set(_metadata); - }); + onMounted(() => { + set(_metadata); + }); - onActivated(() => { - set(_metadata); - }); - } + onActivated(() => { + set(_metadata); + }); + } } export function provideMetadataReceiver( - callback: (info: ComputedRef) => void, + callback: (info: ComputedRef) => void ): void { - provide(setPageMetadata, callback); + provide(setPageMetadata, callback); } export function injectPageMetadata(): PageMetadata | undefined { - return inject(pageMetadataProvider); + return inject(pageMetadataProvider); } diff --git a/fe_calckey/frontend/client/src/scripts/physics.ts b/fe_calckey/frontend/client/src/scripts/physics.ts index cfb8133..73a6e45 100644 --- a/fe_calckey/frontend/client/src/scripts/physics.ts +++ b/fe_calckey/frontend/client/src/scripts/physics.ts @@ -1,163 +1,167 @@ import * as Matter from "matter-js"; export function physics(container: HTMLElement) { - const containerWidth = container.offsetWidth; - const containerHeight = container.offsetHeight; - const containerCenterX = containerWidth / 2; + const containerWidth = container.offsetWidth; + const containerHeight = container.offsetHeight; + const containerCenterX = containerWidth / 2; - // サイズ固定化(要らないかも?) - container.style.position = "relative"; - container.style.boxSizing = "border-box"; - container.style.width = `${containerWidth}px`; - container.style.height = `${containerHeight}px`; + // サイズ固定化(要らないかも?) + container.style.position = "relative"; + container.style.boxSizing = "border-box"; + container.style.width = `${containerWidth}px`; + container.style.height = `${containerHeight}px`; - // create engine - const engine = Matter.Engine.create({ - constraintIterations: 4, - positionIterations: 8, - velocityIterations: 8, - }); + // create engine + const engine = Matter.Engine.create({ + constraintIterations: 4, + positionIterations: 8, + velocityIterations: 8, + }); - const world = engine.world; + const world = engine.world; - // create renderer - const render = Matter.Render.create({ - engine: engine, - //element: document.getElementById('debug'), - options: { - width: containerWidth, - height: containerHeight, - background: "transparent", // transparent to hide - wireframeBackground: "transparent", // transparent to hide - }, - }); + // create renderer + const render = Matter.Render.create({ + engine: engine, + //element: document.getElementById('debug'), + options: { + width: containerWidth, + height: containerHeight, + background: "transparent", // transparent to hide + wireframeBackground: "transparent", // transparent to hide + }, + }); - // Disable to hide debug - Matter.Render.run(render); + // Disable to hide debug + Matter.Render.run(render); - // create runner - const runner = Matter.Runner.create(); - Matter.Runner.run(runner, engine); + // create runner + const runner = Matter.Runner.create(); + Matter.Runner.run(runner, engine); - const groundThickness = 1024; - const ground = Matter.Bodies.rectangle( - containerCenterX, - containerHeight + groundThickness / 2, - containerWidth, - groundThickness, - { - isStatic: true, - restitution: 0.1, - friction: 2, - }, - ); + const groundThickness = 1024; + const ground = Matter.Bodies.rectangle( + containerCenterX, + containerHeight + groundThickness / 2, + containerWidth, + groundThickness, + { + isStatic: true, + restitution: 0.1, + friction: 2, + } + ); - //const wallRight = Matter.Bodies.rectangle(window.innerWidth+50, window.innerHeight/2, 100, window.innerHeight, wallopts); - //const wallLeft = Matter.Bodies.rectangle(-50, window.innerHeight/2, 100, window.innerHeight, wallopts); + //const wallRight = Matter.Bodies.rectangle(window.innerWidth+50, window.innerHeight/2, 100, window.innerHeight, wallopts); + //const wallLeft = Matter.Bodies.rectangle(-50, window.innerHeight/2, 100, window.innerHeight, wallopts); - Matter.World.add(world, [ - ground, - //wallRight, - //wallLeft, - ]); + Matter.World.add(world, [ + ground, + //wallRight, + //wallLeft, + ]); - const objEls = Array.from(container.children); - const objs = []; - for (const objEl of objEls) { - const left = objEl.dataset.physicsX - ? parseInt(objEl.dataset.physicsX) - : objEl.offsetLeft; - const top = objEl.dataset.physicsY - ? parseInt(objEl.dataset.physicsY) - : objEl.offsetTop; + const objEls = Array.from(container.children); + const objs = []; + for (const objEl of objEls) { + const left = objEl.dataset.physicsX + ? parseInt(objEl.dataset.physicsX) + : objEl.offsetLeft; + const top = objEl.dataset.physicsY + ? parseInt(objEl.dataset.physicsY) + : objEl.offsetTop; - let obj; - if (objEl.classList.contains("_physics_circle_")) { - obj = Matter.Bodies.circle( - left + objEl.offsetWidth / 2, - top + objEl.offsetHeight / 2, - Math.max(objEl.offsetWidth, objEl.offsetHeight) / 2, - { - restitution: 0.5, - }, - ); - } else { - const style = window.getComputedStyle(objEl); - obj = Matter.Bodies.rectangle( - left + objEl.offsetWidth / 2, - top + objEl.offsetHeight / 2, - objEl.offsetWidth, - objEl.offsetHeight, - { - chamfer: { radius: parseInt(style.borderRadius || "0", 10) }, - restitution: 0.5, - }, - ); - } - objEl.id = obj.id; - objs.push(obj); - } + let obj; + if (objEl.classList.contains("_physics_circle_")) { + obj = Matter.Bodies.circle( + left + objEl.offsetWidth / 2, + top + objEl.offsetHeight / 2, + Math.max(objEl.offsetWidth, objEl.offsetHeight) / 2, + { + restitution: 0.5, + } + ); + } else { + const style = window.getComputedStyle(objEl); + obj = Matter.Bodies.rectangle( + left + objEl.offsetWidth / 2, + top + objEl.offsetHeight / 2, + objEl.offsetWidth, + objEl.offsetHeight, + { + chamfer: { + radius: parseInt(style.borderRadius || "0", 10), + }, + restitution: 0.5, + } + ); + } + objEl.id = obj.id; + objs.push(obj); + } - Matter.World.add(engine.world, objs); + Matter.World.add(engine.world, objs); - // Add mouse control + // Add mouse control - const mouse = Matter.Mouse.create(container); - const mouseConstraint = Matter.MouseConstraint.create(engine, { - mouse: mouse, - constraint: { - stiffness: 0.1, - render: { - visible: false, - }, - }, - }); + const mouse = Matter.Mouse.create(container); + const mouseConstraint = Matter.MouseConstraint.create(engine, { + mouse: mouse, + constraint: { + stiffness: 0.1, + render: { + visible: false, + }, + }, + }); - Matter.World.add(engine.world, mouseConstraint); + Matter.World.add(engine.world, mouseConstraint); - // keep the mouse in sync with rendering - render.mouse = mouse; + // keep the mouse in sync with rendering + render.mouse = mouse; - for (const objEl of objEls) { - objEl.style.position = "absolute"; - objEl.style.top = 0; - objEl.style.left = 0; - objEl.style.margin = 0; - } + for (const objEl of objEls) { + objEl.style.position = "absolute"; + objEl.style.top = 0; + objEl.style.left = 0; + objEl.style.margin = 0; + } - window.requestAnimationFrame(update); + window.requestAnimationFrame(update); - let stop = false; + let stop = false; - function update() { - for (const objEl of objEls) { - const obj = objs.find((obj) => obj.id.toString() === objEl.id.toString()); - if (obj == null) continue; + function update() { + for (const objEl of objEls) { + const obj = objs.find( + (obj) => obj.id.toString() === objEl.id.toString() + ); + if (obj == null) continue; - const x = obj.position.x - objEl.offsetWidth / 2; - const y = obj.position.y - objEl.offsetHeight / 2; - const angle = obj.angle; - objEl.style.transform = `translate(${x}px, ${y}px) rotate(${angle}rad)`; - } + const x = obj.position.x - objEl.offsetWidth / 2; + const y = obj.position.y - objEl.offsetHeight / 2; + const angle = obj.angle; + objEl.style.transform = `translate(${x}px, ${y}px) rotate(${angle}rad)`; + } - if (!stop) { - window.requestAnimationFrame(update); - } - } + if (!stop) { + window.requestAnimationFrame(update); + } + } - // 奈落に落ちたオブジェクトは消す - const intervalId = window.setInterval(() => { - for (const obj of objs) { - if (obj.position.y > containerHeight + 1024) - Matter.World.remove(world, obj); - } - }, 1000 * 10); + // 奈落に落ちたオブジェクトは消す + const intervalId = window.setInterval(() => { + for (const obj of objs) { + if (obj.position.y > containerHeight + 1024) + Matter.World.remove(world, obj); + } + }, 1000 * 10); - return { - stop: () => { - stop = true; - Matter.Runner.stop(runner); - window.clearInterval(intervalId); - }, - }; + return { + stop: () => { + stop = true; + Matter.Runner.stop(runner); + window.clearInterval(intervalId); + }, + }; } diff --git a/fe_calckey/frontend/client/src/scripts/please-login.ts b/fe_calckey/frontend/client/src/scripts/please-login.ts index 9b660dd..23ff5c0 100644 --- a/fe_calckey/frontend/client/src/scripts/please-login.ts +++ b/fe_calckey/frontend/client/src/scripts/please-login.ts @@ -4,23 +4,23 @@ import { i18n } from "@/i18n"; import { popup } from "@/os"; export function pleaseLogin(path?: string) { - if ($i) return; + if ($i) return; - popup( - defineAsyncComponent(() => import("@/components/MkSigninDialog.vue")), - { - autoSet: true, - message: i18n.ts.signinRequired, - }, - { - cancelled: () => { - if (path) { - window.location.href = path; - } - }, - }, - "closed", - ); + popup( + defineAsyncComponent(() => import("@/components/MkSigninDialog.vue")), + { + autoSet: true, + message: i18n.ts.signinRequired, + }, + { + cancelled: () => { + if (path) { + window.location.href = path; + } + }, + }, + "closed" + ); - if (!path) throw new Error("Sign-in required."); + if (!path) throw new Error("Sign-in required."); } diff --git a/fe_calckey/frontend/client/src/scripts/popout.ts b/fe_calckey/frontend/client/src/scripts/popout.ts index d27428d..ccfb679 100644 --- a/fe_calckey/frontend/client/src/scripts/popout.ts +++ b/fe_calckey/frontend/client/src/scripts/popout.ts @@ -2,31 +2,31 @@ import * as config from "@/config"; import { appendQuery } from "./url"; export function popout(path: string, w?: HTMLElement) { - let url = - path.startsWith("http://") || path.startsWith("https://") - ? path - : config.url + path; - url = appendQuery(url, "zen"); - if (w) { - const position = w.getBoundingClientRect(); - const width = parseInt(getComputedStyle(w, "").width, 10); - const height = parseInt(getComputedStyle(w, "").height, 10); - const x = window.screenX + position.left; - const y = window.screenY + position.top; - window.open( - url, - url, - `width=${width}, height=${height}, top=${y}, left=${x}`, - ); - } else { - const width = 400; - const height = 500; - const x = window.top.outerHeight / 2 + window.top.screenY - height / 2; - const y = window.top.outerWidth / 2 + window.top.screenX - width / 2; - window.open( - url, - url, - `width=${width}, height=${height}, top=${x}, left=${y}`, - ); - } + let url = + path.startsWith("http://") || path.startsWith("https://") + ? path + : config.url + path; + url = appendQuery(url, "zen"); + if (w) { + const position = w.getBoundingClientRect(); + const width = parseInt(getComputedStyle(w, "").width, 10); + const height = parseInt(getComputedStyle(w, "").height, 10); + const x = window.screenX + position.left; + const y = window.screenY + position.top; + window.open( + url, + url, + `width=${width}, height=${height}, top=${y}, left=${x}` + ); + } else { + const width = 400; + const height = 500; + const x = window.top.outerHeight / 2 + window.top.screenY - height / 2; + const y = window.top.outerWidth / 2 + window.top.screenX - width / 2; + window.open( + url, + url, + `width=${width}, height=${height}, top=${x}, left=${y}` + ); + } } diff --git a/fe_calckey/frontend/client/src/scripts/popup-position.ts b/fe_calckey/frontend/client/src/scripts/popup-position.ts index 874d127..1f7312d 100644 --- a/fe_calckey/frontend/client/src/scripts/popup-position.ts +++ b/fe_calckey/frontend/client/src/scripts/popup-position.ts @@ -1,174 +1,190 @@ import { Ref } from "vue"; export function calcPopupPosition( - el: HTMLElement, - props: { - anchorElement: HTMLElement | null; - innerMargin: number; - direction: "top" | "bottom" | "left" | "right"; - align: "top" | "bottom" | "left" | "right" | "center"; - alignOffset?: number; - x?: number; - y?: number; - }, + el: HTMLElement, + props: { + anchorElement: HTMLElement | null; + innerMargin: number; + direction: "top" | "bottom" | "left" | "right"; + align: "top" | "bottom" | "left" | "right" | "center"; + alignOffset?: number; + x?: number; + y?: number; + } ): { top: number; left: number; transformOrigin: string } { - const contentWidth = el.offsetWidth; - const contentHeight = el.offsetHeight; + const contentWidth = el.offsetWidth; + const contentHeight = el.offsetHeight; - let rect: DOMRect; + let rect: DOMRect; - if (props.anchorElement) { - rect = props.anchorElement.getBoundingClientRect(); - } + if (props.anchorElement) { + rect = props.anchorElement.getBoundingClientRect(); + } - const calcPosWhenTop = () => { - let left: number; - let top: number; + const calcPosWhenTop = () => { + let left: number; + let top: number; - if (props.anchorElement) { - left = - rect.left + window.pageXOffset + props.anchorElement.offsetWidth / 2; - top = rect.top + window.pageYOffset - contentHeight - props.innerMargin; - } else { - left = props.x; - top = props.y - contentHeight - props.innerMargin; - } + if (props.anchorElement) { + left = + rect.left + + window.pageXOffset + + props.anchorElement.offsetWidth / 2; + top = + rect.top + + window.pageYOffset - + contentHeight - + props.innerMargin; + } else { + left = props.x; + top = props.y - contentHeight - props.innerMargin; + } - left -= el.offsetWidth / 2; + left -= el.offsetWidth / 2; - if (left + contentWidth - window.pageXOffset > window.innerWidth) { - left = window.innerWidth - contentWidth + window.pageXOffset - 1; - } + if (left + contentWidth - window.pageXOffset > window.innerWidth) { + left = window.innerWidth - contentWidth + window.pageXOffset - 1; + } - return [left, top]; - }; + return [left, top]; + }; - const calcPosWhenBottom = () => { - let left: number; - let top: number; + const calcPosWhenBottom = () => { + let left: number; + let top: number; - if (props.anchorElement) { - left = - rect.left + window.pageXOffset + props.anchorElement.offsetWidth / 2; - top = - rect.top + - window.pageYOffset + - props.anchorElement.offsetHeight + - props.innerMargin; - } else { - left = props.x; - top = props.y + props.innerMargin; - } + if (props.anchorElement) { + left = + rect.left + + window.pageXOffset + + props.anchorElement.offsetWidth / 2; + top = + rect.top + + window.pageYOffset + + props.anchorElement.offsetHeight + + props.innerMargin; + } else { + left = props.x; + top = props.y + props.innerMargin; + } - left -= el.offsetWidth / 2; + left -= el.offsetWidth / 2; - if (left + contentWidth - window.pageXOffset > window.innerWidth) { - left = window.innerWidth - contentWidth + window.pageXOffset - 1; - } + if (left + contentWidth - window.pageXOffset > window.innerWidth) { + left = window.innerWidth - contentWidth + window.pageXOffset - 1; + } - return [left, top]; - }; + return [left, top]; + }; - const calcPosWhenLeft = () => { - let left: number; - let top: number; + const calcPosWhenLeft = () => { + let left: number; + let top: number; - if (props.anchorElement) { - left = rect.left + window.pageXOffset - contentWidth - props.innerMargin; - top = - rect.top + window.pageYOffset + props.anchorElement.offsetHeight / 2; - } else { - left = props.x - contentWidth - props.innerMargin; - top = props.y; - } + if (props.anchorElement) { + left = + rect.left + + window.pageXOffset - + contentWidth - + props.innerMargin; + top = + rect.top + + window.pageYOffset + + props.anchorElement.offsetHeight / 2; + } else { + left = props.x - contentWidth - props.innerMargin; + top = props.y; + } - top -= el.offsetHeight / 2; + top -= el.offsetHeight / 2; - if (top + contentHeight - window.pageYOffset > window.innerHeight) { - top = window.innerHeight - contentHeight + window.pageYOffset - 1; - } + if (top + contentHeight - window.pageYOffset > window.innerHeight) { + top = window.innerHeight - contentHeight + window.pageYOffset - 1; + } - return [left, top]; - }; + return [left, top]; + }; - const calcPosWhenRight = () => { - let left: number; - let top: number; + const calcPosWhenRight = () => { + let left: number; + let top: number; - if (props.anchorElement) { - left = - rect.left + - props.anchorElement.offsetWidth + - window.pageXOffset + - props.innerMargin; + if (props.anchorElement) { + left = + rect.left + + props.anchorElement.offsetWidth + + window.pageXOffset + + props.innerMargin; - if (props.align === "top") { - top = rect.top + window.pageYOffset; - if (props.alignOffset != null) top += props.alignOffset; - } else if (props.align === "bottom") { - // TODO - } else { - // center - top = - rect.top + window.pageYOffset + props.anchorElement.offsetHeight / 2; - top -= el.offsetHeight / 2; - } - } else { - left = props.x + props.innerMargin; - top = props.y; - top -= el.offsetHeight / 2; - } + if (props.align === "top") { + top = rect.top + window.pageYOffset; + if (props.alignOffset != null) top += props.alignOffset; + } else if (props.align === "bottom") { + // TODO + } else { + // center + top = + rect.top + + window.pageYOffset + + props.anchorElement.offsetHeight / 2; + top -= el.offsetHeight / 2; + } + } else { + left = props.x + props.innerMargin; + top = props.y; + top -= el.offsetHeight / 2; + } - if (top + contentHeight - window.pageYOffset > window.innerHeight) { - top = window.innerHeight - contentHeight + window.pageYOffset - 1; - } + if (top + contentHeight - window.pageYOffset > window.innerHeight) { + top = window.innerHeight - contentHeight + window.pageYOffset - 1; + } - return [left, top]; - }; + return [left, top]; + }; - const calc = (): { - left: number; - top: number; - transformOrigin: string; - } => { - switch (props.direction) { - case "top": { - const [left, top] = calcPosWhenTop(); + const calc = (): { + left: number; + top: number; + transformOrigin: string; + } => { + switch (props.direction) { + case "top": { + const [left, top] = calcPosWhenTop(); - // ツールチップを上に向かって表示するスペースがなければ下に向かって出す - if (top - window.pageYOffset < 0) { - const [left, top] = calcPosWhenBottom(); - return { left, top, transformOrigin: "center top" }; - } + // ツールチップを上に向かって表示するスペースがなければ下に向かって出す + if (top - window.pageYOffset < 0) { + const [left, top] = calcPosWhenBottom(); + return { left, top, transformOrigin: "center top" }; + } - return { left, top, transformOrigin: "center bottom" }; - } + return { left, top, transformOrigin: "center bottom" }; + } - case "bottom": { - const [left, top] = calcPosWhenBottom(); - // TODO: ツールチップを下に向かって表示するスペースがなければ上に向かって出す - return { left, top, transformOrigin: "center top" }; - } + case "bottom": { + const [left, top] = calcPosWhenBottom(); + // TODO: ツールチップを下に向かって表示するスペースがなければ上に向かって出す + return { left, top, transformOrigin: "center top" }; + } - case "left": { - const [left, top] = calcPosWhenLeft(); + case "left": { + const [left, top] = calcPosWhenLeft(); - // ツールチップを左に向かって表示するスペースがなければ右に向かって出す - if (left - window.pageXOffset < 0) { - const [left, top] = calcPosWhenRight(); - return { left, top, transformOrigin: "left center" }; - } + // ツールチップを左に向かって表示するスペースがなければ右に向かって出す + if (left - window.pageXOffset < 0) { + const [left, top] = calcPosWhenRight(); + return { left, top, transformOrigin: "left center" }; + } - return { left, top, transformOrigin: "right center" }; - } + return { left, top, transformOrigin: "right center" }; + } - case "right": { - const [left, top] = calcPosWhenRight(); - // TODO: ツールチップを右に向かって表示するスペースがなければ左に向かって出す - return { left, top, transformOrigin: "left center" }; - } - } - }; + case "right": { + const [left, top] = calcPosWhenRight(); + // TODO: ツールチップを右に向かって表示するスペースがなければ左に向かって出す + return { left, top, transformOrigin: "left center" }; + } + } + }; - return calc(); + return calc(); } diff --git a/fe_calckey/frontend/client/src/scripts/preprocess.ts b/fe_calckey/frontend/client/src/scripts/preprocess.ts index 438a44d..5721b17 100644 --- a/fe_calckey/frontend/client/src/scripts/preprocess.ts +++ b/fe_calckey/frontend/client/src/scripts/preprocess.ts @@ -3,25 +3,25 @@ import { defaultStore } from "@/store"; import { expandKaTeXMacro } from "@/scripts/katex-macro"; export function preprocess(text: string): string { - if (defaultStore.state.enableCustomKaTeXMacro) { - const parsedKaTeXMacro = - localStorage.getItem("customKaTeXMacroParsed") ?? "{}"; - const maxNumberOfExpansions = 200; // to prevent infinite expansion loops + if (defaultStore.state.enableCustomKaTeXMacro) { + const parsedKaTeXMacro = + localStorage.getItem("customKaTeXMacroParsed") ?? "{}"; + const maxNumberOfExpansions = 200; // to prevent infinite expansion loops - let nodes = mfm.parse(text); + let nodes = mfm.parse(text); - for (let node of nodes) { - if (node["type"] === "mathInline" || node["type"] === "mathBlock") { - node["props"]["formula"] = expandKaTeXMacro( - node["props"]["formula"], - parsedKaTeXMacro, - maxNumberOfExpansions, - ); - } - } + for (let node of nodes) { + if (node["type"] === "mathInline" || node["type"] === "mathBlock") { + node["props"]["formula"] = expandKaTeXMacro( + node["props"]["formula"], + parsedKaTeXMacro, + maxNumberOfExpansions + ); + } + } - text = mfm.toString(nodes); - } + text = mfm.toString(nodes); + } - return text; + return text; } diff --git a/fe_calckey/frontend/client/src/scripts/reaction-picker.ts b/fe_calckey/frontend/client/src/scripts/reaction-picker.ts index 8baa502..4d0afa9 100644 --- a/fe_calckey/frontend/client/src/scripts/reaction-picker.ts +++ b/fe_calckey/frontend/client/src/scripts/reaction-picker.ts @@ -2,50 +2,50 @@ import { defineAsyncComponent, Ref, ref } from "vue"; import { popup } from "@/os"; class ReactionPicker { - private src: Ref = ref(null); - private manualShowing = ref(false); - private onChosen?: (reaction: string) => void; - private onClosed?: () => void; + private src: Ref = ref(null); + private manualShowing = ref(false); + private onChosen?: (reaction: string) => void; + private onClosed?: () => void; - constructor() { - // nop - } + constructor() { + // nop + } - public async init() { - await popup( - defineAsyncComponent( - () => import("@/components/MkEmojiPickerDialog.vue"), - ), - { - src: this.src, - asReactionPicker: true, - manualShowing: this.manualShowing, - }, - { - done: (reaction) => { - this.onChosen!(reaction); - }, - close: () => { - this.manualShowing.value = false; - }, - closed: () => { - this.src.value = null; - this.onClosed!(); - }, - }, - ); - } + public async init() { + await popup( + defineAsyncComponent( + () => import("@/components/MkEmojiPickerDialog.vue") + ), + { + src: this.src, + asReactionPicker: true, + manualShowing: this.manualShowing, + }, + { + done: (reaction) => { + this.onChosen!(reaction); + }, + close: () => { + this.manualShowing.value = false; + }, + closed: () => { + this.src.value = null; + this.onClosed!(); + }, + } + ); + } - public show( - src: HTMLElement, - onChosen: ReactionPicker["onChosen"], - onClosed: ReactionPicker["onClosed"], - ) { - this.src.value = src; - this.manualShowing.value = true; - this.onChosen = onChosen; - this.onClosed = onClosed; - } + public show( + src: HTMLElement, + onChosen: ReactionPicker["onChosen"], + onClosed: ReactionPicker["onClosed"] + ) { + this.src.value = src; + this.manualShowing.value = true; + this.onChosen = onChosen; + this.onClosed = onClosed; + } } export const reactionPicker = new ReactionPicker(); diff --git a/fe_calckey/frontend/client/src/scripts/reduced-motion.ts b/fe_calckey/frontend/client/src/scripts/reduced-motion.ts index e73dc3c..d62d19d 100644 --- a/fe_calckey/frontend/client/src/scripts/reduced-motion.ts +++ b/fe_calckey/frontend/client/src/scripts/reduced-motion.ts @@ -1,3 +1,3 @@ export function reducedMotion(): boolean { - return window.matchMedia("(prefers-reduced-motion: reduce)").matches; + return window.matchMedia("(prefers-reduced-motion: reduce)").matches; } diff --git a/fe_calckey/frontend/client/src/scripts/safe-uri-decode.ts b/fe_calckey/frontend/client/src/scripts/safe-uri-decode.ts index 301b56d..f9d6475 100644 --- a/fe_calckey/frontend/client/src/scripts/safe-uri-decode.ts +++ b/fe_calckey/frontend/client/src/scripts/safe-uri-decode.ts @@ -1,7 +1,7 @@ export function safeURIDecode(str: string): string { - try { - return decodeURIComponent(str); - } catch { - return str; - } + try { + return decodeURIComponent(str); + } catch { + return str; + } } diff --git a/fe_calckey/frontend/client/src/scripts/scroll.ts b/fe_calckey/frontend/client/src/scripts/scroll.ts index 0ac4cd7..ff32121 100644 --- a/fe_calckey/frontend/client/src/scripts/scroll.ts +++ b/fe_calckey/frontend/client/src/scripts/scroll.ts @@ -1,100 +1,100 @@ type ScrollBehavior = "auto" | "smooth" | "instant"; export function getScrollContainer(el: HTMLElement | null): HTMLElement | null { - if (el == null || el.tagName === "HTML") return null; - const overflow = window.getComputedStyle(el).getPropertyValue("overflow-y"); - if (overflow === "scroll" || overflow === "auto") { - return el; - } else { - return getScrollContainer(el.parentElement); - } + if (el == null || el.tagName === "HTML") return null; + const overflow = window.getComputedStyle(el).getPropertyValue("overflow-y"); + if (overflow === "scroll" || overflow === "auto") { + return el; + } else { + return getScrollContainer(el.parentElement); + } } export function getScrollPosition(el: Element | null): number { - const container = getScrollContainer(el); - return container == null ? window.scrollY : container.scrollTop; + const container = getScrollContainer(el); + return container == null ? window.scrollY : container.scrollTop; } export function isTopVisible(el: Element | null): boolean { - const scrollTop = getScrollPosition(el); - const topPosition = el.offsetTop; // TODO: container内でのelの相対位置を取得できればより正確になる + const scrollTop = getScrollPosition(el); + const topPosition = el.offsetTop; // TODO: container内でのelの相対位置を取得できればより正確になる - return scrollTop <= topPosition; + return scrollTop <= topPosition; } export function isBottomVisible( - el: HTMLElement, - tolerance = 1, - container = getScrollContainer(el), + el: HTMLElement, + tolerance = 1, + container = getScrollContainer(el) ) { - if (container) - return ( - el.scrollHeight <= - container.clientHeight + Math.abs(container.scrollTop) + tolerance - ); - return el.scrollHeight <= window.innerHeight + window.scrollY + tolerance; + if (container) + return ( + el.scrollHeight <= + container.clientHeight + Math.abs(container.scrollTop) + tolerance + ); + return el.scrollHeight <= window.innerHeight + window.scrollY + tolerance; } export function onScrollTop(el: Element, cb) { - const container = getScrollContainer(el) || window; - const onScroll = (ev) => { - if (!document.body.contains(el)) return; - if (isTopVisible(el)) { - cb(); - container.removeEventListener("scroll", onScroll); - } - }; - container.addEventListener("scroll", onScroll, { passive: true }); + const container = getScrollContainer(el) || window; + const onScroll = (ev) => { + if (!document.body.contains(el)) return; + if (isTopVisible(el)) { + cb(); + container.removeEventListener("scroll", onScroll); + } + }; + container.addEventListener("scroll", onScroll, { passive: true }); } export function onScrollBottom(el: Element, cb) { - const container = getScrollContainer(el) || window; - const onScroll = (ev) => { - if (!document.body.contains(el)) return; - const pos = getScrollPosition(el); - if (pos + el.clientHeight > el.scrollHeight - 1) { - cb(); - container.removeEventListener("scroll", onScroll); - } - }; - container.addEventListener("scroll", onScroll, { passive: true }); + const container = getScrollContainer(el) || window; + const onScroll = (ev) => { + if (!document.body.contains(el)) return; + const pos = getScrollPosition(el); + if (pos + el.clientHeight > el.scrollHeight - 1) { + cb(); + container.removeEventListener("scroll", onScroll); + } + }; + container.addEventListener("scroll", onScroll, { passive: true }); } export function scroll( - el: Element, - options: { - top?: number; - left?: number; - behavior?: ScrollBehavior; - }, + el: Element, + options: { + top?: number; + left?: number; + behavior?: ScrollBehavior; + } ) { - const container = getScrollContainer(el); - if (container == null) { - window.scroll(options); - } else { - container.scroll(options); - } + const container = getScrollContainer(el); + if (container == null) { + window.scroll(options); + } else { + container.scroll(options); + } } export function scrollToTop( - el: Element, - options: { behavior?: ScrollBehavior } = {}, + el: Element, + options: { behavior?: ScrollBehavior } = {} ) { - scroll(el, { top: 0, ...options }); + scroll(el, { top: 0, ...options }); } export function scrollToBottom( - el: Element, - options: { behavior?: ScrollBehavior } = {}, + el: Element, + options: { behavior?: ScrollBehavior } = {} ) { - scroll(el, { top: 99999, ...options }); // TODO: ちゃんと計算する + scroll(el, { top: 99999, ...options }); // TODO: ちゃんと計算する } export function isBottom(el: Element, asobi = 0) { - const container = getScrollContainer(el); - const current = container - ? el.scrollTop + el.offsetHeight - : window.scrollY + window.innerHeight; - const max = container ? el.scrollHeight : document.body.offsetHeight; - return current >= max - asobi; + const container = getScrollContainer(el); + const current = container + ? el.scrollTop + el.offsetHeight + : window.scrollY + window.innerHeight; + const max = container ? el.scrollHeight : document.body.offsetHeight; + return current >= max - asobi; } diff --git a/fe_calckey/frontend/client/src/scripts/search.ts b/fe_calckey/frontend/client/src/scripts/search.ts index 34318ab..e59e0e9 100644 --- a/fe_calckey/frontend/client/src/scripts/search.ts +++ b/fe_calckey/frontend/client/src/scripts/search.ts @@ -4,62 +4,62 @@ import { mainRouter } from "@/router"; import { instance } from "@/instance"; export async function search() { - const { canceled, result: query } = await os.inputText({ - type: instance.features.searchFilters ? "search" : "text", - title: i18n.ts.search, - placeholder: i18n.ts.searchPlaceholder, - }); - if (canceled || query == null || query === "") return; + const { canceled, result: query } = await os.inputText({ + type: instance.features.searchFilters ? "search" : "text", + title: i18n.ts.search, + placeholder: i18n.ts.searchPlaceholder, + }); + if (canceled || query == null || query === "") return; - const q = query.trim(); + const q = query.trim(); - if (q.startsWith("@") && !q.includes(" ")) { - mainRouter.push(`/${q}`); - return; - } + if (q.startsWith("@") && !q.includes(" ")) { + mainRouter.push(`/${q}`); + return; + } - if (q.startsWith("#")) { - mainRouter.push(`/tags/${encodeURIComponent(q.substr(1))}`); - return; - } + if (q.startsWith("#")) { + mainRouter.push(`/tags/${encodeURIComponent(q.substr(1))}`); + return; + } - // like 2018/03/12 - if (/^[0-9]{4}\/[0-9]{2}\/[0-9]{2}/.test(q.replace(/-/g, "/"))) { - const date = new Date(q.replace(/-/g, "/")); + // like 2018/03/12 + if (/^[0-9]{4}\/[0-9]{2}\/[0-9]{2}/.test(q.replace(/-/g, "/"))) { + const date = new Date(q.replace(/-/g, "/")); - // 日付しか指定されてない場合、例えば 2018/03/12 ならユーザーは - // 2018/03/12 のコンテンツを「含む」結果になることを期待するはずなので - // 23時間59分進める(そのままだと 2018/03/12 00:00:00 「まで」の - // 結果になってしまい、2018/03/12 のコンテンツは含まれない) - if (q.replace(/-/g, "/").match(/^[0-9]{4}\/[0-9]{2}\/[0-9]{2}$/)) { - date.setHours(23, 59, 59, 999); - } + // 日付しか指定されてない場合、例えば 2018/03/12 ならユーザーは + // 2018/03/12 のコンテンツを「含む」結果になることを期待するはずなので + // 23時間59分進める(そのままだと 2018/03/12 00:00:00 「まで」の + // 結果になってしまい、2018/03/12 のコンテンツは含まれない) + if (q.replace(/-/g, "/").match(/^[0-9]{4}\/[0-9]{2}\/[0-9]{2}$/)) { + date.setHours(23, 59, 59, 999); + } - // TODO - //v.$root.$emit('warp', date); - os.alert({ - type: "waiting", - }); - return; - } + // TODO + //v.$root.$emit('warp', date); + os.alert({ + type: "waiting", + }); + return; + } - if (q.startsWith("https://")) { - const promise = os.api("ap/show", { - uri: q, - }); + if (q.startsWith("https://")) { + const promise = os.api("ap/show", { + uri: q, + }); - os.promiseDialog(promise, null, null, i18n.ts.fetchingAsApObject); + os.promiseDialog(promise, null, null, i18n.ts.fetchingAsApObject); - const res = await promise; + const res = await promise; - if (res.type === "User") { - mainRouter.push(`/@${res.object.username}@${res.object.host}`); - } else if (res.type === "Note") { - mainRouter.push(`/notes/${res.object.id}`); - } + if (res.type === "User") { + mainRouter.push(`/@${res.object.username}@${res.object.host}`); + } else if (res.type === "Note") { + mainRouter.push(`/notes/${res.object.id}`); + } - return; - } + return; + } - mainRouter.push(`/search?q=${encodeURIComponent(q)}`); + mainRouter.push(`/search?q=${encodeURIComponent(q)}`); } diff --git a/fe_calckey/frontend/client/src/scripts/select-file.ts b/fe_calckey/frontend/client/src/scripts/select-file.ts index d249b2d..e8111f4 100644 --- a/fe_calckey/frontend/client/src/scripts/select-file.ts +++ b/fe_calckey/frontend/client/src/scripts/select-file.ts @@ -7,127 +7,127 @@ import { defaultStore } from "@/store"; import { uploadFile } from "@/scripts/upload"; function select( - src: any, - label: string | null, - multiple: boolean, + src: any, + label: string | null, + multiple: boolean ): Promise { - return new Promise((res, rej) => { - const keepOriginal = ref(defaultStore.state.keepOriginalUploading); + return new Promise((res, rej) => { + const keepOriginal = ref(defaultStore.state.keepOriginalUploading); - const chooseFileFromPc = () => { - const input = document.createElement("input"); - input.type = "file"; - input.multiple = multiple; - input.onchange = () => { - const promises = Array.from(input.files).map((file) => - uploadFile( - file, - defaultStore.state.uploadFolder, - undefined, - keepOriginal.value, - ), - ); + const chooseFileFromPc = () => { + const input = document.createElement("input"); + input.type = "file"; + input.multiple = multiple; + input.onchange = () => { + const promises = Array.from(input.files).map((file) => + uploadFile( + file, + defaultStore.state.uploadFolder, + undefined, + keepOriginal.value + ) + ); - Promise.all(promises) - .then((driveFiles) => { - res(multiple ? driveFiles : driveFiles[0]); - }) - .catch((err) => { - // アップロードのエラーは uploadFile 内でハンドリングされているためアラートダイアログを出したりはしてはいけない - }); + Promise.all(promises) + .then((driveFiles) => { + res(multiple ? driveFiles : driveFiles[0]); + }) + .catch((err) => { + // アップロードのエラーは uploadFile 内でハンドリングされているためアラートダイアログを出したりはしてはいけない + }); - // 一応廃棄 - (window as any).__misskey_input_ref__ = null; - }; + // 一応廃棄 + (window as any).__misskey_input_ref__ = null; + }; - // https://qiita.com/fukasawah/items/b9dc732d95d99551013d - // iOS Safari で正常に動かす為のおまじない - (window as any).__misskey_input_ref__ = input; + // https://qiita.com/fukasawah/items/b9dc732d95d99551013d + // iOS Safari で正常に動かす為のおまじない + (window as any).__misskey_input_ref__ = input; - input.click(); - }; + input.click(); + }; - const chooseFileFromDrive = () => { - os.selectDriveFile(multiple).then((files) => { - res(files); - }); - }; + const chooseFileFromDrive = () => { + os.selectDriveFile(multiple).then((files) => { + res(files); + }); + }; - const chooseFileFromUrl = () => { - os.inputText({ - title: i18n.ts.uploadFromUrl, - type: "url", - placeholder: i18n.ts.uploadFromUrlDescription, - }).then(({ canceled, result: url }) => { - if (canceled) return; + const chooseFileFromUrl = () => { + os.inputText({ + title: i18n.ts.uploadFromUrl, + type: "url", + placeholder: i18n.ts.uploadFromUrlDescription, + }).then(({ canceled, result: url }) => { + if (canceled) return; - const marker = Math.random().toString(); // TODO: UUIDとか使う + const marker = Math.random().toString(); // TODO: UUIDとか使う - const connection = stream.useChannel("main"); - connection.on("urlUploadFinished", (urlResponse) => { - if (urlResponse.marker === marker) { - res(multiple ? [urlResponse.file] : urlResponse.file); - connection.dispose(); - } - }); + const connection = stream.useChannel("main"); + connection.on("urlUploadFinished", (urlResponse) => { + if (urlResponse.marker === marker) { + res(multiple ? [urlResponse.file] : urlResponse.file); + connection.dispose(); + } + }); - os.api("drive/files/upload-from-url", { - url: url, - folderId: defaultStore.state.uploadFolder, - marker, - }); + os.api("drive/files/upload-from-url", { + url: url, + folderId: defaultStore.state.uploadFolder, + marker, + }); - os.alert({ - title: i18n.ts.uploadFromUrlRequested, - text: i18n.ts.uploadFromUrlMayTakeTime, - }); - }); - }; + os.alert({ + title: i18n.ts.uploadFromUrlRequested, + text: i18n.ts.uploadFromUrlMayTakeTime, + }); + }); + }; - os.popupMenu( - [ - label - ? { - text: label, - type: "label", - } - : undefined, - { - type: "switch", - text: i18n.ts.keepOriginalUploading, - ref: keepOriginal, - }, - { - text: i18n.ts.upload, - icon: "ph-upload-simple ph-bold ph-lg", - action: chooseFileFromPc, - }, - { - text: i18n.ts.fromDrive, - icon: "ph-cloud ph-bold ph-lg", - action: chooseFileFromDrive, - }, - { - text: i18n.ts.fromUrl, - icon: "ph-link-simple ph-bold ph-lg", - action: chooseFileFromUrl, - }, - ], - src, - ); - }); + os.popupMenu( + [ + label + ? { + text: label, + type: "label", + } + : undefined, + { + type: "switch", + text: i18n.ts.keepOriginalUploading, + ref: keepOriginal, + }, + { + text: i18n.ts.upload, + icon: "ph-upload-simple ph-bold ph-lg", + action: chooseFileFromPc, + }, + { + text: i18n.ts.fromDrive, + icon: "ph-cloud ph-bold ph-lg", + action: chooseFileFromDrive, + }, + { + text: i18n.ts.fromUrl, + icon: "ph-link-simple ph-bold ph-lg", + action: chooseFileFromUrl, + }, + ], + src + ); + }); } export function selectFile( - src: any, - label: string | null = null, + src: any, + label: string | null = null ): Promise { - return select(src, label, false) as Promise; + return select(src, label, false) as Promise; } export function selectFiles( - src: any, - label: string | null = null, + src: any, + label: string | null = null ): Promise { - return select(src, label, true) as Promise; + return select(src, label, true) as Promise; } diff --git a/fe_calckey/frontend/client/src/scripts/share-available.ts b/fe_calckey/frontend/client/src/scripts/share-available.ts index 8056d6d..cf56e51 100644 --- a/fe_calckey/frontend/client/src/scripts/share-available.ts +++ b/fe_calckey/frontend/client/src/scripts/share-available.ts @@ -1,6 +1,6 @@ export function shareAvailable(): boolean { - if (navigator.share) { - return true; - } - return false; + if (navigator.share) { + return true; + } + return false; } diff --git a/fe_calckey/frontend/client/src/scripts/shuffle.ts b/fe_calckey/frontend/client/src/scripts/shuffle.ts index f174152..488482a 100644 --- a/fe_calckey/frontend/client/src/scripts/shuffle.ts +++ b/fe_calckey/frontend/client/src/scripts/shuffle.ts @@ -2,21 +2,21 @@ * 配列をシャッフル (破壊的) */ export function shuffle(array: T): T { - let currentIndex = array.length; - let randomIndex; + let currentIndex = array.length; + let randomIndex; - // While there remain elements to shuffle. - while (currentIndex !== 0) { - // Pick a remaining element. - randomIndex = Math.floor(Math.random() * currentIndex); - currentIndex--; + // While there remain elements to shuffle. + while (currentIndex !== 0) { + // Pick a remaining element. + randomIndex = Math.floor(Math.random() * currentIndex); + currentIndex--; - // And swap it with the current element. - [array[currentIndex], array[randomIndex]] = [ - array[randomIndex], - array[currentIndex], - ]; - } + // And swap it with the current element. + [array[currentIndex], array[randomIndex]] = [ + array[randomIndex], + array[currentIndex], + ]; + } - return array; + return array; } diff --git a/fe_calckey/frontend/client/src/scripts/sound.ts b/fe_calckey/frontend/client/src/scripts/sound.ts index 84388b8..c560dee 100644 --- a/fe_calckey/frontend/client/src/scripts/sound.ts +++ b/fe_calckey/frontend/client/src/scripts/sound.ts @@ -3,36 +3,40 @@ import { ColdDeviceStorage } from "@/store"; const cache = new Map(); export function getAudio(file: string, useCache = true): HTMLAudioElement { - let audio: HTMLAudioElement; - if (useCache && cache.has(file)) { - audio = cache.get(file); - } else { - audio = new Audio(`/static-assets/sounds/${file}.mp3`); - if (useCache) cache.set(file, audio); - } - return audio; + let audio: HTMLAudioElement; + if (useCache && cache.has(file)) { + audio = cache.get(file); + } else { + audio = new Audio(`/static-assets/sounds/${file}.mp3`); + if (useCache) cache.set(file, audio); + } + return audio; } export function setVolume( - audio: HTMLAudioElement, - volume: number, + audio: HTMLAudioElement, + volume: number ): HTMLAudioElement { - const masterVolume = ColdDeviceStorage.get("sound_masterVolume"); - audio.volume = masterVolume - (1 - volume) * masterVolume; - return audio; + const masterVolume = ColdDeviceStorage.get("sound_masterVolume"); + audio.volume = masterVolume - (1 - volume) * masterVolume; + return audio; } export function play(type: string) { - const sound = ColdDeviceStorage.get(`sound_${type}` as any); - if (sound.type == null) return; - playFile(sound.type, sound.volume); + const sound = ColdDeviceStorage.get(`sound_${type}` as any); + if (sound.type == null) return; + playFile(sound.type, sound.volume); } export function playFile(file: string, volume: number) { - const masterVolume = ColdDeviceStorage.get("sound_masterVolume"); - if (masterVolume === 0 || volume === 0 || file.toLowerCase().includes("none")) - return; + const masterVolume = ColdDeviceStorage.get("sound_masterVolume"); + if ( + masterVolume === 0 || + volume === 0 || + file.toLowerCase().includes("none") + ) + return; - const audio = setVolume(getAudio(file), volume); - audio.play(); + const audio = setVolume(getAudio(file), volume); + audio.play(); } diff --git a/fe_calckey/frontend/client/src/scripts/theme-editor.ts b/fe_calckey/frontend/client/src/scripts/theme-editor.ts index 4828410..3cd0f13 100644 --- a/fe_calckey/frontend/client/src/scripts/theme-editor.ts +++ b/fe_calckey/frontend/client/src/scripts/theme-editor.ts @@ -15,86 +15,89 @@ export type ThemeValue = Color | Func | RefProp | RefConst | Css | Default; export type ThemeViewModel = [string, ThemeValue][]; export const fromThemeString = (str?: string): ThemeValue => { - if (!str) return null; - if (str.startsWith(":")) { - const parts = str.slice(1).split("<"); - const name = parts[0] as FuncName; - const arg = parseFloat(parts[1]); - const value = parts[2].startsWith("@") ? parts[2].slice(1) : ""; - return { type: "func", name, arg, value }; - } else if (str.startsWith("@")) { - return { - type: "refProp", - key: str.slice(1), - }; - } else if (str.startsWith("$")) { - return { - type: "refConst", - key: str.slice(1), - }; - } else if (str.startsWith('"')) { - return { - type: "css", - value: str.substr(1).trim(), - }; - } else { - return str; - } + if (!str) return null; + if (str.startsWith(":")) { + const parts = str.slice(1).split("<"); + const name = parts[0] as FuncName; + const arg = parseFloat(parts[1]); + const value = parts[2].startsWith("@") ? parts[2].slice(1) : ""; + return { type: "func", name, arg, value }; + } else if (str.startsWith("@")) { + return { + type: "refProp", + key: str.slice(1), + }; + } else if (str.startsWith("$")) { + return { + type: "refConst", + key: str.slice(1), + }; + } else if (str.startsWith('"')) { + return { + type: "css", + value: str.substr(1).trim(), + }; + } else { + return str; + } }; export const toThemeString = ( - value: Color | Func | RefProp | RefConst | Css, + value: Color | Func | RefProp | RefConst | Css ) => { - if (typeof value === "string") return value; - switch (value.type) { - case "func": - return `:${value.name}<${value.arg}<@${value.value}`; - case "refProp": - return `@${value.key}`; - case "refConst": - return `$${value.key}`; - case "css": - return `" ${value.value}`; - } + if (typeof value === "string") return value; + switch (value.type) { + case "func": + return `:${value.name}<${value.arg}<@${value.value}`; + case "refProp": + return `@${value.key}`; + case "refConst": + return `$${value.key}`; + case "css": + return `" ${value.value}`; + } }; export const convertToMisskeyTheme = ( - vm: ThemeViewModel, - name: string, - desc: string, - author: string, - base: "dark" | "light", + vm: ThemeViewModel, + name: string, + desc: string, + author: string, + base: "dark" | "light" ): Theme => { - const props = {} as { [key: string]: string }; - for (const [key, value] of vm) { - if (value === null) continue; - props[key] = toThemeString(value); - } + const props = {} as { [key: string]: string }; + for (const [key, value] of vm) { + if (value === null) continue; + props[key] = toThemeString(value); + } - return { - id: uuid(), - name, - desc, - author, - props, - base, - }; + return { + id: uuid(), + name, + desc, + author, + props, + base, + }; }; export const convertToViewModel = (theme: Theme): ThemeViewModel => { - const vm: ThemeViewModel = []; - // プロパティの登録 - vm.push( - ...themeProps.map( - (key) => [key, fromThemeString(theme.props[key])] as [string, ThemeValue], - ), - ); + const vm: ThemeViewModel = []; + // プロパティの登録 + vm.push( + ...themeProps.map( + (key) => + [key, fromThemeString(theme.props[key])] as [string, ThemeValue] + ) + ); - // 定数の登録 - const consts = Object.keys(theme.props) - .filter((k) => k.startsWith("$")) - .map((k) => [k, fromThemeString(theme.props[k])] as [string, ThemeValue]); + // 定数の登録 + const consts = Object.keys(theme.props) + .filter((k) => k.startsWith("$")) + .map( + (k) => [k, fromThemeString(theme.props[k])] as [string, ThemeValue] + ); - vm.push(...consts); - return vm; + vm.push(...consts); + return vm; }; diff --git a/fe_calckey/frontend/client/src/scripts/theme.ts b/fe_calckey/frontend/client/src/scripts/theme.ts index 383deb3..9610209 100644 --- a/fe_calckey/frontend/client/src/scripts/theme.ts +++ b/fe_calckey/frontend/client/src/scripts/theme.ts @@ -3,12 +3,12 @@ import tinycolor from "tinycolor2"; import { globalEvents } from "@/events"; export type Theme = { - id: string; - name: string; - author: string; - desc?: string; - base?: "dark" | "light"; - props: Record; + id: string; + name: string; + author: string; + desc?: string; + base?: "dark" | "light"; + props: Record; }; import lightTheme from "@/themes/_light.json5"; @@ -16,157 +16,160 @@ import darkTheme from "@/themes/_dark.json5"; import { deepClone } from "./clone"; export const themeProps = Object.keys(lightTheme.props).filter( - (key) => !key.startsWith("X"), + (key) => !key.startsWith("X") ); export const getBuiltinThemes = () => - Promise.all( - [ - "l-rosepinedawn", - "l-light", - "l-nord", - "l-gruvbox", - "l-coffee", - "l-apricot", - "l-rainy", - "l-vivid", - "l-cherry", - "l-sushi", - "l-u0", + Promise.all( + [ + "l-rosepinedawn", + "l-light", + "l-nord", + "l-gruvbox", + "l-coffee", + "l-apricot", + "l-rainy", + "l-vivid", + "l-cherry", + "l-sushi", + "l-u0", - "d-rosepine", - "d-rosepinemoon", - "d-dark", - "d-nord", - "d-gruvbox", - "d-catppuccin-frappe", - "d-catppuccin-mocha", - "d-persimmon", - "d-astro", - "d-future", - "d-botanical", - "d-green-lime", - "d-green-orange", - "d-cherry", - "d-ice", - "d-u0", - ].map((name) => - import(`../themes/${name}.json5`).then( - ({ default: _default }): Theme => _default, - ), - ), - ); + "d-rosepine", + "d-rosepinemoon", + "d-dark", + "d-nord", + "d-gruvbox", + "d-catppuccin-frappe", + "d-catppuccin-mocha", + "d-persimmon", + "d-astro", + "d-future", + "d-botanical", + "d-green-lime", + "d-green-orange", + "d-cherry", + "d-ice", + "d-u0", + ].map((name) => + import(`../themes/${name}.json5`).then( + ({ default: _default }): Theme => _default + ) + ) + ); export const getBuiltinThemesRef = () => { - const builtinThemes = ref([]); - getBuiltinThemes().then((themes) => (builtinThemes.value = themes)); - return builtinThemes; + const builtinThemes = ref([]); + getBuiltinThemes().then((themes) => (builtinThemes.value = themes)); + return builtinThemes; }; let timeout = null; export function applyTheme(theme: Theme, persist = true) { - if (timeout) window.clearTimeout(timeout); + if (timeout) window.clearTimeout(timeout); - document.documentElement.classList.add("_themeChanging_"); + document.documentElement.classList.add("_themeChanging_"); - timeout = window.setTimeout(() => { - document.documentElement.classList.remove("_themeChanging_"); - }, 1000); + timeout = window.setTimeout(() => { + document.documentElement.classList.remove("_themeChanging_"); + }, 1000); - const colorSchema = theme.base === "dark" ? "dark" : "light"; + const colorSchema = theme.base === "dark" ? "dark" : "light"; - // Deep copy - const _theme = deepClone(theme); + // Deep copy + const _theme = deepClone(theme); - if (_theme.base) { - const base = [lightTheme, darkTheme].find((x) => x.id === _theme.base); - if (base) _theme.props = Object.assign({}, base.props, _theme.props); - } + if (_theme.base) { + const base = [lightTheme, darkTheme].find((x) => x.id === _theme.base); + if (base) _theme.props = Object.assign({}, base.props, _theme.props); + } - const props = compile(_theme); + const props = compile(_theme); - for (const tag of document.head.children) { - if (tag.tagName === "META" && tag.getAttribute("name") === "theme-color") { - tag.setAttribute("content", props["htmlThemeColor"]); - break; - } - } + for (const tag of document.head.children) { + if ( + tag.tagName === "META" && + tag.getAttribute("name") === "theme-color" + ) { + tag.setAttribute("content", props["htmlThemeColor"]); + break; + } + } - for (const [k, v] of Object.entries(props)) { - document.documentElement.style.setProperty(`--${k}`, v.toString()); - } + for (const [k, v] of Object.entries(props)) { + document.documentElement.style.setProperty(`--${k}`, v.toString()); + } - document.documentElement.style.setProperty("color-schema", colorSchema); + document.documentElement.style.setProperty("color-schema", colorSchema); - if (persist) { - localStorage.setItem("theme", JSON.stringify(props)); - localStorage.setItem("colorSchema", colorSchema); - } + if (persist) { + localStorage.setItem("theme", JSON.stringify(props)); + localStorage.setItem("colorSchema", colorSchema); + } - // Site-wide notification that the theme has changed - globalEvents.emit("themeChanged"); + // Site-wide notification that the theme has changed + globalEvents.emit("themeChanged"); } function compile(theme: Theme): Record { - function getColor(val: string): tinycolor.Instance { - // ref (prop) - if (val[0] === "@") { - return getColor(theme.props[val.substr(1)]); - } + function getColor(val: string): tinycolor.Instance { + // ref (prop) + if (val[0] === "@") { + return getColor(theme.props[val.substr(1)]); + } - // ref (const) - else if (val[0] === "$") { - return getColor(theme.props[val]); - } + // ref (const) + else if (val[0] === "$") { + return getColor(theme.props[val]); + } - // func - else if (val[0] === ":") { - const parts = val.split("<"); - const func = parts.shift().substr(1); - const arg = parseFloat(parts.shift()); - const color = getColor(parts.join("<")); + // func + else if (val[0] === ":") { + const parts = val.split("<"); + const func = parts.shift().substr(1); + const arg = parseFloat(parts.shift()); + const color = getColor(parts.join("<")); - switch (func) { - case "darken": - return color.darken(arg); - case "lighten": - return color.lighten(arg); - case "alpha": - return color.setAlpha(arg); - case "hue": - return color.spin(arg); - case "saturate": - return color.saturate(arg); - } - } + switch (func) { + case "darken": + return color.darken(arg); + case "lighten": + return color.lighten(arg); + case "alpha": + return color.setAlpha(arg); + case "hue": + return color.spin(arg); + case "saturate": + return color.saturate(arg); + } + } - // other case - return tinycolor(val); - } + // other case + return tinycolor(val); + } - const props = {}; + const props = {}; - for (const [k, v] of Object.entries(theme.props)) { - if (k.startsWith("$")) continue; // ignore const + for (const [k, v] of Object.entries(theme.props)) { + if (k.startsWith("$")) continue; // ignore const - props[k] = v.startsWith('"') - ? v.replace(/^"\s*/, "") - : genValue(getColor(v)); - } + props[k] = v.startsWith('"') + ? v.replace(/^"\s*/, "") + : genValue(getColor(v)); + } - return props; + return props; } function genValue(c: tinycolor.Instance): string { - return c.toRgbString(); + return c.toRgbString(); } export function validateTheme(theme: Record): boolean { - if (theme.id == null || typeof theme.id !== "string") return false; - if (theme.name == null || typeof theme.name !== "string") return false; - if (theme.base == null || !["light", "dark"].includes(theme.base)) - return false; - if (theme.props == null || typeof theme.props !== "object") return false; - return true; + if (theme.id == null || typeof theme.id !== "string") return false; + if (theme.name == null || typeof theme.name !== "string") return false; + if (theme.base == null || !["light", "dark"].includes(theme.base)) + return false; + if (theme.props == null || typeof theme.props !== "object") return false; + return true; } diff --git a/fe_calckey/frontend/client/src/scripts/time.ts b/fe_calckey/frontend/client/src/scripts/time.ts index ddaa493..1751176 100644 --- a/fe_calckey/frontend/client/src/scripts/time.ts +++ b/fe_calckey/frontend/client/src/scripts/time.ts @@ -1,54 +1,62 @@ const dateTimeIntervals = { - day: 86400000, - hour: 3600000, - ms: 1, + day: 86400000, + hour: 3600000, + ms: 1, }; export function dateUTC(time: number[]): Date { - const d = - time.length === 2 - ? Date.UTC(time[0], time[1]) - : time.length === 3 - ? Date.UTC(time[0], time[1], time[2]) - : time.length === 4 - ? Date.UTC(time[0], time[1], time[2], time[3]) - : time.length === 5 - ? Date.UTC(time[0], time[1], time[2], time[3], time[4]) - : time.length === 6 - ? Date.UTC(time[0], time[1], time[2], time[3], time[4], time[5]) - : time.length === 7 - ? Date.UTC(time[0], time[1], time[2], time[3], time[4], time[5], time[6]) - : null; + const d = + time.length === 2 + ? Date.UTC(time[0], time[1]) + : time.length === 3 + ? Date.UTC(time[0], time[1], time[2]) + : time.length === 4 + ? Date.UTC(time[0], time[1], time[2], time[3]) + : time.length === 5 + ? Date.UTC(time[0], time[1], time[2], time[3], time[4]) + : time.length === 6 + ? Date.UTC(time[0], time[1], time[2], time[3], time[4], time[5]) + : time.length === 7 + ? Date.UTC( + time[0], + time[1], + time[2], + time[3], + time[4], + time[5], + time[6] + ) + : null; - if (!d) throw "wrong number of arguments"; + if (!d) throw "wrong number of arguments"; - return new Date(d); + return new Date(d); } export function isTimeSame(a: Date, b: Date): boolean { - return a.getTime() === b.getTime(); + return a.getTime() === b.getTime(); } export function isTimeBefore(a: Date, b: Date): boolean { - return a.getTime() - b.getTime() < 0; + return a.getTime() - b.getTime() < 0; } export function isTimeAfter(a: Date, b: Date): boolean { - return a.getTime() - b.getTime() > 0; + return a.getTime() - b.getTime() > 0; } export function addTime( - x: Date, - value: number, - span: keyof typeof dateTimeIntervals = "ms", + x: Date, + value: number, + span: keyof typeof dateTimeIntervals = "ms" ): Date { - return new Date(x.getTime() + value * dateTimeIntervals[span]); + return new Date(x.getTime() + value * dateTimeIntervals[span]); } export function subtractTime( - x: Date, - value: number, - span: keyof typeof dateTimeIntervals = "ms", + x: Date, + value: number, + span: keyof typeof dateTimeIntervals = "ms" ): Date { - return new Date(x.getTime() - value * dateTimeIntervals[span]); + return new Date(x.getTime() - value * dateTimeIntervals[span]); } diff --git a/fe_calckey/frontend/client/src/scripts/timezones.ts b/fe_calckey/frontend/client/src/scripts/timezones.ts index cdabd11..f8a4c27 100644 --- a/fe_calckey/frontend/client/src/scripts/timezones.ts +++ b/fe_calckey/frontend/client/src/scripts/timezones.ts @@ -1,62 +1,62 @@ export const timezones = [ - { - name: "UTC", - abbrev: "UTC", - offset: 0, - }, - { - name: "Europe/Berlin", - abbrev: "CET", - offset: 60, - }, - { - name: "Asia/Tokyo", - abbrev: "JST", - offset: 540, - }, - { - name: "Asia/Seoul", - abbrev: "KST", - offset: 540, - }, - { - name: "Asia/Shanghai", - abbrev: "CST", - offset: 480, - }, - { - name: "Australia/Sydney", - abbrev: "AEST", - offset: 600, - }, - { - name: "Australia/Darwin", - abbrev: "ACST", - offset: 570, - }, - { - name: "Australia/Perth", - abbrev: "AWST", - offset: 480, - }, - { - name: "America/New_York", - abbrev: "EST", - offset: -300, - }, - { - name: "America/Mexico_City", - abbrev: "CST", - offset: -360, - }, - { - name: "America/Phoenix", - abbrev: "MST", - offset: -420, - }, - { - name: "America/Los_Angeles", - abbrev: "PST", - offset: -480, - }, + { + name: "UTC", + abbrev: "UTC", + offset: 0, + }, + { + name: "Europe/Berlin", + abbrev: "CET", + offset: 60, + }, + { + name: "Asia/Tokyo", + abbrev: "JST", + offset: 540, + }, + { + name: "Asia/Seoul", + abbrev: "KST", + offset: 540, + }, + { + name: "Asia/Shanghai", + abbrev: "CST", + offset: 480, + }, + { + name: "Australia/Sydney", + abbrev: "AEST", + offset: 600, + }, + { + name: "Australia/Darwin", + abbrev: "ACST", + offset: 570, + }, + { + name: "Australia/Perth", + abbrev: "AWST", + offset: 480, + }, + { + name: "America/New_York", + abbrev: "EST", + offset: -300, + }, + { + name: "America/Mexico_City", + abbrev: "CST", + offset: -360, + }, + { + name: "America/Phoenix", + abbrev: "MST", + offset: -420, + }, + { + name: "America/Los_Angeles", + abbrev: "PST", + offset: -480, + }, ]; diff --git a/fe_calckey/frontend/client/src/scripts/touch.ts b/fe_calckey/frontend/client/src/scripts/touch.ts index 9150e42..7672b75 100644 --- a/fe_calckey/frontend/client/src/scripts/touch.ts +++ b/fe_calckey/frontend/client/src/scripts/touch.ts @@ -1,32 +1,32 @@ const isTouchSupported = - "maxTouchPoints" in navigator && navigator.maxTouchPoints > 0; + "maxTouchPoints" in navigator && navigator.maxTouchPoints > 0; export let isTouchUsing = false; export let isScreenTouching = false; if (isTouchSupported) { - window.addEventListener( - "touchstart", - () => { - // maxTouchPointsなどでの判定だけだと、「タッチ機能付きディスプレイを使っているがマウスでしか操作しない」場合にも - // タッチで使っていると判定されてしまうため、実際に一度でもタッチされたらtrueにする - isTouchUsing = true; + window.addEventListener( + "touchstart", + () => { + // maxTouchPointsなどでの判定だけだと、「タッチ機能付きディスプレイを使っているがマウスでしか操作しない」場合にも + // タッチで使っていると判定されてしまうため、実際に一度でもタッチされたらtrueにする + isTouchUsing = true; - isScreenTouching = true; - }, - { passive: true }, - ); + isScreenTouching = true; + }, + { passive: true } + ); - window.addEventListener( - "touchend", - () => { - // 子要素のtouchstartイベントでstopPropagation()が呼ばれると親要素に伝搬されずタッチされたと判定されないため、 - // touchendイベントでもtouchstartイベントと同様にtrueにする - isTouchUsing = true; + window.addEventListener( + "touchend", + () => { + // 子要素のtouchstartイベントでstopPropagation()が呼ばれると親要素に伝搬されずタッチされたと判定されないため、 + // touchendイベントでもtouchstartイベントと同様にtrueにする + isTouchUsing = true; - isScreenTouching = false; - }, - { passive: true }, - ); + isScreenTouching = false; + }, + { passive: true } + ); } diff --git a/fe_calckey/frontend/client/src/scripts/twemoji-base.ts b/fe_calckey/frontend/client/src/scripts/twemoji-base.ts index 0e45a52..077e6c9 100644 --- a/fe_calckey/frontend/client/src/scripts/twemoji-base.ts +++ b/fe_calckey/frontend/client/src/scripts/twemoji-base.ts @@ -1,12 +1,12 @@ export const twemojiSvgBase = "/twemoji"; export function char2fileName(char: string): string { - let codes = Array.from(char).map((x) => x.codePointAt(0)?.toString(16)); - if (!codes.includes("200d")) codes = codes.filter((x) => x !== "fe0f"); - codes = codes.filter((x) => x?.length); - return codes.join("-"); + let codes = Array.from(char).map((x) => x.codePointAt(0)?.toString(16)); + if (!codes.includes("200d")) codes = codes.filter((x) => x !== "fe0f"); + codes = codes.filter((x) => x?.length); + return codes.join("-"); } export function char2filePath(char: string): string { - return `${twemojiSvgBase}/${char2fileName(char)}.svg`; + return `${twemojiSvgBase}/${char2fileName(char)}.svg`; } diff --git a/fe_calckey/frontend/client/src/scripts/unison-reload.ts b/fe_calckey/frontend/client/src/scripts/unison-reload.ts index 4ba35c5..9a6b4cc 100644 --- a/fe_calckey/frontend/client/src/scripts/unison-reload.ts +++ b/fe_calckey/frontend/client/src/scripts/unison-reload.ts @@ -5,11 +5,11 @@ export const reloadChannel = new BroadcastChannel("reload"); // BroadcastChannelを用いて、クライアントが一斉にreloadするようにします。 export function unisonReload(path?: string) { - if (path !== undefined) { - reloadChannel.postMessage(path); - location.href = path; - } else { - reloadChannel.postMessage(null); - location.reload(); - } + if (path !== undefined) { + reloadChannel.postMessage(path); + location.href = path; + } else { + reloadChannel.postMessage(null); + location.reload(); + } } diff --git a/fe_calckey/frontend/client/src/scripts/upload.ts b/fe_calckey/frontend/client/src/scripts/upload.ts index fa0cb5b..e72eac5 100644 --- a/fe_calckey/frontend/client/src/scripts/upload.ts +++ b/fe_calckey/frontend/client/src/scripts/upload.ts @@ -8,151 +8,158 @@ import { alert } from "@/os"; import { i18n } from "@/i18n"; type Uploading = { - id: string; - name: string; - progressMax: number | undefined; - progressValue: number | undefined; - img: string; + id: string; + name: string; + progressMax: number | undefined; + progressValue: number | undefined; + img: string; }; export const uploads = ref([]); const compressTypeMap = { - "image/jpeg": { quality: 0.85, mimeType: "image/jpeg" }, - "image/webp": { quality: 0.85, mimeType: "image/png" }, - "image/svg+xml": { quality: 1, mimeType: "image/png" }, + "image/jpeg": { quality: 0.85, mimeType: "image/jpeg" }, + "image/webp": { quality: 0.85, mimeType: "image/png" }, + "image/svg+xml": { quality: 1, mimeType: "image/png" }, } as const; const mimeTypeMap = { - "image/webp": "webp", - "image/jpeg": "jpg", - "image/png": "png", - "image/avif": "avif", + "image/webp": "webp", + "image/jpeg": "jpg", + "image/png": "png", + "image/avif": "avif", } as const; export function uploadFile( - file: File, - folder?: any, - name?: string, - keepOriginal: boolean = defaultStore.state.keepOriginalUploading, + file: File, + folder?: any, + name?: string, + keepOriginal: boolean = defaultStore.state.keepOriginalUploading ): Promise { - if (folder && typeof folder === "object") folder = folder.id; + if (folder && typeof folder === "object") folder = folder.id; - return new Promise((resolve, reject) => { - const id = Math.random().toString(); + return new Promise((resolve, reject) => { + const id = Math.random().toString(); - const reader = new FileReader(); - reader.onload = async (ev) => { - const ctx = reactive({ - id: id, - name: name || file.name || "untitled", - progressMax: undefined, - progressValue: undefined, - img: window.URL.createObjectURL(file), - }); + const reader = new FileReader(); + reader.onload = async (ev) => { + const ctx = reactive({ + id: id, + name: name || file.name || "untitled", + progressMax: undefined, + progressValue: undefined, + img: window.URL.createObjectURL(file), + }); - uploads.value.push(ctx); + uploads.value.push(ctx); - let resizedImage: any; - if (!keepOriginal && file.type in compressTypeMap) { - const imgConfig = compressTypeMap[file.type]; + let resizedImage: any; + if (!keepOriginal && file.type in compressTypeMap) { + const imgConfig = compressTypeMap[file.type]; - const config = { - maxWidth: 2048, - maxHeight: 2048, - debug: true, - ...imgConfig, - }; + const config = { + maxWidth: 2048, + maxHeight: 2048, + debug: true, + ...imgConfig, + }; - try { - resizedImage = await readAndCompressImage(file, config); - ctx.name = - file.type !== imgConfig.mimeType - ? `${ctx.name}.${ - mimeTypeMap[compressTypeMap[file.type].mimeType] - }` - : ctx.name; - } catch (err) { - console.error("Failed to resize image", err); - } - } + try { + resizedImage = await readAndCompressImage(file, config); + ctx.name = + file.type !== imgConfig.mimeType + ? `${ctx.name}.${ + mimeTypeMap[ + compressTypeMap[file.type].mimeType + ] + }` + : ctx.name; + } catch (err) { + console.error("Failed to resize image", err); + } + } - const formData = new FormData(); - formData.append("force", "true"); - formData.append("file", resizedImage || file); - formData.append("name", ctx.name); - if (folder) formData.append("folderId", folder); + const formData = new FormData(); + formData.append("force", "true"); + formData.append("file", resizedImage || file); + formData.append("name", ctx.name); + if (folder) formData.append("folderId", folder); - const xhr = new XMLHttpRequest(); - xhr.open("POST", `${apiUrl}/drive/files/create`, true); - xhr.setRequestHeader("Authorization", `Bearer ${$i.token}`); - xhr.onload = (ev) => { - if ( - xhr.status !== 200 || - ev.target == null || - ev.target.response == null - ) { - // TODO: 消すのではなくて(ネットワーク的なエラーなら)再送できるようにしたい - uploads.value = uploads.value.filter((x) => x.id !== id); + const xhr = new XMLHttpRequest(); + xhr.open("POST", `${apiUrl}/drive/files/create`, true); + xhr.setRequestHeader("Authorization", `Bearer ${$i.token}`); + xhr.onload = (ev) => { + if ( + xhr.status !== 200 || + ev.target == null || + ev.target.response == null + ) { + // TODO: 消すのではなくて(ネットワーク的なエラーなら)再送できるようにしたい + uploads.value = uploads.value.filter((x) => x.id !== id); - if (xhr.status === 413) { - alert({ - type: "error", - title: i18n.ts.failedToUpload, - text: i18n.ts.cannotUploadBecauseExceedsFileSizeLimit, - }); - } else if (ev.target?.response) { - const res = JSON.parse(ev.target.response); - if (res.error?.id === "bec5bd69-fba3-43c9-b4fb-2894b66ad5d2") { - alert({ - type: "error", - title: i18n.ts.failedToUpload, - text: i18n.ts.cannotUploadBecauseInappropriate, - }); - } else if ( - res.error?.id === "d08dbc37-a6a9-463a-8c47-96c32ab5f064" - ) { - alert({ - type: "error", - title: i18n.ts.failedToUpload, - text: i18n.ts.cannotUploadBecauseNoFreeSpace, - }); - } else { - alert({ - type: "error", - title: i18n.ts.failedToUpload, - text: `${res.error?.message}\n${res.error?.code}\n${res.error?.id}`, - }); - } - } else { - alert({ - type: "error", - title: "Failed to upload", - text: `${JSON.stringify(ev.target?.response)}, ${JSON.stringify( - xhr.response, - )}`, - }); - } + if (xhr.status === 413) { + alert({ + type: "error", + title: i18n.ts.failedToUpload, + text: i18n.ts + .cannotUploadBecauseExceedsFileSizeLimit, + }); + } else if (ev.target?.response) { + const res = JSON.parse(ev.target.response); + if ( + res.error?.id === + "bec5bd69-fba3-43c9-b4fb-2894b66ad5d2" + ) { + alert({ + type: "error", + title: i18n.ts.failedToUpload, + text: i18n.ts.cannotUploadBecauseInappropriate, + }); + } else if ( + res.error?.id === + "d08dbc37-a6a9-463a-8c47-96c32ab5f064" + ) { + alert({ + type: "error", + title: i18n.ts.failedToUpload, + text: i18n.ts.cannotUploadBecauseNoFreeSpace, + }); + } else { + alert({ + type: "error", + title: i18n.ts.failedToUpload, + text: `${res.error?.message}\n${res.error?.code}\n${res.error?.id}`, + }); + } + } else { + alert({ + type: "error", + title: "Failed to upload", + text: `${JSON.stringify( + ev.target?.response + )}, ${JSON.stringify(xhr.response)}`, + }); + } - reject(); - return; - } + reject(); + return; + } - const driveFile = JSON.parse(ev.target.response); + const driveFile = JSON.parse(ev.target.response); - resolve(driveFile); + resolve(driveFile); - uploads.value = uploads.value.filter((x) => x.id !== id); - }; + uploads.value = uploads.value.filter((x) => x.id !== id); + }; - xhr.upload.onprogress = (ev) => { - if (ev.lengthComputable) { - ctx.progressMax = ev.total; - ctx.progressValue = ev.loaded; - } - }; + xhr.upload.onprogress = (ev) => { + if (ev.lengthComputable) { + ctx.progressMax = ev.total; + ctx.progressValue = ev.loaded; + } + }; - xhr.send(formData); - }; - reader.readAsArrayBuffer(file); - }); + xhr.send(formData); + }; + reader.readAsArrayBuffer(file); + }); } diff --git a/fe_calckey/frontend/client/src/scripts/url.ts b/fe_calckey/frontend/client/src/scripts/url.ts index 21af465..cd23df4 100644 --- a/fe_calckey/frontend/client/src/scripts/url.ts +++ b/fe_calckey/frontend/client/src/scripts/url.ts @@ -1,15 +1,15 @@ export function query(obj: Record): string { - const params = Object.entries(obj) - .filter(([, v]) => (Array.isArray(v) ? v.length : v !== undefined)) - .reduce((a, [k, v]) => ((a[k] = v), a), {} as Record); + const params = Object.entries(obj) + .filter(([, v]) => (Array.isArray(v) ? v.length : v !== undefined)) + .reduce((a, [k, v]) => ((a[k] = v), a), {} as Record); - return Object.entries(params) - .map((p) => `${p[0]}=${encodeURIComponent(p[1])}`) - .join("&"); + return Object.entries(params) + .map((p) => `${p[0]}=${encodeURIComponent(p[1])}`) + .join("&"); } export function appendQuery(url: string, query: string): string { - return `${url}${ - /\?/.test(url) ? (url.endsWith("?") ? "" : "&") : "?" - }${query}`; + return `${url}${ + /\?/.test(url) ? (url.endsWith("?") ? "" : "&") : "?" + }${query}`; } diff --git a/fe_calckey/frontend/client/src/scripts/use-chart-tooltip.ts b/fe_calckey/frontend/client/src/scripts/use-chart-tooltip.ts index 13ed0e5..c3484cd 100644 --- a/fe_calckey/frontend/client/src/scripts/use-chart-tooltip.ts +++ b/fe_calckey/frontend/client/src/scripts/use-chart-tooltip.ts @@ -3,62 +3,64 @@ import * as os from "@/os"; import MkChartTooltip from "@/components/MkChartTooltip.vue"; export function useChartTooltip( - opts: { position: "top" | "middle" } = { position: "top" }, + opts: { position: "top" | "middle" } = { position: "top" } ) { - const tooltipShowing = ref(false); - const tooltipX = ref(0); - const tooltipY = ref(0); - const tooltipTitle = ref(null); - const tooltipSeries = ref(null); - let disposeTooltipComponent; + const tooltipShowing = ref(false); + const tooltipX = ref(0); + const tooltipY = ref(0); + const tooltipTitle = ref(null); + const tooltipSeries = ref(null); + let disposeTooltipComponent; - os.popup( - MkChartTooltip, - { - showing: tooltipShowing, - x: tooltipX, - y: tooltipY, - title: tooltipTitle, - series: tooltipSeries, - }, - {}, - ).then(({ dispose }) => { - disposeTooltipComponent = dispose; - }); + os.popup( + MkChartTooltip, + { + showing: tooltipShowing, + x: tooltipX, + y: tooltipY, + title: tooltipTitle, + series: tooltipSeries, + }, + {} + ).then(({ dispose }) => { + disposeTooltipComponent = dispose; + }); - onUnmounted(() => { - if (disposeTooltipComponent) disposeTooltipComponent(); - }); + onUnmounted(() => { + if (disposeTooltipComponent) disposeTooltipComponent(); + }); - onDeactivated(() => { - tooltipShowing.value = false; - }); + onDeactivated(() => { + tooltipShowing.value = false; + }); - function handler(context) { - if (context.tooltip.opacity === 0) { - tooltipShowing.value = false; - return; - } + function handler(context) { + if (context.tooltip.opacity === 0) { + tooltipShowing.value = false; + return; + } - tooltipTitle.value = context.tooltip.title[0]; - tooltipSeries.value = context.tooltip.body.map((b, i) => ({ - backgroundColor: context.tooltip.labelColors[i].backgroundColor, - borderColor: context.tooltip.labelColors[i].borderColor, - text: b.lines[0], - })); + tooltipTitle.value = context.tooltip.title[0]; + tooltipSeries.value = context.tooltip.body.map((b, i) => ({ + backgroundColor: context.tooltip.labelColors[i].backgroundColor, + borderColor: context.tooltip.labelColors[i].borderColor, + text: b.lines[0], + })); - const rect = context.chart.canvas.getBoundingClientRect(); + const rect = context.chart.canvas.getBoundingClientRect(); - tooltipShowing.value = true; - tooltipX.value = rect.left + window.pageXOffset + context.tooltip.caretX; - if (opts.position === "top") { - tooltipY.value = rect.top + window.pageYOffset; - } else if (opts.position === "middle") { - tooltipY.value = rect.top + window.pageYOffset + context.tooltip.caretY; - } - } + tooltipShowing.value = true; + tooltipX.value = + rect.left + window.pageXOffset + context.tooltip.caretX; + if (opts.position === "top") { + tooltipY.value = rect.top + window.pageYOffset; + } else if (opts.position === "middle") { + tooltipY.value = + rect.top + window.pageYOffset + context.tooltip.caretY; + } + } - return { - handler, - }; + return { + handler, + }; } diff --git a/fe_calckey/frontend/client/src/scripts/use-interval.ts b/fe_calckey/frontend/client/src/scripts/use-interval.ts index 286c7ff..2417567 100644 --- a/fe_calckey/frontend/client/src/scripts/use-interval.ts +++ b/fe_calckey/frontend/client/src/scripts/use-interval.ts @@ -1,28 +1,28 @@ import { onMounted, onUnmounted } from "vue"; export function useInterval( - fn: () => void, - interval: number, - options: { - immediate: boolean; - afterMounted: boolean; - }, + fn: () => void, + interval: number, + options: { + immediate: boolean; + afterMounted: boolean; + } ): void { - if (Number.isNaN(interval)) return; + if (Number.isNaN(interval)) return; - let intervalId: number | null = null; + let intervalId: number | null = null; - if (options.afterMounted) { - onMounted(() => { - if (options.immediate) fn(); - intervalId = window.setInterval(fn, interval); - }); - } else { - if (options.immediate) fn(); - intervalId = window.setInterval(fn, interval); - } + if (options.afterMounted) { + onMounted(() => { + if (options.immediate) fn(); + intervalId = window.setInterval(fn, interval); + }); + } else { + if (options.immediate) fn(); + intervalId = window.setInterval(fn, interval); + } - onUnmounted(() => { - if (intervalId) window.clearInterval(intervalId); - }); + onUnmounted(() => { + if (intervalId) window.clearInterval(intervalId); + }); } diff --git a/fe_calckey/frontend/client/src/scripts/use-leave-guard.ts b/fe_calckey/frontend/client/src/scripts/use-leave-guard.ts index 2a7d677..5361a68 100644 --- a/fe_calckey/frontend/client/src/scripts/use-leave-guard.ts +++ b/fe_calckey/frontend/client/src/scripts/use-leave-guard.ts @@ -3,7 +3,7 @@ import { i18n } from "@/i18n"; import * as os from "@/os"; export function useLeaveGuard(enabled: Ref) { - /* TODO + /* TODO const setLeaveGuard = inject('setLeaveGuard'); if (setLeaveGuard) { @@ -30,7 +30,7 @@ export function useLeaveGuard(enabled: Ref) { }); } */ - /* + /* function onBeforeLeave(ev: BeforeUnloadEvent) { if (enabled.value) { ev.preventDefault(); diff --git a/fe_calckey/frontend/client/src/scripts/use-note-capture.ts b/fe_calckey/frontend/client/src/scripts/use-note-capture.ts index 5d0ca55..1e917d0 100644 --- a/fe_calckey/frontend/client/src/scripts/use-note-capture.ts +++ b/fe_calckey/frontend/client/src/scripts/use-note-capture.ts @@ -5,128 +5,131 @@ import { $i } from "@/account"; import * as os from "@/os"; export function useNoteCapture(props: { - rootEl: Ref; - note: Ref; - isDeletedRef: Ref; + rootEl: Ref; + note: Ref; + isDeletedRef: Ref; }) { - const note = props.note; - const connection = $i ? stream : null; + const note = props.note; + const connection = $i ? stream : null; - async function onStreamNoteUpdated(noteData): Promise { - const { type, id, body } = noteData; + async function onStreamNoteUpdated(noteData): Promise { + const { type, id, body } = noteData; - if (id !== note.value.id) return; + if (id !== note.value.id) return; - switch (type) { - case "reacted": { - const reaction = body.reaction; + switch (type) { + case "reacted": { + const reaction = body.reaction; - if (body.emoji) { - const emojis = note.value.emojis || []; - if (!emojis.includes(body.emoji)) { - note.value.emojis = [...emojis, body.emoji]; - } - } + if (body.emoji) { + const emojis = note.value.emojis || []; + if (!emojis.includes(body.emoji)) { + note.value.emojis = [...emojis, body.emoji]; + } + } - // TODO: reactionsプロパティがない場合ってあったっけ? なければ || {} は消せる - const currentCount = note.value.reactions?.[reaction] || 0; + // TODO: reactionsプロパティがない場合ってあったっけ? なければ || {} は消せる + const currentCount = note.value.reactions?.[reaction] || 0; - note.value.reactions[reaction] = currentCount + 1; + note.value.reactions[reaction] = currentCount + 1; - if ($i && body.userId === $i.id) { - note.value.myReaction = reaction; - } - break; - } + if ($i && body.userId === $i.id) { + note.value.myReaction = reaction; + } + break; + } - case "unreacted": { - const reaction = body.reaction; + case "unreacted": { + const reaction = body.reaction; - // TODO: reactionsプロパティがない場合ってあったっけ? なければ || {} は消せる - const currentCount = note.value.reactions?.[reaction] || 0; + // TODO: reactionsプロパティがない場合ってあったっけ? なければ || {} は消せる + const currentCount = note.value.reactions?.[reaction] || 0; - note.value.reactions[reaction] = Math.max(0, currentCount - 1); + note.value.reactions[reaction] = Math.max(0, currentCount - 1); - if ($i && body.userId === $i.id) { - note.value.myReaction = undefined; - } - break; - } + if ($i && body.userId === $i.id) { + note.value.myReaction = undefined; + } + break; + } - case "pollVoted": { - const choice = body.choice; + case "pollVoted": { + const choice = body.choice; - if (note.value.poll) { - const choices = [...note.value.poll.choices]; - choices[choice] = { - ...choices[choice], - votes: choices[choice].votes + 1, - ...($i && body.userId === $i.id - ? { - isVoted: true, - } - : {}), - }; - note.value.poll.choices = choices; - } + if (note.value.poll) { + const choices = [...note.value.poll.choices]; + choices[choice] = { + ...choices[choice], + votes: choices[choice].votes + 1, + ...($i && body.userId === $i.id + ? { + isVoted: true, + } + : {}), + }; + note.value.poll.choices = choices; + } - break; - } + break; + } - case "deleted": { - props.isDeletedRef.value = true; - break; - } + case "deleted": { + props.isDeletedRef.value = true; + break; + } - case "updated": { - const editedNote = await os.api("notes/show", { - noteId: id, - }); + case "updated": { + const editedNote = await os.api("notes/show", { + noteId: id, + }); - const keys = new Set(); - Object.keys(editedNote) - .concat(Object.keys(note.value)) - .forEach((key) => keys.add(key)); - keys.forEach((key) => { - note.value[key] = editedNote[key]; - }); - break; - } - } - } + const keys = new Set(); + Object.keys(editedNote) + .concat(Object.keys(note.value)) + .forEach((key) => keys.add(key)); + keys.forEach((key) => { + note.value[key] = editedNote[key]; + }); + break; + } + } + } - function capture(withHandler = false): void { - if (connection) { - // TODO: このノートがストリーミング経由で流れてきた場合のみ sr する - connection.send(document.body.contains(props.rootEl.value) ? "sr" : "s", { - id: note.value.id, - }); - if (withHandler) connection.on("noteUpdated", onStreamNoteUpdated); - } - } + function capture(withHandler = false): void { + if (connection) { + // TODO: このノートがストリーミング経由で流れてきた場合のみ sr する + connection.send( + document.body.contains(props.rootEl.value) ? "sr" : "s", + { + id: note.value.id, + } + ); + if (withHandler) connection.on("noteUpdated", onStreamNoteUpdated); + } + } - function decapture(withHandler = false): void { - if (connection) { - connection.send("un", { - id: note.value.id, - }); - if (withHandler) connection.off("noteUpdated", onStreamNoteUpdated); - } - } + function decapture(withHandler = false): void { + if (connection) { + connection.send("un", { + id: note.value.id, + }); + if (withHandler) connection.off("noteUpdated", onStreamNoteUpdated); + } + } - function onStreamConnected() { - capture(false); - } + function onStreamConnected() { + capture(false); + } - capture(true); - if (connection) { - connection.on("_connected_", onStreamConnected); - } + capture(true); + if (connection) { + connection.on("_connected_", onStreamConnected); + } - onUnmounted(() => { - decapture(true); - if (connection) { - connection.off("_connected_", onStreamConnected); - } - }); + onUnmounted(() => { + decapture(true); + if (connection) { + connection.off("_connected_", onStreamConnected); + } + }); } diff --git a/fe_calckey/frontend/client/src/scripts/use-tooltip.ts b/fe_calckey/frontend/client/src/scripts/use-tooltip.ts index a5e5ed7..4cf182d 100644 --- a/fe_calckey/frontend/client/src/scripts/use-tooltip.ts +++ b/fe_calckey/frontend/client/src/scripts/use-tooltip.ts @@ -1,91 +1,100 @@ import { Ref, ref, watch, onUnmounted } from "vue"; export function useTooltip( - elRef: Ref, - onShow: (showing: Ref) => void, - delay = 300, + elRef: Ref, + onShow: (showing: Ref) => void, + delay = 300 ): void { - let isHovering = false; + let isHovering = false; - // iOS(Androidも?)では、要素をタップした直後に(おせっかいで)mouseoverイベントを発火させたりするため、それを無視するためのフラグ - // 無視しないと、画面に触れてないのにツールチップが出たりし、ユーザビリティが損なわれる - // TODO: 一度でもタップすると二度とマウスでツールチップ出せなくなるのをどうにかする 定期的にfalseに戻すとか...? - let shouldIgnoreMouseover = false; + // iOS(Androidも?)では、要素をタップした直後に(おせっかいで)mouseoverイベントを発火させたりするため、それを無視するためのフラグ + // 無視しないと、画面に触れてないのにツールチップが出たりし、ユーザビリティが損なわれる + // TODO: 一度でもタップすると二度とマウスでツールチップ出せなくなるのをどうにかする 定期的にfalseに戻すとか...? + let shouldIgnoreMouseover = false; - let timeoutId: number; + let timeoutId: number; - let changeShowingState: (() => void) | null; + let changeShowingState: (() => void) | null; - const open = () => { - close(); - if (!isHovering) return; - if (elRef.value == null) return; - const el = elRef.value instanceof Element ? elRef.value : elRef.value.$el; - if (!document.body.contains(el)) return; // openしようとしたときに既に元要素がDOMから消えている場合があるため + const open = () => { + close(); + if (!isHovering) return; + if (elRef.value == null) return; + const el = + elRef.value instanceof Element ? elRef.value : elRef.value.$el; + if (!document.body.contains(el)) return; // openしようとしたときに既に元要素がDOMから消えている場合があるため - const showing = ref(true); - onShow(showing); - changeShowingState = () => { - showing.value = false; - }; - }; + const showing = ref(true); + onShow(showing); + changeShowingState = () => { + showing.value = false; + }; + }; - const close = () => { - if (changeShowingState != null) { - changeShowingState(); - changeShowingState = null; - } - }; + const close = () => { + if (changeShowingState != null) { + changeShowingState(); + changeShowingState = null; + } + }; - const onMouseover = () => { - if (isHovering) return; - if (shouldIgnoreMouseover) return; - isHovering = true; - timeoutId = window.setTimeout(open, delay); - }; + const onMouseover = () => { + if (isHovering) return; + if (shouldIgnoreMouseover) return; + isHovering = true; + timeoutId = window.setTimeout(open, delay); + }; - const onMouseleave = () => { - if (!isHovering) return; - isHovering = false; - window.clearTimeout(timeoutId); - close(); - }; + const onMouseleave = () => { + if (!isHovering) return; + isHovering = false; + window.clearTimeout(timeoutId); + close(); + }; - const onTouchstart = () => { - shouldIgnoreMouseover = true; - if (isHovering) return; - isHovering = true; - timeoutId = window.setTimeout(open, delay); - }; + const onTouchstart = () => { + shouldIgnoreMouseover = true; + if (isHovering) return; + isHovering = true; + timeoutId = window.setTimeout(open, delay); + }; - const onTouchend = () => { - if (!isHovering) return; - isHovering = false; - window.clearTimeout(timeoutId); - close(); - }; + const onTouchend = () => { + if (!isHovering) return; + isHovering = false; + window.clearTimeout(timeoutId); + close(); + }; - const stop = watch( - elRef, - () => { - if (elRef.value) { - stop(); - const el = - elRef.value instanceof Element ? elRef.value : elRef.value.$el; - el.addEventListener("mouseover", onMouseover, { passive: true }); - el.addEventListener("mouseleave", onMouseleave, { passive: true }); - el.addEventListener("touchstart", onTouchstart, { passive: true }); - el.addEventListener("touchend", onTouchend, { passive: true }); - el.addEventListener("click", close, { passive: true }); - } - }, - { - immediate: true, - flush: "post", - }, - ); + const stop = watch( + elRef, + () => { + if (elRef.value) { + stop(); + const el = + elRef.value instanceof Element + ? elRef.value + : elRef.value.$el; + el.addEventListener("mouseover", onMouseover, { + passive: true, + }); + el.addEventListener("mouseleave", onMouseleave, { + passive: true, + }); + el.addEventListener("touchstart", onTouchstart, { + passive: true, + }); + el.addEventListener("touchend", onTouchend, { passive: true }); + el.addEventListener("click", close, { passive: true }); + } + }, + { + immediate: true, + flush: "post", + } + ); - onUnmounted(() => { - close(); - }); + onUnmounted(() => { + close(); + }); } diff --git a/fe_calckey/frontend/client/src/stream.ts b/fe_calckey/frontend/client/src/stream.ts index 70e8602..e1d4a27 100644 --- a/fe_calckey/frontend/client/src/stream.ts +++ b/fe_calckey/frontend/client/src/stream.ts @@ -4,21 +4,21 @@ import { $i } from "@/account"; import { url } from "@/config"; export const stream = markRaw( - new Misskey.Stream( - url, - $i - ? { - token: $i.token, - } - : null, - ), + new Misskey.Stream( + url, + $i + ? { + token: $i.token, + } + : null + ) ); window.setTimeout(heartbeat, 1000 * 60); function heartbeat(): void { - if (stream != null && document.visibilityState === "visible") { - stream.send("ping"); - } - window.setTimeout(heartbeat, 1000 * 60); + if (stream != null && document.visibilityState === "visible") { + stream.send("ping"); + } + window.setTimeout(heartbeat, 1000 * 60); } diff --git a/fe_calckey/frontend/client/src/style.scss b/fe_calckey/frontend/client/src/style.scss index 3297592..ff43420 100644 --- a/fe_calckey/frontend/client/src/style.scss +++ b/fe_calckey/frontend/client/src/style.scss @@ -1,858 +1,893 @@ @charset "utf-8"; :root { - --radius: 12px; - --marginFull: 16px; - --marginHalf: 10px; - --avatarSize: 48px; + --radius: 12px; + --marginFull: 16px; + --marginHalf: 10px; + --avatarSize: 48px; - --margin: var(--marginFull); + --margin: var(--marginFull); - @media (max-width: 500px) { - --margin: var(--marginHalf); - } + @media (max-width: 500px) { + --margin: var(--marginHalf); + } - // https://larsenwork.com/easing-gradients/ - --gradient: hsl(0, 0%, 0%) 0%, - hsla(0, 0%, 0%, 0.987) 8.1%, - hsla(0, 0%, 0%, 0.951) 15.5%, - hsla(0, 0%, 0%, 0.896) 22.5%, - hsla(0, 0%, 0%, 0.825) 29%, - hsla(0, 0%, 0%, 0.741) 35.3%, - hsla(0, 0%, 0%, 0.648) 41.2%, - hsla(0, 0%, 0%, 0.55) 47.1%, - hsla(0, 0%, 0%, 0.45) 52.9%, - hsla(0, 0%, 0%, 0.352) 58.8%, - hsla(0, 0%, 0%, 0.259) 64.7%, - hsla(0, 0%, 0%, 0.175) 71%, - hsla(0, 0%, 0%, 0.104) 77.5%, - hsla(0, 0%, 0%, 0.049) 84.5%, - hsla(0, 0%, 0%, 0.013) 91.9%, - hsla(0, 0%, 0%, 0) 100%; + // https://larsenwork.com/easing-gradients/ + --gradient: hsl(0, 0%, 0%) 0%, hsla(0, 0%, 0%, 0.987) 8.1%, + hsla(0, 0%, 0%, 0.951) 15.5%, hsla(0, 0%, 0%, 0.896) 22.5%, + hsla(0, 0%, 0%, 0.825) 29%, hsla(0, 0%, 0%, 0.741) 35.3%, + hsla(0, 0%, 0%, 0.648) 41.2%, hsla(0, 0%, 0%, 0.55) 47.1%, + hsla(0, 0%, 0%, 0.45) 52.9%, hsla(0, 0%, 0%, 0.352) 58.8%, + hsla(0, 0%, 0%, 0.259) 64.7%, hsla(0, 0%, 0%, 0.175) 71%, + hsla(0, 0%, 0%, 0.104) 77.5%, hsla(0, 0%, 0%, 0.049) 84.5%, + hsla(0, 0%, 0%, 0.013) 91.9%, hsla(0, 0%, 0%, 0) 100%; - //--ad: rgb(255 169 0 / 10%); + //--ad: rgb(255 169 0 / 10%); } ::selection { - color: #fff; - background-color: var(--accent); + color: #fff; + background-color: var(--accent); } html { - touch-action: manipulation; - background-attachment: fixed; - background-size: cover; - background-position: center; - color: var(--fg); - accent-color: var(--accent); - overflow: auto; - overflow-wrap: break-word; - font-family: "BIZ UDGothic", Roboto, HelveticaNeue, Arial, sans-serif; - font-size: 14px; - line-height: 1.6; - text-size-adjust: 100%; - tab-size: 2; - scroll-padding: 60px; - overflow-x: clip; + touch-action: manipulation; + background-attachment: fixed; + background-size: cover; + background-position: center; + color: var(--fg); + accent-color: var(--accent); + overflow: auto; + overflow-wrap: break-word; + font-family: "BIZ UDGothic", Roboto, HelveticaNeue, Arial, sans-serif; + font-size: 14px; + line-height: 1.6; + text-size-adjust: 100%; + tab-size: 2; + scroll-padding: 60px; + overflow-x: clip; - &.useSystemFont { - font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; - } + &.useSystemFont { + font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", + Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", + sans-serif; + } } body::-webkit-scrollbar { - width: 12px; - height: 12px; + width: 12px; + height: 12px; } body::-webkit-scrollbar-thumb { - border-radius: 100px; - background-clip: content-box; - border: 3px solid transparent; + border-radius: 100px; + background-clip: content-box; + border: 3px solid transparent; } ::-webkit-scrollbar { - width: 6px; - height: 6px; + width: 6px; + height: 6px; } ::-webkit-scrollbar-track { - background: inherit; + background: inherit; } ::-webkit-scrollbar-thumb { - background: var(--scrollbarHandle); - min-height: 80px; + background: var(--scrollbarHandle); + min-height: 80px; - &:hover { - background: var(--scrollbarHandleHover); - background-clip: content-box; - } + &:hover { + background: var(--scrollbarHandleHover); + background-clip: content-box; + } - &:active { - background: var(--accent); - background-clip: content-box; - } + &:active { + background: var(--accent); + background-clip: content-box; + } } .hide-scrollbar { - scrollbar-width: none; - &::-webkit-scrollbar { - display: none; - } + scrollbar-width: none; + &::-webkit-scrollbar { + display: none; + } } html._themeChanging_ { - &, *, ::before, ::after { - transition: background 1s ease, border 1s ease !important; - } + &, + *, + ::before, + ::after { + transition: background 1s ease, border 1s ease !important; + } } -html, body { - margin: 0; - padding: 0; +html, +body { + margin: 0; + padding: 0; } .swiper { - margin-inline: -24px !important; - padding-inline: 24px !important; - mask: linear-gradient(to right, transparent, black 24px calc(100% - 24px), transparent); - -webkit-mask: linear-gradient(to right, transparent, black 24px calc(100% - 24px), transparent); + margin-inline: -24px !important; + padding-inline: 24px !important; + mask: linear-gradient( + to right, + transparent, + black 24px calc(100% - 24px), + transparent + ); + -webkit-mask: linear-gradient( + to right, + transparent, + black 24px calc(100% - 24px), + transparent + ); } .swiper-slide { - min-height: 100vh; + min-height: 100vh; } a { - text-decoration: none; - cursor: pointer; - color: inherit; - -webkit-tap-highlight-color: transparent; + text-decoration: none; + cursor: pointer; + color: inherit; + -webkit-tap-highlight-color: transparent; } // i { // transform: translateY(0.1em); // } -textarea, input { - -webkit-tap-highlight-color: transparent; +textarea, +input { + -webkit-tap-highlight-color: transparent; } -optgroup, option { - background: var(--panel); - color: var(--fg); +optgroup, +option { + background: var(--panel); + color: var(--fg); } hr { - margin: var(--margin) 0 var(--margin) 0; - border: none; - height: 1px; - background: var(--divider); + margin: var(--margin) 0 var(--margin) 0; + border: none; + height: 1px; + background: var(--divider); } .fa-pulse { - animation: spin 1s infinite; + animation: spin 1s infinite; } @keyframes spin { - 0% { transform: rotate(0deg); } - 100% { transform: rotate(360deg); } + 0% { + transform: rotate(0deg); + } + 100% { + transform: rotate(360deg); + } } ._noSelect { - user-select: none; - -webkit-user-select: none; - -webkit-touch-callout: none; + user-select: none; + -webkit-user-select: none; + -webkit-touch-callout: none; } ._ghost { - &, * { - @extend ._noSelect; - pointer-events: none; - } + &, + * { + @extend ._noSelect; + pointer-events: none; + } } ._modalBg { - position: fixed; - top: 0; - left: 0; - width: 100%; - height: 100%; - background: var(--modalBg); - -webkit-backdrop-filter: var(--modalBgFilter); - backdrop-filter: var(--modalBgFilter); + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: var(--modalBg); + -webkit-backdrop-filter: var(--modalBgFilter); + backdrop-filter: var(--modalBgFilter); } ._shadow { - box-shadow: 0px 4px 32px var(--shadow) !important; + box-shadow: 0px 4px 32px var(--shadow) !important; } .swiper { - overflow: clip !important; + overflow: clip !important; } ._button { - appearance: none; - display: inline-block; - padding: 0; - margin: 0; // for Safari - background: none; - border: none; - cursor: pointer; - color: inherit; - touch-action: manipulation; - -webkit-tap-highlight-color: transparent; - font-size: 1em; - font-family: inherit; - line-height: inherit; + appearance: none; + display: inline-block; + padding: 0; + margin: 0; // for Safari + background: none; + border: none; + cursor: pointer; + color: inherit; + touch-action: manipulation; + -webkit-tap-highlight-color: transparent; + font-size: 1em; + font-family: inherit; + line-height: inherit; - &, * { - @extend ._noSelect; - } + &, + * { + @extend ._noSelect; + } - * { - pointer-events: none; - } + * { + pointer-events: none; + } - &:disabled { - opacity: 0.5; - cursor: default; - } + &:disabled { + opacity: 0.5; + cursor: default; + } - > i:only-child { - display: block; - margin: auto; - } + > i:only-child { + display: block; + margin: auto; + } } ._buttonIcon { - @extend ._button; - display: flex; - align-items: center; - justify-content: center; - width: calc(var(--height) - (var(--margin) * 2)); - height: calc(var(--height) - (var(--margin) * 2)); - box-sizing: border-box; - position: relative; - border-radius: 5px; - outline: none; + @extend ._button; + display: flex; + align-items: center; + justify-content: center; + width: calc(var(--height) - (var(--margin) * 2)); + height: calc(var(--height) - (var(--margin) * 2)); + box-sizing: border-box; + position: relative; + border-radius: 5px; + outline: none; - &::before { - content: ""; - position: absolute; - width: 2.7em; - height: 2.7em; - border-radius: inherit; - transition: background 0.2s; - } + &::before { + content: ""; + position: absolute; + width: 2.7em; + height: 2.7em; + border-radius: inherit; + transition: background 0.2s; + } - &:hover:before, &:focus::before, &.highlighted::before { - background: var(--buttonBg); - } - &:focus-visible::before { - outline: auto; - } - &.highlighted { - color: var(--accent); - } + &:hover:before, + &:focus::before, + &.highlighted::before { + background: var(--buttonBg); + } + &:focus-visible::before { + outline: auto; + } + &.highlighted { + color: var(--accent); + } } ._buttonPrimary { - @extend ._button; - color: var(--fgOnAccent); - background: var(--accent); + @extend ._button; + color: var(--fgOnAccent); + background: var(--accent); - &:not(:disabled):hover { - background: var(--X8); - } + &:not(:disabled):hover { + background: var(--X8); + } - &:not(:disabled):active { - background: var(--X9); - } + &:not(:disabled):active { + background: var(--X9); + } } ._buttonGradate { - @extend ._buttonPrimary; - color: var(--fgOnAccent); - background: linear-gradient(90deg, var(--buttonGradateA), var(--buttonGradateB)); + @extend ._buttonPrimary; + color: var(--fgOnAccent); + background: linear-gradient( + 90deg, + var(--buttonGradateA), + var(--buttonGradateB) + ); - &:not(:disabled):hover { - background: linear-gradient(90deg, var(--X8), var(--X8)); - } + &:not(:disabled):hover { + background: linear-gradient(90deg, var(--X8), var(--X8)); + } - &:not(:disabled):active { - background: linear-gradient(90deg, var(--X8), var(--X8)); - } + &:not(:disabled):active { + background: linear-gradient(90deg, var(--X8), var(--X8)); + } } ._help { - color: var(--accent); - cursor: help + color: var(--accent); + cursor: help; } ._textButton { - @extend ._button; - color: var(--accent); + @extend ._button; + color: var(--accent); - &:not(:disabled):hover { - text-decoration: underline; - } + &:not(:disabled):hover { + text-decoration: underline; + } } ._panel { - background: var(--panel); - border-radius: var(--radius); - overflow: clip; + background: var(--panel); + border-radius: var(--radius); + overflow: clip; } ._margin { - margin: var(--margin) 0; + margin: var(--margin) 0; } ._gaps_m { - display: flex; - flex-direction: column; - gap: 1.5em; + display: flex; + flex-direction: column; + gap: 1.5em; } ._gaps_s { - display: flex; - flex-direction: column; - gap: 0.75em; + display: flex; + flex-direction: column; + gap: 0.75em; } ._gaps { - display: flex; - flex-direction: column; - gap: var(--margin); + display: flex; + flex-direction: column; + gap: var(--margin); } ._inputs { - display: flex; - margin: 32px 0; + display: flex; + margin: 32px 0; - &:first-child { - margin-top: 8px; - } + &:first-child { + margin-top: 8px; + } - &:last-child { - margin-bottom: 8px; - } + &:last-child { + margin-bottom: 8px; + } - > * { - flex: 1; - margin: 0 !important; + > * { + flex: 1; + margin: 0 !important; - &:not(:first-child) { - margin-left: 8px !important; - } + &:not(:first-child) { + margin-left: 8px !important; + } - &:not(:last-child) { - margin-right: 8px !important; - } - } + &:not(:last-child) { + margin-right: 8px !important; + } + } } ._panel { - background: var(--panel); - border-radius: var(--radius); - overflow: clip; + background: var(--panel); + border-radius: var(--radius); + overflow: clip; } ._block { - background: var(--panel); - border-radius: var(--radius); - overflow: visible; + background: var(--panel); + border-radius: var(--radius); + overflow: visible; - & + ._block { - margin-top: var(--margin); - } + & + ._block { + margin-top: var(--margin); + } } ._gap { - margin: var(--margin) 0; - &:first-child { - margin-top: 0; - } + margin: var(--margin) 0; + &:first-child { + margin-top: 0; + } } // TODO: 廃止 ._card { - @extend ._panel; + @extend ._panel; - // TODO: _cardTitle に - > ._title { - margin: 0; - padding: 22px 32px; - font-size: 1em; - border-bottom: solid 1px var(--panelHeaderDivider); - font-weight: bold; - background: var(--panelHeaderBg); - color: var(--panelHeaderFg); + // TODO: _cardTitle に + > ._title { + margin: 0; + padding: 22px 32px; + font-size: 1em; + border-bottom: solid 1px var(--panelHeaderDivider); + font-weight: bold; + background: var(--panelHeaderBg); + color: var(--panelHeaderFg); - @media (max-width: 500px) { - padding: 16px; - font-size: 1em; - } - } + @media (max-width: 500px) { + padding: 16px; + font-size: 1em; + } + } - // TODO: _cardContent に - > ._content { - padding: 32px; + // TODO: _cardContent に + > ._content { + padding: 32px; - @media (max-width: 500px) { - padding: 16px; - } + @media (max-width: 500px) { + padding: 16px; + } - &._noPad { - padding: 0 !important; - } + &._noPad { + padding: 0 !important; + } - & + ._content { - border-top: solid 0.5px var(--divider); - } - } + & + ._content { + border-top: solid 0.5px var(--divider); + } + } - // TODO: _cardFooter に - > ._footer { - border-top: solid 0.5px var(--divider); - padding: 24px 32px; + // TODO: _cardFooter に + > ._footer { + border-top: solid 0.5px var(--divider); + padding: 24px 32px; - @media (max-width: 500px) { - padding: 16px; - } - } + @media (max-width: 500px) { + padding: 16px; + } + } } ._borderButton { - @extend ._button; - display: block; - width: 100%; - padding: 10px; - box-sizing: border-box; - text-align: center; - border: solid 0.5px var(--divider); - border-radius: var(--radius); + @extend ._button; + display: block; + width: 100%; + padding: 10px; + box-sizing: border-box; + text-align: center; + border: solid 0.5px var(--divider); + border-radius: var(--radius); - &:active { - border-color: var(--accent); - } + &:active { + border-color: var(--accent); + } } ._popup { - background: var(--popup); - border-radius: var(--radius); - contain: content; + background: var(--popup); + border-radius: var(--radius); + contain: content; } // TODO: 廃止 ._monolithic_ { - ._section:not(:empty) { - box-sizing: border-box; - padding: var(--root-margin, 32px); + ._section:not(:empty) { + box-sizing: border-box; + padding: var(--root-margin, 32px); - @media (max-width: 500px) { - --root-margin: 10px; - } + @media (max-width: 500px) { + --root-margin: 10px; + } - & + ._section:not(:empty) { - border-top: solid 0.5px var(--divider); - } - } + & + ._section:not(:empty) { + border-top: solid 0.5px var(--divider); + } + } } ._narrow_ ._card { - > ._title { - padding: 16px; - font-size: 1em; - } + > ._title { + padding: 16px; + font-size: 1em; + } - > ._content { - padding: 16px; - } + > ._content { + padding: 16px; + } - > ._footer { - padding: 16px; - } + > ._footer { + padding: 16px; + } } ._acrylic { - background: var(--acrylicPanel); - -webkit-backdrop-filter: var(--blur, blur(15px)); - backdrop-filter: var(--blur, blur(15px)); + background: var(--acrylicPanel); + -webkit-backdrop-filter: var(--blur, blur(15px)); + backdrop-filter: var(--blur, blur(15px)); - @supports not (backdrop-filter: var(--blur, blur(15px))) { - &:after { - content: ""; - position: absolute; - top: 0; - right: 0; - left: 0; - bottom: 0; - z-index: -1; - background: var(--bg); - opacity: .75; - } - } + @supports not (backdrop-filter: var(--blur, blur(15px))) { + &:after { + content: ""; + position: absolute; + top: 0; + right: 0; + left: 0; + bottom: 0; + z-index: -1; + background: var(--bg); + opacity: 0.75; + } + } } ._formBlock { - margin: 1.5em 0; + margin: 1.5em 0; } ._formRoot { - > ._formBlock:first-child { - margin-top: 0; - } + > ._formBlock:first-child { + margin-top: 0; + } - > ._formBlock:last-child { - margin-bottom: 0; - } + > ._formBlock:last-child { + margin-bottom: 0; + } } ._formLinksGrid { - display: grid; - grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); - grid-gap: 12px; - > button { - width: 100% !important; - } + display: grid; + grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); + grid-gap: 12px; + > button { + width: 100% !important; + } } ._flexList { - display: flex; - flex-wrap: wrap; - gap: .2em; - width: min-content; - min-width: 100%; - &._center { - justify-content: center; - } + display: flex; + flex-wrap: wrap; + gap: 0.2em; + width: min-content; + min-width: 100%; + &._center { + justify-content: center; + } } ._formLinks { - > *:not(:last-child) { - margin-bottom: 8px; - } + > *:not(:last-child) { + margin-bottom: 8px; + } } ._beta { - margin-left: 0.7em; - font-size: 65%; - padding: 2px 3px; - color: var(--accent); - border: solid 1px var(--accent); - border-radius: 4px; - vertical-align: top; + margin-left: 0.7em; + font-size: 65%; + padding: 2px 3px; + color: var(--accent); + border: solid 1px var(--accent); + border-radius: 4px; + vertical-align: top; } ._table { - > ._row { - display: flex; + > ._row { + display: flex; - &:not(:last-child) { - margin-bottom: 16px; + &:not(:last-child) { + margin-bottom: 16px; - @media (max-width: 500px) { - margin-bottom: 8px; - } - } + @media (max-width: 500px) { + margin-bottom: 8px; + } + } - > ._cell { - flex: 1; + > ._cell { + flex: 1; - > ._label { - font-size: 80%; - opacity: 0.7; + > ._label { + font-size: 80%; + opacity: 0.7; - > ._icon { - margin-right: 4px; - display: none; - } - } - } - } + > ._icon { + margin-right: 4px; + display: none; + } + } + } + } } ._fullinfo { - padding: 64px 32px; - text-align: center; + padding: 64px 32px; + text-align: center; - > img { - vertical-align: bottom; - height: 128px; - margin-bottom: 16px; - border-radius: 16px; - } + > img { + vertical-align: bottom; + height: 128px; + margin-bottom: 16px; + border-radius: 16px; + } } ._keyValue { - display: flex; + display: flex; - > * { - flex: 1; - } + > * { + flex: 1; + } } ._link { - position: relative; - color: var(--link); + position: relative; + color: var(--link); - &:after { - content: ''; - position: absolute; - bottom: 0; - left: 0; - width: 0%; - border-bottom: 2px solid var(--link); - transition: 0.3s ease-in-out; - } + &:after { + content: ""; + position: absolute; + bottom: 0; + left: 0; + width: 0%; + border-bottom: 2px solid var(--link); + transition: 0.3s ease-in-out; + } - &:hover:after { - width: 100%; - } + &:hover:after { + width: 100%; + } } ._caption { - font-size: 0.8em; - opacity: 0.7; + font-size: 0.8em; + opacity: 0.7; } ._monospace { - font-family: Fira code, Fira Mono, Consolas, Menlo, Courier, monospace !important; + font-family: Fira code, Fira Mono, Consolas, Menlo, Courier, monospace !important; } ._code { - @extend ._monospace; - background: #26233a; - color: #e0def4; - font-size: 14px; - line-height: 1.5; - padding: 5px; + @extend ._monospace; + background: #26233a; + color: #e0def4; + font-size: 14px; + line-height: 1.5; + padding: 5px; } .prism-editor__container { - height: 100%; + height: 100%; } .prism-editor__textarea:focus { - outline: none; + outline: none; } :not(.noGap):not(._block) > { - .note-container, .cmuxhskf > section, ._gap > ._block, ._panel, .noGap, .profile, .card { - &:not(.caution) - { - box-shadow: 0 4px 25px rgba(0,0,0,0.04); - border-radius: var(--radius); - overflow: clip; - } - } + .note-container, + .cmuxhskf > section, + ._gap > ._block, + ._panel, + .noGap, + .profile, + .card { + &:not(.caution) { + box-shadow: 0 4px 25px rgba(0, 0, 0, 0.04); + border-radius: var(--radius); + overflow: clip; + } + } } .widgets ._panel { - box-shadow: none !important; + box-shadow: none !important; } ._zoom { - transition-duration: 0.5s, 0.5s; - transition-property: opacity, transform; - transition-timing-function: cubic-bezier(0,.5,.5,1); + transition-duration: 0.5s, 0.5s; + transition-property: opacity, transform; + transition-timing-function: cubic-bezier(0, 0.5, 0.5, 1); } -.zoom-enter-active, .zoom-leave-active { - transition: opacity 0.5s, transform 0.5s !important; +.zoom-enter-active, +.zoom-leave-active { + transition: opacity 0.5s, transform 0.5s !important; } -.zoom-enter-from, .zoom-leave-to { - opacity: 0; - transform: scale(0.9); +.zoom-enter-from, +.zoom-leave-to { + opacity: 0; + transform: scale(0.9); } @keyframes blink { - 0% { opacity: 1; } - 70% { opacity: 0; } - 100% { opacity: 1; } + 0% { + opacity: 1; + } + 70% { + opacity: 0; + } + 100% { + opacity: 1; + } } @keyframes tada { - from { - transform: scale3d(1, 1, 1); - } + from { + transform: scale3d(1, 1, 1); + } - 10%, - 20% { - transform: scale3d(0.9, 0.9, 0.9) rotate3d(0, 0, 1, -3deg); - } + 10%, + 20% { + transform: scale3d(0.9, 0.9, 0.9) rotate3d(0, 0, 1, -3deg); + } - 30%, - 50%, - 70%, - 90% { - transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg); - } + 30%, + 50%, + 70%, + 90% { + transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg); + } - 40%, - 60%, - 80% { - transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg); - } + 40%, + 60%, + 80% { + transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg); + } - to { - transform: scale3d(1, 1, 1); - } + to { + transform: scale3d(1, 1, 1); + } } -@media(prefers-reduced-motion) { - @keyframes tada { - from { - transform: scale3d(1, 1, 1); - } +@media (prefers-reduced-motion) { + @keyframes tada { + from { + transform: scale3d(1, 1, 1); + } - 50% { - transform: scale3d(1.1, 1.1, 1.1); - } + 50% { + transform: scale3d(1.1, 1.1, 1.1); + } - to { - transform: scale3d(1, 1, 1); - } - } + to { + transform: scale3d(1, 1, 1); + } + } } ._anime_bounce { - will-change: transform; - animation: bounce ease 0.7s; - animation-iteration-count: 1; - transform-origin: 50% 50%; + will-change: transform; + animation: bounce ease 0.7s; + animation-iteration-count: 1; + transform-origin: 50% 50%; } ._anime_bounce_ready { - will-change: transform; - transform: scaleX(0.90) scaleY(0.90) ; + will-change: transform; + transform: scaleX(0.9) scaleY(0.9); } ._anime_bounce_standBy { - transition: transform 0.1s ease; + transition: transform 0.1s ease; } -@keyframes bounce{ - 0% { - transform: scaleX(0.90) scaleY(0.90) ; - } - 19% { - transform: scaleX(1.10) scaleY(1.10) ; - } - 48% { - transform: scaleX(0.95) scaleY(0.95) ; - } - 100% { - transform: scaleX(1.00) scaleY(1.00) ; - } +@keyframes bounce { + 0% { + transform: scaleX(0.9) scaleY(0.9); + } + 19% { + transform: scaleX(1.1) scaleY(1.1); + } + 48% { + transform: scaleX(0.95) scaleY(0.95); + } + 100% { + transform: scaleX(1) scaleY(1); + } } .ph-xxs { - font-size: 0.5em; + font-size: 0.5em; } .ph-xs { - font-size: 0.75em; + font-size: 0.75em; } .ph-sm { - font-size: 0.875em; + font-size: 0.875em; } .ph-lg { - font-size: 1.3333em; - line-height: 0.75em; - vertical-align: -0.0667em; - justify-content: center; + font-size: 1.3333em; + line-height: 0.75em; + vertical-align: -0.0667em; + justify-content: center; } .ph-xl { - font-size: 1.5em; - line-height: 0.6666em; - vertical-align: -0.075em; + font-size: 1.5em; + line-height: 0.6666em; + vertical-align: -0.075em; } .ph-1x { - font-size: 1em; + font-size: 1em; } .ph-2x { - font-size: 2em; + font-size: 2em; } .ph-3x { - font-size: 3em; + font-size: 3em; } .ph-4x { - font-size: 4em; + font-size: 4em; } .ph-5x { - font-size: 5em; + font-size: 5em; } .ph-6x { - font-size: 6em; + font-size: 6em; } .ph-7x { - font-size: 7em; + font-size: 7em; } .ph-8x { - font-size: 8em; + font-size: 8em; } .ph-9x { - font-size: 9em; + font-size: 9em; } .ph-10x { - font-size: 10em; + font-size: 10em; } .ph-fw { - text-align: center; - width: 1.25em; - display: inline-flex; + text-align: center; + width: 1.25em; + display: inline-flex; } ._blur_text { - filter: blur(6px); - transition: filter 0.3s; + filter: blur(6px); + transition: filter 0.3s; - &:hover { - filter: blur(0px); - } + &:hover { + filter: blur(0px); + } } ._otp_input { - width: 30px; - height: 30px; - padding: 5px; - margin: 1rem 7px auto; - font-size: 20px; - border-radius: 4px; - border: 2px solid var(--accent); - background-color: var(--accentedBg); - color: var(--fg); - text-align: center; + width: 30px; + height: 30px; + padding: 5px; + margin: 1rem 7px auto; + font-size: 20px; + border-radius: 4px; + border: 2px solid var(--accent); + background-color: var(--accentedBg); + color: var(--fg); + text-align: center; } ._otp_input.error { - border-color: var(--error) !important; + border-color: var(--error) !important; } ._otp_input::-webkit-inner-spin-button, ._otp_input::-webkit-outer-spin-button { - -webkit-appearance: none; - margin: 0; + -webkit-appearance: none; + margin: 0; } -@media(prefers-reduced-motion: no-preference) { - @keyframes scaleIn { - from { - transform: scale(0); - opacity: 0; - } - } - @keyframes scaleInSmall { - from { - transform: scale(.8); - opacity: 0; - } - } +@media (prefers-reduced-motion: no-preference) { + @keyframes scaleIn { + from { + transform: scale(0); + opacity: 0; + } + } + @keyframes scaleInSmall { + from { + transform: scale(0.8); + opacity: 0; + } + } } diff --git a/fe_calckey/frontend/client/src/theme-store.ts b/fe_calckey/frontend/client/src/theme-store.ts index a2a5ff5..694d5c5 100644 --- a/fe_calckey/frontend/client/src/theme-store.ts +++ b/fe_calckey/frontend/client/src/theme-store.ts @@ -5,41 +5,41 @@ import { Theme } from "./scripts/theme"; const lsCacheKey = $i ? `themes:${$i.id}` : ""; export function getThemes(): Theme[] { - return JSON.parse(localStorage.getItem(lsCacheKey) || "[]"); + return JSON.parse(localStorage.getItem(lsCacheKey) || "[]"); } export async function fetchThemes(): Promise { - if ($i == null) return; + if ($i == null) return; - try { - const themes = await api("i/registry/get", { - scope: ["client"], - key: "themes", - }); - localStorage.setItem(lsCacheKey, JSON.stringify(themes)); - } catch (err) { - if (err.code === "NO_SUCH_KEY") return; - throw err; - } + try { + const themes = await api("i/registry/get", { + scope: ["client"], + key: "themes", + }); + localStorage.setItem(lsCacheKey, JSON.stringify(themes)); + } catch (err) { + if (err.code === "NO_SUCH_KEY") return; + throw err; + } } export async function addTheme(theme: Theme): Promise { - await fetchThemes(); - const themes = getThemes().concat(theme); - await api("i/registry/set", { - scope: ["client"], - key: "themes", - value: themes, - }); - localStorage.setItem(lsCacheKey, JSON.stringify(themes)); + await fetchThemes(); + const themes = getThemes().concat(theme); + await api("i/registry/set", { + scope: ["client"], + key: "themes", + value: themes, + }); + localStorage.setItem(lsCacheKey, JSON.stringify(themes)); } export async function removeTheme(theme: Theme): Promise { - const themes = getThemes().filter((t) => t.id !== theme.id); - await api("i/registry/set", { - scope: ["client"], - key: "themes", - value: themes, - }); - localStorage.setItem(lsCacheKey, JSON.stringify(themes)); + const themes = getThemes().filter((t) => t.id !== theme.id); + await api("i/registry/set", { + scope: ["client"], + key: "themes", + value: themes, + }); + localStorage.setItem(lsCacheKey, JSON.stringify(themes)); } diff --git a/fe_calckey/frontend/client/src/themes/_dark.json5 b/fe_calckey/frontend/client/src/themes/_dark.json5 index b26171c..a8de907 100644 --- a/fe_calckey/frontend/client/src/themes/_dark.json5 +++ b/fe_calckey/frontend/client/src/themes/_dark.json5 @@ -3,98 +3,98 @@ // no colors are specified, this isn't ever // gonna be used directly { - id: 'dark', + id: "dark", - name: 'Dark', - author: 'Calckey Contributors', - desc: 'Default dark theme', - kind: 'dark', + name: "Dark", + author: "Calckey Contributors", + desc: "Default dark theme", + kind: "dark", - props: { - accent: '#86b300', - accentDarken: ':darken<10<@accent', - accentLighten: ':lighten<10<@accent', - accentedBg: ':alpha<0.15<@accent', - focus: ':alpha<0.3<@accent', - bg: '#000', - acrylicBg: ':alpha<0.5<@bg', - fg: '#dadada', - fgTransparentWeak: ':alpha<0.75<@fg', - fgTransparent: ':alpha<0.5<@fg', - fgHighlighted: ':lighten<3<@fg', - fgOnAccent: '#fff', - divider: 'rgba(255, 255, 255, 0.1)', - indicator: '@accent', - panel: ':lighten<3<@bg', - panelHighlight: ':lighten<3<@panel', - panelHeaderBg: ':lighten<3<@panel', - panelHeaderFg: '@fg', - panelHeaderDivider: 'rgba(0, 0, 0, 0)', - panelBorder: '" solid 1px var(--divider)', - acrylicPanel: ':alpha<0.5<@panel', - windowHeader: ':alpha<0.85<@panel', - popup: ':lighten<3<@panel', - shadow: 'rgba(0, 0, 0, 0.3)', - header: ':alpha<0.7<@panel', - navBg: '@panel', - navFg: '@fg', - navHoverFg: ':lighten<17<@fg', - navActive: '@accent', - navIndicator: '@indicator', - link: '#44a4c1', - hashtag: '#ff9156', - mention: '@accent', - mentionMe: '@mention', - renote: '#229e82', - modalBg: 'rgba(0, 0, 0, 0.5)', - scrollbarHandle: 'rgba(255, 255, 255, 0.2)', - scrollbarHandleHover: 'rgba(255, 255, 255, 0.4)', - dateLabelFg: '@fg', - infoBg: '#253142', - infoFg: '#fff', - infoWarnBg: '#42321c', - infoWarnFg: '#ffbd3e', - switchBg: 'rgba(255, 255, 255, 0.15)', - cwBg: '#687390', - cwFg: '#393f4f', - cwHoverBg: '#707b97', - buttonBg: 'rgba(255, 255, 255, 0.05)', - buttonHoverBg: 'rgba(255, 255, 255, 0.1)', - buttonGradateA: '@accent', - buttonGradateB: ':hue<20<@accent', - swutchOffBg: 'rgba(255, 255, 255, 0.1)', - swutchOffFg: '@fg', - swutchOnBg: '@accentedBg', - swutchOnFg: '@accent', - inputBorder: 'rgba(255, 255, 255, 0.1)', - inputBorderHover: 'rgba(255, 255, 255, 0.2)', - listItemHoverBg: 'rgba(255, 255, 255, 0.03)', - driveFolderBg: ':alpha<0.3<@accent', - wallpaperOverlay: 'rgba(0, 0, 0, 0.5)', - badge: '#31b1ce', - messageBg: '@bg', - success: '#86b300', - error: '#ec4137', - warn: '#ecb637', - codeString: '#ffb675', - codeNumber: '#cfff9e', - codeBoolean: '#c59eff', - htmlThemeColor: '@bg', - X2: ':darken<2<@panel', - X3: 'rgba(255, 255, 255, 0.05)', - X4: 'rgba(255, 255, 255, 0.1)', - X5: 'rgba(255, 255, 255, 0.05)', - X6: 'rgba(255, 255, 255, 0.15)', - X7: 'rgba(255, 255, 255, 0.05)', - X8: ':lighten<5<@accent', - X9: ':darken<5<@accent', - X10: ':alpha<0.4<@accent', - X11: 'rgba(0, 0, 0, 0.3)', - X12: 'rgba(255, 255, 255, 0.1)', - X13: 'rgba(255, 255, 255, 0.15)', - X14: ':alpha<0.5<@navBg', - X15: ':alpha<0<@panel', - X16: ':alpha<0.7<@panel', - X17: ':alpha<0.8<@bg', - }, + props: { + accent: "#86b300", + accentDarken: ":darken<10<@accent", + accentLighten: ":lighten<10<@accent", + accentedBg: ":alpha<0.15<@accent", + focus: ":alpha<0.3<@accent", + bg: "#000", + acrylicBg: ":alpha<0.5<@bg", + fg: "#dadada", + fgTransparentWeak: ":alpha<0.75<@fg", + fgTransparent: ":alpha<0.5<@fg", + fgHighlighted: ":lighten<3<@fg", + fgOnAccent: "#fff", + divider: "rgba(255, 255, 255, 0.1)", + indicator: "@accent", + panel: ":lighten<3<@bg", + panelHighlight: ":lighten<3<@panel", + panelHeaderBg: ":lighten<3<@panel", + panelHeaderFg: "@fg", + panelHeaderDivider: "rgba(0, 0, 0, 0)", + panelBorder: '" solid 1px var(--divider)', + acrylicPanel: ":alpha<0.5<@panel", + windowHeader: ":alpha<0.85<@panel", + popup: ":lighten<3<@panel", + shadow: "rgba(0, 0, 0, 0.3)", + header: ":alpha<0.7<@panel", + navBg: "@panel", + navFg: "@fg", + navHoverFg: ":lighten<17<@fg", + navActive: "@accent", + navIndicator: "@indicator", + link: "#44a4c1", + hashtag: "#ff9156", + mention: "@accent", + mentionMe: "@mention", + renote: "#229e82", + modalBg: "rgba(0, 0, 0, 0.5)", + scrollbarHandle: "rgba(255, 255, 255, 0.2)", + scrollbarHandleHover: "rgba(255, 255, 255, 0.4)", + dateLabelFg: "@fg", + infoBg: "#253142", + infoFg: "#fff", + infoWarnBg: "#42321c", + infoWarnFg: "#ffbd3e", + switchBg: "rgba(255, 255, 255, 0.15)", + cwBg: "#687390", + cwFg: "#393f4f", + cwHoverBg: "#707b97", + buttonBg: "rgba(255, 255, 255, 0.05)", + buttonHoverBg: "rgba(255, 255, 255, 0.1)", + buttonGradateA: "@accent", + buttonGradateB: ":hue<20<@accent", + swutchOffBg: "rgba(255, 255, 255, 0.1)", + swutchOffFg: "@fg", + swutchOnBg: "@accentedBg", + swutchOnFg: "@accent", + inputBorder: "rgba(255, 255, 255, 0.1)", + inputBorderHover: "rgba(255, 255, 255, 0.2)", + listItemHoverBg: "rgba(255, 255, 255, 0.03)", + driveFolderBg: ":alpha<0.3<@accent", + wallpaperOverlay: "rgba(0, 0, 0, 0.5)", + badge: "#31b1ce", + messageBg: "@bg", + success: "#86b300", + error: "#ec4137", + warn: "#ecb637", + codeString: "#ffb675", + codeNumber: "#cfff9e", + codeBoolean: "#c59eff", + htmlThemeColor: "@bg", + X2: ":darken<2<@panel", + X3: "rgba(255, 255, 255, 0.05)", + X4: "rgba(255, 255, 255, 0.1)", + X5: "rgba(255, 255, 255, 0.05)", + X6: "rgba(255, 255, 255, 0.15)", + X7: "rgba(255, 255, 255, 0.05)", + X8: ":lighten<5<@accent", + X9: ":darken<5<@accent", + X10: ":alpha<0.4<@accent", + X11: "rgba(0, 0, 0, 0.3)", + X12: "rgba(255, 255, 255, 0.1)", + X13: "rgba(255, 255, 255, 0.15)", + X14: ":alpha<0.5<@navBg", + X15: ":alpha<0<@panel", + X16: ":alpha<0.7<@panel", + X17: ":alpha<0.8<@bg", + }, } diff --git a/fe_calckey/frontend/client/src/themes/_light.json5 b/fe_calckey/frontend/client/src/themes/_light.json5 index 431d9af..3a4801e 100644 --- a/fe_calckey/frontend/client/src/themes/_light.json5 +++ b/fe_calckey/frontend/client/src/themes/_light.json5 @@ -3,98 +3,98 @@ // no colors are specified, this isn't ever // gonna be used directly { - id: 'light', + id: "light", - name: 'Light', - author: 'Calckey Contributors', - desc: 'Default light theme', - kind: 'light', + name: "Light", + author: "Calckey Contributors", + desc: "Default light theme", + kind: "light", - props: { - accent: '#86b300', - accentDarken: ':darken<10<@accent', - accentLighten: ':lighten<10<@accent', - accentedBg: ':alpha<0.15<@accent', - focus: ':alpha<0.3<@accent', - bg: '#fff', - acrylicBg: ':alpha<0.5<@bg', - fg: '#5f5f5f', - fgTransparentWeak: ':alpha<0.75<@fg', - fgTransparent: ':alpha<0.5<@fg', - fgHighlighted: ':darken<3<@fg', - fgOnAccent: '#fff', - divider: 'rgba(0, 0, 0, 0.1)', - indicator: '@accent', - panel: ':lighten<3<@bg', - panelHighlight: ':darken<3<@panel', - panelHeaderBg: ':lighten<3<@panel', - panelHeaderFg: '@fg', - panelHeaderDivider: 'rgba(0, 0, 0, 0)', - panelBorder: '" solid 1px var(--divider)', - acrylicPanel: ':alpha<0.5<@panel', - windowHeader: ':alpha<0.85<@panel', - popup: ':lighten<3<@panel', - shadow: 'rgba(0, 0, 0, 0.1)', - header: ':alpha<0.7<@panel', - navBg: '@panel', - navFg: '@fg', - navHoverFg: ':darken<17<@fg', - navActive: '@accent', - navIndicator: '@indicator', - link: '#44a4c1', - hashtag: '#ff9156', - mention: '@accent', - mentionMe: '@mention', - renote: '#229e82', - modalBg: 'rgba(0, 0, 0, 0.3)', - scrollbarHandle: 'rgba(0, 0, 0, 0.2)', - scrollbarHandleHover: 'rgba(0, 0, 0, 0.4)', - dateLabelFg: '@fg', - infoBg: '#e5f5ff', - infoFg: '#72818a', - infoWarnBg: '#fff0db', - infoWarnFg: '#8f6e31', - switchBg: 'rgba(0, 0, 0, 0.15)', - cwBg: '#b1b9c1', - cwFg: '#fff', - cwHoverBg: '#bbc4ce', - buttonBg: 'rgba(0, 0, 0, 0.05)', - buttonHoverBg: 'rgba(0, 0, 0, 0.1)', - buttonGradateA: '@accent', - buttonGradateB: ':hue<20<@accent', - swutchOffBg: 'rgba(0, 0, 0, 0.1)', - swutchOffFg: '@panel', - swutchOnBg: '@accent', - swutchOnFg: '@fgOnAccent', - inputBorder: 'rgba(0, 0, 0, 0.1)', - inputBorderHover: 'rgba(0, 0, 0, 0.2)', - listItemHoverBg: 'rgba(0, 0, 0, 0.03)', - driveFolderBg: ':alpha<0.3<@accent', - wallpaperOverlay: 'rgba(255, 255, 255, 0.5)', - badge: '#31b1ce', - messageBg: '@bg', - success: '#86b300', - error: '#ec4137', - warn: '#ecb637', - codeString: '#b98710', - codeNumber: '#0fbbbb', - codeBoolean: '#62b70c', - htmlThemeColor: '@bg', - X2: ':darken<2<@panel', - X3: 'rgba(0, 0, 0, 0.05)', - X4: 'rgba(0, 0, 0, 0.1)', - X5: 'rgba(0, 0, 0, 0.05)', - X6: 'rgba(0, 0, 0, 0.25)', - X7: 'rgba(0, 0, 0, 0.05)', - X8: ':lighten<5<@accent', - X9: ':darken<5<@accent', - X10: ':alpha<0.4<@accent', - X11: 'rgba(0, 0, 0, 0.1)', - X12: 'rgba(0, 0, 0, 0.1)', - X13: 'rgba(0, 0, 0, 0.15)', - X14: ':alpha<0.5<@navBg', - X15: ':alpha<0<@panel', - X16: ':alpha<0.7<@panel', - X17: ':alpha<0.8<@bg', - }, + props: { + accent: "#86b300", + accentDarken: ":darken<10<@accent", + accentLighten: ":lighten<10<@accent", + accentedBg: ":alpha<0.15<@accent", + focus: ":alpha<0.3<@accent", + bg: "#fff", + acrylicBg: ":alpha<0.5<@bg", + fg: "#5f5f5f", + fgTransparentWeak: ":alpha<0.75<@fg", + fgTransparent: ":alpha<0.5<@fg", + fgHighlighted: ":darken<3<@fg", + fgOnAccent: "#fff", + divider: "rgba(0, 0, 0, 0.1)", + indicator: "@accent", + panel: ":lighten<3<@bg", + panelHighlight: ":darken<3<@panel", + panelHeaderBg: ":lighten<3<@panel", + panelHeaderFg: "@fg", + panelHeaderDivider: "rgba(0, 0, 0, 0)", + panelBorder: '" solid 1px var(--divider)', + acrylicPanel: ":alpha<0.5<@panel", + windowHeader: ":alpha<0.85<@panel", + popup: ":lighten<3<@panel", + shadow: "rgba(0, 0, 0, 0.1)", + header: ":alpha<0.7<@panel", + navBg: "@panel", + navFg: "@fg", + navHoverFg: ":darken<17<@fg", + navActive: "@accent", + navIndicator: "@indicator", + link: "#44a4c1", + hashtag: "#ff9156", + mention: "@accent", + mentionMe: "@mention", + renote: "#229e82", + modalBg: "rgba(0, 0, 0, 0.3)", + scrollbarHandle: "rgba(0, 0, 0, 0.2)", + scrollbarHandleHover: "rgba(0, 0, 0, 0.4)", + dateLabelFg: "@fg", + infoBg: "#e5f5ff", + infoFg: "#72818a", + infoWarnBg: "#fff0db", + infoWarnFg: "#8f6e31", + switchBg: "rgba(0, 0, 0, 0.15)", + cwBg: "#b1b9c1", + cwFg: "#fff", + cwHoverBg: "#bbc4ce", + buttonBg: "rgba(0, 0, 0, 0.05)", + buttonHoverBg: "rgba(0, 0, 0, 0.1)", + buttonGradateA: "@accent", + buttonGradateB: ":hue<20<@accent", + swutchOffBg: "rgba(0, 0, 0, 0.1)", + swutchOffFg: "@panel", + swutchOnBg: "@accent", + swutchOnFg: "@fgOnAccent", + inputBorder: "rgba(0, 0, 0, 0.1)", + inputBorderHover: "rgba(0, 0, 0, 0.2)", + listItemHoverBg: "rgba(0, 0, 0, 0.03)", + driveFolderBg: ":alpha<0.3<@accent", + wallpaperOverlay: "rgba(255, 255, 255, 0.5)", + badge: "#31b1ce", + messageBg: "@bg", + success: "#86b300", + error: "#ec4137", + warn: "#ecb637", + codeString: "#b98710", + codeNumber: "#0fbbbb", + codeBoolean: "#62b70c", + htmlThemeColor: "@bg", + X2: ":darken<2<@panel", + X3: "rgba(0, 0, 0, 0.05)", + X4: "rgba(0, 0, 0, 0.1)", + X5: "rgba(0, 0, 0, 0.05)", + X6: "rgba(0, 0, 0, 0.25)", + X7: "rgba(0, 0, 0, 0.05)", + X8: ":lighten<5<@accent", + X9: ":darken<5<@accent", + X10: ":alpha<0.4<@accent", + X11: "rgba(0, 0, 0, 0.1)", + X12: "rgba(0, 0, 0, 0.1)", + X13: "rgba(0, 0, 0, 0.15)", + X14: ":alpha<0.5<@navBg", + X15: ":alpha<0<@panel", + X16: ":alpha<0.7<@panel", + X17: ":alpha<0.8<@bg", + }, } diff --git a/fe_calckey/frontend/client/src/themes/d-astro.json5 b/fe_calckey/frontend/client/src/themes/d-astro.json5 index c6a927e..64fa142 100644 --- a/fe_calckey/frontend/client/src/themes/d-astro.json5 +++ b/fe_calckey/frontend/client/src/themes/d-astro.json5 @@ -1,78 +1,78 @@ { - id: '080a01c5-377d-4fbb-88cc-6bb5d04977ea', - base: 'dark', - name: 'Mi Astro Dark', - author: 'syuilo', - props: { - bg: '#232125', - fg: '#efdab9', - cwBg: '#687390', - cwFg: '#393f4f', - link: '#78b0a0', - warn: '#ecb637', - badge: '#31b1ce', - error: '#ec4137', - focus: ':alpha<0.3<@accent', - navBg: '@panel', - navFg: '@fg', - panel: '#2a272b', - accent: '#81c08b', - header: ':alpha<0.7<@bg', - infoBg: '#253142', - infoFg: '#fff', - renote: '#659CC8', - shadow: 'rgba(0, 0, 0, 0.3)', - divider: 'rgba(255, 255, 255, 0.1)', - hashtag: '#ff9156', - mention: '#ffd152', - modalBg: 'rgba(0, 0, 0, 0.5)', - success: '#86b300', - buttonBg: 'rgba(255, 255, 255, 0.05)', - acrylicBg: ':alpha<0.5<@bg', - cwHoverBg: '#707b97', - indicator: '@accent', - mentionMe: '#fb5d38', - messageBg: '@bg', - navActive: '@accent', - infoWarnBg: '#42321c', - infoWarnFg: '#ffbd3e', - navHoverFg: ':lighten<17<@fg', - dateLabelFg: '@fg', - inputBorder: 'rgba(255, 255, 255, 0.1)', - inputBorderHover: 'rgba(255, 255, 255, 0.2)', - panelBorder: '" solid 1px var(--divider)', - accentDarken: ':darken<10<@accent', - acrylicPanel: ':alpha<0.5<@panel', - navIndicator: '@accent', - accentLighten: ':lighten<10<@accent', - buttonHoverBg: 'rgba(255, 255, 255, 0.1)', - buttonGradateA: '@accent', - buttonGradateB: ':hue<-20<@accent', - driveFolderBg: ':alpha<0.3<@accent', - fgHighlighted: ':lighten<3<@fg', - panelHeaderBg: ':lighten<3<@panel', - panelHeaderFg: '@fg', - htmlThemeColor: '@bg', - panelHighlight: ':lighten<3<@panel', - listItemHoverBg: 'rgba(255, 255, 255, 0.03)', - scrollbarHandle: 'rgba(255, 255, 255, 0.2)', - wallpaperOverlay: 'rgba(0, 0, 0, 0.5)', - panelHeaderDivider: 'rgba(0, 0, 0, 0)', - scrollbarHandleHover: 'rgba(255, 255, 255, 0.4)', - X2: ':darken<2<@panel', - X3: 'rgba(255, 255, 255, 0.05)', - X4: 'rgba(255, 255, 255, 0.1)', - X5: 'rgba(255, 255, 255, 0.05)', - X6: 'rgba(255, 255, 255, 0.15)', - X7: 'rgba(255, 255, 255, 0.05)', - X8: ':lighten<5<@accent', - X9: ':darken<5<@accent', - X10: ':alpha<0.4<@accent', - X11: 'rgba(0, 0, 0, 0.3)', - X12: 'rgba(255, 255, 255, 0.1)', - X13: 'rgba(255, 255, 255, 0.15)', - X14: ':alpha<0.5<@navBg', - X15: ':alpha<0<@panel', - X16: ':alpha<0.7<@panel', - }, + id: "080a01c5-377d-4fbb-88cc-6bb5d04977ea", + base: "dark", + name: "Mi Astro Dark", + author: "syuilo", + props: { + bg: "#232125", + fg: "#efdab9", + cwBg: "#687390", + cwFg: "#393f4f", + link: "#78b0a0", + warn: "#ecb637", + badge: "#31b1ce", + error: "#ec4137", + focus: ":alpha<0.3<@accent", + navBg: "@panel", + navFg: "@fg", + panel: "#2a272b", + accent: "#81c08b", + header: ":alpha<0.7<@bg", + infoBg: "#253142", + infoFg: "#fff", + renote: "#659CC8", + shadow: "rgba(0, 0, 0, 0.3)", + divider: "rgba(255, 255, 255, 0.1)", + hashtag: "#ff9156", + mention: "#ffd152", + modalBg: "rgba(0, 0, 0, 0.5)", + success: "#86b300", + buttonBg: "rgba(255, 255, 255, 0.05)", + acrylicBg: ":alpha<0.5<@bg", + cwHoverBg: "#707b97", + indicator: "@accent", + mentionMe: "#fb5d38", + messageBg: "@bg", + navActive: "@accent", + infoWarnBg: "#42321c", + infoWarnFg: "#ffbd3e", + navHoverFg: ":lighten<17<@fg", + dateLabelFg: "@fg", + inputBorder: "rgba(255, 255, 255, 0.1)", + inputBorderHover: "rgba(255, 255, 255, 0.2)", + panelBorder: '" solid 1px var(--divider)', + accentDarken: ":darken<10<@accent", + acrylicPanel: ":alpha<0.5<@panel", + navIndicator: "@accent", + accentLighten: ":lighten<10<@accent", + buttonHoverBg: "rgba(255, 255, 255, 0.1)", + buttonGradateA: "@accent", + buttonGradateB: ":hue<-20<@accent", + driveFolderBg: ":alpha<0.3<@accent", + fgHighlighted: ":lighten<3<@fg", + panelHeaderBg: ":lighten<3<@panel", + panelHeaderFg: "@fg", + htmlThemeColor: "@bg", + panelHighlight: ":lighten<3<@panel", + listItemHoverBg: "rgba(255, 255, 255, 0.03)", + scrollbarHandle: "rgba(255, 255, 255, 0.2)", + wallpaperOverlay: "rgba(0, 0, 0, 0.5)", + panelHeaderDivider: "rgba(0, 0, 0, 0)", + scrollbarHandleHover: "rgba(255, 255, 255, 0.4)", + X2: ":darken<2<@panel", + X3: "rgba(255, 255, 255, 0.05)", + X4: "rgba(255, 255, 255, 0.1)", + X5: "rgba(255, 255, 255, 0.05)", + X6: "rgba(255, 255, 255, 0.15)", + X7: "rgba(255, 255, 255, 0.05)", + X8: ":lighten<5<@accent", + X9: ":darken<5<@accent", + X10: ":alpha<0.4<@accent", + X11: "rgba(0, 0, 0, 0.3)", + X12: "rgba(255, 255, 255, 0.1)", + X13: "rgba(255, 255, 255, 0.15)", + X14: ":alpha<0.5<@navBg", + X15: ":alpha<0<@panel", + X16: ":alpha<0.7<@panel", + }, } diff --git a/fe_calckey/frontend/client/src/themes/d-botanical.json5 b/fe_calckey/frontend/client/src/themes/d-botanical.json5 index c03b95e..1451569 100644 --- a/fe_calckey/frontend/client/src/themes/d-botanical.json5 +++ b/fe_calckey/frontend/client/src/themes/d-botanical.json5 @@ -1,26 +1,26 @@ { - id: '504debaf-4912-6a4c-5059-1db08a76b737', + id: "504debaf-4912-6a4c-5059-1db08a76b737", - name: 'Mi Botanical Dark', - author: 'syuilo', + name: "Mi Botanical Dark", + author: "syuilo", - base: 'dark', + base: "dark", - props: { - accent: 'rgb(148, 179, 0)', - bg: 'rgb(37, 38, 36)', - fg: 'rgb(216, 212, 199)', - fgHighlighted: '#fff', - divider: 'rgba(255, 255, 255, 0.14)', - panel: 'rgb(47, 47, 44)', - panelHeaderBg: '@panel', - panelHeaderDivider: '@divider', - header: ':alpha<0.7<@panel', - navBg: '#363636', - renote: '@accent', - mention: 'rgb(212, 153, 76)', - mentionMe: 'rgb(212, 210, 76)', - hashtag: '#5bcbb0', - link: '@accent', - }, + props: { + accent: "rgb(148, 179, 0)", + bg: "rgb(37, 38, 36)", + fg: "rgb(216, 212, 199)", + fgHighlighted: "#fff", + divider: "rgba(255, 255, 255, 0.14)", + panel: "rgb(47, 47, 44)", + panelHeaderBg: "@panel", + panelHeaderDivider: "@divider", + header: ":alpha<0.7<@panel", + navBg: "#363636", + renote: "@accent", + mention: "rgb(212, 153, 76)", + mentionMe: "rgb(212, 210, 76)", + hashtag: "#5bcbb0", + link: "@accent", + }, } diff --git a/fe_calckey/frontend/client/src/themes/d-catppuccin-frappe.json5 b/fe_calckey/frontend/client/src/themes/d-catppuccin-frappe.json5 index 891fe18..7e5beeb 100644 --- a/fe_calckey/frontend/client/src/themes/d-catppuccin-frappe.json5 +++ b/fe_calckey/frontend/client/src/themes/d-catppuccin-frappe.json5 @@ -1,94 +1,94 @@ { - id: 'ffcd3328-5c57-4ca3-9dac-4580cbf7742f', - base: 'dark', - name: 'Catppuccin frappe', - props: { - X2: ':darken<2<@panel', - X3: 'rgba(255, 255, 255, 0.05)', - X4: 'rgba(255, 255, 255, 0.1)', - X5: 'rgba(255, 255, 255, 0.05)', - X6: 'rgba(255, 255, 255, 0.15)', - X7: 'rgba(255, 255, 255, 0.05)', - X8: ':lighten<5<@accent', - X9: ':darken<5<@accent', - bg: '#232634', - fg: '#c6d0f5', - X10: ':alpha<0.4<@accent', - X11: 'rgba(0, 0, 0, 0.3)', - X12: 'rgba(255, 255, 255, 0.1)', - X13: 'rgba(255, 255, 255, 0.15)', - X14: ':alpha<0.5<@navBg', - X15: ':alpha<0<@panel', - X16: ':alpha<0.7<@panel', - X17: ':alpha<0.8<@bg', - cwBg: '#51576d', - cwFg: '#b5bfe2', - link: '#8caaee', - warn: '#ef9f76', - badge: '#8caaee', - error: '#e78284', - focus: ':alpha<0.3<@accent', - navBg: '@panel', - navFg: '@fg', - panel: ':lighten<3<@bg', - popup: ':lighten<3<@panel', - accent: '#eebebe', - header: ':alpha<0.7<@panel', - infoBg: '#414559', - infoFg: '#a5adce', - renote: '#8caaee', - shadow: 'rgba(0, 0, 0, 0.3)', - divider: 'rgba(255, 255, 255, 0.1)', - hashtag: '#85c1dc', - mention: '@accent', - modalBg: 'rgba(0, 0, 0, 0.5)', - success: '#a6d189', - buttonBg: 'rgba(255, 255, 255, 0.05)', - switchBg: 'rgba(255, 255, 255, 0.15)', - acrylicBg: ':alpha<0.5<@bg', - cwHoverBg: '#626880', - indicator: '@accent', - mentionMe: '@mention', - messageBg: '@bg', - navActive: '@accent', - accentedBg: ':alpha<0.15<@accent', - codeNumber: '#a6d189', - codeString: '#ef9f76', - fgOnAccent: '#303446', - infoWarnBg: '#414559', - infoWarnFg: '#b5bfe2', - navHoverFg: ':lighten<17<@fg', - swutchOnBg: '@accentedBg', - swutchOnFg: '@accent', - codeBoolean: '@accent', - dateLabelFg: '@fg', - deckDivider: '#737994', - inputBorder: 'rgba(255, 255, 255, 0.1)', - panelBorder: 'solid 1px var(--divider)', - swutchOffBg: 'rgba(255, 255, 255, 0.1)', - swutchOffFg: '@fg', - accentDarken: ':darken<10<@accent', - acrylicPanel: ':alpha<0.5<@panel', - navIndicator: '@indicator', - windowHeader: ':alpha<0.85<@panel', - accentLighten: ':lighten<10<@accent', - buttonHoverBg: 'rgba(255, 255, 255, 0.1)', - driveFolderBg: ':alpha<0.3<@accent', - fgHighlighted: ':lighten<3<@fg', - fgTransparent: ':alpha<0.5<@fg', - panelHeaderBg: ':lighten<3<@panel', - panelHeaderFg: '@fg', - buttonGradateA: '@accent', - buttonGradateB: ':hue<20<@accent', - htmlThemeColor: '@bg', - panelHighlight: ':lighten<3<@panel', - listItemHoverBg: 'rgba(255, 255, 255, 0.03)', - scrollbarHandle: 'rgba(255, 255, 255, 0.2)', - inputBorderHover: 'rgba(255, 255, 255, 0.2)', - wallpaperOverlay: 'rgba(0, 0, 0, 0.5)', - fgTransparentWeak: ':alpha<0.75<@fg', - panelHeaderDivider: 'rgba(0, 0, 0, 0)', - scrollbarHandleHover: 'rgba(255, 255, 255, 0.4)', - }, - author: 'somebody ¯_(ツ)_/¯', + id: "ffcd3328-5c57-4ca3-9dac-4580cbf7742f", + base: "dark", + name: "Catppuccin frappe", + props: { + X2: ":darken<2<@panel", + X3: "rgba(255, 255, 255, 0.05)", + X4: "rgba(255, 255, 255, 0.1)", + X5: "rgba(255, 255, 255, 0.05)", + X6: "rgba(255, 255, 255, 0.15)", + X7: "rgba(255, 255, 255, 0.05)", + X8: ":lighten<5<@accent", + X9: ":darken<5<@accent", + bg: "#232634", + fg: "#c6d0f5", + X10: ":alpha<0.4<@accent", + X11: "rgba(0, 0, 0, 0.3)", + X12: "rgba(255, 255, 255, 0.1)", + X13: "rgba(255, 255, 255, 0.15)", + X14: ":alpha<0.5<@navBg", + X15: ":alpha<0<@panel", + X16: ":alpha<0.7<@panel", + X17: ":alpha<0.8<@bg", + cwBg: "#51576d", + cwFg: "#b5bfe2", + link: "#8caaee", + warn: "#ef9f76", + badge: "#8caaee", + error: "#e78284", + focus: ":alpha<0.3<@accent", + navBg: "@panel", + navFg: "@fg", + panel: ":lighten<3<@bg", + popup: ":lighten<3<@panel", + accent: "#eebebe", + header: ":alpha<0.7<@panel", + infoBg: "#414559", + infoFg: "#a5adce", + renote: "#8caaee", + shadow: "rgba(0, 0, 0, 0.3)", + divider: "rgba(255, 255, 255, 0.1)", + hashtag: "#85c1dc", + mention: "@accent", + modalBg: "rgba(0, 0, 0, 0.5)", + success: "#a6d189", + buttonBg: "rgba(255, 255, 255, 0.05)", + switchBg: "rgba(255, 255, 255, 0.15)", + acrylicBg: ":alpha<0.5<@bg", + cwHoverBg: "#626880", + indicator: "@accent", + mentionMe: "@mention", + messageBg: "@bg", + navActive: "@accent", + accentedBg: ":alpha<0.15<@accent", + codeNumber: "#a6d189", + codeString: "#ef9f76", + fgOnAccent: "#303446", + infoWarnBg: "#414559", + infoWarnFg: "#b5bfe2", + navHoverFg: ":lighten<17<@fg", + swutchOnBg: "@accentedBg", + swutchOnFg: "@accent", + codeBoolean: "@accent", + dateLabelFg: "@fg", + deckDivider: "#737994", + inputBorder: "rgba(255, 255, 255, 0.1)", + panelBorder: "solid 1px var(--divider)", + swutchOffBg: "rgba(255, 255, 255, 0.1)", + swutchOffFg: "@fg", + accentDarken: ":darken<10<@accent", + acrylicPanel: ":alpha<0.5<@panel", + navIndicator: "@indicator", + windowHeader: ":alpha<0.85<@panel", + accentLighten: ":lighten<10<@accent", + buttonHoverBg: "rgba(255, 255, 255, 0.1)", + driveFolderBg: ":alpha<0.3<@accent", + fgHighlighted: ":lighten<3<@fg", + fgTransparent: ":alpha<0.5<@fg", + panelHeaderBg: ":lighten<3<@panel", + panelHeaderFg: "@fg", + buttonGradateA: "@accent", + buttonGradateB: ":hue<20<@accent", + htmlThemeColor: "@bg", + panelHighlight: ":lighten<3<@panel", + listItemHoverBg: "rgba(255, 255, 255, 0.03)", + scrollbarHandle: "rgba(255, 255, 255, 0.2)", + inputBorderHover: "rgba(255, 255, 255, 0.2)", + wallpaperOverlay: "rgba(0, 0, 0, 0.5)", + fgTransparentWeak: ":alpha<0.75<@fg", + panelHeaderDivider: "rgba(0, 0, 0, 0)", + scrollbarHandleHover: "rgba(255, 255, 255, 0.4)", + }, + author: "somebody ¯_(ツ)_/¯", } diff --git a/fe_calckey/frontend/client/src/themes/d-catppuccin-mocha.json5 b/fe_calckey/frontend/client/src/themes/d-catppuccin-mocha.json5 index 94e1381..78e8570 100644 --- a/fe_calckey/frontend/client/src/themes/d-catppuccin-mocha.json5 +++ b/fe_calckey/frontend/client/src/themes/d-catppuccin-mocha.json5 @@ -1,94 +1,94 @@ { - id: 'd413f41f-a489-48be-9e20-3532ffbb4363', - base: 'dark', - name: 'Catppuccin mocha', - props: { - X2: ':darken<2<@panel', - X3: 'rgba(255, 255, 255, 0.05)', - X4: 'rgba(255, 255, 255, 0.1)', - X5: 'rgba(255, 255, 255, 0.05)', - X6: 'rgba(255, 255, 255, 0.15)', - X7: 'rgba(255, 255, 255, 0.05)', - X8: ':lighten<5<@accent', - X9: ':darken<5<@accent', - bg: '#11111b', - fg: '#cdd6f4', - X10: ':alpha<0.4<@accent', - X11: 'rgba(0, 0, 0, 0.3)', - X12: 'rgba(255, 255, 255, 0.1)', - X13: 'rgba(255, 255, 255, 0.15)', - X14: ':alpha<0.5<@navBg', - X15: ':alpha<0<@panel', - X16: ':alpha<0.7<@panel', - X17: ':alpha<0.8<@bg', - cwBg: '#45475a', - cwFg: '#bac2de', - link: '#89b4fa', - warn: '#fab387', - badge: '#89b4fa', - error: '#f38ba8', - focus: ':alpha<0.3<@accent', - navBg: '@panel', - navFg: '@fg', - panel: ':lighten<3<@bg', - popup: ':lighten<3<@panel', - accent: '#f2cdcd', - header: ':alpha<0.7<@panel', - infoBg: '#313244', - infoFg: '#a6adc8', - renote: '#89b4fa', - shadow: 'rgba(0, 0, 0, 0.3)', - divider: 'rgba(255, 255, 255, 0.1)', - hashtag: '#74c7ec', - mention: '@accent', - modalBg: 'rgba(0, 0, 0, 0.5)', - success: '#a6e3a1', - buttonBg: 'rgba(255, 255, 255, 0.05)', - switchBg: 'rgba(255, 255, 255, 0.15)', - acrylicBg: ':alpha<0.5<@bg', - cwHoverBg: '#585b70', - indicator: '@accent', - mentionMe: '@mention', - messageBg: '@bg', - navActive: '@accent', - accentedBg: ':alpha<0.15<@accent', - codeNumber: '#a6e3a1', - codeString: '#fab387', - fgOnAccent: '#1e1e2e', - infoWarnBg: '#313244', - infoWarnFg: '#bac2de', - navHoverFg: ':lighten<17<@fg', - swutchOnBg: '@accentedBg', - swutchOnFg: '@accent', - codeBoolean: '@accent', - dateLabelFg: '@fg', - deckDivider: '#6c7086', - inputBorder: 'rgba(255, 255, 255, 0.1)', - panelBorder: 'solid 1px var(--divider)', - swutchOffBg: 'rgba(255, 255, 255, 0.1)', - swutchOffFg: '@fg', - accentDarken: ':darken<10<@accent', - acrylicPanel: ':alpha<0.5<@panel', - navIndicator: '@indicator', - windowHeader: ':alpha<0.85<@panel', - accentLighten: ':lighten<10<@accent', - buttonHoverBg: 'rgba(255, 255, 255, 0.1)', - driveFolderBg: ':alpha<0.3<@accent', - fgHighlighted: ':lighten<3<@fg', - fgTransparent: ':alpha<0.5<@fg', - panelHeaderBg: ':lighten<3<@panel', - panelHeaderFg: '@fg', - buttonGradateA: '@accent', - buttonGradateB: ':hue<20<@accent', - htmlThemeColor: '@bg', - panelHighlight: ':lighten<3<@panel', - listItemHoverBg: 'rgba(255, 255, 255, 0.03)', - scrollbarHandle: 'rgba(255, 255, 255, 0.2)', - inputBorderHover: 'rgba(255, 255, 255, 0.2)', - wallpaperOverlay: 'rgba(0, 0, 0, 0.5)', - fgTransparentWeak: ':alpha<0.75<@fg', - panelHeaderDivider: 'rgba(0, 0, 0, 0)', - scrollbarHandleHover: 'rgba(255, 255, 255, 0.4)', - }, - author: 'somebody ¯_(ツ)_/¯', + id: "d413f41f-a489-48be-9e20-3532ffbb4363", + base: "dark", + name: "Catppuccin mocha", + props: { + X2: ":darken<2<@panel", + X3: "rgba(255, 255, 255, 0.05)", + X4: "rgba(255, 255, 255, 0.1)", + X5: "rgba(255, 255, 255, 0.05)", + X6: "rgba(255, 255, 255, 0.15)", + X7: "rgba(255, 255, 255, 0.05)", + X8: ":lighten<5<@accent", + X9: ":darken<5<@accent", + bg: "#11111b", + fg: "#cdd6f4", + X10: ":alpha<0.4<@accent", + X11: "rgba(0, 0, 0, 0.3)", + X12: "rgba(255, 255, 255, 0.1)", + X13: "rgba(255, 255, 255, 0.15)", + X14: ":alpha<0.5<@navBg", + X15: ":alpha<0<@panel", + X16: ":alpha<0.7<@panel", + X17: ":alpha<0.8<@bg", + cwBg: "#45475a", + cwFg: "#bac2de", + link: "#89b4fa", + warn: "#fab387", + badge: "#89b4fa", + error: "#f38ba8", + focus: ":alpha<0.3<@accent", + navBg: "@panel", + navFg: "@fg", + panel: ":lighten<3<@bg", + popup: ":lighten<3<@panel", + accent: "#f2cdcd", + header: ":alpha<0.7<@panel", + infoBg: "#313244", + infoFg: "#a6adc8", + renote: "#89b4fa", + shadow: "rgba(0, 0, 0, 0.3)", + divider: "rgba(255, 255, 255, 0.1)", + hashtag: "#74c7ec", + mention: "@accent", + modalBg: "rgba(0, 0, 0, 0.5)", + success: "#a6e3a1", + buttonBg: "rgba(255, 255, 255, 0.05)", + switchBg: "rgba(255, 255, 255, 0.15)", + acrylicBg: ":alpha<0.5<@bg", + cwHoverBg: "#585b70", + indicator: "@accent", + mentionMe: "@mention", + messageBg: "@bg", + navActive: "@accent", + accentedBg: ":alpha<0.15<@accent", + codeNumber: "#a6e3a1", + codeString: "#fab387", + fgOnAccent: "#1e1e2e", + infoWarnBg: "#313244", + infoWarnFg: "#bac2de", + navHoverFg: ":lighten<17<@fg", + swutchOnBg: "@accentedBg", + swutchOnFg: "@accent", + codeBoolean: "@accent", + dateLabelFg: "@fg", + deckDivider: "#6c7086", + inputBorder: "rgba(255, 255, 255, 0.1)", + panelBorder: "solid 1px var(--divider)", + swutchOffBg: "rgba(255, 255, 255, 0.1)", + swutchOffFg: "@fg", + accentDarken: ":darken<10<@accent", + acrylicPanel: ":alpha<0.5<@panel", + navIndicator: "@indicator", + windowHeader: ":alpha<0.85<@panel", + accentLighten: ":lighten<10<@accent", + buttonHoverBg: "rgba(255, 255, 255, 0.1)", + driveFolderBg: ":alpha<0.3<@accent", + fgHighlighted: ":lighten<3<@fg", + fgTransparent: ":alpha<0.5<@fg", + panelHeaderBg: ":lighten<3<@panel", + panelHeaderFg: "@fg", + buttonGradateA: "@accent", + buttonGradateB: ":hue<20<@accent", + htmlThemeColor: "@bg", + panelHighlight: ":lighten<3<@panel", + listItemHoverBg: "rgba(255, 255, 255, 0.03)", + scrollbarHandle: "rgba(255, 255, 255, 0.2)", + inputBorderHover: "rgba(255, 255, 255, 0.2)", + wallpaperOverlay: "rgba(0, 0, 0, 0.5)", + fgTransparentWeak: ":alpha<0.75<@fg", + panelHeaderDivider: "rgba(0, 0, 0, 0)", + scrollbarHandleHover: "rgba(255, 255, 255, 0.4)", + }, + author: "somebody ¯_(ツ)_/¯", } diff --git a/fe_calckey/frontend/client/src/themes/d-cherry.json5 b/fe_calckey/frontend/client/src/themes/d-cherry.json5 index a7e1ad1..fd0c405 100644 --- a/fe_calckey/frontend/client/src/themes/d-cherry.json5 +++ b/fe_calckey/frontend/client/src/themes/d-cherry.json5 @@ -1,20 +1,20 @@ { - id: '679b3b87-a4e9-4789-8696-b56c15cc33b0', + id: "679b3b87-a4e9-4789-8696-b56c15cc33b0", - name: 'Mi Cherry Dark', - author: 'syuilo', + name: "Mi Cherry Dark", + author: "syuilo", - base: 'dark', + base: "dark", - props: { - accent: 'rgb(255, 89, 117)', - bg: 'rgb(28, 28, 37)', - fg: 'rgb(236, 239, 244)', - panel: 'rgb(35, 35, 47)', - renote: '@accent', - link: '@accent', - mention: '@accent', - hashtag: '@accent', - divider: 'rgb(63, 63, 80)', - }, + props: { + accent: "rgb(255, 89, 117)", + bg: "rgb(28, 28, 37)", + fg: "rgb(236, 239, 244)", + panel: "rgb(35, 35, 47)", + renote: "@accent", + link: "@accent", + mention: "@accent", + hashtag: "@accent", + divider: "rgb(63, 63, 80)", + }, } diff --git a/fe_calckey/frontend/client/src/themes/d-dark.json5 b/fe_calckey/frontend/client/src/themes/d-dark.json5 index d24ce4d..8163dfe 100644 --- a/fe_calckey/frontend/client/src/themes/d-dark.json5 +++ b/fe_calckey/frontend/client/src/themes/d-dark.json5 @@ -1,26 +1,26 @@ { - id: '8050783a-7f63-445a-b270-36d0f6ba1677', + id: "8050783a-7f63-445a-b270-36d0f6ba1677", - name: 'Mi Dark', - author: 'syuilo', - desc: 'Default light theme', + name: "Mi Dark", + author: "syuilo", + desc: "Default light theme", - base: 'dark', + base: "dark", - props: { - bg: '#232323', - fg: 'rgb(199, 209, 216)', - fgHighlighted: '#fff', - divider: 'rgba(255, 255, 255, 0.14)', - panel: '#2d2d2d', - panelHeaderBg: '@panel', - panelHeaderDivider: '@divider', - header: ':alpha<0.7<@panel', - navBg: '#363636', - renote: '@accent', - mention: '#da6d35', - mentionMe: '#d44c4c', - hashtag: '#4cb8d4', - link: '@accent', - }, + props: { + bg: "#232323", + fg: "rgb(199, 209, 216)", + fgHighlighted: "#fff", + divider: "rgba(255, 255, 255, 0.14)", + panel: "#2d2d2d", + panelHeaderBg: "@panel", + panelHeaderDivider: "@divider", + header: ":alpha<0.7<@panel", + navBg: "#363636", + renote: "@accent", + mention: "#da6d35", + mentionMe: "#d44c4c", + hashtag: "#4cb8d4", + link: "@accent", + }, } diff --git a/fe_calckey/frontend/client/src/themes/d-future.json5 b/fe_calckey/frontend/client/src/themes/d-future.json5 index b6fa1ab..4d0d8e7 100644 --- a/fe_calckey/frontend/client/src/themes/d-future.json5 +++ b/fe_calckey/frontend/client/src/themes/d-future.json5 @@ -1,27 +1,27 @@ { - id: '32a637ef-b47a-4775-bb7b-bacbb823f865', + id: "32a637ef-b47a-4775-bb7b-bacbb823f865", - name: 'Mi Future Dark', - author: 'syuilo', + name: "Mi Future Dark", + author: "syuilo", - base: 'dark', + base: "dark", - props: { - accent: '#63e2b7', - bg: '#101014', - fg: '#D5D5D6', - fgHighlighted: '#fff', - fgOnAccent: '#000', - divider: 'rgba(255, 255, 255, 0.1)', - panel: '#18181c', - panelHeaderBg: '@panel', - panelHeaderDivider: '@divider', - renote: '@accent', - mention: '#f2c97d', - mentionMe: '@accent', - hashtag: '#70c0e8', - link: '#e88080', - buttonGradateA: '@accent', - buttonGradateB: ':saturate<30<:hue<30<@accent', - }, + props: { + accent: "#63e2b7", + bg: "#101014", + fg: "#D5D5D6", + fgHighlighted: "#fff", + fgOnAccent: "#000", + divider: "rgba(255, 255, 255, 0.1)", + panel: "#18181c", + panelHeaderBg: "@panel", + panelHeaderDivider: "@divider", + renote: "@accent", + mention: "#f2c97d", + mentionMe: "@accent", + hashtag: "#70c0e8", + link: "#e88080", + buttonGradateA: "@accent", + buttonGradateB: ":saturate<30<:hue<30<@accent", + }, } diff --git a/fe_calckey/frontend/client/src/themes/d-green-lime.json5 b/fe_calckey/frontend/client/src/themes/d-green-lime.json5 index a6983b9..8ffa7c3 100644 --- a/fe_calckey/frontend/client/src/themes/d-green-lime.json5 +++ b/fe_calckey/frontend/client/src/themes/d-green-lime.json5 @@ -1,24 +1,24 @@ { - id: '02816013-8107-440f-877e-865083ffe194', + id: "02816013-8107-440f-877e-865083ffe194", - name: 'Mi Green+Lime Dark', - author: 'syuilo', + name: "Mi Green+Lime Dark", + author: "syuilo", - base: 'dark', + base: "dark", - props: { - accent: '#b4e900', - bg: '#0C1210', - fg: '#dee7e4', - fgHighlighted: '#fff', - fgOnAccent: '#192320', - divider: '#e7fffb24', - panel: '#192320', - panelHeaderBg: '@panel', - panelHeaderDivider: '@divider', - popup: '#293330', - renote: '@accent', - mentionMe: '#ffaa00', - link: '#24d7ce', - }, + props: { + accent: "#b4e900", + bg: "#0C1210", + fg: "#dee7e4", + fgHighlighted: "#fff", + fgOnAccent: "#192320", + divider: "#e7fffb24", + panel: "#192320", + panelHeaderBg: "@panel", + panelHeaderDivider: "@divider", + popup: "#293330", + renote: "@accent", + mentionMe: "#ffaa00", + link: "#24d7ce", + }, } diff --git a/fe_calckey/frontend/client/src/themes/d-green-orange.json5 b/fe_calckey/frontend/client/src/themes/d-green-orange.json5 index 62adc39..870a955 100644 --- a/fe_calckey/frontend/client/src/themes/d-green-orange.json5 +++ b/fe_calckey/frontend/client/src/themes/d-green-orange.json5 @@ -1,24 +1,24 @@ { - id: 'dc489603-27b5-424a-9b25-1ff6aec9824a', + id: "dc489603-27b5-424a-9b25-1ff6aec9824a", - name: 'Mi Green+Orange Dark', - author: 'syuilo', + name: "Mi Green+Orange Dark", + author: "syuilo", - base: 'dark', + base: "dark", - props: { - accent: '#e97f00', - bg: '#0C1210', - fg: '#dee7e4', - fgHighlighted: '#fff', - fgOnAccent: '#192320', - divider: '#e7fffb24', - panel: '#192320', - panelHeaderBg: '@panel', - panelHeaderDivider: '@divider', - popup: '#293330', - renote: '@accent', - mentionMe: '#b4e900', - link: '#24d7ce', - }, + props: { + accent: "#e97f00", + bg: "#0C1210", + fg: "#dee7e4", + fgHighlighted: "#fff", + fgOnAccent: "#192320", + divider: "#e7fffb24", + panel: "#192320", + panelHeaderBg: "@panel", + panelHeaderDivider: "@divider", + popup: "#293330", + renote: "@accent", + mentionMe: "#b4e900", + link: "#24d7ce", + }, } diff --git a/fe_calckey/frontend/client/src/themes/d-gruvbox.json5 b/fe_calckey/frontend/client/src/themes/d-gruvbox.json5 index 5f4ad60..0878343 100644 --- a/fe_calckey/frontend/client/src/themes/d-gruvbox.json5 +++ b/fe_calckey/frontend/client/src/themes/d-gruvbox.json5 @@ -1,30 +1,30 @@ { - id: '256a2e52-440f-4a00-8a76-c93501354dfb', - base: 'dark', - desc: 'Misskey gruvbox-dark-medium theme. Inspired by https://github.com/morhetz/gruvbox', - name: 'Gruvbox Dark Medium', - props: { - bg: '#282828', - fg: '#ebdbb2', - link: '#b16286', - warn: '#d65d0e', - badge: '#458588', - error: '#fb4934', - navBg: '#32302f', - panel: '#32302f', - accent: '#98971a', - header: ':alpha<0.7<@panel', - renote: '@accent', - divider: '#7c6f64', - hashtag: '#458588', - mention: '#98971a', - success: '#98971a', - mentionMe: '#fb4934', - fgHighlighted: '#fbf1c7', - panelHeaderBg: '@panel', - buttonGradateA: '#98971a', - buttonGradateB: '#98971a', - panelHeaderDivider: '@divider', - }, - author: '@razzlom@quietplace.xyz', + id: "256a2e52-440f-4a00-8a76-c93501354dfb", + base: "dark", + desc: "Misskey gruvbox-dark-medium theme. Inspired by https://github.com/morhetz/gruvbox", + name: "Gruvbox Dark Medium", + props: { + bg: "#282828", + fg: "#ebdbb2", + link: "#b16286", + warn: "#d65d0e", + badge: "#458588", + error: "#fb4934", + navBg: "#32302f", + panel: "#32302f", + accent: "#98971a", + header: ":alpha<0.7<@panel", + renote: "@accent", + divider: "#7c6f64", + hashtag: "#458588", + mention: "#98971a", + success: "#98971a", + mentionMe: "#fb4934", + fgHighlighted: "#fbf1c7", + panelHeaderBg: "@panel", + buttonGradateA: "#98971a", + buttonGradateB: "#98971a", + panelHeaderDivider: "@divider", + }, + author: "@razzlom@quietplace.xyz", } diff --git a/fe_calckey/frontend/client/src/themes/d-ice.json5 b/fe_calckey/frontend/client/src/themes/d-ice.json5 index 179b060..90deb51 100644 --- a/fe_calckey/frontend/client/src/themes/d-ice.json5 +++ b/fe_calckey/frontend/client/src/themes/d-ice.json5 @@ -1,13 +1,13 @@ { - id: '66e7e5a9-cd43-42cd-837d-12f47841fa34', + id: "66e7e5a9-cd43-42cd-837d-12f47841fa34", - name: 'Mi Ice Dark', - author: 'syuilo', + name: "Mi Ice Dark", + author: "syuilo", - base: 'dark', + base: "dark", - props: { - accent: '#47BFE8', - bg: '#212526', - }, + props: { + accent: "#47BFE8", + bg: "#212526", + }, } diff --git a/fe_calckey/frontend/client/src/themes/d-nord.json5 b/fe_calckey/frontend/client/src/themes/d-nord.json5 index 7e8b4f4..5009cc0 100644 --- a/fe_calckey/frontend/client/src/themes/d-nord.json5 +++ b/fe_calckey/frontend/client/src/themes/d-nord.json5 @@ -1,94 +1,94 @@ { - id: 'dddbc0c6-af2c-46f8-b8f3-05964adcde0b', - base: 'dark', - desc: 'Nord: an arctic, north-bluish color palette', - name: 'Nord Dark', - props: { - X2: ':darken<2<@panel', - X3: 'rgba(255, 255, 255, 0.05)', - X4: 'rgba(255, 255, 255, 0.1)', - X5: 'rgba(255, 255, 255, 0.05)', - X6: 'rgba(255, 255, 255, 0.15)', - X7: 'rgba(255, 255, 255, 0.05)', - X8: ':lighten<5<@accent', - X9: ':darken<5<@accent', - bg: '#2e3440', - fg: '#eceff4', - X10: ':alpha<0.4<@accent', - X11: 'rgba(0, 0, 0, 0.3)', - X12: 'rgba(255, 255, 255, 0.1)', - X13: 'rgba(255, 255, 255, 0.15)', - X14: ':alpha<0.5<@navBg', - X15: ':alpha<0<@panel', - X16: ':alpha<0.7<@panel', - X17: ':alpha<0.8<@bg', - cwBg: '#4c566a', - cwFg: '#393f4f', - link: '#b48ead', - warn: '#d08770', - badge: '#d08770', - error: '#bf616a', - focus: ':alpha<0.3<@accent', - navBg: '@panel', - navFg: '@fg', - panel: ':lighten<3<@bg', - popup: ':lighten<3<@panel', - accent: '#81a1c1', - header: ':alpha<0.7<@panel', - infoBg: '#4c566a', - infoFg: '#d08770', - renote: '#ebcb8b', - shadow: 'rgba(0, 0, 0, 0.3)', - divider: 'rgba(255, 255, 255, 0.1)', - hashtag: '#a3be8c', - mention: '@accent', - modalBg: 'rgba(0, 0, 0, 0.5)', - success: '#a3be8c', - buttonBg: 'rgba(255, 255, 255, 0.05)', - switchBg: 'rgba(255, 255, 255, 0.15)', - acrylicBg: ':alpha<0.5<@bg', - cwHoverBg: '#707b97', - indicator: '@accent', - mentionMe: '@mention', - messageBg: '@bg', - navActive: '@accent', - accentedBg: ':alpha<0.15<@accent', - codeNumber: '#a3be8c', - codeString: '#b48ead', - fgOnAccent: '#eceff4', - infoWarnBg: '#4c566a', - infoWarnFg: '#bf616a', - navHoverFg: ':lighten<17<@fg', - swutchOnBg: '@accentedBg', - swutchOnFg: '@accent', - codeBoolean: '#ebcb8b', - dateLabelFg: '@fg', - inputBorder: 'rgba(255, 255, 255, 0.1)', - panelBorder: '" solid 1px var(--divider)', - swutchOffBg: 'rgba(255, 255, 255, 0.1)', - swutchOffFg: '@fg', - accentDarken: '#5e81ac', - acrylicPanel: ':alpha<0.5<@panel', - navIndicator: '@indicator', - windowHeader: ':alpha<0.85<@panel', - accentLighten: '#88c0d0', - buttonHoverBg: 'rgba(255, 255, 255, 0.1)', - driveFolderBg: ':alpha<0.3<@accent', - fgHighlighted: ':lighten<3<@fg', - fgTransparent: ':alpha<0.5<@fg', - panelHeaderBg: ':lighten<3<@panel', - panelHeaderFg: '@fg', - buttonGradateA: '@accent', - buttonGradateB: '#8fbcbb', - htmlThemeColor: '@bg', - panelHighlight: ':lighten<3<@panel', - listItemHoverBg: 'rgba(255, 255, 255, 0.03)', - scrollbarHandle: 'rgba(255, 255, 255, 0.2)', - inputBorderHover: 'rgba(255, 255, 255, 0.2)', - wallpaperOverlay: 'rgba(0, 0, 0, 0.5)', - fgTransparentWeak: ':alpha<0.75<@fg', - panelHeaderDivider: 'rgba(0, 0, 0, 0)', - scrollbarHandleHover: 'rgba(255, 255, 255, 0.4)', - }, - author: '@thatonecalculator@stop.voring.me', + id: "dddbc0c6-af2c-46f8-b8f3-05964adcde0b", + base: "dark", + desc: "Nord: an arctic, north-bluish color palette", + name: "Nord Dark", + props: { + X2: ":darken<2<@panel", + X3: "rgba(255, 255, 255, 0.05)", + X4: "rgba(255, 255, 255, 0.1)", + X5: "rgba(255, 255, 255, 0.05)", + X6: "rgba(255, 255, 255, 0.15)", + X7: "rgba(255, 255, 255, 0.05)", + X8: ":lighten<5<@accent", + X9: ":darken<5<@accent", + bg: "#2e3440", + fg: "#eceff4", + X10: ":alpha<0.4<@accent", + X11: "rgba(0, 0, 0, 0.3)", + X12: "rgba(255, 255, 255, 0.1)", + X13: "rgba(255, 255, 255, 0.15)", + X14: ":alpha<0.5<@navBg", + X15: ":alpha<0<@panel", + X16: ":alpha<0.7<@panel", + X17: ":alpha<0.8<@bg", + cwBg: "#4c566a", + cwFg: "#393f4f", + link: "#b48ead", + warn: "#d08770", + badge: "#d08770", + error: "#bf616a", + focus: ":alpha<0.3<@accent", + navBg: "@panel", + navFg: "@fg", + panel: ":lighten<3<@bg", + popup: ":lighten<3<@panel", + accent: "#81a1c1", + header: ":alpha<0.7<@panel", + infoBg: "#4c566a", + infoFg: "#d08770", + renote: "#ebcb8b", + shadow: "rgba(0, 0, 0, 0.3)", + divider: "rgba(255, 255, 255, 0.1)", + hashtag: "#a3be8c", + mention: "@accent", + modalBg: "rgba(0, 0, 0, 0.5)", + success: "#a3be8c", + buttonBg: "rgba(255, 255, 255, 0.05)", + switchBg: "rgba(255, 255, 255, 0.15)", + acrylicBg: ":alpha<0.5<@bg", + cwHoverBg: "#707b97", + indicator: "@accent", + mentionMe: "@mention", + messageBg: "@bg", + navActive: "@accent", + accentedBg: ":alpha<0.15<@accent", + codeNumber: "#a3be8c", + codeString: "#b48ead", + fgOnAccent: "#eceff4", + infoWarnBg: "#4c566a", + infoWarnFg: "#bf616a", + navHoverFg: ":lighten<17<@fg", + swutchOnBg: "@accentedBg", + swutchOnFg: "@accent", + codeBoolean: "#ebcb8b", + dateLabelFg: "@fg", + inputBorder: "rgba(255, 255, 255, 0.1)", + panelBorder: '" solid 1px var(--divider)', + swutchOffBg: "rgba(255, 255, 255, 0.1)", + swutchOffFg: "@fg", + accentDarken: "#5e81ac", + acrylicPanel: ":alpha<0.5<@panel", + navIndicator: "@indicator", + windowHeader: ":alpha<0.85<@panel", + accentLighten: "#88c0d0", + buttonHoverBg: "rgba(255, 255, 255, 0.1)", + driveFolderBg: ":alpha<0.3<@accent", + fgHighlighted: ":lighten<3<@fg", + fgTransparent: ":alpha<0.5<@fg", + panelHeaderBg: ":lighten<3<@panel", + panelHeaderFg: "@fg", + buttonGradateA: "@accent", + buttonGradateB: "#8fbcbb", + htmlThemeColor: "@bg", + panelHighlight: ":lighten<3<@panel", + listItemHoverBg: "rgba(255, 255, 255, 0.03)", + scrollbarHandle: "rgba(255, 255, 255, 0.2)", + inputBorderHover: "rgba(255, 255, 255, 0.2)", + wallpaperOverlay: "rgba(0, 0, 0, 0.5)", + fgTransparentWeak: ":alpha<0.75<@fg", + panelHeaderDivider: "rgba(0, 0, 0, 0)", + scrollbarHandleHover: "rgba(255, 255, 255, 0.4)", + }, + author: "@thatonecalculator@stop.voring.me", } diff --git a/fe_calckey/frontend/client/src/themes/d-persimmon.json5 b/fe_calckey/frontend/client/src/themes/d-persimmon.json5 index e36265f..20c3ec1 100644 --- a/fe_calckey/frontend/client/src/themes/d-persimmon.json5 +++ b/fe_calckey/frontend/client/src/themes/d-persimmon.json5 @@ -1,25 +1,25 @@ { - id: 'c503d768-7c70-4db2-a4e6-08264304bc8d', + id: "c503d768-7c70-4db2-a4e6-08264304bc8d", - name: 'Mi Persimmon Dark', - author: 'syuilo', + name: "Mi Persimmon Dark", + author: "syuilo", - base: 'dark', + base: "dark", - props: { - accent: 'rgb(206, 102, 65)', - bg: 'rgb(31, 33, 31)', - fg: '#cdd8c7', - fgHighlighted: '#fff', - divider: 'rgba(255, 255, 255, 0.14)', - panel: 'rgb(41, 43, 41)', - infoFg: '@fg', - infoBg: '#333c3b', - navBg: '#141714', - renote: '@accent', - mention: '@accent', - mentionMe: '#de6161', - hashtag: '#68bad0', - link: '#a1c758', - }, + props: { + accent: "rgb(206, 102, 65)", + bg: "rgb(31, 33, 31)", + fg: "#cdd8c7", + fgHighlighted: "#fff", + divider: "rgba(255, 255, 255, 0.14)", + panel: "rgb(41, 43, 41)", + infoFg: "@fg", + infoBg: "#333c3b", + navBg: "#141714", + renote: "@accent", + mention: "@accent", + mentionMe: "#de6161", + hashtag: "#68bad0", + link: "#a1c758", + }, } diff --git a/fe_calckey/frontend/client/src/themes/d-rosepine.json5 b/fe_calckey/frontend/client/src/themes/d-rosepine.json5 index c948c29..c769f8c 100644 --- a/fe_calckey/frontend/client/src/themes/d-rosepine.json5 +++ b/fe_calckey/frontend/client/src/themes/d-rosepine.json5 @@ -1,86 +1,86 @@ { - id: '3cdfd635-4d5e-4d06-9ba3-20f123f0999b', - base: 'dark', - desc: 'Soho vibes for Misskey', - name: 'Rosé Pine', - props: { - X2: ':darken<2<@panel', - X3: 'rgba(255, 255, 255, 0.05)', - X4: 'rgba(255, 255, 255, 0.1)', - X5: 'rgba(255, 255, 255, 0.05)', - X6: 'rgba(255, 255, 255, 0.15)', - X7: 'rgba(255, 255, 255, 0.05)', - X8: ':lighten<5<@accent', - X9: ':darken<5<@accent', - bg: '#191724', - fg: '#e0def4', - X10: ':alpha<0.4<@accent', - X11: 'rgba(0, 0, 0, 0.3)', - X12: 'rgba(255, 255, 255, 0.1)', - X13: 'rgba(255, 255, 255, 0.15)', - X14: ':alpha<0.5<@navBg', - X15: ':alpha<0<@panel', - X16: ':alpha<0.7<@panel', - X17: ':alpha<0.8<@bg', - cwBg: '#1f1d2e', - cwFg: '#f6c177', - link: '#9ccfd8', - warn: '#f6c177', - badge: '#ebbcba', - error: '#eb6f92', - focus: ':alpha<0.3<@accent', - navBg: '@panel', - navFg: '@fg', - panel: ':lighten<3<@bg', - popup: ':lighten<3<@panel', - accent: '#c4a7e7', - header: ':alpha<0.7<@panel', - infoBg: '#253142', - infoFg: '#fff', - renote: '#31748f', - shadow: 'rgba(0, 0, 0, 0.3)', - divider: 'rgba(255, 255, 255, 0.1)', - hashtag: '#ebbcba', - mention: '@accent', - modalBg: 'rgba(0, 0, 0, 0.5)', - success: '#ebbcba', - buttonBg: 'rgba(255, 255, 255, 0.05)', - switchBg: 'rgba(255, 255, 255, 0.15)', - acrylicBg: ':alpha<0.5<@bg', - cwHoverBg: '#26233a', - indicator: '@accent', - mentionMe: '@mention', - messageBg: '@bg', - navActive: '@accent', - accentedBg: ':alpha<0.15<@accent', - fgOnAccent: '#26233a', - infoWarnBg: '#26233a', - infoWarnFg: '#f6c177', - navHoverFg: ':lighten<17<@fg', - dateLabelFg: '@fg', - inputBorder: 'rgba(255, 255, 255, 0.1)', - panelBorder: '" solid 1px var(--divider)', - accentDarken: ':darken<10<@accent', - acrylicPanel: ':alpha<0.5<@panel', - navIndicator: '@indicator', - accentLighten: ':lighten<10<@accent', - buttonHoverBg: 'rgba(255, 255, 255, 0.1)', - driveFolderBg: ':alpha<0.3<@accent', - fgHighlighted: ':lighten<3<@fg', - fgTransparent: ':alpha<0.5<@fg', - panelHeaderBg: ':lighten<3<@panel', - panelHeaderFg: '@fg', - buttonGradateA: '@accent', - buttonGradateB: '#ebbcba', - htmlThemeColor: '@bg', - panelHighlight: ':lighten<3<@panel', - listItemHoverBg: 'rgba(255, 255, 255, 0.03)', - scrollbarHandle: 'rgba(255, 255, 255, 0.2)', - inputBorderHover: 'rgba(255, 255, 255, 0.2)', - wallpaperOverlay: 'rgba(0, 0, 0, 0.5)', - fgTransparentWeak: ':alpha<0.75<@fg', - panelHeaderDivider: 'rgba(0, 0, 0, 0)', - scrollbarHandleHover: 'rgba(255, 255, 255, 0.4)', - }, - author: '@thatonecalculator@stop.voring.me', + id: "3cdfd635-4d5e-4d06-9ba3-20f123f0999b", + base: "dark", + desc: "Soho vibes for Misskey", + name: "Rosé Pine", + props: { + X2: ":darken<2<@panel", + X3: "rgba(255, 255, 255, 0.05)", + X4: "rgba(255, 255, 255, 0.1)", + X5: "rgba(255, 255, 255, 0.05)", + X6: "rgba(255, 255, 255, 0.15)", + X7: "rgba(255, 255, 255, 0.05)", + X8: ":lighten<5<@accent", + X9: ":darken<5<@accent", + bg: "#191724", + fg: "#e0def4", + X10: ":alpha<0.4<@accent", + X11: "rgba(0, 0, 0, 0.3)", + X12: "rgba(255, 255, 255, 0.1)", + X13: "rgba(255, 255, 255, 0.15)", + X14: ":alpha<0.5<@navBg", + X15: ":alpha<0<@panel", + X16: ":alpha<0.7<@panel", + X17: ":alpha<0.8<@bg", + cwBg: "#1f1d2e", + cwFg: "#f6c177", + link: "#9ccfd8", + warn: "#f6c177", + badge: "#ebbcba", + error: "#eb6f92", + focus: ":alpha<0.3<@accent", + navBg: "@panel", + navFg: "@fg", + panel: ":lighten<3<@bg", + popup: ":lighten<3<@panel", + accent: "#c4a7e7", + header: ":alpha<0.7<@panel", + infoBg: "#253142", + infoFg: "#fff", + renote: "#31748f", + shadow: "rgba(0, 0, 0, 0.3)", + divider: "rgba(255, 255, 255, 0.1)", + hashtag: "#ebbcba", + mention: "@accent", + modalBg: "rgba(0, 0, 0, 0.5)", + success: "#ebbcba", + buttonBg: "rgba(255, 255, 255, 0.05)", + switchBg: "rgba(255, 255, 255, 0.15)", + acrylicBg: ":alpha<0.5<@bg", + cwHoverBg: "#26233a", + indicator: "@accent", + mentionMe: "@mention", + messageBg: "@bg", + navActive: "@accent", + accentedBg: ":alpha<0.15<@accent", + fgOnAccent: "#26233a", + infoWarnBg: "#26233a", + infoWarnFg: "#f6c177", + navHoverFg: ":lighten<17<@fg", + dateLabelFg: "@fg", + inputBorder: "rgba(255, 255, 255, 0.1)", + panelBorder: '" solid 1px var(--divider)', + accentDarken: ":darken<10<@accent", + acrylicPanel: ":alpha<0.5<@panel", + navIndicator: "@indicator", + accentLighten: ":lighten<10<@accent", + buttonHoverBg: "rgba(255, 255, 255, 0.1)", + driveFolderBg: ":alpha<0.3<@accent", + fgHighlighted: ":lighten<3<@fg", + fgTransparent: ":alpha<0.5<@fg", + panelHeaderBg: ":lighten<3<@panel", + panelHeaderFg: "@fg", + buttonGradateA: "@accent", + buttonGradateB: "#ebbcba", + htmlThemeColor: "@bg", + panelHighlight: ":lighten<3<@panel", + listItemHoverBg: "rgba(255, 255, 255, 0.03)", + scrollbarHandle: "rgba(255, 255, 255, 0.2)", + inputBorderHover: "rgba(255, 255, 255, 0.2)", + wallpaperOverlay: "rgba(0, 0, 0, 0.5)", + fgTransparentWeak: ":alpha<0.75<@fg", + panelHeaderDivider: "rgba(0, 0, 0, 0)", + scrollbarHandleHover: "rgba(255, 255, 255, 0.4)", + }, + author: "@thatonecalculator@stop.voring.me", } diff --git a/fe_calckey/frontend/client/src/themes/d-rosepinemoon.json5 b/fe_calckey/frontend/client/src/themes/d-rosepinemoon.json5 index 97c368a..ffbb4fe 100644 --- a/fe_calckey/frontend/client/src/themes/d-rosepinemoon.json5 +++ b/fe_calckey/frontend/client/src/themes/d-rosepinemoon.json5 @@ -1,86 +1,86 @@ { - id: 'c57b0d7b-80ed-4a84-95d8-bfdefbe91ed7', - base: 'dark', - desc: 'Soho vibes for Misskey, moon edition', - name: 'Rosé Pine Moon', - props: { - X2: ':darken<2<@panel', - X3: 'rgba(255, 255, 255, 0.05)', - X4: 'rgba(255, 255, 255, 0.1)', - X5: 'rgba(255, 255, 255, 0.05)', - X6: 'rgba(255, 255, 255, 0.15)', - X7: 'rgba(255, 255, 255, 0.05)', - X8: ':lighten<5<@accent', - X9: ':darken<5<@accent', - bg: '#232136', - fg: '#e0def4', - X10: ':alpha<0.4<@accent', - X11: 'rgba(0, 0, 0, 0.3)', - X12: 'rgba(255, 255, 255, 0.1)', - X13: 'rgba(255, 255, 255, 0.15)', - X14: ':alpha<0.5<@navBg', - X15: ':alpha<0<@panel', - X16: ':alpha<0.7<@panel', - X17: ':alpha<0.8<@bg', - cwBg: '#393552', - cwFg: '#f6c177', - link: '#3e8fb0', - warn: '#f6c177', - badge: '#ea9a97', - error: '#eb6f92', - focus: ':alpha<0.3<@accent', - navBg: '@panel', - navFg: '@fg', - panel: ':lighten<3<@bg', - popup: ':lighten<3<@panel', - accent: '#c4a7e7', - header: ':alpha<0.7<@panel', - infoBg: '#253142', - infoFg: '#fff', - renote: '#229e82', - shadow: 'rgba(0, 0, 0, 0.3)', - divider: 'rgba(255, 255, 255, 0.1)', - hashtag: '#ea9a97', - mention: '@accent', - modalBg: 'rgba(0, 0, 0, 0.5)', - success: '#ebbcba', - buttonBg: 'rgba(255, 255, 255, 0.05)', - switchBg: 'rgba(255, 255, 255, 0.15)', - acrylicBg: ':alpha<0.5<@bg', - cwHoverBg: '#393552', - indicator: '@accent', - mentionMe: '@mention', - messageBg: '@bg', - navActive: '@accent', - accentedBg: ':alpha<0.15<@accent', - fgOnAccent: '#393552', - infoWarnBg: '#393552', - infoWarnFg: '#f6c177', - navHoverFg: ':lighten<17<@fg', - dateLabelFg: '@fg', - inputBorder: 'rgba(255, 255, 255, 0.1)', - panelBorder: '" solid 1px var(--divider)', - accentDarken: ':darken<10<@accent', - acrylicPanel: ':alpha<0.5<@panel', - navIndicator: '@indicator', - accentLighten: ':lighten<10<@accent', - buttonHoverBg: 'rgba(255, 255, 255, 0.1)', - driveFolderBg: ':alpha<0.3<@accent', - fgHighlighted: ':lighten<3<@fg', - fgTransparent: ':alpha<0.5<@fg', - panelHeaderBg: ':lighten<3<@panel', - panelHeaderFg: '@fg', - buttonGradateA: '@accent', - buttonGradateB: '#ea9a97', - htmlThemeColor: '@bg', - panelHighlight: ':lighten<3<@panel', - listItemHoverBg: 'rgba(255, 255, 255, 0.03)', - scrollbarHandle: 'rgba(255, 255, 255, 0.2)', - inputBorderHover: 'rgba(255, 255, 255, 0.2)', - wallpaperOverlay: 'rgba(0, 0, 0, 0.5)', - fgTransparentWeak: ':alpha<0.75<@fg', - panelHeaderDivider: 'rgba(0, 0, 0, 0)', - scrollbarHandleHover: 'rgba(255, 255, 255, 0.4)', - }, - author: '@thatonecalculator@stop.voring.me', + id: "c57b0d7b-80ed-4a84-95d8-bfdefbe91ed7", + base: "dark", + desc: "Soho vibes for Misskey, moon edition", + name: "Rosé Pine Moon", + props: { + X2: ":darken<2<@panel", + X3: "rgba(255, 255, 255, 0.05)", + X4: "rgba(255, 255, 255, 0.1)", + X5: "rgba(255, 255, 255, 0.05)", + X6: "rgba(255, 255, 255, 0.15)", + X7: "rgba(255, 255, 255, 0.05)", + X8: ":lighten<5<@accent", + X9: ":darken<5<@accent", + bg: "#232136", + fg: "#e0def4", + X10: ":alpha<0.4<@accent", + X11: "rgba(0, 0, 0, 0.3)", + X12: "rgba(255, 255, 255, 0.1)", + X13: "rgba(255, 255, 255, 0.15)", + X14: ":alpha<0.5<@navBg", + X15: ":alpha<0<@panel", + X16: ":alpha<0.7<@panel", + X17: ":alpha<0.8<@bg", + cwBg: "#393552", + cwFg: "#f6c177", + link: "#3e8fb0", + warn: "#f6c177", + badge: "#ea9a97", + error: "#eb6f92", + focus: ":alpha<0.3<@accent", + navBg: "@panel", + navFg: "@fg", + panel: ":lighten<3<@bg", + popup: ":lighten<3<@panel", + accent: "#c4a7e7", + header: ":alpha<0.7<@panel", + infoBg: "#253142", + infoFg: "#fff", + renote: "#229e82", + shadow: "rgba(0, 0, 0, 0.3)", + divider: "rgba(255, 255, 255, 0.1)", + hashtag: "#ea9a97", + mention: "@accent", + modalBg: "rgba(0, 0, 0, 0.5)", + success: "#ebbcba", + buttonBg: "rgba(255, 255, 255, 0.05)", + switchBg: "rgba(255, 255, 255, 0.15)", + acrylicBg: ":alpha<0.5<@bg", + cwHoverBg: "#393552", + indicator: "@accent", + mentionMe: "@mention", + messageBg: "@bg", + navActive: "@accent", + accentedBg: ":alpha<0.15<@accent", + fgOnAccent: "#393552", + infoWarnBg: "#393552", + infoWarnFg: "#f6c177", + navHoverFg: ":lighten<17<@fg", + dateLabelFg: "@fg", + inputBorder: "rgba(255, 255, 255, 0.1)", + panelBorder: '" solid 1px var(--divider)', + accentDarken: ":darken<10<@accent", + acrylicPanel: ":alpha<0.5<@panel", + navIndicator: "@indicator", + accentLighten: ":lighten<10<@accent", + buttonHoverBg: "rgba(255, 255, 255, 0.1)", + driveFolderBg: ":alpha<0.3<@accent", + fgHighlighted: ":lighten<3<@fg", + fgTransparent: ":alpha<0.5<@fg", + panelHeaderBg: ":lighten<3<@panel", + panelHeaderFg: "@fg", + buttonGradateA: "@accent", + buttonGradateB: "#ea9a97", + htmlThemeColor: "@bg", + panelHighlight: ":lighten<3<@panel", + listItemHoverBg: "rgba(255, 255, 255, 0.03)", + scrollbarHandle: "rgba(255, 255, 255, 0.2)", + inputBorderHover: "rgba(255, 255, 255, 0.2)", + wallpaperOverlay: "rgba(0, 0, 0, 0.5)", + fgTransparentWeak: ":alpha<0.75<@fg", + panelHeaderDivider: "rgba(0, 0, 0, 0)", + scrollbarHandleHover: "rgba(255, 255, 255, 0.4)", + }, + author: "@thatonecalculator@stop.voring.me", } diff --git a/fe_calckey/frontend/client/src/themes/d-u0.json5 b/fe_calckey/frontend/client/src/themes/d-u0.json5 index 67c9235..9fdaece 100644 --- a/fe_calckey/frontend/client/src/themes/d-u0.json5 +++ b/fe_calckey/frontend/client/src/themes/d-u0.json5 @@ -1,87 +1,87 @@ { - id: '7a5bc13b-df8f-4d44-8e94-4452f0c634bb', - base: 'dark', - name: 'Mi U0 Dark', - props: { - X2: ':darken<2<@panel', - X3: 'rgba(255, 255, 255, 0.05)', - X4: 'rgba(255, 255, 255, 0.1)', - X5: 'rgba(255, 255, 255, 0.05)', - X6: 'rgba(255, 255, 255, 0.15)', - X7: 'rgba(255, 255, 255, 0.05)', - X8: ':lighten<5<@accent', - X9: ':darken<5<@accent', - bg: '#172426', - fg: '#dadada', - X10: ':alpha<0.4<@accent', - X11: 'rgba(0, 0, 0, 0.3)', - X12: 'rgba(255, 255, 255, 0.1)', - X13: 'rgba(255, 255, 255, 0.15)', - X14: ':alpha<0.5<@navBg', - X15: ':alpha<0<@panel', - X16: ':alpha<0.7<@panel', - X17: ':alpha<0.8<@bg', - cwBg: '#687390', - cwFg: '#393f4f', - link: '@accent', - warn: '#ecb637', - badge: '#31b1ce', - error: '#ec4137', - focus: ':alpha<0.3<@accent', - navBg: '@panel', - navFg: '@fg', - panel: ':lighten<3<@bg', - popup: ':lighten<3<@panel', - accent: '#00a497', - header: ':alpha<0.7<@panel', - infoBg: '#253142', - infoFg: '#fff', - renote: '@accent', - shadow: 'rgba(0, 0, 0, 0.3)', - divider: 'rgba(255, 255, 255, 0.1)', - hashtag: '#e6b422', - mention: '@accent', - modalBg: 'rgba(0, 0, 0, 0.5)', - success: '#86b300', - buttonBg: 'rgba(255, 255, 255, 0.05)', - switchBg: 'rgba(255, 255, 255, 0.15)', - acrylicBg: ':alpha<0.5<@bg', - cwHoverBg: '#707b97', - indicator: '@accent', - mentionMe: '@mention', - messageBg: '@bg', - navActive: '@accent', - accentedBg: ':alpha<0.15<@accent', - codeNumber: '#cfff9e', - codeString: '#ffb675', - fgOnAccent: '#fff', - infoWarnBg: '#42321c', - infoWarnFg: '#ffbd3e', - navHoverFg: ':lighten<17<@fg', - codeBoolean: '#c59eff', - dateLabelFg: '@fg', - inputBorder: 'rgba(255, 255, 255, 0.1)', - panelBorder: '" solid 1px var(--divider)', - accentDarken: ':darken<10<@accent', - acrylicPanel: ':alpha<0.5<@panel', - navIndicator: '@indicator', - accentLighten: ':lighten<10<@accent', - buttonHoverBg: 'rgba(255, 255, 255, 0.1)', - driveFolderBg: ':alpha<0.3<@accent', - fgHighlighted: ':lighten<3<@fg', - fgTransparent: ':alpha<0.5<@fg', - panelHeaderBg: ':lighten<3<@panel', - panelHeaderFg: '@fg', - buttonGradateA: '@accent', - buttonGradateB: ':hue<20<@accent', - htmlThemeColor: '@bg', - panelHighlight: ':lighten<3<@panel', - listItemHoverBg: 'rgba(255, 255, 255, 0.03)', - scrollbarHandle: 'rgba(255, 255, 255, 0.2)', - inputBorderHover: 'rgba(255, 255, 255, 0.2)', - wallpaperOverlay: 'rgba(0, 0, 0, 0.5)', - fgTransparentWeak: ':alpha<0.75<@fg', - panelHeaderDivider: 'rgba(0, 0, 0, 0)', - scrollbarHandleHover: 'rgba(255, 255, 255, 0.4)', - }, + id: "7a5bc13b-df8f-4d44-8e94-4452f0c634bb", + base: "dark", + name: "Mi U0 Dark", + props: { + X2: ":darken<2<@panel", + X3: "rgba(255, 255, 255, 0.05)", + X4: "rgba(255, 255, 255, 0.1)", + X5: "rgba(255, 255, 255, 0.05)", + X6: "rgba(255, 255, 255, 0.15)", + X7: "rgba(255, 255, 255, 0.05)", + X8: ":lighten<5<@accent", + X9: ":darken<5<@accent", + bg: "#172426", + fg: "#dadada", + X10: ":alpha<0.4<@accent", + X11: "rgba(0, 0, 0, 0.3)", + X12: "rgba(255, 255, 255, 0.1)", + X13: "rgba(255, 255, 255, 0.15)", + X14: ":alpha<0.5<@navBg", + X15: ":alpha<0<@panel", + X16: ":alpha<0.7<@panel", + X17: ":alpha<0.8<@bg", + cwBg: "#687390", + cwFg: "#393f4f", + link: "@accent", + warn: "#ecb637", + badge: "#31b1ce", + error: "#ec4137", + focus: ":alpha<0.3<@accent", + navBg: "@panel", + navFg: "@fg", + panel: ":lighten<3<@bg", + popup: ":lighten<3<@panel", + accent: "#00a497", + header: ":alpha<0.7<@panel", + infoBg: "#253142", + infoFg: "#fff", + renote: "@accent", + shadow: "rgba(0, 0, 0, 0.3)", + divider: "rgba(255, 255, 255, 0.1)", + hashtag: "#e6b422", + mention: "@accent", + modalBg: "rgba(0, 0, 0, 0.5)", + success: "#86b300", + buttonBg: "rgba(255, 255, 255, 0.05)", + switchBg: "rgba(255, 255, 255, 0.15)", + acrylicBg: ":alpha<0.5<@bg", + cwHoverBg: "#707b97", + indicator: "@accent", + mentionMe: "@mention", + messageBg: "@bg", + navActive: "@accent", + accentedBg: ":alpha<0.15<@accent", + codeNumber: "#cfff9e", + codeString: "#ffb675", + fgOnAccent: "#fff", + infoWarnBg: "#42321c", + infoWarnFg: "#ffbd3e", + navHoverFg: ":lighten<17<@fg", + codeBoolean: "#c59eff", + dateLabelFg: "@fg", + inputBorder: "rgba(255, 255, 255, 0.1)", + panelBorder: '" solid 1px var(--divider)', + accentDarken: ":darken<10<@accent", + acrylicPanel: ":alpha<0.5<@panel", + navIndicator: "@indicator", + accentLighten: ":lighten<10<@accent", + buttonHoverBg: "rgba(255, 255, 255, 0.1)", + driveFolderBg: ":alpha<0.3<@accent", + fgHighlighted: ":lighten<3<@fg", + fgTransparent: ":alpha<0.5<@fg", + panelHeaderBg: ":lighten<3<@panel", + panelHeaderFg: "@fg", + buttonGradateA: "@accent", + buttonGradateB: ":hue<20<@accent", + htmlThemeColor: "@bg", + panelHighlight: ":lighten<3<@panel", + listItemHoverBg: "rgba(255, 255, 255, 0.03)", + scrollbarHandle: "rgba(255, 255, 255, 0.2)", + inputBorderHover: "rgba(255, 255, 255, 0.2)", + wallpaperOverlay: "rgba(0, 0, 0, 0.5)", + fgTransparentWeak: ":alpha<0.75<@fg", + panelHeaderDivider: "rgba(0, 0, 0, 0)", + scrollbarHandleHover: "rgba(255, 255, 255, 0.4)", + }, } diff --git a/fe_calckey/frontend/client/src/themes/l-apricot.json5 b/fe_calckey/frontend/client/src/themes/l-apricot.json5 index 1ed5525..8c8131a 100644 --- a/fe_calckey/frontend/client/src/themes/l-apricot.json5 +++ b/fe_calckey/frontend/client/src/themes/l-apricot.json5 @@ -1,22 +1,22 @@ { - id: '0ff48d43-aab3-46e7-ab12-8492110d2e2b', + id: "0ff48d43-aab3-46e7-ab12-8492110d2e2b", - name: 'Mi Apricot Light', - author: 'syuilo', + name: "Mi Apricot Light", + author: "syuilo", - base: 'light', + base: "light", - props: { - accent: 'rgb(234, 154, 82)', - bg: '#e6e5e2', - fg: 'rgb(149, 143, 139)', - panel: '#EEECE8', - renote: '@accent', - link: '@accent', - mention: '@accent', - hashtag: '@accent', - inputBorder: 'rgba(0, 0, 0, 0.1)', - inputBorderHover: 'rgba(0, 0, 0, 0.2)', - infoBg: 'rgb(226, 235, 241)', - }, + props: { + accent: "rgb(234, 154, 82)", + bg: "#e6e5e2", + fg: "rgb(149, 143, 139)", + panel: "#EEECE8", + renote: "@accent", + link: "@accent", + mention: "@accent", + hashtag: "@accent", + inputBorder: "rgba(0, 0, 0, 0.1)", + inputBorderHover: "rgba(0, 0, 0, 0.2)", + infoBg: "rgb(226, 235, 241)", + }, } diff --git a/fe_calckey/frontend/client/src/themes/l-catppuccin-latte.json5 b/fe_calckey/frontend/client/src/themes/l-catppuccin-latte.json5 index 085e66d..2a3039d 100644 --- a/fe_calckey/frontend/client/src/themes/l-catppuccin-latte.json5 +++ b/fe_calckey/frontend/client/src/themes/l-catppuccin-latte.json5 @@ -1,94 +1,94 @@ { - id: "169661d2-5a17-4dfc-b71b-9938cbbbed3e", - base: "light", - name: "Catppuccin Latte", - props: { - X2: ":darken<2<@panel", - X3: "rgba(255, 255, 255, 0.05)", - X4: "rgba(255, 255, 255, 0.1)", - X5: "rgba(255, 255, 255, 0.05)", - X6: "rgba(255, 255, 255, 0.15)", - X7: "rgba(255, 255, 255, 0.05)", - X8: ":lighten<5<@accent", - X9: ":darken<5<@accent", - bg: "#dce0e8", - fg: "#4c4f69", - X10: ":alpha<0.4<@accent", - X11: "rgba(0, 0, 0, 0.3)", - X12: "rgba(255, 255, 255, 0.1)", - X13: "rgba(255, 255, 255, 0.15)", - X14: ":alpha<0.5<@navBg", - X15: ":alpha<0<@panel", - X16: ":alpha<0.7<@panel", - X17: ":alpha<0.8<@bg", - cwBg: "#bcc0cc", - cwFg: "#5c5f77", - link: "#1e66f5", - warn: "#fe640b", - badge: "#1e66f5", - error: "#d20f39", - focus: ":alpha<0.3<@accent", - navBg: "@panel", - navFg: "@fg", - panel: ":lighten<3<@bg", - popup: ":lighten<3<@panel", - accent: "#8839ef", - header: ":alpha<0.7<@panel", - infoBg: "#ccd0da", - infoFg: "#6c6f85", - renote: "#1e66f5", - shadow: "rgba(0, 0, 0, 0.3)", - divider: "rgba(255, 255, 255, 0.1)", - hashtag: "#209fb5", - mention: "@accent", - modalBg: "rgba(0, 0, 0, 0.5)", - success: "#40a02b", - buttonBg: "rgba(255, 255, 255, 0.05)", - switchBg: "rgba(255, 255, 255, 0.15)", - acrylicBg: ":alpha<0.5<@bg", - cwHoverBg: "#acb0be", - indicator: "@accent", - mentionMe: "@mention", - messageBg: "@bg", - navActive: "@accent", - accentedBg: ":alpha<0.15<@accent", - codeNumber: "#40a02b", - codeString: "#fe640b", - fgOnAccent: "#eff1f5", - infoWarnBg: "#ccd0da", - infoWarnFg: "#5c5f77", - navHoverFg: ":lighten<17<@fg", - swutchOnBg: "@accentedBg", - swutchOnFg: "@accent", - codeBoolean: "@accent", - dateLabelFg: "@fg", - deckDivider: "#9ca0b0", - inputBorder: "rgba(255, 255, 255, 0.1)", - panelBorder: "solid 1px var(--divider)", - swutchOffBg: "rgba(255, 255, 255, 0.1)", - swutchOffFg: "@fg", - accentDarken: ":darken<10<@accent", - acrylicPanel: ":alpha<0.5<@panel", - navIndicator: "@indicator", - windowHeader: ":alpha<0.85<@panel", - accentLighten: ":lighten<10<@accent", - buttonHoverBg: "rgba(255, 255, 255, 0.1)", - driveFolderBg: ":alpha<0.3<@accent", - fgHighlighted: ":lighten<3<@fg", - fgTransparent: ":alpha<0.5<@fg", - panelHeaderBg: ":lighten<3<@panel", - panelHeaderFg: "@fg", - buttonGradateA: "@accent", - buttonGradateB: ":hue<20<@accent", - htmlThemeColor: "@bg", - panelHighlight: ":lighten<3<@panel", - listItemHoverBg: "rgba(255, 255, 255, 0.03)", - scrollbarHandle: "rgba(255, 255, 255, 0.2)", - inputBorderHover: "rgba(255, 255, 255, 0.2)", - wallpaperOverlay: "rgba(0, 0, 0, 0.5)", - fgTransparentWeak: ":alpha<0.75<@fg", - panelHeaderDivider: "rgba(0, 0, 0, 0)", - scrollbarHandleHover: "rgba(255, 255, 255, 0.4)", - }, - author: "somebody ¯_(ツ)_/¯", + id: "169661d2-5a17-4dfc-b71b-9938cbbbed3e", + base: "light", + name: "Catppuccin Latte", + props: { + X2: ":darken<2<@panel", + X3: "rgba(255, 255, 255, 0.05)", + X4: "rgba(255, 255, 255, 0.1)", + X5: "rgba(255, 255, 255, 0.05)", + X6: "rgba(255, 255, 255, 0.15)", + X7: "rgba(255, 255, 255, 0.05)", + X8: ":lighten<5<@accent", + X9: ":darken<5<@accent", + bg: "#dce0e8", + fg: "#4c4f69", + X10: ":alpha<0.4<@accent", + X11: "rgba(0, 0, 0, 0.3)", + X12: "rgba(255, 255, 255, 0.1)", + X13: "rgba(255, 255, 255, 0.15)", + X14: ":alpha<0.5<@navBg", + X15: ":alpha<0<@panel", + X16: ":alpha<0.7<@panel", + X17: ":alpha<0.8<@bg", + cwBg: "#bcc0cc", + cwFg: "#5c5f77", + link: "#1e66f5", + warn: "#fe640b", + badge: "#1e66f5", + error: "#d20f39", + focus: ":alpha<0.3<@accent", + navBg: "@panel", + navFg: "@fg", + panel: ":lighten<3<@bg", + popup: ":lighten<3<@panel", + accent: "#8839ef", + header: ":alpha<0.7<@panel", + infoBg: "#ccd0da", + infoFg: "#6c6f85", + renote: "#1e66f5", + shadow: "rgba(0, 0, 0, 0.3)", + divider: "rgba(255, 255, 255, 0.1)", + hashtag: "#209fb5", + mention: "@accent", + modalBg: "rgba(0, 0, 0, 0.5)", + success: "#40a02b", + buttonBg: "rgba(255, 255, 255, 0.05)", + switchBg: "rgba(255, 255, 255, 0.15)", + acrylicBg: ":alpha<0.5<@bg", + cwHoverBg: "#acb0be", + indicator: "@accent", + mentionMe: "@mention", + messageBg: "@bg", + navActive: "@accent", + accentedBg: ":alpha<0.15<@accent", + codeNumber: "#40a02b", + codeString: "#fe640b", + fgOnAccent: "#eff1f5", + infoWarnBg: "#ccd0da", + infoWarnFg: "#5c5f77", + navHoverFg: ":lighten<17<@fg", + swutchOnBg: "@accentedBg", + swutchOnFg: "@accent", + codeBoolean: "@accent", + dateLabelFg: "@fg", + deckDivider: "#9ca0b0", + inputBorder: "rgba(255, 255, 255, 0.1)", + panelBorder: "solid 1px var(--divider)", + swutchOffBg: "rgba(255, 255, 255, 0.1)", + swutchOffFg: "@fg", + accentDarken: ":darken<10<@accent", + acrylicPanel: ":alpha<0.5<@panel", + navIndicator: "@indicator", + windowHeader: ":alpha<0.85<@panel", + accentLighten: ":lighten<10<@accent", + buttonHoverBg: "rgba(255, 255, 255, 0.1)", + driveFolderBg: ":alpha<0.3<@accent", + fgHighlighted: ":lighten<3<@fg", + fgTransparent: ":alpha<0.5<@fg", + panelHeaderBg: ":lighten<3<@panel", + panelHeaderFg: "@fg", + buttonGradateA: "@accent", + buttonGradateB: ":hue<20<@accent", + htmlThemeColor: "@bg", + panelHighlight: ":lighten<3<@panel", + listItemHoverBg: "rgba(255, 255, 255, 0.03)", + scrollbarHandle: "rgba(255, 255, 255, 0.2)", + inputBorderHover: "rgba(255, 255, 255, 0.2)", + wallpaperOverlay: "rgba(0, 0, 0, 0.5)", + fgTransparentWeak: ":alpha<0.75<@fg", + panelHeaderDivider: "rgba(0, 0, 0, 0)", + scrollbarHandleHover: "rgba(255, 255, 255, 0.4)", + }, + author: "somebody ¯_(ツ)_/¯", } diff --git a/fe_calckey/frontend/client/src/themes/l-cherry.json5 b/fe_calckey/frontend/client/src/themes/l-cherry.json5 index 5ad2402..db7fe2e 100644 --- a/fe_calckey/frontend/client/src/themes/l-cherry.json5 +++ b/fe_calckey/frontend/client/src/themes/l-cherry.json5 @@ -1,21 +1,21 @@ { - id: 'ac168876-f737-4074-a3fc-a370c732ef48', + id: "ac168876-f737-4074-a3fc-a370c732ef48", - name: 'Mi Cherry Light', - author: 'syuilo', + name: "Mi Cherry Light", + author: "syuilo", - base: 'light', + base: "light", - props: { - accent: 'rgb(219, 96, 114)', - bg: 'rgb(254, 248, 249)', - fg: 'rgb(152, 13, 26)', - panel: 'rgb(255, 255, 255)', - renote: '@accent', - link: 'rgb(156, 187, 5)', - mention: '@accent', - hashtag: '@accent', - divider: 'rgba(134, 51, 51, 0.1)', - inputBorderHover: 'rgb(238, 221, 222)', - }, + props: { + accent: "rgb(219, 96, 114)", + bg: "rgb(254, 248, 249)", + fg: "rgb(152, 13, 26)", + panel: "rgb(255, 255, 255)", + renote: "@accent", + link: "rgb(156, 187, 5)", + mention: "@accent", + hashtag: "@accent", + divider: "rgba(134, 51, 51, 0.1)", + inputBorderHover: "rgb(238, 221, 222)", + }, } diff --git a/fe_calckey/frontend/client/src/themes/l-coffee.json5 b/fe_calckey/frontend/client/src/themes/l-coffee.json5 index fbcd4fa..1187673 100644 --- a/fe_calckey/frontend/client/src/themes/l-coffee.json5 +++ b/fe_calckey/frontend/client/src/themes/l-coffee.json5 @@ -1,21 +1,21 @@ { - id: '6ed80faa-74f0-42c2-98e4-a64d9e138eab', + id: "6ed80faa-74f0-42c2-98e4-a64d9e138eab", - name: 'Mi Coffee Light', - author: 'syuilo', + name: "Mi Coffee Light", + author: "syuilo", - base: 'light', + base: "light", - props: { - accent: '#9f8989', - bg: '#f5f3f3', - fg: '#7f6666', - panel: '#fff', - divider: 'rgba(87, 68, 68, 0.1)', - renote: 'rgb(160, 172, 125)', - link: 'rgb(137, 151, 159)', - mention: '@accent', - mentionMe: 'rgb(170, 149, 98)', - hashtag: '@accent', - }, + props: { + accent: "#9f8989", + bg: "#f5f3f3", + fg: "#7f6666", + panel: "#fff", + divider: "rgba(87, 68, 68, 0.1)", + renote: "rgb(160, 172, 125)", + link: "rgb(137, 151, 159)", + mention: "@accent", + mentionMe: "rgb(170, 149, 98)", + hashtag: "@accent", + }, } diff --git a/fe_calckey/frontend/client/src/themes/l-gruvbox.json5 b/fe_calckey/frontend/client/src/themes/l-gruvbox.json5 index 3e93aae..c2fa3cd 100644 --- a/fe_calckey/frontend/client/src/themes/l-gruvbox.json5 +++ b/fe_calckey/frontend/client/src/themes/l-gruvbox.json5 @@ -1,30 +1,30 @@ { - id: '9be7b20e-58b4-4bd2-8b1d-49d41a676685', - base: 'light', - desc: 'Misskey gruvbox-light-medium theme. Inspired by https://github.com/morhetz/gruvbox', - name: 'Gruvbox Light Medium', - props: { - bg: '#fbf1c7', - fg: '#3c3836', - link: '#b16286', - warn: '#d65d0e', - badge: '#458588', - error: '#fb4934', - navBg: '#f9f5c7', - panel: '#f9f5c7', - accent: '#98971a', - header: ':alpha<0.7<@panel', - renote: '@accent', - divider: '#7c6f64', - hashtag: '#458588', - mention: '#98971a', - success: '#98971a', - mentionMe: '#9d0006', - fgHighlighted: '#fbf1c7', - panelHeaderBg: '@panel', - buttonGradateA: '#98971a', - buttonGradateB: '#98971a', - panelHeaderDivider: '@divider', - }, - author: '@razzlom@quietplace.xyz', + id: "9be7b20e-58b4-4bd2-8b1d-49d41a676685", + base: "light", + desc: "Misskey gruvbox-light-medium theme. Inspired by https://github.com/morhetz/gruvbox", + name: "Gruvbox Light Medium", + props: { + bg: "#fbf1c7", + fg: "#3c3836", + link: "#b16286", + warn: "#d65d0e", + badge: "#458588", + error: "#fb4934", + navBg: "#f9f5c7", + panel: "#f9f5c7", + accent: "#98971a", + header: ":alpha<0.7<@panel", + renote: "@accent", + divider: "#7c6f64", + hashtag: "#458588", + mention: "#98971a", + success: "#98971a", + mentionMe: "#9d0006", + fgHighlighted: "#fbf1c7", + panelHeaderBg: "@panel", + buttonGradateA: "#98971a", + buttonGradateB: "#98971a", + panelHeaderDivider: "@divider", + }, + author: "@razzlom@quietplace.xyz", } diff --git a/fe_calckey/frontend/client/src/themes/l-light.json5 b/fe_calckey/frontend/client/src/themes/l-light.json5 index 248355c..1a8f089 100644 --- a/fe_calckey/frontend/client/src/themes/l-light.json5 +++ b/fe_calckey/frontend/client/src/themes/l-light.json5 @@ -1,20 +1,20 @@ { - id: '4eea646f-7afa-4645-83e9-83af0333cd37', + id: "4eea646f-7afa-4645-83e9-83af0333cd37", - name: 'Mi Light', - author: 'syuilo', - desc: 'Default light theme', + name: "Mi Light", + author: "syuilo", + desc: "Default light theme", - base: 'light', + base: "light", - props: { - bg: '#f9f9f9', - fg: '#676767', - divider: '#e8e8e8', - header: ':alpha<0.7<@panel', - navBg: '#fff', - panel: '#fff', - panelHeaderDivider: '@divider', - mentionMe: 'rgb(0, 179, 70)', - }, + props: { + bg: "#f9f9f9", + fg: "#676767", + divider: "#e8e8e8", + header: ":alpha<0.7<@panel", + navBg: "#fff", + panel: "#fff", + panelHeaderDivider: "@divider", + mentionMe: "rgb(0, 179, 70)", + }, } diff --git a/fe_calckey/frontend/client/src/themes/l-nord.json5 b/fe_calckey/frontend/client/src/themes/l-nord.json5 index e359f31..07abea3 100644 --- a/fe_calckey/frontend/client/src/themes/l-nord.json5 +++ b/fe_calckey/frontend/client/src/themes/l-nord.json5 @@ -1,94 +1,94 @@ { - id: 'a4b1932e-740c-4ca4-b5d7-06e3322dced4', - base: 'light', - desc: 'Nord: an arctic, north-bluish color palette', - name: 'Nord Light', - props: { - X2: ':darken<2<@panel', - X3: 'rgba(255, 255, 255, 0.05)', - X4: 'rgba(255, 255, 255, 0.1)', - X5: 'rgba(255, 255, 255, 0.05)', - X6: 'rgba(255, 255, 255, 0.15)', - X7: 'rgba(255, 255, 255, 0.05)', - X8: ':lighten<5<@accent', - X9: ':darken<5<@accent', - bg: '#d8dee9', - fg: '#3b4252', - X10: ':alpha<0.4<@accent', - X11: 'rgba(0, 0, 0, 0.3)', - X12: 'rgba(255, 255, 255, 0.1)', - X13: 'rgba(255, 255, 255, 0.15)', - X14: ':alpha<0.5<@navBg', - X15: ':alpha<0<@panel', - X16: ':alpha<0.7<@panel', - X17: ':alpha<0.8<@bg', - cwBg: '#687390', - cwFg: '#393f4f', - link: '#44a4c1', - warn: '#ecb637', - badge: '#31b1ce', - error: '#ec4137', - focus: ':alpha<0.3<@accent', - navBg: '@panel', - navFg: '@fg', - panel: ':lighten<3<@bg', - popup: ':lighten<3<@panel', - accent: '#81a1c1', - header: ':alpha<0.7<@panel', - infoBg: '#253142', - infoFg: '#fff', - renote: '#229e82', - shadow: 'rgba(0, 0, 0, 0.3)', - divider: 'rgba(255, 255, 255, 0.1)', - hashtag: '#ff9156', - mention: '@accent', - modalBg: 'rgba(0, 0, 0, 0.5)', - success: '#86b300', - buttonBg: 'rgba(255, 255, 255, 0.05)', - switchBg: 'rgba(255, 255, 255, 0.15)', - acrylicBg: ':alpha<0.5<@bg', - cwHoverBg: '#707b97', - indicator: '@accent', - mentionMe: '@mention', - messageBg: '@bg', - navActive: '@accent', - accentedBg: ':alpha<0.15<@accent', - codeNumber: '#cfff9e', - codeString: '#ffb675', - fgOnAccent: '#fff', - infoWarnBg: '#42321c', - infoWarnFg: '#ffbd3e', - navHoverFg: ':lighten<17<@fg', - swutchOnBg: '@accentedBg', - swutchOnFg: '@accent', - codeBoolean: '#c59eff', - dateLabelFg: '@fg', - inputBorder: 'rgba(255, 255, 255, 0.1)', - panelBorder: '" solid 1px var(--divider)', - swutchOffBg: 'rgba(255, 255, 255, 0.1)', - swutchOffFg: '@fg', - accentDarken: ':darken<10<@accent', - acrylicPanel: ':alpha<0.5<@panel', - navIndicator: '@indicator', - windowHeader: ':alpha<0.85<@panel', - accentLighten: ':lighten<10<@accent', - buttonHoverBg: 'rgba(255, 255, 255, 0.1)', - driveFolderBg: ':alpha<0.3<@accent', - fgHighlighted: ':lighten<3<@fg', - fgTransparent: ':alpha<0.5<@fg', - panelHeaderBg: ':lighten<3<@panel', - panelHeaderFg: '@fg', - buttonGradateA: '@accent', - buttonGradateB: ':hue<20<@accent', - htmlThemeColor: '@bg', - panelHighlight: ':lighten<3<@panel', - listItemHoverBg: 'rgba(255, 255, 255, 0.03)', - scrollbarHandle: 'rgba(255, 255, 255, 0.2)', - inputBorderHover: 'rgba(255, 255, 255, 0.2)', - wallpaperOverlay: 'rgba(0, 0, 0, 0.5)', - fgTransparentWeak: ':alpha<0.75<@fg', - panelHeaderDivider: 'rgba(0, 0, 0, 0)', - scrollbarHandleHover: 'rgba(255, 255, 255, 0.4)', - }, - author: '@thatonecalculator@stop.voring.me', + id: "a4b1932e-740c-4ca4-b5d7-06e3322dced4", + base: "light", + desc: "Nord: an arctic, north-bluish color palette", + name: "Nord Light", + props: { + X2: ":darken<2<@panel", + X3: "rgba(255, 255, 255, 0.05)", + X4: "rgba(255, 255, 255, 0.1)", + X5: "rgba(255, 255, 255, 0.05)", + X6: "rgba(255, 255, 255, 0.15)", + X7: "rgba(255, 255, 255, 0.05)", + X8: ":lighten<5<@accent", + X9: ":darken<5<@accent", + bg: "#d8dee9", + fg: "#3b4252", + X10: ":alpha<0.4<@accent", + X11: "rgba(0, 0, 0, 0.3)", + X12: "rgba(255, 255, 255, 0.1)", + X13: "rgba(255, 255, 255, 0.15)", + X14: ":alpha<0.5<@navBg", + X15: ":alpha<0<@panel", + X16: ":alpha<0.7<@panel", + X17: ":alpha<0.8<@bg", + cwBg: "#687390", + cwFg: "#393f4f", + link: "#44a4c1", + warn: "#ecb637", + badge: "#31b1ce", + error: "#ec4137", + focus: ":alpha<0.3<@accent", + navBg: "@panel", + navFg: "@fg", + panel: ":lighten<3<@bg", + popup: ":lighten<3<@panel", + accent: "#81a1c1", + header: ":alpha<0.7<@panel", + infoBg: "#253142", + infoFg: "#fff", + renote: "#229e82", + shadow: "rgba(0, 0, 0, 0.3)", + divider: "rgba(255, 255, 255, 0.1)", + hashtag: "#ff9156", + mention: "@accent", + modalBg: "rgba(0, 0, 0, 0.5)", + success: "#86b300", + buttonBg: "rgba(255, 255, 255, 0.05)", + switchBg: "rgba(255, 255, 255, 0.15)", + acrylicBg: ":alpha<0.5<@bg", + cwHoverBg: "#707b97", + indicator: "@accent", + mentionMe: "@mention", + messageBg: "@bg", + navActive: "@accent", + accentedBg: ":alpha<0.15<@accent", + codeNumber: "#cfff9e", + codeString: "#ffb675", + fgOnAccent: "#fff", + infoWarnBg: "#42321c", + infoWarnFg: "#ffbd3e", + navHoverFg: ":lighten<17<@fg", + swutchOnBg: "@accentedBg", + swutchOnFg: "@accent", + codeBoolean: "#c59eff", + dateLabelFg: "@fg", + inputBorder: "rgba(255, 255, 255, 0.1)", + panelBorder: '" solid 1px var(--divider)', + swutchOffBg: "rgba(255, 255, 255, 0.1)", + swutchOffFg: "@fg", + accentDarken: ":darken<10<@accent", + acrylicPanel: ":alpha<0.5<@panel", + navIndicator: "@indicator", + windowHeader: ":alpha<0.85<@panel", + accentLighten: ":lighten<10<@accent", + buttonHoverBg: "rgba(255, 255, 255, 0.1)", + driveFolderBg: ":alpha<0.3<@accent", + fgHighlighted: ":lighten<3<@fg", + fgTransparent: ":alpha<0.5<@fg", + panelHeaderBg: ":lighten<3<@panel", + panelHeaderFg: "@fg", + buttonGradateA: "@accent", + buttonGradateB: ":hue<20<@accent", + htmlThemeColor: "@bg", + panelHighlight: ":lighten<3<@panel", + listItemHoverBg: "rgba(255, 255, 255, 0.03)", + scrollbarHandle: "rgba(255, 255, 255, 0.2)", + inputBorderHover: "rgba(255, 255, 255, 0.2)", + wallpaperOverlay: "rgba(0, 0, 0, 0.5)", + fgTransparentWeak: ":alpha<0.75<@fg", + panelHeaderDivider: "rgba(0, 0, 0, 0)", + scrollbarHandleHover: "rgba(255, 255, 255, 0.4)", + }, + author: "@thatonecalculator@stop.voring.me", } diff --git a/fe_calckey/frontend/client/src/themes/l-rainy.json5 b/fe_calckey/frontend/client/src/themes/l-rainy.json5 index 283dd74..f87d889 100644 --- a/fe_calckey/frontend/client/src/themes/l-rainy.json5 +++ b/fe_calckey/frontend/client/src/themes/l-rainy.json5 @@ -1,21 +1,21 @@ { - id: 'a58a0abb-ff8c-476a-8dec-0ad7837e7e96', + id: "a58a0abb-ff8c-476a-8dec-0ad7837e7e96", - name: 'Mi Rainy Light', - author: 'syuilo', + name: "Mi Rainy Light", + author: "syuilo", - base: 'light', + base: "light", - props: { - accent: '#5db0da', - bg: 'rgb(246 248 249)', - fg: '#636b71', - panel: '#fff', - divider: 'rgb(230 233 234)', - panelHeaderDivider: '@divider', - renote: '@accent', - link: '@accent', - mention: '@accent', - hashtag: '@accent', - }, + props: { + accent: "#5db0da", + bg: "rgb(246 248 249)", + fg: "#636b71", + panel: "#fff", + divider: "rgb(230 233 234)", + panelHeaderDivider: "@divider", + renote: "@accent", + link: "@accent", + mention: "@accent", + hashtag: "@accent", + }, } diff --git a/fe_calckey/frontend/client/src/themes/l-rosepinedawn.json5 b/fe_calckey/frontend/client/src/themes/l-rosepinedawn.json5 index d19eb59..88a06fc 100644 --- a/fe_calckey/frontend/client/src/themes/l-rosepinedawn.json5 +++ b/fe_calckey/frontend/client/src/themes/l-rosepinedawn.json5 @@ -1,89 +1,89 @@ { - id: '919c91ac-c6fa-43dc-a423-3cc84fd67d7c', - base: 'light', - name: ' Rosé Pine Dawn', - description: 'Soho vibes for Misskey, dawn edition', - props: { - accent: '#286983', - accentDarken: ':darken<10<@accent', - accentLighten: ':lighten<10<@accent', - accentedBg: ':alpha<0.15<@accent', - focus: ':alpha<0.3<@accent', - bg: '#faf4ed', - acrylicBg: ':alpha<0.5<@bg', - fg: '#575279', - fgTransparentWeak: ':alpha<0.75<@fg', - fgTransparent: ':alpha<0.5<@fg', - fgHighlighted: ':darken<3<@fg', - fgOnAccent: '#fffaf3', - divider: 'rgba(0, 0, 0, 0.1)', - indicator: '@accent', - panel: ':lighten<3<@bg', - panelHighlight: ':darken<3<@panel', - panelHeaderBg: ':lighten<3<@panel', - panelHeaderFg: '@fg', - panelHeaderDivider: 'rgba(0, 0, 0, 0)', - panelBorder: '" solid 1px var(--divider)', - acrylicPanel: ':alpha<0.5<@panel', - popup: ':lighten<3<@panel', - shadow: 'rgba(0, 0, 0, 0.1)', - header: ':alpha<0.7<@panel', - navBg: '@panel', - navFg: '@fg', - navHoverFg: ':darken<17<@fg', - navActive: '@accent', - navIndicator: '@indicator', - link: '#56949f', - hashtag: '#ea9d34', - mention: '@accent', - mentionMe: '@mention', - renote: '#56949f', - modalBg: 'rgba(0, 0, 0, 0.3)', - scrollbarHandle: 'rgba(0, 0, 0, 0.2)', - scrollbarHandleHover: 'rgba(0, 0, 0, 0.4)', - dateLabelFg: '@fg', - infoBg: '#f2e9e1', - infoFg: '#ea9d34', - infoWarnBg: '#f2e9e1', - infoWarnFg: '#b4637a', - switchBg: 'rgba(0, 0, 0, 0.15)', - cwBg: '#b4637a', - cwFg: '#faf4ed', - cwHoverBg: '#d7827e', - buttonBg: 'rgba(0, 0, 0, 0.05)', - buttonHoverBg: 'rgba(0, 0, 0, 0.1)', - buttonGradateA: '#d7827e', - buttonGradateB: ':hue<20<#d7827e', - inputBorder: 'rgba(0, 0, 0, 0.1)', - inputBorderHover: 'rgba(0, 0, 0, 0.2)', - listItemHoverBg: 'rgba(0, 0, 0, 0.03)', - driveFolderBg: ':alpha<0.3<@accent', - wallpaperOverlay: 'rgba(255, 255, 255, 0.5)', - badge: '#31b1ce', - messageBg: '@bg', - success: '#907aa9', - error: '#b4637a', - warn: '#ea9d34', - codeString: '#b98710', - codeNumber: '#0fbbbb', - codeBoolean: '#62b70c', - htmlThemeColor: '@bg', - X2: ':darken<2<@panel', - X3: 'rgba(0, 0, 0, 0.05)', - X4: 'rgba(0, 0, 0, 0.1)', - X5: 'rgba(0, 0, 0, 0.05)', - X6: 'rgba(0, 0, 0, 0.25)', - X7: 'rgba(0, 0, 0, 0.05)', - X8: ':lighten<5<@accent', - X9: ':darken<5<@accent', - X10: ':alpha<0.4<@accent', - X11: 'rgba(0, 0, 0, 0.1)', - X12: 'rgba(0, 0, 0, 0.1)', - X13: 'rgba(0, 0, 0, 0.15)', - X14: ':alpha<0.5<@navBg', - X15: ':alpha<0<@panel', - X16: ':alpha<0.7<@panel', - X17: ':alpha<0.8<@bg', - }, - author: '@thatonecalculator@stop.voring.me', + id: "919c91ac-c6fa-43dc-a423-3cc84fd67d7c", + base: "light", + name: " Rosé Pine Dawn", + description: "Soho vibes for Misskey, dawn edition", + props: { + accent: "#286983", + accentDarken: ":darken<10<@accent", + accentLighten: ":lighten<10<@accent", + accentedBg: ":alpha<0.15<@accent", + focus: ":alpha<0.3<@accent", + bg: "#faf4ed", + acrylicBg: ":alpha<0.5<@bg", + fg: "#575279", + fgTransparentWeak: ":alpha<0.75<@fg", + fgTransparent: ":alpha<0.5<@fg", + fgHighlighted: ":darken<3<@fg", + fgOnAccent: "#fffaf3", + divider: "rgba(0, 0, 0, 0.1)", + indicator: "@accent", + panel: ":lighten<3<@bg", + panelHighlight: ":darken<3<@panel", + panelHeaderBg: ":lighten<3<@panel", + panelHeaderFg: "@fg", + panelHeaderDivider: "rgba(0, 0, 0, 0)", + panelBorder: '" solid 1px var(--divider)', + acrylicPanel: ":alpha<0.5<@panel", + popup: ":lighten<3<@panel", + shadow: "rgba(0, 0, 0, 0.1)", + header: ":alpha<0.7<@panel", + navBg: "@panel", + navFg: "@fg", + navHoverFg: ":darken<17<@fg", + navActive: "@accent", + navIndicator: "@indicator", + link: "#56949f", + hashtag: "#ea9d34", + mention: "@accent", + mentionMe: "@mention", + renote: "#56949f", + modalBg: "rgba(0, 0, 0, 0.3)", + scrollbarHandle: "rgba(0, 0, 0, 0.2)", + scrollbarHandleHover: "rgba(0, 0, 0, 0.4)", + dateLabelFg: "@fg", + infoBg: "#f2e9e1", + infoFg: "#ea9d34", + infoWarnBg: "#f2e9e1", + infoWarnFg: "#b4637a", + switchBg: "rgba(0, 0, 0, 0.15)", + cwBg: "#b4637a", + cwFg: "#faf4ed", + cwHoverBg: "#d7827e", + buttonBg: "rgba(0, 0, 0, 0.05)", + buttonHoverBg: "rgba(0, 0, 0, 0.1)", + buttonGradateA: "#d7827e", + buttonGradateB: ":hue<20<#d7827e", + inputBorder: "rgba(0, 0, 0, 0.1)", + inputBorderHover: "rgba(0, 0, 0, 0.2)", + listItemHoverBg: "rgba(0, 0, 0, 0.03)", + driveFolderBg: ":alpha<0.3<@accent", + wallpaperOverlay: "rgba(255, 255, 255, 0.5)", + badge: "#31b1ce", + messageBg: "@bg", + success: "#907aa9", + error: "#b4637a", + warn: "#ea9d34", + codeString: "#b98710", + codeNumber: "#0fbbbb", + codeBoolean: "#62b70c", + htmlThemeColor: "@bg", + X2: ":darken<2<@panel", + X3: "rgba(0, 0, 0, 0.05)", + X4: "rgba(0, 0, 0, 0.1)", + X5: "rgba(0, 0, 0, 0.05)", + X6: "rgba(0, 0, 0, 0.25)", + X7: "rgba(0, 0, 0, 0.05)", + X8: ":lighten<5<@accent", + X9: ":darken<5<@accent", + X10: ":alpha<0.4<@accent", + X11: "rgba(0, 0, 0, 0.1)", + X12: "rgba(0, 0, 0, 0.1)", + X13: "rgba(0, 0, 0, 0.15)", + X14: ":alpha<0.5<@navBg", + X15: ":alpha<0<@panel", + X16: ":alpha<0.7<@panel", + X17: ":alpha<0.8<@bg", + }, + author: "@thatonecalculator@stop.voring.me", } diff --git a/fe_calckey/frontend/client/src/themes/l-sushi.json5 b/fe_calckey/frontend/client/src/themes/l-sushi.json5 index 5846927..0b35f5e 100644 --- a/fe_calckey/frontend/client/src/themes/l-sushi.json5 +++ b/fe_calckey/frontend/client/src/themes/l-sushi.json5 @@ -1,18 +1,18 @@ { - id: '213273e5-7d20-d5f0-6e36-1b6a4f67115c', + id: "213273e5-7d20-d5f0-6e36-1b6a4f67115c", - name: 'Mi Sushi Light', - author: 'syuilo', + name: "Mi Sushi Light", + author: "syuilo", - base: 'light', + base: "light", - props: { - accent: '#e36749', - bg: '#f0eee9', - fg: '#5f5f5f', - renote: '@accent', - link: '@accent', - mention: '@accent', - hashtag: '#229e82', - }, + props: { + accent: "#e36749", + bg: "#f0eee9", + fg: "#5f5f5f", + renote: "@accent", + link: "@accent", + mention: "@accent", + hashtag: "#229e82", + }, } diff --git a/fe_calckey/frontend/client/src/themes/l-u0.json5 b/fe_calckey/frontend/client/src/themes/l-u0.json5 index 03b114b..a63d711 100644 --- a/fe_calckey/frontend/client/src/themes/l-u0.json5 +++ b/fe_calckey/frontend/client/src/themes/l-u0.json5 @@ -1,87 +1,87 @@ { - id: 'e2c940b5-6e9a-4c03-b738-261c720c426d', - base: 'light', - name: 'Mi U0 Light', - props: { - X2: ':darken<2<@panel', - X3: 'rgba(255, 255, 255, 0.05)', - X4: 'rgba(255, 255, 255, 0.1)', - X5: 'rgba(255, 255, 255, 0.05)', - X6: 'rgba(255, 255, 255, 0.15)', - X7: 'rgba(255, 255, 255, 0.05)', - X8: ':lighten<5<@accent', - X9: ':darken<5<@accent', - bg: '#e7e7eb', - fg: '#5f5f5f', - X10: ':alpha<0.4<@accent', - X11: 'rgba(0, 0, 0, 0.3)', - X12: 'rgba(255, 255, 255, 0.1)', - X13: 'rgba(255, 255, 255, 0.15)', - X14: ':alpha<0.5<@navBg', - X15: ':alpha<0<@panel', - X16: ':alpha<0.7<@panel', - X17: ':alpha<0.8<@bg', - cwBg: '#687390', - cwFg: '#393f4f', - link: '@accent', - warn: '#ecb637', - badge: '#31b1ce', - error: '#ec4137', - focus: ':alpha<0.3<@accent', - navBg: '@panel', - navFg: '@fg', - panel: ':lighten<3<@bg', - popup: ':lighten<3<@panel', - accent: '#478384', - header: ':alpha<0.7<@panel', - infoBg: '#253142', - infoFg: '#fff', - renote: '@accent', - shadow: 'rgba(0, 0, 0, 0.3)', - divider: '#4646461a', - hashtag: '#1f3134', - mention: '@accent', - modalBg: 'rgba(0, 0, 0, 0.5)', - success: '#86b300', - buttonBg: '#0000000d', - switchBg: 'rgba(255, 255, 255, 0.15)', - acrylicBg: ':alpha<0.5<@bg', - cwHoverBg: '#707b97', - indicator: '@accent', - mentionMe: '@mention', - messageBg: '@bg', - navActive: '@accent', - accentedBg: ':alpha<0.15<@accent', - codeNumber: '#cfff9e', - codeString: '#ffb675', - fgOnAccent: '#fff', - infoWarnBg: '#42321c', - infoWarnFg: '#ffbd3e', - navHoverFg: ':lighten<17<@fg', - codeBoolean: '#c59eff', - dateLabelFg: '@fg', - inputBorder: 'rgba(255, 255, 255, 0.1)', - panelBorder: '" solid 1px var(--divider)', - accentDarken: ':darken<10<@accent', - acrylicPanel: ':alpha<0.5<@panel', - navIndicator: '@indicator', - accentLighten: ':lighten<10<@accent', - buttonHoverBg: '#0000001a', - driveFolderBg: ':alpha<0.3<@accent', - fgHighlighted: ':lighten<3<@fg', - fgTransparent: ':alpha<0.5<@fg', - panelHeaderBg: ':lighten<3<@panel', - panelHeaderFg: '@fg', - buttonGradateA: '@accent', - buttonGradateB: ':hue<20<@accent', - htmlThemeColor: '@bg', - panelHighlight: ':lighten<3<@panel', - listItemHoverBg: 'rgba(255, 255, 255, 0.03)', - scrollbarHandle: '#74747433', - inputBorderHover: 'rgba(255, 255, 255, 0.2)', - wallpaperOverlay: 'rgba(0, 0, 0, 0.5)', - fgTransparentWeak: ':alpha<0.75<@fg', - panelHeaderDivider: 'rgba(0, 0, 0, 0)', - scrollbarHandleHover: 'rgba(255, 255, 255, 0.4)', - }, + id: "e2c940b5-6e9a-4c03-b738-261c720c426d", + base: "light", + name: "Mi U0 Light", + props: { + X2: ":darken<2<@panel", + X3: "rgba(255, 255, 255, 0.05)", + X4: "rgba(255, 255, 255, 0.1)", + X5: "rgba(255, 255, 255, 0.05)", + X6: "rgba(255, 255, 255, 0.15)", + X7: "rgba(255, 255, 255, 0.05)", + X8: ":lighten<5<@accent", + X9: ":darken<5<@accent", + bg: "#e7e7eb", + fg: "#5f5f5f", + X10: ":alpha<0.4<@accent", + X11: "rgba(0, 0, 0, 0.3)", + X12: "rgba(255, 255, 255, 0.1)", + X13: "rgba(255, 255, 255, 0.15)", + X14: ":alpha<0.5<@navBg", + X15: ":alpha<0<@panel", + X16: ":alpha<0.7<@panel", + X17: ":alpha<0.8<@bg", + cwBg: "#687390", + cwFg: "#393f4f", + link: "@accent", + warn: "#ecb637", + badge: "#31b1ce", + error: "#ec4137", + focus: ":alpha<0.3<@accent", + navBg: "@panel", + navFg: "@fg", + panel: ":lighten<3<@bg", + popup: ":lighten<3<@panel", + accent: "#478384", + header: ":alpha<0.7<@panel", + infoBg: "#253142", + infoFg: "#fff", + renote: "@accent", + shadow: "rgba(0, 0, 0, 0.3)", + divider: "#4646461a", + hashtag: "#1f3134", + mention: "@accent", + modalBg: "rgba(0, 0, 0, 0.5)", + success: "#86b300", + buttonBg: "#0000000d", + switchBg: "rgba(255, 255, 255, 0.15)", + acrylicBg: ":alpha<0.5<@bg", + cwHoverBg: "#707b97", + indicator: "@accent", + mentionMe: "@mention", + messageBg: "@bg", + navActive: "@accent", + accentedBg: ":alpha<0.15<@accent", + codeNumber: "#cfff9e", + codeString: "#ffb675", + fgOnAccent: "#fff", + infoWarnBg: "#42321c", + infoWarnFg: "#ffbd3e", + navHoverFg: ":lighten<17<@fg", + codeBoolean: "#c59eff", + dateLabelFg: "@fg", + inputBorder: "rgba(255, 255, 255, 0.1)", + panelBorder: '" solid 1px var(--divider)', + accentDarken: ":darken<10<@accent", + acrylicPanel: ":alpha<0.5<@panel", + navIndicator: "@indicator", + accentLighten: ":lighten<10<@accent", + buttonHoverBg: "#0000001a", + driveFolderBg: ":alpha<0.3<@accent", + fgHighlighted: ":lighten<3<@fg", + fgTransparent: ":alpha<0.5<@fg", + panelHeaderBg: ":lighten<3<@panel", + panelHeaderFg: "@fg", + buttonGradateA: "@accent", + buttonGradateB: ":hue<20<@accent", + htmlThemeColor: "@bg", + panelHighlight: ":lighten<3<@panel", + listItemHoverBg: "rgba(255, 255, 255, 0.03)", + scrollbarHandle: "#74747433", + inputBorderHover: "rgba(255, 255, 255, 0.2)", + wallpaperOverlay: "rgba(0, 0, 0, 0.5)", + fgTransparentWeak: ":alpha<0.75<@fg", + panelHeaderDivider: "rgba(0, 0, 0, 0)", + scrollbarHandleHover: "rgba(255, 255, 255, 0.4)", + }, } diff --git a/fe_calckey/frontend/client/src/themes/l-vivid.json5 b/fe_calckey/frontend/client/src/themes/l-vivid.json5 index b3c08f3..a38ce3c 100644 --- a/fe_calckey/frontend/client/src/themes/l-vivid.json5 +++ b/fe_calckey/frontend/client/src/themes/l-vivid.json5 @@ -1,82 +1,82 @@ { - id: '6128c2a9-5c54-43fe-a47d-17942356470b', + id: "6128c2a9-5c54-43fe-a47d-17942356470b", - name: 'Mi Vivid Light', - author: 'syuilo', + name: "Mi Vivid Light", + author: "syuilo", - base: 'light', + base: "light", - props: { - bg: '#fafafa', - fg: '#444', - cwBg: '#b1b9c1', - cwFg: '#fff', - link: '#ff9400', - warn: '#ecb637', - badge: '#31b1ce', - error: '#ec4137', - focus: ':alpha<0.3<@accent', - navBg: '@panel', - navFg: '@fg', - panel: '#fff', - accent: '#008cff', - header: ':alpha<0.7<@panel', - infoBg: '#e5f5ff', - infoFg: '#72818a', - renote: '@accent', - shadow: 'rgba(0, 0, 0, 0.1)', - divider: 'rgba(0, 0, 0, 0.08)', - hashtag: '#92d400', - mention: '@accent', - modalBg: 'rgba(0, 0, 0, 0.3)', - success: '#86b300', - buttonBg: 'rgba(0, 0, 0, 0.05)', - acrylicBg: ':alpha<0.5<@bg', - cwHoverBg: '#bbc4ce', - indicator: '@accent', - mentionMe: '@mention', - messageBg: '@bg', - navActive: '@accent', - infoWarnBg: '#fff0db', - infoWarnFg: '#8f6e31', - navHoverFg: ':darken<17<@fg', - dateLabelFg: '@fg', - inputBorder: 'rgba(0, 0, 0, 0.1)', - inputBorderHover: 'rgba(0, 0, 0, 0.2)', - panelBorder: '" solid 1px var(--divider)', - accentDarken: ':darken<10<@accent', - acrylicPanel: ':alpha<0.5<@panel', - navIndicator: '@accent', - accentLighten: ':lighten<10<@accent', - buttonHoverBg: 'rgba(0, 0, 0, 0.1)', - driveFolderBg: ':alpha<0.3<@accent', - fgHighlighted: ':darken<3<@fg', - fgTransparent: ':alpha<0.5<@fg', - panelHeaderBg: ':lighten<3<@panel', - panelHeaderFg: '@fg', - htmlThemeColor: '@bg', - panelHighlight: ':darken<3<@panel', - listItemHoverBg: 'rgba(0, 0, 0, 0.03)', - scrollbarHandle: 'rgba(0, 0, 0, 0.2)', - wallpaperOverlay: 'rgba(255, 255, 255, 0.5)', - fgTransparentWeak: ':alpha<0.75<@fg', - panelHeaderDivider: '@divider', - scrollbarHandleHover: 'rgba(0, 0, 0, 0.4)', - X2: ':darken<2<@panel', - X3: 'rgba(0, 0, 0, 0.05)', - X4: 'rgba(0, 0, 0, 0.1)', - X5: 'rgba(0, 0, 0, 0.05)', - X6: 'rgba(0, 0, 0, 0.25)', - X7: 'rgba(0, 0, 0, 0.05)', - X8: ':lighten<5<@accent', - X9: ':darken<5<@accent', - X10: ':alpha<0.4<@accent', - X11: 'rgba(0, 0, 0, 0.1)', - X12: 'rgba(0, 0, 0, 0.1)', - X13: 'rgba(0, 0, 0, 0.15)', - X14: ':alpha<0.5<@navBg', - X15: ':alpha<0<@panel', - X16: ':alpha<0.7<@panel', - X17: ':alpha<0.8<@bg', - }, + props: { + bg: "#fafafa", + fg: "#444", + cwBg: "#b1b9c1", + cwFg: "#fff", + link: "#ff9400", + warn: "#ecb637", + badge: "#31b1ce", + error: "#ec4137", + focus: ":alpha<0.3<@accent", + navBg: "@panel", + navFg: "@fg", + panel: "#fff", + accent: "#008cff", + header: ":alpha<0.7<@panel", + infoBg: "#e5f5ff", + infoFg: "#72818a", + renote: "@accent", + shadow: "rgba(0, 0, 0, 0.1)", + divider: "rgba(0, 0, 0, 0.08)", + hashtag: "#92d400", + mention: "@accent", + modalBg: "rgba(0, 0, 0, 0.3)", + success: "#86b300", + buttonBg: "rgba(0, 0, 0, 0.05)", + acrylicBg: ":alpha<0.5<@bg", + cwHoverBg: "#bbc4ce", + indicator: "@accent", + mentionMe: "@mention", + messageBg: "@bg", + navActive: "@accent", + infoWarnBg: "#fff0db", + infoWarnFg: "#8f6e31", + navHoverFg: ":darken<17<@fg", + dateLabelFg: "@fg", + inputBorder: "rgba(0, 0, 0, 0.1)", + inputBorderHover: "rgba(0, 0, 0, 0.2)", + panelBorder: '" solid 1px var(--divider)', + accentDarken: ":darken<10<@accent", + acrylicPanel: ":alpha<0.5<@panel", + navIndicator: "@accent", + accentLighten: ":lighten<10<@accent", + buttonHoverBg: "rgba(0, 0, 0, 0.1)", + driveFolderBg: ":alpha<0.3<@accent", + fgHighlighted: ":darken<3<@fg", + fgTransparent: ":alpha<0.5<@fg", + panelHeaderBg: ":lighten<3<@panel", + panelHeaderFg: "@fg", + htmlThemeColor: "@bg", + panelHighlight: ":darken<3<@panel", + listItemHoverBg: "rgba(0, 0, 0, 0.03)", + scrollbarHandle: "rgba(0, 0, 0, 0.2)", + wallpaperOverlay: "rgba(255, 255, 255, 0.5)", + fgTransparentWeak: ":alpha<0.75<@fg", + panelHeaderDivider: "@divider", + scrollbarHandleHover: "rgba(0, 0, 0, 0.4)", + X2: ":darken<2<@panel", + X3: "rgba(0, 0, 0, 0.05)", + X4: "rgba(0, 0, 0, 0.1)", + X5: "rgba(0, 0, 0, 0.05)", + X6: "rgba(0, 0, 0, 0.25)", + X7: "rgba(0, 0, 0, 0.05)", + X8: ":lighten<5<@accent", + X9: ":darken<5<@accent", + X10: ":alpha<0.4<@accent", + X11: "rgba(0, 0, 0, 0.1)", + X12: "rgba(0, 0, 0, 0.1)", + X13: "rgba(0, 0, 0, 0.15)", + X14: ":alpha<0.5<@navBg", + X15: ":alpha<0<@panel", + X16: ":alpha<0.7<@panel", + X17: ":alpha<0.8<@bg", + }, } diff --git a/fe_calckey/frontend/client/src/types/menu.ts b/fe_calckey/frontend/client/src/types/menu.ts index 115eb48..c334d8c 100644 --- a/fe_calckey/frontend/client/src/types/menu.ts +++ b/fe_calckey/frontend/client/src/types/menu.ts @@ -6,88 +6,94 @@ export type MenuAction = (ev: MouseEvent) => void; export type MenuDivider = null; export type MenuNull = undefined; export type MenuLabel = { - type: "label"; - text: string; - textStyle?: string; + type: "label"; + text: string; + textStyle?: string; }; export type MenuLink = { - type: "link"; - to: string; - text: string; - textStyle?: string; - icon?: string; - indicate?: boolean; - avatar?: Misskey.entities.User; + type: "link"; + to: string; + text: string; + textStyle?: string; + icon?: string; + indicate?: boolean; + avatar?: Misskey.entities.User; }; export type MenuA = { - type: "a"; - href: string; - target?: string; - download?: string; - text: string; - textStyle?: string; - icon?: string; - indicate?: boolean; + type: "a"; + href: string; + target?: string; + download?: string; + text: string; + textStyle?: string; + icon?: string; + indicate?: boolean; }; export type MenuUser = { - type: "user"; - user: Misskey.entities.User; - active?: boolean; - indicate?: boolean; - hidden?: boolean; - action: MenuAction; + type: "user"; + user: Misskey.entities.User; + active?: boolean; + indicate?: boolean; + hidden?: boolean; + action: MenuAction; }; export type MenuSwitch = { - type: "switch"; - ref: Ref; - text: string; - textStyle?: string; - disabled?: boolean; + type: "switch"; + ref: Ref; + text: string; + textStyle?: string; + disabled?: boolean; }; export type MenuButton = { - type?: "button"; - text: string; - textStyle?: string; - icon?: string; - indicate?: boolean; - danger?: boolean; - accent?: boolean; - active?: boolean; - hidden?: boolean; - avatar?: Misskey.entities.User; - action: MenuAction; + type?: "button"; + text: string; + textStyle?: string; + icon?: string; + indicate?: boolean; + danger?: boolean; + accent?: boolean; + active?: boolean; + hidden?: boolean; + avatar?: Misskey.entities.User; + action: MenuAction; }; export type MenuParent = { - type: "parent"; - text: string; - textStyle?: string; - icon?: string; - children: OuterMenuItem[]; + type: "parent"; + text: string; + textStyle?: string; + icon?: string; + children: OuterMenuItem[]; }; export type MenuPending = { type: "pending" }; type OuterMenuItem = - | MenuDivider - | MenuNull - | MenuLabel - | MenuLink - | MenuA - | MenuUser - | MenuSwitch - | MenuButton - | MenuParent; + | MenuDivider + | MenuNull + | MenuLabel + | MenuLink + | MenuA + | MenuUser + | MenuSwitch + | MenuButton + | MenuParent; type OuterPromiseMenuItem = Promise< - MenuLabel | MenuLink | MenuA | MenuUser | MenuSwitch | MenuButton | MenuParent + | MenuLabel + | MenuLink + | MenuA + | MenuUser + | MenuSwitch + | MenuButton + | MenuParent >; export type MenuItem = OuterMenuItem | OuterPromiseMenuItem; export type InnerMenuItem = - | MenuDivider - | MenuPending - | MenuLabel - | MenuLink - | MenuA - | MenuUser - | MenuSwitch - | MenuButton - | MenuParent; + | MenuDivider + | MenuPending + | MenuLabel + | MenuLink + | MenuA + | MenuUser + | MenuSwitch + | MenuButton + | MenuParent; diff --git a/fe_calckey/frontend/client/src/ui/_common_/common.vue b/fe_calckey/frontend/client/src/ui/_common_/common.vue index c47b0f8..a90bc17 100644 --- a/fe_calckey/frontend/client/src/ui/_common_/common.vue +++ b/fe_calckey/frontend/client/src/ui/_common_/common.vue @@ -1,19 +1,19 @@ diff --git a/fe_calckey/frontend/client/src/ui/_common_/navbar-for-mobile.vue b/fe_calckey/frontend/client/src/ui/_common_/navbar-for-mobile.vue index 39abb7c..58c6555 100644 --- a/fe_calckey/frontend/client/src/ui/_common_/navbar-for-mobile.vue +++ b/fe_calckey/frontend/client/src/ui/_common_/navbar-for-mobile.vue @@ -1,130 +1,130 @@ diff --git a/fe_calckey/frontend/client/src/ui/_common_/statusbar-federation.vue b/fe_calckey/frontend/client/src/ui/_common_/statusbar-federation.vue index 2bb06bc..87f222d 100644 --- a/fe_calckey/frontend/client/src/ui/_common_/statusbar-federation.vue +++ b/fe_calckey/frontend/client/src/ui/_common_/statusbar-federation.vue @@ -1,41 +1,41 @@ diff --git a/fe_calckey/frontend/client/src/ui/_common_/statusbar-rss.vue b/fe_calckey/frontend/client/src/ui/_common_/statusbar-rss.vue index 606f3f1..d4611a4 100644 --- a/fe_calckey/frontend/client/src/ui/_common_/statusbar-rss.vue +++ b/fe_calckey/frontend/client/src/ui/_common_/statusbar-rss.vue @@ -1,29 +1,29 @@ diff --git a/fe_calckey/frontend/client/src/ui/_common_/statusbar-user-list.vue b/fe_calckey/frontend/client/src/ui/_common_/statusbar-user-list.vue index f32b7f8..be123aa 100644 --- a/fe_calckey/frontend/client/src/ui/_common_/statusbar-user-list.vue +++ b/fe_calckey/frontend/client/src/ui/_common_/statusbar-user-list.vue @@ -1,36 +1,36 @@ diff --git a/fe_calckey/frontend/client/src/ui/_common_/statusbars.vue b/fe_calckey/frontend/client/src/ui/_common_/statusbars.vue index bef6131..681c3b9 100644 --- a/fe_calckey/frontend/client/src/ui/_common_/statusbars.vue +++ b/fe_calckey/frontend/client/src/ui/_common_/statusbars.vue @@ -1,51 +1,51 @@ diff --git a/fe_calckey/frontend/client/src/ui/_common_/stream-indicator.vue b/fe_calckey/frontend/client/src/ui/_common_/stream-indicator.vue index a3d0629..6087039 100644 --- a/fe_calckey/frontend/client/src/ui/_common_/stream-indicator.vue +++ b/fe_calckey/frontend/client/src/ui/_common_/stream-indicator.vue @@ -1,20 +1,20 @@ diff --git a/fe_calckey/frontend/client/src/ui/_common_/sw-inject.ts b/fe_calckey/frontend/client/src/ui/_common_/sw-inject.ts index 5108774..2a7b2d3 100644 --- a/fe_calckey/frontend/client/src/ui/_common_/sw-inject.ts +++ b/fe_calckey/frontend/client/src/ui/_common_/sw-inject.ts @@ -6,30 +6,30 @@ import { getAccountFromId } from "@/scripts/get-account-from-id"; import { mainRouter } from "@/router"; export function swInject() { - navigator.serviceWorker.addEventListener("message", (ev) => { - if (_DEV_) { - console.log("sw msg", ev.data); - } + navigator.serviceWorker.addEventListener("message", (ev) => { + if (_DEV_) { + console.log("sw msg", ev.data); + } - if (ev.data.type !== "order") return; + if (ev.data.type !== "order") return; - if (ev.data.loginId !== $i?.id) { - return getAccountFromId(ev.data.loginId).then((account) => { - if (!account) return; - return login(account.token, ev.data.url); - }); - } + if (ev.data.loginId !== $i?.id) { + return getAccountFromId(ev.data.loginId).then((account) => { + if (!account) return; + return login(account.token, ev.data.url); + }); + } - switch (ev.data.order) { - case "post": - return post(ev.data.options); - case "push": - if (mainRouter.currentRoute.value.path === ev.data.url) { - return window.scroll({ top: 0, behavior: "smooth" }); - } - return mainRouter.push(ev.data.url); - default: - return; - } - }); + switch (ev.data.order) { + case "post": + return post(ev.data.options); + case "push": + if (mainRouter.currentRoute.value.path === ev.data.url) { + return window.scroll({ top: 0, behavior: "smooth" }); + } + return mainRouter.push(ev.data.url); + default: + return; + } + }); } diff --git a/fe_calckey/frontend/client/src/ui/_common_/upload.vue b/fe_calckey/frontend/client/src/ui/_common_/upload.vue index 0fde3aa..c91dd39 100644 --- a/fe_calckey/frontend/client/src/ui/_common_/upload.vue +++ b/fe_calckey/frontend/client/src/ui/_common_/upload.vue @@ -1,58 +1,58 @@ diff --git a/fe_calckey/frontend/client/src/ui/deck/antenna-column.vue b/fe_calckey/frontend/client/src/ui/deck/antenna-column.vue index 958a807..291afb4 100644 --- a/fe_calckey/frontend/client/src/ui/deck/antenna-column.vue +++ b/fe_calckey/frontend/client/src/ui/deck/antenna-column.vue @@ -1,23 +1,23 @@ diff --git a/fe_calckey/frontend/client/src/ui/deck/column.vue b/fe_calckey/frontend/client/src/ui/deck/column.vue index dcf94b3..a3bcee1 100644 --- a/fe_calckey/frontend/client/src/ui/deck/column.vue +++ b/fe_calckey/frontend/client/src/ui/deck/column.vue @@ -1,74 +1,74 @@ diff --git a/fe_calckey/frontend/client/src/ui/deck/deck-store.ts b/fe_calckey/frontend/client/src/ui/deck/deck-store.ts index a6db02a..eeab75a 100644 --- a/fe_calckey/frontend/client/src/ui/deck/deck-store.ts +++ b/fe_calckey/frontend/client/src/ui/deck/deck-store.ts @@ -7,328 +7,335 @@ import { api } from "@/os"; import { deepClone } from "@/scripts/clone"; type ColumnWidget = { - name: string; - id: string; - data: Record; + name: string; + id: string; + data: Record; }; export type Column = { - id: string; - type: - | "main" - | "widgets" - | "notifications" - | "tl" - | "antenna" - | "list" - | "mentions" - | "direct"; - name: string | null; - width: number; - widgets?: ColumnWidget[]; - active?: boolean; - flexible?: boolean; - antennaId?: string; - listId?: string; - includingTypes?: typeof notificationTypes[number][]; - tl?: "home" | "local" | "social" | "global"; + id: string; + type: + | "main" + | "widgets" + | "notifications" + | "tl" + | "antenna" + | "list" + | "mentions" + | "direct"; + name: string | null; + width: number; + widgets?: ColumnWidget[]; + active?: boolean; + flexible?: boolean; + antennaId?: string; + listId?: string; + includingTypes?: (typeof notificationTypes)[number][]; + tl?: "home" | "local" | "social" | "global"; }; export const deckStore = markRaw( - new Storage("deck", { - profile: { - where: "deviceAccount", - default: "default", - }, - columns: { - where: "deviceAccount", - default: [] as Column[], - }, - layout: { - where: "deviceAccount", - default: [] as Column["id"][][], - }, - columnAlign: { - where: "deviceAccount", - default: "left" as "left" | "right" | "center", - }, - alwaysShowMainColumn: { - where: "deviceAccount", - default: true, - }, - navWindow: { - where: "deviceAccount", - default: true, - }, - }), + new Storage("deck", { + profile: { + where: "deviceAccount", + default: "default", + }, + columns: { + where: "deviceAccount", + default: [] as Column[], + }, + layout: { + where: "deviceAccount", + default: [] as Column["id"][][], + }, + columnAlign: { + where: "deviceAccount", + default: "left" as "left" | "right" | "center", + }, + alwaysShowMainColumn: { + where: "deviceAccount", + default: true, + }, + navWindow: { + where: "deviceAccount", + default: true, + }, + }) ); export const loadDeck = async () => { - let deck; + let deck; - try { - deck = await api("i/registry/get", { - scope: ["client", "deck", "profiles"], - key: deckStore.state.profile, - }); - } catch (err) { - if (err.code === "NO_SUCH_KEY") { - // 後方互換性のため - if (deckStore.state.profile === "default") { - saveDeck(); - return; - } + try { + deck = await api("i/registry/get", { + scope: ["client", "deck", "profiles"], + key: deckStore.state.profile, + }); + } catch (err) { + if (err.code === "NO_SUCH_KEY") { + // 後方互換性のため + if (deckStore.state.profile === "default") { + saveDeck(); + return; + } - deckStore.set("columns", []); - deckStore.set("layout", []); - return; - } - throw err; - } + deckStore.set("columns", []); + deckStore.set("layout", []); + return; + } + throw err; + } - deckStore.set("columns", deck.columns); - deckStore.set("layout", deck.layout); + deckStore.set("columns", deck.columns); + deckStore.set("layout", deck.layout); }; // TODO: deckがloadされていない状態でsaveすると意図せず上書きが発生するので対策する export const saveDeck = throttle(1000, () => { - api("i/registry/set", { - scope: ["client", "deck", "profiles"], - key: deckStore.state.profile, - value: { - columns: deckStore.reactiveState.columns.value, - layout: deckStore.reactiveState.layout.value, - }, - }); + api("i/registry/set", { + scope: ["client", "deck", "profiles"], + key: deckStore.state.profile, + value: { + columns: deckStore.reactiveState.columns.value, + layout: deckStore.reactiveState.layout.value, + }, + }); }); export async function getProfiles(): Promise { - return await api("i/registry/keys", { - scope: ["client", "deck", "profiles"], - }); + return await api("i/registry/keys", { + scope: ["client", "deck", "profiles"], + }); } export async function deleteProfile(key: string): Promise { - return await api("i/registry/remove", { - scope: ["client", "deck", "profiles"], - key: key, - }); + return await api("i/registry/remove", { + scope: ["client", "deck", "profiles"], + key: key, + }); } export async function renameProfile(oldKey: string, newKey: string) { - if (oldKey === newKey) return; + if (oldKey === newKey) return; - await api("i/registry/set", { - scope: ["client", "deck", "profiles"], - key: newKey, - value: { columns: deckStore.state.columns, layout: deckStore.state.layout }, - }); - deckStore.set("profile", newKey); - saveDeck(); + await api("i/registry/set", { + scope: ["client", "deck", "profiles"], + key: newKey, + value: { + columns: deckStore.state.columns, + layout: deckStore.state.layout, + }, + }); + deckStore.set("profile", newKey); + saveDeck(); - deleteProfile(oldKey); + deleteProfile(oldKey); } export function addColumn(column: Column) { - if (column.name === undefined) column.name = null; - deckStore.push("columns", column); - deckStore.push("layout", [column.id]); - saveDeck(); + if (column.name === undefined) column.name = null; + deckStore.push("columns", column); + deckStore.push("layout", [column.id]); + saveDeck(); } export function removeColumn(id: Column["id"]) { - deckStore.set( - "columns", - deckStore.state.columns.filter((c) => c.id !== id), - ); - deckStore.set( - "layout", - deckStore.state.layout - .map((ids) => ids.filter((_id) => _id !== id)) - .filter((ids) => ids.length > 0), - ); - saveDeck(); + deckStore.set( + "columns", + deckStore.state.columns.filter((c) => c.id !== id) + ); + deckStore.set( + "layout", + deckStore.state.layout + .map((ids) => ids.filter((_id) => _id !== id)) + .filter((ids) => ids.length > 0) + ); + saveDeck(); } export function swapColumn(a: Column["id"], b: Column["id"]) { - const aX = deckStore.state.layout.findIndex((ids) => ids.indexOf(a) !== -1); - const aY = deckStore.state.layout[aX].findIndex((id) => id === a); - const bX = deckStore.state.layout.findIndex((ids) => ids.indexOf(b) !== -1); - const bY = deckStore.state.layout[bX].findIndex((id) => id === b); - const layout = deepClone(deckStore.state.layout); - layout[aX][aY] = b; - layout[bX][bY] = a; - deckStore.set("layout", layout); - saveDeck(); + const aX = deckStore.state.layout.findIndex((ids) => ids.indexOf(a) !== -1); + const aY = deckStore.state.layout[aX].findIndex((id) => id === a); + const bX = deckStore.state.layout.findIndex((ids) => ids.indexOf(b) !== -1); + const bY = deckStore.state.layout[bX].findIndex((id) => id === b); + const layout = deepClone(deckStore.state.layout); + layout[aX][aY] = b; + layout[bX][bY] = a; + deckStore.set("layout", layout); + saveDeck(); } export function swapLeftColumn(id: Column["id"]) { - const layout = deepClone(deckStore.state.layout); - deckStore.state.layout.some((ids, i) => { - if (ids.includes(id)) { - const left = deckStore.state.layout[i - 1]; - if (left) { - layout[i - 1] = deckStore.state.layout[i]; - layout[i] = left; - deckStore.set("layout", layout); - } - return true; - } - }); - saveDeck(); + const layout = deepClone(deckStore.state.layout); + deckStore.state.layout.some((ids, i) => { + if (ids.includes(id)) { + const left = deckStore.state.layout[i - 1]; + if (left) { + layout[i - 1] = deckStore.state.layout[i]; + layout[i] = left; + deckStore.set("layout", layout); + } + return true; + } + }); + saveDeck(); } export function swapRightColumn(id: Column["id"]) { - const layout = deepClone(deckStore.state.layout); - deckStore.state.layout.some((ids, i) => { - if (ids.includes(id)) { - const right = deckStore.state.layout[i + 1]; - if (right) { - layout[i + 1] = deckStore.state.layout[i]; - layout[i] = right; - deckStore.set("layout", layout); - } - return true; - } - }); - saveDeck(); + const layout = deepClone(deckStore.state.layout); + deckStore.state.layout.some((ids, i) => { + if (ids.includes(id)) { + const right = deckStore.state.layout[i + 1]; + if (right) { + layout[i + 1] = deckStore.state.layout[i]; + layout[i] = right; + deckStore.set("layout", layout); + } + return true; + } + }); + saveDeck(); } export function swapUpColumn(id: Column["id"]) { - const layout = deepClone(deckStore.state.layout); - const idsIndex = deckStore.state.layout.findIndex((ids) => ids.includes(id)); - const ids = deepClone(deckStore.state.layout[idsIndex]); - ids.some((x, i) => { - if (x === id) { - const up = ids[i - 1]; - if (up) { - ids[i - 1] = id; - ids[i] = up; + const layout = deepClone(deckStore.state.layout); + const idsIndex = deckStore.state.layout.findIndex((ids) => + ids.includes(id) + ); + const ids = deepClone(deckStore.state.layout[idsIndex]); + ids.some((x, i) => { + if (x === id) { + const up = ids[i - 1]; + if (up) { + ids[i - 1] = id; + ids[i] = up; - layout[idsIndex] = ids; - deckStore.set("layout", layout); - } - return true; - } - }); - saveDeck(); + layout[idsIndex] = ids; + deckStore.set("layout", layout); + } + return true; + } + }); + saveDeck(); } export function swapDownColumn(id: Column["id"]) { - const layout = deepClone(deckStore.state.layout); - const idsIndex = deckStore.state.layout.findIndex((ids) => ids.includes(id)); - const ids = deepClone(deckStore.state.layout[idsIndex]); - ids.some((x, i) => { - if (x === id) { - const down = ids[i + 1]; - if (down) { - ids[i + 1] = id; - ids[i] = down; + const layout = deepClone(deckStore.state.layout); + const idsIndex = deckStore.state.layout.findIndex((ids) => + ids.includes(id) + ); + const ids = deepClone(deckStore.state.layout[idsIndex]); + ids.some((x, i) => { + if (x === id) { + const down = ids[i + 1]; + if (down) { + ids[i + 1] = id; + ids[i] = down; - layout[idsIndex] = ids; - deckStore.set("layout", layout); - } - return true; - } - }); - saveDeck(); + layout[idsIndex] = ids; + deckStore.set("layout", layout); + } + return true; + } + }); + saveDeck(); } export function stackLeftColumn(id: Column["id"]) { - let layout = deepClone(deckStore.state.layout); - const i = deckStore.state.layout.findIndex((ids) => ids.includes(id)); - layout = layout.map((ids) => ids.filter((_id) => _id !== id)); - layout[i - 1].push(id); - layout = layout.filter((ids) => ids.length > 0); - deckStore.set("layout", layout); - saveDeck(); + let layout = deepClone(deckStore.state.layout); + const i = deckStore.state.layout.findIndex((ids) => ids.includes(id)); + layout = layout.map((ids) => ids.filter((_id) => _id !== id)); + layout[i - 1].push(id); + layout = layout.filter((ids) => ids.length > 0); + deckStore.set("layout", layout); + saveDeck(); } export function popRightColumn(id: Column["id"]) { - let layout = deepClone(deckStore.state.layout); - const i = deckStore.state.layout.findIndex((ids) => ids.includes(id)); - const affected = layout[i]; - layout = layout.map((ids) => ids.filter((_id) => _id !== id)); - layout.splice(i + 1, 0, [id]); - layout = layout.filter((ids) => ids.length > 0); - deckStore.set("layout", layout); + let layout = deepClone(deckStore.state.layout); + const i = deckStore.state.layout.findIndex((ids) => ids.includes(id)); + const affected = layout[i]; + layout = layout.map((ids) => ids.filter((_id) => _id !== id)); + layout.splice(i + 1, 0, [id]); + layout = layout.filter((ids) => ids.length > 0); + deckStore.set("layout", layout); - const columns = deepClone(deckStore.state.columns); - for (const column of columns) { - if (affected.includes(column.id)) { - column.active = true; - } - } - deckStore.set("columns", columns); + const columns = deepClone(deckStore.state.columns); + for (const column of columns) { + if (affected.includes(column.id)) { + column.active = true; + } + } + deckStore.set("columns", columns); - saveDeck(); + saveDeck(); } export function addColumnWidget(id: Column["id"], widget: ColumnWidget) { - const columns = deepClone(deckStore.state.columns); - const columnIndex = deckStore.state.columns.findIndex((c) => c.id === id); - const column = deepClone(deckStore.state.columns[columnIndex]); - if (column == null) return; - if (column.widgets == null) column.widgets = []; - column.widgets.unshift(widget); - columns[columnIndex] = column; - deckStore.set("columns", columns); - saveDeck(); + const columns = deepClone(deckStore.state.columns); + const columnIndex = deckStore.state.columns.findIndex((c) => c.id === id); + const column = deepClone(deckStore.state.columns[columnIndex]); + if (column == null) return; + if (column.widgets == null) column.widgets = []; + column.widgets.unshift(widget); + columns[columnIndex] = column; + deckStore.set("columns", columns); + saveDeck(); } export function removeColumnWidget(id: Column["id"], widget: ColumnWidget) { - const columns = deepClone(deckStore.state.columns); - const columnIndex = deckStore.state.columns.findIndex((c) => c.id === id); - const column = deepClone(deckStore.state.columns[columnIndex]); - if (column == null) return; - column.widgets = column.widgets.filter((w) => w.id !== widget.id); - columns[columnIndex] = column; - deckStore.set("columns", columns); - saveDeck(); + const columns = deepClone(deckStore.state.columns); + const columnIndex = deckStore.state.columns.findIndex((c) => c.id === id); + const column = deepClone(deckStore.state.columns[columnIndex]); + if (column == null) return; + column.widgets = column.widgets.filter((w) => w.id !== widget.id); + columns[columnIndex] = column; + deckStore.set("columns", columns); + saveDeck(); } export function setColumnWidgets(id: Column["id"], widgets: ColumnWidget[]) { - const columns = deepClone(deckStore.state.columns); - const columnIndex = deckStore.state.columns.findIndex((c) => c.id === id); - const column = deepClone(deckStore.state.columns[columnIndex]); - if (column == null) return; - column.widgets = widgets; - columns[columnIndex] = column; - deckStore.set("columns", columns); - saveDeck(); + const columns = deepClone(deckStore.state.columns); + const columnIndex = deckStore.state.columns.findIndex((c) => c.id === id); + const column = deepClone(deckStore.state.columns[columnIndex]); + if (column == null) return; + column.widgets = widgets; + columns[columnIndex] = column; + deckStore.set("columns", columns); + saveDeck(); } export function updateColumnWidget( - id: Column["id"], - widgetId: string, - widgetData: any, + id: Column["id"], + widgetId: string, + widgetData: any ) { - const columns = deepClone(deckStore.state.columns); - const columnIndex = deckStore.state.columns.findIndex((c) => c.id === id); - const column = deepClone(deckStore.state.columns[columnIndex]); - if (column == null) return; - column.widgets = column.widgets.map((w) => - w.id === widgetId - ? { - ...w, - data: widgetData, - } - : w, - ); - columns[columnIndex] = column; - deckStore.set("columns", columns); - saveDeck(); + const columns = deepClone(deckStore.state.columns); + const columnIndex = deckStore.state.columns.findIndex((c) => c.id === id); + const column = deepClone(deckStore.state.columns[columnIndex]); + if (column == null) return; + column.widgets = column.widgets.map((w) => + w.id === widgetId + ? { + ...w, + data: widgetData, + } + : w + ); + columns[columnIndex] = column; + deckStore.set("columns", columns); + saveDeck(); } export function updateColumn(id: Column["id"], column: Partial) { - const columns = deepClone(deckStore.state.columns); - const columnIndex = deckStore.state.columns.findIndex((c) => c.id === id); - const currentColumn = deepClone(deckStore.state.columns[columnIndex]); - if (currentColumn == null) return; - for (const [k, v] of Object.entries(column)) { - currentColumn[k] = v; - } - columns[columnIndex] = currentColumn; - deckStore.set("columns", columns); - saveDeck(); + const columns = deepClone(deckStore.state.columns); + const columnIndex = deckStore.state.columns.findIndex((c) => c.id === id); + const currentColumn = deepClone(deckStore.state.columns[columnIndex]); + if (currentColumn == null) return; + for (const [k, v] of Object.entries(column)) { + currentColumn[k] = v; + } + columns[columnIndex] = currentColumn; + deckStore.set("columns", columns); + saveDeck(); } diff --git a/fe_calckey/frontend/client/src/ui/deck/direct-column.vue b/fe_calckey/frontend/client/src/ui/deck/direct-column.vue index 67ebca1..fdbf219 100644 --- a/fe_calckey/frontend/client/src/ui/deck/direct-column.vue +++ b/fe_calckey/frontend/client/src/ui/deck/direct-column.vue @@ -1,19 +1,19 @@ diff --git a/fe_calckey/frontend/client/src/ui/deck/list-column.vue b/fe_calckey/frontend/client/src/ui/deck/list-column.vue index 82bf58f..dfeeb89 100644 --- a/fe_calckey/frontend/client/src/ui/deck/list-column.vue +++ b/fe_calckey/frontend/client/src/ui/deck/list-column.vue @@ -1,23 +1,23 @@ diff --git a/fe_calckey/frontend/client/src/ui/deck/main-column.vue b/fe_calckey/frontend/client/src/ui/deck/main-column.vue index 357395a..6f9da9f 100644 --- a/fe_calckey/frontend/client/src/ui/deck/main-column.vue +++ b/fe_calckey/frontend/client/src/ui/deck/main-column.vue @@ -1,22 +1,22 @@ diff --git a/fe_calckey/frontend/client/src/ui/deck/mentions-column.vue b/fe_calckey/frontend/client/src/ui/deck/mentions-column.vue index 83eff72..d5c3850 100644 --- a/fe_calckey/frontend/client/src/ui/deck/mentions-column.vue +++ b/fe_calckey/frontend/client/src/ui/deck/mentions-column.vue @@ -1,16 +1,16 @@ diff --git a/fe_calckey/frontend/client/src/ui/deck/notifications-column.vue b/fe_calckey/frontend/client/src/ui/deck/notifications-column.vue index d003f08..58699a4 100644 --- a/fe_calckey/frontend/client/src/ui/deck/notifications-column.vue +++ b/fe_calckey/frontend/client/src/ui/deck/notifications-column.vue @@ -1,17 +1,17 @@ diff --git a/fe_calckey/frontend/client/src/ui/deck/tl-column.vue b/fe_calckey/frontend/client/src/ui/deck/tl-column.vue index 7e801dc..a0f1914 100644 --- a/fe_calckey/frontend/client/src/ui/deck/tl-column.vue +++ b/fe_calckey/frontend/client/src/ui/deck/tl-column.vue @@ -1,46 +1,46 @@ diff --git a/fe_calckey/frontend/client/src/ui/deck/widgets-column.vue b/fe_calckey/frontend/client/src/ui/deck/widgets-column.vue index 8bfd40c..5425f7c 100644 --- a/fe_calckey/frontend/client/src/ui/deck/widgets-column.vue +++ b/fe_calckey/frontend/client/src/ui/deck/widgets-column.vue @@ -1,99 +1,99 @@ diff --git a/fe_calckey/frontend/client/src/ui/universal.vue b/fe_calckey/frontend/client/src/ui/universal.vue index 0a7f4e6..11eebe0 100644 --- a/fe_calckey/frontend/client/src/ui/universal.vue +++ b/fe_calckey/frontend/client/src/ui/universal.vue @@ -1,141 +1,138 @@ diff --git a/fe_calckey/frontend/client/src/ui/visitor.vue b/fe_calckey/frontend/client/src/ui/visitor.vue index a008134..ab732a4 100644 --- a/fe_calckey/frontend/client/src/ui/visitor.vue +++ b/fe_calckey/frontend/client/src/ui/visitor.vue @@ -1,6 +1,6 @@ diff --git a/fe_calckey/frontend/client/src/ui/visitor/a.vue b/fe_calckey/frontend/client/src/ui/visitor/a.vue index 159c0e1..423cea6 100644 --- a/fe_calckey/frontend/client/src/ui/visitor/a.vue +++ b/fe_calckey/frontend/client/src/ui/visitor/a.vue @@ -1,76 +1,76 @@ diff --git a/fe_calckey/frontend/client/src/ui/visitor/b.vue b/fe_calckey/frontend/client/src/ui/visitor/b.vue index 28ccd89..9022a31 100644 --- a/fe_calckey/frontend/client/src/ui/visitor/b.vue +++ b/fe_calckey/frontend/client/src/ui/visitor/b.vue @@ -1,69 +1,69 @@ diff --git a/fe_calckey/frontend/client/src/ui/visitor/header.vue b/fe_calckey/frontend/client/src/ui/visitor/header.vue index e3b3923..87eb660 100644 --- a/fe_calckey/frontend/client/src/ui/visitor/header.vue +++ b/fe_calckey/frontend/client/src/ui/visitor/header.vue @@ -1,12 +1,12 @@ diff --git a/fe_calckey/frontend/client/src/ui/visitor/kanban.vue b/fe_calckey/frontend/client/src/ui/visitor/kanban.vue index 1e25d08..5bb3438 100644 --- a/fe_calckey/frontend/client/src/ui/visitor/kanban.vue +++ b/fe_calckey/frontend/client/src/ui/visitor/kanban.vue @@ -1,83 +1,83 @@ diff --git a/fe_calckey/frontend/client/src/ui/zen.vue b/fe_calckey/frontend/client/src/ui/zen.vue index cb2354a..89ad6c8 100644 --- a/fe_calckey/frontend/client/src/ui/zen.vue +++ b/fe_calckey/frontend/client/src/ui/zen.vue @@ -1,9 +1,9 @@ diff --git a/fe_calckey/frontend/client/src/widgets/activity.chart.vue b/fe_calckey/frontend/client/src/widgets/activity.chart.vue index d854ec7..c5a6d46 100644 --- a/fe_calckey/frontend/client/src/widgets/activity.chart.vue +++ b/fe_calckey/frontend/client/src/widgets/activity.chart.vue @@ -1,39 +1,39 @@ diff --git a/fe_calckey/frontend/client/src/widgets/activity.vue b/fe_calckey/frontend/client/src/widgets/activity.vue index 66826f5..7ef0056 100644 --- a/fe_calckey/frontend/client/src/widgets/activity.vue +++ b/fe_calckey/frontend/client/src/widgets/activity.vue @@ -1,49 +1,49 @@ diff --git a/fe_calckey/frontend/client/src/widgets/aiscript.vue b/fe_calckey/frontend/client/src/widgets/aiscript.vue index 78a30a1..a5f4d90 100644 --- a/fe_calckey/frontend/client/src/widgets/aiscript.vue +++ b/fe_calckey/frontend/client/src/widgets/aiscript.vue @@ -1,39 +1,39 @@ diff --git a/fe_calckey/frontend/client/src/widgets/button.vue b/fe_calckey/frontend/client/src/widgets/button.vue index 9e524f2..9a95245 100644 --- a/fe_calckey/frontend/client/src/widgets/button.vue +++ b/fe_calckey/frontend/client/src/widgets/button.vue @@ -1,20 +1,20 @@ diff --git a/fe_calckey/frontend/client/src/widgets/calendar.vue b/fe_calckey/frontend/client/src/widgets/calendar.vue index 655308d..84af395 100644 --- a/fe_calckey/frontend/client/src/widgets/calendar.vue +++ b/fe_calckey/frontend/client/src/widgets/calendar.vue @@ -1,56 +1,56 @@ diff --git a/fe_calckey/frontend/client/src/widgets/clock.vue b/fe_calckey/frontend/client/src/widgets/clock.vue index 60b90a4..3eebd08 100644 --- a/fe_calckey/frontend/client/src/widgets/clock.vue +++ b/fe_calckey/frontend/client/src/widgets/clock.vue @@ -1,58 +1,58 @@ diff --git a/fe_calckey/frontend/client/src/widgets/digital-clock.vue b/fe_calckey/frontend/client/src/widgets/digital-clock.vue index d0b6b4f..d218f5f 100644 --- a/fe_calckey/frontend/client/src/widgets/digital-clock.vue +++ b/fe_calckey/frontend/client/src/widgets/digital-clock.vue @@ -1,27 +1,27 @@ diff --git a/fe_calckey/frontend/client/src/widgets/federation.vue b/fe_calckey/frontend/client/src/widgets/federation.vue index 51c0e0d..d36820f 100644 --- a/fe_calckey/frontend/client/src/widgets/federation.vue +++ b/fe_calckey/frontend/client/src/widgets/federation.vue @@ -1,60 +1,60 @@ diff --git a/fe_calckey/frontend/client/src/widgets/index.ts b/fe_calckey/frontend/client/src/widgets/index.ts index 4c48811..60157d9 100644 --- a/fe_calckey/frontend/client/src/widgets/index.ts +++ b/fe_calckey/frontend/client/src/widgets/index.ts @@ -1,122 +1,122 @@ import { App, defineAsyncComponent } from "vue"; export default function (app: App) { - app.component( - "MkwMemo", - defineAsyncComponent(() => import("./memo.vue")), - ); - app.component( - "MkwNotifications", - defineAsyncComponent(() => import("./notifications.vue")), - ); - app.component( - "MkwTimeline", - defineAsyncComponent(() => import("./timeline.vue")), - ); - app.component( - "MkwCalendar", - defineAsyncComponent(() => import("./calendar.vue")), - ); - app.component( - "MkwRss", - defineAsyncComponent(() => import("./rss.vue")), - ); - app.component( - "MkwRssTicker", - defineAsyncComponent(() => import("./rss-ticker.vue")), - ); - app.component( - "MkwTrends", - defineAsyncComponent(() => import("./trends.vue")), - ); - app.component( - "MkwClock", - defineAsyncComponent(() => import("./clock.vue")), - ); - app.component( - "MkwActivity", - defineAsyncComponent(() => import("./activity.vue")), - ); - app.component( - "MkwPhotos", - defineAsyncComponent(() => import("./photos.vue")), - ); - app.component( - "MkwDigitalClock", - defineAsyncComponent(() => import("./digital-clock.vue")), - ); - app.component( - "MkwUnixClock", - defineAsyncComponent(() => import("./unix-clock.vue")), - ); - app.component( - "MkwFederation", - defineAsyncComponent(() => import("./federation.vue")), - ); - app.component( - "MkwPostForm", - defineAsyncComponent(() => import("./post-form.vue")), - ); - app.component( - "MkwSlideshow", - defineAsyncComponent(() => import("./slideshow.vue")), - ); - app.component( - "MkwServerMetric", - defineAsyncComponent(() => import("./server-metric/index.vue")), - ); - app.component( - "MkwOnlineUsers", - defineAsyncComponent(() => import("./online-users.vue")), - ); - app.component( - "MkwJobQueue", - defineAsyncComponent(() => import("./job-queue.vue")), - ); - app.component( - "MkwInstanceCloud", - defineAsyncComponent(() => import("./instance-cloud.vue")), - ); - app.component( - "MkwButton", - defineAsyncComponent(() => import("./button.vue")), - ); - app.component( - "MkwAiscript", - defineAsyncComponent(() => import("./aiscript.vue")), - ); - app.component( - "MkwUserList", - defineAsyncComponent(() => import("./user-list.vue")), - ); - app.component( - "MkwServerInfo", - defineAsyncComponent(() => import("./server-info.vue")), - ); + app.component( + "MkwMemo", + defineAsyncComponent(() => import("./memo.vue")) + ); + app.component( + "MkwNotifications", + defineAsyncComponent(() => import("./notifications.vue")) + ); + app.component( + "MkwTimeline", + defineAsyncComponent(() => import("./timeline.vue")) + ); + app.component( + "MkwCalendar", + defineAsyncComponent(() => import("./calendar.vue")) + ); + app.component( + "MkwRss", + defineAsyncComponent(() => import("./rss.vue")) + ); + app.component( + "MkwRssTicker", + defineAsyncComponent(() => import("./rss-ticker.vue")) + ); + app.component( + "MkwTrends", + defineAsyncComponent(() => import("./trends.vue")) + ); + app.component( + "MkwClock", + defineAsyncComponent(() => import("./clock.vue")) + ); + app.component( + "MkwActivity", + defineAsyncComponent(() => import("./activity.vue")) + ); + app.component( + "MkwPhotos", + defineAsyncComponent(() => import("./photos.vue")) + ); + app.component( + "MkwDigitalClock", + defineAsyncComponent(() => import("./digital-clock.vue")) + ); + app.component( + "MkwUnixClock", + defineAsyncComponent(() => import("./unix-clock.vue")) + ); + app.component( + "MkwFederation", + defineAsyncComponent(() => import("./federation.vue")) + ); + app.component( + "MkwPostForm", + defineAsyncComponent(() => import("./post-form.vue")) + ); + app.component( + "MkwSlideshow", + defineAsyncComponent(() => import("./slideshow.vue")) + ); + app.component( + "MkwServerMetric", + defineAsyncComponent(() => import("./server-metric/index.vue")) + ); + app.component( + "MkwOnlineUsers", + defineAsyncComponent(() => import("./online-users.vue")) + ); + app.component( + "MkwJobQueue", + defineAsyncComponent(() => import("./job-queue.vue")) + ); + app.component( + "MkwInstanceCloud", + defineAsyncComponent(() => import("./instance-cloud.vue")) + ); + app.component( + "MkwButton", + defineAsyncComponent(() => import("./button.vue")) + ); + app.component( + "MkwAiscript", + defineAsyncComponent(() => import("./aiscript.vue")) + ); + app.component( + "MkwUserList", + defineAsyncComponent(() => import("./user-list.vue")) + ); + app.component( + "MkwServerInfo", + defineAsyncComponent(() => import("./server-info.vue")) + ); } export const widgets = [ - "memo", - "notifications", - "timeline", - "calendar", - "userList", - "rss", - "rssTicker", - "trends", - "clock", - "activity", - "photos", - "digitalClock", - "unixClock", - "federation", - "instanceCloud", - "postForm", - "slideshow", - "serverMetric", - "serverInfo", - "onlineUsers", - "jobQueue", - "button", - "aiscript", + "memo", + "notifications", + "timeline", + "calendar", + "userList", + "rss", + "rssTicker", + "trends", + "clock", + "activity", + "photos", + "digitalClock", + "unixClock", + "federation", + "instanceCloud", + "postForm", + "slideshow", + "serverMetric", + "serverInfo", + "onlineUsers", + "jobQueue", + "button", + "aiscript", ]; diff --git a/fe_calckey/frontend/client/src/widgets/instance-cloud.vue b/fe_calckey/frontend/client/src/widgets/instance-cloud.vue index b9d4a08..e8c428e 100644 --- a/fe_calckey/frontend/client/src/widgets/instance-cloud.vue +++ b/fe_calckey/frontend/client/src/widgets/instance-cloud.vue @@ -1,30 +1,30 @@ diff --git a/fe_calckey/frontend/client/src/widgets/job-queue.vue b/fe_calckey/frontend/client/src/widgets/job-queue.vue index 1757bd6..c88e094 100644 --- a/fe_calckey/frontend/client/src/widgets/job-queue.vue +++ b/fe_calckey/frontend/client/src/widgets/job-queue.vue @@ -1,135 +1,135 @@ diff --git a/fe_calckey/frontend/client/src/widgets/memo.vue b/fe_calckey/frontend/client/src/widgets/memo.vue index 06f2e1b..84dc518 100644 --- a/fe_calckey/frontend/client/src/widgets/memo.vue +++ b/fe_calckey/frontend/client/src/widgets/memo.vue @@ -1,35 +1,35 @@ diff --git a/fe_calckey/frontend/client/src/widgets/notifications.vue b/fe_calckey/frontend/client/src/widgets/notifications.vue index 48fb927..72dd0ce 100644 --- a/fe_calckey/frontend/client/src/widgets/notifications.vue +++ b/fe_calckey/frontend/client/src/widgets/notifications.vue @@ -1,37 +1,37 @@ diff --git a/fe_calckey/frontend/client/src/widgets/online-users.vue b/fe_calckey/frontend/client/src/widgets/online-users.vue index 5ec197b..e98e073 100644 --- a/fe_calckey/frontend/client/src/widgets/online-users.vue +++ b/fe_calckey/frontend/client/src/widgets/online-users.vue @@ -1,32 +1,32 @@ diff --git a/fe_calckey/frontend/client/src/widgets/photos.vue b/fe_calckey/frontend/client/src/widgets/photos.vue index f8f7942..3a0a4ce 100644 --- a/fe_calckey/frontend/client/src/widgets/photos.vue +++ b/fe_calckey/frontend/client/src/widgets/photos.vue @@ -1,38 +1,38 @@ diff --git a/fe_calckey/frontend/client/src/widgets/post-form.vue b/fe_calckey/frontend/client/src/widgets/post-form.vue index 4ece4a5..4e79d45 100644 --- a/fe_calckey/frontend/client/src/widgets/post-form.vue +++ b/fe_calckey/frontend/client/src/widgets/post-form.vue @@ -1,21 +1,21 @@ diff --git a/fe_calckey/frontend/client/src/widgets/rss-ticker.vue b/fe_calckey/frontend/client/src/widgets/rss-ticker.vue index 0126f21..333bf6e 100644 --- a/fe_calckey/frontend/client/src/widgets/rss-ticker.vue +++ b/fe_calckey/frontend/client/src/widgets/rss-ticker.vue @@ -1,49 +1,49 @@ diff --git a/fe_calckey/frontend/client/src/widgets/rss.vue b/fe_calckey/frontend/client/src/widgets/rss.vue index 370ec20..c382bd3 100644 --- a/fe_calckey/frontend/client/src/widgets/rss.vue +++ b/fe_calckey/frontend/client/src/widgets/rss.vue @@ -1,36 +1,36 @@ diff --git a/fe_calckey/frontend/client/src/widgets/server-info.vue b/fe_calckey/frontend/client/src/widgets/server-info.vue index a608c26..ea71470 100644 --- a/fe_calckey/frontend/client/src/widgets/server-info.vue +++ b/fe_calckey/frontend/client/src/widgets/server-info.vue @@ -1,41 +1,41 @@ diff --git a/fe_calckey/frontend/client/src/widgets/server-metric/cpu-mem.vue b/fe_calckey/frontend/client/src/widgets/server-metric/cpu-mem.vue index ec2101b..68e4302 100644 --- a/fe_calckey/frontend/client/src/widgets/server-metric/cpu-mem.vue +++ b/fe_calckey/frontend/client/src/widgets/server-metric/cpu-mem.vue @@ -1,84 +1,84 @@ diff --git a/fe_calckey/frontend/client/src/widgets/server-metric/cpu.vue b/fe_calckey/frontend/client/src/widgets/server-metric/cpu.vue index 563fe3b..83e8c4c 100644 --- a/fe_calckey/frontend/client/src/widgets/server-metric/cpu.vue +++ b/fe_calckey/frontend/client/src/widgets/server-metric/cpu.vue @@ -1,12 +1,12 @@ diff --git a/fe_calckey/frontend/client/src/widgets/server-metric/disk.vue b/fe_calckey/frontend/client/src/widgets/server-metric/disk.vue index 67ea398..873582e 100644 --- a/fe_calckey/frontend/client/src/widgets/server-metric/disk.vue +++ b/fe_calckey/frontend/client/src/widgets/server-metric/disk.vue @@ -1,13 +1,13 @@ diff --git a/fe_calckey/frontend/client/src/widgets/server-metric/meilisearch.vue b/fe_calckey/frontend/client/src/widgets/server-metric/meilisearch.vue index f7c7bd5..7899d9a 100644 --- a/fe_calckey/frontend/client/src/widgets/server-metric/meilisearch.vue +++ b/fe_calckey/frontend/client/src/widgets/server-metric/meilisearch.vue @@ -1,19 +1,19 @@ diff --git a/fe_calckey/frontend/client/src/widgets/server-metric/mem.vue b/fe_calckey/frontend/client/src/widgets/server-metric/mem.vue index 80cad4a..805c5ff 100644 --- a/fe_calckey/frontend/client/src/widgets/server-metric/mem.vue +++ b/fe_calckey/frontend/client/src/widgets/server-metric/mem.vue @@ -1,13 +1,13 @@ diff --git a/fe_calckey/frontend/client/src/widgets/server-metric/net.vue b/fe_calckey/frontend/client/src/widgets/server-metric/net.vue index 9885d7a..6d5dc8a 100644 --- a/fe_calckey/frontend/client/src/widgets/server-metric/net.vue +++ b/fe_calckey/frontend/client/src/widgets/server-metric/net.vue @@ -1,42 +1,42 @@ diff --git a/fe_calckey/frontend/client/src/widgets/server-metric/pie.vue b/fe_calckey/frontend/client/src/widgets/server-metric/pie.vue index 317fdcf..ebcc6e5 100644 --- a/fe_calckey/frontend/client/src/widgets/server-metric/pie.vue +++ b/fe_calckey/frontend/client/src/widgets/server-metric/pie.vue @@ -1,64 +1,64 @@ diff --git a/fe_calckey/frontend/client/src/widgets/slideshow.vue b/fe_calckey/frontend/client/src/widgets/slideshow.vue index fa0c1c9..1d777f9 100644 --- a/fe_calckey/frontend/client/src/widgets/slideshow.vue +++ b/fe_calckey/frontend/client/src/widgets/slideshow.vue @@ -1,35 +1,35 @@ diff --git a/fe_calckey/frontend/client/src/widgets/timeline.vue b/fe_calckey/frontend/client/src/widgets/timeline.vue index 6ae74b8..350f6a7 100644 --- a/fe_calckey/frontend/client/src/widgets/timeline.vue +++ b/fe_calckey/frontend/client/src/widgets/timeline.vue @@ -1,80 +1,80 @@ diff --git a/fe_calckey/frontend/client/src/widgets/trends.vue b/fe_calckey/frontend/client/src/widgets/trends.vue index 6bf5c0b..5c5b455 100644 --- a/fe_calckey/frontend/client/src/widgets/trends.vue +++ b/fe_calckey/frontend/client/src/widgets/trends.vue @@ -1,49 +1,49 @@ diff --git a/fe_calckey/frontend/client/src/widgets/unix-clock.vue b/fe_calckey/frontend/client/src/widgets/unix-clock.vue index 190bcd0..a928c8f 100644 --- a/fe_calckey/frontend/client/src/widgets/unix-clock.vue +++ b/fe_calckey/frontend/client/src/widgets/unix-clock.vue @@ -1,52 +1,52 @@ diff --git a/fe_calckey/frontend/client/src/widgets/user-list.vue b/fe_calckey/frontend/client/src/widgets/user-list.vue index 515c58c..ab37471 100644 --- a/fe_calckey/frontend/client/src/widgets/user-list.vue +++ b/fe_calckey/frontend/client/src/widgets/user-list.vue @@ -1,30 +1,30 @@ diff --git a/fe_calckey/frontend/client/src/widgets/widget.ts b/fe_calckey/frontend/client/src/widgets/widget.ts index 1afc296..9db8010 100644 --- a/fe_calckey/frontend/client/src/widgets/widget.ts +++ b/fe_calckey/frontend/client/src/widgets/widget.ts @@ -5,77 +5,77 @@ import * as os from "@/os"; import { deepClone } from "@/scripts/clone"; export type Widget

> = { - id: string; - data: Partial

; + id: string; + data: Partial

; }; export type WidgetComponentProps

> = { - widget?: Widget

; + widget?: Widget

; }; export type WidgetComponentEmits

> = { - (ev: "updateProps", props: P); + (ev: "updateProps", props: P); }; export type WidgetComponentExpose = { - name: string; - id: string | null; - configure: () => void; + name: string; + id: string | null; + configure: () => void; }; export const useWidgetPropsManager = < - F extends Form & Record, + F extends Form & Record >( - name: string, - propsDef: F, - props: Readonly>>, - emit: WidgetComponentEmits>, + name: string, + propsDef: F, + props: Readonly>>, + emit: WidgetComponentEmits> ): { - widgetProps: GetFormResultType; - save: () => void; - configure: () => void; + widgetProps: GetFormResultType; + save: () => void; + configure: () => void; } => { - const widgetProps = reactive( - props.widget ? deepClone(props.widget.data) : {}, - ); + const widgetProps = reactive( + props.widget ? deepClone(props.widget.data) : {} + ); - const mergeProps = () => { - for (const prop of Object.keys(propsDef)) { - if (typeof widgetProps[prop] === "undefined") { - widgetProps[prop] = propsDef[prop].default; - } - } - }; - watch( - widgetProps, - () => { - mergeProps(); - }, - { deep: true, immediate: true }, - ); + const mergeProps = () => { + for (const prop of Object.keys(propsDef)) { + if (typeof widgetProps[prop] === "undefined") { + widgetProps[prop] = propsDef[prop].default; + } + } + }; + watch( + widgetProps, + () => { + mergeProps(); + }, + { deep: true, immediate: true } + ); - const save = throttle(3000, () => { - emit("updateProps", widgetProps); - }); + const save = throttle(3000, () => { + emit("updateProps", widgetProps); + }); - const configure = async () => { - const form = deepClone(propsDef); - for (const item of Object.keys(form)) { - form[item].default = widgetProps[item]; - } - const { canceled, result } = await os.form(name, form); - if (canceled) return; + const configure = async () => { + const form = deepClone(propsDef); + for (const item of Object.keys(form)) { + form[item].default = widgetProps[item]; + } + const { canceled, result } = await os.form(name, form); + if (canceled) return; - for (const key of Object.keys(result)) { - widgetProps[key] = result[key]; - } + for (const key of Object.keys(result)) { + widgetProps[key] = result[key]; + } - save(); - }; + save(); + }; - return { - widgetProps, - save, - configure, - }; + return { + widgetProps, + save, + configure, + }; };