orcas-angular 1.0.4 → 1.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/fesm2022/orcas-angular.mjs +1608 -0
  2. package/fesm2022/orcas-angular.mjs.map +1 -0
  3. package/package.json +39 -36
  4. package/types/orcas-angular.d.ts +460 -0
  5. package/.claude/settings.local.json +0 -8
  6. package/async/async.ts +0 -16
  7. package/async/cancellation-token.ts +0 -90
  8. package/dev/console-hook.ts +0 -25
  9. package/dev/debug.service.ts.example +0 -29
  10. package/framework/services-init.ts +0 -25
  11. package/index.ts +0 -25
  12. package/localization/localization.interface.ts +0 -18
  13. package/localization/localization.service.ts +0 -131
  14. package/localization/localize.pipe.ts +0 -30
  15. package/log/echo-provider.ts +0 -27
  16. package/log/echo.ts +0 -635
  17. package/log/index.ts +0 -6
  18. package/log/log-systems.ts +0 -20
  19. package/navigation/back-on-click.directive.ts +0 -19
  20. package/navigation/index.ts +0 -3
  21. package/navigation/navigation-stack.service.ts +0 -33
  22. package/ng-package.json +0 -7
  23. package/storage/capacitor-files.service.ts +0 -38
  24. package/storage/file-box.service.ts +0 -112
  25. package/storage/files.ts +0 -42
  26. package/storage/key-signals.ts +0 -49
  27. package/storage/local-storage-files.service.ts +0 -49
  28. package/storage/settings-signals.service.ts +0 -24
  29. package/storage/settings.service.ts +0 -24
  30. package/storage/tauri-files.service.ts +0 -69
  31. package/theme/theme.service.ts +0 -33
  32. package/tsconfig.lib.json +0 -11
  33. package/ui/context-menu/context-button.component.ts +0 -55
  34. package/ui/context-menu/context-header.component.ts +0 -15
  35. package/ui/context-menu/context-menu-trigger.directive.ts +0 -26
  36. package/ui/context-menu/context-menu.component.ts +0 -95
  37. package/ui/context-menu/index.ts +0 -4
@@ -1,95 +0,0 @@
1
- import { Component, input, output, ElementRef, HostListener, booleanAttribute, signal, ViewChild, AfterViewInit } from '@angular/core';
2
- import { CommonModule } from '@angular/common';
3
-
4
- @Component({
5
- selector: 'context-menu',
6
- standalone: true,
7
- imports: [CommonModule],
8
- template: `
9
- @if ($isVisible() || $isSubmenu()) {
10
- <div
11
- #container
12
- [class.fixed]="!$isSubmenu()"
13
- [class.absolute]="$isSubmenu()"
14
- [class.left-full]="$isSubmenu()"
15
- [class.top-0]="$isSubmenu()"
16
- [class.ml-[-2px]]="$isSubmenu()"
17
- class="bg-white dark:bg-[#2a2a2a] border border-light-border dark:border-dark-border rounded shadow-lg z-50 min-w-[200px] text-light-text-primary dark:text-dark-text-primary py-1"
18
- [style.left.px]="!$isSubmenu() ? $x() : null"
19
- [style.top.px]="!$isSubmenu() ? $y() : null"
20
- [style.visibility]="$isMeasuring() ? 'hidden' : 'visible'"
21
- (click)="$event.stopPropagation()">
22
- <ng-content></ng-content>
23
- </div>
24
- }
25
- `
26
- })
27
- export class ContextMenuComponent {
28
- $isSubmenu = input(false, { transform: booleanAttribute });
29
-
30
- $isVisible = signal(false);
31
- $isMeasuring = signal(false);
32
- $x = signal(0);
33
- $y = signal(0);
34
-
35
- @ViewChild('container') container?: ElementRef<HTMLDivElement>;
36
-
37
- close = output<void>();
38
-
39
- constructor(private elementRef: ElementRef) { }
40
-
41
- @HostListener('document:mousedown', ['$event'])
42
- onDocumentClick(event: MouseEvent) {
43
- if (this.$isSubmenu()) return;
44
-
45
- // If visible and click is outside, close
46
- if (this.$isVisible() && !this.elementRef.nativeElement.contains(event.target)) {
47
- this.closeMenu();
48
- }
49
- }
50
-
51
- show(x: number, y: number) {
52
- if (this.$isSubmenu()) return;
53
-
54
- this.$x.set(x);
55
- this.$y.set(y);
56
- this.$isMeasuring.set(true);
57
- this.$isVisible.set(true);
58
-
59
- // Wait for DOM to render the menu so we can measure it
60
- setTimeout(() => {
61
- if (this.container) {
62
- const rect = this.container.nativeElement.getBoundingClientRect();
63
- const width = rect.width;
64
- const height = rect.height;
65
-
66
- const windowWidth = window.innerWidth;
67
- const windowHeight = window.innerHeight;
68
-
69
- let newX = x;
70
- let newY = y;
71
-
72
- if (x + width > windowWidth)
73
- newX = x - width;
74
-
75
- if (y + height > windowHeight)
76
- newY = y - height;
77
-
78
- // Final safety check to ensure it doesn't go off the top/left edges
79
- this.$x.set(Math.max(0, newX));
80
- this.$y.set(Math.max(0, newY));
81
- }
82
- this.$isMeasuring.set(false);
83
- }, 0);
84
- }
85
-
86
- hide() {
87
- this.$isVisible.set(false);
88
- this.$isMeasuring.set(false);
89
- }
90
-
91
- private closeMenu() {
92
- this.hide();
93
- this.close.emit();
94
- }
95
- }
@@ -1,4 +0,0 @@
1
- export * from './context-menu.component';
2
- export * from './context-header.component';
3
- export * from './context-button.component';
4
- export * from './context-menu-trigger.directive';