# HG changeset patch
# User luka
# Date 1750300127 14400
# Node ID b44434aaa7670925eee1bc08e7b260d0e1060931
# Parent 56d9c64d64aac9ad36535ea127555be9bb3d83a5
Moving around the components.
Made a big step in the right direction with the Builder and named joins being accessible.
diff -r 56d9c64d64aa -r b44434aaa767 publishable/resources/views/components/application-logo.blade.php
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/publishable/resources/views/components/application-logo.blade.php Wed Jun 18 22:28:47 2025 -0400
@@ -0,0 +1,1 @@
+
diff -r 56d9c64d64aa -r b44434aaa767 publishable/resources/views/components/auth-session-status.blade.php
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/publishable/resources/views/components/auth-session-status.blade.php Wed Jun 18 22:28:47 2025 -0400
@@ -0,0 +1,7 @@
+@props(['status'])
+
+@if ($status)
+
merge(['class' => 'font-medium text-sm text-green-600']) }}>
+ {{ $status }}
+
+@endif
diff -r 56d9c64d64aa -r b44434aaa767 publishable/resources/views/components/card.blade.php
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/publishable/resources/views/components/card.blade.php Wed Jun 18 22:28:47 2025 -0400
@@ -0,0 +1,23 @@
+@props([
+ 'title' => null, // e.g. 'Upcoming Milestones'
+ 'icon' => null, // SVG (pass as a Blade include or html)
+ 'empty' => 'Nothing to show.',
+ 'footer' => null, // Optional (e.g. a "View All" link)
+ 'headerButton' => null, //button or link for the right side of the header
+])
+
+
+
+
+ {!! $icon ?? '' !!}
+ {{ $title }}
+
+ {!! $headerButton !!}
+
+ {{ $slot }}
+ @if ($footer)
+
+ {!! $footer !!}
+
+ @endif
+
diff -r 56d9c64d64aa -r b44434aaa767 publishable/resources/views/components/danger-button.blade.php
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/publishable/resources/views/components/danger-button.blade.php Wed Jun 18 22:28:47 2025 -0400
@@ -0,0 +1,4 @@
+merge(['type' => 'submit', 'class' => 'inline-flex items-center px-4 py-2 bg-red-600 border border-transparent rounded-md font-semibold text-xs text-white uppercase tracking-widest hover:bg-red-500 active:bg-red-700 focus:outline-none focus:ring-2 focus:ring-red-500 focus:ring-offset-2 transition ease-in-out duration-150']) }}>
+ {{ $slot }}
+
diff -r 56d9c64d64aa -r b44434aaa767 publishable/resources/views/components/dashboard-card.blade.php
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/publishable/resources/views/components/dashboard-card.blade.php Wed Jun 18 22:28:47 2025 -0400
@@ -0,0 +1,33 @@
+@props([
+ 'icon', // SVG icon as a Blade include or HTML
+ 'title',
+ 'value',
+ 'subtitle' => '',
+ 'color' => 'blue', // For icon background
+])
+
+@php
+ $bgColor =
+ [
+ 'green' => 'bg-green-100 text-green-600',
+ 'blue' => 'bg-blue-100 text-blue-600',
+ 'purple' => 'bg-purple-100 text-purple-600',
+ 'yellow' => 'bg-yellow-100 text-yellow-600',
+ 'gray' => 'bg-gray-100 text-gray-600',
+ ][$color] ?? 'bg-blue-100 text-blue-600';
+@endphp
+
+
+
+
+ {!! $icon !!}
+
+
+
+
{{ $value }}
+
{{ $title }}
+ @if ($subtitle)
+
{{ $subtitle }}
+ @endif
+
+
diff -r 56d9c64d64aa -r b44434aaa767 publishable/resources/views/components/dropdown-link.blade.php
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/publishable/resources/views/components/dropdown-link.blade.php Wed Jun 18 22:28:47 2025 -0400
@@ -0,0 +1,2 @@
+merge(['class' => 'block w-full px-4 py-2 text-start text-sm leading-5 text-gray-700 hover:bg-gray-100 focus:outline-none focus:bg-gray-100 transition duration-150 ease-in-out']) }}>{{ $slot }}
diff -r 56d9c64d64aa -r b44434aaa767 publishable/resources/views/components/dropdown.blade.php
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/publishable/resources/views/components/dropdown.blade.php Wed Jun 18 22:28:47 2025 -0400
@@ -0,0 +1,30 @@
+@props(['align' => 'right', 'width' => '48', 'contentClasses' => 'py-1 bg-white'])
+
+@php
+ $alignmentClasses = match ($align) {
+ 'left' => 'ltr:origin-top-left rtl:origin-top-right start-0',
+ 'top' => 'origin-top',
+ default => 'ltr:origin-top-right rtl:origin-top-left end-0',
+ };
+
+ $width = match ($width) {
+ '48' => 'w-48',
+ default => $width,
+ };
+@endphp
+
+
+
+ {{ $trigger }}
+
+
+
+
diff -r 56d9c64d64aa -r b44434aaa767 publishable/resources/views/components/filter/badge.blade.php
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/publishable/resources/views/components/filter/badge.blade.php Wed Jun 18 22:28:47 2025 -0400
@@ -0,0 +1,13 @@
+
+ {{ $name }}
+
+
+
+
+ Remove Filter
+
+
diff -r 56d9c64d64aa -r b44434aaa767 publishable/resources/views/components/form/checkbox.blade.php
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/publishable/resources/views/components/form/checkbox.blade.php Wed Jun 18 22:28:47 2025 -0400
@@ -0,0 +1,11 @@
+@props(['name', 'label', 'checked' => false])
+
+
+
+ {{ $label }}
+ @error($name)
+ {{ $message }}
+ @enderror
+
diff -r 56d9c64d64aa -r b44434aaa767 publishable/resources/views/components/form/date.blade.php
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/publishable/resources/views/components/form/date.blade.php Wed Jun 18 22:28:47 2025 -0400
@@ -0,0 +1,11 @@
+@props(['name', 'label', 'value' => '', 'required' => false])
+
+
+ {{ $label }}
+
+ @error($name)
+ {{ $message }}
+ @enderror
+
diff -r 56d9c64d64aa -r b44434aaa767 publishable/resources/views/components/form/select.blade.php
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/publishable/resources/views/components/form/select.blade.php Wed Jun 18 22:28:47 2025 -0400
@@ -0,0 +1,16 @@
+@props(['name', 'label', 'options' => [], 'value' => '', 'required' => false])
+
+ {{ $label }}
+
+ Select...
+ @foreach ($options as $optionValue => $optionLabel)
+
+ {{ $optionLabel }}
+
+ @endforeach
+
+ @error($name)
+ {{ $message }}
+ @enderror
+
diff -r 56d9c64d64aa -r b44434aaa767 publishable/resources/views/components/form/text.blade.php
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/publishable/resources/views/components/form/text.blade.php Wed Jun 18 22:28:47 2025 -0400
@@ -0,0 +1,11 @@
+@props(['name', 'label', 'value' => '', 'required' => false])
+
+
+ {{ $label }}
+
+ @error($name)
+ {{ $message }}
+ @enderror
+
diff -r 56d9c64d64aa -r b44434aaa767 publishable/resources/views/components/form/textarea.blade.php
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/publishable/resources/views/components/form/textarea.blade.php Wed Jun 18 22:28:47 2025 -0400
@@ -0,0 +1,22 @@
+@props(['name', 'label', 'value' => '', 'required' => false])
+
+
+
+ {{ $label }}
+ @if($required)
+ *
+ @endif
+
+
+
+
+ @error($name)
+ {{ $message }}
+ @enderror
+
+@include('includes.easymde')
diff -r 56d9c64d64aa -r b44434aaa767 publishable/resources/views/components/input-error.blade.php
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/publishable/resources/views/components/input-error.blade.php Wed Jun 18 22:28:47 2025 -0400
@@ -0,0 +1,9 @@
+@props(['messages'])
+
+@if ($messages)
+ merge(['class' => 'text-sm text-red-600 space-y-1']) }}>
+ @foreach ((array) $messages as $message)
+ {{ $message }}
+ @endforeach
+
+@endif
diff -r 56d9c64d64aa -r b44434aaa767 publishable/resources/views/components/input-label.blade.php
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/publishable/resources/views/components/input-label.blade.php Wed Jun 18 22:28:47 2025 -0400
@@ -0,0 +1,5 @@
+@props(['value'])
+
+merge(['class' => 'block font-medium text-sm text-gray-700']) }}>
+ {{ $value ?? $slot }}
+
diff -r 56d9c64d64aa -r b44434aaa767 publishable/resources/views/components/modal.blade.php
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/publishable/resources/views/components/modal.blade.php Wed Jun 18 22:28:47 2025 -0400
@@ -0,0 +1,57 @@
+@props(['name', 'show' => false, 'maxWidth' => '2xl'])
+
+@php
+ $maxWidth = [
+ 'sm' => 'sm:max-w-sm',
+ 'md' => 'sm:max-w-md',
+ 'lg' => 'sm:max-w-lg',
+ 'xl' => 'sm:max-w-xl',
+ '2xl' => 'sm:max-w-2xl',
+ ][$maxWidth];
+@endphp
+
+
diff -r 56d9c64d64aa -r b44434aaa767 publishable/resources/views/components/nav-link.blade.php
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/publishable/resources/views/components/nav-link.blade.php Wed Jun 18 22:28:47 2025 -0400
@@ -0,0 +1,12 @@
+@props(['active'])
+
+@php
+ $classes =
+ $active ?? false
+ ? 'inline-flex items-center px-1 pt-1 border-b-2 border-indigo-400 text-sm font-medium leading-5 text-gray-900 focus:outline-none focus:border-indigo-700 transition duration-150 ease-in-out'
+ : 'inline-flex items-center px-1 pt-1 border-b-2 border-transparent text-sm font-medium leading-5 text-gray-500 hover:text-gray-700 hover:border-gray-300 focus:outline-none focus:text-gray-700 focus:border-gray-300 transition duration-150 ease-in-out';
+@endphp
+
+merge(['class' => $classes]) }}>
+ {{ $slot }}
+
diff -r 56d9c64d64aa -r b44434aaa767 publishable/resources/views/components/preview-footer.blade.php
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/publishable/resources/views/components/preview-footer.blade.php Wed Jun 18 22:28:47 2025 -0400
@@ -0,0 +1,1 @@
+{{ $label }}
diff -r 56d9c64d64aa -r b44434aaa767 publishable/resources/views/components/preview-list-card.blade.php
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/publishable/resources/views/components/preview-list-card.blade.php Wed Jun 18 22:28:47 2025 -0400
@@ -0,0 +1,22 @@
+@props([
+ 'title', // e.g. 'Upcoming Milestones'
+ 'icon', // SVG (pass as a Blade include or html)
+ 'items', // Collection of items to show
+ 'itemView', // Partial for rendering each item
+ 'viewData' => [], // Additional data to pass to the partial
+ 'empty' => 'Nothing to show.',
+ 'footer' => null, // Optional (e.g. a "View All" link)
+ 'headerButton' => null, // Optional (e.g. a "Add" link)
+])
+
+
+ @if ($items->count())
+
+ @foreach ($items as $item)
+ @include($itemView, array_merge(['item' => $item], $viewData ?? []))
+ @endforeach
+
+ @else
+ {{ $empty }}
+ @endif
+
diff -r 56d9c64d64aa -r b44434aaa767 publishable/resources/views/components/primary-button.blade.php
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/publishable/resources/views/components/primary-button.blade.php Wed Jun 18 22:28:47 2025 -0400
@@ -0,0 +1,4 @@
+merge(['type' => 'submit', 'class' => 'inline-flex items-center px-4 py-2 bg-gray-800 border border-transparent rounded-md font-semibold text-xs text-white uppercase tracking-widest hover:bg-gray-700 focus:bg-gray-700 active:bg-gray-900 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2 transition ease-in-out duration-150']) }}>
+ {{ $slot }}
+
diff -r 56d9c64d64aa -r b44434aaa767 publishable/resources/views/components/responsive-nav-link.blade.php
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/publishable/resources/views/components/responsive-nav-link.blade.php Wed Jun 18 22:28:47 2025 -0400
@@ -0,0 +1,12 @@
+@props(['active'])
+
+@php
+ $classes =
+ $active ?? false
+ ? 'block w-full ps-3 pe-4 py-2 border-l-4 border-indigo-400 text-start text-base font-medium text-indigo-700 bg-indigo-50 focus:outline-none focus:text-indigo-800 focus:bg-indigo-100 focus:border-indigo-700 transition duration-150 ease-in-out'
+ : 'block w-full ps-3 pe-4 py-2 border-l-4 border-transparent text-start text-base font-medium text-gray-600 hover:text-gray-800 hover:bg-gray-50 hover:border-gray-300 focus:outline-none focus:text-gray-800 focus:bg-gray-50 focus:border-gray-300 transition duration-150 ease-in-out';
+@endphp
+
+merge(['class' => $classes]) }}>
+ {{ $slot }}
+
diff -r 56d9c64d64aa -r b44434aaa767 publishable/resources/views/components/secondary-button.blade.php
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/publishable/resources/views/components/secondary-button.blade.php Wed Jun 18 22:28:47 2025 -0400
@@ -0,0 +1,4 @@
+merge(['type' => 'button', 'class' => 'inline-flex items-center px-4 py-2 bg-white border border-gray-300 rounded-md font-semibold text-xs text-gray-700 uppercase tracking-widest shadow-sm hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2 disabled:opacity-25 transition ease-in-out duration-150']) }}>
+ {{ $slot }}
+
diff -r 56d9c64d64aa -r b44434aaa767 publishable/resources/views/components/text-input.blade.php
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/publishable/resources/views/components/text-input.blade.php Wed Jun 18 22:28:47 2025 -0400
@@ -0,0 +1,4 @@
+@props(['disabled' => false])
+
+ merge(['class' => 'border-gray-300 focus:border-indigo-500 focus:ring-indigo-500 rounded-md shadow-sm']) }}>
diff -r 56d9c64d64aa -r b44434aaa767 publishable/vite.config.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/publishable/vite.config.js Wed Jun 18 22:28:47 2025 -0400
@@ -0,0 +1,30 @@
+import { defineConfig } from "vite";
+import laravel from "laravel-vite-plugin";
+import prism from 'vite-plugin-prismjs';
+import fs from "fs";
+import path from "path";
+
+const pagesDir = "resources/js/pages";
+const pageScripts = fs
+ .readdirSync(pagesDir)
+ .map((file) => path.join(pagesDir, file));
+
+export default defineConfig({
+ plugins: [
+ laravel({
+ input: [
+ "resources/css/app.css",
+ "resources/js/app.js",
+ "resources/js/easymde.js",
+ ...pageScripts,
+ ],
+ refresh: true,
+ }),
+ prism({
+ languages: ["javascript", "css", "html", "typescript", "php", "sql", "bash", "sh"],
+ plugins: ["line-numbers"],
+ theme: "tomorrow",
+ css: true,
+ }),
+ ],
+});
diff -r 56d9c64d64aa -r b44434aaa767 resources/views/components/application-logo.blade.php
--- a/resources/views/components/application-logo.blade.php Mon Jun 09 23:07:17 2025 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-
diff -r 56d9c64d64aa -r b44434aaa767 resources/views/components/auth-session-status.blade.php
--- a/resources/views/components/auth-session-status.blade.php Mon Jun 09 23:07:17 2025 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,7 +0,0 @@
-@props(['status'])
-
-@if ($status)
- merge(['class' => 'font-medium text-sm text-green-600']) }}>
- {{ $status }}
-
-@endif
diff -r 56d9c64d64aa -r b44434aaa767 resources/views/components/card.blade.php
--- a/resources/views/components/card.blade.php Mon Jun 09 23:07:17 2025 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-@props([
- 'title' => null, // e.g. 'Upcoming Milestones'
- 'icon' => null, // SVG (pass as a Blade include or html)
- 'empty' => 'Nothing to show.',
- 'footer' => null, // Optional (e.g. a "View All" link)
- 'headerButton' => null, //button or link for the right side of the header
-])
-
-
-
-
- {!! $icon ?? '' !!}
- {{ $title }}
-
- {!! $headerButton !!}
-
- {{ $slot }}
- @if ($footer)
-
- {!! $footer !!}
-
- @endif
-
diff -r 56d9c64d64aa -r b44434aaa767 resources/views/components/danger-button.blade.php
--- a/resources/views/components/danger-button.blade.php Mon Jun 09 23:07:17 2025 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-merge(['type' => 'submit', 'class' => 'inline-flex items-center px-4 py-2 bg-red-600 border border-transparent rounded-md font-semibold text-xs text-white uppercase tracking-widest hover:bg-red-500 active:bg-red-700 focus:outline-none focus:ring-2 focus:ring-red-500 focus:ring-offset-2 transition ease-in-out duration-150']) }}>
- {{ $slot }}
-
diff -r 56d9c64d64aa -r b44434aaa767 resources/views/components/dashboard-card.blade.php
--- a/resources/views/components/dashboard-card.blade.php Mon Jun 09 23:07:17 2025 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-@props([
- 'icon', // SVG icon as a Blade include or HTML
- 'title',
- 'value',
- 'subtitle' => '',
- 'color' => 'blue', // For icon background
-])
-
-@php
- $bgColor =
- [
- 'green' => 'bg-green-100 text-green-600',
- 'blue' => 'bg-blue-100 text-blue-600',
- 'purple' => 'bg-purple-100 text-purple-600',
- 'yellow' => 'bg-yellow-100 text-yellow-600',
- 'gray' => 'bg-gray-100 text-gray-600',
- ][$color] ?? 'bg-blue-100 text-blue-600';
-@endphp
-
-
-
-
- {!! $icon !!}
-
-
-
-
{{ $value }}
-
{{ $title }}
- @if ($subtitle)
-
{{ $subtitle }}
- @endif
-
-
diff -r 56d9c64d64aa -r b44434aaa767 resources/views/components/dropdown-link.blade.php
--- a/resources/views/components/dropdown-link.blade.php Mon Jun 09 23:07:17 2025 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,2 +0,0 @@
-merge(['class' => 'block w-full px-4 py-2 text-start text-sm leading-5 text-gray-700 hover:bg-gray-100 focus:outline-none focus:bg-gray-100 transition duration-150 ease-in-out']) }}>{{ $slot }}
diff -r 56d9c64d64aa -r b44434aaa767 resources/views/components/dropdown.blade.php
--- a/resources/views/components/dropdown.blade.php Mon Jun 09 23:07:17 2025 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-@props(['align' => 'right', 'width' => '48', 'contentClasses' => 'py-1 bg-white'])
-
-@php
- $alignmentClasses = match ($align) {
- 'left' => 'ltr:origin-top-left rtl:origin-top-right start-0',
- 'top' => 'origin-top',
- default => 'ltr:origin-top-right rtl:origin-top-left end-0',
- };
-
- $width = match ($width) {
- '48' => 'w-48',
- default => $width,
- };
-@endphp
-
-
-
- {{ $trigger }}
-
-
-
-
diff -r 56d9c64d64aa -r b44434aaa767 resources/views/components/filter/badge.blade.php
--- a/resources/views/components/filter/badge.blade.php Mon Jun 09 23:07:17 2025 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
-
- {{ $name }}
-
-
-
-
- Remove Filter
-
-
diff -r 56d9c64d64aa -r b44434aaa767 resources/views/components/form/checkbox.blade.php
--- a/resources/views/components/form/checkbox.blade.php Mon Jun 09 23:07:17 2025 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
-@props(['name', 'label', 'checked' => false])
-
-
-
- {{ $label }}
- @error($name)
- {{ $message }}
- @enderror
-
diff -r 56d9c64d64aa -r b44434aaa767 resources/views/components/form/date.blade.php
--- a/resources/views/components/form/date.blade.php Mon Jun 09 23:07:17 2025 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
-@props(['name', 'label', 'value' => '', 'required' => false])
-
-
- {{ $label }}
-
- @error($name)
- {{ $message }}
- @enderror
-
diff -r 56d9c64d64aa -r b44434aaa767 resources/views/components/form/select.blade.php
--- a/resources/views/components/form/select.blade.php Mon Jun 09 23:07:17 2025 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,16 +0,0 @@
-@props(['name', 'label', 'options' => [], 'value' => '', 'required' => false])
-
- {{ $label }}
-
- Select...
- @foreach ($options as $optionValue => $optionLabel)
-
- {{ $optionLabel }}
-
- @endforeach
-
- @error($name)
- {{ $message }}
- @enderror
-
diff -r 56d9c64d64aa -r b44434aaa767 resources/views/components/form/text.blade.php
--- a/resources/views/components/form/text.blade.php Mon Jun 09 23:07:17 2025 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
-@props(['name', 'label', 'value' => '', 'required' => false])
-
-
- {{ $label }}
-
- @error($name)
- {{ $message }}
- @enderror
-
diff -r 56d9c64d64aa -r b44434aaa767 resources/views/components/form/textarea.blade.php
--- a/resources/views/components/form/textarea.blade.php Mon Jun 09 23:07:17 2025 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,22 +0,0 @@
-@props(['name', 'label', 'value' => '', 'required' => false])
-
-
-
- {{ $label }}
- @if($required)
- *
- @endif
-
-
-
-
- @error($name)
- {{ $message }}
- @enderror
-
-@include('includes.easymde')
diff -r 56d9c64d64aa -r b44434aaa767 resources/views/components/input-error.blade.php
--- a/resources/views/components/input-error.blade.php Mon Jun 09 23:07:17 2025 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,9 +0,0 @@
-@props(['messages'])
-
-@if ($messages)
- merge(['class' => 'text-sm text-red-600 space-y-1']) }}>
- @foreach ((array) $messages as $message)
- {{ $message }}
- @endforeach
-
-@endif
diff -r 56d9c64d64aa -r b44434aaa767 resources/views/components/input-label.blade.php
--- a/resources/views/components/input-label.blade.php Mon Jun 09 23:07:17 2025 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-@props(['value'])
-
-merge(['class' => 'block font-medium text-sm text-gray-700']) }}>
- {{ $value ?? $slot }}
-
diff -r 56d9c64d64aa -r b44434aaa767 resources/views/components/modal.blade.php
--- a/resources/views/components/modal.blade.php Mon Jun 09 23:07:17 2025 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,57 +0,0 @@
-@props(['name', 'show' => false, 'maxWidth' => '2xl'])
-
-@php
- $maxWidth = [
- 'sm' => 'sm:max-w-sm',
- 'md' => 'sm:max-w-md',
- 'lg' => 'sm:max-w-lg',
- 'xl' => 'sm:max-w-xl',
- '2xl' => 'sm:max-w-2xl',
- ][$maxWidth];
-@endphp
-
-
diff -r 56d9c64d64aa -r b44434aaa767 resources/views/components/nav-link.blade.php
--- a/resources/views/components/nav-link.blade.php Mon Jun 09 23:07:17 2025 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,12 +0,0 @@
-@props(['active'])
-
-@php
- $classes =
- $active ?? false
- ? 'inline-flex items-center px-1 pt-1 border-b-2 border-indigo-400 text-sm font-medium leading-5 text-gray-900 focus:outline-none focus:border-indigo-700 transition duration-150 ease-in-out'
- : 'inline-flex items-center px-1 pt-1 border-b-2 border-transparent text-sm font-medium leading-5 text-gray-500 hover:text-gray-700 hover:border-gray-300 focus:outline-none focus:text-gray-700 focus:border-gray-300 transition duration-150 ease-in-out';
-@endphp
-
-merge(['class' => $classes]) }}>
- {{ $slot }}
-
diff -r 56d9c64d64aa -r b44434aaa767 resources/views/components/preview-footer.blade.php
--- a/resources/views/components/preview-footer.blade.php Mon Jun 09 23:07:17 2025 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-{{ $label }}
diff -r 56d9c64d64aa -r b44434aaa767 resources/views/components/preview-list-card.blade.php
--- a/resources/views/components/preview-list-card.blade.php Mon Jun 09 23:07:17 2025 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,22 +0,0 @@
-@props([
- 'title', // e.g. 'Upcoming Milestones'
- 'icon', // SVG (pass as a Blade include or html)
- 'items', // Collection of items to show
- 'itemView', // Partial for rendering each item
- 'viewData' => [], // Additional data to pass to the partial
- 'empty' => 'Nothing to show.',
- 'footer' => null, // Optional (e.g. a "View All" link)
- 'headerButton' => null, // Optional (e.g. a "Add" link)
-])
-
-
- @if ($items->count())
-
- @foreach ($items as $item)
- @include($itemView, array_merge(['item' => $item], $viewData ?? []))
- @endforeach
-
- @else
- {{ $empty }}
- @endif
-
diff -r 56d9c64d64aa -r b44434aaa767 resources/views/components/primary-button.blade.php
--- a/resources/views/components/primary-button.blade.php Mon Jun 09 23:07:17 2025 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-merge(['type' => 'submit', 'class' => 'inline-flex items-center px-4 py-2 bg-gray-800 border border-transparent rounded-md font-semibold text-xs text-white uppercase tracking-widest hover:bg-gray-700 focus:bg-gray-700 active:bg-gray-900 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2 transition ease-in-out duration-150']) }}>
- {{ $slot }}
-
diff -r 56d9c64d64aa -r b44434aaa767 resources/views/components/responsive-nav-link.blade.php
--- a/resources/views/components/responsive-nav-link.blade.php Mon Jun 09 23:07:17 2025 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,12 +0,0 @@
-@props(['active'])
-
-@php
- $classes =
- $active ?? false
- ? 'block w-full ps-3 pe-4 py-2 border-l-4 border-indigo-400 text-start text-base font-medium text-indigo-700 bg-indigo-50 focus:outline-none focus:text-indigo-800 focus:bg-indigo-100 focus:border-indigo-700 transition duration-150 ease-in-out'
- : 'block w-full ps-3 pe-4 py-2 border-l-4 border-transparent text-start text-base font-medium text-gray-600 hover:text-gray-800 hover:bg-gray-50 hover:border-gray-300 focus:outline-none focus:text-gray-800 focus:bg-gray-50 focus:border-gray-300 transition duration-150 ease-in-out';
-@endphp
-
-merge(['class' => $classes]) }}>
- {{ $slot }}
-
diff -r 56d9c64d64aa -r b44434aaa767 resources/views/components/secondary-button.blade.php
--- a/resources/views/components/secondary-button.blade.php Mon Jun 09 23:07:17 2025 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-merge(['type' => 'button', 'class' => 'inline-flex items-center px-4 py-2 bg-white border border-gray-300 rounded-md font-semibold text-xs text-gray-700 uppercase tracking-widest shadow-sm hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2 disabled:opacity-25 transition ease-in-out duration-150']) }}>
- {{ $slot }}
-
diff -r 56d9c64d64aa -r b44434aaa767 resources/views/components/text-input.blade.php
--- a/resources/views/components/text-input.blade.php Mon Jun 09 23:07:17 2025 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-@props(['disabled' => false])
-
- merge(['class' => 'border-gray-300 focus:border-indigo-500 focus:ring-indigo-500 rounded-md shadow-sm']) }}>
diff -r 56d9c64d64aa -r b44434aaa767 src/Database/Builder.php
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/Database/Builder.php Wed Jun 18 22:28:47 2025 -0400
@@ -0,0 +1,23 @@
+model?->named_joins() ?? [];
+ if(isset($available_joins[$join]) && ($named_joins[$join] ?? false) == false) {
+ $this->named_joins[$join] = true;
+ $available_joins[$join]($this);
+ }
+ }
+}
diff -r 56d9c64d64aa -r b44434aaa767 src/Database/MarkdownParser.php
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/Database/MarkdownParser.php Wed Jun 18 22:28:47 2025 -0400
@@ -0,0 +1,65 @@
+ $match) {
+ $code_blocks[] = [
+ 'language' => $match[1],
+ 'code' => $match[2],
+ ];
+ }
+
+ foreach ($matches as $index => $match) {
+ $markdown = preg_replace('/'.preg_quote($match[0], '/').'/', '[CODE_BLOCK_'.$index.']', $markdown, 1);
+ }
+
+ preg_match_all($inline_code_pattern, $markdown, $matches, PREG_SET_ORDER);
+ $inline_code = [];
+ foreach ($matches as $index => $match) {
+ $inline_code[] = [
+ 'code' => $match[1],
+ ];
+ }
+
+ foreach ($matches as $index => $match) {
+ $markdown = preg_replace('/'.preg_quote($match[0], '/').'/', '[INLINE_CODE_'.$index.']', $markdown, 1);
+ }
+
+ $markdown = preg_replace('/`(.+?)`/', '$1', $markdown);
+ $markdown = preg_replace('/\#{6}\s(.+)/', '$1 ', $markdown);
+ $markdown = preg_replace('/\#{5}\s(.+)/', '$1 ', $markdown);
+ $markdown = preg_replace('/\#{4}\s(.+)/', '$1 ', $markdown);
+ $markdown = preg_replace('/\#{3}\s(.+)/', '$1 ', $markdown);
+ $markdown = preg_replace('/\#{2}\s(.+)/', '$1 ', $markdown);
+ $markdown = preg_replace('/\#\s(.+)/', '$1 ', $markdown);
+ $markdown = preg_replace('/\*\*\*(.+?)\*\*\*/', '$1 ', $markdown);
+ $markdown = preg_replace('/\*\*(.+?)\*\*/', '$1 ', $markdown);
+ $markdown = preg_replace('/\*(.+?)\*/', '$1 ', $markdown);
+ $markdown = preg_replace('/\[(.+?)\]\((.+?)\)/', '$1 ', $markdown);
+ $markdown = preg_replace("/\r\n|\r|\n/", ' ', $markdown);
+
+ foreach ($code_blocks as $index => $code_block) {
+ $language = $code_block['language'];
+ $language = $language == 'blade' ? 'html' : $language;
+ $code_block['code'] = ''.htmlentities($code_block['code']).' ';
+ $markdown = str_replace('[CODE_BLOCK_'.$index.']', $code_block['code'], $markdown);
+ }
+
+ foreach ($inline_code as $index => $code) {
+ $code['code'] = ''.htmlentities($code['code']).'';
+ $markdown = str_replace('[INLINE_CODE_'.$index.']', $code['code'], $markdown);
+ }
+
+ return $markdown;
+ }
+}
diff -r 56d9c64d64aa -r b44434aaa767 src/Database/MyBlueprint.php
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/Database/MyBlueprint.php Wed Jun 18 22:28:47 2025 -0400
@@ -0,0 +1,102 @@
+id();
+ $this->reference('users', 'created_by')->nullable();
+ $this->reference('users', 'updated_by')->nullable();
+ $this->timestamps();
+ $this->softDeletes();
+ }
+
+ /**
+ * @param mixed $abbreviation
+ */
+ public function baseTextColumns($abbreviation = false): void
+ {
+ $this->string('name', 255);
+ $this->text('description')->nullable();
+ if ($abbreviation) {
+ $this->string('abbreviation', 50)->nullable();
+ }
+ }
+
+ public function pivotColumns(string $table1, string $table2): void
+ {
+ $this->comment('PIVOT:'.json_encode(['table1' => $table1, 'table2' => $table2]));
+ $this->id();
+ $this->reference($table1);
+ $this->reference($table2);
+ }
+
+ public function settingsColumns(): void
+ {
+ $this->baseColumns();
+ $this->baseTextColumns();
+ }
+
+ /**
+ * @param mixed $keep_column
+ */
+ public function dropReference(string $table, ?string $override_column_name = null, $keep_column = false): void
+ {
+ // set up relevant strings
+ $column_name = self::get_foreign_column_name($table, $override_column_name);
+ $fk_name = self::get_foreign_key_name($this->getTable(), $table, $column_name);
+
+ // drop the reference
+ $this->dropForeign($fk_name);
+
+ // drop the column if necessary
+ if (! $keep_column) {
+ $this->dropColumn($column_name);
+ }
+ }
+
+ public function reference(string $table, ?string $override_column_name = null): ColumnDefinition
+ {
+ // set up relevant strings
+ $column_name = self::get_foreign_column_name($table, $override_column_name);
+ $fk_name = self::get_foreign_key_name($this->getTable(), $table, $column_name);
+
+ // create the column
+ $column = $this->unsignedBigInteger($column_name);
+
+ // create the foreign key
+ $this->foreign($column_name, $fk_name)->references('id')->on($table);
+
+ return $column;
+ }
+
+ protected static function get_foreign_column_name(string $input, ?string $override = null): string
+ {
+ return ! is_null($override) ? $override : \Str::singular($input).'_id';
+ }
+
+ /*
+ * Generates a foreign key name
+ * 'FK_' + current table name + foreign column name
+ *
+ * */
+ protected static function get_foreign_key_name(string $current_table, string $table, string $column_name): string
+ {
+ $fk_name = 'FK_';
+
+ // add the current table name
+ $fk_name .= \Str::singular($current_table);
+
+ // add the foreign column name
+ $fk_name .= '_'.$column_name;
+
+ return $fk_name;
+ }
+}
diff -r 56d9c64d64aa -r b44434aaa767 src/Database/MySchema.php
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/Database/MySchema.php Wed Jun 18 22:28:47 2025 -0400
@@ -0,0 +1,32 @@
+connection($name)->getSchemaBuilder();
+
+ $builder->blueprintResolver(static fn ($table, $callback, $prefix) => new MyBlueprint($table, $callback, $prefix));
+
+ return $builder;
+ }
+}
diff -r 56d9c64d64aa -r b44434aaa767 src/Database/SchemaDrawer.php
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/Database/SchemaDrawer.php Wed Jun 18 22:28:47 2025 -0400
@@ -0,0 +1,103 @@
+tables = $this->getTables();
+ }
+
+ public static function createSchema($file_name = null)
+ {
+ $sd = new self;
+
+ $schema = $sd->list_tables_and_fks();
+ if (is_null($file_name)) {
+ return $schema;
+ } else {
+ $f = fopen($file_name, 'w+');
+ fwrite($f, $schema);
+ fclose($f);
+ }
+
+ return true;
+ }
+
+ protected static function getTableColumns(string $table_name)
+ {
+ return Schema::getColumns($table_name);
+ }
+
+ protected static function getTableForeignKeys(string $table_name)
+ {
+ return Schema::getForeignKeys($table_name);
+ }
+
+ /**
+ * Get the tables in the schema.
+ */
+ protected function getTables()
+ {
+ if (is_null($this->tables)) {
+ $key = 'DATABASE()';
+ $schema = \DB::select('SELECT DATABASE()')[0]->$key;
+ $this->tables = Schema::getTables(schema: [$schema]);
+ }
+
+ return $this->tables;
+ }
+
+ public function list_tables_and_fks(): string
+ {
+ $fk_labels = false;
+ $str = '
+digraph mydb {
+ fontname="Helvetica,Arial,sans-serif"
+ graph [layout="circo"]
+ node [fontname="Helvetica,Arial,sans-serif", shape="record"]
+ edge [fontname="Helvetica,Arial,sans-serif"]
+';
+ foreach ($this->tables as $table) {
+ $table_name = $table['name'];
+ $str .= "\t".$table_name.'[label="{'.$table_name;
+ foreach (self::getTableColumns($table_name) as $column) {
+ $col_name = $column['name'];
+ $str .= ' | <'.$col_name.'> '.$col_name;
+ // TODO: should we show the type?
+ }
+ $str .= '}"]'."\n";
+
+ $fks = self::getTableForeignKeys($table_name);
+ foreach ($fks as $fk) {
+ $name = $fk['name'];
+
+ if (! (str_contains($name, 'created_by') || str_contains($name, 'updated_by'))) {
+ $local_column = $fk['columns'];
+ $local_column = (isset($local_column[0])) ? ':'.$local_column[0] : '';
+ $foreign_column = $fk['foreign_columns'];
+ $foreign_column = (isset($foreign_column[0])) ? ':'.$foreign_column[0] : '';
+ $str .= "\t".$table_name.$local_column.' -> '.$fk['foreign_table'].$foreign_column;
+ if ($fk_labels) {
+ $str .= '[label="'.$name."\"];\n";
+ } else {
+ $str .= ";\n";
+ }
+ }
+ }
+ $str .= "\n";
+ }
+ $str .= '}';
+
+ return $str;
+ }
+}
diff -r 56d9c64d64aa -r b44434aaa767 src/FrameworkServiceProvider.php
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/FrameworkServiceProvider.php Wed Jun 18 22:28:47 2025 -0400
@@ -0,0 +1,25 @@
+app->bind('db.schema', fn () => \Libraries\MySchema::customizedSchemaBuilder());
+ }
+
+ public function boot(): void {
+ $publish_path = __DIR__.'/../publishable';
+ $this->publishes([
+ $publish_path.'/resources/views/components' => resource_path('views/components'),
+ $publish_path.'/vite.config.js' => base_path(),
+ ]);
+
+ foreach (glob(base_path('routes/resources/*.php')) as $routeFile) {
+ $this->loadRoutesFrom($routeFile);
+ }
+
+ }
+}
diff -r 56d9c64d64aa -r b44434aaa767 src/Http/Controllers/BaseController.php
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/Http/Controllers/BaseController.php Wed Jun 18 22:28:47 2025 -0400
@@ -0,0 +1,7 @@
+