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

View File

@@ -0,0 +1,8 @@
import { StreamingReader } from '@jsonjoy.com/buffers/lib/StreamingReader';
import { Reader } from '@jsonjoy.com/buffers/lib/Reader';
export declare class RmRecordDecoder {
readonly reader: StreamingReader;
protected fragments: Uint8Array[];
push(uint8: Uint8Array): void;
readRecord(): Reader | undefined;
}

View File

@@ -0,0 +1,57 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.RmRecordDecoder = void 0;
const StreamingReader_1 = require("@jsonjoy.com/buffers/lib/StreamingReader");
const Reader_1 = require("@jsonjoy.com/buffers/lib/Reader");
const concat_1 = require("@jsonjoy.com/buffers/lib/concat");
class RmRecordDecoder {
constructor() {
this.reader = new StreamingReader_1.StreamingReader();
this.fragments = [];
}
push(uint8) {
this.reader.push(uint8);
}
readRecord() {
const reader = this.reader;
let size = reader.size();
if (size < 4)
return undefined;
const x = reader.x;
READ_FRAGMENT: {
try {
const header = reader.u32();
size -= 4;
const fin = !!(header & 2147483648);
const len = header & 2147483647;
if (size < len)
break READ_FRAGMENT;
reader.consume();
const fragments = this.fragments;
if (fin) {
if (!fragments.length)
return reader.cut(len);
fragments.push(reader.buf(len));
const record = (0, concat_1.concatList)(fragments);
this.fragments = [];
return record.length ? new Reader_1.Reader(record) : undefined;
}
else {
fragments.push(reader.buf(len));
return undefined;
}
}
catch (err) {
reader.x = x;
if (err instanceof RangeError)
return undefined;
else
throw err;
}
}
reader.x = x;
return undefined;
}
}
exports.RmRecordDecoder = RmRecordDecoder;
//# sourceMappingURL=RmRecordDecoder.js.map

View File

@@ -0,0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oBACrC,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC;oBACpB,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,eAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;gBACxD,CAAC;qBAAM,CAAC;oBACN,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;oBAChC,OAAO,SAAS,CAAC;gBACnB,CAAC;YACH,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBACb,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC;gBACb,IAAI,GAAG,YAAY,UAAU;oBAAE,OAAO,SAAS,CAAC;;oBAC3C,MAAM,GAAG,CAAC;YACjB,CAAC;QACH,CAAC;QACD,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC;QACb,OAAO,SAAS,CAAC;IACnB,CAAC;CACF;AAzCD,0CAyCC"}

View File

@@ -0,0 +1,12 @@
import type { IWriter, IWriterGrowable } from '@jsonjoy.com/util/lib/buffers';
export declare class RmRecordEncoder<W extends IWriter & IWriterGrowable = IWriter & IWriterGrowable> {
readonly writer: W;
constructor(writer?: W);
encodeHdr(fin: 0 | 1, length: number): Uint8Array;
encodeRecord(record: Uint8Array): Uint8Array;
writeHdr(fin: 0 | 1, length: number): void;
writeRecord(record: Uint8Array): void;
writeFragment(record: Uint8Array, offset: number, length: number, fin: 0 | 1): void;
startRecord(): number;
endRecord(rmHeaderPosition: number): void;
}

View File

