Initial commit: notification-elements-demo app

Interactive Angular 19 demo for @sda/notification-elements-ui with
6 sections: Bell & Feed, Notification Center, Inbox, Comments &
Threads, Mention Input, and Full-Featured layout. Includes mock
data, dark mode toggle, and real-time event log.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Giuliano Silvestro
2026-02-13 21:49:19 +10:00
commit 5d0c9ec7eb
36473 changed files with 3778146 additions and 0 deletions

22
node_modules/@inquirer/input/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,22 @@
Copyright (c) 2025 Simon Boudrias
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.

101
node_modules/@inquirer/input/README.md generated vendored Normal file
View File

@@ -0,0 +1,101 @@
# `@inquirer/input`
Interactive free text input component for command line interfaces. Supports validation, filtering, transformation, etc.
![Input prompt](https://cdn.rawgit.com/SBoudrias/Inquirer.js/28ae8337ba51d93e359ef4f7ee24e79b69898962/assets/screenshots/input.svg)
# Installation
<table>
<tr>
<th>npm</th>
<th>yarn</th>
</tr>
<tr>
<td>
```sh
npm install @inquirer/prompts
```
</td>
<td>
```sh
yarn add @inquirer/prompts
```
</td>
</tr>
<tr>
<td colSpan="2" align="center">Or</td>
</tr>
<tr>
<td>
```sh
npm install @inquirer/input
```
</td>
<td>
```sh
yarn add @inquirer/input
```
</td>
</tr>
</table>
# Usage
```js
import { input } from '@inquirer/prompts';
// Or
// import input from '@inquirer/input';
const answer = await input({ message: 'Enter your name' });
```
## Options
| Property | Type | Required | Description |
| ------------ | ----------------------------------------------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| message | `string` | yes | The question to ask |
| default | `string` | no | Default value if no answer is provided; see the prefill option below for governing it's behaviour. |
| prefill | `'tab' \| 'editable'` | no | Defaults to `'tab'`. If set to `'tab'`, pressing `backspace` will clear the default and pressing `tab` will inline the value for edits; If set to `'editable'`, the default value will already be inlined to edit. |
| required | `boolean` | no | Defaults to `false`. If set to true, `undefined` (empty) will not be accepted for this. |
| transformer | `(string, { isFinal: boolean }) => string` | no | Transform/Format the raw value entered by the user. Once the prompt is completed, `isFinal` will be `true`. This function is purely visual, modify the answer in your code if needed. |
| validate | `string => boolean \| string \| Promise<boolean \| string>` | no | On submit, validate the filtered answered content. When returning a string, it'll be used as the error message displayed to the user. Note: returning a rejected promise, we'll assume a code error happened and crash. |
| pattern | `RegExp` | no | Regular expression to validate the input against. If the input doesn't match the pattern, validation will fail with the error message specified in `patternError`. |
| patternError | `string` | no | Error message to display when the input doesn't match the `pattern`. Defaults to `'Invalid input'`. |
| theme | [See Theming](#Theming) | no | Customize look of the prompt. |
## Theming
You can theme a prompt by passing a `theme` object option. The theme object only need to includes the keys you wish to modify, we'll fallback on the defaults for the rest.
```ts
type Theme = {
prefix: string | { idle: string; done: string };
spinner: {
interval: number;
frames: string[];
};
style: {
answer: (text: string) => string;
message: (text: string, status: 'idle' | 'done' | 'loading') => string;
error: (text: string) => string;
defaultAnswer: (text: string) => string;
};
validationFailureMode: 'keep' | 'clear';
};
```
`validationFailureMode` defines the behavior of the prompt when the value submitted is invalid. By default, we'll keep the value allowing the user to edit it. When the theme option is set to `clear`, we'll remove and reset to an empty string.
# License
Copyright (c) 2023 Simon Boudrias (twitter: [@vaxilart](https://twitter.com/Vaxilart))<br/>
Licensed under the MIT license.

20
node_modules/@inquirer/input/dist/commonjs/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,20 @@
import { type Theme } from '@inquirer/core';
import type { PartialDeep } from '@inquirer/type';
type InputTheme = {
validationFailureMode: 'keep' | 'clear';
};
type InputConfig = {
message: string;
default?: string;
prefill?: 'tab' | 'editable';
required?: boolean;
transformer?: (value: string, { isFinal }: {
isFinal: boolean;
}) => string;
validate?: (value: string) => boolean | string | Promise<string | boolean>;
theme?: PartialDeep<Theme<InputTheme>>;
pattern?: RegExp;
patternError?: string;
};
declare const _default: import("@inquirer/type").Prompt<string, InputConfig>;
export default _default;

99
node_modules/@inquirer/input/dist/commonjs/index.js generated vendored Normal file
View File

@@ -0,0 +1,99 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const core_1 = require("@inquirer/core");
const inputTheme = {
validationFailureMode: 'keep',
};
exports.default = (0, core_1.createPrompt)((config, done) => {
const { prefill = 'tab' } = config;
const theme = (0, core_1.makeTheme)(inputTheme, config.theme);
const [status, setStatus] = (0, core_1.useState)('idle');
const [defaultValue = '', setDefaultValue] = (0, core_1.useState)(config.default);
const [errorMsg, setError] = (0, core_1.useState)();
const [value, setValue] = (0, core_1.useState)('');
const prefix = (0, core_1.usePrefix)({ status, theme });
async function validate(value) {
const { required, pattern, patternError = 'Invalid input' } = config;
if (required && !value) {
return 'You must provide a value';
}
if (pattern && !pattern.test(value)) {
return patternError;
}
if (typeof config.validate === 'function') {
return (await config.validate(value)) || 'You must provide a valid value';
}
return true;
}
(0, core_1.useKeypress)(async (key, rl) => {
// Ignore keypress while our prompt is doing other processing.
if (status !== 'idle') {
return;
}
if ((0, core_1.isEnterKey)(key)) {
const answer = value || defaultValue;
setStatus('loading');
const isValid = await validate(answer);
if (isValid === true) {
setValue(answer);
setStatus('done');
done(answer);
}
else {
if (theme.validationFailureMode === 'clear') {
setValue('');
}
else {
// Reset the readline line value to the previous value. On line event, the value
// get cleared, forcing the user to re-enter the value instead of fixing it.
rl.write(value);
}
setError(isValid);
setStatus('idle');
}
}
else if ((0, core_1.isBackspaceKey)(key) && !value) {
setDefaultValue(undefined);
}
else if ((0, core_1.isTabKey)(key) && !value) {
setDefaultValue(undefined);
rl.clearLine(0); // Remove the tab character.
rl.write(defaultValue);
setValue(defaultValue);
}
else {
setValue(rl.line);
setError(undefined);
}
});
// If prefill is set to 'editable' cut out the default value and paste into current state and the user's cli buffer
// They can edit the value immediately instead of needing to press 'tab'
(0, core_1.useEffect)((rl) => {
if (prefill === 'editable' && defaultValue) {
rl.write(defaultValue);
setValue(defaultValue);
}
}, []);
const message = theme.style.message(config.message, status);
let formattedValue = value;
if (typeof config.transformer === 'function') {
formattedValue = config.transformer(value, { isFinal: status === 'done' });
}
else if (status === 'done') {
formattedValue = theme.style.answer(value);
}
let defaultStr;
if (defaultValue && status !== 'done' && !value) {
defaultStr = theme.style.defaultAnswer(defaultValue);
}
let error = '';
if (errorMsg) {
error = theme.style.error(errorMsg);
}
return [
[prefix, message, defaultStr, formattedValue]
.filter((v) => v !== undefined)
.join(' '),
error,
];
});

View File

@@ -0,0 +1,3 @@
{
"type": "commonjs"
}

20
node_modules/@inquirer/input/dist/esm/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,20 @@
import { type Theme } from '@inquirer/core';
import type { PartialDeep } from '@inquirer/type';
type InputTheme = {
validationFailureMode: 'keep' | 'clear';
};
type InputConfig = {
message: string;
default?: string;
prefill?: 'tab' | 'editable';
required?: boolean;
transformer?: (value: string, { isFinal }: {
isFinal: boolean;
}) => string;
validate?: (value: string) => boolean | string | Promise<string | boolean>;
theme?: PartialDeep<Theme<InputTheme>>;
pattern?: RegExp;
patternError?: string;
};
declare const _default: import("@inquirer/type").Prompt<string, InputConfig>;
export default _default;

97
node_modules/@inquirer/input/dist/esm/index.js generated vendored Normal file
View File

@@ -0,0 +1,97 @@
import { createPrompt, useState, useKeypress, useEffect, usePrefix, isBackspaceKey, isEnterKey, isTabKey, makeTheme, } from '@inquirer/core';
const inputTheme = {
validationFailureMode: 'keep',
};
export default createPrompt((config, done) => {
const { prefill = 'tab' } = config;
const theme = makeTheme(inputTheme, config.theme);
const [status, setStatus] = useState('idle');
const [defaultValue = '', setDefaultValue] = useState(config.default);
const [errorMsg, setError] = useState();
const [value, setValue] = useState('');
const prefix = usePrefix({ status, theme });
async function validate(value) {
const { required, pattern, patternError = 'Invalid input' } = config;
if (required && !value) {
return 'You must provide a value';
}
if (pattern && !pattern.test(value)) {
return patternError;
}
if (typeof config.validate === 'function') {
return (await config.validate(value)) || 'You must provide a valid value';
}
return true;
}
useKeypress(async (key, rl) => {
// Ignore keypress while our prompt is doing other processing.
if (status !== 'idle') {
return;
}
if (isEnterKey(key)) {
const answer = value || defaultValue;
setStatus('loading');
const isValid = await validate(answer);
if (isValid === true) {
setValue(answer);
setStatus('done');
done(answer);
}
else {
if (theme.validationFailureMode === 'clear') {
setValue('');
}
else {
// Reset the readline line value to the previous value. On line event, the value
// get cleared, forcing the user to re-enter the value instead of fixing it.
rl.write(value);
}
setError(isValid);
setStatus('idle');
}
}
else if (isBackspaceKey(key) && !value) {
setDefaultValue(undefined);
}
else if (isTabKey(key) && !value) {
setDefaultValue(undefined);
rl.clearLine(0); // Remove the tab character.
rl.write(defaultValue);
setValue(defaultValue);
}
else {
setValue(rl.line);
setError(undefined);
}
});
// If prefill is set to 'editable' cut out the default value and paste into current state and the user's cli buffer
// They can edit the value immediately instead of needing to press 'tab'
useEffect((rl) => {
if (prefill === 'editable' && defaultValue) {
rl.write(defaultValue);
setValue(defaultValue);
}
}, []);
const message = theme.style.message(config.message, status);
let formattedValue = value;
if (typeof config.transformer === 'function') {
formattedValue = config.transformer(value, { isFinal: status === 'done' });
}
else if (status === 'done') {
formattedValue = theme.style.answer(value);
}
let defaultStr;
if (defaultValue && status !== 'done' && !value) {
defaultStr = theme.style.defaultAnswer(defaultValue);
}
let error = '';
if (errorMsg) {
error = theme.style.error(errorMsg);
}
return [
[prefix, message, defaultStr, formattedValue]
.filter((v) => v !== undefined)
.join(' '),
error,
];
});

3
node_modules/@inquirer/input/dist/esm/package.json generated vendored Normal file
View File

@@ -0,0 +1,3 @@
{
"type": "module"
}

110
node_modules/@inquirer/input/package.json generated vendored Normal file
View File

@@ -0,0 +1,110 @@
{
"name": "@inquirer/input",
"version": "4.3.1",
"description": "Inquirer input text prompt",
"keywords": [
"answer",
"answers",
"ask",
"base",
"cli",
"command",
"command-line",
"confirm",
"enquirer",
"generate",
"generator",
"hyper",
"input",
"inquire",
"inquirer",
"interface",
"iterm",
"javascript",
"menu",
"node",
"nodejs",
"prompt",
"promptly",
"prompts",
"question",
"readline",
"scaffold",
"scaffolder",
"scaffolding",
"stdin",
"stdout",
"terminal",
"tty",
"ui",
"yeoman",
"yo",
"zsh"
],
"homepage": "https://github.com/SBoudrias/Inquirer.js/blob/main/packages/input/README.md",
"repository": {
"type": "git",
"url": "https://github.com/SBoudrias/Inquirer.js.git"
},
"license": "MIT",
"author": "Simon Boudrias <admin@simonboudrias.com>",
"sideEffects": false,
"type": "module",
"exports": {
"./package.json": "./package.json",
".": {
"import": {
"types": "./dist/esm/index.d.ts",
"default": "./dist/esm/index.js"
},
"require": {
"types": "./dist/commonjs/index.d.ts",
"default": "./dist/commonjs/index.js"
}
}
},
"main": "./dist/commonjs/index.js",
"module": "./dist/esm/index.js",
"types": "./dist/commonjs/index.d.ts",
"files": [
"dist"
],
"scripts": {
"attw": "attw --pack",
"tsc": "tshy"
},
"dependencies": {
"@inquirer/core": "^10.3.2",
"@inquirer/type": "^3.0.10"
},
"devDependencies": {
"@arethetypeswrong/cli": "^0.18.2",
"@inquirer/testing": "^2.1.53",
"@repo/tsconfig": "0.0.0",
"tshy": "^3.0.3"
},
"engines": {
"node": ">=18"
},
"publishConfig": {
"access": "public"
},
"tshy": {
"exclude": [
"src/**/*.test.ts"
],
"exports": {
"./package.json": "./package.json",
".": "./src/index.ts"
}
},
"peerDependencies": {
"@types/node": ">=18"
},
"peerDependenciesMeta": {
"@types/node": {
"optional": true
}
},
"gitHead": "4731a373881368e2f701c41adc67bc83244bf89f"
}