@wix/himalaya-cli 0.2052.0 → 0.2054.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.
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/members-v1/src/index.d.ts +31 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-members.mjs +12 -0
- package/dist/cli.mjs +8 -3
- package/fixtures/wix-canned.json +1 -0
- package/guides/sdk-reference.json +35 -1
- package/package.json +2 -2
- package/templates/bare-fashion/tier5-src/_shared/about-text.ts +8 -0
- package/templates/bare-fashion/tier5-src/_shared/detail-presence.ts +51 -0
- package/templates/bare-fashion/tier5-src/_shared/owner-editor-value.ts +164 -0
- package/templates/bare-fashion/tier5-src/himi-branded-lite-account-settings/about.ts +134 -0
- package/templates/bare-fashion/tier5-src/himi-branded-lite-account-settings/index.ts +3 -1
- package/templates/bare-fashion/tier5-src/himi-branded-lite-account-settings/personal-info.ts +44 -5
- package/templates/bare-fashion/tier5-src/himi-branded-lite-account-settings/shared.ts +21 -1
- package/templates/beauty-salon/config.ts +7 -0
- package/templates/beauty-salon/dev/index.ts +1568 -171
- package/templates/beauty-salon/himalaya.content.json +3 -0
- package/templates/beauty-salon/l10n/ar.json +150 -6
- package/templates/beauty-salon/l10n/cs.json +150 -6
- package/templates/beauty-salon/l10n/da.json +150 -6
- package/templates/beauty-salon/l10n/de.json +150 -6
- package/templates/beauty-salon/l10n/el.json +150 -6
- package/templates/beauty-salon/l10n/en.json +102 -9
- package/templates/beauty-salon/l10n/es.json +150 -6
- package/templates/beauty-salon/l10n/fi.json +150 -6
- package/templates/beauty-salon/l10n/fr.json +150 -6
- package/templates/beauty-salon/l10n/he.json +119 -5
- package/templates/beauty-salon/l10n/hu.json +150 -6
- package/templates/beauty-salon/l10n/id.json +150 -6
- package/templates/beauty-salon/l10n/it.json +150 -6
- package/templates/beauty-salon/l10n/ja.json +150 -6
- package/templates/beauty-salon/l10n/ko.json +150 -6
- package/templates/beauty-salon/l10n/lt.json +150 -6
- package/templates/beauty-salon/l10n/nl.json +150 -6
- package/templates/beauty-salon/l10n/no.json +150 -6
- package/templates/beauty-salon/l10n/pl.json +150 -6
- package/templates/beauty-salon/l10n/pt.json +150 -6
- package/templates/beauty-salon/l10n/ru.json +150 -6
- package/templates/beauty-salon/l10n/sv.json +150 -6
- package/templates/beauty-salon/l10n/th.json +150 -6
- package/templates/beauty-salon/l10n/tr.json +150 -6
- package/templates/beauty-salon/l10n/uk.json +150 -6
- package/templates/beauty-salon/l10n/vi.json +150 -6
- package/templates/beauty-salon/l10n/zh.json +150 -6
- package/templates/beauty-salon/tier5-src/_shared/about-text.ts +8 -0
- package/templates/beauty-salon/tier5-src/himi-branded-lite-account-settings/about.ts +134 -0
- package/templates/beauty-salon/tier5-src/himi-branded-lite-account-settings/index.ts +3 -1
- package/templates/beauty-salon/tier5-src/himi-branded-lite-account-settings/personal-info.ts +44 -5
- package/templates/beauty-salon/tier5-src/himi-branded-lite-account-settings/shared.ts +21 -1
- package/templates/beauty-salon/tier5-src/wix-spaces-member-detail/index.ts +769 -0
- package/templates/branded-lite/config.ts +7 -0
- package/templates/branded-lite/dev/index.ts +2048 -167
- package/templates/branded-lite/himalaya.content.json +3 -0
- package/templates/branded-lite/l10n/ar.json +74 -6
- package/templates/branded-lite/l10n/cs.json +74 -6
- package/templates/branded-lite/l10n/da.json +74 -6
- package/templates/branded-lite/l10n/de.json +74 -6
- package/templates/branded-lite/l10n/el.json +74 -6
- package/templates/branded-lite/l10n/en.json +67 -11
- package/templates/branded-lite/l10n/es.json +74 -6
- package/templates/branded-lite/l10n/fi.json +74 -6
- package/templates/branded-lite/l10n/fr.json +74 -6
- package/templates/branded-lite/l10n/he.json +57 -5
- package/templates/branded-lite/l10n/hu.json +74 -6
- package/templates/branded-lite/l10n/id.json +74 -6
- package/templates/branded-lite/l10n/it.json +74 -6
- package/templates/branded-lite/l10n/ja.json +74 -6
- package/templates/branded-lite/l10n/ko.json +74 -6
- package/templates/branded-lite/l10n/lt.json +74 -6
- package/templates/branded-lite/l10n/nl.json +74 -6
- package/templates/branded-lite/l10n/no.json +74 -6
- package/templates/branded-lite/l10n/pl.json +74 -6
- package/templates/branded-lite/l10n/pt.json +74 -6
- package/templates/branded-lite/l10n/ru.json +74 -6
- package/templates/branded-lite/l10n/sv.json +74 -6
- package/templates/branded-lite/l10n/th.json +74 -6
- package/templates/branded-lite/l10n/tr.json +74 -6
- package/templates/branded-lite/l10n/uk.json +74 -6
- package/templates/branded-lite/l10n/vi.json +74 -6
- package/templates/branded-lite/l10n/zh.json +74 -6
- package/templates/branded-lite/tier5-src/_shared/about-text.ts +8 -0
- package/templates/branded-lite/tier5-src/himi-branded-lite-account-settings/about.ts +134 -0
- package/templates/branded-lite/tier5-src/himi-branded-lite-account-settings/index.ts +3 -1
- package/templates/branded-lite/tier5-src/himi-branded-lite-account-settings/personal-info.ts +44 -5
- package/templates/branded-lite/tier5-src/himi-branded-lite-account-settings/shared.ts +21 -1
- package/templates/branded-lite/tier5-src/wix-spaces-member-detail/index.ts +247 -34
- package/templates/brandy/tier5-src/_shared/about-text.ts +8 -0
- package/templates/brandy/tier5-src/_shared/owner-editor-value.ts +164 -0
- package/templates/brandy/tier5-src/himi-branded-lite-account-settings/about.ts +134 -0
- package/templates/brandy/tier5-src/himi-branded-lite-account-settings/index.ts +3 -1
- package/templates/brandy/tier5-src/himi-branded-lite-account-settings/personal-info.ts +44 -5
- package/templates/brandy/tier5-src/himi-branded-lite-account-settings/shared.ts +21 -1
- package/templates/community-club/config.ts +7 -0
- package/templates/community-club/dev/index.ts +1813 -171
- package/templates/community-club/himalaya.content.json +3 -0
- package/templates/community-club/l10n/ar.json +151 -12
- package/templates/community-club/l10n/cs.json +151 -12
- package/templates/community-club/l10n/da.json +151 -12
- package/templates/community-club/l10n/de.json +151 -12
- package/templates/community-club/l10n/el.json +151 -12
- package/templates/community-club/l10n/en.json +107 -15
- package/templates/community-club/l10n/es.json +151 -12
- package/templates/community-club/l10n/fi.json +151 -12
- package/templates/community-club/l10n/fr.json +151 -12
- package/templates/community-club/l10n/he.json +125 -10
- package/templates/community-club/l10n/hu.json +151 -12
- package/templates/community-club/l10n/id.json +151 -12
- package/templates/community-club/l10n/it.json +151 -12
- package/templates/community-club/l10n/ja.json +151 -12
- package/templates/community-club/l10n/ko.json +151 -12
- package/templates/community-club/l10n/lt.json +151 -12
- package/templates/community-club/l10n/nl.json +151 -12
- package/templates/community-club/l10n/no.json +151 -12
- package/templates/community-club/l10n/pl.json +151 -12
- package/templates/community-club/l10n/pt.json +151 -12
- package/templates/community-club/l10n/ru.json +151 -12
- package/templates/community-club/l10n/sv.json +151 -12
- package/templates/community-club/l10n/th.json +151 -12
- package/templates/community-club/l10n/tr.json +151 -12
- package/templates/community-club/l10n/uk.json +151 -12
- package/templates/community-club/l10n/vi.json +151 -12
- package/templates/community-club/l10n/zh.json +151 -12
- package/templates/community-club/tier5-src/_shared/about-text.ts +8 -0
- package/templates/community-club/tier5-src/_shared/detail-presence.ts +51 -0
- package/templates/community-club/tier5-src/_shared/owner-editor-value.ts +164 -0
- package/templates/community-club/tier5-src/himi-branded-lite-account-settings/about.ts +134 -0
- package/templates/community-club/tier5-src/himi-branded-lite-account-settings/index.ts +3 -1
- package/templates/community-club/tier5-src/himi-branded-lite-account-settings/personal-info.ts +44 -5
- package/templates/community-club/tier5-src/himi-branded-lite-account-settings/shared.ts +21 -1
- package/templates/community-club/tier5-src/wix-spaces-member-detail/index.ts +769 -0
- package/templates/conference/tier5-src/_shared/about-text.ts +8 -0
- package/templates/conference/tier5-src/_shared/detail-presence.ts +51 -0
- package/templates/conference/tier5-src/_shared/owner-editor-value.ts +164 -0
- package/templates/conference/tier5-src/himi-branded-lite-account-settings/about.ts +134 -0
- package/templates/conference/tier5-src/himi-branded-lite-account-settings/index.ts +3 -1
- package/templates/conference/tier5-src/himi-branded-lite-account-settings/personal-info.ts +44 -5
- package/templates/conference/tier5-src/himi-branded-lite-account-settings/shared.ts +21 -1
- package/templates/events-meetups/config.ts +7 -0
- package/templates/events-meetups/dev/index.ts +1817 -175
- package/templates/events-meetups/himalaya.content.json +3 -0
- package/templates/events-meetups/l10n/ar.json +151 -12
- package/templates/events-meetups/l10n/cs.json +151 -12
- package/templates/events-meetups/l10n/da.json +151 -12
- package/templates/events-meetups/l10n/de.json +151 -12
- package/templates/events-meetups/l10n/el.json +151 -12
- package/templates/events-meetups/l10n/en.json +107 -15
- package/templates/events-meetups/l10n/es.json +151 -12
- package/templates/events-meetups/l10n/fi.json +151 -12
- package/templates/events-meetups/l10n/fr.json +151 -12
- package/templates/events-meetups/l10n/he.json +125 -10
- package/templates/events-meetups/l10n/hu.json +151 -12
- package/templates/events-meetups/l10n/id.json +151 -12
- package/templates/events-meetups/l10n/it.json +151 -12
- package/templates/events-meetups/l10n/ja.json +151 -12
- package/templates/events-meetups/l10n/ko.json +151 -12
- package/templates/events-meetups/l10n/lt.json +151 -12
- package/templates/events-meetups/l10n/nl.json +151 -12
- package/templates/events-meetups/l10n/no.json +151 -12
- package/templates/events-meetups/l10n/pl.json +151 -12
- package/templates/events-meetups/l10n/pt.json +151 -12
- package/templates/events-meetups/l10n/ru.json +151 -12
- package/templates/events-meetups/l10n/sv.json +151 -12
- package/templates/events-meetups/l10n/th.json +151 -12
- package/templates/events-meetups/l10n/tr.json +151 -12
- package/templates/events-meetups/l10n/uk.json +151 -12
- package/templates/events-meetups/l10n/vi.json +151 -12
- package/templates/events-meetups/l10n/zh.json +151 -12
- package/templates/events-meetups/tier5-src/_shared/about-text.ts +8 -0
- package/templates/events-meetups/tier5-src/_shared/detail-presence.ts +51 -0
- package/templates/events-meetups/tier5-src/_shared/owner-editor-value.ts +164 -0
- package/templates/events-meetups/tier5-src/himi-branded-lite-account-settings/about.ts +134 -0
- package/templates/events-meetups/tier5-src/himi-branded-lite-account-settings/index.ts +3 -1
- package/templates/events-meetups/tier5-src/himi-branded-lite-account-settings/personal-info.ts +44 -5
- package/templates/events-meetups/tier5-src/himi-branded-lite-account-settings/shared.ts +21 -1
- package/templates/events-meetups/tier5-src/wix-spaces-member-detail/index.ts +769 -0
- package/templates/fitness-gym/tier5-src/_shared/about-text.ts +8 -0
- package/templates/fitness-gym/tier5-src/_shared/owner-editor-value.ts +164 -0
- package/templates/fitness-gym/tier5-src/himi-branded-lite-account-settings/about.ts +134 -0
- package/templates/fitness-gym/tier5-src/himi-branded-lite-account-settings/index.ts +3 -1
- package/templates/fitness-gym/tier5-src/himi-branded-lite-account-settings/personal-info.ts +44 -5
- package/templates/fitness-gym/tier5-src/himi-branded-lite-account-settings/shared.ts +21 -1
- package/templates/gym-fitness/config.ts +7 -0
- package/templates/gym-fitness/dev/index.ts +1568 -171
- package/templates/gym-fitness/himalaya.content.json +3 -0
- package/templates/gym-fitness/l10n/ar.json +150 -6
- package/templates/gym-fitness/l10n/cs.json +150 -6
- package/templates/gym-fitness/l10n/da.json +150 -6
- package/templates/gym-fitness/l10n/de.json +150 -6
- package/templates/gym-fitness/l10n/el.json +150 -6
- package/templates/gym-fitness/l10n/en.json +102 -9
- package/templates/gym-fitness/l10n/es.json +150 -6
- package/templates/gym-fitness/l10n/fi.json +150 -6
- package/templates/gym-fitness/l10n/fr.json +150 -6
- package/templates/gym-fitness/l10n/he.json +119 -5
- package/templates/gym-fitness/l10n/hu.json +150 -6
- package/templates/gym-fitness/l10n/id.json +150 -6
- package/templates/gym-fitness/l10n/it.json +150 -6
- package/templates/gym-fitness/l10n/ja.json +150 -6
- package/templates/gym-fitness/l10n/ko.json +150 -6
- package/templates/gym-fitness/l10n/lt.json +150 -6
- package/templates/gym-fitness/l10n/nl.json +150 -6
- package/templates/gym-fitness/l10n/no.json +150 -6
- package/templates/gym-fitness/l10n/pl.json +150 -6
- package/templates/gym-fitness/l10n/pt.json +150 -6
- package/templates/gym-fitness/l10n/ru.json +150 -6
- package/templates/gym-fitness/l10n/sv.json +150 -6
- package/templates/gym-fitness/l10n/th.json +150 -6
- package/templates/gym-fitness/l10n/tr.json +150 -6
- package/templates/gym-fitness/l10n/uk.json +150 -6
- package/templates/gym-fitness/l10n/vi.json +150 -6
- package/templates/gym-fitness/l10n/zh.json +150 -6
- package/templates/gym-fitness/tier5-src/_shared/about-text.ts +8 -0
- package/templates/gym-fitness/tier5-src/himi-branded-lite-account-settings/about.ts +134 -0
- package/templates/gym-fitness/tier5-src/himi-branded-lite-account-settings/index.ts +3 -1
- package/templates/gym-fitness/tier5-src/himi-branded-lite-account-settings/personal-info.ts +44 -5
- package/templates/gym-fitness/tier5-src/himi-branded-lite-account-settings/shared.ts +21 -1
- package/templates/gym-fitness/tier5-src/wix-spaces-member-detail/index.ts +769 -0
- package/templates/medical-services/tier5-src/_shared/about-text.ts +8 -0
- package/templates/medical-services/tier5-src/_shared/detail-presence.ts +51 -0
- package/templates/medical-services/tier5-src/_shared/owner-editor-value.ts +164 -0
- package/templates/medical-services/tier5-src/himi-branded-lite-account-settings/about.ts +134 -0
- package/templates/medical-services/tier5-src/himi-branded-lite-account-settings/index.ts +3 -1
- package/templates/medical-services/tier5-src/himi-branded-lite-account-settings/personal-info.ts +44 -5
- package/templates/medical-services/tier5-src/himi-branded-lite-account-settings/shared.ts +21 -1
- package/templates/nonprofit-cause/config.ts +7 -0
- package/templates/nonprofit-cause/dev/index.ts +1816 -174
- package/templates/nonprofit-cause/himalaya.content.json +3 -0
- package/templates/nonprofit-cause/l10n/ar.json +151 -6
- package/templates/nonprofit-cause/l10n/cs.json +151 -6
- package/templates/nonprofit-cause/l10n/da.json +151 -6
- package/templates/nonprofit-cause/l10n/de.json +151 -6
- package/templates/nonprofit-cause/l10n/el.json +151 -6
- package/templates/nonprofit-cause/l10n/en.json +107 -9
- package/templates/nonprofit-cause/l10n/es.json +151 -6
- package/templates/nonprofit-cause/l10n/fi.json +151 -6
- package/templates/nonprofit-cause/l10n/fr.json +151 -6
- package/templates/nonprofit-cause/l10n/he.json +125 -5
- package/templates/nonprofit-cause/l10n/hu.json +151 -6
- package/templates/nonprofit-cause/l10n/id.json +151 -6
- package/templates/nonprofit-cause/l10n/it.json +151 -6
- package/templates/nonprofit-cause/l10n/ja.json +151 -6
- package/templates/nonprofit-cause/l10n/ko.json +151 -6
- package/templates/nonprofit-cause/l10n/lt.json +151 -6
- package/templates/nonprofit-cause/l10n/nl.json +151 -6
- package/templates/nonprofit-cause/l10n/no.json +151 -6
- package/templates/nonprofit-cause/l10n/pl.json +151 -6
- package/templates/nonprofit-cause/l10n/pt.json +151 -6
- package/templates/nonprofit-cause/l10n/ru.json +151 -6
- package/templates/nonprofit-cause/l10n/sv.json +151 -6
- package/templates/nonprofit-cause/l10n/th.json +151 -6
- package/templates/nonprofit-cause/l10n/tr.json +151 -6
- package/templates/nonprofit-cause/l10n/uk.json +151 -6
- package/templates/nonprofit-cause/l10n/vi.json +151 -6
- package/templates/nonprofit-cause/l10n/zh.json +151 -6
- package/templates/nonprofit-cause/tier5-src/_shared/about-text.ts +8 -0
- package/templates/nonprofit-cause/tier5-src/_shared/owner-editor-value.ts +164 -0
- package/templates/nonprofit-cause/tier5-src/himi-branded-lite-account-settings/about.ts +134 -0
- package/templates/nonprofit-cause/tier5-src/himi-branded-lite-account-settings/index.ts +3 -1
- package/templates/nonprofit-cause/tier5-src/himi-branded-lite-account-settings/personal-info.ts +44 -5
- package/templates/nonprofit-cause/tier5-src/himi-branded-lite-account-settings/shared.ts +21 -1
- package/templates/nonprofit-cause/tier5-src/wix-spaces-member-detail/index.ts +769 -0
- package/templates/personal-fitness-trainer/dev/index.ts +641 -75
- package/templates/personal-fitness-trainer/tier5-src/_shared/about-text.ts +8 -0
- package/templates/personal-fitness-trainer/tier5-src/_shared/group-member-count.ts +15 -0
- package/templates/personal-fitness-trainer/tier5-src/_shared/himi-media.ts +33 -0
- package/templates/personal-fitness-trainer/tier5-src/_shared/owner-editor-value.ts +164 -0
- package/templates/personal-fitness-trainer/tier5-src/himi-branded-lite-account-settings/about.ts +134 -0
- package/templates/personal-fitness-trainer/tier5-src/himi-branded-lite-account-settings/index.ts +3 -1
- package/templates/personal-fitness-trainer/tier5-src/himi-branded-lite-account-settings/personal-info.ts +44 -5
- package/templates/personal-fitness-trainer/tier5-src/himi-branded-lite-account-settings/shared.ts +21 -1
- package/templates/personal-fitness-trainer/tier5-src/wix-spaces-member-detail/index.ts +769 -0
- package/templates/personal-fitness-trainer/tokens.json +6 -0
- package/templates/podcast-creator/config.ts +7 -0
- package/templates/podcast-creator/dev/index.ts +1571 -174
- package/templates/podcast-creator/himalaya.content.json +3 -0
- package/templates/podcast-creator/l10n/ar.json +145 -6
- package/templates/podcast-creator/l10n/cs.json +145 -6
- package/templates/podcast-creator/l10n/da.json +145 -6
- package/templates/podcast-creator/l10n/de.json +145 -6
- package/templates/podcast-creator/l10n/el.json +145 -6
- package/templates/podcast-creator/l10n/en.json +102 -9
- package/templates/podcast-creator/l10n/es.json +145 -6
- package/templates/podcast-creator/l10n/fi.json +145 -6
- package/templates/podcast-creator/l10n/fr.json +145 -6
- package/templates/podcast-creator/l10n/he.json +119 -5
- package/templates/podcast-creator/l10n/hu.json +145 -6
- package/templates/podcast-creator/l10n/id.json +145 -6
- package/templates/podcast-creator/l10n/it.json +145 -6
- package/templates/podcast-creator/l10n/ja.json +145 -6
- package/templates/podcast-creator/l10n/ko.json +145 -6
- package/templates/podcast-creator/l10n/lt.json +145 -6
- package/templates/podcast-creator/l10n/nl.json +145 -6
- package/templates/podcast-creator/l10n/no.json +145 -6
- package/templates/podcast-creator/l10n/pl.json +145 -6
- package/templates/podcast-creator/l10n/pt.json +145 -6
- package/templates/podcast-creator/l10n/ru.json +145 -6
- package/templates/podcast-creator/l10n/sv.json +145 -6
- package/templates/podcast-creator/l10n/th.json +145 -6
- package/templates/podcast-creator/l10n/tr.json +145 -6
- package/templates/podcast-creator/l10n/uk.json +145 -6
- package/templates/podcast-creator/l10n/vi.json +145 -6
- package/templates/podcast-creator/l10n/zh.json +145 -6
- package/templates/podcast-creator/tier5-src/_shared/about-text.ts +8 -0
- package/templates/podcast-creator/tier5-src/_shared/owner-editor-value.ts +164 -0
- package/templates/podcast-creator/tier5-src/himi-branded-lite-account-settings/about.ts +134 -0
- package/templates/podcast-creator/tier5-src/himi-branded-lite-account-settings/index.ts +3 -1
- package/templates/podcast-creator/tier5-src/himi-branded-lite-account-settings/personal-info.ts +44 -5
- package/templates/podcast-creator/tier5-src/himi-branded-lite-account-settings/shared.ts +21 -1
- package/templates/podcast-creator/tier5-src/wix-spaces-member-detail/index.ts +769 -0
- package/templates/portfolio-creative/config.ts +7 -0
- package/templates/portfolio-creative/dev/index.ts +1571 -174
- package/templates/portfolio-creative/himalaya.content.json +3 -0
- package/templates/portfolio-creative/l10n/ar.json +150 -12
- package/templates/portfolio-creative/l10n/cs.json +150 -12
- package/templates/portfolio-creative/l10n/da.json +150 -12
- package/templates/portfolio-creative/l10n/de.json +150 -12
- package/templates/portfolio-creative/l10n/el.json +150 -12
- package/templates/portfolio-creative/l10n/en.json +102 -15
- package/templates/portfolio-creative/l10n/es.json +150 -12
- package/templates/portfolio-creative/l10n/fi.json +150 -12
- package/templates/portfolio-creative/l10n/fr.json +150 -12
- package/templates/portfolio-creative/l10n/he.json +119 -10
- package/templates/portfolio-creative/l10n/hu.json +150 -12
- package/templates/portfolio-creative/l10n/id.json +150 -12
- package/templates/portfolio-creative/l10n/it.json +150 -12
- package/templates/portfolio-creative/l10n/ja.json +150 -12
- package/templates/portfolio-creative/l10n/ko.json +150 -12
- package/templates/portfolio-creative/l10n/lt.json +150 -12
- package/templates/portfolio-creative/l10n/nl.json +150 -12
- package/templates/portfolio-creative/l10n/no.json +150 -12
- package/templates/portfolio-creative/l10n/pl.json +150 -12
- package/templates/portfolio-creative/l10n/pt.json +150 -12
- package/templates/portfolio-creative/l10n/ru.json +150 -12
- package/templates/portfolio-creative/l10n/sv.json +150 -12
- package/templates/portfolio-creative/l10n/th.json +150 -12
- package/templates/portfolio-creative/l10n/tr.json +150 -12
- package/templates/portfolio-creative/l10n/uk.json +150 -12
- package/templates/portfolio-creative/l10n/vi.json +150 -12
- package/templates/portfolio-creative/l10n/zh.json +150 -12
- package/templates/portfolio-creative/tier5-src/_shared/about-text.ts +8 -0
- package/templates/portfolio-creative/tier5-src/himi-branded-lite-account-settings/about.ts +134 -0
- package/templates/portfolio-creative/tier5-src/himi-branded-lite-account-settings/index.ts +3 -1
- package/templates/portfolio-creative/tier5-src/himi-branded-lite-account-settings/personal-info.ts +44 -5
- package/templates/portfolio-creative/tier5-src/himi-branded-lite-account-settings/shared.ts +21 -1
- package/templates/portfolio-creative/tier5-src/wix-spaces-member-detail/index.ts +769 -0
- package/templates/professional-services/tier5-src/_shared/about-text.ts +8 -0
- package/templates/professional-services/tier5-src/_shared/owner-editor-value.ts +164 -0
- package/templates/professional-services/tier5-src/himi-branded-lite-account-settings/about.ts +134 -0
- package/templates/professional-services/tier5-src/himi-branded-lite-account-settings/index.ts +3 -1
- package/templates/professional-services/tier5-src/himi-branded-lite-account-settings/personal-info.ts +44 -5
- package/templates/professional-services/tier5-src/himi-branded-lite-account-settings/shared.ts +21 -1
- package/templates/restaurant/config.ts +7 -0
- package/templates/restaurant/dev/index.ts +1571 -174
- package/templates/restaurant/himalaya.content.json +3 -0
- package/templates/restaurant/l10n/ar.json +145 -6
- package/templates/restaurant/l10n/cs.json +145 -6
- package/templates/restaurant/l10n/da.json +145 -6
- package/templates/restaurant/l10n/de.json +145 -6
- package/templates/restaurant/l10n/el.json +145 -6
- package/templates/restaurant/l10n/en.json +102 -9
- package/templates/restaurant/l10n/es.json +145 -6
- package/templates/restaurant/l10n/fi.json +145 -6
- package/templates/restaurant/l10n/fr.json +145 -6
- package/templates/restaurant/l10n/he.json +119 -5
- package/templates/restaurant/l10n/hu.json +145 -6
- package/templates/restaurant/l10n/id.json +145 -6
- package/templates/restaurant/l10n/it.json +145 -6
- package/templates/restaurant/l10n/ja.json +145 -6
- package/templates/restaurant/l10n/ko.json +145 -6
- package/templates/restaurant/l10n/lt.json +145 -6
- package/templates/restaurant/l10n/nl.json +145 -6
- package/templates/restaurant/l10n/no.json +145 -6
- package/templates/restaurant/l10n/pl.json +145 -6
- package/templates/restaurant/l10n/pt.json +145 -6
- package/templates/restaurant/l10n/ru.json +145 -6
- package/templates/restaurant/l10n/sv.json +145 -6
- package/templates/restaurant/l10n/th.json +145 -6
- package/templates/restaurant/l10n/tr.json +145 -6
- package/templates/restaurant/l10n/uk.json +145 -6
- package/templates/restaurant/l10n/vi.json +145 -6
- package/templates/restaurant/l10n/zh.json +145 -6
- package/templates/restaurant/tier5-src/_shared/about-text.ts +8 -0
- package/templates/restaurant/tier5-src/_shared/owner-editor-value.ts +164 -0
- package/templates/restaurant/tier5-src/himi-branded-lite-account-settings/about.ts +134 -0
- package/templates/restaurant/tier5-src/himi-branded-lite-account-settings/index.ts +3 -1
- package/templates/restaurant/tier5-src/himi-branded-lite-account-settings/personal-info.ts +44 -5
- package/templates/restaurant/tier5-src/himi-branded-lite-account-settings/shared.ts +21 -1
- package/templates/restaurant/tier5-src/wix-spaces-member-detail/index.ts +769 -0
- package/templates/retail-store/config.ts +7 -0
- package/templates/retail-store/dev/index.ts +1572 -175
- package/templates/retail-store/himalaya.content.json +3 -0
- package/templates/retail-store/l10n/ar.json +150 -12
- package/templates/retail-store/l10n/cs.json +150 -12
- package/templates/retail-store/l10n/da.json +150 -12
- package/templates/retail-store/l10n/de.json +150 -12
- package/templates/retail-store/l10n/el.json +150 -12
- package/templates/retail-store/l10n/en.json +102 -15
- package/templates/retail-store/l10n/es.json +150 -12
- package/templates/retail-store/l10n/fi.json +150 -12
- package/templates/retail-store/l10n/fr.json +150 -12
- package/templates/retail-store/l10n/he.json +119 -10
- package/templates/retail-store/l10n/hu.json +150 -12
- package/templates/retail-store/l10n/id.json +150 -12
- package/templates/retail-store/l10n/it.json +150 -12
- package/templates/retail-store/l10n/ja.json +150 -12
- package/templates/retail-store/l10n/ko.json +150 -12
- package/templates/retail-store/l10n/lt.json +150 -12
- package/templates/retail-store/l10n/nl.json +150 -12
- package/templates/retail-store/l10n/no.json +150 -12
- package/templates/retail-store/l10n/pl.json +150 -12
- package/templates/retail-store/l10n/pt.json +150 -12
- package/templates/retail-store/l10n/ru.json +150 -12
- package/templates/retail-store/l10n/sv.json +150 -12
- package/templates/retail-store/l10n/th.json +150 -12
- package/templates/retail-store/l10n/tr.json +150 -12
- package/templates/retail-store/l10n/uk.json +150 -12
- package/templates/retail-store/l10n/vi.json +150 -12
- package/templates/retail-store/l10n/zh.json +150 -12
- package/templates/retail-store/tier5-src/_shared/about-text.ts +8 -0
- package/templates/retail-store/tier5-src/himi-branded-lite-account-settings/about.ts +134 -0
- package/templates/retail-store/tier5-src/himi-branded-lite-account-settings/index.ts +3 -1
- package/templates/retail-store/tier5-src/himi-branded-lite-account-settings/personal-info.ts +44 -5
- package/templates/retail-store/tier5-src/himi-branded-lite-account-settings/shared.ts +21 -1
- package/templates/retail-store/tier5-src/wix-spaces-member-detail/index.ts +769 -0
- package/templates/salon-spa/tier5-src/_shared/about-text.ts +8 -0
- package/templates/salon-spa/tier5-src/_shared/owner-editor-value.ts +164 -0
- package/templates/salon-spa/tier5-src/himi-branded-lite-account-settings/about.ts +134 -0
- package/templates/salon-spa/tier5-src/himi-branded-lite-account-settings/index.ts +3 -1
- package/templates/salon-spa/tier5-src/himi-branded-lite-account-settings/personal-info.ts +44 -5
- package/templates/salon-spa/tier5-src/himi-branded-lite-account-settings/shared.ts +21 -1
- package/templates/wholesale-store/tier5-src/_shared/about-text.ts +8 -0
- package/templates/wholesale-store/tier5-src/himi-branded-lite-account-settings/about.ts +134 -0
- package/templates/wholesale-store/tier5-src/himi-branded-lite-account-settings/index.ts +3 -1
- package/templates/wholesale-store/tier5-src/himi-branded-lite-account-settings/personal-info.ts +44 -5
- package/templates/wholesale-store/tier5-src/himi-branded-lite-account-settings/shared.ts +21 -1
- package/templates/yoga-studio/config.ts +7 -0
- package/templates/yoga-studio/dev/index.ts +1567 -170
- package/templates/yoga-studio/himalaya.content.json +3 -0
- package/templates/yoga-studio/l10n/ar.json +145 -6
- package/templates/yoga-studio/l10n/cs.json +145 -6
- package/templates/yoga-studio/l10n/da.json +145 -6
- package/templates/yoga-studio/l10n/de.json +145 -6
- package/templates/yoga-studio/l10n/el.json +145 -6
- package/templates/yoga-studio/l10n/en.json +102 -9
- package/templates/yoga-studio/l10n/es.json +145 -6
- package/templates/yoga-studio/l10n/fi.json +145 -6
- package/templates/yoga-studio/l10n/fr.json +145 -6
- package/templates/yoga-studio/l10n/he.json +119 -5
- package/templates/yoga-studio/l10n/hu.json +145 -6
- package/templates/yoga-studio/l10n/id.json +145 -6
- package/templates/yoga-studio/l10n/it.json +145 -6
- package/templates/yoga-studio/l10n/ja.json +145 -6
- package/templates/yoga-studio/l10n/ko.json +145 -6
- package/templates/yoga-studio/l10n/lt.json +145 -6
- package/templates/yoga-studio/l10n/nl.json +145 -6
- package/templates/yoga-studio/l10n/no.json +145 -6
- package/templates/yoga-studio/l10n/pl.json +145 -6
- package/templates/yoga-studio/l10n/pt.json +145 -6
- package/templates/yoga-studio/l10n/ru.json +145 -6
- package/templates/yoga-studio/l10n/sv.json +145 -6
- package/templates/yoga-studio/l10n/th.json +145 -6
- package/templates/yoga-studio/l10n/tr.json +145 -6
- package/templates/yoga-studio/l10n/uk.json +145 -6
- package/templates/yoga-studio/l10n/vi.json +145 -6
- package/templates/yoga-studio/l10n/zh.json +145 -6
- package/templates/yoga-studio/tier5-src/_shared/about-text.ts +8 -0
- package/templates/yoga-studio/tier5-src/_shared/owner-editor-value.ts +164 -0
- package/templates/yoga-studio/tier5-src/himi-branded-lite-account-settings/about.ts +134 -0
- package/templates/yoga-studio/tier5-src/himi-branded-lite-account-settings/index.ts +3 -1
- package/templates/yoga-studio/tier5-src/himi-branded-lite-account-settings/personal-info.ts +44 -5
- package/templates/yoga-studio/tier5-src/himi-branded-lite-account-settings/shared.ts +21 -1
- package/templates/yoga-studio/tier5-src/wix-spaces-member-detail/index.ts +769 -0
- package/templates/beauty-salon/tier5-src/wix-spaces-view-profile/index.ts +0 -119
- package/templates/branded-lite/tier5-src/wix-spaces-view-profile/index.ts +0 -119
- package/templates/community-club/tier5-src/wix-spaces-view-profile/index.ts +0 -119
- package/templates/events-meetups/tier5-src/wix-spaces-view-profile/index.ts +0 -119
- package/templates/gym-fitness/tier5-src/wix-spaces-view-profile/index.ts +0 -119
- package/templates/nonprofit-cause/tier5-src/wix-spaces-view-profile/index.ts +0 -119
- package/templates/personal-fitness-trainer/tier5-src/wix-spaces-view-profile/index.ts +0 -119
- package/templates/podcast-creator/tier5-src/wix-spaces-view-profile/index.ts +0 -119
- package/templates/portfolio-creative/tier5-src/wix-spaces-view-profile/index.ts +0 -119
- package/templates/restaurant/tier5-src/wix-spaces-view-profile/index.ts +0 -119
- package/templates/retail-store/tier5-src/wix-spaces-view-profile/index.ts +0 -119
- package/templates/yoga-studio/tier5-src/wix-spaces-view-profile/index.ts +0 -119
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
// Tier-5 bundle: Wix Spaces clone — View Profile (member's own public profile).
|
|
2
|
-
// Prefer site Members Area (`GET /members/v1/members/my`) + session email; never
|
|
3
|
-
// paint the seeded "apptestercoowner" demo identity when the session is a real
|
|
4
|
-
// member (or a guest — show honesty instead).
|
|
5
|
-
import { defineService } from "@himalaya/state";
|
|
6
|
-
import { memberAccess } from "../_shared/member-access.js";
|
|
7
|
-
import { getMyData, displayName } from "@himalaya/wix-users";
|
|
8
|
-
|
|
9
|
-
// `needsSignIn` / `noSignIn` drive the shared member gate: a guest gets the
|
|
10
|
-
// gate with a Sign in button and no placeholder profile. `profileHidden` stays true until
|
|
11
|
-
// `load` has resolved a member, so a guest never glimpses the placeholder avatar while
|
|
12
|
-
// the membership check is still running; `hideLoading` is false for exactly that moment,
|
|
13
|
-
// so the screen shows a loading line instead of going blank.
|
|
14
|
-
interface S { status: "loading" | "ready"; name: string; handle: string; about: string; initial: string; photo: string; needsSignIn: boolean; noSignIn: boolean; profileHidden: boolean; hideLoading: boolean; hideError: boolean; hideAbout: boolean }
|
|
15
|
-
|
|
16
|
-
const EMPTY: S = {
|
|
17
|
-
status: "loading",
|
|
18
|
-
name: "",
|
|
19
|
-
handle: "",
|
|
20
|
-
about: "No info to display.",
|
|
21
|
-
initial: "?",
|
|
22
|
-
photo: "",
|
|
23
|
-
needsSignIn: false,
|
|
24
|
-
noSignIn: true,
|
|
25
|
-
profileHidden: true,
|
|
26
|
-
hideLoading: false,
|
|
27
|
-
hideError: true,
|
|
28
|
-
hideAbout: false,
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
// The SAME member check create-post and orders use (`memberAccess`: the host's
|
|
32
|
-
// memberIdentity, falling back to wix-users only on hosts that predate that action), so
|
|
33
|
-
// one shared gate never gives two answers in one app.
|
|
34
|
-
async function sessionEmail(): Promise<string> {
|
|
35
|
-
return (await memberAccess()).email;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
function wixApi() {
|
|
39
|
-
return (globalThis as { himalaya?: { wixApi?: { call: (m: string, p: string, b?: unknown) => Promise<unknown> } } }).himalaya?.wixApi;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
function fromParts(name: string, handleRaw: string, about: string, photo = ""): S {
|
|
43
|
-
const clean = name.trim();
|
|
44
|
-
const handle = "@" + (handleRaw || clean || "member").replace(/\s+/g, "").replace(/^@+/, "").toLowerCase();
|
|
45
|
-
const initial = (clean.split(/\s+/).filter(Boolean).map((w) => w[0]).join("").slice(0, 2) || "?").toUpperCase();
|
|
46
|
-
return { status: "ready", name: clean || "Member", handle, about: about || "No info to display.", initial, photo, needsSignIn: false, noSignIn: true, profileHidden: false, hideLoading: true, hideError: true, hideAbout: false };
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
async function readProfile(): Promise<S> {
|
|
50
|
-
const email = await sessionEmail();
|
|
51
|
-
if (!email) {
|
|
52
|
-
return {
|
|
53
|
-
status: "ready",
|
|
54
|
-
// Kept for hosts without the shared member gate (the Spaces clone renders these
|
|
55
|
-
// fields directly); branded-lite hides the profile block behind `profileHidden`.
|
|
56
|
-
name: "Sign in to view your profile",
|
|
57
|
-
handle: "",
|
|
58
|
-
about: "Your public profile is available after you sign in from Account.",
|
|
59
|
-
initial: "?",
|
|
60
|
-
photo: "",
|
|
61
|
-
needsSignIn: true,
|
|
62
|
-
noSignIn: false,
|
|
63
|
-
profileHidden: true,
|
|
64
|
-
hideLoading: true,
|
|
65
|
-
hideError: true,
|
|
66
|
-
hideAbout: false,
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
try {
|
|
70
|
-
const api = wixApi();
|
|
71
|
-
if (api) {
|
|
72
|
-
const res = (await api.call("GET", "/members/v1/members/my?fieldSet=FULL")) as {
|
|
73
|
-
member?: {
|
|
74
|
-
loginEmail?: string;
|
|
75
|
-
contact?: { firstName?: string; lastName?: string };
|
|
76
|
-
profile?: { nickname?: string; slug?: string; title?: string; photo?: { url?: string } };
|
|
77
|
-
};
|
|
78
|
-
};
|
|
79
|
-
const m = res.member;
|
|
80
|
-
if (m) {
|
|
81
|
-
const nick = m.profile?.nickname?.trim() || "";
|
|
82
|
-
const full = [m.contact?.firstName, m.contact?.lastName].filter(Boolean).join(" ").trim();
|
|
83
|
-
const name = full || nick || m.loginEmail || email;
|
|
84
|
-
const slug = m.profile?.slug || nick || name;
|
|
85
|
-
const about = m.profile?.title || "No info to display.";
|
|
86
|
-
return fromParts(name, slug, about, m.profile?.photo?.url || "");
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
} catch { /* fall through to users my-data / email */ }
|
|
90
|
-
try {
|
|
91
|
-
const d = await getMyData();
|
|
92
|
-
const name = displayName(d) || email;
|
|
93
|
-
const dd = d as unknown as { nickname?: string; slug?: string; about?: string; aboutPlain?: string; profile?: { photo?: { url?: string } }; photo?: { url?: string } };
|
|
94
|
-
return fromParts(
|
|
95
|
-
name,
|
|
96
|
-
dd.slug || dd.nickname || name,
|
|
97
|
-
dd.aboutPlain || dd.about || "No info to display.",
|
|
98
|
-
dd.profile?.photo?.url || dd.photo?.url || "",
|
|
99
|
-
);
|
|
100
|
-
} catch {
|
|
101
|
-
// Session identity is still known; missing profile data is not an empty biography.
|
|
102
|
-
return { ...fromParts(email, email.split("@")[0] || email, ""), about: "Profile details could not be loaded. Please try again.", hideError: false, hideAbout: true };
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
let generation = 0;
|
|
106
|
-
const svc = defineService<S, { load: (s: S) => Promise<S | undefined> }>("spacesViewProfile", {
|
|
107
|
-
state: { ...EMPTY },
|
|
108
|
-
notHydrated: Object.keys(EMPTY) as (keyof S & string)[],
|
|
109
|
-
actions: {
|
|
110
|
-
load: async () => {
|
|
111
|
-
const request = ++generation;
|
|
112
|
-
const next = await readProfile();
|
|
113
|
-
return request === generation ? next : undefined;
|
|
114
|
-
},
|
|
115
|
-
},
|
|
116
|
-
});
|
|
117
|
-
if (!(globalThis as { himalaya?: { hydrationOptOut?: boolean } }).himalaya?.hydrationOptOut) Object.assign(svc.getState(), EMPTY);
|
|
118
|
-
void svc.load();
|
|
119
|
-
export { svc };
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
// Tier-5 bundle: Wix Spaces clone — View Profile (member's own public profile).
|
|
2
|
-
// Prefer site Members Area (`GET /members/v1/members/my`) + session email; never
|
|
3
|
-
// paint the seeded "apptestercoowner" demo identity when the session is a real
|
|
4
|
-
// member (or a guest — show honesty instead).
|
|
5
|
-
import { defineService } from "@himalaya/state";
|
|
6
|
-
import { memberAccess } from "../_shared/member-access.js";
|
|
7
|
-
import { getMyData, displayName } from "@himalaya/wix-users";
|
|
8
|
-
|
|
9
|
-
// `needsSignIn` / `noSignIn` drive the shared member gate: a guest gets the
|
|
10
|
-
// gate with a Sign in button and no placeholder profile. `profileHidden` stays true until
|
|
11
|
-
// `load` has resolved a member, so a guest never glimpses the placeholder avatar while
|
|
12
|
-
// the membership check is still running; `hideLoading` is false for exactly that moment,
|
|
13
|
-
// so the screen shows a loading line instead of going blank.
|
|
14
|
-
interface S { status: "loading" | "ready"; name: string; handle: string; about: string; initial: string; photo: string; needsSignIn: boolean; noSignIn: boolean; profileHidden: boolean; hideLoading: boolean; hideError: boolean; hideAbout: boolean }
|
|
15
|
-
|
|
16
|
-
const EMPTY: S = {
|
|
17
|
-
status: "loading",
|
|
18
|
-
name: "",
|
|
19
|
-
handle: "",
|
|
20
|
-
about: "No info to display.",
|
|
21
|
-
initial: "?",
|
|
22
|
-
photo: "",
|
|
23
|
-
needsSignIn: false,
|
|
24
|
-
noSignIn: true,
|
|
25
|
-
profileHidden: true,
|
|
26
|
-
hideLoading: false,
|
|
27
|
-
hideError: true,
|
|
28
|
-
hideAbout: false,
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
// The SAME member check create-post and orders use (`memberAccess`: the host's
|
|
32
|
-
// memberIdentity, falling back to wix-users only on hosts that predate that action), so
|
|
33
|
-
// one shared gate never gives two answers in one app.
|
|
34
|
-
async function sessionEmail(): Promise<string> {
|
|
35
|
-
return (await memberAccess()).email;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
function wixApi() {
|
|
39
|
-
return (globalThis as { himalaya?: { wixApi?: { call: (m: string, p: string, b?: unknown) => Promise<unknown> } } }).himalaya?.wixApi;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
function fromParts(name: string, handleRaw: string, about: string, photo = ""): S {
|
|
43
|
-
const clean = name.trim();
|
|
44
|
-
const handle = "@" + (handleRaw || clean || "member").replace(/\s+/g, "").replace(/^@+/, "").toLowerCase();
|
|
45
|
-
const initial = (clean.split(/\s+/).filter(Boolean).map((w) => w[0]).join("").slice(0, 2) || "?").toUpperCase();
|
|
46
|
-
return { status: "ready", name: clean || "Member", handle, about: about || "No info to display.", initial, photo, needsSignIn: false, noSignIn: true, profileHidden: false, hideLoading: true, hideError: true, hideAbout: false };
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
async function readProfile(): Promise<S> {
|
|
50
|
-
const email = await sessionEmail();
|
|
51
|
-
if (!email) {
|
|
52
|
-
return {
|
|
53
|
-
status: "ready",
|
|
54
|
-
// Kept for hosts without the shared member gate (the Spaces clone renders these
|
|
55
|
-
// fields directly); branded-lite hides the profile block behind `profileHidden`.
|
|
56
|
-
name: "Sign in to view your profile",
|
|
57
|
-
handle: "",
|
|
58
|
-
about: "Your public profile is available after you sign in from Account.",
|
|
59
|
-
initial: "?",
|
|
60
|
-
photo: "",
|
|
61
|
-
needsSignIn: true,
|
|
62
|
-
noSignIn: false,
|
|
63
|
-
profileHidden: true,
|
|
64
|
-
hideLoading: true,
|
|
65
|
-
hideError: true,
|
|
66
|
-
hideAbout: false,
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
try {
|
|
70
|
-
const api = wixApi();
|
|
71
|
-
if (api) {
|
|
72
|
-
const res = (await api.call("GET", "/members/v1/members/my?fieldSet=FULL")) as {
|
|
73
|
-
member?: {
|
|
74
|
-
loginEmail?: string;
|
|
75
|
-
contact?: { firstName?: string; lastName?: string };
|
|
76
|
-
profile?: { nickname?: string; slug?: string; title?: string; photo?: { url?: string } };
|
|
77
|
-
};
|
|
78
|
-
};
|
|
79
|
-
const m = res.member;
|
|
80
|
-
if (m) {
|
|
81
|
-
const nick = m.profile?.nickname?.trim() || "";
|
|
82
|
-
const full = [m.contact?.firstName, m.contact?.lastName].filter(Boolean).join(" ").trim();
|
|
83
|
-
const name = full || nick || m.loginEmail || email;
|
|
84
|
-
const slug = m.profile?.slug || nick || name;
|
|
85
|
-
const about = m.profile?.title || "No info to display.";
|
|
86
|
-
return fromParts(name, slug, about, m.profile?.photo?.url || "");
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
} catch { /* fall through to users my-data / email */ }
|
|
90
|
-
try {
|
|
91
|
-
const d = await getMyData();
|
|
92
|
-
const name = displayName(d) || email;
|
|
93
|
-
const dd = d as unknown as { nickname?: string; slug?: string; about?: string; aboutPlain?: string; profile?: { photo?: { url?: string } }; photo?: { url?: string } };
|
|
94
|
-
return fromParts(
|
|
95
|
-
name,
|
|
96
|
-
dd.slug || dd.nickname || name,
|
|
97
|
-
dd.aboutPlain || dd.about || "No info to display.",
|
|
98
|
-
dd.profile?.photo?.url || dd.photo?.url || "",
|
|
99
|
-
);
|
|
100
|
-
} catch {
|
|
101
|
-
// Session identity is still known; missing profile data is not an empty biography.
|
|
102
|
-
return { ...fromParts(email, email.split("@")[0] || email, ""), about: "Profile details could not be loaded. Please try again.", hideError: false, hideAbout: true };
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
let generation = 0;
|
|
106
|
-
const svc = defineService<S, { load: (s: S) => Promise<S | undefined> }>("spacesViewProfile", {
|
|
107
|
-
state: { ...EMPTY },
|
|
108
|
-
notHydrated: Object.keys(EMPTY) as (keyof S & string)[],
|
|
109
|
-
actions: {
|
|
110
|
-
load: async () => {
|
|
111
|
-
const request = ++generation;
|
|
112
|
-
const next = await readProfile();
|
|
113
|
-
return request === generation ? next : undefined;
|
|
114
|
-
},
|
|
115
|
-
},
|
|
116
|
-
});
|
|
117
|
-
if (!(globalThis as { himalaya?: { hydrationOptOut?: boolean } }).himalaya?.hydrationOptOut) Object.assign(svc.getState(), EMPTY);
|
|
118
|
-
void svc.load();
|
|
119
|
-
export { svc };
|