diff --git a/DEPENDENCY_CLEANUP.md b/DEPENDENCY_CLEANUP.md index a121ad53a..7dad7ed19 100644 --- a/DEPENDENCY_CLEANUP.md +++ b/DEPENDENCY_CLEANUP.md @@ -103,7 +103,7 @@ "@github/spark": ">=0.43.1 <1", // ⚠️ Evaluate - What is this? ``` -**Action Needed:** Verify @github/spark usage +**Action Needed:** Verify any remaining @github/spark runtime usage (useKV imports replaced with local hook). ### Error Handling & Notifications ```json @@ -168,11 +168,11 @@ ## Dependencies to Evaluate -### @github/spark -**Current Version:** >=0.43.1 <1 -**Purpose:** Unknown - needs investigation -**Action:** Search codebase for usage -**Decision:** Keep or remove based on usage +### @github/spark +**Current Version:** >=0.43.1 <1 +**Purpose:** Previously for `useKV` hook usage +**Action:** Runtime imports replaced with local `@/hooks/data/useKV`; remaining references are docs and a module override type stub +**Decision:** Candidate for removal once no other Spark features are needed ### @next/third-parties **Current Version:** ^16.1.1 diff --git a/fakemui/icons/UserCheck.tsx b/fakemui/icons/UserCheck.tsx new file mode 100644 index 000000000..ac39123a5 --- /dev/null +++ b/fakemui/icons/UserCheck.tsx @@ -0,0 +1,10 @@ +import React from 'react' +import { Icon, IconProps } from './Icon' + +export const UserCheck = (props: IconProps) => ( + + + + + +) diff --git a/fakemui/icons/index.ts b/fakemui/icons/index.ts index cec34efe1..ec764cf74 100644 --- a/fakemui/icons/index.ts +++ b/fakemui/icons/index.ts @@ -55,6 +55,7 @@ export { UserCircle } from './UserCircle' export { UserPlus } from './UserPlus' export { UserMinus } from './UserMinus' export { UserX } from './UserX' +export { UserCheck } from './UserCheck' export { Users } from './Users' export { UserSwitch } from './UserSwitch' export { IdCard } from './IdCard' diff --git a/fakemui/index.ts b/fakemui/index.ts index 6bb78dcd0..dff7dcdb8 100644 --- a/fakemui/index.ts +++ b/fakemui/index.ts @@ -25,6 +25,7 @@ export { Search, Settings, User, + UserCheck, Menu, Eye, EyeSlash, diff --git a/frontends/nextjs/src/components/README.md b/frontends/nextjs/src/components/README.md index 65183fa4c..c437c9d16 100644 --- a/frontends/nextjs/src/components/README.md +++ b/frontends/nextjs/src/components/README.md @@ -126,7 +126,7 @@ export function StatusIndicator({ user, status }: StatusIndicatorProps) { ```typescript // src/components/organisms/CommentSection.tsx import { useState } from 'react' -import { useKV } from '@github/spark/hooks' +import { useKV } from '@/hooks/data/useKV' import { Button, Input } from '@/components/atoms' import { ProfileCard } from '@/components/molecules' @@ -271,7 +271,7 @@ export function FormField({ label, error, ...props }: FormFieldProps) { ### Pattern: Data List ```typescript // Organism handling data fetching and display -import { useKV } from '@github/spark/hooks' +import { useKV } from '@/hooks/data/useKV' import { Button } from '@/components/atoms' import { Card } from '@/components/ui' diff --git a/packages/ui_level2/seed/scripts/profile/init.lua b/packages/ui_level2/seed/scripts/profile/init.lua index 99356d062..f0eed88c2 100644 --- a/packages/ui_level2/seed/scripts/profile/init.lua +++ b/packages/ui_level2/seed/scripts/profile/init.lua @@ -1,8 +1,10 @@ --- Profile module facade --- Re-exports all profile functions for backward compatibility - -local render_module = require("profile.render") -local save_module = require("profile.save_profile") +-- Profile module facade +-- Re-exports all profile functions for backward compatibility + +require("profile.types") + +local render_module = require("profile.render") +local save_module = require("profile.save_profile") ---@class ProfileModule ---@field render fun(ctx: RenderContext): UIComponent diff --git a/packages/ui_level2/seed/scripts/profile/save_profile.lua b/packages/ui_level2/seed/scripts/profile/save_profile.lua index 787766652..8a9e62852 100644 --- a/packages/ui_level2/seed/scripts/profile/save_profile.lua +++ b/packages/ui_level2/seed/scripts/profile/save_profile.lua @@ -1,14 +1,8 @@ --- Save profile form handler - ----@class FormData ----@field email string - ----@class ProfileResponse ----@field success boolean ----@field action string ----@field email string - -local M = {} +-- Save profile form handler + +require("profile.types") + +local M = {} ---Processes profile form submission and returns response ---@param form FormData diff --git a/packages/ui_level2/seed/scripts/profile/types.lua b/packages/ui_level2/seed/scripts/profile/types.lua index aaf00e903..eaa1ee923 100644 --- a/packages/ui_level2/seed/scripts/profile/types.lua +++ b/packages/ui_level2/seed/scripts/profile/types.lua @@ -23,6 +23,11 @@ ---@field onClick string ---@field variant? string +---@class IconProps +---@field name string +---@field size? "small"|"medium"|"large"|"inherit" +---@field className? string + ---@class FormData ---@field email string Email from form input diff --git a/packages/ui_level3/seed/scripts/moderation/init.lua b/packages/ui_level3/seed/scripts/moderation/init.lua index 2da27f257..0e2ecb5c7 100644 --- a/packages/ui_level3/seed/scripts/moderation/init.lua +++ b/packages/ui_level3/seed/scripts/moderation/init.lua @@ -13,6 +13,7 @@ ---@field deleteUser fun(userId: string): boolean ---@field editUser fun(userId: string, updates: ModerationUpdates): boolean ---@field banUser fun(userId: string, reason: string): boolean +---@type Moderation local M = {} -- Import all single-function modules diff --git a/packages/ui_level4/seed/scripts/schemas/render.lua b/packages/ui_level4/seed/scripts/schemas/render.lua index 6e4a4f486..943490fe0 100644 --- a/packages/ui_level4/seed/scripts/schemas/render.lua +++ b/packages/ui_level4/seed/scripts/schemas/render.lua @@ -58,7 +58,10 @@ local function render(ctx) end return { type = "Stack", - props = { spacing = 4 }, + props = { + ---@type StackProps + spacing = 4 + }, children = { { type = "Button", diff --git a/packages/ui_level6/seed/scripts/tenants/init.lua b/packages/ui_level6/seed/scripts/tenants/init.lua index 031f81896..0f70b42cb 100644 --- a/packages/ui_level6/seed/scripts/tenants/init.lua +++ b/packages/ui_level6/seed/scripts/tenants/init.lua @@ -1,7 +1,12 @@ --- Tenants module facade --- Re-exports all tenant management functions for backward compatibility - -local M = {} +-- Tenants module facade +-- Re-exports all tenant management functions for backward compatibility + +---@class TenantsModule +---@field tenant_list fun(): TenantListComponent +---@field tenant_card fun(tenant: TenantInfo): TenantCardComponent +---@field create_tenant_form fun(): FormComponent +---@type TenantsModule +local M = {} M.tenant_list = require("tenants.tenant_list") M.tenant_card = require("tenants.tenant_card") diff --git a/packages/ui_level6/seed/scripts/transfer/init.lua b/packages/ui_level6/seed/scripts/transfer/init.lua index 2ce450adf..28aaab27d 100644 --- a/packages/ui_level6/seed/scripts/transfer/init.lua +++ b/packages/ui_level6/seed/scripts/transfer/init.lua @@ -1,7 +1,11 @@ --- Transfer module facade --- Re-exports all power transfer functions for backward compatibility - -local M = {} +-- Transfer module facade +-- Re-exports all power transfer functions for backward compatibility + +---@class TransferModule +---@field transfer_form fun(from_user: User, to_user: User): TransferFormComponent +---@field transfer_history fun(): TransferHistoryComponent +---@type TransferModule +local M = {} M.transfer_form = require("transfer.transfer_form") M.transfer_history = require("transfer.transfer_history")