@tecture/web 0.1.0

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 (33) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/LICENSE +21 -0
  3. package/dist-lib/App.d.ts +9 -0
  4. package/dist-lib/App.js +3341 -0
  5. package/dist-lib/App.js.map +1 -0
  6. package/dist-lib/StyleGuide.d.ts +1 -0
  7. package/dist-lib/architecture/ArchitectureBundleContext.d.ts +39 -0
  8. package/dist-lib/architecture/ArchitectureNode.d.ts +4 -0
  9. package/dist-lib/architecture/ArchitectureView.d.ts +6 -0
  10. package/dist-lib/architecture/DiagramCanvas.d.ts +7 -0
  11. package/dist-lib/architecture/DiagramList.d.ts +9 -0
  12. package/dist-lib/architecture/KeyboardHint.d.ts +1 -0
  13. package/dist-lib/architecture/LayoutPersistenceContext.d.ts +4 -0
  14. package/dist-lib/architecture/Legend.d.ts +6 -0
  15. package/dist-lib/architecture/LoadingSplash.d.ts +8 -0
  16. package/dist-lib/architecture/MarkdownContent.d.ts +5 -0
  17. package/dist-lib/architecture/MermaidBlock.d.ts +5 -0
  18. package/dist-lib/architecture/NodeDetailPanel.d.ts +6 -0
  19. package/dist-lib/architecture/dataSource.d.ts +32 -0
  20. package/dist-lib/architecture/dataSource.js +57 -0
  21. package/dist-lib/architecture/dataSource.js.map +1 -0
  22. package/dist-lib/architecture/edgeStyles.d.ts +7 -0
  23. package/dist-lib/architecture/edges/FloatingEdge.d.ts +2 -0
  24. package/dist-lib/architecture/edges/utils.d.ts +12 -0
  25. package/dist-lib/architecture/hooks/useActiveHandleSides.d.ts +1 -0
  26. package/dist-lib/architecture/layout.d.ts +3 -0
  27. package/dist-lib/architecture/nodeStyles.d.ts +18 -0
  28. package/dist-lib/architecture/transform.d.ts +15 -0
  29. package/dist-lib/style.css +1 -0
  30. package/dist-lib/styleEntry.d.ts +0 -0
  31. package/dist-lib/styles.js +2 -0
  32. package/dist-lib/styles.js.map +1 -0
  33. package/package.json +75 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,15 @@
1
+ # @tecture/web
2
+
3
+ ## 0.1.0
4
+
5
+ - First public release of the Tecture viewer as a reusable React component library.
6
+ Exports `App` (`@tecture/web/App`), the `WebDataSource` contract +
7
+ `createHttpDataSource(baseUrl?)` (`@tecture/web/architecture/dataSource`), and a
8
+ precompiled stylesheet (`@tecture/web/styles.css`) so consumers need no Tailwind setup.
9
+ - `createHttpDataSource` now accepts an optional `baseUrl` prefix, letting the viewer
10
+ talk to a server mounted under any path (e.g. a per-repo endpoint namespace). Defaults
11
+ to `""`, preserving the previous absolute `/api/...` behaviour.
12
+ - React and `react-dom` are peer dependencies; the diagram libraries
13
+ (`@xyflow/react`, `elkjs`, `mermaid`, `markdown-to-jsx`) and `@tecture/shared` are
14
+ regular dependencies, externalized from the bundle. Consumers should also import
15
+ `@xyflow/react/dist/style.css` alongside `@tecture/web/styles.css`.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Shanika Wijerathna
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,9 @@
1
+ import { WebDataSource } from './architecture/dataSource';
2
+ export interface AppProps {
3
+ dataSource: WebDataSource;
4
+ /** Forces the bundle provider to reload when the value changes. */
5
+ reloadKey?: unknown;
6
+ /** Show the floating diagram list overlay. Defaults to true. */
7
+ showDiagramList?: boolean;
8
+ }
9
+ export declare function App({ dataSource, reloadKey, showDiagramList }: AppProps): import("react/jsx-runtime").JSX.Element;