@@ -0,0 +1,68 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.RmRecordEncoder = void 0;
const Writer_1 = require("@jsonjoy.com/util/lib/buffers/Writer");
const RM_HEADER_SIZE = 4;
const MAX_SINGLE_FRAME_SIZE = 0x7fffffff;
class RmRecordEncoder {
constructor(writer = new Writer_1.Writer()) {
this.writer = writer;
}
encodeHdr(fin, length) {
this.writeHdr(fin, length);
return this.writer.flush();
}
encodeRecord(record) {
this.writeRecord(record);
return this.writer.flush();
}
writeHdr(fin, length) {
this.writer.u32((fin ? 2147483648 : 0) + length);
}
writeRecord(record) {
const length = record.length;
if (length <= 2147483647) {
const writer = this.writer;
writer.u32(2147483648 + length);
writer.buf(record, length);
return;
}
let offset = 0;
while (offset < length) {
const fragmentLength = Math.min(length - offset, 0x7fffffff);
const fin = fragmentLength + offset >= length ? 1 : 0;
this.writeFragment(record, offset, fragmentLength, fin);
offset += fragmentLength;
}
}
writeFragment(record, offset, length, fin) {
this.writeHdr(fin, length);
const fragment = record.subarray(offset, offset + length);
this.writer.buf(fragment, length);
}
startRecord() {
const writer = this.writer;
const rmHeaderPosition = writer.x;
writer.x += RM_HEADER_SIZE;
return rmHeaderPosition;
}
endRecord(rmHeaderPosition) {
const writer = this.writer;
const totalSize = writer.x - rmHeaderPosition - RM_HEADER_SIZE;
if (totalSize <= MAX_SINGLE_FRAME_SIZE) {
const currentX = writer.x;
writer.x = rmHeaderPosition;
this.writeHdr(1, totalSize);
writer.x = currentX;
}
else {
const currentX = writer.x;
writer.x = rmHeaderPosition;
const data = writer.uint8.subarray(rmHeaderPosition + RM_HEADER_SIZE, currentX);
writer.reset();
this.writeRecord(data);
}
}
}
exports.RmRecordEncoder = RmRecordEncoder;
//# sourceMappingURL=RmRecordEncoder.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"RmRecordEncoder.js","sourceRoot":"","sources":["../../src/rm/RmRecordEncoder.ts"],"names":[],"mappings":";;;AAAA,iEAA4D;AAG5D,MAAM,cAAc,GAAG,CAAC,CAAC;AACzB,MAAM,qBAAqB,GAAG,UAAU,CAAC;AAEzC,MAAa,eAAe;IAC1B,YAA4B,SAAY,IAAI,eAAM,EAAS;QAA/B,WAAM,GAAN,MAAM,CAAyB;IAAG,CAAC;IAExD,SAAS,CAAC,GAAU,EAAE,MAAc;QACzC,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;QAC3B,OAAO,IAAI,CAAC,MAAM,CAAC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,MAAM,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;QAC1D,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IACpC,CAAC;IAOM,WAAW;QAChB,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;QAC3B,MAAM,gBAAgB,GAAG,MAAM,CAAC,CAAC,CAAC;QAClC,MAAM,CAAC,CAAC,IAAI,cAAc,CAAC;QAC3B,OAAO,gBAAgB,CAAC;IAC1B,CAAC;IAWM,SAAS,CAAC,gBAAwB;QACvC,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;QAC3B,MAAM,SAAS,GAAG,MAAM,CAAC,CAAC,GAAG,gBAAgB,GAAG,cAAc,CAAC;QAC/D,IAAI,SAAS,IAAI,qBAAqB,EAAE,CAAC;YACvC,MAAM,QAAQ,GAAG,MAAM,CAAC,CAAC,CAAC;YAC1B,MAAM,CAAC,CAAC,GAAG,gBAAgB,CAAC;YAC5B,IAAI,CAAC,QAAQ,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC;YAC5B,MAAM,CAAC,CAAC,GAAG,QAAQ,CAAC;QACtB,CAAC;aAAM,CAAC;YACN,MAAM,QAAQ,GAAG,MAAM,CAAC,CAAC,CAAC;YAC1B,MAAM,CAAC,CAAC,GAAG,gBAAgB,CAAC;YAC5B,MAAM,IAAI,GAAG,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,gBAAgB,GAAG,cAAc,EAAE,QAAQ,CAAC,CAAC;YAChF,MAAM,CAAC,KAAK,EAAE,CAAC;YACf,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QACzB,CAAC;IACH,CAAC;CACF;AA7ED,0CA6EC"}

View File

@@ -0,0 +1,2 @@
export * from './RmRecordDecoder';
export * from './RmRecordEncoder';

6
node_modules/@jsonjoy.com/json-pack/lib/rm/index.js generated vendored Normal file
View File

@@ -0,0 +1,6 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
tslib_1.__exportStar(require("./RmRecordDecoder"), exports);
tslib_1.__exportStar(require("./RmRecordEncoder"), exports);
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/rm/index.ts"],"names":[],"mappings":";;;AAAA,4DAAkC;AAClC,4DAAkC"}