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,3 @@
import type { JavaScript } from '@jsonjoy.com/codegen';
import type { Path } from '../types';
export declare const $$find: (path: Path) => JavaScript<(doc: unknown) => unknown>;

View File

@@ -0,0 +1,15 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.$$find = void 0;
const $$find = (path) => {
if (path.length === 0)
return '(function(x){return x})';
let fn = '(function(){var h=Object.prototype.hasOwnProperty;return(function(o){var k,u=void 0;try{';
for (let i = 0; i < path.length; i++) {
fn += 'k=' + JSON.stringify(path[i]) + ';';
fn += 'if(!h.call(o,k))return u;o=o[k];';
}
fn += 'return o}catch(e){return u}})})()';
return fn;
};
exports.$$find = $$find;

View File

@@ -0,0 +1,7 @@
import type { Reference } from '../find';
import type { Path } from '../types';
import { type JavaScriptLinked } from '@jsonjoy.com/util/lib/codegen';
type Fn = (val: unknown) => Reference;
export declare const $$findRef: (path: Path) => JavaScriptLinked<Fn>;
export declare const $findRef: (path: Path) => Fn;
export {};

View File

@@ -0,0 +1,48 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.$findRef = exports.$$findRef = void 0;
const codegen_1 = require("@jsonjoy.com/util/lib/codegen");
const hasOwnProperty_1 = require("@jsonjoy.com/util/lib/hasOwnProperty");
const $$findRef = (path) => {
if (!path.length) {
return {
deps: [],
js: /* js */ `(function(){return function(val){return {val:val}}})`,
};
}
let loop = '';
for (let i = 0; i < path.length; i++) {
const key = JSON.stringify(path[i]);
loop += /* js */ `
obj = val;
key = ${key};
if (obj instanceof Array) {
var length = obj.length;
if (key === '-') key = length;
else {
var key2 = ${~~path[i]};
${String(~~path[i]) !== String(path[i]) ? `if ('' + key2 !== key) throw new Error('INVALID_INDEX');` : ''}
${~~path[i] < 0 ? `throw new Error('INVALID_INDEX');` : ''}
key = key2;
}
val = obj[key];
} else if (typeof obj === 'object' && !!obj) {
val = has(obj, key) ? obj[key] : undefined;
} else throw new Error('NOT_FOUND');
`;
}
const js = /* js */ `(function(has, path){
return function(val) {
var obj, key;
${loop}
return {val:val, obj:obj, key:key};
};
})`;
return {
deps: [hasOwnProperty_1.hasOwnProperty, path],
js,
};
};
exports.$$findRef = $$findRef;
const $findRef = (path) => (0, codegen_1.compileClosure)((0, exports.$$findRef)(path));
exports.$findRef = $findRef;

View File

@@ -0,0 +1,2 @@
export { $$find } from './find';
export { $$findRef, $findRef } from './findRef';

View File

@@ -0,0 +1,8 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.$findRef = exports.$$findRef = exports.$$find = void 0;
var find_1 = require("./find");
Object.defineProperty(exports, "$$find", { enumerable: true, get: function () { return find_1.$$find; } });
var findRef_1 = require("./findRef");
Object.defineProperty(exports, "$$findRef", { enumerable: true, get: function () { return findRef_1.$$findRef; } });
Object.defineProperty(exports, "$findRef", { enumerable: true, get: function () { return findRef_1.$findRef; } });