fix: add missing exports to regenerated ui.js and search.js
All checks were successful
CI / lint (push) Successful in 11s
CI / security (push) Successful in 9s
CI / test (push) Successful in 14s
CI / build (push) Successful in 2s

This commit is contained in:
Bruno Charest 2026-05-28 17:09:10 -04:00
parent eab6c11dc4
commit 58f7173cc3
2 changed files with 20 additions and 20 deletions

View File

@ -4,7 +4,7 @@ import { safeCreateIcons } from './utils.js';
// ---------------------------------------------------------------------------
// Search History Service (localStorage, LIFO, max 50, dedup)
// ---------------------------------------------------------------------------
const SearchHistory = {
export const SearchHistory = {
_load() {
try {
const raw = localStorage.getItem(SEARCH_HISTORY_KEY);
@ -49,7 +49,7 @@ const SearchHistory = {
// ---------------------------------------------------------------------------
// Query Parser — extracts operators (tag:, #, vault:, title:, path:, ext:)
// ---------------------------------------------------------------------------
const QueryParser = {
export const QueryParser = {
parse(raw) {
const result = { tags: [], vault: null, title: null, path: null, ext: null, freeText: "" };
if (!raw) return result;
@ -125,7 +125,7 @@ const QueryParser = {
// ---------------------------------------------------------------------------
// Autocomplete Dropdown Controller
// ---------------------------------------------------------------------------
const AutocompleteDropdown = {
export const AutocompleteDropdown = {
_dropdown: null,
_historySection: null,
_titlesSection: null,
@ -400,7 +400,7 @@ const AutocompleteDropdown = {
// ---------------------------------------------------------------------------
// Search Chips Controller — renders active filter chips from parsed query
// ---------------------------------------------------------------------------
const SearchChips = {
export const SearchChips = {
_container: null,
init() {
this._container = document.getElementById("search-chips");
@ -482,7 +482,7 @@ function _triggerAdvancedSearch(rawQuery) {
// ---------------------------------------------------------------------------
// ── Search toggle state ──
function initSearch() {
export function initSearch() {
const input = document.getElementById("search-input");
if (!input) return;
const caseBtn = document.getElementById("search-case-btn");
@ -711,7 +711,7 @@ function _isInputFocused() {
}
// --- Backward-compatible search (existing /api/search endpoint) ---
async function performSearch(query, vaultFilter, tagFilter) {
export async function performSearch(query, vaultFilter, tagFilter) {
if (searchAbortController) state.searchAbortController.abort();
state.searchAbortController = new AbortController();
const searchId = ++state.currentSearchId;
@ -733,7 +733,7 @@ async function performSearch(query, vaultFilter, tagFilter) {
}
// --- Advanced search with TF-IDF, facets, pagination ---
async function performAdvancedSearch(query, vaultFilter, tagFilter, offset, sort) {
export async function performAdvancedSearch(query, vaultFilter, tagFilter, offset, sort) {
if (searchAbortController) state.searchAbortController.abort();
state.searchAbortController = new AbortController();
const searchId = ++state.currentSearchId;
@ -785,7 +785,7 @@ async function performAdvancedSearch(query, vaultFilter, tagFilter, offset, sort
}
// --- Legacy search results renderer (kept for backward compat) ---
function renderSearchResults(data, query, tagFilter) {
export function renderSearchResults(data, query, tagFilter) {
const area = document.getElementById("content-area");
area.innerHTML = "";
const header = buildSearchResultsHeader(data, query, tagFilter);
@ -843,7 +843,7 @@ function renderSearchResults(data, query, tagFilter) {
}
// --- Advanced search results renderer (facets, highlighted snippets, pagination, sort) ---
function renderAdvancedSearchResults(data, query, tagFilter) {
export function renderAdvancedSearchResults(data, query, tagFilter) {
const area = document.getElementById("content-area");
area.innerHTML = "";

View File

@ -131,12 +131,12 @@ export const RightSidebarManager = {
// ---------------------------------------------------------------------------
// Theme
// ---------------------------------------------------------------------------
function initTheme() {
export function initTheme() {
const saved = localStorage.getItem("obsigate-theme") || "dark";
applyTheme(saved);
}
function applyTheme(theme) {
export function applyTheme(theme) {
document.documentElement.setAttribute("data-theme", theme);
localStorage.setItem("obsigate-theme", theme);
@ -161,12 +161,12 @@ function applyTheme(theme) {
}
}
function toggleTheme() {
export function toggleTheme() {
const current = document.documentElement.getAttribute("data-theme");
applyTheme(current === "dark" ? "light" : "dark");
}
function initHeaderMenu() {
export function initHeaderMenu() {
const menuBtn = document.getElementById("header-menu-btn");
const menuDropdown = document.getElementById("header-menu-dropdown");
@ -204,7 +204,7 @@ function closeHeaderMenu() {
// ---------------------------------------------------------------------------
// Custom Dropdowns
// ---------------------------------------------------------------------------
function initCustomDropdowns() {
export function initCustomDropdowns() {
document.querySelectorAll(".custom-dropdown").forEach((dropdown) => {
const trigger = dropdown.querySelector(".custom-dropdown-trigger");
const options = dropdown.querySelectorAll(".custom-dropdown-option");
@ -337,7 +337,7 @@ function populateCustomDropdown(dropdownId, optionsList, defaultValue) {
// ---------------------------------------------------------------------------
/** Display a brief toast message at the bottom of the viewport. */
function showToast(message, type) {
export function showToast(message, type) {
console.log("showToast called with:", message, type);
type = type || "info";
let container = document.getElementById("toast-container");
@ -368,7 +368,7 @@ function showToast(message, type) {
// ---------------------------------------------------------------------------
// Sidebar toggle (desktop)
// ---------------------------------------------------------------------------
function initSidebarToggle() {
export function initSidebarToggle() {
const toggleBtn = document.getElementById("sidebar-toggle-btn");
const sidebar = document.getElementById("sidebar");
const resizeHandle = document.getElementById("sidebar-resize-handle");
@ -395,7 +395,7 @@ function initSidebarToggle() {
// ---------------------------------------------------------------------------
// Mobile sidebar
// ---------------------------------------------------------------------------
function initMobile() {
export function initMobile() {
const hamburger = document.getElementById("hamburger-btn");
const overlay = document.getElementById("sidebar-overlay");
const sidebar = document.getElementById("sidebar");
@ -422,7 +422,7 @@ function closeMobileSidebar() {
// ---------------------------------------------------------------------------
// Resizable sidebar (horizontal)
// ---------------------------------------------------------------------------
function initSidebarResize() {
export function initSidebarResize() {
const handle = document.getElementById("sidebar-resize-handle");
const sidebar = document.getElementById("sidebar");
if (!handle || !sidebar) return;
@ -464,7 +464,7 @@ function initSidebarResize() {
// ---------------------------------------------------------------------------
// Resizable tag section (vertical)
// ---------------------------------------------------------------------------
function initTagResize() {
export function initTagResize() {
const handle = document.getElementById("tag-resize-handle");
const tagSection = document.getElementById("tag-cloud-section");
if (!handle || !tagSection) return;
@ -1089,7 +1089,7 @@ const FileOperations = {
// ---------------------------------------------------------------------------
// Find in Page Manager
// ---------------------------------------------------------------------------
const FindInPageManager = {
export const FindInPageManager = {
isOpen: false,
searchTerm: "",
matches: [],