@wix/himalaya-cli 0.1781.0 → 0.1783.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/core/dev-server/src/builder.d.ts +3 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/schema.d.ts +8 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/site-shell.d.ts +6 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/validator.d.ts +6 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/comments-v1/src/extensions.d.ts +68 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/core.mjs +12 -5
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/sdui.mjs +3 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-comments.mjs +126 -18
- package/dist/browser-plane/assets.json +5 -5
- package/dist/browser-plane/preview-deferred/{d71e5b22a5ff1965fd887118ee8b2a74497b48a88f4459c9800569457e1fb547.bin → ef0d32c6770cbe9b695a3774a00fc3da19cd4f8655784f5cd935938054a34541.bin} +1 -1
- package/dist/browser-plane/sw.js +6 -6
- package/dist/cli.mjs +85 -49
- package/dist/preview-assets.generated.bin +0 -0
- package/guides/component-reference.json +1 -1
- package/guides/component-reference.md +4 -0
- package/guides/release-notes.md +31 -0
- package/guides/sdk-reference.json +62 -1
- package/guides/wix-business-context.md +1 -1
- package/package.json +2 -2
- package/templates/beauty-salon/config.ts +1 -1
- package/templates/beauty-salon/dev/index.ts +2684 -916
- package/templates/beauty-salon/l10n/ar.json +95 -36
- package/templates/beauty-salon/l10n/cs.json +95 -36
- package/templates/beauty-salon/l10n/da.json +95 -36
- package/templates/beauty-salon/l10n/de.json +95 -36
- package/templates/beauty-salon/l10n/el.json +95 -36
- package/templates/beauty-salon/l10n/en.json +71 -15
- package/templates/beauty-salon/l10n/es.json +95 -36
- package/templates/beauty-salon/l10n/fi.json +95 -36
- package/templates/beauty-salon/l10n/fr.json +95 -36
- package/templates/beauty-salon/l10n/he.json +78 -29
- package/templates/beauty-salon/l10n/hu.json +95 -36
- package/templates/beauty-salon/l10n/id.json +95 -36
- package/templates/beauty-salon/l10n/it.json +95 -36
- package/templates/beauty-salon/l10n/ja.json +95 -36
- package/templates/beauty-salon/l10n/ko.json +95 -36
- package/templates/beauty-salon/l10n/lt.json +95 -36
- package/templates/beauty-salon/l10n/nl.json +95 -36
- package/templates/beauty-salon/l10n/no.json +95 -36
- package/templates/beauty-salon/l10n/pl.json +95 -36
- package/templates/beauty-salon/l10n/pt.json +95 -36
- package/templates/beauty-salon/l10n/ru.json +95 -36
- package/templates/beauty-salon/l10n/sv.json +95 -36
- package/templates/beauty-salon/l10n/th.json +95 -36
- package/templates/beauty-salon/l10n/tr.json +95 -36
- package/templates/beauty-salon/l10n/uk.json +95 -36
- package/templates/beauty-salon/l10n/vi.json +95 -36
- package/templates/beauty-salon/l10n/zh.json +95 -36
- package/templates/beauty-salon/tier5-src/_shared/himi-blog-post-row.ts +5 -1
- package/templates/beauty-salon/tier5-src/_shared/relative-time.ts +21 -0
- package/templates/beauty-salon/tier5-src/himi-blog-feed/index.ts +9 -0
- package/templates/beauty-salon/tier5-src/himi-blog-post/index.ts +501 -50
- package/templates/beauty-salon/tier5-src/himi-branded-lite-cart/index.ts +98 -6
- package/templates/branded-lite/config.ts +1 -1
- package/templates/branded-lite/dev/index.ts +2686 -930
- package/templates/branded-lite/l10n/ar.json +80 -41
- package/templates/branded-lite/l10n/cs.json +80 -41
- package/templates/branded-lite/l10n/da.json +80 -41
- package/templates/branded-lite/l10n/de.json +80 -41
- package/templates/branded-lite/l10n/el.json +80 -41
- package/templates/branded-lite/l10n/en.json +71 -20
- package/templates/branded-lite/l10n/es.json +80 -41
- package/templates/branded-lite/l10n/fi.json +80 -41
- package/templates/branded-lite/l10n/fr.json +80 -41
- package/templates/branded-lite/l10n/he.json +66 -33
- package/templates/branded-lite/l10n/hu.json +80 -41
- package/templates/branded-lite/l10n/id.json +80 -41
- package/templates/branded-lite/l10n/it.json +80 -41
- package/templates/branded-lite/l10n/ja.json +80 -41
- package/templates/branded-lite/l10n/ko.json +80 -41
- package/templates/branded-lite/l10n/lt.json +80 -41
- package/templates/branded-lite/l10n/nl.json +80 -41
- package/templates/branded-lite/l10n/no.json +80 -41
- package/templates/branded-lite/l10n/pl.json +80 -41
- package/templates/branded-lite/l10n/pt.json +80 -41
- package/templates/branded-lite/l10n/ru.json +80 -41
- package/templates/branded-lite/l10n/sv.json +80 -41
- package/templates/branded-lite/l10n/th.json +80 -41
- package/templates/branded-lite/l10n/tr.json +80 -41
- package/templates/branded-lite/l10n/uk.json +80 -41
- package/templates/branded-lite/l10n/vi.json +80 -41
- package/templates/branded-lite/l10n/zh.json +80 -41
- package/templates/branded-lite/tier5-src/_shared/himi-blog-post-row.ts +5 -1
- package/templates/branded-lite/tier5-src/himi-blog-feed/index.ts +9 -0
- package/templates/branded-lite/tier5-src/himi-blog-post/index.ts +501 -50
- package/templates/branded-lite/tier5-src/himi-branded-lite-cart/index.ts +98 -6
- package/templates/branded-lite/tier5-src/himi-branded-lite-header-badges/index.ts +39 -7
- package/templates/community-club/config.ts +1 -1
- package/templates/community-club/dev/index.ts +2742 -974
- package/templates/community-club/l10n/ar.json +95 -36
- package/templates/community-club/l10n/cs.json +95 -36
- package/templates/community-club/l10n/da.json +95 -36
- package/templates/community-club/l10n/de.json +95 -36
- package/templates/community-club/l10n/el.json +95 -36
- package/templates/community-club/l10n/en.json +71 -15
- package/templates/community-club/l10n/es.json +95 -36
- package/templates/community-club/l10n/fi.json +95 -36
- package/templates/community-club/l10n/fr.json +95 -36
- package/templates/community-club/l10n/he.json +78 -29
- package/templates/community-club/l10n/hu.json +95 -36
- package/templates/community-club/l10n/id.json +95 -36
- package/templates/community-club/l10n/it.json +95 -36
- package/templates/community-club/l10n/ja.json +95 -36
- package/templates/community-club/l10n/ko.json +95 -36
- package/templates/community-club/l10n/lt.json +95 -36
- package/templates/community-club/l10n/nl.json +95 -36
- package/templates/community-club/l10n/no.json +95 -36
- package/templates/community-club/l10n/pl.json +95 -36
- package/templates/community-club/l10n/pt.json +95 -36
- package/templates/community-club/l10n/ru.json +95 -36
- package/templates/community-club/l10n/sv.json +95 -36
- package/templates/community-club/l10n/th.json +95 -36
- package/templates/community-club/l10n/tr.json +95 -36
- package/templates/community-club/l10n/uk.json +95 -36
- package/templates/community-club/l10n/vi.json +95 -36
- package/templates/community-club/l10n/zh.json +95 -36
- package/templates/community-club/tier5-src/_shared/himi-blog-post-row.ts +5 -1
- package/templates/community-club/tier5-src/_shared/relative-time.ts +21 -0
- package/templates/community-club/tier5-src/himi-blog-feed/index.ts +9 -0
- package/templates/community-club/tier5-src/himi-blog-post/index.ts +501 -50
- package/templates/events-meetups/config.ts +1 -1
- package/templates/events-meetups/dev/index.ts +2705 -937
- package/templates/events-meetups/l10n/ar.json +95 -36
- package/templates/events-meetups/l10n/cs.json +95 -36
- package/templates/events-meetups/l10n/da.json +95 -36
- package/templates/events-meetups/l10n/de.json +95 -36
- package/templates/events-meetups/l10n/el.json +95 -36
- package/templates/events-meetups/l10n/en.json +71 -15
- package/templates/events-meetups/l10n/es.json +95 -36
- package/templates/events-meetups/l10n/fi.json +95 -36
- package/templates/events-meetups/l10n/fr.json +95 -36
- package/templates/events-meetups/l10n/he.json +78 -29
- package/templates/events-meetups/l10n/hu.json +95 -36
- package/templates/events-meetups/l10n/id.json +95 -36
- package/templates/events-meetups/l10n/it.json +95 -36
- package/templates/events-meetups/l10n/ja.json +95 -36
- package/templates/events-meetups/l10n/ko.json +95 -36
- package/templates/events-meetups/l10n/lt.json +95 -36
- package/templates/events-meetups/l10n/nl.json +95 -36
- package/templates/events-meetups/l10n/no.json +95 -36
- package/templates/events-meetups/l10n/pl.json +95 -36
- package/templates/events-meetups/l10n/pt.json +95 -36
- package/templates/events-meetups/l10n/ru.json +95 -36
- package/templates/events-meetups/l10n/sv.json +95 -36
- package/templates/events-meetups/l10n/th.json +95 -36
- package/templates/events-meetups/l10n/tr.json +95 -36
- package/templates/events-meetups/l10n/uk.json +95 -36
- package/templates/events-meetups/l10n/vi.json +95 -36
- package/templates/events-meetups/l10n/zh.json +95 -36
- package/templates/events-meetups/tier5-src/_shared/himi-blog-post-row.ts +5 -1
- package/templates/events-meetups/tier5-src/_shared/relative-time.ts +21 -0
- package/templates/events-meetups/tier5-src/himi-blog-feed/index.ts +9 -0
- package/templates/events-meetups/tier5-src/himi-blog-post/index.ts +501 -50
- package/templates/gym-fitness/config.ts +1 -1
- package/templates/gym-fitness/dev/index.ts +2621 -853
- package/templates/gym-fitness/l10n/ar.json +95 -36
- package/templates/gym-fitness/l10n/cs.json +95 -36
- package/templates/gym-fitness/l10n/da.json +95 -36
- package/templates/gym-fitness/l10n/de.json +95 -36
- package/templates/gym-fitness/l10n/el.json +95 -36
- package/templates/gym-fitness/l10n/en.json +71 -15
- package/templates/gym-fitness/l10n/es.json +95 -36
- package/templates/gym-fitness/l10n/fi.json +95 -36
- package/templates/gym-fitness/l10n/fr.json +95 -36
- package/templates/gym-fitness/l10n/he.json +78 -29
- package/templates/gym-fitness/l10n/hu.json +95 -36
- package/templates/gym-fitness/l10n/id.json +95 -36
- package/templates/gym-fitness/l10n/it.json +95 -36
- package/templates/gym-fitness/l10n/ja.json +95 -36
- package/templates/gym-fitness/l10n/ko.json +95 -36
- package/templates/gym-fitness/l10n/lt.json +95 -36
- package/templates/gym-fitness/l10n/nl.json +95 -36
- package/templates/gym-fitness/l10n/no.json +95 -36
- package/templates/gym-fitness/l10n/pl.json +95 -36
- package/templates/gym-fitness/l10n/pt.json +95 -36
- package/templates/gym-fitness/l10n/ru.json +95 -36
- package/templates/gym-fitness/l10n/sv.json +95 -36
- package/templates/gym-fitness/l10n/th.json +95 -36
- package/templates/gym-fitness/l10n/tr.json +95 -36
- package/templates/gym-fitness/l10n/uk.json +95 -36
- package/templates/gym-fitness/l10n/vi.json +95 -36
- package/templates/gym-fitness/l10n/zh.json +95 -36
- package/templates/gym-fitness/tier5-src/_shared/himi-blog-post-row.ts +5 -1
- package/templates/gym-fitness/tier5-src/_shared/relative-time.ts +21 -0
- package/templates/gym-fitness/tier5-src/himi-blog-feed/index.ts +9 -0
- package/templates/gym-fitness/tier5-src/himi-blog-post/index.ts +501 -50
- package/templates/gym-fitness/tier5-src/himi-branded-lite-cart/index.ts +98 -6
- package/templates/nonprofit-cause/config.ts +1 -1
- package/templates/nonprofit-cause/dev/index.ts +2704 -936
- package/templates/nonprofit-cause/l10n/ar.json +95 -36
- package/templates/nonprofit-cause/l10n/cs.json +95 -36
- package/templates/nonprofit-cause/l10n/da.json +95 -36
- package/templates/nonprofit-cause/l10n/de.json +95 -36
- package/templates/nonprofit-cause/l10n/el.json +95 -36
- package/templates/nonprofit-cause/l10n/en.json +71 -15
- package/templates/nonprofit-cause/l10n/es.json +95 -36
- package/templates/nonprofit-cause/l10n/fi.json +95 -36
- package/templates/nonprofit-cause/l10n/fr.json +95 -36
- package/templates/nonprofit-cause/l10n/he.json +78 -29
- package/templates/nonprofit-cause/l10n/hu.json +95 -36
- package/templates/nonprofit-cause/l10n/id.json +95 -36
- package/templates/nonprofit-cause/l10n/it.json +95 -36
- package/templates/nonprofit-cause/l10n/ja.json +95 -36
- package/templates/nonprofit-cause/l10n/ko.json +95 -36
- package/templates/nonprofit-cause/l10n/lt.json +95 -36
- package/templates/nonprofit-cause/l10n/nl.json +95 -36
- package/templates/nonprofit-cause/l10n/no.json +95 -36
- package/templates/nonprofit-cause/l10n/pl.json +95 -36
- package/templates/nonprofit-cause/l10n/pt.json +95 -36
- package/templates/nonprofit-cause/l10n/ru.json +95 -36
- package/templates/nonprofit-cause/l10n/sv.json +95 -36
- package/templates/nonprofit-cause/l10n/th.json +95 -36
- package/templates/nonprofit-cause/l10n/tr.json +95 -36
- package/templates/nonprofit-cause/l10n/uk.json +95 -36
- package/templates/nonprofit-cause/l10n/vi.json +95 -36
- package/templates/nonprofit-cause/l10n/zh.json +95 -36
- package/templates/nonprofit-cause/tier5-src/_shared/himi-blog-post-row.ts +5 -1
- package/templates/nonprofit-cause/tier5-src/_shared/relative-time.ts +21 -0
- package/templates/nonprofit-cause/tier5-src/himi-blog-feed/index.ts +9 -0
- package/templates/nonprofit-cause/tier5-src/himi-blog-post/index.ts +501 -50
- package/templates/podcast-creator/config.ts +1 -1
- package/templates/podcast-creator/dev/index.ts +2704 -936
- package/templates/podcast-creator/l10n/ar.json +95 -36
- package/templates/podcast-creator/l10n/cs.json +95 -36
- package/templates/podcast-creator/l10n/da.json +95 -36
- package/templates/podcast-creator/l10n/de.json +95 -36
- package/templates/podcast-creator/l10n/el.json +95 -36
- package/templates/podcast-creator/l10n/en.json +71 -15
- package/templates/podcast-creator/l10n/es.json +95 -36
- package/templates/podcast-creator/l10n/fi.json +95 -36
- package/templates/podcast-creator/l10n/fr.json +95 -36
- package/templates/podcast-creator/l10n/he.json +78 -29
- package/templates/podcast-creator/l10n/hu.json +95 -36
- package/templates/podcast-creator/l10n/id.json +95 -36
- package/templates/podcast-creator/l10n/it.json +95 -36
- package/templates/podcast-creator/l10n/ja.json +95 -36
- package/templates/podcast-creator/l10n/ko.json +95 -36
- package/templates/podcast-creator/l10n/lt.json +95 -36
- package/templates/podcast-creator/l10n/nl.json +95 -36
- package/templates/podcast-creator/l10n/no.json +95 -36
- package/templates/podcast-creator/l10n/pl.json +95 -36
- package/templates/podcast-creator/l10n/pt.json +95 -36
- package/templates/podcast-creator/l10n/ru.json +95 -36
- package/templates/podcast-creator/l10n/sv.json +95 -36
- package/templates/podcast-creator/l10n/th.json +95 -36
- package/templates/podcast-creator/l10n/tr.json +95 -36
- package/templates/podcast-creator/l10n/uk.json +95 -36
- package/templates/podcast-creator/l10n/vi.json +95 -36
- package/templates/podcast-creator/l10n/zh.json +95 -36
- package/templates/podcast-creator/tier5-src/_shared/himi-blog-post-row.ts +5 -1
- package/templates/podcast-creator/tier5-src/_shared/relative-time.ts +21 -0
- package/templates/podcast-creator/tier5-src/himi-blog-feed/index.ts +9 -0
- package/templates/podcast-creator/tier5-src/himi-blog-post/index.ts +501 -50
- package/templates/portfolio-creative/config.ts +1 -1
- package/templates/portfolio-creative/dev/index.ts +2499 -731
- package/templates/portfolio-creative/l10n/ar.json +95 -36
- package/templates/portfolio-creative/l10n/cs.json +95 -36
- package/templates/portfolio-creative/l10n/da.json +95 -36
- package/templates/portfolio-creative/l10n/de.json +95 -36
- package/templates/portfolio-creative/l10n/el.json +95 -36
- package/templates/portfolio-creative/l10n/en.json +71 -15
- package/templates/portfolio-creative/l10n/es.json +95 -36
- package/templates/portfolio-creative/l10n/fi.json +95 -36
- package/templates/portfolio-creative/l10n/fr.json +95 -36
- package/templates/portfolio-creative/l10n/he.json +78 -29
- package/templates/portfolio-creative/l10n/hu.json +95 -36
- package/templates/portfolio-creative/l10n/id.json +95 -36
- package/templates/portfolio-creative/l10n/it.json +95 -36
- package/templates/portfolio-creative/l10n/ja.json +95 -36
- package/templates/portfolio-creative/l10n/ko.json +95 -36
- package/templates/portfolio-creative/l10n/lt.json +95 -36
- package/templates/portfolio-creative/l10n/nl.json +95 -36
- package/templates/portfolio-creative/l10n/no.json +95 -36
- package/templates/portfolio-creative/l10n/pl.json +95 -36
- package/templates/portfolio-creative/l10n/pt.json +95 -36
- package/templates/portfolio-creative/l10n/ru.json +95 -36
- package/templates/portfolio-creative/l10n/sv.json +95 -36
- package/templates/portfolio-creative/l10n/th.json +95 -36
- package/templates/portfolio-creative/l10n/tr.json +95 -36
- package/templates/portfolio-creative/l10n/uk.json +95 -36
- package/templates/portfolio-creative/l10n/vi.json +95 -36
- package/templates/portfolio-creative/l10n/zh.json +95 -36
- package/templates/portfolio-creative/tier5-src/_shared/himi-blog-post-row.ts +5 -1
- package/templates/portfolio-creative/tier5-src/_shared/relative-time.ts +21 -0
- package/templates/portfolio-creative/tier5-src/himi-blog-feed/index.ts +9 -0
- package/templates/portfolio-creative/tier5-src/himi-blog-post/index.ts +501 -50
- package/templates/portfolio-creative/tier5-src/himi-branded-lite-cart/index.ts +98 -6
- package/templates/restaurant/config.ts +1 -1
- package/templates/restaurant/dev/index.ts +2528 -760
- package/templates/restaurant/l10n/ar.json +95 -36
- package/templates/restaurant/l10n/cs.json +95 -36
- package/templates/restaurant/l10n/da.json +95 -36
- package/templates/restaurant/l10n/de.json +95 -36
- package/templates/restaurant/l10n/el.json +95 -36
- package/templates/restaurant/l10n/en.json +71 -15
- package/templates/restaurant/l10n/es.json +95 -36
- package/templates/restaurant/l10n/fi.json +95 -36
- package/templates/restaurant/l10n/fr.json +95 -36
- package/templates/restaurant/l10n/he.json +78 -29
- package/templates/restaurant/l10n/hu.json +95 -36
- package/templates/restaurant/l10n/id.json +95 -36
- package/templates/restaurant/l10n/it.json +95 -36
- package/templates/restaurant/l10n/ja.json +95 -36
- package/templates/restaurant/l10n/ko.json +95 -36
- package/templates/restaurant/l10n/lt.json +95 -36
- package/templates/restaurant/l10n/nl.json +95 -36
- package/templates/restaurant/l10n/no.json +95 -36
- package/templates/restaurant/l10n/pl.json +95 -36
- package/templates/restaurant/l10n/pt.json +95 -36
- package/templates/restaurant/l10n/ru.json +95 -36
- package/templates/restaurant/l10n/sv.json +95 -36
- package/templates/restaurant/l10n/th.json +95 -36
- package/templates/restaurant/l10n/tr.json +95 -36
- package/templates/restaurant/l10n/uk.json +95 -36
- package/templates/restaurant/l10n/vi.json +95 -36
- package/templates/restaurant/l10n/zh.json +95 -36
- package/templates/restaurant/tier5-src/_shared/himi-blog-post-row.ts +5 -1
- package/templates/restaurant/tier5-src/_shared/relative-time.ts +21 -0
- package/templates/restaurant/tier5-src/himi-blog-feed/index.ts +9 -0
- package/templates/restaurant/tier5-src/himi-blog-post/index.ts +501 -50
- package/templates/retail-store/config.ts +1 -1
- package/templates/retail-store/dev/index.ts +2417 -661
- package/templates/retail-store/l10n/ar.json +95 -41
- package/templates/retail-store/l10n/cs.json +95 -41
- package/templates/retail-store/l10n/da.json +95 -41
- package/templates/retail-store/l10n/de.json +95 -41
- package/templates/retail-store/l10n/el.json +95 -41
- package/templates/retail-store/l10n/en.json +71 -20
- package/templates/retail-store/l10n/es.json +95 -41
- package/templates/retail-store/l10n/fi.json +95 -41
- package/templates/retail-store/l10n/fr.json +95 -41
- package/templates/retail-store/l10n/he.json +78 -33
- package/templates/retail-store/l10n/hu.json +95 -41
- package/templates/retail-store/l10n/id.json +95 -41
- package/templates/retail-store/l10n/it.json +95 -41
- package/templates/retail-store/l10n/ja.json +95 -41
- package/templates/retail-store/l10n/ko.json +95 -41
- package/templates/retail-store/l10n/lt.json +95 -41
- package/templates/retail-store/l10n/nl.json +95 -41
- package/templates/retail-store/l10n/no.json +95 -41
- package/templates/retail-store/l10n/pl.json +95 -41
- package/templates/retail-store/l10n/pt.json +95 -41
- package/templates/retail-store/l10n/ru.json +95 -41
- package/templates/retail-store/l10n/sv.json +95 -41
- package/templates/retail-store/l10n/th.json +95 -41
- package/templates/retail-store/l10n/tr.json +95 -41
- package/templates/retail-store/l10n/uk.json +95 -41
- package/templates/retail-store/l10n/vi.json +95 -41
- package/templates/retail-store/l10n/zh.json +95 -41
- package/templates/retail-store/tier5-src/_shared/himi-blog-post-row.ts +5 -1
- package/templates/retail-store/tier5-src/_shared/relative-time.ts +21 -0
- package/templates/retail-store/tier5-src/himi-blog-feed/index.ts +9 -0
- package/templates/retail-store/tier5-src/himi-blog-post/index.ts +501 -50
- package/templates/retail-store/tier5-src/himi-branded-lite-cart/index.ts +98 -6
- package/templates/wholesale-store/tier5-src/himi-branded-lite-cart/index.ts +98 -6
- package/templates/yoga-studio/config.ts +1 -1
- package/templates/yoga-studio/dev/index.ts +2619 -851
- package/templates/yoga-studio/l10n/ar.json +95 -36
- package/templates/yoga-studio/l10n/cs.json +95 -36
- package/templates/yoga-studio/l10n/da.json +95 -36
- package/templates/yoga-studio/l10n/de.json +95 -36
- package/templates/yoga-studio/l10n/el.json +95 -36
- package/templates/yoga-studio/l10n/en.json +71 -15
- package/templates/yoga-studio/l10n/es.json +95 -36
- package/templates/yoga-studio/l10n/fi.json +95 -36
- package/templates/yoga-studio/l10n/fr.json +95 -36
- package/templates/yoga-studio/l10n/he.json +78 -29
- package/templates/yoga-studio/l10n/hu.json +95 -36
- package/templates/yoga-studio/l10n/id.json +95 -36
- package/templates/yoga-studio/l10n/it.json +95 -36
- package/templates/yoga-studio/l10n/ja.json +95 -36
- package/templates/yoga-studio/l10n/ko.json +95 -36
- package/templates/yoga-studio/l10n/lt.json +95 -36
- package/templates/yoga-studio/l10n/nl.json +95 -36
- package/templates/yoga-studio/l10n/no.json +95 -36
- package/templates/yoga-studio/l10n/pl.json +95 -36
- package/templates/yoga-studio/l10n/pt.json +95 -36
- package/templates/yoga-studio/l10n/ru.json +95 -36
- package/templates/yoga-studio/l10n/sv.json +95 -36
- package/templates/yoga-studio/l10n/th.json +95 -36
- package/templates/yoga-studio/l10n/tr.json +95 -36
- package/templates/yoga-studio/l10n/uk.json +95 -36
- package/templates/yoga-studio/l10n/vi.json +95 -36
- package/templates/yoga-studio/l10n/zh.json +95 -36
- package/templates/yoga-studio/tier5-src/_shared/himi-blog-post-row.ts +5 -1
- package/templates/yoga-studio/tier5-src/_shared/relative-time.ts +21 -0
- package/templates/yoga-studio/tier5-src/himi-blog-feed/index.ts +9 -0
- package/templates/yoga-studio/tier5-src/himi-blog-post/index.ts +501 -50
|
@@ -1084,6 +1084,9 @@ export declare function bottomSheet(props: {
|
|
|
1084
1084
|
/** Nano parity (#6017) — `"none"` draws no dim behind the sheet while it stays modal (the
|
|
1085
1085
|
* scrim still blocks touches and dismisses on tap). Default `"dim"`. */
|
|
1086
1086
|
backdrop?: "dim" | "none";
|
|
1087
|
+
/** A sticky footer below the scrolling `content`: pinned to the sheet's bottom edge and above the
|
|
1088
|
+
* software keyboard (a comment composer). Modal bottom and side sheets only. */
|
|
1089
|
+
footer?: Component;
|
|
1087
1090
|
}, opts?: {
|
|
1088
1091
|
id?: string;
|
|
1089
1092
|
}): Component;
|
package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/schema.d.ts
CHANGED
|
@@ -1585,6 +1585,10 @@ export interface BottomSheetProps {
|
|
|
1585
1585
|
/** "dim" (default) | "none": no dim behind a sheet that stays modal
|
|
1586
1586
|
* (the scrim still blocks and dismisses). `modal: false` drops modality too. */
|
|
1587
1587
|
backdrop?: "dim" | "none";
|
|
1588
|
+
/** A sticky footer drawn BELOW the scrolling `content`: it never scrolls with it, stays pinned
|
|
1589
|
+
* to the sheet's bottom edge and rides above the software keyboard (a comment composer). Modal
|
|
1590
|
+
* bottom and side sheets only — a footer on a `modal: false` sheet is a validation error. */
|
|
1591
|
+
footer?: Component;
|
|
1588
1592
|
}
|
|
1589
1593
|
export interface MenuItem {
|
|
1590
1594
|
id: string;
|
|
@@ -3418,6 +3422,10 @@ export interface TopBarAction {
|
|
|
3418
3422
|
/** "screen" opts into screen-worker visibility. Unset/unknown retains navigation ownership.
|
|
3419
3423
|
* App-level topBarDefault actions always retain navigation ownership when inherited. */
|
|
3420
3424
|
hiddenPathScope?: string;
|
|
3425
|
+
/** RFC 0070 §1.2 — fail-closed `hiddenPath`, as on `NavTabItem`: hidden until the nav worker
|
|
3426
|
+
* resolves the path to a scalar, and hidden if it never does. Older runtimes ignore it and
|
|
3427
|
+
* fail open. */
|
|
3428
|
+
hiddenUntilResolved?: boolean;
|
|
3421
3429
|
}
|
|
3422
3430
|
/** Splash layout discriminator. Single-line string-literal union (house style,
|
|
3423
3431
|
* like `NavKind`); unknown values coalesce to "centered" in the shell. */
|
package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/site-shell.d.ts
CHANGED
|
@@ -470,7 +470,12 @@ export interface SiteShellCheckOptions {
|
|
|
470
470
|
/** Throws with a legible message on a site description no shell can build from. */
|
|
471
471
|
export declare function assertSiteShellConfig(site: SiteShellConfig, opts?: SiteShellCheckOptions): void;
|
|
472
472
|
/** A rewriter for one contract's site: rewrites every dead tap in a descriptor, in place on a copy. */
|
|
473
|
-
export
|
|
473
|
+
export interface SiteShellLinkOptions {
|
|
474
|
+
/** The shell serves the native MEMBER cart (`himi_cart`, RFC 0079 §10 amendment 2026-11-16b): a tap into
|
|
475
|
+
* it, and an order's Reorder that fills it, are kept rather than removed. */
|
|
476
|
+
nativeCart?: boolean;
|
|
477
|
+
}
|
|
478
|
+
export declare function siteShellLinks(site: SiteShellConfig, options?: SiteShellLinkOptions): (descriptor: ScreenDescriptor) => ScreenDescriptor;
|
|
474
479
|
/**
|
|
475
480
|
* Where a tapped Wix member notification opens in a site shell: on the customer's own site. Wix Ping
|
|
476
481
|
* delivers Wix MOBILE links (`wix:/my-account/<msid>/stores/orders/<id>`, `https://m-<msid>.branded.wix.app/…`),
|
package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/validator.d.ts
CHANGED
|
@@ -798,6 +798,9 @@ export declare const screenDescriptorSchema: {
|
|
|
798
798
|
readonly hiddenPathScope: {
|
|
799
799
|
readonly type: "string";
|
|
800
800
|
};
|
|
801
|
+
readonly hiddenUntilResolved: {
|
|
802
|
+
readonly type: "boolean";
|
|
803
|
+
};
|
|
801
804
|
};
|
|
802
805
|
};
|
|
803
806
|
readonly navBadge: {
|
|
@@ -2377,6 +2380,9 @@ export declare const widgetSnapshotSchema: {
|
|
|
2377
2380
|
readonly hiddenPathScope: {
|
|
2378
2381
|
readonly type: "string";
|
|
2379
2382
|
};
|
|
2383
|
+
readonly hiddenUntilResolved: {
|
|
2384
|
+
readonly type: "boolean";
|
|
2385
|
+
};
|
|
2380
2386
|
};
|
|
2381
2387
|
};
|
|
2382
2388
|
readonly navBadge: {
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
export declare const BLOG_COMMENTS_APP_ID = "14bcded7-0066-7c35-14d7-466cb3f09103";
|
|
2
2
|
export type WixBlogCommentRow = {
|
|
3
3
|
id: string;
|
|
4
|
+
/** The name the wire object carries, or "" — the Comments API names most authors by id only
|
|
5
|
+
* (`author.memberId`), so a caller resolves the public name from `authorMemberId`. */
|
|
4
6
|
authorName: string;
|
|
7
|
+
/** The author's member id (`author.memberId`); absent for a visitor or an id-less author. */
|
|
8
|
+
authorMemberId?: string;
|
|
5
9
|
/** The comment's plain text (every text run, space-joined). */
|
|
6
10
|
text: string;
|
|
7
11
|
createdDate: string;
|
|
@@ -17,6 +21,29 @@ export type WixBlogCommentRow = {
|
|
|
17
21
|
* ingested spec calls it by itself — so this is a signal to show "N more replies" rather
|
|
18
22
|
* than silently truncating, not something a caller can page past yet. */
|
|
19
23
|
hasMoreReplies?: boolean;
|
|
24
|
+
/** `reactionSummary.total` — absent when the site returned no reaction summary (then the
|
|
25
|
+
* site does not take reactions on this comment, and a Like control should not show). */
|
|
26
|
+
reactionTotal?: number;
|
|
27
|
+
/** `replyCount`, when the response carried one. */
|
|
28
|
+
replyCount?: number;
|
|
29
|
+
};
|
|
30
|
+
/** The comment text as Ricos: one PARAGRAPH per line, so a multi-line comment keeps its lines
|
|
31
|
+
* (a single TEXT node with "\n" in it showed only the first line on the site and in the app). */
|
|
32
|
+
export declare const ricosText: (text: string) => {
|
|
33
|
+
nodes: {
|
|
34
|
+
type: string;
|
|
35
|
+
id: string;
|
|
36
|
+
nodes: {
|
|
37
|
+
type: string;
|
|
38
|
+
id: string;
|
|
39
|
+
textData: {
|
|
40
|
+
text: string;
|
|
41
|
+
};
|
|
42
|
+
}[];
|
|
43
|
+
}[];
|
|
44
|
+
metadata: {
|
|
45
|
+
version: number;
|
|
46
|
+
};
|
|
20
47
|
};
|
|
21
48
|
type BlogCommentLike = {
|
|
22
49
|
id?: string;
|
|
@@ -33,6 +60,47 @@ export declare function blogCommentRow(comment: BlogCommentLike | undefined): Wi
|
|
|
33
60
|
export declare function createBlogComment(postId: string, text: string): Promise<WixBlogCommentRow>;
|
|
34
61
|
/** First Comments page for Blog v3 `post.internalId`, not its navigation UUID. */
|
|
35
62
|
export declare function listBlogComments(postId: string): Promise<WixBlogCommentRow[]>;
|
|
63
|
+
/** The reaction code a like is on Wix Comments — the code the Wix Blog site uses for a comment
|
|
64
|
+
* like, and the one the Comments API docs react with. */
|
|
65
|
+
export declare const COMMENT_LIKE_CODE = ":like:";
|
|
66
|
+
export interface WixBlogCommentPage {
|
|
67
|
+
/** Top-level comments newest first; each one's replies follow it, oldest reply first, tagged
|
|
68
|
+
* with `parentCommentId`. */
|
|
69
|
+
comments: WixBlogCommentRow[];
|
|
70
|
+
/** The cursor of the next page of top-level comments ("" when there is none). */
|
|
71
|
+
nextCursor: string;
|
|
72
|
+
}
|
|
73
|
+
export interface WixBlogCommentPageOptions {
|
|
74
|
+
cursor?: string;
|
|
75
|
+
/** Top-level comments per page. */
|
|
76
|
+
limit?: number;
|
|
77
|
+
/** Replies included under each comment. */
|
|
78
|
+
repliesLimit?: number;
|
|
79
|
+
}
|
|
80
|
+
/** One page of a blog post's comments, NEWEST first, with each comment's replies —
|
|
81
|
+
* GET /comments/v1/comments/list-by-resource with `commentSort.order=NEWEST_FIRST`,
|
|
82
|
+
* `replySort.order=OLDEST_FIRST` and `cursorPaging` (verified live on the demo site,
|
|
83
|
+
* 2026-11-17: the cursor pages the rest newest first). `postId` is Blog v3 `post.internalId`.
|
|
84
|
+
* Query-string params only, hand-built: see `listBlogComments` for why. An empty `comments`
|
|
85
|
+
* with no cursor is a post with no comments; a page without a comment list throws.
|
|
86
|
+
*
|
|
87
|
+
* @scope visitor — readable with a site visitor token (verified live 2026-11-17). */
|
|
88
|
+
export declare function listBlogCommentPage(postId: string, opts?: WixBlogCommentPageOptions): Promise<WixBlogCommentPage>;
|
|
89
|
+
/** Which of `commentIds` the current identity liked — POST /comments/v1/bulk/comments/reactions/get
|
|
90
|
+
* (`hasReacted` per reaction code). At most 100 ids per call; the request fails as a whole when
|
|
91
|
+
* any id is not in this post's context, so pass only ids read from it.
|
|
92
|
+
*
|
|
93
|
+
* @scope visitor — a visitor gets an empty set; a signed-in member gets their own likes. */
|
|
94
|
+
export declare function likedBlogComments(postId: string, commentIds: readonly string[]): Promise<Set<string>>;
|
|
95
|
+
/** Like (`true`) or unlike a comment as the current identity (reaction code `:like:`).
|
|
96
|
+
*
|
|
97
|
+
* @scope member — the site refuses a visitor's reaction. */
|
|
98
|
+
export declare function setBlogCommentLike(commentId: string, like: boolean): Promise<void>;
|
|
99
|
+
/** A comment, or a reply to `parentCommentId`, on Blog v3 `post.internalId`. One level only:
|
|
100
|
+
* a reply to a reply goes to the same parent.
|
|
101
|
+
*
|
|
102
|
+
* @scope member — a site that does not allow visitor comments refuses a visitor (HTTP 403). */
|
|
103
|
+
export declare function postBlogComment(postId: string, text: string, parentCommentId?: string): Promise<WixBlogCommentRow>;
|
|
36
104
|
/** The appId Wix Groups registers as its comments provider. Same value as
|
|
37
105
|
* GROUPS_APP_ID/GROUPS_APP_DEF_ID used elsewhere in this repo (social-feed's
|
|
38
106
|
* reactions/create-post calls) — Groups is one of the apps where the comments
|
|
@@ -9408,7 +9408,9 @@ var screenDescriptorSchema = {
|
|
|
9408
9408
|
hiddenPath: { type: "string" },
|
|
9409
9409
|
labelPath: { type: "string" },
|
|
9410
9410
|
iconPath: { type: "string" },
|
|
9411
|
-
hiddenPathScope: { type: "string" }
|
|
9411
|
+
hiddenPathScope: { type: "string" },
|
|
9412
|
+
// Hidden until hiddenPath first resolves (fail closed): the Brandy cart icon pair.
|
|
9413
|
+
hiddenUntilResolved: { type: "boolean" }
|
|
9412
9414
|
}
|
|
9413
9415
|
},
|
|
9414
9416
|
navBadge: {
|
|
@@ -13165,7 +13167,7 @@ var ICON_CATALOG = {
|
|
|
13165
13167
|
"style": "filled",
|
|
13166
13168
|
"ios": {
|
|
13167
13169
|
"sf": "ellipsis.vertical",
|
|
13168
|
-
"match": "
|
|
13170
|
+
"match": "none"
|
|
13169
13171
|
},
|
|
13170
13172
|
"android": {
|
|
13171
13173
|
"material": "MoreVert",
|
|
@@ -16063,6 +16065,7 @@ var SITE_STAND_INS = {
|
|
|
16063
16065
|
};
|
|
16064
16066
|
var ALWAYS_HIDDEN_TARGETS = ["himi_cart", "himi_new_message"];
|
|
16065
16067
|
var HIDDEN_ACTIONS = ["tier5.himiBrandedOrder.reorder"];
|
|
16068
|
+
var UNTAPPED_TARGETS = ["himi_product"];
|
|
16066
16069
|
var LABEL_FOR = { action: "actionLabel", cta: "ctaLabel" };
|
|
16067
16070
|
function standInActions(site) {
|
|
16068
16071
|
const tapFor = (id, target) => siteTopBarDefault({ ...site, topBar: { actions: [{ id, icon: "globe", label: id, target }] } })?.actions?.[0]?.onTap;
|
|
@@ -16078,17 +16081,19 @@ function standInActions(site) {
|
|
|
16078
16081
|
}
|
|
16079
16082
|
return taps;
|
|
16080
16083
|
}
|
|
16081
|
-
function siteShellLinks(site) {
|
|
16084
|
+
function siteShellLinks(site, options = {}) {
|
|
16082
16085
|
const standIns = standInActions(site);
|
|
16086
|
+
const hiddenTargets = options.nativeCart ? ALWAYS_HIDDEN_TARGETS.filter((id) => id !== "himi_cart") : ALWAYS_HIDDEN_TARGETS;
|
|
16087
|
+
const hiddenActions = options.nativeCart ? [] : HIDDEN_ACTIONS;
|
|
16083
16088
|
const verdict = (action) => {
|
|
16084
16089
|
if (!action || typeof action !== "object") return "keep";
|
|
16085
16090
|
const a = action;
|
|
16086
|
-
if (
|
|
16091
|
+
if (hiddenActions.includes(a.actionId)) return "hide";
|
|
16087
16092
|
if (a.actionId !== "himi.open") return "keep";
|
|
16088
16093
|
const target = a.params?.screenId;
|
|
16089
16094
|
if (!target) return "keep";
|
|
16090
16095
|
if (standIns.has(target)) return standIns.get(target);
|
|
16091
|
-
if (
|
|
16096
|
+
if (hiddenTargets.includes(target) || target in SITE_STAND_INS) return "hide";
|
|
16092
16097
|
return "keep";
|
|
16093
16098
|
};
|
|
16094
16099
|
const visit = (node) => {
|
|
@@ -16112,6 +16117,8 @@ function siteShellLinks(site) {
|
|
|
16112
16117
|
}
|
|
16113
16118
|
const modifiers = n.modifiers;
|
|
16114
16119
|
if (modifiers) {
|
|
16120
|
+
const tapTarget = modifiers.onTap?.params?.screenId;
|
|
16121
|
+
if (modifiers.onTap?.actionId === "himi.open" && tapTarget && UNTAPPED_TARGETS.includes(tapTarget)) delete modifiers.onTap;
|
|
16115
16122
|
const v = verdict(modifiers.onTap);
|
|
16116
16123
|
if (v === "hide") return false;
|
|
16117
16124
|
if (v !== "keep") modifiers.onTap = { ...v };
|
|
@@ -7420,7 +7420,9 @@ var screenDescriptorSchema = {
|
|
|
7420
7420
|
hiddenPath: { type: "string" },
|
|
7421
7421
|
labelPath: { type: "string" },
|
|
7422
7422
|
iconPath: { type: "string" },
|
|
7423
|
-
hiddenPathScope: { type: "string" }
|
|
7423
|
+
hiddenPathScope: { type: "string" },
|
|
7424
|
+
// Hidden until hiddenPath first resolves (fail closed): the Brandy cart icon pair.
|
|
7425
|
+
hiddenUntilResolved: { type: "boolean" }
|
|
7424
7426
|
}
|
|
7425
7427
|
},
|
|
7426
7428
|
navBadge: {
|
|
@@ -7,19 +7,11 @@ var __export = (target, all) => {
|
|
|
7
7
|
// ../../stdlib/wix-sdk/comments-v1/src/extensions.ts
|
|
8
8
|
var BLOG_COMMENTS_APP_ID = "14bcded7-0066-7c35-14d7-466cb3f09103";
|
|
9
9
|
var ricosText = (text) => ({
|
|
10
|
-
nodes:
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
{
|
|
16
|
-
type: "TEXT",
|
|
17
|
-
id: "himi-blog-comment-text",
|
|
18
|
-
textData: { text }
|
|
19
|
-
}
|
|
20
|
-
]
|
|
21
|
-
}
|
|
22
|
-
],
|
|
10
|
+
nodes: text.split(/\r?\n/).map((line, index) => ({
|
|
11
|
+
type: "PARAGRAPH",
|
|
12
|
+
id: index === 0 ? "himi-blog-comment" : `himi-blog-comment-${index}`,
|
|
13
|
+
nodes: line ? [{ type: "TEXT", id: index === 0 ? "himi-blog-comment-text" : `himi-blog-comment-text-${index}`, textData: { text: line } }] : []
|
|
14
|
+
})),
|
|
23
15
|
metadata: { version: 1 }
|
|
24
16
|
});
|
|
25
17
|
var readRichText = (node) => {
|
|
@@ -30,13 +22,23 @@ var readRichText = (node) => {
|
|
|
30
22
|
};
|
|
31
23
|
var commentText = (comment) => {
|
|
32
24
|
const richContent = comment.content?.richContent;
|
|
33
|
-
const
|
|
34
|
-
|
|
25
|
+
const blocks = richContent?.nodes;
|
|
26
|
+
const text = Array.isArray(blocks) && blocks.length > 1 ? blocks.map(readRichText).join("\n").replace(/^\n+|\n+$/g, "") : readRichText(richContent);
|
|
27
|
+
return text.trim() ? text : "Comment";
|
|
35
28
|
};
|
|
36
29
|
var commentRichContent = (comment) => comment.content?.richContent;
|
|
37
30
|
var commentAuthor = (comment) => {
|
|
38
31
|
const author = comment.author;
|
|
39
|
-
return author?.name ?? author?.nickname ?? "
|
|
32
|
+
return (author?.name ?? author?.nickname ?? "").trim();
|
|
33
|
+
};
|
|
34
|
+
var commentExtras = (comment) => {
|
|
35
|
+
const memberId = comment.author?.memberId?.trim();
|
|
36
|
+
const total = comment.reactionSummary?.total;
|
|
37
|
+
return {
|
|
38
|
+
...memberId ? { authorMemberId: memberId } : {},
|
|
39
|
+
...comment.reactionSummary ? { reactionTotal: typeof total === "number" && total >= 0 ? total : 0 } : {},
|
|
40
|
+
...typeof comment.replyCount === "number" ? { replyCount: comment.replyCount } : {}
|
|
41
|
+
};
|
|
40
42
|
};
|
|
41
43
|
function blogCommentRow(comment) {
|
|
42
44
|
const c = comment ?? {};
|
|
@@ -45,7 +47,9 @@ function blogCommentRow(comment) {
|
|
|
45
47
|
authorName: commentAuthor(c),
|
|
46
48
|
text: commentText(c),
|
|
47
49
|
createdDate: c.createdDate ?? (/* @__PURE__ */ new Date()).toISOString(),
|
|
48
|
-
richContent: commentRichContent(c)
|
|
50
|
+
richContent: commentRichContent(c),
|
|
51
|
+
...commentExtras(c),
|
|
52
|
+
...c.parentComment?.id ? { parentCommentId: c.parentComment.id } : {}
|
|
49
53
|
};
|
|
50
54
|
}
|
|
51
55
|
async function createBlogComment(postId, text) {
|
|
@@ -88,7 +92,8 @@ async function listBlogComments(postId) {
|
|
|
88
92
|
authorName: commentAuthor(comment),
|
|
89
93
|
text: commentText(comment),
|
|
90
94
|
createdDate: comment.createdDate ?? "",
|
|
91
|
-
richContent: commentRichContent(comment)
|
|
95
|
+
richContent: commentRichContent(comment),
|
|
96
|
+
...commentExtras(comment)
|
|
92
97
|
}));
|
|
93
98
|
const instantOf = (row) => {
|
|
94
99
|
if (!row.createdDate) return Number.POSITIVE_INFINITY;
|
|
@@ -101,6 +106,102 @@ async function listBlogComments(postId) {
|
|
|
101
106
|
return x === y ? 0 : x < y ? -1 : 1;
|
|
102
107
|
});
|
|
103
108
|
}
|
|
109
|
+
var COMMENT_LIKE_CODE = ":like:";
|
|
110
|
+
var MAX_REPLY_PAGES = 25;
|
|
111
|
+
async function listBlogCommentPage(postId, opts = {}) {
|
|
112
|
+
if (!postId) {
|
|
113
|
+
throw new Error("postId is required");
|
|
114
|
+
}
|
|
115
|
+
const params = [
|
|
116
|
+
["appId", BLOG_COMMENTS_APP_ID],
|
|
117
|
+
["contextId", postId],
|
|
118
|
+
["resourceId", postId],
|
|
119
|
+
["commentSort.order", "NEWEST_FIRST"],
|
|
120
|
+
["replySort.order", "OLDEST_FIRST"],
|
|
121
|
+
["cursorPaging.repliesLimit", String(opts.repliesLimit ?? 20)],
|
|
122
|
+
...opts.limit != null ? [["cursorPaging.limit", String(opts.limit)]] : [],
|
|
123
|
+
...opts.cursor ? [["cursorPaging.cursor", opts.cursor]] : []
|
|
124
|
+
];
|
|
125
|
+
const query = params.map(([k, v]) => `${k}=${encodeURIComponent(v)}`).join("&");
|
|
126
|
+
const response = await wixCall("GET", `/comments/v1/comments/list-by-resource?${query}`);
|
|
127
|
+
if (!Array.isArray(response?.comments) && !(response?.comments == null && response?.pagingMetadata?.count === 0)) {
|
|
128
|
+
throw new Error("Blog comments response has no comment page");
|
|
129
|
+
}
|
|
130
|
+
const toRow = (comment, parentCommentId) => ({
|
|
131
|
+
id: comment.id ?? "comment",
|
|
132
|
+
authorName: commentAuthor(comment),
|
|
133
|
+
text: commentText(comment),
|
|
134
|
+
createdDate: comment.createdDate ?? "",
|
|
135
|
+
richContent: commentRichContent(comment),
|
|
136
|
+
...commentExtras(comment),
|
|
137
|
+
...parentCommentId ? { parentCommentId } : {}
|
|
138
|
+
});
|
|
139
|
+
const repliesByParent = response.commentReplies ?? {};
|
|
140
|
+
const nextOf = (meta) => meta?.hasNext ? meta?.cursors?.next ?? "" : "";
|
|
141
|
+
const rows = [];
|
|
142
|
+
for (const comment of response.comments ?? []) {
|
|
143
|
+
const parent = toRow(comment);
|
|
144
|
+
const replies = (repliesByParent[parent.id]?.replies ?? []).map((reply) => toRow(reply, parent.id));
|
|
145
|
+
let cursor = nextOf(repliesByParent[parent.id]?.pagingMetadata);
|
|
146
|
+
for (let page = 0; cursor && page < MAX_REPLY_PAGES; page++) {
|
|
147
|
+
let more;
|
|
148
|
+
try {
|
|
149
|
+
more = await wixCall("GET", `/comments/v1/comments/list-by-resource?${[
|
|
150
|
+
["appId", BLOG_COMMENTS_APP_ID],
|
|
151
|
+
["contextId", postId],
|
|
152
|
+
["resourceId", postId],
|
|
153
|
+
["cursorPaging.cursor", cursor],
|
|
154
|
+
["cursorPaging.limit", "100"]
|
|
155
|
+
].map(([k, v]) => `${k}=${encodeURIComponent(v)}`).join("&")}`);
|
|
156
|
+
} catch {
|
|
157
|
+
break;
|
|
158
|
+
}
|
|
159
|
+
replies.push(...(more?.comments ?? []).map((reply) => toRow(reply, parent.id)));
|
|
160
|
+
cursor = nextOf(more?.pagingMetadata);
|
|
161
|
+
}
|
|
162
|
+
if (cursor) parent.hasMoreReplies = true;
|
|
163
|
+
rows.push(parent, ...replies);
|
|
164
|
+
}
|
|
165
|
+
const next = response.pagingMetadata?.hasNext ? response.pagingMetadata?.cursors?.next ?? "" : "";
|
|
166
|
+
return { comments: rows, nextCursor: next };
|
|
167
|
+
}
|
|
168
|
+
async function likedBlogComments(postId, commentIds) {
|
|
169
|
+
const liked = /* @__PURE__ */ new Set();
|
|
170
|
+
for (let at = 0; at < commentIds.length; at += 100) {
|
|
171
|
+
const batch = commentIds.slice(at, at + 100);
|
|
172
|
+
const response = await bulkGetCommentReactions({ appId: BLOG_COMMENTS_APP_ID, contextId: postId, commentIds: [...batch] });
|
|
173
|
+
const reactions = response?.reactions ?? {};
|
|
174
|
+
for (const id of batch) {
|
|
175
|
+
if (reactions[id]?.codeReactions?.some((code) => code.reactionCode === COMMENT_LIKE_CODE && code.hasReacted === true)) liked.add(id);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
return liked;
|
|
179
|
+
}
|
|
180
|
+
async function setBlogCommentLike(commentId, like) {
|
|
181
|
+
if (like) await addCommentReaction(commentId, { reactionCode: COMMENT_LIKE_CODE });
|
|
182
|
+
else await removeCommentReaction(commentId, { reactionCode: COMMENT_LIKE_CODE });
|
|
183
|
+
}
|
|
184
|
+
async function postBlogComment(postId, text, parentCommentId) {
|
|
185
|
+
const trimmed = text.trim();
|
|
186
|
+
if (!postId) {
|
|
187
|
+
throw new Error("postId is required");
|
|
188
|
+
}
|
|
189
|
+
if (!trimmed) {
|
|
190
|
+
throw new Error("comment text is required");
|
|
191
|
+
}
|
|
192
|
+
const request = {
|
|
193
|
+
comment: {
|
|
194
|
+
appId: BLOG_COMMENTS_APP_ID,
|
|
195
|
+
contextId: postId,
|
|
196
|
+
resourceId: postId,
|
|
197
|
+
content: { richContent: ricosText(trimmed) },
|
|
198
|
+
...parentCommentId ? { parentComment: { id: parentCommentId } } : {}
|
|
199
|
+
}
|
|
200
|
+
};
|
|
201
|
+
const response = await createComment(request);
|
|
202
|
+
const row = blogCommentRow(response.comment ?? response);
|
|
203
|
+
return parentCommentId ? { ...row, parentCommentId } : row;
|
|
204
|
+
}
|
|
104
205
|
var GROUPS_COMMENTS_APP_ID = "148c2287-c669-d849-d153-463c7486a694";
|
|
105
206
|
async function createGroupPostComment(groupId, feedItemId, text, parentCommentId) {
|
|
106
207
|
const trimmed = text.trim();
|
|
@@ -152,6 +253,7 @@ async function listGroupPostComments(groupId, feedItemId, opts = {}) {
|
|
|
152
253
|
text: commentText(comment),
|
|
153
254
|
createdDate: comment.createdDate ?? "",
|
|
154
255
|
richContent: commentRichContent(comment),
|
|
256
|
+
...commentExtras(comment),
|
|
155
257
|
...parentCommentId ? { parentCommentId } : {}
|
|
156
258
|
});
|
|
157
259
|
const instantOf = (row) => {
|
|
@@ -700,6 +802,7 @@ function updateCommentsWidget(req, opts) {
|
|
|
700
802
|
}
|
|
701
803
|
export {
|
|
702
804
|
BLOG_COMMENTS_APP_ID,
|
|
805
|
+
COMMENT_LIKE_CODE,
|
|
703
806
|
GROUPS_COMMENTS_APP_ID,
|
|
704
807
|
addCommentReaction,
|
|
705
808
|
blogCommentRow,
|
|
@@ -721,15 +824,20 @@ export {
|
|
|
721
824
|
getComment,
|
|
722
825
|
getCommentThread,
|
|
723
826
|
hideComment,
|
|
827
|
+
likedBlogComments,
|
|
828
|
+
listBlogCommentPage,
|
|
724
829
|
listBlogComments,
|
|
725
830
|
listCommentsByResource,
|
|
726
831
|
listGroupPostComments,
|
|
727
832
|
markComment,
|
|
728
833
|
moderateDraftContent,
|
|
834
|
+
postBlogComment,
|
|
729
835
|
publishComment,
|
|
730
836
|
queryComments,
|
|
731
837
|
ratings_generated_exports as ratings,
|
|
732
838
|
removeCommentReaction,
|
|
839
|
+
ricosText,
|
|
840
|
+
setBlogCommentLike,
|
|
733
841
|
unmarkComment,
|
|
734
842
|
updateComment,
|
|
735
843
|
widgets_generated_exports as widgets,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"files": [
|
|
3
3
|
{
|
|
4
4
|
"name": "sw.js",
|
|
5
|
-
"bytes":
|
|
5
|
+
"bytes": 2603268
|
|
6
6
|
},
|
|
7
7
|
{
|
|
8
8
|
"name": "host.html",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"bytes": 24320
|
|
22
22
|
},
|
|
23
23
|
{
|
|
24
|
-
"name": "preview-deferred/
|
|
24
|
+
"name": "preview-deferred/ef0d32c6770cbe9b695a3774a00fc3da19cd4f8655784f5cd935938054a34541.bin",
|
|
25
25
|
"bytes": 488215
|
|
26
26
|
},
|
|
27
27
|
{
|
|
@@ -79,10 +79,10 @@
|
|
|
79
79
|
],
|
|
80
80
|
"deferred": [
|
|
81
81
|
{
|
|
82
|
-
"key": "assets/pdf-
|
|
82
|
+
"key": "assets/pdf-91-oDBuu.js",
|
|
83
83
|
"contentType": "application/javascript; charset=utf-8",
|
|
84
|
-
"sha256": "
|
|
85
|
-
"file": "preview-deferred/
|
|
84
|
+
"sha256": "ef0d32c6770cbe9b695a3774a00fc3da19cd4f8655784f5cd935938054a34541",
|
|
85
|
+
"file": "preview-deferred/ef0d32c6770cbe9b695a3774a00fc3da19cd4f8655784f5cd935938054a34541.bin"
|
|
86
86
|
},
|
|
87
87
|
{
|
|
88
88
|
"key": "assets/pdf.worker.min-BGnVRhRG.js",
|