nitro-web 0.0.1 → 0.0.2

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/.eslintrc.json +2 -5
  2. package/_example/{.env-example → .env} +3 -3
  3. package/_example/client/config.ts +1 -5
  4. package/_example/client/index.ts +1 -18
  5. package/_example/components/auth.api.js +1 -1
  6. package/_example/components/index.tsx +11 -3
  7. package/_example/components/settings.api.js +1 -1
  8. package/_example/package.json +109 -0
  9. package/_example/server/config.js +3 -16
  10. package/_example/server/index.js +4 -3
  11. package/_example/tailwind.config.js +12 -21
  12. package/_example/tsconfig.json +2 -2
  13. package/_example/types/index.d.ts +13 -0
  14. package/_example/types/twin.d.ts +19 -0
  15. package/_example/webpack.config.js +2 -3
  16. package/client/index.js +42 -0
  17. package/components/auth/signin.jsx +9 -1
  18. package/components/partials/element/modal.jsx +1 -1
  19. package/components/partials/form/drop-handler.jsx +1 -1
  20. package/components/partials/form/input-currency.jsx +5 -2
  21. package/components/partials/form/input-date.jsx +6 -6
  22. package/components/partials/form/input.jsx +9 -9
  23. package/components/partials/layout/layout2.jsx +1 -1
  24. package/components/partials/styleguide.jsx +6 -7
  25. package/components/settings/settings-account.jsx +1 -1
  26. package/components/settings/settings-business.jsx +1 -4
  27. package/components/settings/settings-team--member.jsx +1 -1
  28. package/package.json +28 -97
  29. package/readme.md +39 -9
  30. package/server/email/index.js +12 -10
  31. package/server/index.js +23 -0
  32. package/server/router.js +4 -8
  33. package/util.js +13 -0
  34. package/webpack.config.js +42 -42
  35. package/_example/types.d.ts +0 -7
  36. package/client.js +0 -42
  37. package/server.js +0 -20
@@ -1,7 +0,0 @@
1
- declare module '*.svg' {
2
- const content: string | React.FC<React.SVGProps<SVGElement>>
3
- export default content
4
- }
5
- declare global {
6
- const sharedStore: any
7
- }
package/client.js DELETED
@@ -1,42 +0,0 @@
1
- export * from './client/app.js'
2
- export * from './util.js'
3
- export * as util from './util.js'
4
-
5
- // Components: Pages
6
- export { Signin } from './components/auth/signin.jsx'
7
- export { Signup } from './components/auth/signup.jsx'
8
- export { ResetInstructions, ResetPassword } from './components/auth/reset.jsx'
9
- // export { SettingsAccount } from './components/settings/settings-account.jsx'
10
- // export { SettingsBusiness } from './components/settings/settings-business.jsx'
11
- // export { SettingsTeamMember } from './components/settings/settings-team--member.jsx'
12
- // export { SettingsTeam } from './components/settings/settings-team.jsx'
13
-
14
- // Components: partials: elements
15
- export { Accordion } from './components/partials/element/accordion.jsx'
16
- export { Avatar } from './components/partials/element/avatar.jsx'
17
- export { Button } from './components/partials/element/button.jsx'
18
- export { Dropdown } from './components/partials/element/dropdown.jsx'
19
- export { Initials } from './components/partials/element/initials.jsx'
20
- export { Message } from './components/partials/element/message.jsx'
21
- // export { Modal } from './components/partials/element/modal.jsx'
22
- export { Sidebar } from './components/partials/element/sidebar.jsx'
23
- export { Tooltip } from './components/partials/element/tooltip.jsx'
24
- export { Topbar } from './components/partials/element/topbar.jsx'
25
-
26
- // Components: partials: form
27
- export { Checkbox } from './components/partials/form/checkbox.jsx'
28
- export { Drop } from './components/partials/form/drop.jsx'
29
- export { FormError } from './components/partials/form/form-error.jsx'
30
- export { Input } from './components/partials/form/input.jsx'
31
- export { Location } from './components/partials/form/location.jsx'
32
- export { Select } from './components/partials/form/select.jsx'
33
- export { Toggle } from './components/partials/form/toggle.jsx'
34
-
35
- // Components: partials: layouts
36
- export { Layout1 } from './components/partials/layout/layout1.jsx'
37
- export { Layout2 } from './components/partials/layout/layout2.jsx'
38
-
39
- // Components: partials: other
40
- export { IsFirstRender } from './components/partials/is-first-render.js'
41
- export { NotFound } from './components/partials/not-found.jsx'
42
- export { Styleguide } from './components/partials/styleguide.jsx'
package/server.js DELETED
@@ -1,20 +0,0 @@
1
- // Export models
2
- import userModel from './server/models/user.js'
3
- import companyModel from './server/models/company.js'
4
- async function setupDefaultModels(db) {
5
- // Load default nitro models, if they don't exist already
6
- if (!db.models.user) await db.model('user', userModel)
7
- if (!db.models.company) await db.model('company', companyModel)
8
- }
9
- export { userModel, companyModel, setupDefaultModels }
10
-
11
- // Export router
12
- export { setupRouter } from './server/router.js'
13
-
14
- // Export email util
15
- export { sendEmail } from './server/email/index.js'
16
-
17
- // Export api default controllers
18
- export { default as auth } from './components/auth/auth.api.js'
19
- export { default as settings } from './components/settings/settings.api.js'
20
- export { default as stripe } from './components/billing/stripe.api.js'